Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
14c2058e
Commit
14c2058e
authored
Jul 26, 2019
by
Mccoy Z Xia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compliance info 调整
parent
e2499407
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
143 additions
and
84 deletions
+143
-84
CalendarEventController.java
.../pwc/taxtech/atms/controller/CalendarEventController.java
+6
-0
ICalendarEventService.java
.../java/pwc/taxtech/atms/service/ICalendarEventService.java
+4
-0
CalendarEventServiceImpl.java
...c/taxtech/atms/service/impl/CalendarEventServiceImpl.java
+16
-0
CalendarExtMapper.java
.../pwc/taxtech/atms/calendar/dao/ext/CalendarExtMapper.java
+4
-2
organization-manage.ctrl.js
...astructure/organizationManage/organization-manage.ctrl.js
+103
-79
organization-manage.html
...nfrastructure/organizationManage/organization-manage.html
+3
-1
organization-manage.less
...nfrastructure/organizationManage/organization-manage.less
+2
-2
taxCalendarEvent.svc.js
...ain/webapp/app/common/webservices/taxCalendarEvent.svc.js
+5
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/CalendarEventController.java
View file @
14c2058e
...
...
@@ -7,6 +7,7 @@ import pwc.taxtech.atms.dto.OperationResultDto;
import
pwc.taxtech.atms.service.ICalendarEventService
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* <p> @Description </p>
...
...
@@ -42,4 +43,9 @@ public class CalendarEventController {
return
calendarEventServiceImpl
.
getEventByEntityId
(
entityId
);
}
@PostMapping
(
"batchUpdate"
)
public
OperationResultDto
batchUpdate
(
@RequestBody
List
<
CalendarEvent
>
list
){
return
calendarEventServiceImpl
.
batchUpdate
(
list
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/ICalendarEventService.java
View file @
14c2058e
...
...
@@ -4,6 +4,8 @@ import pwc.taxtech.atms.calendar.entity.CalendarEvent;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.calendar.CalendarDisplayQueryParamDto
;
import
java.util.List
;
public
interface
ICalendarEventService
{
OperationResultDto
addEvent
(
CalendarEvent
event
);
...
...
@@ -11,4 +13,6 @@ public interface ICalendarEventService {
OperationResultDto
deleteEvent
(
Long
id
);
OperationResultDto
getEventByEntityId
(
Long
entityId
);
OperationResultDto
batchUpdate
(
List
<
CalendarEvent
>
list
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CalendarEventServiceImpl.java
View file @
14c2058e
...
...
@@ -96,4 +96,20 @@ public class CalendarEventServiceImpl extends BaseService implements ICalendarEv
return
OperationResultDto
.
success
(
dtoList
);
}
@Override
public
OperationResultDto
batchUpdate
(
List
<
CalendarEvent
>
list
)
{
Date
updateTime
=
new
Date
();
try
{
list
.
forEach
(
p
->
{
p
.
setUpdateTime
(
updateTime
);
// authUserHelper.getCurrentUserId();
calendarEventMapper
.
updateByPrimaryKeySelective
(
p
);
});
}
catch
(
Exception
e
)
{
log
.
error
(
"getEventByEntityId error"
,
e
);
}
return
OperationResultDto
.
success
();
}
}
atms-dao/src/main/java/pwc/taxtech/atms/calendar/dao/ext/CalendarExtMapper.java
View file @
14c2058e
...
...
@@ -7,6 +7,7 @@ import pwc.taxtech.atms.calendar.dto.CalendarJurisdictionDto;
import
pwc.taxtech.atms.calendar.dto.CalendarTaskTypeDto
;
import
pwc.taxtech.atms.calendar.dto.EntityDto
;
import
pwc.taxtech.atms.calendar.entity.CalendarActionJurisdictionRelationship
;
import
pwc.taxtech.atms.calendar.entity.CalendarEvent
;
import
pwc.taxtech.atms.calendar.entity.CalendarJurisdiction
;
import
java.util.List
;
...
...
@@ -60,7 +61,7 @@ public interface CalendarExtMapper extends MyMapper {
Integer
getMaxConfigOrder
();
@Insert
(
"<script>\n"
+
"INSERT INTO Calendar
ActionJurisdiction
Relationship\n"
+
"INSERT INTO Calendar
_Action_Jurisdiction_
Relationship\n"
+
" ( id, area, description, logic_num, logic_unit, status, create_time, update_time)\n"
+
"VALUES\n"
+
"<foreach collection='list' item='item' index='index' separator=','>\n"
+
...
...
@@ -79,7 +80,7 @@ public interface CalendarExtMapper extends MyMapper {
int
batchInsertActionJurisdiction
(
List
<
CalendarJurisdiction
>
jurisdictionList
);
@Insert
(
"<script>"
+
"INSERT INTO Calendar
ActionJurisdiction
Relationship\n"
+
"INSERT INTO Calendar
_Action_Jurisdiction_
Relationship\n"
+
"( id, action_id, jurisdiction_id)\n"
+
"VALUES\n"
+
" <foreach collection='list' item='item' index='index' separator=','>\n"
+
...
...
@@ -116,4 +117,5 @@ public interface CalendarExtMapper extends MyMapper {
"ORDER BY\n"
+
"\tupdate_time"
)
List
<
CalendarEventDto
>
getEventByEntityId
(
Long
entityId
);
}
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.ctrl.js
View file @
14c2058e
...
...
@@ -1278,96 +1278,120 @@
var
getEventsOfCurrentEntity
=
function
()
{
taxCalendarEventService
.
getEventByEntityId
(
$scope
.
selectCompany
.
id
).
success
(
function
(
res
)
{
if
(
res
.
result
)
{
init
Compliance
(
res
.
data
);
refresh
Compliance
(
res
.
data
);
}
}).
error
(
function
()
{
init
Compliance
([]);
refresh
Compliance
([]);
});
};
var
initCompliance
=
function
(
calendarEventList
)
{
var
refreshCompliance
=
function
(
data
)
{
calendarEventList
=
data
;
$scope
.
eventsOfCurrentEntity
=
angular
.
copy
(
calendarEventList
);
};
var
tempEventList
=
angular
.
copy
(
calendarEventList
);
$scope
.
revertEventsOfCurrentEntity
=
function
(){
$scope
.
eventsOfCurrentEntity
=
angular
.
copy
(
calendarEventList
);
};
var
complianceStore
=
new
DevExpress
.
data
.
ArrayStore
({
key
:
"id"
,
data
:
tempEventList
});
$scope
.
selectedItemKeys
=
[];
$scope
.
batchSaveDisabled
=
true
;
var
statusDesc
=
[{
"id"
:
0
,
"name"
:
"N/A"
},
{
"id"
:
1
,
"name"
:
"Enable"
}];
$scope
.
complianceSaveButtonOptions
=
{
text
:
"Save"
,
height
:
34
,
width
:
100
,
onClick
:
function
()
{
$
.
each
(
$scope
.
selectedItemKeys
,
function
()
{
complianceStore
.
byKey
(
this
).
done
(
function
(
data
)
{
console
.
log
(
data
);
})
});
$scope
.
eventsOfCurrentEntity
=
[];
$scope
.
compliance
=
{
selectedItems
:
[],
batchSaveDisabled
:
true
};
var
statusDesc
=
[{
"id"
:
0
,
"name"
:
"N/A"
},
{
"id"
:
1
,
"name"
:
"Enable"
}];
var
calendarEventList
=
[];
$scope
.
complianceRevertButtonOptions
=
{
text
:
"Revert"
,
height
:
34
,
width
:
100
,
onClick
:
function
()
{
$scope
.
revertEventsOfCurrentEntity
();
$
(
"#complianceContainer"
).
dxDataGrid
(
"instance"
).
refresh
();
}
};
$scope
.
complianceSaveButtonOptions
=
{
text
:
"Save"
,
height
:
34
,
width
:
100
,
onClick
:
function
()
{
$
.
each
(
$scope
.
compliance
.
selectedItems
,
function
()
{
console
.
log
(
this
);
});
taxCalendarEventService
.
batchUpdate
(
$scope
.
compliance
.
selectedItems
).
success
(
function
(
res
)
{
$scope
.
compliance
.
selectedItems
=
[];
$scope
.
compliance
.
batchSaveDisabled
=
true
;
getEventsOfCurrentEntity
();
SweetAlert
.
success
(
$translate
.
instant
(
'SaveSuccess'
));
$
(
"#complianceContainer"
).
dxDataGrid
(
"instance"
).
refresh
();
},
bindingOptions
:
{
disabled
:
'batchSaveDisabled'
}
};
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'CommonFail'
));
});
$scope
.
complianceGridOptions
=
{
dataSource
:
complianceStore
,
showBorders
:
false
,
paging
:
{
enabled
:
false
},
editing
:
{
mode
:
"cell"
,
allowUpdating
:
true
},
selection
:
{
mode
:
"multiple"
},
onSelectionChanged
:
function
(
data
)
{
$scope
.
selectedItemKeys
=
data
.
selectedRowKeys
;
$scope
.
batchSaveDisabled
=
!
$scope
.
selectedItemKeys
.
length
;
},
columns
:
[
{
dataField
:
"taskName"
,
caption
:
"Action Item"
},
{
dataField
:
"isEnable"
,
caption
:
"Show in calendar"
,
dataType
:
"boolean"
,
width
:
150
},
{
dataField
:
"effectiveDate"
,
dataType
:
"date"
,
width
:
150
},
{
dataField
:
"dueDate"
,
dataType
:
"date"
,
width
:
150
},
{
dataField
:
"status"
,
width
:
150
,
lookup
:
{
dataSource
:
statusDesc
,
displayExpr
:
"name"
,
valueExpr
:
"id"
}
},
{
dataField
:
"notes"
,
caption
:
"Due date logic"
},
bindingOptions
:
{
disabled
:
'compliance.batchSaveDisabled'
}
};
$scope
.
complianceGridOptions
=
{
bindingOptions
:
{
dataSource
:
'eventsOfCurrentEntity'
},
showBorders
:
true
,
paging
:
{
enabled
:
false
},
editing
:
{
mode
:
"cell"
,
allowUpdating
:
true
},
selection
:
{
mode
:
"multiple"
},
onSelectionChanged
:
function
(
data
)
{
$scope
.
compliance
.
selectedItems
=
data
.
selectedRowKeys
;
$scope
.
compliance
.
batchSaveDisabled
=
!
$scope
.
compliance
.
selectedItems
.
length
;
},
columns
:
[
{
dataField
:
"taskName"
,
caption
:
"Action Item"
},
{
dataField
:
"isEnable"
,
caption
:
"Show in calendar"
,
dataType
:
"boolean"
,
width
:
150
},
{
dataField
:
"effectiveDate"
,
dataType
:
"date"
,
width
:
150
},
{
dataField
:
"dueDate"
,
dataType
:
"date"
,
width
:
150
},
{
dataField
:
"status"
,
width
:
150
,
lookup
:
{
dataSource
:
statusDesc
,
displayExpr
:
"name"
,
valueExpr
:
"id"
}
]
};
},
{
dataField
:
"notes"
,
caption
:
"Due date logic"
}
]
};
var
initOrgTree
=
function
(
nodesCotent
)
{
...
...
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.html
View file @
14c2058e
...
...
@@ -355,7 +355,9 @@
<div
class=
"org-compliance-info-body"
>
<!-- <div id="ComplianceGridContainer" dx-data-grid="complianceGridOptions" style="margin-top: 10px;"></div>-->
<div
id=
"data-grid-compliance"
>
<div
id=
"complianceSaveSelected"
dx-button=
"complianceSaveButtonOptions"
></div>
<div
style=
"color: red;float: left;margin: 10px 20px;"
>
+ New Action Item
</div>
<div
class=
"complianceSaveSelected"
dx-button=
"complianceRevertButtonOptions"
></div>
<div
class=
"complianceSaveSelected"
dx-button=
"complianceSaveButtonOptions"
></div>
<div
id=
"complianceContainer"
dx-data-grid=
"complianceGridOptions"
></div>
</div>
</div>
...
...
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.less
View file @
14c2058e
...
...
@@ -1318,9 +1318,9 @@
padding-top: 45px;
}
#
complianceSaveSelected {
.
complianceSaveSelected {
float: right;
margin: 10px
2
0px;
margin: 10px
1
0px;
}
.dx-button-text {
...
...
atms-web/src/main/webapp/app/common/webservices/taxCalendarEvent.svc.js
View file @
14c2058e
...
...
@@ -19,6 +19,10 @@ function ($http, apiConfig, httpCacheService) {
getEventByEntityId
:
function
(
id
)
{
return
$http
.
get
(
'/calendarEvent/getEventByEntityId/'
+
id
,
apiConfig
.
create
());
},
batchUpdate
:
function
(
model
)
{
return
$http
.
post
(
'/calendarEvent/batchUpdate'
,
model
,
apiConfig
.
create
());
}
};
}]);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment