修改审核流程节点数据
This commit is contained in:
parent
5ea3afbdef
commit
a50c859b53
|
|
@ -70,4 +70,24 @@ public class RequestEntity implements Serializable {
|
||||||
private String taskType;
|
private String taskType;
|
||||||
private String reasonForWithdrawal;
|
private String reasonForWithdrawal;
|
||||||
private String checkType = "1";
|
private String checkType = "1";
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
/**
|
||||||
|
* 版本
|
||||||
|
*/
|
||||||
|
private String vision;
|
||||||
|
/**
|
||||||
|
* 审核类型
|
||||||
|
*/
|
||||||
|
private String examType;
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
private String sort;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.flowable.mapper;
|
package com.bonus.flowable.mapper;
|
||||||
|
|
||||||
import com.bonus.common.core.domain.BaseBean;
|
import com.bonus.common.core.domain.BaseBean;
|
||||||
|
import com.bonus.common.core.domain.RequestEntity;
|
||||||
import com.bonus.common.safetycheck.NewHiddenDangerDto;
|
import com.bonus.common.safetycheck.NewHiddenDangerDto;
|
||||||
import com.bonus.common.safetycheck.SecurityCheckDto;
|
import com.bonus.common.safetycheck.SecurityCheckDto;
|
||||||
import com.bonus.flowable.entity.*;
|
import com.bonus.flowable.entity.*;
|
||||||
|
|
@ -461,4 +462,31 @@ public interface BusinessMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<String> getUserPhone(@Param("list") List<String> userList);
|
List<String> getUserPhone(@Param("list") List<String> userList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询监理人员id
|
||||||
|
* @param supUuid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<String> getJlUserList(@Param("uuid") String supUuid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入人员审核信息表
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
void addCheckPersonRemark(RequestEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询信息
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RequestEntity> getRequestData(RequestEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询是否审核的数据
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer getAuditRemark(RequestEntity params);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -454,13 +454,17 @@ public class BusinessServiceImpl implements BusinessService {
|
||||||
if (StringUtils.isNotEmpty(auditTask.getSubUuid())) {
|
if (StringUtils.isNotEmpty(auditTask.getSubUuid())) {
|
||||||
auditTask.setSubUuid(auditTask.getSubUuid());
|
auditTask.setSubUuid(auditTask.getSubUuid());
|
||||||
}
|
}
|
||||||
|
List<String> userList=new ArrayList<>();
|
||||||
if (StringUtils.isNotEmpty(auditTask.getSupUuid())) {
|
if (StringUtils.isNotEmpty(auditTask.getSupUuid())) {
|
||||||
auditTask.setSupUuid(auditTask.getSupUuid());
|
auditTask.setSupUuid(auditTask.getSupUuid());
|
||||||
|
List<String> jlList=mapper.getJlUserList(auditTask.getSupUuid());
|
||||||
|
if(jlList!=null && !jlList.isEmpty()){
|
||||||
|
userList.addAll(jlList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
auditTask.setExamineId(newExamineId);
|
auditTask.setExamineId(newExamineId);
|
||||||
auditTask.setExamineType(examineType);
|
auditTask.setExamineType(examineType);
|
||||||
addCheckPerson(auditTask,null);
|
addCheckPerson(auditTask,userList);
|
||||||
return startFlowAble(auditTask, finalList, userId, taskId, ProcessConstants.OWNER, newFinalJudgment
|
return startFlowAble(auditTask, finalList, userId, taskId, ProcessConstants.OWNER, newFinalJudgment
|
||||||
, newExamineId, newSort, newProcessKey, iaAdd,"1",version);
|
, newExamineId, newSort, newProcessKey, iaAdd,"1",version);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import com.bonus.flowable.flow.FlowableUtils;
|
||||||
import com.bonus.flowable.mapper.BusinessMapper;
|
import com.bonus.flowable.mapper.BusinessMapper;
|
||||||
import com.bonus.flowable.service.BusinessService;
|
import com.bonus.flowable.service.BusinessService;
|
||||||
import com.bonus.flowable.service.FlowTaskService;
|
import com.bonus.flowable.service.FlowTaskService;
|
||||||
|
import liquibase.pro.packaged.S;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.flowable.bpmn.model.Process;
|
import org.flowable.bpmn.model.Process;
|
||||||
|
|
@ -547,6 +548,8 @@ public class FlowTaskUtils extends FlowServiceFactory {
|
||||||
if (variables == null) {
|
if (variables == null) {
|
||||||
variables = new HashMap<>();
|
variables = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
// Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||||
Task task = taskService.createTaskQuery()
|
Task task = taskService.createTaskQuery()
|
||||||
.processInstanceId(procInsId)
|
.processInstanceId(procInsId)
|
||||||
|
|
@ -631,12 +634,60 @@ public class FlowTaskUtils extends FlowServiceFactory {
|
||||||
} else {
|
} else {
|
||||||
businessService.addComment(taskId, procInsId, userId, opinions, agree, reject);
|
businessService.addComment(taskId, procInsId, userId, opinions, agree, reject);
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
RequestEntity params=new RequestEntity();
|
||||||
|
params.setTaskId(entity.getTaskId());
|
||||||
|
params.setType("1");
|
||||||
|
params.setUserId(entity.getUserId());
|
||||||
|
List<RequestEntity> queryList=mapper.getRequestData(params);
|
||||||
|
RequestEntity query=queryList.get(0);
|
||||||
|
//审核状态
|
||||||
|
query.setAgree(entity.getAgree());
|
||||||
|
//审核意见
|
||||||
|
query.setRejectReason(entity.getRejectReason());
|
||||||
|
//审核人的审核信息查询
|
||||||
|
mapper.addCheckPersonRemark(query);
|
||||||
|
//审核流程节点
|
||||||
|
params.setType("2");
|
||||||
|
params.setUserId(","+entity.getUserId()+",");
|
||||||
|
params.setVision(query.getVision());
|
||||||
|
List<RequestEntity> queryList2=mapper.getRequestData(params);
|
||||||
|
RequestEntity query2=queryList2.get(0);
|
||||||
|
if("1".equals(agree)){
|
||||||
|
String auditUser=query2.getUserId();
|
||||||
|
List<String> userList=Arrays.asList(auditUser.split(","));
|
||||||
|
//多人审核 并且不是 或签的
|
||||||
|
if(userList.size()>1 && !"2".equals(query2.getExamType()) ){
|
||||||
|
boolean isNext=true;
|
||||||
|
for (String otherId:userList){
|
||||||
|
if(!otherId.equals(entity.getUserId())){
|
||||||
|
query.setType("1");
|
||||||
|
query.setUserId(otherId);
|
||||||
|
Integer num=mapper.getAuditRemark(query);
|
||||||
|
if(num==null || num==0){
|
||||||
|
isNext=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(isNext){
|
||||||
|
query2.setAgree(entity.getAgree());
|
||||||
|
query2.setRejectReason(entity.getRejectReason());
|
||||||
|
mapper.addCheckPersonRemark(query2);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
query2.setAgree(entity.getAgree());
|
||||||
|
query2.setRejectReason(entity.getRejectReason());
|
||||||
|
mapper.addCheckPersonRemark(query2);
|
||||||
|
}
|
||||||
|
//不通过直接记录不通过即可
|
||||||
|
}else if("2".equals(agree) || "3".equals(agree)){
|
||||||
|
query2.setAgree(entity.getAgree());
|
||||||
|
query2.setRejectReason(entity.getRejectReason());
|
||||||
|
mapper.addCheckPersonRemark(query2);
|
||||||
|
}
|
||||||
// }
|
// }
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提前修改审核状态
|
* 提前修改审核状态
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -399,6 +399,13 @@
|
||||||
insert into nxdt_ii.pt_check_comment(task_id, proc_inst_id, user_id, comment, agree, reject)
|
insert into nxdt_ii.pt_check_comment(task_id, proc_inst_id, user_id, comment, agree, reject)
|
||||||
values (#{taskId}, #{processInstanceId}, #{userId}, #{comment}, #{agree}, #{rejectReason})
|
values (#{taskId}, #{processInstanceId}, #{userId}, #{comment}, #{agree}, #{rejectReason})
|
||||||
</insert>
|
</insert>
|
||||||
|
<!--审核数据-->
|
||||||
|
<insert id="addCheckPersonRemark">
|
||||||
|
replace into nxdt_ii.pt_check_person_remark(
|
||||||
|
task_id, user_id,type,version,audit_status,remark,audit_time
|
||||||
|
)values (#{taskId},#{userId},#{type},#{vision},#{agree},#{rejectReason},now())
|
||||||
|
|
||||||
|
</insert>
|
||||||
|
|
||||||
<select id="getCommentListByProcessInstanceId" resultType="com.bonus.flowable.entity.CheckComment">
|
<select id="getCommentListByProcessInstanceId" resultType="com.bonus.flowable.entity.CheckComment">
|
||||||
|
|
||||||
|
|
@ -816,5 +823,31 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getJlUserList" resultType="java.lang.String">
|
||||||
|
select comm_user_id
|
||||||
|
from nxdt_ii.pt_sup_info
|
||||||
|
where uuid=#{uuid}
|
||||||
|
</select>
|
||||||
|
<select id="getRequestData" resultType="com.bonus.common.core.domain.RequestEntity">
|
||||||
|
select task_id taskId,user_id userId,exam_type examType,type type,version vision,sort sort
|
||||||
|
from nxdt_ii.pt_check_person
|
||||||
|
where task_id=#{taskId} and type=#{type}
|
||||||
|
<if test="userId!=null and userId!=''">
|
||||||
|
<if test='type=="1"'>
|
||||||
|
AND user_id=#{userId}
|
||||||
|
</if>
|
||||||
|
<if test='type=="2"'>
|
||||||
|
AND concat(',',user_id,',') like concat('%',#{userId},'%')
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
order by sort asc
|
||||||
|
</select>
|
||||||
|
<select id="getAuditRemark" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from nxdt_ii.pt_check_person_remark
|
||||||
|
where task_id=#{taskId} and type=#{type}
|
||||||
|
and user_id=#{userId}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ public class ImportServiceImpl implements ImportService {
|
||||||
}
|
}
|
||||||
result = AjaxResult.success("导入成功");
|
result = AjaxResult.success("导入成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.error(e.toString(),e);
|
||||||
throw new RuntimeException("导入失败:" + e);
|
throw new RuntimeException("导入失败:" + e);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue