Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
f23b1ba8
Commit
f23b1ba8
authored
Sep 26, 2021
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:修改工作流更新计划状态
parent
2209124d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
21 deletions
+42
-21
PlanStatusEnum.java
...yeejoin/amos/supervision/common/enums/PlanStatusEnum.java
+18
-7
PlanAuditController.java
.../supervision/business/controller/PlanAuditController.java
+2
-1
PlanAuditServiceImpl.java
...pervision/business/service/impl/PlanAuditServiceImpl.java
+21
-12
IPlanAuditService.java
...supervision/business/service/intfc/IPlanAuditService.java
+1
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/common/enums/PlanStatusEnum.java
View file @
f23b1ba8
...
@@ -7,12 +7,12 @@ import java.util.Map;
...
@@ -7,12 +7,12 @@ import java.util.Map;
public
enum
PlanStatusEnum
{
public
enum
PlanStatusEnum
{
DRAFT
(
"草稿"
,
0
),
DRAFT
(
"草稿"
,
0
,
1
),
EXAMINE_ONE
(
"一级待审核"
,
1
),
EXAMINE_ONE
(
"一级待审核"
,
1
,
2
),
EXAMINE_TWO
(
"二级待审核"
,
2
),
EXAMINE_TWO
(
"二级待审核"
,
2
,
3
),
EXAMINE_THREE
(
"三级待审核"
,
3
),
EXAMINE_THREE
(
"三级待审核"
,
3
,
4
),
EXAMINE_FORMULATE
(
"已审核/检查内容未制定"
,
4
),
EXAMINE_FORMULATE
(
"已审核/检查内容未制定"
,
4
,
5
),
EXAMINE_DEVELOPED
(
"检查内容已制定/未执行"
,
5
);
EXAMINE_DEVELOPED
(
"检查内容已制定/未执行"
,
5
,
5
);
/**
/**
* 名称
* 名称
...
@@ -24,9 +24,12 @@ public enum PlanStatusEnum {
...
@@ -24,9 +24,12 @@ public enum PlanStatusEnum {
*/
*/
private
int
value
;
private
int
value
;
private
PlanStatusEnum
(
String
name
,
int
value
)
{
private
int
nextStatus
;
private
PlanStatusEnum
(
String
name
,
int
value
,
int
nextStatus
)
{
this
.
name
=
name
;
this
.
name
=
name
;
this
.
value
=
value
;
this
.
value
=
value
;
this
.
nextStatus
=
nextStatus
;
}
}
...
@@ -105,4 +108,12 @@ public enum PlanStatusEnum {
...
@@ -105,4 +108,12 @@ public enum PlanStatusEnum {
public
void
setValue
(
int
value
)
{
public
void
setValue
(
int
value
)
{
this
.
value
=
value
;
this
.
value
=
value
;
}
}
public
int
getNextStatus
()
{
return
nextStatus
;
}
public
void
setNextStatus
(
int
nextStatus
)
{
this
.
nextStatus
=
nextStatus
;
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/PlanAuditController.java
View file @
f23b1ba8
...
@@ -32,10 +32,11 @@ public class PlanAuditController extends AbstractBaseController {
...
@@ -32,10 +32,11 @@ public class PlanAuditController extends AbstractBaseController {
@RequestMapping
(
value
=
"/auditWorkFlow"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/auditWorkFlow"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
auditWorkFlow
(
public
CommonResponse
auditWorkFlow
(
@ApiParam
(
value
=
"工作流流水实例"
,
required
=
true
)
@RequestBody
PlanAuditLog
planAuditLog
,
@ApiParam
(
value
=
"工作流流水实例"
,
required
=
true
)
@RequestBody
PlanAuditLog
planAuditLog
,
@ApiParam
(
value
=
"工作流流水实例"
,
required
=
true
)
@RequestBody
Integer
status
,
@ApiParam
(
value
=
"执行控制条件"
,
required
=
true
)
@RequestParam
String
condition
)
{
@ApiParam
(
value
=
"执行控制条件"
,
required
=
true
)
@RequestParam
String
condition
)
{
try
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
CommonResponseUtil
.
success
(
planAuditService
.
auditWorkFlow
(
planAuditLog
,
condition
,
reginParams
));
return
CommonResponseUtil
.
success
(
planAuditService
.
auditWorkFlow
(
planAuditLog
,
status
,
condition
,
reginParams
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"计划工作流审核失败!"
);
return
CommonResponseUtil
.
failure
(
"计划工作流审核失败!"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanAuditServiceImpl.java
View file @
f23b1ba8
...
@@ -5,7 +5,9 @@ import com.yeejoin.amos.boot.biz.common.service.IWorkflowExcuteService;
...
@@ -5,7 +5,9 @@ import com.yeejoin.amos.boot.biz.common.service.IWorkflowExcuteService;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanAuditDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanAuditDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanAuditLogDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanAuditLogDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanDao
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPlanAuditService
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPlanAuditService
;
import
com.yeejoin.amos.supervision.common.enums.PlanStatusEnum
;
import
com.yeejoin.amos.supervision.dao.entity.PlanAudit
;
import
com.yeejoin.amos.supervision.dao.entity.PlanAudit
;
import
com.yeejoin.amos.supervision.dao.entity.PlanAuditLog
;
import
com.yeejoin.amos.supervision.dao.entity.PlanAuditLog
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
@@ -30,9 +32,12 @@ public class PlanAuditServiceImpl implements IPlanAuditService {
...
@@ -30,9 +32,12 @@ public class PlanAuditServiceImpl implements IPlanAuditService {
@Autowired
@Autowired
private
WorkflowFeignService
workflowFeignService
;
private
WorkflowFeignService
workflowFeignService
;
@Autowired
private
IPlanDao
planDao
;
@Override
@Override
@Transactional
@Transactional
public
Boolean
auditWorkFlow
(
PlanAuditLog
planAuditLog
,
String
condition
,
ReginParams
reginParams
)
{
public
Boolean
auditWorkFlow
(
PlanAuditLog
planAuditLog
,
Integer
status
,
String
condition
,
ReginParams
reginParams
)
{
PlanAudit
planAudit
=
planAuditDao
.
findByPlanId
(
planAuditLog
.
getPlanId
());
PlanAudit
planAudit
=
planAuditDao
.
findByPlanId
(
planAuditLog
.
getPlanId
());
if
(
ObjectUtils
.
isNotEmpty
(
planAudit
))
{
if
(
ObjectUtils
.
isNotEmpty
(
planAudit
))
{
String
instanceId
=
planAudit
.
getProcessInstanceId
();
String
instanceId
=
planAudit
.
getProcessInstanceId
();
...
@@ -42,19 +47,23 @@ public class PlanAuditServiceImpl implements IPlanAuditService {
...
@@ -42,19 +47,23 @@ public class PlanAuditServiceImpl implements IPlanAuditService {
String
name
=
taskAuthMap
.
get
(
"name"
)
==
null
?
null
:
taskAuthMap
.
get
(
"name"
).
toString
();
String
name
=
taskAuthMap
.
get
(
"name"
)
==
null
?
null
:
taskAuthMap
.
get
(
"name"
).
toString
();
String
roleName
=
reginParams
.
getRole
().
getRoleName
();
String
roleName
=
reginParams
.
getRole
().
getRoleName
();
boolean
b
=
workflowExcuteService
.
CompleteTask
(
instanceId
,
condition
,
reginParams
);
boolean
b
=
workflowExcuteService
.
CompleteTask
(
instanceId
,
condition
,
reginParams
);
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
workflowExcuteService
.
setTaskAssign
(
instanceId
,
personIdentity
.
getPersonSeq
());
if
(
b
)
{
if
(
b
)
{
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
PlanStatusEnum
statusEnum
=
PlanStatusEnum
.
getEnum
(
status
);
workflowExcuteService
.
setTaskAssign
(
instanceId
,
personIdentity
.
getPersonSeq
());
planDao
.
updatePlanStatus
(
statusEnum
.
getNextStatus
(),
planAuditLog
.
getPlanAuditId
());
planAuditLog
.
setPlanId
(
planAudit
.
getPlanId
());
}
else
{
planAuditLog
.
setPlanAuditId
(
planAudit
.
getId
());
planDao
.
updatePlanStatus
(
PlanStatusEnum
.
DRAFT
.
getValue
(),
planAuditLog
.
getPlanAuditId
());
planAuditLog
.
setExcuteUserId
(
personIdentity
.
getPersonSeq
());
planAuditLog
.
setExcuteUserName
(
personIdentity
.
getPersonName
());
planAuditLog
.
setFlowTaskId
(
taskId
);
planAuditLog
.
setFlowTaskName
(
name
);
planAuditLog
.
setFlowJson
(
condition
);
planAuditLog
.
setRoleName
(
roleName
);
planAuditLogDao
.
save
(
planAuditLog
);
}
}
planAuditLog
.
setPlanId
(
planAudit
.
getPlanId
());
planAuditLog
.
setPlanAuditId
(
planAudit
.
getId
());
planAuditLog
.
setExcuteUserId
(
personIdentity
.
getPersonSeq
());
planAuditLog
.
setExcuteUserName
(
personIdentity
.
getPersonName
());
planAuditLog
.
setFlowTaskId
(
taskId
);
planAuditLog
.
setFlowTaskName
(
name
);
planAuditLog
.
setFlowJson
(
condition
);
planAuditLog
.
setRoleName
(
roleName
);
planAuditLogDao
.
save
(
planAuditLog
);
return
b
;
return
b
;
}
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/IPlanAuditService.java
View file @
f23b1ba8
...
@@ -4,5 +4,5 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
...
@@ -4,5 +4,5 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.supervision.dao.entity.PlanAuditLog
;
import
com.yeejoin.amos.supervision.dao.entity.PlanAuditLog
;
public
interface
IPlanAuditService
{
public
interface
IPlanAuditService
{
Boolean
auditWorkFlow
(
PlanAuditLog
planAuditLog
,
String
condition
,
ReginParams
reginParams
);
Boolean
auditWorkFlow
(
PlanAuditLog
planAuditLog
,
Integer
status
,
String
condition
,
ReginParams
reginParams
);
}
}
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