审核记录接口修改

This commit is contained in:
liang.chao 2025-02-19 17:00:59 +08:00
parent 38f695539e
commit 3f96f1da8e
7 changed files with 34 additions and 55 deletions

View File

@ -28,4 +28,5 @@ public class ConfigurationVo {
* 审核状态
*/
private String type;
private Integer auditStatus;
}

View File

@ -496,4 +496,6 @@ public interface BusinessMapper {
* @param taskId
*/
void deleteCheckRemark(String taskId);
List<CheckComment> checkHistory(RequestEntity entity);
}

View File

@ -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<CheckComment> checkHistory(RequestEntity entity);
}

View File

@ -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<CheckComment> 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);

View File

@ -1002,9 +1002,9 @@ public class FlowTaskUtils extends FlowServiceFactory {
return AjaxResult.success("历史信息查询成功", allList);
}
public AjaxResult checkHistory(RequestEntity entity) {
List<CheckComment> checkComments = businessService.checkHistory(entity);
return AjaxResult.success("历史信息查询成功", checkComments);
}
}

View File

@ -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})
<!-- AND repeated_submit =(-->
<!-- SELECT-->
<!-- max( repeated_submit )-->
<!-- 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 g.user_id as userId,h.* from (-->
<!-- SELECT user_id from nxdt_ii.pt_check_person where task_id = #{taskId}-->
<!-- ) g LEFT JOIN (-->
<!-- select-->
<!-- a.id as ii,-->
<!-- a.user_id AS userId,-->
<!-- IFNULL( b.`comment`, '' ) AS reason,-->
<!-- IFNULL( b.reject, '' ) AS turnDownReason,-->
<!-- IFNULL( b.create_time, '' ) AS time,-->
<!-- IFNULL( e.`name`, '' ) AS `name`,-->
<!-- ELECT max(id) as id,user_id FROM nxdt_ii.pt_check_comment where task_id = #{taskId}-->
<!-- GROUP BY user_id-->
<!-- )a LEFT JOIN (-->
<!-- SELECT * from nxdt_ii.pt_check_comment where task_id = #{taskId}-->
<!-- )b on a.id = b.id-->
<!-- 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 a.id = e.userId-->
<!-- LEFT JOIN nxdt_ii.sys_dept f ON e.deptId = f.dept_id-->
<!-- ) h on g.user_id = h.userId-->
<!-- IFNULL( f.dept_name, '' ) AS section-->
<!-- from (-->
<!-- SELECT max(id) as id,user_id FROM nxdt_ii.pt_check_comment where task_id = #{taskId}-->
<!-- GROUP BY user_id-->
<!-- )a LEFT JOIN (-->
<!-- SELECT * from nxdt_ii.pt_check_comment where task_id = #{taskId}-->
<!-- )b on a.id = b.id-->
<!-- 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 a.id = e.userId-->
<!-- LEFT JOIN nxdt_ii.sys_dept f ON e.deptId = f.dept_id-->
<!-- ) h on g.user_id = h.userId-->
</select>
<select id="getRestartChechMessage" resultType="com.bonus.flowable.entity.ConfigurationVo">
@ -709,9 +670,11 @@
</update>
<select id="approvalHistoryUser" resultType="com.bonus.flowable.entity.ConfigurationVo">
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}
</select>
@ -852,5 +815,8 @@
where task_id=#{taskId} and type=#{type}
and user_id=#{userId}
</select>
<select id="checkHistory" resultType="com.bonus.flowable.entity.CheckComment">
</select>
</mapper>