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
13023bd2
Commit
13023bd2
authored
Oct 24, 2018
by
neo.wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle_neo' into 'dev_oracle'
Dev oracle neo See merge request root/atms!151
parents
5f275d23
e47b1005
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
328 additions
and
23 deletions
+328
-23
AtmsExceptionHandler.java
...ava/pwc/taxtech/atms/controller/AtmsExceptionHandler.java
+4
-0
Exceptions.java
.../src/main/java/pwc/taxtech/atms/exception/Exceptions.java
+1
-0
ServerErrorException.java
...java/pwc/taxtech/atms/exception/ServerErrorException.java
+27
-0
ApprovalService.java
...va/pwc/taxtech/atms/vat/service/impl/ApprovalService.java
+41
-16
PeriodApprove.java
.../main/java/pwc/taxtech/atms/vat/entity/PeriodApprove.java
+171
-0
PeriodApproveExample.java
...ava/pwc/taxtech/atms/vat/entity/PeriodApproveExample.java
+0
-0
PeriodApproveMapper.xml
...esources/pwc/taxtech/atms/vat/dao/PeriodApproveMapper.xml
+84
-7
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/AtmsExceptionHandler.java
View file @
13023bd2
...
@@ -19,12 +19,16 @@ public class AtmsExceptionHandler extends ResponseEntityExceptionHandler {
...
@@ -19,12 +19,16 @@ public class AtmsExceptionHandler extends ResponseEntityExceptionHandler {
protected
ResponseEntity
<
Object
>
handleExceptions
(
Exception
ex
)
throws
ServiceException
{
protected
ResponseEntity
<
Object
>
handleExceptions
(
Exception
ex
)
throws
ServiceException
{
logger
.
error
(
"Rest Exception!"
,
ex
);
logger
.
error
(
"Rest Exception!"
,
ex
);
if
(
ex
instanceof
ApplicationException
)
{
if
(
ex
instanceof
ApplicationException
)
{
ex
.
printStackTrace
();
return
handleApplicationException
((
ApplicationException
)
ex
);
return
handleApplicationException
((
ApplicationException
)
ex
);
}
else
if
(
ex
instanceof
ServiceException
)
{
}
else
if
(
ex
instanceof
ServiceException
)
{
ex
.
printStackTrace
();
return
handleServiceException
((
ServiceException
)
ex
);
return
handleServiceException
((
ServiceException
)
ex
);
}
else
if
(
ex
instanceof
ApiException
)
{
}
else
if
(
ex
instanceof
ApiException
)
{
ex
.
printStackTrace
();
return
((
ApiException
)
ex
).
handle
();
return
((
ApiException
)
ex
).
handle
();
}
else
{
}
else
{
ex
.
printStackTrace
();
return
ResponseEntity
.
status
(
HttpStatus
.
INTERNAL_SERVER_ERROR
).
build
();
return
ResponseEntity
.
status
(
HttpStatus
.
INTERNAL_SERVER_ERROR
).
build
();
}
}
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/exception/Exceptions.java
View file @
13023bd2
...
@@ -11,4 +11,5 @@ public class Exceptions {
...
@@ -11,4 +11,5 @@ public class Exceptions {
public
static
final
ApiException
EMPTY_PRIODDATE_PARAM
=
new
BadParameterException
(
"period data is empty"
);
public
static
final
ApiException
EMPTY_PRIODDATE_PARAM
=
new
BadParameterException
(
"period data is empty"
);
public
static
final
ApiException
NOT_FOUND_REPORT_EXCEPTION
=
new
NotFoundException
(
"not found report"
);
public
static
final
ApiException
NOT_FOUND_REPORT_EXCEPTION
=
new
NotFoundException
(
"not found report"
);
public
static
final
ApiException
REPORT_HAS_COMMIT_EXCEPTION
=
new
AlreadyExistsException
(
"report approval has commit"
);
public
static
final
ApiException
REPORT_HAS_COMMIT_EXCEPTION
=
new
AlreadyExistsException
(
"report approval has commit"
);
public
static
final
ApiException
SERVER_ERROR_EXCEPTION
=
new
ServerErrorException
(
"server error exception"
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/exception/ServerErrorException.java
0 → 100644
View file @
13023bd2
package
pwc
.
taxtech
.
atms
.
exception
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
public
class
ServerErrorException
extends
ApiException
{
public
ServerErrorException
()
{
super
();
}
public
ServerErrorException
(
String
message
)
{
super
(
message
);
}
public
ServerErrorException
(
String
message
,
Throwable
cause
)
{
super
(
message
,
cause
);
}
public
ServerErrorException
(
Throwable
cause
)
{
super
(
cause
);
}
@Override
public
<
Object
>
ResponseEntity
handle
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
INTERNAL_SERVER_ERROR
).
build
();
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ApprovalService.java
View file @
13023bd2
...
@@ -10,6 +10,7 @@ import org.slf4j.LoggerFactory;
...
@@ -10,6 +10,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
pwc.taxtech.atms.common.AuthUserHelper
;
import
pwc.taxtech.atms.common.util.MyAsserts
;
import
pwc.taxtech.atms.common.util.MyAsserts
;
import
pwc.taxtech.atms.constant.Constant
;
import
pwc.taxtech.atms.constant.Constant
;
import
pwc.taxtech.atms.dto.approval.ApprovalDto
;
import
pwc.taxtech.atms.dto.approval.ApprovalDto
;
...
@@ -25,6 +26,8 @@ import pwc.taxtech.atms.vat.entity.PeriodReportExample;
...
@@ -25,6 +26,8 @@ import pwc.taxtech.atms.vat.entity.PeriodReportExample;
import
java.util.*
;
import
java.util.*
;
import
static
pwc
.
taxtech
.
atms
.
exception
.
Exceptions
.
SERVER_ERROR_EXCEPTION
;
@Service
@Service
public
class
ApprovalService
{
public
class
ApprovalService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ApprovalService
.
class
);
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ApprovalService
.
class
);
...
@@ -36,16 +39,35 @@ public class ApprovalService {
...
@@ -36,16 +39,35 @@ public class ApprovalService {
PeriodApproveMapper
periodApproveMapper
;
PeriodApproveMapper
periodApproveMapper
;
@Autowired
@Autowired
PeriodReportMapper
reportMapper
;
PeriodReportMapper
reportMapper
;
@Autowired
AuthUserHelper
authUserHelper
;
@Transactional
@Transactional
public
void
startInstanceAndAssignee
(
ApprovalDto
dto
)
{
public
void
startInstanceAndAssignee
(
ApprovalDto
dto
)
{
PeriodApprove
pa
=
new
PeriodApprove
();
startInstance
(
dto
,
pa
);
startAssignee
(
pa
);
createAttache
(
pa
);
}
public
List
<
ApprovalTask
>
getTask
(
String
assignee
)
{
List
<
Task
>
tasks
=
taskService
.
createTaskQuery
().
taskAssignee
(
assignee
).
list
();
List
<
ApprovalTask
>
list
=
new
ArrayList
<>();
for
(
Task
task
:
tasks
)
{
ApprovalTask
t
=
new
ApprovalTask
();
list
.
add
(
t
.
copyfrom
(
task
));
}
return
list
;
}
private
void
startInstance
(
ApprovalDto
dto
,
PeriodApprove
pa
)
{
PeriodReportExample
pre
=
new
PeriodReportExample
();
PeriodReportExample
pre
=
new
PeriodReportExample
();
pre
.
createCriteria
().
andProjectIdEqualTo
(
dto
.
getProjectId
()).
andPeriodEqualTo
(
dto
.
getPeriod
());
pre
.
createCriteria
().
andProjectIdEqualTo
(
dto
.
getProjectId
()).
andPeriodEqualTo
(
dto
.
getPeriod
());
List
<
PeriodReport
>
currentReports
=
reportMapper
.
selectByExample
(
pre
);
List
<
PeriodReport
>
currentReports
=
reportMapper
.
selectByExample
(
pre
);
MyAsserts
.
assertNotEmpty
(
currentReports
,
Exceptions
.
NOT_FOUND_REPORT_EXCEPTION
);
MyAsserts
.
assertNotEmpty
(
currentReports
,
Exceptions
.
NOT_FOUND_REPORT_EXCEPTION
);
PeriodApprove
pa
=
new
PeriodApprove
();
pa
.
setId
(
UUID
.
randomUUID
().
toString
());
pa
.
setId
(
UUID
.
randomUUID
().
toString
());
pa
.
setPeriod
(
dto
.
getPeriod
());
pa
.
setPeriod
(
dto
.
getPeriod
());
pa
.
setYear
(
dto
.
getYear
());
pa
.
setYear
(
dto
.
getYear
());
...
@@ -72,10 +94,14 @@ public class ApprovalService {
...
@@ -72,10 +94,14 @@ public class ApprovalService {
pa
.
setReportIds
(
reportIds
.
toString
());
pa
.
setReportIds
(
reportIds
.
toString
());
pa
.
setTemplateIds
(
reportTemplateIds
.
toString
());
pa
.
setTemplateIds
(
reportTemplateIds
.
toString
());
pa
.
setStatus
(
Constant
.
APPROVAL_COMMITTED
);
pa
.
setStatus
(
Constant
.
APPROVAL_COMMITTED
);
pa
.
setProjectId
(
dto
.
getProjectId
());
pa
.
setCreateBy
(
authUserHelper
.
getCurrentUserId
()==
null
?
"Admin"
:
authUserHelper
.
getCurrentUserId
());
pa
.
setCreateTime
(
new
Date
());
periodApproveMapper
.
insert
(
pa
);
}
private
void
startAssignee
(
PeriodApprove
pa
)
{
List
<
Task
>
tasks
=
taskService
.
createTaskQuery
().
taskAssignee
(
Constant
.
ASSIGNEE_ACCOUNTANT
).
processInstanceId
(
List
<
Task
>
tasks
=
taskService
.
createTaskQuery
().
taskAssignee
(
Constant
.
ASSIGNEE_ACCOUNTANT
).
processInstanceId
(
p
i
.
get
Id
()).
list
();
p
a
.
getInstance
Id
()).
list
();
if
(
tasks
!=
null
&&
tasks
.
size
()
==
1
)
{
if
(
tasks
!=
null
&&
tasks
.
size
()
==
1
)
{
Task
task
=
tasks
.
get
(
0
);
Task
task
=
tasks
.
get
(
0
);
...
@@ -83,25 +109,24 @@ public class ApprovalService {
...
@@ -83,25 +109,24 @@ public class ApprovalService {
map
.
put
(
"committed"
,
0
);
map
.
put
(
"committed"
,
0
);
taskService
.
complete
(
task
.
getId
(),
map
);
taskService
.
complete
(
task
.
getId
(),
map
);
taskService
.
createAttachment
(
"java.lang.String"
,
task
.
getId
(),
task
.
getProcessInstanceId
(),
"period_approval_uuid"
,
pa
.
getId
(),
""
);
periodApproveMapper
.
insert
(
pa
);
}
else
{
}
else
{
logger
.
warn
(
"task must not null or size
gt
1"
);
logger
.
warn
(
"task must not null or size
eq
1"
);
}
}
}
}
public
List
<
ApprovalTask
>
getTask
(
String
assignee
)
{
private
void
createAttache
(
PeriodApprove
pa
)
{
List
<
Task
>
tasks
=
taskService
.
createTaskQuery
().
taskAssignee
(
assignee
).
list
();
List
<
Task
>
tasks
=
taskService
.
createTaskQuery
().
taskAssignee
(
Constant
.
ASSIGNEE_MANAGER
).
processInstanceId
(
List
<
ApprovalTask
>
list
=
new
ArrayList
<>();
pa
.
getInstanceId
()).
list
();
for
(
Task
task
:
tasks
)
{
if
(
tasks
!=
null
&&
tasks
.
size
()
==
1
)
{
ApprovalTask
t
=
new
ApprovalTask
();
Task
task
=
tasks
.
get
(
0
);
list
.
add
(
t
.
copyfrom
(
task
));
taskService
.
createAttachment
(
"java.lang.String"
,
task
.
getId
(),
task
.
getProcessInstanceId
(),
"period_approval_uuid"
,
pa
.
getId
(),
pa
.
getId
());
}
else
{
logger
.
warn
(
"task must not null or size eq 1"
);
}
}
return
list
;
}
}
@Transactional
@Transactional
public
void
checkTask
(
String
taskId
,
String
decide
)
{
public
void
checkTask
(
String
taskId
,
String
decide
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/entity/PeriodApprove.java
View file @
13023bd2
package
pwc
.
taxtech
.
atms
.
vat
.
entity
;
package
pwc
.
taxtech
.
atms
.
vat
.
entity
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
/**
*
*
...
@@ -91,6 +92,51 @@ public class PeriodApprove implements Serializable {
...
@@ -91,6 +92,51 @@ public class PeriodApprove implements Serializable {
*/
*/
private
String
templateIds
;
private
String
templateIds
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.CREATE_BY
*
* @mbg.generated
*/
private
String
createBy
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.CREATE_TIME
*
* @mbg.generated
*/
private
Date
createTime
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.APPROVAL_BY
*
* @mbg.generated
*/
private
String
approvalBy
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.APPROVAL_TIME
*
* @mbg.generated
*/
private
Date
approvalTime
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.APPROVAL_RESUALT
*
* @mbg.generated
*/
private
String
approvalResualt
;
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
* This field corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
...
@@ -315,6 +361,126 @@ public class PeriodApprove implements Serializable {
...
@@ -315,6 +361,126 @@ public class PeriodApprove implements Serializable {
this
.
templateIds
=
templateIds
==
null
?
null
:
templateIds
.
trim
();
this
.
templateIds
=
templateIds
==
null
?
null
:
templateIds
.
trim
();
}
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.CREATE_BY
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.CREATE_BY
*
* @mbg.generated
*/
public
String
getCreateBy
()
{
return
createBy
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.CREATE_BY
*
* @param createBy the value for TAX_ADMIN.PERIOD_APPROVE.CREATE_BY
*
* @mbg.generated
*/
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
==
null
?
null
:
createBy
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.CREATE_TIME
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.CREATE_TIME
*
* @mbg.generated
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.CREATE_TIME
*
* @param createTime the value for TAX_ADMIN.PERIOD_APPROVE.CREATE_TIME
*
* @mbg.generated
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.APPROVAL_BY
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.APPROVAL_BY
*
* @mbg.generated
*/
public
String
getApprovalBy
()
{
return
approvalBy
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.APPROVAL_BY
*
* @param approvalBy the value for TAX_ADMIN.PERIOD_APPROVE.APPROVAL_BY
*
* @mbg.generated
*/
public
void
setApprovalBy
(
String
approvalBy
)
{
this
.
approvalBy
=
approvalBy
==
null
?
null
:
approvalBy
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.APPROVAL_TIME
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.APPROVAL_TIME
*
* @mbg.generated
*/
public
Date
getApprovalTime
()
{
return
approvalTime
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.APPROVAL_TIME
*
* @param approvalTime the value for TAX_ADMIN.PERIOD_APPROVE.APPROVAL_TIME
*
* @mbg.generated
*/
public
void
setApprovalTime
(
Date
approvalTime
)
{
this
.
approvalTime
=
approvalTime
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.APPROVAL_RESUALT
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.APPROVAL_RESUALT
*
* @mbg.generated
*/
public
String
getApprovalResualt
()
{
return
approvalResualt
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.APPROVAL_RESUALT
*
* @param approvalResualt the value for TAX_ADMIN.PERIOD_APPROVE.APPROVAL_RESUALT
*
* @mbg.generated
*/
public
void
setApprovalResualt
(
String
approvalResualt
)
{
this
.
approvalResualt
=
approvalResualt
==
null
?
null
:
approvalResualt
.
trim
();
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
...
@@ -336,6 +502,11 @@ public class PeriodApprove implements Serializable {
...
@@ -336,6 +502,11 @@ public class PeriodApprove implements Serializable {
sb
.
append
(
", instanceId="
).
append
(
instanceId
);
sb
.
append
(
", instanceId="
).
append
(
instanceId
);
sb
.
append
(
", year="
).
append
(
year
);
sb
.
append
(
", year="
).
append
(
year
);
sb
.
append
(
", templateIds="
).
append
(
templateIds
);
sb
.
append
(
", templateIds="
).
append
(
templateIds
);
sb
.
append
(
", createBy="
).
append
(
createBy
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", approvalBy="
).
append
(
approvalBy
);
sb
.
append
(
", approvalTime="
).
append
(
approvalTime
);
sb
.
append
(
", approvalResualt="
).
append
(
approvalResualt
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/entity/PeriodApproveExample.java
View file @
13023bd2
This diff is collapsed.
Click to expand it.
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/PeriodApproveMapper.xml
View file @
13023bd2
...
@@ -15,6 +15,11 @@
...
@@ -15,6 +15,11 @@
<result
column=
"INSTANCE_ID"
jdbcType=
"VARCHAR"
property=
"instanceId"
/>
<result
column=
"INSTANCE_ID"
jdbcType=
"VARCHAR"
property=
"instanceId"
/>
<result
column=
"YEAR"
jdbcType=
"DECIMAL"
property=
"year"
/>
<result
column=
"YEAR"
jdbcType=
"DECIMAL"
property=
"year"
/>
<result
column=
"TEMPLATE_IDS"
jdbcType=
"VARCHAR"
property=
"templateIds"
/>
<result
column=
"TEMPLATE_IDS"
jdbcType=
"VARCHAR"
property=
"templateIds"
/>
<result
column=
"CREATE_BY"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"APPROVAL_BY"
jdbcType=
"VARCHAR"
property=
"approvalBy"
/>
<result
column=
"APPROVAL_TIME"
jdbcType=
"TIMESTAMP"
property=
"approvalTime"
/>
<result
column=
"APPROVAL_RESUALT"
jdbcType=
"VARCHAR"
property=
"approvalResualt"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<!--
<!--
...
@@ -88,7 +93,7 @@
...
@@ -88,7 +93,7 @@
This element is automatically generated by MyBatis Generator, do not modify.
This element is automatically generated by MyBatis Generator, do not modify.
-->
-->
ID, PROJECT_ID, PERIOD, REPORT_IDS, REPORT_PATHS, "STATUS", INSTANCE_ID, "YEAR",
ID, PROJECT_ID, PERIOD, REPORT_IDS, REPORT_PATHS, "STATUS", INSTANCE_ID, "YEAR",
TEMPLATE_IDS
TEMPLATE_IDS
, CREATE_BY, CREATE_TIME, APPROVAL_BY, APPROVAL_TIME, APPROVAL_RESUALT
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.PeriodApproveExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.PeriodApproveExample"
resultMap=
"BaseResultMap"
>
<!--
<!--
...
@@ -143,12 +148,14 @@
...
@@ -143,12 +148,14 @@
-->
-->
insert into PERIOD_APPROVE (ID, PROJECT_ID, PERIOD,
insert into PERIOD_APPROVE (ID, PROJECT_ID, PERIOD,
REPORT_IDS, REPORT_PATHS, "STATUS",
REPORT_IDS, REPORT_PATHS, "STATUS",
INSTANCE_ID, "YEAR", TEMPLATE_IDS
INSTANCE_ID, "YEAR", TEMPLATE_IDS,
)
CREATE_BY, CREATE_TIME, APPROVAL_BY,
APPROVAL_TIME, APPROVAL_RESUALT)
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{period,jdbcType=DECIMAL},
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{period,jdbcType=DECIMAL},
#{reportIds,jdbcType=VARCHAR}, #{reportPaths,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{reportIds,jdbcType=VARCHAR}, #{reportPaths,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{instanceId,jdbcType=VARCHAR}, #{year,jdbcType=DECIMAL}, #{templateIds,jdbcType=VARCHAR}
#{instanceId,jdbcType=VARCHAR}, #{year,jdbcType=DECIMAL}, #{templateIds,jdbcType=VARCHAR},
)
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{approvalBy,jdbcType=VARCHAR},
#{approvalTime,jdbcType=TIMESTAMP}, #{approvalResualt,jdbcType=VARCHAR})
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.vat.entity.PeriodApprove"
>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.vat.entity.PeriodApprove"
>
<!--
<!--
...
@@ -184,6 +191,21 @@
...
@@ -184,6 +191,21 @@
<if
test=
"templateIds != null"
>
<if
test=
"templateIds != null"
>
TEMPLATE_IDS,
TEMPLATE_IDS,
</if>
</if>
<if
test=
"createBy != null"
>
CREATE_BY,
</if>
<if
test=
"createTime != null"
>
CREATE_TIME,
</if>
<if
test=
"approvalBy != null"
>
APPROVAL_BY,
</if>
<if
test=
"approvalTime != null"
>
APPROVAL_TIME,
</if>
<if
test=
"approvalResualt != null"
>
APPROVAL_RESUALT,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
...
@@ -213,6 +235,21 @@
...
@@ -213,6 +235,21 @@
<if
test=
"templateIds != null"
>
<if
test=
"templateIds != null"
>
#{templateIds,jdbcType=VARCHAR},
#{templateIds,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"createBy != null"
>
#{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"approvalBy != null"
>
#{approvalBy,jdbcType=VARCHAR},
</if>
<if
test=
"approvalTime != null"
>
#{approvalTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"approvalResualt != null"
>
#{approvalResualt,jdbcType=VARCHAR},
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.PeriodApproveExample"
resultType=
"java.lang.Long"
>
<select
id=
"countByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.PeriodApproveExample"
resultType=
"java.lang.Long"
>
...
@@ -259,6 +296,21 @@
...
@@ -259,6 +296,21 @@
<if
test=
"record.templateIds != null"
>
<if
test=
"record.templateIds != null"
>
TEMPLATE_IDS = #{record.templateIds,jdbcType=VARCHAR},
TEMPLATE_IDS = #{record.templateIds,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.createBy != null"
>
CREATE_BY = #{record.createBy,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.approvalBy != null"
>
APPROVAL_BY = #{record.approvalBy,jdbcType=VARCHAR},
</if>
<if
test=
"record.approvalTime != null"
>
APPROVAL_TIME = #{record.approvalTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.approvalResualt != null"
>
APPROVAL_RESUALT = #{record.approvalResualt,jdbcType=VARCHAR},
</if>
</set>
</set>
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
@@ -278,7 +330,12 @@
...
@@ -278,7 +330,12 @@
"STATUS" = #{record.status,jdbcType=VARCHAR},
"STATUS" = #{record.status,jdbcType=VARCHAR},
INSTANCE_ID = #{record.instanceId,jdbcType=VARCHAR},
INSTANCE_ID = #{record.instanceId,jdbcType=VARCHAR},
"YEAR" = #{record.year,jdbcType=DECIMAL},
"YEAR" = #{record.year,jdbcType=DECIMAL},
TEMPLATE_IDS = #{record.templateIds,jdbcType=VARCHAR}
TEMPLATE_IDS = #{record.templateIds,jdbcType=VARCHAR},
CREATE_BY = #{record.createBy,jdbcType=VARCHAR},
CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
APPROVAL_BY = #{record.approvalBy,jdbcType=VARCHAR},
APPROVAL_TIME = #{record.approvalTime,jdbcType=TIMESTAMP},
APPROVAL_RESUALT = #{record.approvalResualt,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
@@ -314,6 +371,21 @@
...
@@ -314,6 +371,21 @@
<if
test=
"templateIds != null"
>
<if
test=
"templateIds != null"
>
TEMPLATE_IDS = #{templateIds,jdbcType=VARCHAR},
TEMPLATE_IDS = #{templateIds,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"createBy != null"
>
CREATE_BY = #{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"approvalBy != null"
>
APPROVAL_BY = #{approvalBy,jdbcType=VARCHAR},
</if>
<if
test=
"approvalTime != null"
>
APPROVAL_TIME = #{approvalTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"approvalResualt != null"
>
APPROVAL_RESUALT = #{approvalResualt,jdbcType=VARCHAR},
</if>
</set>
</set>
where ID = #{id,jdbcType=VARCHAR}
where ID = #{id,jdbcType=VARCHAR}
</update>
</update>
...
@@ -330,7 +402,12 @@
...
@@ -330,7 +402,12 @@
"STATUS" = #{status,jdbcType=VARCHAR},
"STATUS" = #{status,jdbcType=VARCHAR},
INSTANCE_ID = #{instanceId,jdbcType=VARCHAR},
INSTANCE_ID = #{instanceId,jdbcType=VARCHAR},
"YEAR" = #{year,jdbcType=DECIMAL},
"YEAR" = #{year,jdbcType=DECIMAL},
TEMPLATE_IDS = #{templateIds,jdbcType=VARCHAR}
TEMPLATE_IDS = #{templateIds,jdbcType=VARCHAR},
CREATE_BY = #{createBy,jdbcType=VARCHAR},
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
APPROVAL_BY = #{approvalBy,jdbcType=VARCHAR},
APPROVAL_TIME = #{approvalTime,jdbcType=TIMESTAMP},
APPROVAL_RESUALT = #{approvalResualt,jdbcType=VARCHAR}
where ID = #{id,jdbcType=VARCHAR}
where ID = #{id,jdbcType=VARCHAR}
</update>
</update>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.vat.entity.PeriodApproveExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.vat.entity.PeriodApproveExample"
resultMap=
"BaseResultMap"
>
...
...
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