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
12df33d8
Commit
12df33d8
authored
Nov 23, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] fixed approval assert
parent
44a8b78e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
+19
-9
ApprovalController.java
.../java/pwc/taxtech/atms/controller/ApprovalController.java
+1
-1
ApprovalService.java
...va/pwc/taxtech/atms/vat/service/impl/ApprovalService.java
+3
-2
PeriodApproveMapper.java
...in/java/pwc/taxtech/atms/vat/dao/PeriodApproveMapper.java
+3
-2
vat-report-view.ctrl.js
...p/common/controls/vat-report-view/vat-report-view.ctrl.js
+12
-4
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ApprovalController.java
View file @
12df33d8
...
...
@@ -67,7 +67,7 @@ public class ApprovalController {
@ResponseBody
@RequestMapping
(
value
=
"/check/projectId/period"
,
method
=
RequestMethod
.
PUT
)
public
void
check
(
@PathVariable
String
projectId
,
@PathVariable
Integer
period
,
@RequestParam
String
decide
,
@RequestParam
String
comment
)
{
//only for manager role
approvalService
.
checkTask
(
projectId
,
period
,
decide
,
comment
);
approvalService
.
checkTask
(
projectId
,
period
,
decide
,
comment
);
}
@ResponseBody
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ApprovalService.java
View file @
12df33d8
...
...
@@ -126,8 +126,9 @@ public class ApprovalService {
@Transactional
public
void
checkTask
(
String
projectId
,
Integer
period
,
String
decide
,
String
comment
)
{
String
instanceId
=
periodApproveMapper
.
getInstanceIdByProjectIdAndPeriod
(
projectId
,
period
);
MyAsserts
.
assertNotEmpty
(
instanceId
,
Exceptions
.
NOT_FOUND_INSTANCE_EXCEPTION
);
PeriodApprove
approve
=
periodApproveMapper
.
getInstanceIdByProjectIdAndPeriod
(
projectId
,
period
);
MyAsserts
.
assertTrue
(
approve
!=
null
&&
approve
.
getStatus
().
equals
(
"committed"
),
Exceptions
.
NOT_FOUND_INSTANCE_EXCEPTION
);
String
instanceId
=
approve
.
getInstanceId
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
PeriodApprove
pa
=
new
PeriodApprove
();
switch
(
decide
)
{
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodApproveMapper.java
View file @
12df33d8
...
...
@@ -146,11 +146,11 @@ public interface PeriodApproveMapper extends MyVatMapper {
@Select
(
""
+
"SELECT "
+
" INSTANCE_ID AS instanceId
"
+
" INSTANCE_ID AS instanceId
,STATUS AS status
"
+
"FROM "
+
" ( SELECT * FROM PERIOD_APPROVE WHERE PROJECT_ID = #{projectId} AND PERIOD = #{period} ORDER BY CREATE_TIME DESC ) "
+
"WHERE "
+
" ROWNUM = 1"
+
""
)
String
getInstanceIdByProjectIdAndPeriod
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"period"
)
Integer
period
);
PeriodApprove
getInstanceIdByProjectIdAndPeriod
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"period"
)
Integer
period
);
}
\ No newline at end of file
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.ctrl.js
View file @
12df33d8
...
...
@@ -2538,7 +2538,9 @@
};
$scope
.
commitApprove
=
function
(){
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
).
success
(
function
(
result
){
if
(
vatSessionService
.
month
)
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
).
success
(
function
(
result
){
if
(
result
&&
result
==
'committed'
){
SweetAlert
.
error
(
'报表提审中或审核已通过!'
);
}
else
{
...
...
@@ -2568,7 +2570,9 @@
}
$scope
.
doApprove
=
function
(){
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
monthvatSessionService
.
month
).
success
(
function
(
result
){
if
(
vatSessionService
.
month
)
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
).
success
(
function
(
result
){
if
(
result
&&
result
==
'committed'
){
$
(
"#ApprovalComment"
).
modal
(
'show'
)
}
else
{
...
...
@@ -2579,13 +2583,17 @@
}
$scope
.
rejectApproval
=
function
(){
vatApproveService
.
checkTask
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
'disagreed'
,
$scope
.
comment
).
success
(
function
(){
if
(
vatSessionService
.
month
)
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatApproveService
.
checkTask
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
,
'disagreed'
,
$scope
.
comment
).
success
(
function
(){
$
(
"#ApprovalComment"
).
modal
(
'hide'
);
});
}
$scope
.
agreeApproval
=
function
(){
vatApproveService
.
checkTask
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
'agreed'
,
$scope
.
comment
).
success
(
function
(){
if
(
vatSessionService
.
month
)
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatApproveService
.
checkTask
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
,
'agreed'
,
$scope
.
comment
).
success
(
function
(){
vatCommonService
.
setProjectStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
Completed
,
constant
.
DictionaryDictKey
.
WFDataProcess
,
enums
.
FinishStatusEnum
.
Finished
);
$
(
"#ApprovalComment"
).
modal
(
'hide'
);
...
...
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