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
32d0df77
Commit
32d0df77
authored
Jul 21, 2019
by
Mccoy Z Xia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
calendar action 相关页面和接口
parent
2ac54545
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
752 additions
and
51 deletions
+752
-51
DateUtils.java
...src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
+38
-0
CalendarActionController.java
...pwc/taxtech/atms/controller/CalendarActionController.java
+38
-0
ICalendarActionService.java
...java/pwc/taxtech/atms/service/ICalendarActionService.java
+6
-2
ICalendarEventService.java
.../java/pwc/taxtech/atms/service/ICalendarEventService.java
+2
-0
CalendarActionServiceImpl.java
.../taxtech/atms/service/impl/CalendarActionServiceImpl.java
+113
-21
CalendarEventServiceImpl.java
...c/taxtech/atms/service/impl/CalendarEventServiceImpl.java
+9
-1
CalendarServiceImpl.java
...va/pwc/taxtech/atms/service/impl/CalendarServiceImpl.java
+4
-22
CalendarActionTMapper.java
.../taxtech/atms/calendar/dao/ext/CalendarActionTMapper.java
+20
-0
CalendarExtMapper.java
.../pwc/taxtech/atms/calendar/dao/ext/CalendarExtMapper.java
+46
-4
CalendarJurisdictionTMapper.java
...ch/atms/calendar/dao/ext/CalendarJurisdictionTMapper.java
+22
-0
CalendarActionDto.java
...java/pwc/taxtech/atms/calendar/dto/CalendarActionDto.java
+40
-0
CalendarJurisdictionDto.java
...wc/taxtech/atms/calendar/dto/CalendarJurisdictionDto.java
+36
-0
calendar-action.ctrl.js
...ystemConfiguration/calendarAction/calendar-action.ctrl.js
+0
-0
calendar-action.html
...n/systemConfiguration/calendarAction/calendar-action.html
+158
-0
calendar-action.js
...min/systemConfiguration/calendarAction/calendar-action.js
+18
-0
calendar-action.less
...n/systemConfiguration/calendarAction/calendar-action.less
+130
-0
adminModule.js
atms-web/src/main/webapp/app/adminModule.js
+16
-0
edit-calendar-task.ctrl.js
...pp/calendar/edit-calendar-task/edit-calendar-task.ctrl.js
+5
-0
constant.js
atms-web/src/main/webapp/app/common/utils/constant.js
+34
-1
calendarAction.svc.js
.../main/webapp/app/common/webservices/calendarAction.svc.js
+17
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
View file @
32d0df77
...
...
@@ -933,4 +933,42 @@ public class DateUtils {
// }
// //System.out.println("sss");
// }
/**
* 清零 时分秒
* 用于时间查询
* @param date
* @return
*/
public
static
Date
clearTimeShort
(
Date
date
)
{
return
clearTimeShortAndAdd1Day
(
date
,
false
);
}
/**
* 清零 时分秒 并加一天
* 用于时间查询
* @param date
* @return
*/
public
static
Date
clearTimeShortAndAdd1Day
(
Date
date
)
{
return
clearTimeShortAndAdd1Day
(
date
,
true
);
}
private
static
Date
clearTimeShortAndAdd1Day
(
Date
date
,
boolean
addOneDay
)
{
Calendar
calendar
=
new
GregorianCalendar
();
calendar
.
setTime
(
date
);
// 将时分秒,毫秒域清零
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
calendar
.
set
(
Calendar
.
MINUTE
,
0
);
calendar
.
set
(
Calendar
.
SECOND
,
0
);
calendar
.
set
(
Calendar
.
MILLISECOND
,
0
);
//把日期往后增加一天
if
(
addOneDay
)
{
calendar
.
add
(
Calendar
.
DATE
,
1
);
}
return
calendar
.
getTime
();
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/CalendarActionController.java
0 → 100644
View file @
32d0df77
package
pwc
.
taxtech
.
atms
.
controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
pwc.taxtech.atms.calendar.dto.CalendarActionDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.service.ICalendarActionService
;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-21 20:15
* @Version: 1.0
**/
@RestController
@RequestMapping
(
"api/v1/calendarAction/"
)
public
class
CalendarActionController
{
@Autowired
private
ICalendarActionService
actionServiceImpl
;
@PostMapping
(
"saveCalendarAction"
)
public
OperationResultDto
saveCalendarAction
(
@RequestBody
CalendarActionDto
dto
){
return
actionServiceImpl
.
saveCalendarAction
(
dto
);
}
@GetMapping
(
"getCalendarActionList"
)
public
OperationResultDto
getCalendarActionList
(){
return
actionServiceImpl
.
getCalendarActionList
();
}
@PostMapping
(
"deleteCalendarAction"
)
public
OperationResultDto
getCalendarDataForDisplay
(
@RequestBody
CalendarActionDto
dto
){
return
actionServiceImpl
.
deleteCalendarAction
(
dto
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/ICalendarActionService.java
View file @
32d0df77
package
pwc
.
taxtech
.
atms
.
service
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.calendar.dto.CalendarActionDto
;
import
pwc.taxtech.atms.calendar.entity.CalendarAction
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
public
interface
ICalendarActionService
{
OperationResultDto
save
Event
(
CalendarAction
record
);
OperationResultDto
save
CalendarAction
(
CalendarActionDto
dto
);
OperationResultDto
deleteEvent
(
Long
id
);
OperationResultDto
deleteCalendarAction
(
CalendarActionDto
dto
);
OperationResultDto
getCalendarActionList
();
}
atms-api/src/main/java/pwc/taxtech/atms/service/ICalendarEventService.java
View file @
32d0df77
...
...
@@ -2,10 +2,12 @@ package pwc.taxtech.atms.service;
import
pwc.taxtech.atms.calendar.entity.CalendarEvent
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.calendar.CalendarDisplayQueryParamDto
;
public
interface
ICalendarEventService
{
OperationResultDto
addEvent
(
CalendarEvent
event
);
OperationResultDto
updateEvent
(
CalendarEvent
event
);
OperationResultDto
deleteEvent
(
Long
id
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CalendarActionServiceImpl.java
View file @
32d0df77
...
...
@@ -2,15 +2,25 @@ package pwc.taxtech.atms.service.impl;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
pwc.taxtech.atms.calendar.dao.CalendarActionJurisdictionRelationshipMapper
;
import
pwc.taxtech.atms.calendar.dao.CalendarActionMapper
;
import
pwc.taxtech.atms.calendar.dao.CalendarJurisdictionMapper
;
import
pwc.taxtech.atms.calendar.entity.CalendarAction
;
import
pwc.taxtech.atms.calendar.dao.ext.CalendarActionTMapper
;
import
pwc.taxtech.atms.calendar.dao.ext.CalendarExtMapper
;
import
pwc.taxtech.atms.calendar.dao.ext.CalendarJurisdictionTMapper
;
import
pwc.taxtech.atms.calendar.dto.CalendarActionDto
;
import
pwc.taxtech.atms.calendar.dto.CalendarJurisdictionDto
;
import
pwc.taxtech.atms.calendar.entity.*
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.service.ICalendarActionService
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* <p> @Description </p>
...
...
@@ -19,6 +29,7 @@ import java.util.Date;
* @Date: 2019-07-10 16:19
* @Version: 1.0
**/
@Service
public
class
CalendarActionServiceImpl
extends
BaseService
implements
ICalendarActionService
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
CalendarActionServiceImpl
.
class
);
...
...
@@ -26,45 +37,126 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
@Resource
private
CalendarActionMapper
calendarActionMapper
;
@Resource
private
CalendarExtMapper
calendarExtMapper
;
@Resource
private
CalendarJurisdictionMapper
calendarJurisdictionMapper
;
@Resource
private
CalendarActionJurisdictionRelationshipMapper
calendarActionJurisdictionRelationshipMapper
;
@Autowired
private
CalendarActionTMapper
actionTMapper
;
@Autowired
private
CalendarJurisdictionTMapper
jurisdictionTMapper
;
@Override
public
OperationResultDto
saveEvent
(
CalendarAction
record
)
{
int
count
=
0
;
public
OperationResultDto
saveCalendarAction
(
CalendarActionDto
dto
)
{
boolean
result
;
if
(
dto
.
getId
()
==
null
)
{
result
=
insertAction
(
dto
);
}
else
{
result
=
updateAction
(
dto
);
}
return
new
OperationResultDto
(
result
);
}
private
boolean
insertAction
(
CalendarActionDto
dto
)
{
Date
createTime
=
new
Date
();
CalendarAction
action
=
actionTMapper
.
toCalendarAction
(
dto
);
action
.
setId
(
idService
.
nextId
());
action
.
setCreateTime
(
createTime
);
action
.
setUpdateTime
(
createTime
);
List
<
CalendarJurisdictionDto
>
list
=
dto
.
getJurisdictionDtoList
();
List
<
CalendarJurisdiction
>
jurisdictionList
=
new
ArrayList
<>();
List
<
CalendarActionJurisdictionRelationship
>
relationshipList
=
new
ArrayList
<>();
list
.
forEach
(
l
->
{
CalendarJurisdiction
jurisdiction
=
jurisdictionTMapper
.
toCalendarAction
(
l
);
jurisdiction
.
setId
(
idService
.
nextId
());
jurisdiction
.
setCreateTime
(
createTime
);
jurisdiction
.
setUpdateTime
(
createTime
);
jurisdictionList
.
add
(
jurisdiction
);
CalendarActionJurisdictionRelationship
relationship
=
new
CalendarActionJurisdictionRelationship
();
relationship
.
setId
(
idService
.
nextId
());
relationship
.
setActionId
(
action
.
getId
());
relationship
.
setJurisdictionId
(
jurisdiction
.
getId
());
});
try
{
record
.
setUpdateTime
(
new
Date
());
// 无ID则新建,有ID则更新
if
(
record
.
getId
()
!=
null
){
count
=
calendarActionMapper
.
updateByPrimaryKeySelective
(
record
);
}
else
{
record
.
setId
(
idService
.
nextId
());
record
.
setCreateTime
(
record
.
getUpdateTime
());
count
=
calendarActionMapper
.
insert
(
record
);
}
calendarExtMapper
.
batchInsertActionJurisdiction
(
jurisdictionList
);
calendarExtMapper
.
batchInsertActionJurisdictionRelation
(
relationshipList
);
calendarActionMapper
.
insert
(
action
);
}
catch
(
Exception
e
)
{
log
.
error
(
"insertAction error"
,
e
);
return
false
;
}
return
true
;
}
private
boolean
updateAction
(
CalendarActionDto
dto
)
{
Date
updateTime
=
new
Date
();
CalendarAction
action
=
actionTMapper
.
toCalendarAction
(
dto
);
action
.
setUpdateTime
(
updateTime
);
action
.
setStatus
((
byte
)
1
);
List
<
CalendarJurisdictionDto
>
list
=
dto
.
getJurisdictionDtoList
();
List
<
CalendarJurisdiction
>
jurisdictionList
=
new
ArrayList
<>();
try
{
list
.
forEach
(
p
->
{
CalendarJurisdiction
jurisdiction
=
jurisdictionTMapper
.
toCalendarAction
(
p
);
jurisdiction
.
setId
(
idService
.
nextId
());
jurisdiction
.
setUpdateTime
(
updateTime
);
jurisdictionList
.
add
(
jurisdiction
);
});
jurisdictionList
.
forEach
(
p
->
calendarJurisdictionMapper
.
updateByPrimaryKeySelective
(
p
));
calendarActionMapper
.
updateByPrimaryKeySelective
(
action
);
}
catch
(
Exception
e
)
{
log
.
error
(
"
save
error"
,
e
);
log
.
error
(
"
updateAction
error"
,
e
);
}
boolean
result
=
count
>
0
;
String
msg
=
result
?
"1"
:
"0"
;
return
new
OperationResultDto
(
result
,
msg
);
return
true
;
}
@Override
public
OperationResultDto
delete
Event
(
Long
id
)
{
public
OperationResultDto
delete
CalendarAction
(
CalendarActionDto
dto
)
{
int
count
=
0
;
CalendarAction
action
=
new
CalendarAction
();
action
.
setId
(
dto
.
getId
());
action
.
setStatus
(
Byte
.
parseByte
(
"0"
));
action
.
setUpdateTime
(
new
Date
());
try
{
count
=
calendarActionMapper
.
deleteByPrimaryKey
(
id
);
count
=
calendarActionMapper
.
updateByPrimaryKeySelective
(
action
);
}
catch
(
Exception
e
)
{
log
.
error
(
"deleteAction error"
,
e
);
}
boolean
result
=
count
>
0
;
String
msg
=
result
?
"删除成功"
:
"删除失败"
;
return
new
OperationResultDto
(
result
,
msg
);
return
new
OperationResultDto
(
count
>
0
);
}
@Override
public
OperationResultDto
getCalendarActionList
()
{
CalendarActionExample
actionExample
=
new
CalendarActionExample
();
actionExample
.
createCriteria
().
andStatusEqualTo
((
byte
)
1
);
List
<
CalendarAction
>
actionList
=
calendarActionMapper
.
selectByExample
(
null
);
List
<
CalendarActionDto
>
actionDtoList
=
new
ArrayList
<>();
actionList
.
forEach
(
p
->
{
List
<
CalendarJurisdictionDto
>
jurisdictionDtoList
=
calendarExtMapper
.
getJurisdictionListByActionId
(
p
.
getId
());
CalendarActionDto
dto
=
actionTMapper
.
toCalendarActionDto
(
p
);
dto
.
setJurisdictionDtoList
(
jurisdictionDtoList
);
actionDtoList
.
add
(
dto
);
});
return
OperationResultDto
.
success
(
actionDtoList
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CalendarEventServiceImpl.java
View file @
32d0df77
...
...
@@ -6,12 +6,17 @@ import org.slf4j.LoggerFactory;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.calendar.dao.*
;
import
pwc.taxtech.atms.calendar.dao.ext.CalendarExtMapper
;
import
pwc.taxtech.atms.calendar.dto.CalendarEventDto
;
import
pwc.taxtech.atms.calendar.entity.CalendarEvent
;
import
pwc.taxtech.atms.calendar.entity.CalendarEventExample
;
import
pwc.taxtech.atms.common.util.DateUtils
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.calendar.CalendarDisplayQueryParamDto
;
import
pwc.taxtech.atms.service.ICalendarEventService
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.List
;
/**
* <p> @Description </p>
...
...
@@ -27,6 +32,8 @@ public class CalendarEventServiceImpl extends BaseService implements ICalendarEv
@Resource
private
CalendarEventMapper
calendarEventMapper
;
@Resource
private
CalendarExtMapper
calendarExtMapper
;
@Override
public
OperationResultDto
addEvent
(
CalendarEvent
event
)
{
...
...
@@ -45,7 +52,7 @@ public class CalendarEventServiceImpl extends BaseService implements ICalendarEv
}
boolean
result
=
count
>
0
;
String
msg
=
result
?
"1"
:
"-1"
;
return
new
OperationResultDto
(
result
,
msg
);
return
new
OperationResultDto
(
result
,
msg
,
event
.
getId
().
toString
()
);
}
@Override
...
...
@@ -75,4 +82,5 @@ public class CalendarEventServiceImpl extends BaseService implements ICalendarEv
String
msg
=
result
?
"1"
:
"-1"
;
return
new
OperationResultDto
(
result
,
msg
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CalendarServiceImpl.java
View file @
32d0df77
...
...
@@ -361,8 +361,8 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
}
public
List
<
CalendarEventDto
>
getCalendarEventData
(
CalendarDisplayQueryParamDto
queryParamDto
)
{
Date
start
=
formatQueryDateTime
(
queryParamDto
.
getQueryStartTime
(),
false
);
Date
end
=
formatQueryDateTime
(
queryParamDto
.
getQueryEndTime
(),
true
);
Date
start
=
pwc
.
taxtech
.
atms
.
common
.
util
.
DateUtils
.
clearTimeShort
(
queryParamDto
.
getQueryStartTime
()
);
Date
end
=
pwc
.
taxtech
.
atms
.
common
.
util
.
DateUtils
.
clearTimeShortAndAdd1Day
(
queryParamDto
.
getQueryEndTime
()
);
String
startYearStr
=
String
.
format
(
"%tY"
,
start
);
String
endYearStr
=
String
.
format
(
"%tY"
,
end
);
...
...
@@ -485,7 +485,7 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
boolean
isEffective
=
dueDate
!=
null
&&
dueDate
.
compareTo
(
start
)
>=
0
&&
dueDate
.
compareTo
(
p
.
getValidDateStart
())
>=
0
&&
dueDate
.
compareTo
(
formatQueryDateTime
(
p
.
getValidDateEnd
(),
true
))
<
0
&&
dueDate
.
compareTo
(
pwc
.
taxtech
.
atms
.
common
.
util
.
DateUtils
.
clearTimeShortAndAdd1Day
(
p
.
getValidDateEnd
()
))
<
0
&&
dueDate
.
compareTo
(
end
)
<
0
;
//
...
...
@@ -494,7 +494,7 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
isEffective
=
dueDate
!=
null
&&
dueDate
.
compareTo
(
start
)
>=
0
&&
dueDate
.
compareTo
(
p
.
getValidDateStart
())
>=
0
&&
dueDate
.
compareTo
(
formatQueryDateTime
(
p
.
getValidDateEnd
(),
true
))
<
0
&&
dueDate
.
compareTo
(
pwc
.
taxtech
.
atms
.
common
.
util
.
DateUtils
.
clearTimeShortAndAdd1Day
(
p
.
getValidDateEnd
()
))
<
0
&&
dueDate
.
compareTo
(
end
)
<
0
;
}
...
...
@@ -541,22 +541,4 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
return
str2Date
;
}
private
Date
formatQueryDateTime
(
Date
date
,
boolean
addOneDay
)
{
Calendar
calendar
=
new
GregorianCalendar
();
calendar
.
setTime
(
date
);
// 将时分秒,毫秒域清零
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
calendar
.
set
(
Calendar
.
MINUTE
,
0
);
calendar
.
set
(
Calendar
.
SECOND
,
0
);
calendar
.
set
(
Calendar
.
MILLISECOND
,
0
);
//把日期往后增加一天
if
(
addOneDay
)
{
calendar
.
add
(
Calendar
.
DATE
,
1
);
}
return
calendar
.
getTime
();
}
}
atms-dao/src/main/java/pwc/taxtech/atms/calendar/dao/ext/CalendarActionTMapper.java
0 → 100644
View file @
32d0df77
package
pwc
.
taxtech
.
atms
.
calendar
.
dao
.
ext
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.Mapping
;
import
org.mapstruct.factory.Mappers
;
import
pwc.taxtech.atms.calendar.dto.CalendarActionDto
;
import
pwc.taxtech.atms.calendar.entity.CalendarAction
;
@Mapper
(
componentModel
=
"spring"
)
public
interface
CalendarActionTMapper
{
CalendarActionTMapper
CALENDAR_ACTION_T_MAPPERT_Mapper
=
Mappers
.
getMapper
(
CalendarActionTMapper
.
class
);
@Mapping
(
source
=
"id"
,
target
=
"id"
)
CalendarActionDto
toCalendarActionDto
(
CalendarAction
calendarAction
);
@Mapping
(
source
=
"id"
,
target
=
"id"
)
CalendarAction
toCalendarAction
(
CalendarActionDto
calendarActionDto
);
}
atms-dao/src/main/java/pwc/taxtech/atms/calendar/dao/ext/CalendarExtMapper.java
View file @
32d0df77
package
pwc
.
taxtech
.
atms
.
calendar
.
dao
.
ext
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.*
;
import
pwc.taxtech.atms.MyMapper
;
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.CalendarJurisdiction
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -57,4 +57,46 @@ public interface CalendarExtMapper extends MyMapper {
@Select
(
"SELECT order_Index FROM calendar_configuration ORDER BY id DESC LIMIT 1"
)
Integer
getMaxConfigOrder
();
@Insert
(
"<script>\n"
+
"INSERT INTO CalendarActionJurisdictionRelationship\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"
+
" (\n"
+
" #{item.id},\n"
+
" #{item.area},\n"
+
" #{item.description},\n"
+
" #{item.logicNum},\n"
+
" #{item.logicUnit},\n"
+
" #{item.status},\n"
+
" #{item.createTime},\n"
+
" #{item.updateTime}\n"
+
" )\n"
+
"</foreach>\n"
+
"</script>"
)
int
batchInsertActionJurisdiction
(
List
<
CalendarJurisdiction
>
jurisdictionList
);
@Insert
(
"<script>"
+
"INSERT INTO CalendarActionJurisdictionRelationship\n"
+
"( id, action_id, jurisdiction_id)\n"
+
"VALUES\n"
+
" <foreach collection='list' item='item' index='index' separator=','>\n"
+
" (\n"
+
" #{item.id},\n"
+
" #{item.actionId},\n"
+
" #{item.jurisdictionId}\n"
+
" )\n"
+
" </foreach> "
+
"</script>"
)
int
batchInsertActionJurisdictionRelation
(
List
<
CalendarActionJurisdictionRelationship
>
relationshipList
);
@Select
(
"SELECT\n"
+
"\tt.id, area, description, logic_num, logic_unit, status\n"
+
"FROM\n"
+
"\tcalendar_jurisdiction t\n"
+
"LEFT JOIN calendar_action_jurisdiction_relationship ON t.id = jurisdiction_id\n"
+
"AND action_id = #{actionId}\n"
+
"ORDER BY area"
)
List
<
CalendarJurisdictionDto
>
getJurisdictionListByActionId
(
Long
actionId
);
}
atms-dao/src/main/java/pwc/taxtech/atms/calendar/dao/ext/CalendarJurisdictionTMapper.java
0 → 100644
View file @
32d0df77
package
pwc
.
taxtech
.
atms
.
calendar
.
dao
.
ext
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.Mapping
;
import
org.mapstruct.factory.Mappers
;
import
pwc.taxtech.atms.calendar.dto.CalendarActionDto
;
import
pwc.taxtech.atms.calendar.dto.CalendarJurisdictionDto
;
import
pwc.taxtech.atms.calendar.entity.CalendarAction
;
import
pwc.taxtech.atms.calendar.entity.CalendarJurisdiction
;
@Mapper
(
componentModel
=
"spring"
)
public
interface
CalendarJurisdictionTMapper
{
CalendarJurisdictionTMapper
CALENDAR_JURISDICTION_T_MAPPER
=
Mappers
.
getMapper
(
CalendarJurisdictionTMapper
.
class
);
@Mapping
(
source
=
"id"
,
target
=
"id"
)
CalendarJurisdictionDto
toCalendarActionDto
(
CalendarJurisdiction
calendarJurisdiction
);
@Mapping
(
source
=
"id"
,
target
=
"id"
)
CalendarJurisdiction
toCalendarAction
(
CalendarJurisdictionDto
calendarJurisdictionDto
);
}
atms-dao/src/main/java/pwc/taxtech/atms/calendar/dto/CalendarActionDto.java
0 → 100644
View file @
32d0df77
package
pwc
.
taxtech
.
atms
.
calendar
.
dto
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.ToString
;
import
java.util.List
;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-21 20:22
* @Version: 1.0
**/
@Getter
@Setter
@ToString
@NoArgsConstructor
public
class
CalendarActionDto
{
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Long
id
;
private
String
name
;
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Long
triggerId
;
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Long
taskTypeId
;
private
Byte
status
;
private
List
<
CalendarJurisdictionDto
>
jurisdictionDtoList
;
}
atms-dao/src/main/java/pwc/taxtech/atms/calendar/dto/CalendarJurisdictionDto.java
0 → 100644
View file @
32d0df77
package
pwc
.
taxtech
.
atms
.
calendar
.
dto
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.ToString
;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-21 20:28
* @Version: 1.0
**/
@Getter
@Setter
@ToString
@NoArgsConstructor
public
class
CalendarJurisdictionDto
{
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Long
id
;
private
Byte
area
;
private
String
description
;
private
Integer
logicNum
;
private
String
logicUnit
;
private
Byte
status
;
}
atms-web/src/main/webapp/app/admin/systemConfiguration/calendarAction/calendar-action.ctrl.js
0 → 100644
View file @
32d0df77
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/admin/systemConfiguration/calendarAction/calendar-action.html
0 → 100644
View file @
32d0df77
<div
id=
"calendar-action"
>
<div
class=
"calendar-action-Head"
>
{{'CalendarActionHead'|translate}}
</div>
<div
ng-click=
"refreshAll()"
>
Refresh
</div>
<div
class=
"calendar-action-container"
>
<div
id=
"data-grid-action"
>
<div>
<table
id=
"data-table"
>
<thead
id=
"table-head"
>
<tr>
<th
rowspan=
"3"
>
Action Item Name
</th>
<th
rowspan=
"3"
>
Trigger
</th>
<th
rowspan=
"3"
>
Type of Tasks
<div
id=
"editTaskType"
ng-click=
"editTaskTypeList();"
>
Edit
</div>
</th>
<th
colspan=
"9"
>
Jurisdiction of Formation
</th>
<th
rowspan=
"3"
>
Operation
</th>
</tr>
<tr>
<th
colspan=
"3"
>
Hong Kong
</th>
<th
colspan=
"3"
>
BVI
</th>
<th
colspan=
"3"
>
Cayman Islands
</th>
</tr>
<tr>
<th>
Valid
</th>
<th>
Description
</th>
<th>
Logic
</th>
<th>
valid
</th>
<th>
Description
</th>
<th>
Logic
</th>
<th>
valid
</th>
<th>
Description
</th>
<th>
Logic
</th>
</tr>
</thead>
<tbody
id=
"table-body"
>
<tr
ng-repeat=
"action in actionList"
>
<td>
{{action.name}}
</td>
<td>
{{action.triggerId}}
</td>
<td>
{{action.taskTypeId}}
</td>
<td>
{{action.status}}
</td>
<td>
{{action.description}}
</td>
<td>
<span>
{{action.logicNum}}
</span>
<span>
{{action.logicUnitId}}
</span>
</td>
<td>
{{action.status}}
</td>
<td>
{{action.description}}
</td>
<td>
<span>
{{action.logicNum}}
</span>
<span>
{{action.logicUnitId}}
</span>
</td>
<td>
{{action.status}}
</td>
<td>
{{action.description}}
</td>
<td>
<span>
{{action.logicNum}}
</span>
<span>
{{action.logicUnitId}}
</span>
</td>
<td>
<span
ng-click=
"editAction(action, 'Show')"
>
Detail
</span>
<span
ng-click=
"editAction(action, 'Edit')"
>
Edit
</span>
<span
ng-click=
"deleteAction(action)"
>
Delete
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
id=
"edit-task-type-pop"
></div>
<script
type=
"text/ng-template"
class=
"content"
id=
"edit-task-type-pop.html"
>
<
div
class
=
"modal-header"
>
<
span
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
hidden
=
"true"
ng
-
click
=
"hideEditTaskTypeListPanel()"
>&
times
;
<
/span
>
<
h4
class
=
"modal-title"
>
<
i
style
=
"color: #b22;font-size: 23px; cursor: pointer;"
class
=
"fa fa-pencil"
><
/i
>
&
nbsp
;{{
'EditTaxProject'
|
translate
}}
<
/h4
>
<
/div
>
<
div
class
=
"modal-body"
>
<
div
class
=
"row pop-grid-container"
>
<
div
class
=
"col-md-12"
>
<
div
dx
-
data
-
grid
=
"taskTypeGridOptions"
><
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"modal-footer"
>
<
button
ng
-
click
=
"hideEditTaskTypeListPanel();"
class
=
"btn btn-default btn-gray"
>
{{
'Cancel'
|
translate
}}
<
/button
>
<
button
ng
-
click
=
"editTaskType();"
class
=
"btn btn-default btn-red"
>
{{
'NewTaxCalendar'
|
translate
}}
<
/button
>
<
/div
>
</script>
<div
id=
"edit-task-type"
></div>
<script
type=
"text/ng-template"
class=
"content"
id=
"edit-task-type.html"
>
<
div
class
=
"modal-header"
>
<
span
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
hidden
=
"true"
ng
-
click
=
"hideEditTaskTypePanel()"
>&
times
;
<
/span
>
<
h4
class
=
"modal-title"
>
<
i
style
=
"color: #b22;font-size: 23px; cursor: pointer;"
class
=
"fa fa-pencil"
><
/i
>
&
nbsp
;{{
editTaskTypeTitle
}}
<
/h4
>
<
/div
>
<
div
class
=
"modal-body"
id
=
"editTaskTypeForm"
dx
-
validation
-
group
=
"{}"
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-3"
>
<
span
class
=
"form-title"
>
{{
'TaxEvent'
|
translate
}}
:
<
/span
>
<
/div
>
<
div
class
=
"col-lg-9"
>
<
div
class
=
"box-font"
dx
-
text
-
box
=
"{}"
dx
-
validator
=
"validateOption.taskTypeText"
ng
-
model
=
"editTaskTypeEntity.name"
><
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"modal-footer"
>
<
button
ng
-
click
=
"hideEditTaskTypePanel();"
class
=
"btn btn-default btn-gray"
>
{{
'Cancel'
|
translate
}}
<
/button
>
<
button
ng
-
click
=
"confirmSubmitTaskType();"
class
=
"btn btn-default btn-red"
>
{{
'Confirm'
|
translate
}}
<
/button
>
<
/div
>
</script>
<edit-calendar-action-modal
is-show=
"showEditModal"
parent-page=
".calendar-action-container"
operate-type=
"orgOperateType"
is-update=
"isOrgUpdate"
selected-organization=
"selectedOrg"
></edit-calendar-action-modal>
<div
id=
"edit-action-pop"
></div>
<script
type=
"text/ng-template"
class=
"content"
id=
"edit-action-pop.html"
>
<
div
class
=
"modal-header"
>
<
span
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
hidden
=
"true"
ng
-
click
=
"hideEditActionPanel()"
>&
times
;
<
/span
>
<
div
class
=
"long-title"
><
h3
>
Action
Details
<
/h3></
div
>
<
/div
>
<
div
class
=
"modal-body"
>
<
div
id
=
"myTabContent"
class
=
"tab-content"
>
<
div
id
=
"form-container"
>
<
div
id
=
"editActionForm"
dx
-
form
=
"formOptions"
><
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"modal-footer"
>
<
button
ng
-
click
=
"hideEditActionPanel();"
class
=
"btn btn-default btn-gray"
>
{{
'Cancel'
|
translate
}}
<
/button
>
<
button
ng
-
click
=
"saveAction();"
class
=
"btn btn-default btn-red"
>
{{
'NewTaxCalendar'
|
translate
}}
<
/button
>
<
/div
>
</script>
</div>
atms-web/src/main/webapp/app/admin/systemConfiguration/calendarAction/calendar-action.js
0 → 100644
View file @
32d0df77
systemConfigurationModule
.
directive
(
'calendarAction'
,
[
'$log'
,
function
(
$log
)
{
'use strict'
;
$log
.
debug
(
'calendarAction.ctor()...'
);
return
{
restrict
:
'E'
,
templateUrl
:
'/app/admin/systemConfiguration/calendarAction/calendar-action.html'
+
'?_='
+
Math
.
random
(),
replace
:
true
,
scope
:
{},
controller
:
'CalendarActionController'
,
link
:
function
(
scope
,
element
)
{
}
};
}
]);
\ No newline at end of file
atms-web/src/main/webapp/app/admin/systemConfiguration/calendarAction/calendar-action.less
0 → 100644
View file @
32d0df77
#calendar-action {
.calendar-action-Head {
line-height: 60px;
vertical-align: middle;
padding-left: 20px;
display: inline-block;
border: 1px solid #dfdfdf;
width: 100%;
font-weight: bold;
}
table {
border-collapse: collapse;
}
#data-table th, tr {
border: 1px solid #DDD;
padding: 5px;
height: 40px;
text-align: center;
}
#data-table {
margin: 2% 1%;
width: 98%;
}
#table-head {
background-color: #f1f1f1;
text-align: center;
font-size: larger;
}
#table-body {
background-color: #ffffff;
}
#table-body td {
border: 1px solid #DDD;
padding: 5px;
height: 40px;
text-align: center;
}
#editTaskType {
color: red;
font-size: smaller;
margin-top: 5%;
outline: none;
}
#edit-task-type-pop, #edit-task-type, #edit-action-type-pop {
.form-title {
display: inline-block;
vertical-align: middle;
line-height: 36px;
}
.modal-footer {
display: inline-block;
margin-top: 10px;
padding-top: 20px;
width: 100%;
.btn {
float: right;
vertical-align: middle;
height: 30px;
line-height: 28px;
margin-right: 25px;
border: 0;
}
.btn-red {
background-color: #df532a;
color: #fff;
}
.btn-gray {
color: #555;
background-color: #eee;
}
}
}
#edit-action-type-pop {
#form-container {
margin: 10px;
}
.long-title h3 {
font-family: 'Segoe UI Light', 'Helvetica Neue Light', 'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana;
font-weight: 200;
font-size: 28px;
text-align: center;
margin-bottom: 20px;
}
.modal-footer {
display: inline-block;
margin-top: 10px;
padding-top: 20px;
width: 100%;
.btn {
float: right;
vertical-align: middle;
height: 30px;
line-height: 28px;
margin-right: 25px;
border: 0;
}
.btn-red {
background-color: #df532a;
color: #fff;
}
.btn-gray {
color: #555;
background-color: #eee;
}
}
}
}
\ No newline at end of file
atms-web/src/main/webapp/app/adminModule.js
View file @
32d0df77
...
...
@@ -644,6 +644,22 @@ var infrastructureModule = angular.module('app.infrastructure', ["isteven-multi-
sticky
:
true
});
$stateProvider
.
state
({
name
:
'calendarAction'
,
url
:
'/calendarAction'
,
views
:
{
'@'
:
{
controller
:
[
'$scope'
,
'$stateParams'
,
'appTranslation'
,
function
(
$scope
,
$stateParams
,
appTranslation
)
{
appTranslation
.
load
([
appTranslation
.
systemConfiguration
]);
}],
template
:
'<calendar-action></calendar-action>'
}
},
resolve
:
scriptDependencyProvider
.
createDependenciesMap
(
scriptDependencyProvider
.
systemConfiguration
),
deepStateRedirect
:
true
,
sticky
:
true
});
$stateProvider
.
state
({
name
:
'taxCalendarConfiguration'
,
...
...
atms-web/src/main/webapp/app/calendar/edit-calendar-task/edit-calendar-task.ctrl.js
View file @
32d0df77
...
...
@@ -344,6 +344,11 @@
//}
taxCalendarEventService
.
add
(
model
).
success
(
function
(
data
)
{
if
(
data
.
result
)
{
if
(
data
.
data
){
model
.
id
=
data
.
data
;
}
if
(
_
.
isFunction
(
$scope
.
onClosed
))
{
$scope
.
onClosed
({
param
:
{
data
:
model
,
type
:
paramResultType
}});
...
...
atms-web/src/main/webapp/app/common/utils/constant.js
View file @
32d0df77
...
...
@@ -1718,9 +1718,41 @@ constant.organizationHK = {
{
id
:
2
,
name
:
"CFO"
},
{
id
:
3
,
name
:
"NA"
}
],
executiveType
:[
executiveType
:
[
{
id
:
1
,
name
:
"Y"
},
{
id
:
2
,
name
:
"N"
}
]
};
constant
.
trigger
=
{
triggerType
:
[
{
id
:
1
,
name
:
"change in named/resident secretary"
},
{
id
:
2
,
name
:
"change in registered agent"
},
{
id
:
3
,
name
:
"change in local registered office"
}
],
logicUnit
:
[
{
id
:
1
,
name
:
"Calendar Day"
},
{
id
:
2
,
name
:
"Week Day"
},
{
id
:
3
,
name
:
"Month"
},
{
id
:
3
,
name
:
"Year"
}
]
};
/************************************************cit constant end*************************************************/
\ No newline at end of file
atms-web/src/main/webapp/app/common/webservices/calendarAction.svc.js
0 → 100644
View file @
32d0df77
webservices
.
factory
(
'calendarActionService'
,
[
'$http'
,
'apiConfig'
,
function
(
$http
,
apiConfig
)
{
'use strict'
;
return
{
getCalendarActionList
:
function
()
{
return
$http
.
get
(
'/calendarAction/getCalendarActionList'
,
apiConfig
.
create
());
},
saveCalendarAction
:
function
(
data
)
{
return
$http
.
post
(
'/calendarAction/saveCalendarAction'
,
data
,
apiConfig
.
create
());
},
deleteCalendarAction
:
function
(
id
)
{
return
$http
.
get
(
'/calendarAction/deleteCalendarAction/'
+
id
,
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