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
44a8b78e
Commit
44a8b78e
authored
Nov 23, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] fixed approval with period and porject
parent
def95670
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
34 deletions
+31
-34
ApprovalController.java
.../java/pwc/taxtech/atms/controller/ApprovalController.java
+3
-27
Exceptions.java
.../src/main/java/pwc/taxtech/atms/exception/Exceptions.java
+2
-1
ApprovalService.java
...va/pwc/taxtech/atms/vat/service/impl/ApprovalService.java
+3
-1
PeriodApproveMapper.java
...in/java/pwc/taxtech/atms/vat/dao/PeriodApproveMapper.java
+11
-0
vat-report-view.ctrl.js
...p/common/controls/vat-report-view/vat-report-view.ctrl.js
+10
-3
vatApproveService.js
...c/main/webapp/app/common/vatservices/vatApproveService.js
+2
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ApprovalController.java
View file @
44a8b78e
...
@@ -65,9 +65,9 @@ public class ApprovalController {
...
@@ -65,9 +65,9 @@ public class ApprovalController {
}
}
@ResponseBody
@ResponseBody
@RequestMapping
(
value
=
"/check/
{taskId}
"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"/check/
projectId/period
"
,
method
=
RequestMethod
.
PUT
)
public
void
check
(
@PathVariable
String
taskI
d
,
@RequestParam
String
decide
,
@RequestParam
String
comment
)
{
//only for manager role
public
void
check
(
@PathVariable
String
projectId
,
@PathVariable
Integer
perio
d
,
@RequestParam
String
decide
,
@RequestParam
String
comment
)
{
//only for manager role
approvalService
.
checkTask
(
taskI
d
,
decide
,
comment
);
approvalService
.
checkTask
(
projectId
,
perio
d
,
decide
,
comment
);
}
}
@ResponseBody
@ResponseBody
...
@@ -151,29 +151,5 @@ public class ApprovalController {
...
@@ -151,29 +151,5 @@ public class ApprovalController {
}
}
private
void
mocoDisAggreAndOver
()
{
logger
.
debug
(
"------------------------update db -----------------------------------"
);
logger
.
debug
(
"dis aggre"
);
logger
.
debug
(
"------------------------updage db-----------------------------------"
);
}
private
void
mocoAggreAndOver
()
{
logger
.
debug
(
"------------------------update db-----------------------------------"
);
logger
.
debug
(
"aggree"
);
logger
.
debug
(
"------------------------update db-----------------------------------"
);
}
private
void
mocoHasCommittedAndOver
()
{
logger
.
debug
(
"-------------------------update db----------------------------------"
);
logger
.
debug
(
"has committed"
);
logger
.
debug
(
"-------------------------update db----------------------------------"
);
}
private
void
mocoInsert
(
ApprovalDto
dto
)
{
logger
.
debug
(
"-------------------------insert db----------------------------------"
);
logger
.
debug
(
"save approval {}"
,
dto
.
toString
());
logger
.
debug
(
"-------------------------insert db----------------------------------"
);
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/exception/Exceptions.java
View file @
44a8b78e
...
@@ -20,5 +20,6 @@ public class Exceptions {
...
@@ -20,5 +20,6 @@ public class Exceptions {
public
static
final
ApiException
NOT_FOUND_EXCEPTION
=
new
NotFoundException
(
"not found resources"
);
public
static
final
ApiException
NOT_FOUND_EXCEPTION
=
new
NotFoundException
(
"not found resources"
);
public
static
final
ApiException
REPORT_IN_PROCESS_OR_AGREED_EXCEPTION
=
new
PreconditionFailedException
(
"report in approval or agreed result"
);
public
static
final
ApiException
REPORT_IN_PROCESS_OR_AGREED_EXCEPTION
=
new
PreconditionFailedException
(
"report in approval or agreed result"
);
public
static
final
FormulaException
PROJECT_NOT_FOUND
=
new
FormulaException
(
"project not found"
);;
public
static
final
FormulaException
PROJECT_NOT_FOUND
=
new
FormulaException
(
"project not found"
);;
public
static
final
FormulaException
PSUM_CELL_TEMP_NULL
=
new
FormulaException
(
"cell template group is null or empty"
);
;
public
static
final
FormulaException
PSUM_CELL_TEMP_NULL
=
new
FormulaException
(
"cell template group is null or empty"
);
public
static
final
ApiException
NOT_FOUND_INSTANCE_EXCEPTION
=
new
NotFoundException
(
"not found instance"
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ApprovalService.java
View file @
44a8b78e
...
@@ -125,7 +125,9 @@ public class ApprovalService {
...
@@ -125,7 +125,9 @@ public class ApprovalService {
@Transactional
@Transactional
public
void
checkTask
(
String
instanceId
,
String
decide
,
String
comment
)
{
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
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
PeriodApprove
pa
=
new
PeriodApprove
();
PeriodApprove
pa
=
new
PeriodApprove
();
switch
(
decide
)
{
switch
(
decide
)
{
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodApproveMapper.java
View file @
44a8b78e
...
@@ -143,4 +143,14 @@ public interface PeriodApproveMapper extends MyVatMapper {
...
@@ -143,4 +143,14 @@ public interface PeriodApproveMapper extends MyVatMapper {
" ROWNUM = 1"
+
" ROWNUM = 1"
+
""
)
""
)
String
getStatusByProjectIdAndPeriod
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"period"
)
Integer
period
);
String
getStatusByProjectIdAndPeriod
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"period"
)
Integer
period
);
@Select
(
""
+
"SELECT "
+
" INSTANCE_ID AS instanceId "
+
"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
);
}
}
\ No newline at end of file
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.ctrl.js
View file @
44a8b78e
...
@@ -2568,17 +2568,24 @@
...
@@ -2568,17 +2568,24 @@
}
}
$scope
.
doApprove
=
function
(){
$scope
.
doApprove
=
function
(){
$
(
"#ApprovalComment"
).
modal
(
'show'
);
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
monthvatSessionService
.
month
).
success
(
function
(
result
){
if
(
result
&&
result
==
'committed'
){
$
(
"#ApprovalComment"
).
modal
(
'show'
)
}
else
{
SweetAlert
.
warning
(
'当前报表未提审,请先提审!'
);
}
});
;
}
}
$scope
.
rejectApproval
=
function
(){
$scope
.
rejectApproval
=
function
(){
vatApproveService
.
checkTask
(
vatSessionService
.
approvalInfo
.
instanceId
,
'disagreed'
,
$scope
.
comment
).
success
(
function
(){
vatApproveService
.
checkTask
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
'disagreed'
,
$scope
.
comment
).
success
(
function
(){
$
(
"#ApprovalComment"
).
modal
(
'hide'
);
$
(
"#ApprovalComment"
).
modal
(
'hide'
);
});
});
}
}
$scope
.
agreeApproval
=
function
(){
$scope
.
agreeApproval
=
function
(){
vatApproveService
.
checkTask
(
vatSessionService
.
approvalInfo
.
instanceId
,
'agreed'
,
$scope
.
comment
).
success
(
function
(){
vatApproveService
.
checkTask
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
'agreed'
,
$scope
.
comment
).
success
(
function
(){
vatCommonService
.
setProjectStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
Completed
vatCommonService
.
setProjectStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
Completed
,
constant
.
DictionaryDictKey
.
WFDataProcess
,
enums
.
FinishStatusEnum
.
Finished
);
,
constant
.
DictionaryDictKey
.
WFDataProcess
,
enums
.
FinishStatusEnum
.
Finished
);
$
(
"#ApprovalComment"
).
modal
(
'hide'
);
$
(
"#ApprovalComment"
).
modal
(
'hide'
);
...
...
atms-web/src/main/webapp/app/common/vatservices/vatApproveService.js
View file @
44a8b78e
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
return
$http
.
get
(
'/approval/templateInfo/'
+
templateId
,
apiConfig
.
createVat
());
return
$http
.
get
(
'/approval/templateInfo/'
+
templateId
,
apiConfig
.
createVat
());
},
},
checkTask
:
function
(
taskI
d
,
decide
,
comment
){
checkTask
:
function
(
projectId
,
perio
d
,
decide
,
comment
){
return
$http
.
put
(
'/approval/check/'
+
taskI
d
+
'?decide='
+
decide
+
'&comment='
+
comment
,
{},
apiConfig
.
createVat
());
return
$http
.
put
(
'/approval/check/'
+
projectId
+
'/'
+
perio
d
+
'?decide='
+
decide
+
'&comment='
+
comment
,
{},
apiConfig
.
createVat
());
},
},
approvalStatus
:
function
(
projectId
,
period
){
approvalStatus
:
function
(
projectId
,
period
){
...
...
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