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
5b83e87f
Commit
5b83e87f
authored
Jul 22, 2019
by
Mccoy Z Xia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
calendar action
parent
5eb32906
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
37 additions
and
50 deletions
+37
-50
CalendarActionController.java
...pwc/taxtech/atms/controller/CalendarActionController.java
+3
-3
ICalendarActionService.java
...java/pwc/taxtech/atms/service/ICalendarActionService.java
+1
-1
CalendarActionServiceImpl.java
.../taxtech/atms/service/impl/CalendarActionServiceImpl.java
+7
-5
CalendarExtMapper.java
.../pwc/taxtech/atms/calendar/dao/ext/CalendarExtMapper.java
+2
-2
CalendarJurisdictionTMapper.java
...ch/atms/calendar/dao/ext/CalendarJurisdictionTMapper.java
+0
-2
CalendarJurisdictionDto.java
...wc/taxtech/atms/calendar/dto/CalendarJurisdictionDto.java
+2
-5
CalendarJurisdiction.java
...wc/taxtech/atms/calendar/entity/CalendarJurisdiction.java
+5
-5
CalendarJurisdictionExample.java
...ech/atms/calendar/entity/CalendarJurisdictionExample.java
+10
-20
CalendarJurisdictionMapper.xml
.../taxtech/atms/calendar/dao/CalendarJurisdictionMapper.xml
+7
-7
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/CalendarActionController.java
View file @
5b83e87f
...
...
@@ -30,9 +30,9 @@ public class CalendarActionController {
return
actionServiceImpl
.
getCalendarActionList
();
}
@PostMapping
(
"deleteCalendarAction"
)
public
OperationResultDto
getCalendarDataForDisplay
(
@
RequestBody
CalendarActionDto
dto
){
return
actionServiceImpl
.
deleteCalendarAction
(
dto
);
@PostMapping
(
"deleteCalendarAction
/{id}
"
)
public
OperationResultDto
getCalendarDataForDisplay
(
@
PathVariable
(
"id"
)
Long
id
){
return
actionServiceImpl
.
deleteCalendarAction
(
id
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/ICalendarActionService.java
View file @
5b83e87f
...
...
@@ -9,7 +9,7 @@ public interface ICalendarActionService {
OperationResultDto
saveCalendarAction
(
CalendarActionDto
dto
);
OperationResultDto
deleteCalendarAction
(
CalendarActionDto
dto
);
OperationResultDto
deleteCalendarAction
(
Long
id
);
OperationResultDto
getCalendarActionList
();
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CalendarActionServiceImpl.java
View file @
5b83e87f
...
...
@@ -87,11 +87,14 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
relationship
.
setId
(
idService
.
nextId
());
relationship
.
setActionId
(
action
.
getId
());
relationship
.
setJurisdictionId
(
jurisdiction
.
getId
());
relationshipList
.
add
(
relationship
);
});
try
{
calendarExtMapper
.
batchInsertActionJurisdiction
(
jurisdictionList
);
calendarExtMapper
.
batchInsertActionJurisdictionRelation
(
relationshipList
);
// calendarExtMapper.batchInsertActionJurisdiction(jurisdictionList);
// calendarExtMapper.batchInsertActionJurisdictionRelation(relationshipList);
jurisdictionList
.
forEach
(
p
->
calendarJurisdictionMapper
.
insert
(
p
));
relationshipList
.
forEach
(
p
->
calendarActionJurisdictionRelationshipMapper
.
insert
(
p
));
calendarActionMapper
.
insert
(
action
);
}
catch
(
Exception
e
)
{
log
.
error
(
"insertAction error"
,
e
);
...
...
@@ -113,7 +116,6 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
try
{
list
.
forEach
(
p
->
{
CalendarJurisdiction
jurisdiction
=
jurisdictionTMapper
.
toCalendarAction
(
p
);
jurisdiction
.
setId
(
idService
.
nextId
());
jurisdiction
.
setUpdateTime
(
updateTime
);
jurisdictionList
.
add
(
jurisdiction
);
});
...
...
@@ -127,10 +129,10 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
}
@Override
public
OperationResultDto
deleteCalendarAction
(
CalendarActionDto
dto
)
{
public
OperationResultDto
deleteCalendarAction
(
Long
id
)
{
int
count
=
0
;
CalendarAction
action
=
new
CalendarAction
();
action
.
setId
(
dto
.
getId
()
);
action
.
setId
(
id
);
action
.
setStatus
(
Byte
.
parseByte
(
"0"
));
action
.
setUpdateTime
(
new
Date
());
try
{
...
...
atms-dao/src/main/java/pwc/taxtech/atms/calendar/dao/ext/CalendarExtMapper.java
View file @
5b83e87f
...
...
@@ -92,11 +92,11 @@ public interface CalendarExtMapper extends MyMapper {
int
batchInsertActionJurisdictionRelation
(
List
<
CalendarActionJurisdictionRelationship
>
relationshipList
);
@Select
(
"SELECT\n"
+
"\tt.id, area, description, logic_num
, logic_u
nit, status\n"
+
"\tt.id, area, description, logic_num
AS logicNum, logic_unit AS logicU
nit, 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"
+
"
WHERE
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
View file @
5b83e87f
...
...
@@ -13,10 +13,8 @@ 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/CalendarJurisdictionDto.java
View file @
5b83e87f
...
...
@@ -2,10 +2,7 @@ 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
lombok.*
;
/**
* <p> @Description </p>
...
...
@@ -29,7 +26,7 @@ public class CalendarJurisdictionDto {
private
Integer
logicNum
;
private
String
logicUnit
;
private
Integer
logicUnit
;
private
Byte
status
;
...
...
atms-dao/src/main/java/pwc/taxtech/atms/calendar/entity/CalendarJurisdiction.java
View file @
5b83e87f
...
...
@@ -54,14 +54,14 @@ public class CalendarJurisdiction extends BaseEntity implements Serializable {
/**
* Database Column Remarks:
* logic单位
* logic单位
枚举
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_jurisdiction.logic_unit
*
* @mbg.generated
*/
private
String
logicUnit
;
private
Integer
logicUnit
;
/**
*
...
...
@@ -202,7 +202,7 @@ public class CalendarJurisdiction extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public
String
getLogicUnit
()
{
public
Integer
getLogicUnit
()
{
return
logicUnit
;
}
...
...
@@ -214,8 +214,8 @@ public class CalendarJurisdiction extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public
void
setLogicUnit
(
String
logicUnit
)
{
this
.
logicUnit
=
logicUnit
==
null
?
null
:
logicUnit
.
trim
()
;
public
void
setLogicUnit
(
Integer
logicUnit
)
{
this
.
logicUnit
=
logicUnit
;
}
/**
...
...
atms-dao/src/main/java/pwc/taxtech/atms/calendar/entity/CalendarJurisdictionExample.java
View file @
5b83e87f
...
...
@@ -455,62 +455,52 @@ public class CalendarJurisdictionExample {
return
(
Criteria
)
this
;
}
public
Criteria
andLogicUnitEqualTo
(
String
value
)
{
public
Criteria
andLogicUnitEqualTo
(
Integer
value
)
{
addCriterion
(
"logic_unit ="
,
value
,
"logicUnit"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLogicUnitNotEqualTo
(
String
value
)
{
public
Criteria
andLogicUnitNotEqualTo
(
Integer
value
)
{
addCriterion
(
"logic_unit <>"
,
value
,
"logicUnit"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLogicUnitGreaterThan
(
String
value
)
{
public
Criteria
andLogicUnitGreaterThan
(
Integer
value
)
{
addCriterion
(
"logic_unit >"
,
value
,
"logicUnit"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLogicUnitGreaterThanOrEqualTo
(
String
value
)
{
public
Criteria
andLogicUnitGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"logic_unit >="
,
value
,
"logicUnit"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLogicUnitLessThan
(
String
value
)
{
public
Criteria
andLogicUnitLessThan
(
Integer
value
)
{
addCriterion
(
"logic_unit <"
,
value
,
"logicUnit"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLogicUnitLessThanOrEqualTo
(
String
value
)
{
public
Criteria
andLogicUnitLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"logic_unit <="
,
value
,
"logicUnit"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLogicUnitLike
(
String
value
)
{
addCriterion
(
"logic_unit like"
,
value
,
"logicUnit"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLogicUnitNotLike
(
String
value
)
{
addCriterion
(
"logic_unit not like"
,
value
,
"logicUnit"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLogicUnitIn
(
List
<
String
>
values
)
{
public
Criteria
andLogicUnitIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"logic_unit in"
,
values
,
"logicUnit"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLogicUnitNotIn
(
List
<
String
>
values
)
{
public
Criteria
andLogicUnitNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"logic_unit not in"
,
values
,
"logicUnit"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLogicUnitBetween
(
String
value1
,
String
value2
)
{
public
Criteria
andLogicUnitBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"logic_unit between"
,
value1
,
value2
,
"logicUnit"
);
return
(
Criteria
)
this
;
}
public
Criteria
andLogicUnitNotBetween
(
String
value1
,
String
value2
)
{
public
Criteria
andLogicUnitNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"logic_unit not between"
,
value1
,
value2
,
"logicUnit"
);
return
(
Criteria
)
this
;
}
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/calendar/dao/CalendarJurisdictionMapper.xml
View file @
5b83e87f
...
...
@@ -10,7 +10,7 @@
<result
column=
"area"
jdbcType=
"TINYINT"
property=
"area"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"logic_num"
jdbcType=
"INTEGER"
property=
"logicNum"
/>
<result
column=
"logic_unit"
jdbcType=
"
VARCHA
R"
property=
"logicUnit"
/>
<result
column=
"logic_unit"
jdbcType=
"
INTEGE
R"
property=
"logicUnit"
/>
<result
column=
"status"
jdbcType=
"TINYINT"
property=
"status"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
...
...
@@ -143,7 +143,7 @@
logic_num, logic_unit, `status`,
create_time, update_time)
values (#{id,jdbcType=BIGINT}, #{area,jdbcType=TINYINT}, #{description,jdbcType=VARCHAR},
#{logicNum,jdbcType=INTEGER}, #{logicUnit,jdbcType=
VARCHA
R}, #{status,jdbcType=TINYINT},
#{logicNum,jdbcType=INTEGER}, #{logicUnit,jdbcType=
INTEGE
R}, #{status,jdbcType=TINYINT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.calendar.entity.CalendarJurisdiction"
>
...
...
@@ -192,7 +192,7 @@
#{logicNum,jdbcType=INTEGER},
</if>
<if
test=
"logicUnit != null"
>
#{logicUnit,jdbcType=
VARCHA
R},
#{logicUnit,jdbcType=
INTEGE
R},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=TINYINT},
...
...
@@ -235,7 +235,7 @@
logic_num = #{record.logicNum,jdbcType=INTEGER},
</if>
<if
test=
"record.logicUnit != null"
>
logic_unit = #{record.logicUnit,jdbcType=
VARCHA
R},
logic_unit = #{record.logicUnit,jdbcType=
INTEGE
R},
</if>
<if
test=
"record.status != null"
>
`status` = #{record.status,jdbcType=TINYINT},
...
...
@@ -261,7 +261,7 @@
area = #{record.area,jdbcType=TINYINT},
description = #{record.description,jdbcType=VARCHAR},
logic_num = #{record.logicNum,jdbcType=INTEGER},
logic_unit = #{record.logicUnit,jdbcType=
VARCHA
R},
logic_unit = #{record.logicUnit,jdbcType=
INTEGE
R},
`status` = #{record.status,jdbcType=TINYINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
...
...
@@ -286,7 +286,7 @@
logic_num = #{logicNum,jdbcType=INTEGER},
</if>
<if
test=
"logicUnit != null"
>
logic_unit = #{logicUnit,jdbcType=
VARCHA
R},
logic_unit = #{logicUnit,jdbcType=
INTEGE
R},
</if>
<if
test=
"status != null"
>
`status` = #{status,jdbcType=TINYINT},
...
...
@@ -309,7 +309,7 @@
set area = #{area,jdbcType=TINYINT},
description = #{description,jdbcType=VARCHAR},
logic_num = #{logicNum,jdbcType=INTEGER},
logic_unit = #{logicUnit,jdbcType=
VARCHA
R},
logic_unit = #{logicUnit,jdbcType=
INTEGE
R},
`status` = #{status,jdbcType=TINYINT},
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