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
eb0b686f
Commit
eb0b686f
authored
Sep 26, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.审核记录日志
parent
626a82d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
17 deletions
+46
-17
PlanAuditController.java
.../supervision/business/controller/PlanAuditController.java
+12
-10
IPlanAuditLogDao.java
...supervision/business/dao/repository/IPlanAuditLogDao.java
+11
-1
PlanAuditServiceImpl.java
...pervision/business/service/impl/PlanAuditServiceImpl.java
+14
-6
IPlanAuditService.java
...supervision/business/service/intfc/IPlanAuditService.java
+9
-0
No files found.
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 @
eb0b686f
...
...
@@ -2,8 +2,6 @@ package com.yeejoin.amos.supervision.business.controller;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPlanAuditService
;
import
com.yeejoin.amos.supervision.business.util.CommonResponse
;
import
com.yeejoin.amos.supervision.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.supervision.core.framework.PersonIdentify
;
import
com.yeejoin.amos.supervision.dao.entity.PlanAuditLog
;
import
io.swagger.annotations.Api
;
...
...
@@ -15,6 +13,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
@RestController
@RequestMapping
(
value
=
"/api/planAudit"
)
...
...
@@ -30,17 +30,19 @@ public class PlanAuditController extends AbstractBaseController {
@PersonIdentify
@ApiOperation
(
value
=
"计划工作流审核"
,
notes
=
"计划工作流审核"
)
@RequestMapping
(
value
=
"/auditWorkFlow"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
auditWorkFlow
(
public
ResponseModel
auditWorkFlow
(
@ApiParam
(
value
=
"工作流流水实例"
,
required
=
true
)
@RequestBody
PlanAuditLog
planAuditLog
,
@ApiParam
(
value
=
"工作流流水实例"
,
required
=
true
)
@RequestBody
Integer
status
,
@ApiParam
(
value
=
"执行控制条件"
,
required
=
true
)
@RequestParam
String
condition
)
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
CommonResponseUtil
.
success
(
planAuditService
.
auditWorkFlow
(
planAuditLog
,
status
,
condition
,
reginParams
));
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"计划工作流审核失败!"
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
ResponseHelper
.
buildResponse
(
planAuditService
.
auditWorkFlow
(
planAuditLog
,
status
,
condition
,
reginParams
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"指定计划的执行日志"
)
@GetMapping
(
value
=
"/{planId}/timeLine"
)
public
ResponseModel
timeLineLog
(
@PathVariable
Long
planId
)
{
return
ResponseHelper
.
buildResponse
(
planAuditService
.
listByPlanId
(
planId
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/repository/IPlanAuditLogDao.java
View file @
eb0b686f
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
dao
.
repository
;
import
com.yeejoin.amos.supervision.dao.entity.PlanAuditLog
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
(
"planAuditLogDao"
)
public
interface
IPlanAuditLogDao
extends
BaseDao
<
PlanAuditLog
,
Long
>
{
/**
* 指定计划的审核日志
* @param planId 计划id
* @param sort 排序条件
* @return List<PlanAuditLog>
*/
List
<
PlanAuditLog
>
findAllByPlanId
(
Long
planId
,
Sort
sort
);
}
\ No newline at end of file
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 @
eb0b686f
...
...
@@ -2,7 +2,6 @@ package com.yeejoin.amos.supervision.business.service.impl;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.service.IWorkflowExcuteService
;
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.IPlanAuditLogDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanDao
;
...
...
@@ -12,9 +11,12 @@ import com.yeejoin.amos.supervision.dao.entity.PlanAudit;
import
com.yeejoin.amos.supervision.dao.entity.PlanAuditLog
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
@Service
(
"planAuditService"
)
...
...
@@ -30,9 +32,6 @@ public class PlanAuditServiceImpl implements IPlanAuditService {
private
IPlanAuditLogDao
planAuditLogDao
;
@Autowired
private
WorkflowFeignService
workflowFeignService
;
@Autowired
private
IPlanDao
planDao
;
@Override
...
...
@@ -51,9 +50,9 @@ public class PlanAuditServiceImpl implements IPlanAuditService {
workflowExcuteService
.
setTaskAssign
(
instanceId
,
personIdentity
.
getPersonSeq
());
if
(
b
)
{
PlanStatusEnum
statusEnum
=
PlanStatusEnum
.
getEnum
(
status
);
planDao
.
updatePlanStatus
(
statusEnum
.
getNextStatus
(),
planAuditLog
.
getPlanAudit
Id
());
planDao
.
updatePlanStatus
(
statusEnum
!=
null
?
statusEnum
.
getNextStatus
()
:
PlanStatusEnum
.
DRAFT
.
getValue
(),
planAuditLog
.
getPlan
Id
());
}
else
{
planDao
.
updatePlanStatus
(
PlanStatusEnum
.
DRAFT
.
getValue
(),
planAuditLog
.
getPlan
Audit
Id
());
planDao
.
updatePlanStatus
(
PlanStatusEnum
.
DRAFT
.
getValue
(),
planAuditLog
.
getPlanId
());
}
planAuditLog
.
setPlanId
(
planAudit
.
getPlanId
());
planAuditLog
.
setPlanAuditId
(
planAudit
.
getId
());
...
...
@@ -70,6 +69,15 @@ public class PlanAuditServiceImpl implements IPlanAuditService {
return
Boolean
.
FALSE
;
}
@Override
public
List
<
PlanAuditLog
>
listByPlanId
(
Long
planId
)
{
Sort
.
Order
idOrder
=
new
Sort
.
Order
(
Sort
.
Direction
.
ASC
,
"createDate"
);
List
<
Sort
.
Order
>
orders
=
new
ArrayList
<
Sort
.
Order
>();
orders
.
add
(
idOrder
);
Sort
sort
=
Sort
.
by
(
orders
);
return
planAuditLogDao
.
findAllByPlanId
(
planId
,
sort
);
}
// @Override
// @Transactional
// public Boolean auditWorkFlow(PlanAuditLog planAuditLog, String condition, ReginParams reginParams) {
...
...
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 @
eb0b686f
...
...
@@ -3,6 +3,15 @@ package com.yeejoin.amos.supervision.business.service.intfc;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.supervision.dao.entity.PlanAuditLog
;
import
java.util.List
;
public
interface
IPlanAuditService
{
Boolean
auditWorkFlow
(
PlanAuditLog
planAuditLog
,
Integer
status
,
String
condition
,
ReginParams
reginParams
);
/**
* 查询指定计划的审批日志
* @param planId 计划id
* @return List<PlanAuditLog>
*/
List
<
PlanAuditLog
>
listByPlanId
(
Long
planId
);
}
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