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
2ef304b0
Commit
2ef304b0
authored
Jul 30, 2019
by
Mccoy Z Xia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trigger触发相关方法
parent
48bcb3d6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
591 additions
and
38 deletions
+591
-38
CalendarActionServiceImpl.java
.../taxtech/atms/service/impl/CalendarActionServiceImpl.java
+97
-26
CalendarExtMapper.java
.../pwc/taxtech/atms/calendar/dao/ext/CalendarExtMapper.java
+28
-4
CalendarEvent.java
.../java/pwc/taxtech/atms/calendar/entity/CalendarEvent.java
+136
-0
CalendarEventExample.java
...wc/taxtech/atms/calendar/entity/CalendarEventExample.java
+260
-0
CalendarEventMapper.xml
...ces/pwc/taxtech/atms/calendar/dao/CalendarEventMapper.xml
+70
-8
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CalendarActionServiceImpl.java
View file @
2ef304b0
...
...
@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.calendar.dao.CalendarActionJurisdictionRelationshipMapper
;
import
pwc.taxtech.atms.calendar.dao.CalendarActionMapper
;
import
pwc.taxtech.atms.calendar.dao.CalendarEventMapper
;
import
pwc.taxtech.atms.calendar.dao.CalendarJurisdictionMapper
;
import
pwc.taxtech.atms.calendar.dao.ext.CalendarActionTMapper
;
import
pwc.taxtech.atms.calendar.dao.ext.CalendarExtMapper
;
...
...
@@ -21,6 +22,7 @@ import pwc.taxtech.atms.service.ICalendarActionService;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -40,6 +42,9 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
@Resource
private
CalendarActionMapper
calendarActionMapper
;
@Resource
private
CalendarEventMapper
calendarEventMapper
;
@Resource
private
CalendarExtMapper
calendarExtMapper
;
...
...
@@ -50,10 +55,10 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
private
CalendarActionJurisdictionRelationshipMapper
calendarActionJurisdictionRelationshipMapper
;
@Autowired
private
CalendarActionTMapper
a
ctionTMapper
;
private
CalendarActionTMapper
calendarA
ctionTMapper
;
@Autowired
private
CalendarJurisdictionTMapper
j
urisdictionTMapper
;
private
CalendarJurisdictionTMapper
calendarJ
urisdictionTMapper
;
@Override
public
OperationResultDto
saveCalendarAction
(
CalendarActionDto
dto
)
{
...
...
@@ -72,7 +77,7 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
private
boolean
insertAction
(
CalendarActionDto
dto
)
{
Date
createTime
=
new
Date
();
CalendarAction
action
=
a
ctionTMapper
.
toCalendarAction
(
dto
);
CalendarAction
action
=
calendarA
ctionTMapper
.
toCalendarAction
(
dto
);
action
.
setStatus
((
byte
)
1
);
action
.
setId
(
idService
.
nextId
());
action
.
setCreateTime
(
createTime
);
...
...
@@ -83,7 +88,7 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
List
<
CalendarActionJurisdictionRelationship
>
relationshipList
=
new
ArrayList
<>();
list
.
forEach
(
l
->
{
CalendarJurisdiction
jurisdiction
=
j
urisdictionTMapper
.
toCalendarAction
(
l
);
CalendarJurisdiction
jurisdiction
=
calendarJ
urisdictionTMapper
.
toCalendarAction
(
l
);
jurisdiction
.
setId
(
idService
.
nextId
());
jurisdiction
.
setCreateTime
(
createTime
);
jurisdiction
.
setUpdateTime
(
createTime
);
...
...
@@ -112,7 +117,7 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
private
boolean
updateAction
(
CalendarActionDto
dto
)
{
Date
updateTime
=
new
Date
();
CalendarAction
action
=
a
ctionTMapper
.
toCalendarAction
(
dto
);
CalendarAction
action
=
calendarA
ctionTMapper
.
toCalendarAction
(
dto
);
action
.
setUpdateTime
(
updateTime
);
List
<
CalendarJurisdictionDto
>
list
=
dto
.
getJurisdictionDtoList
();
...
...
@@ -120,7 +125,7 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
try
{
list
.
forEach
(
p
->
{
CalendarJurisdiction
jurisdiction
=
j
urisdictionTMapper
.
toCalendarAction
(
p
);
CalendarJurisdiction
jurisdiction
=
calendarJ
urisdictionTMapper
.
toCalendarAction
(
p
);
jurisdiction
.
setUpdateTime
(
updateTime
);
jurisdictionList
.
add
(
jurisdiction
);
});
...
...
@@ -158,7 +163,7 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
actionList
.
forEach
(
p
->
{
List
<
CalendarJurisdictionDto
>
jurisdictionDtoList
=
calendarExtMapper
.
getJurisdictionListByActionId
(
p
.
getId
());
CalendarActionDto
dto
=
a
ctionTMapper
.
toCalendarActionDto
(
p
);
CalendarActionDto
dto
=
calendarA
ctionTMapper
.
toCalendarActionDto
(
p
);
dto
.
setJurisdictionDtoList
(
jurisdictionDtoList
);
actionDtoList
.
add
(
dto
);
});
...
...
@@ -166,44 +171,110 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
return
OperationResultDto
.
success
(
actionDtoList
);
}
public
boolean
addTriggerEvent
(
Long
entityId
,
Long
triggerId
,
Integer
areaId
)
{
public
void
addTriggerEvent
(
Long
entityId
,
Long
triggerId
,
Integer
areaId
)
{
//获取对应trigger和area的action list
List
<
CalendarActionByAreaDto
>
actionList
=
getActionListByTriggerAndArea
(
triggerId
,
areaId
);
//查询是否有对应actionId的未完成状态的event
//存在 update
//不存在 insert
//计算dueDate时间
//update/insert
List
<
CalendarActionByAreaDto
>
actionList
=
calendarExtMapper
.
getActionListByTriggerAndArea
(
triggerId
,
areaId
);
if
(
actionList
==
null
){
logger
.
info
(
"action list is null, triggerId: {}"
,
triggerId
);
return
;
}
Date
effectiveDate
=
new
Date
();
actionList
.
forEach
(
p
->
{
//查询是否有对应actionId,且状态为未完成状态的event,正常情况下只有一条,或者没有
CalendarEvent
event
=
calendarExtMapper
.
getNotCompletedEventByEntityAndAction
(
entityId
,
p
.
getActionId
());
//计算dueDate时间
Date
dueDate
=
calculateDueDate
(
effectiveDate
,
p
.
getLogicNum
(),
p
.
getLogicUnitId
());
if
(
event
==
null
)
{
//不存在 insert
CalendarEvent
newEvent
=
new
CalendarEvent
();
buildCommonEvent
(
newEvent
,
p
,
effectiveDate
,
dueDate
);
newEvent
.
setId
(
idService
.
nextId
());
newEvent
.
setEntityId
(
entityId
);
newEvent
.
setCreatorid
(
authUserHelper
.
getCurrentUserId
());
newEvent
.
setCreateTime
(
effectiveDate
);
newEvent
.
setIsEnable
(
Byte
.
parseByte
(
"1"
));
calendarEventMapper
.
insert
(
newEvent
);
}
else
{
//存在 update effectiveDate&dueDate
buildCommonEvent
(
event
,
p
,
effectiveDate
,
dueDate
);
calendarEventMapper
.
updateByPrimaryKey
(
event
);
}
});
Integer
logicNum
=
null
,
logicUnitId
=
null
;
Date
dueDate
=
calculateDueDate
(
effectiveDate
,
logicNum
,
logicUnitId
);
}
return
true
;
private
void
buildCommonEvent
(
CalendarEvent
event
,
CalendarActionByAreaDto
dto
,
Date
effectiveDate
,
Date
dueDate
){
event
.
setActionId
(
dto
.
getActionId
());
event
.
setTaskTypeId
(
dto
.
getTaskTypeId
());
event
.
setNotes
(
dto
.
getDescription
());
event
.
setStaff
(
authUserHelper
.
getCurrentUserId
());
event
.
setStaffids
(
authUserHelper
.
getCurrentUserId
());
event
.
setTaskName
(
dto
.
getActionName
());
event
.
setOrderIndex
(
0
);
event
.
setStatus
(
Byte
.
parseByte
(
CalendarEnum
.
CALENDAR_EVENT_NOT_COMPLETED
.
getCode
()));
event
.
setEffectiveDate
(
effectiveDate
);
event
.
setDueDate
(
dueDate
);
event
.
setUpdateTime
(
effectiveDate
);
}
/**
* 根据不同的logic计算due date
*
* @param effectiveDate
* @param logicNum
* @param logicUnitId
* @return
*/
private
Date
calculateDueDate
(
Date
effectiveDate
,
Integer
logicNum
,
Integer
logicUnitId
)
{
if
(
Integer
.
parseInt
(
CalendarEnum
.
TRIGGER_UNIT_CALENDAR_DAY
.
getCode
())
==
logicUnitId
)
{
if
(
Integer
.
parseInt
(
CalendarEnum
.
TRIGGER_UNIT_CALENDAR_DAY
.
getCode
())
==
logicUnitId
)
{
return
DateUtils
.
addDays
(
effectiveDate
,
logicNum
);
}
else
if
(
Integer
.
parseInt
(
CalendarEnum
.
TRIGGER_UNIT_WEEK_DAY
.
getCode
())
==
logicUnitId
){
return
DateUtils
.
addWeeks
(
effectiveDate
,
logicNum
);
}
else
if
(
Integer
.
parseInt
(
CalendarEnum
.
TRIGGER_UNIT_MONTH
.
getCode
())
==
logicUnitId
){
}
if
(
Integer
.
parseInt
(
CalendarEnum
.
TRIGGER_UNIT_WEEK_DAY
.
getCode
())
==
logicUnitId
)
{
return
addDaysExcludeWeekends
(
effectiveDate
,
logicNum
);
}
if
(
Integer
.
parseInt
(
CalendarEnum
.
TRIGGER_UNIT_MONTH
.
getCode
())
==
logicUnitId
)
{
return
DateUtils
.
addMonths
(
effectiveDate
,
logicNum
);
}
else
if
(
Integer
.
parseInt
(
CalendarEnum
.
TRIGGER_UNIT_YEAR
.
getCode
())
==
logicUnitId
){
}
if
(
Integer
.
parseInt
(
CalendarEnum
.
TRIGGER_UNIT_YEAR
.
getCode
())
==
logicUnitId
)
{
return
DateUtils
.
addYears
(
effectiveDate
,
logicNum
);
}
return
null
;
}
private
List
<
CalendarActionByAreaDto
>
getActionListByTriggerAndArea
(
Long
triggerId
,
Integer
areaId
)
{
/**
* 排除周末的情况下,增加指定天数
*
* @param start 开始时间
* @param days 增加天数
* @return
*/
private
Date
addDaysExcludeWeekends
(
Date
start
,
Integer
days
)
{
Calendar
c
=
Calendar
.
getInstance
();
try
{
c
.
setTime
(
start
);
for
(
int
i
=
0
;
i
<
days
;
++
i
)
{
c
.
add
(
Calendar
.
DAY_OF_MONTH
,
1
);
//排除周六周日
if
(
c
.
get
(
Calendar
.
DAY_OF_WEEK
)
==
Calendar
.
SUNDAY
||
c
.
get
(
Calendar
.
DAY_OF_WEEK
)
==
Calendar
.
SATURDAY
)
{
--
i
;
}
}
return
c
.
getTime
();
}
catch
(
Exception
e
)
{
log
.
error
(
"addDaysExcludeWeekends"
,
e
);
}
return
null
;
}
...
...
atms-dao/src/main/java/pwc/taxtech/atms/calendar/dao/ext/CalendarExtMapper.java
View file @
2ef304b0
...
...
@@ -2,10 +2,7 @@ package pwc.taxtech.atms.calendar.dao.ext;
import
org.apache.ibatis.annotations.*
;
import
pwc.taxtech.atms.MyMapper
;
import
pwc.taxtech.atms.calendar.dto.CalendarEventDto
;
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.dto.*
;
import
pwc.taxtech.atms.calendar.entity.CalendarActionJurisdictionRelationship
;
import
pwc.taxtech.atms.calendar.entity.CalendarEvent
;
import
pwc.taxtech.atms.calendar.entity.CalendarJurisdiction
;
...
...
@@ -118,4 +115,31 @@ public interface CalendarExtMapper extends MyMapper {
"\tupdate_time"
)
List
<
CalendarEventDto
>
getEventByEntityId
(
Long
entityId
);
@Select
(
"SELECT\n"
+
"\tt1.id AS actionId,\n"
+
"\tt1. NAME AS actionName,\n"
+
"\tt1.task_type_id AS taskTypeId,\n"
+
"\tdescription,\n"
+
"\tt3.logic_num AS logicNum,\n"
+
"\tt3.logic_unit AS logicUnit\n"
+
"FROM\n"
+
"\tcalendar_action t1\n"
+
"LEFT JOIN calendar_action_jurisdiction_relationship t2 ON t1.id = t2.action_id\n"
+
"LEFT JOIN calendar_jurisdiction t3 ON t2.jurisdiction_id = t3.id\n"
+
"WHERE\n"
+
"\tt1.trigger_id = #{triggerId}\n"
+
"AND t3.area = #{areaId}\n"
+
"AND logic_unit > 0"
)
List
<
CalendarActionByAreaDto
>
getActionListByTriggerAndArea
(
@Param
(
"triggerId"
)
Long
triggerId
,
@Param
(
"areaId"
)
Integer
areaId
);
@Select
(
"SELECT\n"
+
"\tt1.*\n"
+
"FROM\n"
+
"\tcalendar_event t1\n"
+
"WHERE\n"
+
"\tentity_id = #{entityId}\n"
+
"AND action_id = #{actionId}\n"
+
"AND STATUS = 0\n"
+
"LIMIT 1"
)
CalendarEvent
getNotCompletedEventByEntityAndAction
(
@Param
(
"entityId"
)
Long
entityId
,
@Param
(
"actionId"
)
Long
actionId
);
}
atms-dao/src/main/java/pwc/taxtech/atms/calendar/entity/CalendarEvent.java
View file @
2ef304b0
...
...
@@ -48,6 +48,15 @@ public class CalendarEvent extends BaseEntity implements Serializable {
*/
private
Long
taskTypeId
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_event.action_id
*
* @mbg.generated
*/
private
Long
actionId
;
/**
*
* This field was generated by MyBatis Generator.
...
...
@@ -66,6 +75,24 @@ public class CalendarEvent extends BaseEntity implements Serializable {
*/
private
String
staff
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_event.staffIds
*
* @mbg.generated
*/
private
String
staffids
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_event.creatorId
*
* @mbg.generated
*/
private
String
creatorid
;
/**
* Database Column Remarks:
* 生效日期
...
...
@@ -97,6 +124,15 @@ public class CalendarEvent extends BaseEntity implements Serializable {
*/
private
Byte
status
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_event.is_enable
*
* @mbg.generated
*/
private
Byte
isEnable
;
/**
* Database Column Remarks:
* 排序号
...
...
@@ -230,6 +266,30 @@ public class CalendarEvent extends BaseEntity implements Serializable {
this
.
taskTypeId
=
taskTypeId
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.action_id
*
* @return the value of calendar_event.action_id
*
* @mbg.generated
*/
public
Long
getActionId
()
{
return
actionId
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_event.action_id
*
* @param actionId the value for calendar_event.action_id
*
* @mbg.generated
*/
public
void
setActionId
(
Long
actionId
)
{
this
.
actionId
=
actionId
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.notes
...
...
@@ -278,6 +338,54 @@ public class CalendarEvent extends BaseEntity implements Serializable {
this
.
staff
=
staff
==
null
?
null
:
staff
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.staffIds
*
* @return the value of calendar_event.staffIds
*
* @mbg.generated
*/
public
String
getStaffids
()
{
return
staffids
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_event.staffIds
*
* @param staffids the value for calendar_event.staffIds
*
* @mbg.generated
*/
public
void
setStaffids
(
String
staffids
)
{
this
.
staffids
=
staffids
==
null
?
null
:
staffids
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.creatorId
*
* @return the value of calendar_event.creatorId
*
* @mbg.generated
*/
public
String
getCreatorid
()
{
return
creatorid
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_event.creatorId
*
* @param creatorid the value for calendar_event.creatorId
*
* @mbg.generated
*/
public
void
setCreatorid
(
String
creatorid
)
{
this
.
creatorid
=
creatorid
==
null
?
null
:
creatorid
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.effective_date
...
...
@@ -350,6 +458,30 @@ public class CalendarEvent extends BaseEntity implements Serializable {
this
.
status
=
status
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.is_enable
*
* @return the value of calendar_event.is_enable
*
* @mbg.generated
*/
public
Byte
getIsEnable
()
{
return
isEnable
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_event.is_enable
*
* @param isEnable the value for calendar_event.is_enable
*
* @mbg.generated
*/
public
void
setIsEnable
(
Byte
isEnable
)
{
this
.
isEnable
=
isEnable
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.order_index
...
...
@@ -438,11 +570,15 @@ public class CalendarEvent extends BaseEntity implements Serializable {
sb
.
append
(
", taskName="
).
append
(
taskName
);
sb
.
append
(
", entityId="
).
append
(
entityId
);
sb
.
append
(
", taskTypeId="
).
append
(
taskTypeId
);
sb
.
append
(
", actionId="
).
append
(
actionId
);
sb
.
append
(
", notes="
).
append
(
notes
);
sb
.
append
(
", staff="
).
append
(
staff
);
sb
.
append
(
", staffids="
).
append
(
staffids
);
sb
.
append
(
", creatorid="
).
append
(
creatorid
);
sb
.
append
(
", effectiveDate="
).
append
(
effectiveDate
);
sb
.
append
(
", dueDate="
).
append
(
dueDate
);
sb
.
append
(
", status="
).
append
(
status
);
sb
.
append
(
", isEnable="
).
append
(
isEnable
);
sb
.
append
(
", orderIndex="
).
append
(
orderIndex
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
...
...
atms-dao/src/main/java/pwc/taxtech/atms/calendar/entity/CalendarEventExample.java
View file @
2ef304b0
...
...
@@ -445,6 +445,66 @@ public class CalendarEventExample {
return
(
Criteria
)
this
;
}
public
Criteria
andActionIdIsNull
()
{
addCriterion
(
"action_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andActionIdIsNotNull
()
{
addCriterion
(
"action_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andActionIdEqualTo
(
Long
value
)
{
addCriterion
(
"action_id ="
,
value
,
"actionId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andActionIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"action_id <>"
,
value
,
"actionId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andActionIdGreaterThan
(
Long
value
)
{
addCriterion
(
"action_id >"
,
value
,
"actionId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andActionIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"action_id >="
,
value
,
"actionId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andActionIdLessThan
(
Long
value
)
{
addCriterion
(
"action_id <"
,
value
,
"actionId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andActionIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"action_id <="
,
value
,
"actionId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andActionIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"action_id in"
,
values
,
"actionId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andActionIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"action_id not in"
,
values
,
"actionId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andActionIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"action_id between"
,
value1
,
value2
,
"actionId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andActionIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"action_id not between"
,
value1
,
value2
,
"actionId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNotesIsNull
()
{
addCriterion
(
"notes is null"
);
return
(
Criteria
)
this
;
...
...
@@ -585,6 +645,146 @@ public class CalendarEventExample {
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsIsNull
()
{
addCriterion
(
"staffIds is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsIsNotNull
()
{
addCriterion
(
"staffIds is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsEqualTo
(
String
value
)
{
addCriterion
(
"staffIds ="
,
value
,
"staffids"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsNotEqualTo
(
String
value
)
{
addCriterion
(
"staffIds <>"
,
value
,
"staffids"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsGreaterThan
(
String
value
)
{
addCriterion
(
"staffIds >"
,
value
,
"staffids"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"staffIds >="
,
value
,
"staffids"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsLessThan
(
String
value
)
{
addCriterion
(
"staffIds <"
,
value
,
"staffids"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"staffIds <="
,
value
,
"staffids"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsLike
(
String
value
)
{
addCriterion
(
"staffIds like"
,
value
,
"staffids"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsNotLike
(
String
value
)
{
addCriterion
(
"staffIds not like"
,
value
,
"staffids"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsIn
(
List
<
String
>
values
)
{
addCriterion
(
"staffIds in"
,
values
,
"staffids"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"staffIds not in"
,
values
,
"staffids"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"staffIds between"
,
value1
,
value2
,
"staffids"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStaffidsNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"staffIds not between"
,
value1
,
value2
,
"staffids"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridIsNull
()
{
addCriterion
(
"creatorId is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridIsNotNull
()
{
addCriterion
(
"creatorId is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridEqualTo
(
String
value
)
{
addCriterion
(
"creatorId ="
,
value
,
"creatorid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridNotEqualTo
(
String
value
)
{
addCriterion
(
"creatorId <>"
,
value
,
"creatorid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridGreaterThan
(
String
value
)
{
addCriterion
(
"creatorId >"
,
value
,
"creatorid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"creatorId >="
,
value
,
"creatorid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridLessThan
(
String
value
)
{
addCriterion
(
"creatorId <"
,
value
,
"creatorid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"creatorId <="
,
value
,
"creatorid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridLike
(
String
value
)
{
addCriterion
(
"creatorId like"
,
value
,
"creatorid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridNotLike
(
String
value
)
{
addCriterion
(
"creatorId not like"
,
value
,
"creatorid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridIn
(
List
<
String
>
values
)
{
addCriterion
(
"creatorId in"
,
values
,
"creatorid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"creatorId not in"
,
values
,
"creatorid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"creatorId between"
,
value1
,
value2
,
"creatorid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreatoridNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"creatorId not between"
,
value1
,
value2
,
"creatorid"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEffectiveDateIsNull
()
{
addCriterion
(
"effective_date is null"
);
return
(
Criteria
)
this
;
...
...
@@ -765,6 +965,66 @@ public class CalendarEventExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIsEnableIsNull
()
{
addCriterion
(
"is_enable is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEnableIsNotNull
()
{
addCriterion
(
"is_enable is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEnableEqualTo
(
Byte
value
)
{
addCriterion
(
"is_enable ="
,
value
,
"isEnable"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEnableNotEqualTo
(
Byte
value
)
{
addCriterion
(
"is_enable <>"
,
value
,
"isEnable"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEnableGreaterThan
(
Byte
value
)
{
addCriterion
(
"is_enable >"
,
value
,
"isEnable"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEnableGreaterThanOrEqualTo
(
Byte
value
)
{
addCriterion
(
"is_enable >="
,
value
,
"isEnable"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEnableLessThan
(
Byte
value
)
{
addCriterion
(
"is_enable <"
,
value
,
"isEnable"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEnableLessThanOrEqualTo
(
Byte
value
)
{
addCriterion
(
"is_enable <="
,
value
,
"isEnable"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEnableIn
(
List
<
Byte
>
values
)
{
addCriterion
(
"is_enable in"
,
values
,
"isEnable"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEnableNotIn
(
List
<
Byte
>
values
)
{
addCriterion
(
"is_enable not in"
,
values
,
"isEnable"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEnableBetween
(
Byte
value1
,
Byte
value2
)
{
addCriterion
(
"is_enable between"
,
value1
,
value2
,
"isEnable"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsEnableNotBetween
(
Byte
value1
,
Byte
value2
)
{
addCriterion
(
"is_enable not between"
,
value1
,
value2
,
"isEnable"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrderIndexIsNull
()
{
addCriterion
(
"order_index is null"
);
return
(
Criteria
)
this
;
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/calendar/dao/CalendarEventMapper.xml
View file @
2ef304b0
...
...
@@ -10,11 +10,15 @@
<result
column=
"task_name"
jdbcType=
"VARCHAR"
property=
"taskName"
/>
<result
column=
"entity_id"
jdbcType=
"BIGINT"
property=
"entityId"
/>
<result
column=
"task_type_id"
jdbcType=
"BIGINT"
property=
"taskTypeId"
/>
<result
column=
"action_id"
jdbcType=
"BIGINT"
property=
"actionId"
/>
<result
column=
"notes"
jdbcType=
"VARCHAR"
property=
"notes"
/>
<result
column=
"staff"
jdbcType=
"VARCHAR"
property=
"staff"
/>
<result
column=
"staffIds"
jdbcType=
"VARCHAR"
property=
"staffids"
/>
<result
column=
"creatorId"
jdbcType=
"VARCHAR"
property=
"creatorid"
/>
<result
column=
"effective_date"
jdbcType=
"TIMESTAMP"
property=
"effectiveDate"
/>
<result
column=
"due_date"
jdbcType=
"TIMESTAMP"
property=
"dueDate"
/>
<result
column=
"status"
jdbcType=
"TINYINT"
property=
"status"
/>
<result
column=
"is_enable"
jdbcType=
"TINYINT"
property=
"isEnable"
/>
<result
column=
"order_index"
jdbcType=
"INTEGER"
property=
"orderIndex"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
...
...
@@ -90,8 +94,8 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, task_name, entity_id, task_type_id,
notes, staff, effective_date, due_date, `status`
,
order_index, create_time, update_time
id, task_name, entity_id, task_type_id,
action_id, notes, staff, staffIds, creatorId
,
effective_date, due_date, `status`, is_enable,
order_index, create_time, update_time
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.calendar.entity.CalendarEventExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -145,15 +149,17 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into calendar_event (id, task_name, entity_id,
task_type_id, notes, staff,
task_type_id, action_id, notes,
staff, staffIds, creatorId,
effective_date, due_date, `status`,
order_index, create_time, update_time
)
is_enable, order_index, create_time,
update_time
)
values (#{id,jdbcType=BIGINT}, #{taskName,jdbcType=VARCHAR}, #{entityId,jdbcType=BIGINT},
#{taskTypeId,jdbcType=BIGINT}, #{notes,jdbcType=VARCHAR}, #{staff,jdbcType=VARCHAR},
#{taskTypeId,jdbcType=BIGINT}, #{actionId,jdbcType=BIGINT}, #{notes,jdbcType=VARCHAR},
#{staff,jdbcType=VARCHAR}, #{staffids,jdbcType=VARCHAR}, #{creatorid,jdbcType=VARCHAR},
#{effectiveDate,jdbcType=TIMESTAMP}, #{dueDate,jdbcType=TIMESTAMP}, #{status,jdbcType=TINYINT},
#{
orderIndex,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
#{
isEnable,jdbcType=TINYINT}, #{orderIndex,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.calendar.entity.CalendarEvent"
>
<!--
...
...
@@ -174,12 +180,21 @@
<if
test=
"taskTypeId != null"
>
task_type_id,
</if>
<if
test=
"actionId != null"
>
action_id,
</if>
<if
test=
"notes != null"
>
notes,
</if>
<if
test=
"staff != null"
>
staff,
</if>
<if
test=
"staffids != null"
>
staffIds,
</if>
<if
test=
"creatorid != null"
>
creatorId,
</if>
<if
test=
"effectiveDate != null"
>
effective_date,
</if>
...
...
@@ -189,6 +204,9 @@
<if
test=
"status != null"
>
`status`,
</if>
<if
test=
"isEnable != null"
>
is_enable,
</if>
<if
test=
"orderIndex != null"
>
order_index,
</if>
...
...
@@ -212,12 +230,21 @@
<if
test=
"taskTypeId != null"
>
#{taskTypeId,jdbcType=BIGINT},
</if>
<if
test=
"actionId != null"
>
#{actionId,jdbcType=BIGINT},
</if>
<if
test=
"notes != null"
>
#{notes,jdbcType=VARCHAR},
</if>
<if
test=
"staff != null"
>
#{staff,jdbcType=VARCHAR},
</if>
<if
test=
"staffids != null"
>
#{staffids,jdbcType=VARCHAR},
</if>
<if
test=
"creatorid != null"
>
#{creatorid,jdbcType=VARCHAR},
</if>
<if
test=
"effectiveDate != null"
>
#{effectiveDate,jdbcType=TIMESTAMP},
</if>
...
...
@@ -227,6 +254,9 @@
<if
test=
"status != null"
>
#{status,jdbcType=TINYINT},
</if>
<if
test=
"isEnable != null"
>
#{isEnable,jdbcType=TINYINT},
</if>
<if
test=
"orderIndex != null"
>
#{orderIndex,jdbcType=INTEGER},
</if>
...
...
@@ -267,12 +297,21 @@
<if
test=
"record.taskTypeId != null"
>
task_type_id = #{record.taskTypeId,jdbcType=BIGINT},
</if>
<if
test=
"record.actionId != null"
>
action_id = #{record.actionId,jdbcType=BIGINT},
</if>
<if
test=
"record.notes != null"
>
notes = #{record.notes,jdbcType=VARCHAR},
</if>
<if
test=
"record.staff != null"
>
staff = #{record.staff,jdbcType=VARCHAR},
</if>
<if
test=
"record.staffids != null"
>
staffIds = #{record.staffids,jdbcType=VARCHAR},
</if>
<if
test=
"record.creatorid != null"
>
creatorId = #{record.creatorid,jdbcType=VARCHAR},
</if>
<if
test=
"record.effectiveDate != null"
>
effective_date = #{record.effectiveDate,jdbcType=TIMESTAMP},
</if>
...
...
@@ -282,6 +321,9 @@
<if
test=
"record.status != null"
>
`status` = #{record.status,jdbcType=TINYINT},
</if>
<if
test=
"record.isEnable != null"
>
is_enable = #{record.isEnable,jdbcType=TINYINT},
</if>
<if
test=
"record.orderIndex != null"
>
order_index = #{record.orderIndex,jdbcType=INTEGER},
</if>
...
...
@@ -306,11 +348,15 @@
task_name = #{record.taskName,jdbcType=VARCHAR},
entity_id = #{record.entityId,jdbcType=BIGINT},
task_type_id = #{record.taskTypeId,jdbcType=BIGINT},
action_id = #{record.actionId,jdbcType=BIGINT},
notes = #{record.notes,jdbcType=VARCHAR},
staff = #{record.staff,jdbcType=VARCHAR},
staffIds = #{record.staffids,jdbcType=VARCHAR},
creatorId = #{record.creatorid,jdbcType=VARCHAR},
effective_date = #{record.effectiveDate,jdbcType=TIMESTAMP},
due_date = #{record.dueDate,jdbcType=TIMESTAMP},
`status` = #{record.status,jdbcType=TINYINT},
is_enable = #{record.isEnable,jdbcType=TINYINT},
order_index = #{record.orderIndex,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
...
...
@@ -334,12 +380,21 @@
<if
test=
"taskTypeId != null"
>
task_type_id = #{taskTypeId,jdbcType=BIGINT},
</if>
<if
test=
"actionId != null"
>
action_id = #{actionId,jdbcType=BIGINT},
</if>
<if
test=
"notes != null"
>
notes = #{notes,jdbcType=VARCHAR},
</if>
<if
test=
"staff != null"
>
staff = #{staff,jdbcType=VARCHAR},
</if>
<if
test=
"staffids != null"
>
staffIds = #{staffids,jdbcType=VARCHAR},
</if>
<if
test=
"creatorid != null"
>
creatorId = #{creatorid,jdbcType=VARCHAR},
</if>
<if
test=
"effectiveDate != null"
>
effective_date = #{effectiveDate,jdbcType=TIMESTAMP},
</if>
...
...
@@ -349,6 +404,9 @@
<if
test=
"status != null"
>
`status` = #{status,jdbcType=TINYINT},
</if>
<if
test=
"isEnable != null"
>
is_enable = #{isEnable,jdbcType=TINYINT},
</if>
<if
test=
"orderIndex != null"
>
order_index = #{orderIndex,jdbcType=INTEGER},
</if>
...
...
@@ -370,11 +428,15 @@
set task_name = #{taskName,jdbcType=VARCHAR},
entity_id = #{entityId,jdbcType=BIGINT},
task_type_id = #{taskTypeId,jdbcType=BIGINT},
action_id = #{actionId,jdbcType=BIGINT},
notes = #{notes,jdbcType=VARCHAR},
staff = #{staff,jdbcType=VARCHAR},
staffIds = #{staffids,jdbcType=VARCHAR},
creatorId = #{creatorid,jdbcType=VARCHAR},
effective_date = #{effectiveDate,jdbcType=TIMESTAMP},
due_date = #{dueDate,jdbcType=TIMESTAMP},
`status` = #{status,jdbcType=TINYINT},
is_enable = #{isEnable,jdbcType=TINYINT},
order_index = #{orderIndex,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
...
...
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