diff --git a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/entity/ConfigurationVo.java b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/entity/ConfigurationVo.java index 48eca40..3db2c25 100644 --- a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/entity/ConfigurationVo.java +++ b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/entity/ConfigurationVo.java @@ -28,4 +28,5 @@ public class ConfigurationVo { * 审核状态 */ private String type; + private Integer auditStatus; } diff --git a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/listener/StageEndListener.java b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/listener/StageEndListener.java index 96cdce3..26d4db7 100644 --- a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/listener/StageEndListener.java +++ b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/listener/StageEndListener.java @@ -182,7 +182,7 @@ public class StageEndListener implements ExecutionListener, ApplicationContextAw * @param businessService 业务服务 */ private void updateCheckStatus(String checkType, String id, String statusType, BusinessService businessService) { - if (checkType != null) { + if (checkType != null) { switch (checkType) { case "1": //修改监理入场信息 diff --git a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/mapper/BusinessMapper.java b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/mapper/BusinessMapper.java index 491beb8..dfbc4c8 100644 --- a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/mapper/BusinessMapper.java +++ b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/mapper/BusinessMapper.java @@ -496,4 +496,6 @@ public interface BusinessMapper { * @param taskId */ void deleteCheckRemark(String taskId); + + List checkHistory(RequestEntity entity); } diff --git a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/service/BusinessService.java b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/service/BusinessService.java index cd805b1..23217f2 100644 --- a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/service/BusinessService.java +++ b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/service/BusinessService.java @@ -1,6 +1,7 @@ package com.bonus.flowable.service; import com.bonus.common.core.domain.BaseBean; +import com.bonus.common.core.domain.RequestEntity; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.flowable.entity.AuditTask; import com.bonus.flowable.entity.CheckComment; @@ -201,4 +202,6 @@ public interface BusinessService { * @param statusType 状态 */ void updateExtensionApplicationByUuid(String uuid,String statusType,String rejectReason); + + List checkHistory(RequestEntity entity); } diff --git a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/service/impl/BusinessServiceImpl.java b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/service/impl/BusinessServiceImpl.java index 444a674..801a29c 100644 --- a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/service/impl/BusinessServiceImpl.java +++ b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/service/impl/BusinessServiceImpl.java @@ -3,6 +3,7 @@ package com.bonus.flowable.service.impl; import cn.hutool.core.collection.ListUtil; import com.bonus.common.core.domain.BaseBean; import com.bonus.common.core.domain.MsgBean; +import com.bonus.common.core.domain.RequestEntity; import com.bonus.common.core.utils.StaticVariableUtils; import com.bonus.common.core.utils.StringUtils; import com.bonus.common.core.web.domain.AjaxResult; @@ -840,6 +841,7 @@ public class BusinessServiceImpl implements BusinessService { } else { ConfigurationVo newBean = new ConfigurationVo(); newBean.setId(bean.getId()); + newBean.setAuditStatus(bean.getAuditStatus()); newBean.setExamineId(bean.getExamineId()); newBean.setTaskId(bean.getTaskId()); newBean.setNodeName(bean.getNodeName()); @@ -946,6 +948,11 @@ public class BusinessServiceImpl implements BusinessService { mapper.updateExtensionApplicationByUuid(uuid, statusType,rejectReason); } + @Override + public List checkHistory(RequestEntity entity) { + return mapper.checkHistory(entity); + } + @Override public void addComment(@Param("uuid") String taskId, @Param("uuid") String processInstanceId, @Param("uuid") String userId, @Param("uuid") String comment, @Param("agree") String agree, @Param("rejectReason") String rejectReason) { mapper.addComment(taskId, processInstanceId, userId, comment, agree, rejectReason); diff --git a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/utils/FlowTaskUtils.java b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/utils/FlowTaskUtils.java index 9f4ef9a..e5b9c04 100644 --- a/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/utils/FlowTaskUtils.java +++ b/bonus-modules/bonus-flowable/src/main/java/com/bonus/flowable/utils/FlowTaskUtils.java @@ -1002,9 +1002,9 @@ public class FlowTaskUtils extends FlowServiceFactory { return AjaxResult.success("历史信息查询成功", allList); } - - - - + public AjaxResult checkHistory(RequestEntity entity) { + List checkComments = businessService.checkHistory(entity); + return AjaxResult.success("历史信息查询成功", checkComments); + } } diff --git a/bonus-modules/bonus-flowable/src/main/resources/mapper/BusinessMapper.xml b/bonus-modules/bonus-flowable/src/main/resources/mapper/BusinessMapper.xml index 0f7ecea..c41947c 100644 --- a/bonus-modules/bonus-flowable/src/main/resources/mapper/BusinessMapper.xml +++ b/bonus-modules/bonus-flowable/src/main/resources/mapper/BusinessMapper.xml @@ -518,22 +518,24 @@ c.ii as id, c.id AS userId, d.agree, + case when c.audit_status = '1' then '审核通过' + when c.audit_status = '2' then '审核驳回' + when c.audit_status = '3' then '终审通过' + else '待审核' end as status, IFNULL( d.`comment`, '' ) AS reason, IFNULL( d.reject, '' ) AS turnDownReason, IFNULL( d.time, '' ) AS time, IFNULL( c.examType, '' ) AS examType, IFNULL( e.`name`, '' ) AS `name`, - case when d.agree = '1' then '审核通过' - when d.agree = '2' then '审核驳回' - when d.agree = '3' then '终审通过' - when d.agree = '4' then '已撤回' - else '' end as status, IFNULL( f.dept_name, '' ) AS section, IFNULL( c.sort, '' ) AS sort, #{taskId} as taskId FROM ( - select id as ii,user_id as id,exam_type as examType,sort from nxdt_ii.pt_check_person where task_id = #{taskId} and type = '1' + select pcp.id as ii,pcp.user_id as id,pcp.exam_type as examType,pcp.sort,pcpr.audit_status + from nxdt_ii.pt_check_person pcp + left join nxdt_ii.pt_check_person_remark pcpr on pcp.task_id = pcpr.task_id and pcp.user_id = pcpr.user_id and pcp.version = pcpr.version + where pcp.task_id = #{taskId} and pcp.type = '1' ) c LEFT JOIN ( SELECT @@ -558,14 +560,6 @@ nxdt_ii.pt_check_task_details WHERE task_id = #{taskId} and version = (select max(version) from nxdt_ii.pt_check_task_details where task_id = #{taskId}) - - - - - - - - ) a LEFT JOIN nxdt_ii.pt_check_comment b ON a.proc_inst_id = b.proc_inst_id ) d ON c.id = d.user_id @@ -573,39 +567,6 @@ IS NOT NULL LEFT JOIN ( SELECT user_name AS userName, nick_name AS NAME, user_id AS userId, dept_id AS deptId FROM nxdt_ii.sys_user WHERE user_type = '00' or user_type='01' or user_type='02') e ON c.id = e.userId LEFT JOIN nxdt_ii.sys_dept f ON e.deptId = f.dept_id ORDER BY c.ii - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select id ,task_id as taskId,user_id as userId,exam_type as examineType - from nxdt_ii.pt_check_person - where type= '2' and task_id = #{taskId} + select distinct a.id ,a.task_id as taskId,a.user_id as userId,a.exam_type as examineType, + b.audit_status as auditStatus + from nxdt_ii.pt_check_person a + left join nxdt_ii.pt_check_person_remark b on a.task_id = b.task_id and a.user_id = b.user_id and a.version = b.version + where a.type= '2' and a.task_id = #{taskId} @@ -852,5 +815,8 @@ where task_id=#{taskId} and type=#{type} and user_id=#{userId} +