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
6ece16d6
Commit
6ece16d6
authored
Oct 25, 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!157
parents
91ba9c17
4cc56881
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
153 additions
and
22 deletions
+153
-22
ApprovalController.java
.../java/pwc/taxtech/atms/controller/ApprovalController.java
+3
-2
ApprovalService.java
...va/pwc/taxtech/atms/vat/service/impl/ApprovalService.java
+8
-12
PeriodApproveMapper.java
...in/java/pwc/taxtech/atms/vat/dao/PeriodApproveMapper.java
+26
-0
ApprovalTaskInfo.java
.../main/java/pwc/taxtech/atms/vat/dpo/ApprovalTaskInfo.java
+96
-0
app-approve.ctrl.js
...main/webapp/app/framework/app-approve/app-approve.ctrl.js
+20
-8
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ApprovalController.java
View file @
6ece16d6
...
...
@@ -13,6 +13,7 @@ import pwc.taxtech.atms.common.util.MyAsserts;
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.service.impl.ApprovalService
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -51,8 +52,8 @@ public class ApprovalController {
@ResponseBody
@RequestMapping
(
value
=
"/tasks/{assignee}"
)
public
List
<
ApprovalTask
>
data
(
@PathVariable
String
assignee
)
{
//accountant manager
return
approvalService
.
getTask
(
assignee
);
public
List
<
ApprovalTask
Info
>
data
(
@PathVariable
String
assignee
)
{
//accountant manager
return
approvalService
.
getTask
();
}
@ResponseBody
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ApprovalService.java
View file @
6ece16d6
...
...
@@ -14,11 +14,11 @@ import pwc.taxtech.atms.common.AuthUserHelper;
import
pwc.taxtech.atms.common.util.MyAsserts
;
import
pwc.taxtech.atms.constant.Constant
;
import
pwc.taxtech.atms.dto.approval.ApprovalDto
;
import
pwc.taxtech.atms.dto.approval.ApprovalTask
;
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.dpo.ApprovalTaskInfo
;
import
pwc.taxtech.atms.vat.entity.PeriodApprove
;
import
pwc.taxtech.atms.vat.entity.PeriodApproveExample
;
import
pwc.taxtech.atms.vat.entity.PeriodReport
;
...
...
@@ -26,8 +26,6 @@ import pwc.taxtech.atms.vat.entity.PeriodReportExample;
import
java.util.*
;
import
static
pwc
.
taxtech
.
atms
.
exception
.
Exceptions
.
SERVER_ERROR_EXCEPTION
;
@Service
public
class
ApprovalService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ApprovalService
.
class
);
...
...
@@ -42,6 +40,7 @@ public class ApprovalService {
@Autowired
AuthUserHelper
authUserHelper
;
@Transactional
public
void
startInstanceAndAssignee
(
ApprovalDto
dto
)
{
PeriodApprove
pa
=
new
PeriodApprove
();
...
...
@@ -51,14 +50,10 @@ public class ApprovalService {
}
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
;
public
List
<
ApprovalTaskInfo
>
getTask
()
{
String
userId
=
authUserHelper
.
getCurrentUserId
();
//TODO query user role from sesstion or db
String
assignee
=
(
"66933E7B-DA75-4B2E-B7D6-AB65DCA20D50"
.
equalsIgnoreCase
(
userId
))
?
"manager"
:
"accountant"
;
return
periodApproveMapper
.
queryApprovalList
(
assignee
.
equalsIgnoreCase
(
"manager"
)
?
null
:
userId
);
}
private
void
startInstance
(
ApprovalDto
dto
,
PeriodApprove
pa
)
{
...
...
@@ -95,10 +90,11 @@ public class ApprovalService {
pa
.
setTemplateIds
(
reportTemplateIds
.
toString
());
pa
.
setStatus
(
Constant
.
APPROVAL_COMMITTED
);
pa
.
setProjectId
(
dto
.
getProjectId
());
pa
.
setCreateBy
(
authUserHelper
.
getCurrentUserId
()
==
null
?
"Admin"
:
authUserHelper
.
getCurrentUserId
());
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
(
pa
.
getInstanceId
()).
list
();
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodApproveMapper.java
View file @
6ece16d6
...
...
@@ -3,8 +3,10 @@ package pwc.taxtech.atms.vat.dao;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.session.RowBounds
;
import
pwc.taxtech.atms.MyVatMapper
;
import
pwc.taxtech.atms.vat.dpo.ApprovalTaskInfo
;
import
pwc.taxtech.atms.vat.entity.PeriodApprove
;
import
pwc.taxtech.atms.vat.entity.PeriodApproveExample
;
...
...
@@ -105,4 +107,27 @@ public interface PeriodApproveMapper extends MyVatMapper {
* @mbg.generated
*/
int
updateByPrimaryKey
(
PeriodApprove
record
);
@Select
(
"<script>"
+
"SELECT "
+
" p.NAME AS projectName, "
+
" pa.PERIOD AS period, "
+
" pa.INSTANCE_ID AS instanceId, "
+
" u1.USER_NAME AS createBy, "
+
" u2.USER_NAME AS approvalBy, "
+
" pa.STATUS AS status, "
+
" pa.APPROVAL_RESUALT AS approvalResult, "
+
" pa.CREATE_TIME AS createTime, "
+
" pa.APPROVAL_TIME AS approvalTime, "
+
" pa.REPORT_PATHS AS reportPaths "
+
"FROM "
+
" PERIOD_APPROVE pa "
+
" INNER JOIN PROJECT p ON pa.PROJECT_ID = p.ID "
+
" JOIN \"USER\" u1 ON pa.CREATE_BY = u1.id "
+
" LEFT JOIN \"USER\" u2 ON pa.APPROVAL_BY = u2.id "
+
"<where> 1=1 "
+
" <if test=\"createId != null and createId !='' \">AND pa.CREATE_BY=#{createId}</if>"
+
"</where>"
+
"</script>"
)
List
<
ApprovalTaskInfo
>
queryApprovalList
(
@Param
(
"createId"
)
String
createId
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/vat/dpo/ApprovalTaskInfo.java
0 → 100644
View file @
6ece16d6
package
pwc
.
taxtech
.
atms
.
vat
.
dpo
;
import
java.sql.Date
;
public
class
ApprovalTaskInfo
{
private
String
projectName
;
private
Integer
period
;
private
String
instanceId
;
private
String
createBy
;
private
String
approvalBy
;
private
String
status
;
private
String
approvalResult
;
private
Date
createTime
;
private
Date
approvalTime
;
private
String
reportPaths
;
public
String
getProjectName
()
{
return
projectName
;
}
public
void
setProjectName
(
String
projectName
)
{
this
.
projectName
=
projectName
;
}
public
Integer
getPeriod
()
{
return
period
;
}
public
void
setPeriod
(
Integer
period
)
{
this
.
period
=
period
;
}
public
String
getInstanceId
()
{
return
instanceId
;
}
public
void
setInstanceId
(
String
instanceId
)
{
this
.
instanceId
=
instanceId
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
String
getApprovalBy
()
{
return
approvalBy
;
}
public
void
setApprovalBy
(
String
approvalBy
)
{
this
.
approvalBy
=
approvalBy
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getApprovalResult
()
{
return
approvalResult
;
}
public
void
setApprovalResult
(
String
approvalResult
)
{
this
.
approvalResult
=
approvalResult
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getApprovalTime
()
{
return
approvalTime
;
}
public
void
setApprovalTime
(
Date
approvalTime
)
{
this
.
approvalTime
=
approvalTime
;
}
public
String
getReportPaths
()
{
return
reportPaths
;
}
public
void
setReportPaths
(
String
reportPaths
)
{
this
.
reportPaths
=
reportPaths
;
}
}
atms-web/src/main/webapp/app/framework/app-approve/app-approve.ctrl.js
View file @
6ece16d6
...
...
@@ -659,6 +659,18 @@
orgDisplay
.
main
();
loadApprovalFromDB
();
});
/**
private String projectName;
private Integer period;
private String instanceId;
private String createBy;
private String approvalBy;
private String status;
private String approvalResult;
private Date createTime;
private Date approvalTime;
private String reportPaths;
*/
$scope
.
gridOptions
=
{
rowHeight
:
constant
.
UIGrid
.
rowHeight
,
...
...
@@ -668,14 +680,14 @@
enableColumnMenus
:
false
,
columnDefs
:
[
{
name
:
'序号'
,
width
:
'7%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.index}}<span></div>'
},
{
name
:
'
报表名称'
,
width
:
'12%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.n
ame}}<span></div>'
},
{
name
:
'期间'
,
width
:
'7%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.
kprq | date:"yyyy-MM-dd"
}}<span></div>'
},
{
name
:
'提审人'
,
width
:
'10%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span
title="{{row.entity.fpdm}}">{{row.entity.fpdm
}}</span></div>'
},
{
name
:
'审批人'
,
width
:
'10%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span
title="{{row.entity.fphm}}">{{row.entity.fphm
}}</span></div>'
},
{
name
:
'审批状态'
,
width
:
'10%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span
title="{{row.entity.xfsh}}">{{row.entity.xfsh
}}</span></div>'
},
{
name
:
'审批意见'
,
width
:
'15%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span
title="{{row.entity.fplx}}">{{grid.appScope.typeToString(row.entity.fplx)
}}</span></div>'
},
{
name
:
'创建时间'
,
width
:
'7.5%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span
title="{{row.entity.fplx}}">{{grid.appScope.typeToString(row.entity.fplx)
}}</span></div>'
},
{
name
:
'审批时间'
,
width
:
'7.5%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span
title="{{row.entity.fplx}}">{{grid.appScope.typeToString(row.entity.fplx
)}}</span></div>'
},
{
name
:
'
项目名称'
,
width
:
'12%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.projectN
ame}}<span></div>'
},
{
name
:
'期间'
,
width
:
'7%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.
period
}}<span></div>'
},
{
name
:
'提审人'
,
width
:
'10%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span
>{{row.entity.createBy
}}</span></div>'
},
{
name
:
'审批人'
,
width
:
'10%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span
> {{row.entity.approvalBy
}}</span></div>'
},
{
name
:
'审批状态'
,
width
:
'10%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span
>{{row.entity.status
}}</span></div>'
},
{
name
:
'审批意见'
,
width
:
'15%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span
>{{row.entity.approvalResult
}}</span></div>'
},
{
name
:
'创建时间'
,
width
:
'7.5%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span
>{{row.entity.createTime | date:"yyyy-MM-dd"
}}</span></div>'
},
{
name
:
'审批时间'
,
width
:
'7.5%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span
>{{row.entity.approvalTime | date:"yyyy-MM-dd"
)}}</span></div>'
},
{
name
:
'操作'
,
width
:
'15%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>审批</span>|<span>下载</span>|<span>流程图</span></div>'
}
]
};
...
...
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