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
99b8cb6b
Commit
99b8cb6b
authored
Nov 11, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] fix appoavle info retern and add get first template info
parent
e5aafd7d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
37 deletions
+58
-37
ApprovalController.java
.../java/pwc/taxtech/atms/controller/ApprovalController.java
+7
-0
ApprovalService.java
...va/pwc/taxtech/atms/vat/service/impl/ApprovalService.java
+10
-8
PeriodApproveMapper.java
...in/java/pwc/taxtech/atms/vat/dao/PeriodApproveMapper.java
+3
-1
PeriodReportMapper.java
...ain/java/pwc/taxtech/atms/vat/dao/PeriodReportMapper.java
+15
-0
ApprovalTaskInfo.java
.../main/java/pwc/taxtech/atms/vat/dpo/ApprovalTaskInfo.java
+18
-0
project.svc.js
...web/src/main/webapp/app/common/webservices/project.svc.js
+1
-1
app-approve.html
...rc/main/webapp/app/framework/app-approve/app-approve.html
+0
-16
vat-layout.ctrl.js
...web/src/main/webapp/app/vat/vat-layout/vat-layout.ctrl.js
+4
-11
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ApprovalController.java
View file @
99b8cb6b
...
...
@@ -14,6 +14,7 @@ import pwc.taxtech.atms.dto.approval.ApprovalDto;
import
pwc.taxtech.atms.dto.approval.ApprovalTask
;
import
pwc.taxtech.atms.exception.Exceptions
;
import
pwc.taxtech.atms.vat.dpo.ApprovalTaskInfo
;
import
pwc.taxtech.atms.vat.entity.PeriodTemplate
;
import
pwc.taxtech.atms.vat.service.impl.ApprovalService
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -56,6 +57,12 @@ public class ApprovalController {
return
approvalService
.
getTask
();
}
@ResponseBody
@RequestMapping
(
value
=
"/templateInfo/{templateId}"
)
public
PeriodTemplate
getFirstTemplate
(
@PathVariable
Long
templateId
)
{
//accountant manager
return
approvalService
.
getTemplateInfo
(
templateId
);
}
@ResponseBody
@RequestMapping
(
value
=
"/check/{taskId}"
)
public
void
check
(
@PathVariable
String
taskId
,
@RequestParam
String
decide
)
{
//only for manager role
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ApprovalService.java
View file @
99b8cb6b
...
...
@@ -18,14 +18,14 @@ import pwc.taxtech.atms.exception.BadParameterException;
import
pwc.taxtech.atms.exception.Exceptions
;
import
pwc.taxtech.atms.vat.dao.PeriodApproveMapper
;
import
pwc.taxtech.atms.vat.dao.PeriodReportMapper
;
import
pwc.taxtech.atms.vat.dao.PeriodTemplateMapper
;
import
pwc.taxtech.atms.vat.dpo.ApprovalTaskInfo
;
import
pwc.taxtech.atms.vat.entity.PeriodApprove
;
import
pwc.taxtech.atms.vat.entity.PeriodApproveExample
;
import
pwc.taxtech.atms.vat.entity.PeriodReport
;
import
pwc.taxtech.atms.vat.entity.PeriodReportExample
;
import
pwc.taxtech.atms.vat.entity.*
;
import
java.util.*
;
import
static
pwc
.
taxtech
.
atms
.
common
.
util
.
SpringContextUtil
.
periodTemplateMapper
;
@Service
public
class
ApprovalService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ApprovalService
.
class
);
...
...
@@ -39,6 +39,8 @@ public class ApprovalService {
PeriodReportMapper
reportMapper
;
@Autowired
AuthUserHelper
authUserHelper
;
@Autowired
PeriodTemplateMapper
periodTemplateMapper
;
@Transactional
...
...
@@ -57,12 +59,9 @@ public class ApprovalService {
}
private
void
startInstance
(
ApprovalDto
dto
,
PeriodApprove
pa
)
{
PeriodReportExample
pre
=
new
PeriodReportExample
();
pre
.
createCriteria
().
andProjectIdEqualTo
(
dto
.
getProjectId
()).
andPeriodEqualTo
(
dto
.
getPeriod
());
List
<
PeriodReport
>
currentReports
=
reportMapper
.
selectByExample
(
pre
);
List
<
PeriodReport
>
currentReports
=
reportMapper
.
selectOrderReportIds
(
dto
.
getProjectId
(),
dto
.
getPeriod
());
MyAsserts
.
assertNotEmpty
(
currentReports
,
Exceptions
.
NOT_FOUND_REPORT_EXCEPTION
);
pa
.
setId
(
UUID
.
randomUUID
().
toString
());
pa
.
setPeriod
(
dto
.
getPeriod
());
pa
.
setYear
(
dto
.
getYear
());
...
...
@@ -155,4 +154,7 @@ public class ApprovalService {
}
public
PeriodTemplate
getTemplateInfo
(
Long
templateId
)
{
return
periodTemplateMapper
.
selectByPrimaryKey
(
templateId
);
}
}
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodApproveMapper.java
View file @
99b8cb6b
...
...
@@ -120,7 +120,9 @@ public interface PeriodApproveMapper extends MyVatMapper {
" pa.APPROVAL_RESUALT AS approvalResult, "
+
" pa.CREATE_TIME AS createTime, "
+
" pa.APPROVAL_TIME AS approvalTime, "
+
" pa.REPORT_PATHS AS reportPaths "
+
" pa.REPORT_PATHS AS reportPaths,"
+
" pa.REPORT_IDS as reportIds, "
+
" pa.TEMPLATE_IDS as templateIds"
+
"FROM "
+
" PERIOD_APPROVE pa "
+
" INNER JOIN PROJECT p ON pa.PROJECT_ID = p.ID "
+
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodReportMapper.java
View file @
99b8cb6b
...
...
@@ -118,4 +118,18 @@ public interface PeriodReportMapper extends MyVatMapper {
" AND pds.PERIOD = #{period}"
+
""
)
int
hasManualDataSource
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"period"
)
Integer
period
);
@Select
(
""
+
"SELECT "
+
" r.ID as id,r.TEMPLATE_ID as templateId "
+
"FROM "
+
" PERIOD_REPORT r "
+
" LEFT JOIN PERIOD_TEMPLATE pt ON r.TEMPLATE_ID = pt.TEMPLATE_ID "
+
"WHERE "
+
" r.PROJECT_ID = '1' "
+
" AND r.PERIOD = 10 "
+
"ORDER BY "
+
" pt.ORDER_INDEX"
+
""
)
List
<
PeriodReport
>
selectOrderReportIds
(
String
projectId
,
Integer
period
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/vat/dpo/ApprovalTaskInfo.java
View file @
99b8cb6b
...
...
@@ -14,6 +14,8 @@ public class ApprovalTaskInfo {
private
Date
createTime
;
private
Date
approvalTime
;
private
String
reportPaths
;
private
String
reportIds
;
private
String
templateIds
;
public
String
getProjectName
()
{
return
projectName
;
...
...
@@ -102,4 +104,20 @@ public class ApprovalTaskInfo {
public
void
setProjectId
(
String
projectId
)
{
this
.
projectId
=
projectId
;
}
public
String
getReportIds
()
{
return
reportIds
;
}
public
void
setReportIds
(
String
reportIds
)
{
this
.
reportIds
=
reportIds
;
}
public
String
getTemplateIds
()
{
return
templateIds
;
}
public
void
setTemplateIds
(
String
templateIds
)
{
this
.
templateIds
=
templateIds
;
}
}
atms-web/src/main/webapp/app/common/webservices/project.svc.js
View file @
99b8cb6b
...
...
@@ -17,7 +17,7 @@ webservices.factory('projectService', ['$http', 'apiConfig', function ($http, ap
return
$http
.
get
(
'/project/getAllProjectList?orgID='
+
orgID
+
'&serviceID='
+
serviceID
+
(
projectYear
==
null
?
''
:
'&projectYear='
+
projectYear
),
apiConfig
.
create
());
},
getProjectByID
:
function
(
projectID
)
{
return
$http
.
get
(
'/project/getProject?projectI
D
='
+
projectID
,
apiConfig
.
create
());
return
$http
.
get
(
'/project/getProject?projectI
d
='
+
projectID
,
apiConfig
.
create
());
},
getProjectExceptSelected
:
function
(
userId
)
{
return
$http
.
get
(
'/project/displayExceptSelected?userID='
+
userId
,
apiConfig
.
create
());
...
...
atms-web/src/main/webapp/app/framework/app-approve/app-approve.html
View file @
99b8cb6b
...
...
@@ -97,19 +97,4 @@
</div>
</div>
</div>
<script
type=
"text/ng-template"
id=
"liucheng.html"
>
<
div
class
=
"modal-content"
style
=
"width:900px"
>
<
div
class
=
"modal-header"
style
=
"width:900px"
>
<
div
class
=
"modal-title"
id
=
"modal-title"
>
报表审批流程
<
/div
>
<
/div
>
<
div
class
=
"modal-body"
id
=
"modal-body"
style
=
"width:900px"
>
<
div
class
=
"content"
>
<
img
src
=
"../../../app-resources/images/vat/liucheng.png"
>
<
/div
>
<
/div
>
<
div
class
=
"modal-footer"
>
<
button
type
=
"button"
class
=
"btn btn-third"
data
-
dismiss
=
"modal"
ng
-
click
=
"cancel()"
>
关闭
<
/button
>
<
/div
>
<
/div
>
</script>
</div>
\ No newline at end of file
atms-web/src/main/webapp/app/vat/vat-layout/vat-layout.ctrl.js
View file @
99b8cb6b
...
...
@@ -70,7 +70,7 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
projectService
.
setProjectStatus
(
temp
,
constant
.
ProjectStatusEnum
.
UnStarted
).
success
(
function
(
or
)
{
if
(
or
.
result
)
{
vatSessionService
.
project
.
projectStatusList
[
temp
]
=
constant
.
ProjectStatusEnum
.
UnStarted
;
initStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
id
,
temp
);
initStatus
(
vatSessionService
.
project
.
id
,
temp
);
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SetProjectStatusError'
));
...
...
@@ -79,7 +79,7 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
}
else
{
//已经导入的话,更新最新项目状态
vatSessionService
.
project
.
projectStatusList
[
temp
]
=
or
.
data
.
status
;
initStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
id
,
temp
);
initStatus
(
vatSessionService
.
project
.
id
,
temp
);
}
}
});
...
...
@@ -665,13 +665,11 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
}
}
function
initStatus
(
dbName
,
id
,
month
)
{
function
initStatus
(
id
,
month
)
{
$q
.
all
([
projectService
.
getProjectStatus
(
id
,
month
),
//vatWorkflowService.getWorkflowDetailByDb(dbName, month)
]).
then
(
function
(
result
)
{
var
statusData
=
result
[
0
].
data
;
// var workflowData = result[1].data;
if
(
statusData
.
result
)
{
$log
.
debug
(
"vat-layout.ctrl.js initStatus set project importSubStatus"
);
vatSessionService
.
project
.
importSubStatus
=
statusData
.
data
.
importSubStatus
;
...
...
@@ -682,11 +680,6 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
$log
.
debug
(
vatSessionService
.
project
.
importSubStatus
);
}
// if (workflowData.result) {
// $log.debug("vat-layout.ctrl.js initStatus set project workflow");
// vatSessionService.project.workflow = workflowData.data;
// $log.debug(vatSessionService.project.workflow);
// }
});
}
...
...
@@ -700,7 +693,7 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
$scope
.
displaySubStatus
=
false
;
//导入子状态是否显示
$scope
.
displayApproveDetails
=
false
;
//审核详细详细是否显示
$scope
.
triggerSchedulerJob
=
triggerSchedulerJob
;
initStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
id
,
vatSessionService
.
month
);
initStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
);
$scope
.
setPermissionMenu
();
...
...
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