重点认证标准/政策合规性项目审查流程开发。
This commit is contained in:
@@ -94,7 +94,7 @@ public class TaskTodoService {
|
||||
*/
|
||||
public boolean whetherExistTaskByTaskDefinitionKey(String prcId, String taskDefinitionKey,String taskId) {
|
||||
boolean result = false;
|
||||
List<Task> taskList = taskService.createTaskQuery().processDefinitionId(prcId).active().list().stream().filter(task-> {
|
||||
List<Task> taskList = taskService.createTaskQuery().processInstanceId(prcId).active().list().stream().filter(task-> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.isNotEmpty(taskId)) {
|
||||
if (!StringUtils.equals(task.getId(),taskId)) {
|
||||
|
||||
@@ -106,6 +106,9 @@ public class TodoTaskController extends BaseAction {
|
||||
@Autowired
|
||||
private IPolicySolicitOpinionEOService policySolicitOpinionEOService;
|
||||
|
||||
@Autowired
|
||||
private IZchgxxmscSybDataEOService zchgxxmscSybDataEOService;
|
||||
|
||||
@ApiOperation(value = "我的待办任务列表")
|
||||
@ApiImplicitParams({@ApiImplicitParam(name = "name", value = "名称"),
|
||||
@ApiImplicitParam(name = "current", value = "当前页"),
|
||||
@@ -411,8 +414,11 @@ public class TodoTaskController extends BaseAction {
|
||||
busProcessEntrust.setTaskId(str);
|
||||
iBusProcessEntrustService.save(busProcessEntrust);
|
||||
|
||||
if (StringUtils.equals(one.getPrcType(), FlowTypeEnum.ZCZQYJLC.getValue()) || StringUtils.equals(one.getPrcType(), FlowTypeEnum.ZCHGXXMSCLC.getValue())) {
|
||||
this.changePolicySolicitOpinionProcessAssignee(assignee, userId, pId, str, one.getPrcType());
|
||||
if (StringUtils.equals(one.getPrcType(), FlowTypeEnum.ZCZQYJLC.getValue())) {
|
||||
this.changeZczqyjFlowAssignee(assignee, userId, pId, str);
|
||||
|
||||
} else if (StringUtils.equals(one.getPrcType(), FlowTypeEnum.ZCHGXXMSCLC.getValue())) {
|
||||
this.changeZchgxxmscFlowAssignee(assignee, userId, pId, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -501,19 +507,18 @@ public class TodoTaskController extends BaseAction {
|
||||
return WrapMapper.ok("改派成功");
|
||||
}
|
||||
/**
|
||||
* @Description: 变更政策征求意见流程任务办理人(责任部门子流程相关)
|
||||
* @Description: 变更流程人员关系
|
||||
* @author: wangzhijiang
|
||||
* @date: 2023-10-18
|
||||
* @Param:
|
||||
* @return:
|
||||
*/
|
||||
private void changePolicySolicitOpinionProcessAssignee(String assignee, String userId, String pId, String str,String flowType) {
|
||||
Task task = this.taskService.createTaskQuery().taskId(str).singleResult();
|
||||
private void changeFlowUserRelInfoAssignee(String assignee, String userId, String pId, String str,String flowType,Task task) {
|
||||
QueryWrapper<FlowUserRelInfo> furQueryWrap = new QueryWrapper<>();
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getActiProcInstId, pId);
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getFlowType,flowType);
|
||||
// 责任人任务处理。
|
||||
if (StringUtils.equals(task.getTaskDefinitionKey(),"PolicySolicitOpinionProcessKey8")) {
|
||||
if (StringUtils.equals(task.getTaskDefinitionKey(),"PolicySolicitOpinionProcessKey8") || StringUtils.equals(task.getTaskDefinitionKey(),"PolicyComplianceProgramReviewProcessKey8")) {
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getDataType,"zrdjrfpzrr");
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getUserId, userId);
|
||||
List<FlowUserRelInfo> furInfoList = this.flowUserRelInfoService.list(furQueryWrap);
|
||||
@@ -523,7 +528,7 @@ public class TodoTaskController extends BaseAction {
|
||||
}
|
||||
}
|
||||
// 责任对接人汇总
|
||||
if (StringUtils.equals(task.getTaskDefinitionKey(),"PolicySolicitOpinionProcessKey9")) {
|
||||
if (StringUtils.equals(task.getTaskDefinitionKey(),"PolicySolicitOpinionProcessKey9") || StringUtils.equals(task.getTaskDefinitionKey(),"PolicyComplianceProgramReviewProcessKey9")) {
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getDataType,"zrdjrfpzrr");
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getParentUserId, userId);
|
||||
List<FlowUserRelInfo> furInfoList = this.flowUserRelInfoService.list(furQueryWrap);
|
||||
@@ -533,7 +538,7 @@ public class TodoTaskController extends BaseAction {
|
||||
}
|
||||
}
|
||||
// 责任单位审批
|
||||
if (StringUtils.equals(task.getTaskDefinitionKey(),"PolicySolicitOpinionProcessKey10")) {
|
||||
if (StringUtils.equals(task.getTaskDefinitionKey(),"PolicySolicitOpinionProcessKey10") || StringUtils.equals(task.getTaskDefinitionKey(),"PolicyComplianceProgramReviewProcessKey10")) {
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getDataType,"zrdjrfpzrdw");
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getUserId, userId);
|
||||
List<FlowUserRelInfo> furInfoList = this.flowUserRelInfoService.list(furQueryWrap);
|
||||
@@ -544,6 +549,50 @@ public class TodoTaskController extends BaseAction {
|
||||
}
|
||||
}
|
||||
|
||||
public void changeZczqyjFlowAssignee(String assignee, String userId, String pId, String str){
|
||||
Task task = this.taskService.createTaskQuery().taskId(str).singleResult();
|
||||
if (StringUtils.equals(task.getTaskDefinitionKey(),"PolicySolicitOpinionProcessKey8")) {
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("taskDefinitionKey",task.getTaskDefinitionKey());
|
||||
params.put("currentUserId",userId);
|
||||
params.put("prcId",task.getProcessInstanceId());
|
||||
List<PolicySolicitOpinionEO> policySolicitOpinionEOList = this.policySolicitOpinionEOService.queryPolicitOpinionEOList(params);
|
||||
if (CollectionUtils.isNotEmpty(policySolicitOpinionEOList)) {
|
||||
policySolicitOpinionEOList.forEach(policySolicitOpinionEO -> {policySolicitOpinionEO.setCreateUserId(assignee);});
|
||||
this.policySolicitOpinionEOService.updateBatchById(policySolicitOpinionEOList);
|
||||
}
|
||||
} else if (StringUtils.equals(task.getTaskDefinitionKey(),"PolicySolicitOpinionProcessKey9")) {
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("taskDefinitionKey","PolicySolicitOpinionProcessKey8");
|
||||
params.put("currentUserId",userId);
|
||||
params.put("prcId",task.getProcessInstanceId());
|
||||
List<PolicySolicitOpinionEO> policySolicitOpinionEOList = this.policySolicitOpinionEOService.queryPolicitOpinionEOList(params);
|
||||
if (CollectionUtils.isNotEmpty(policySolicitOpinionEOList)) {
|
||||
policySolicitOpinionEOList.forEach(policySolicitOpinionEO -> {policySolicitOpinionEO.setCreateUserId(assignee);});
|
||||
this.policySolicitOpinionEOService.updateBatchById(policySolicitOpinionEOList);
|
||||
}
|
||||
}
|
||||
this.changeFlowUserRelInfoAssignee(assignee, userId, pId, str, FlowTypeEnum.ZCZQYJLC.getValue(),task);
|
||||
}
|
||||
|
||||
public void changeZchgxxmscFlowAssignee(String assignee, String userId, String pId, String str){
|
||||
Task task = this.taskService.createTaskQuery().taskId(str).singleResult();
|
||||
|
||||
if (StringUtils.equals(task.getTaskDefinitionKey(),"PolicyComplianceProgramReviewProcessKey8")) {
|
||||
// 如果是责任人任务处理,修改当前责任人被分配的事业部数据
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("taskDefinitionKey",task.getTaskDefinitionKey());
|
||||
params.put("currentUserId",userId);
|
||||
params.put("pId",task.getProcessInstanceId());
|
||||
List<ZchgxxmscSybDataEO> zchgxxmscSybDataEOList = this.zchgxxmscSybDataEOService.queryZchgxxmscSybDataEOList(params);
|
||||
if (CollectionUtils.isNotEmpty(zchgxxmscSybDataEOList)) {
|
||||
zchgxxmscSybDataEOList.forEach(sybDataEO -> {sybDataEO.setZrrUserId(assignee);});
|
||||
this.zchgxxmscSybDataEOService.updateBatchById(zchgxxmscSybDataEOList);
|
||||
}
|
||||
}
|
||||
|
||||
this.changeFlowUserRelInfoAssignee(assignee, userId, pId, str, FlowTypeEnum.ZCHGXXMSCLC.getValue(),task);
|
||||
}
|
||||
@ApiOperation(value = "完成任务", notes = "流程单个节点任务,直接完成任务")
|
||||
@ApiImplicitParams({@ApiImplicitParam(name = "taskId", value = "任务id"),
|
||||
@ApiImplicitParam(name = "userId", value = "完成任务用户Id")})
|
||||
@@ -1930,6 +1979,21 @@ public class TodoTaskController extends BaseAction {
|
||||
if (StringUtils.equals(busProcessName.getPrcType(),FlowTypeEnum.ZCZQYJLC.getValue())) {
|
||||
object.put("prcId",busProcessName.getPrcId());
|
||||
this.policySolicitOpinionEOService.batchInsert(object);
|
||||
} else if (StringUtils.equals(busProcessName.getPrcType(),FlowTypeEnum.ZCHGXXMSCLC.getValue())) {
|
||||
JSONObject jsonForm = object.getJSONObject("form");
|
||||
// departmentType字段: value: undertaking 事业部 productPlanning 产品规划部
|
||||
String departmentType = jsonForm.getString("departmentType");
|
||||
if (StringUtils.equals(departmentType,"undertaking") && jsonForm.containsKey("sybDataList")) {
|
||||
JSONArray sybDataListArr = jsonForm.getJSONArray("sybDataList");
|
||||
List<ZchgxxmscSybDataEO> zchgxxmscSybDataEOList = new ArrayList<>();
|
||||
ZchgxxmscSybDataEO zchgxxmscSybDataEO = null;
|
||||
for (Object sybData : sybDataListArr) {
|
||||
zchgxxmscSybDataEO = JSONObject.parseObject(JSONObject.toJSONString(sybData),ZchgxxmscSybDataEO.class);
|
||||
zchgxxmscSybDataEO.setModifyTime(new Date());
|
||||
zchgxxmscSybDataEOList.add(zchgxxmscSybDataEO);
|
||||
}
|
||||
this.zchgxxmscSybDataEOService.updateBatchById(zchgxxmscSybDataEOList);
|
||||
}
|
||||
}
|
||||
return WrapMapper.ok("保存成功");
|
||||
}
|
||||
@@ -3170,4 +3234,52 @@ public class TodoTaskController extends BaseAction {
|
||||
return "1";
|
||||
}
|
||||
|
||||
/**
|
||||
* 本接口仅提供法规系统调用
|
||||
*/
|
||||
@ApiOperation(value = "查询重点认证标准/政策合规性项目审查任务明细")
|
||||
@GetMapping("/queryZchgxxmscTaskDetail")
|
||||
public BusProcessNew queryZchgxxmscTaskDetail(@RequestParam Map<String,Object> params) {
|
||||
String taskIds = (String) params.get("taskIds");
|
||||
String prcId = (String) params.get("pId");
|
||||
List<String> taskIdList = new ArrayList<>(Arrays.asList(taskIds.split(",")));
|
||||
|
||||
List<BusProcessNew> list = iBusProcessNewService.findNoExecuteBusProcessNewForEnd(taskIdList);
|
||||
if (list.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
BusProcessNew processNew = new BusProcessNew();
|
||||
BeanUtils.copyProperties(list.get(0), processNew);
|
||||
|
||||
if(StringUtils.isNotBlank(prcId)){
|
||||
List<Task> list2 = taskService.createTaskQuery().processInstanceId(prcId).active().list();
|
||||
if(!list2.isEmpty()){
|
||||
processNew.setNowTaskInfo(list2.get(0).getName());
|
||||
}
|
||||
}
|
||||
|
||||
JSONObject object3 = JSONObject.parseObject(list.get(0).getMesg());
|
||||
|
||||
List<ZchgxxmscSybDataEO> zchgxxmscSybDataEOList = this.zchgxxmscSybDataEOService.queryZchgxxmscSybDataEOList(params);
|
||||
if (CollectionUtils.isNotEmpty(zchgxxmscSybDataEOList)) {
|
||||
JSONObject jsonForm = object3.getJSONObject("form");
|
||||
jsonForm.put("sybDataList",zchgxxmscSybDataEOList);
|
||||
}
|
||||
|
||||
// object3.put("cpghbDataList","");
|
||||
processNew.setMesg(object3.toJSONString());
|
||||
QueryWrapper wrapper = new QueryWrapper();
|
||||
wrapper.eq("TODO_ID",processNew.getId());
|
||||
wrapper.eq("EXEC_TYPE",2);
|
||||
wrapper.eq("EXEC_STATUS",0);
|
||||
long count = oaTaskExecService.count(wrapper);
|
||||
processNew.setCommitStatus(count);
|
||||
// 设置processNew表流程状态为已接收
|
||||
LambdaUpdateWrapper<BusProcessNew> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.in(BusProcessNew::getTaskId,taskIdList);
|
||||
updateWrapper.set(BusProcessNew::getReceiveStatus,"已接收");
|
||||
iBusProcessNewService.update(updateWrapper);
|
||||
return processNew;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.ydw.bat.wkflow.business_main.datas.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 重点认证标准/政策合规性项目审查-事业部数据表
|
||||
* @author: wangzhijiang
|
||||
* @date: 2023-10-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("ZCHGXXMSC_SYB_DATA")
|
||||
@ApiModel(value="ZchgxxmscSybData对象", description="")
|
||||
public class ZchgxxmscSybDataEO {
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "ID", type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
// 标准/政策id
|
||||
@TableField("LAW_ID")
|
||||
private String lawId;
|
||||
|
||||
// 流程实例id
|
||||
@TableField("PRC_ID")
|
||||
private String prcId;
|
||||
|
||||
// 责任人用户id
|
||||
@TableField("ZRR_USER_ID")
|
||||
private String zrrUserId;
|
||||
|
||||
// 数据来源
|
||||
@TableField("DATA_SOURCE")
|
||||
private String dataSource;
|
||||
|
||||
// 标准/政策编号
|
||||
@TableField("LAW_CODE")
|
||||
private String lawCode;
|
||||
|
||||
// 标准/政策名称
|
||||
@TableField("LAW_NAME")
|
||||
private String lawName;
|
||||
|
||||
// 产品类型
|
||||
@TableField("PRODUCT_TYPE")
|
||||
private String productType;
|
||||
|
||||
// 实施日期
|
||||
@TableField("IMPL_TIME")
|
||||
private String implTime;
|
||||
|
||||
// 实施要求
|
||||
@TableField("IMPL_REQUIRE")
|
||||
private String implRequire;
|
||||
|
||||
// 资源符合情况
|
||||
@TableField("RESOURCE_ACCORDWITH_CIRCUMSTANCE")
|
||||
private String resourceAccordwithCircumstance;
|
||||
|
||||
// 开发计划
|
||||
@TableField("DEV_PLAN")
|
||||
private String devPlan;
|
||||
|
||||
// sop时间
|
||||
@TableField("SOP_DATE")
|
||||
private String sopDate;
|
||||
|
||||
// 完成情况
|
||||
@TableField("FINISH_CIRCUMSTANCE")
|
||||
private String finishCircumstance;
|
||||
|
||||
// sop时间超过法规时限的空挡期的业务应对方案
|
||||
@TableField("SOP_DATE_SOLUTIONS")
|
||||
private String sopDateSolutions;
|
||||
|
||||
// 提出人/创建人
|
||||
@TableField("CREATE_USER_ID")
|
||||
private String createUserId;
|
||||
|
||||
// 创建时间
|
||||
@TableField("CREATE_TIME")
|
||||
private Date createTime;
|
||||
|
||||
// 更新人
|
||||
@TableField("MODIFY_USER_ID")
|
||||
private String modifyUserId;
|
||||
|
||||
// 更新时间
|
||||
@TableField("MODIFY_TIME")
|
||||
private Date modifyTime;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.ydw.bat.wkflow.business_main.datas.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.ZchgxxmscSybDataEO;
|
||||
|
||||
public interface ZchgxxmscSybDataEOMapper extends BaseMapper<ZchgxxmscSybDataEO> {
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.ydw.bat.wkflow.business_main.datas.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.ZchgxxmscSybDataEO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IZchgxxmscSybDataEOService extends IService<ZchgxxmscSybDataEO> {
|
||||
|
||||
void batchInsert(List<ZchgxxmscSybDataEO> zchgxxmscSybDataEOList);
|
||||
|
||||
List<ZchgxxmscSybDataEO> queryZchgxxmscSybDataEOList(Map<String,Object> params);
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
package com.ydw.bat.wkflow.business_main.datas.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.FlowUserRelInfo;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.ZchgxxmscSybDataEO;
|
||||
import com.ydw.bat.wkflow.business_main.datas.mapper.ZchgxxmscSybDataEOMapper;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IFlowUserRelInfoService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IZchgxxmscSybDataEOService;
|
||||
import com.ydw.bat.wkflow.util.enums.FlowTypeEnum;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class ZchgxxmscSybDataEOServiceImpl extends ServiceImpl<ZchgxxmscSybDataEOMapper, ZchgxxmscSybDataEO> implements IZchgxxmscSybDataEOService {
|
||||
|
||||
@Autowired
|
||||
private IFlowUserRelInfoService flowUserRelInfoService;
|
||||
|
||||
@Override
|
||||
public void batchInsert(List<ZchgxxmscSybDataEO> zchgxxmscSybDataEOList) {
|
||||
if (CollectionUtils.isNotEmpty(zchgxxmscSybDataEOList)) {
|
||||
this.saveBatch(zchgxxmscSybDataEOList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZchgxxmscSybDataEO> queryZchgxxmscSybDataEOList(Map<String, Object> params) {
|
||||
|
||||
List<ZchgxxmscSybDataEO> result = new ArrayList<>();
|
||||
String taskDefinitionKey = (String) params.get("taskDefinitionKey");
|
||||
String currentUserId = (String) params.get("currentUserId");
|
||||
String prcId = (String) params.get("pId");
|
||||
|
||||
QueryWrapper<ZchgxxmscSybDataEO> sybEoQueryWrap = new QueryWrapper<>();
|
||||
sybEoQueryWrap.lambda().eq(ZchgxxmscSybDataEO::getPrcId, prcId);
|
||||
|
||||
if (StringUtils.equals(taskDefinitionKey, "PolicyComplianceProgramReviewProcessKey8")) {
|
||||
// 责任人处理
|
||||
sybEoQueryWrap.lambda().eq(ZchgxxmscSybDataEO::getZrrUserId, currentUserId);
|
||||
} else if (StringUtils.equals(taskDefinitionKey, "PolicyComplianceProgramReviewProcessKey9")) {
|
||||
// 责任对接人汇总
|
||||
// 查询当前责任对接人分配出去的责任人,获取这些责任人填写的征求意见列表
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add(currentUserId);
|
||||
|
||||
QueryWrapper<FlowUserRelInfo> furQueryWrap = new QueryWrapper<>();
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getActiProcInstId, prcId);
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getFlowType, FlowTypeEnum.ZCHGXXMSCLC.getValue());
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getDataType, "zrdjrfpzrr"); // 责任对接人分配责任人
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getParentUserId, currentUserId);
|
||||
List<FlowUserRelInfo> zrdjrFlowUserRelInfoList = this.flowUserRelInfoService.list(furQueryWrap);
|
||||
if (CollectionUtils.isNotEmpty(zrdjrFlowUserRelInfoList)) {
|
||||
userIdList.addAll(zrdjrFlowUserRelInfoList.stream().map(FlowUserRelInfo::getUserId).distinct().collect(Collectors.toList()));
|
||||
}
|
||||
sybEoQueryWrap.lambda().in(ZchgxxmscSybDataEO::getZrrUserId, userIdList);
|
||||
} else if (StringUtils.equals(taskDefinitionKey, "PolicyComplianceProgramReviewProcessKey10")) {
|
||||
// 责任单位审批
|
||||
// 查询当前责任单位被分配出去的责任人对接人,根据责任对接人获取分配出去的责任人,获取这些责任人填写的征求意见列表
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
|
||||
QueryWrapper<FlowUserRelInfo> furQueryWrap = new QueryWrapper<>();
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getActiProcInstId, prcId);
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getFlowType, FlowTypeEnum.ZCHGXXMSCLC.getValue());
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getDataType, "zrdjrfpzrdw"); // 责任对接人分配责任单位审批
|
||||
furQueryWrap.lambda().eq(FlowUserRelInfo::getUserId, currentUserId);
|
||||
List<FlowUserRelInfo> zrdwflowUserRelInfoList = this.flowUserRelInfoService.list(furQueryWrap);
|
||||
if (CollectionUtils.isNotEmpty(zrdwflowUserRelInfoList)) {
|
||||
List<String> zrdjrUserIdList = zrdwflowUserRelInfoList.stream().map(FlowUserRelInfo::getParentUserId).distinct().collect(Collectors.toList());
|
||||
userIdList.addAll(zrdjrUserIdList);
|
||||
|
||||
QueryWrapper<FlowUserRelInfo> zrdjrQueryWrap = new QueryWrapper<>();
|
||||
zrdjrQueryWrap.lambda().eq(FlowUserRelInfo::getActiProcInstId, prcId);
|
||||
zrdjrQueryWrap.lambda().eq(FlowUserRelInfo::getFlowType, FlowTypeEnum.ZCHGXXMSCLC.getValue());
|
||||
zrdjrQueryWrap.lambda().eq(FlowUserRelInfo::getDataType, "zrdjrfpzrr"); // 责任对接人分配责任人
|
||||
zrdjrQueryWrap.lambda().in(FlowUserRelInfo::getParentUserId, zrdjrUserIdList);
|
||||
List<FlowUserRelInfo> zrdjrFlowUserRelInfoList = this.flowUserRelInfoService.list(zrdjrQueryWrap);
|
||||
if (CollectionUtils.isNotEmpty(zrdjrFlowUserRelInfoList)) {
|
||||
userIdList.addAll(zrdjrFlowUserRelInfoList.stream().map(FlowUserRelInfo::getUserId).distinct().collect(Collectors.toList()));
|
||||
}
|
||||
} else {
|
||||
userIdList.add("设置一个无法满足的条件");
|
||||
}
|
||||
sybEoQueryWrap.lambda().in(ZchgxxmscSybDataEO::getZrrUserId, userIdList);
|
||||
}
|
||||
sybEoQueryWrap.orderByAsc("create_time");
|
||||
result = this.list(sybEoQueryWrap);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -44,7 +44,7 @@ public class PolicyComplianceProgramReviewProcess12After implements TaskListener
|
||||
delegateTask.setVariable("sdr2UserIdList", nextUserList);
|
||||
|
||||
boolean existTaskFlag = taskTodoService.whetherExistTaskByTaskDefinitionKey(
|
||||
delegateTask.getProcessDefinitionId(),
|
||||
delegateTask.getProcessInstanceId(),
|
||||
delegateTask.getTaskDefinitionKey(),
|
||||
delegateTask.getId()
|
||||
);
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public class PolicyComplianceProgramReviewProcess13After implements TaskListener
|
||||
int sdr2UserPassCount = (int) delegateTask.getVariable("sdr2UserPassCount");
|
||||
delegateTask.setVariable("sdr2UserPassCount", sdr2UserPassCount + 1);
|
||||
boolean existTaskFlag = taskTodoService.whetherExistTaskByTaskDefinitionKey(
|
||||
delegateTask.getProcessDefinitionId(),
|
||||
delegateTask.getProcessInstanceId(),
|
||||
delegateTask.getTaskDefinitionKey(),
|
||||
delegateTask.getId()
|
||||
);
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ public class PolicyComplianceProgramReviewProcess15After implements TaskListener
|
||||
|
||||
|
||||
boolean existTaskFlag = taskTodoService.whetherExistTaskByTaskDefinitionKey(
|
||||
delegateTask.getProcessDefinitionId(),
|
||||
delegateTask.getProcessInstanceId(),
|
||||
delegateTask.getTaskDefinitionKey(),
|
||||
delegateTask.getId()
|
||||
);
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ public class PolicyComplianceProgramReviewProcess2After implements TaskListener
|
||||
delegateTask.setVariable("shr1UserPassCount", shr1UserPassCount + 1);
|
||||
|
||||
boolean existTaskFlag = taskTodoService.whetherExistTaskByTaskDefinitionKey(
|
||||
delegateTask.getProcessDefinitionId(),
|
||||
delegateTask.getProcessInstanceId(),
|
||||
delegateTask.getTaskDefinitionKey(),
|
||||
delegateTask.getId()
|
||||
);
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public class PolicyComplianceProgramReviewProcess4After implements TaskListener
|
||||
delegateTask.setVariable("sdr1UserPassCount", sdr1UserPassCount + 1);
|
||||
|
||||
boolean existTaskFlag = taskTodoService.whetherExistTaskByTaskDefinitionKey(
|
||||
delegateTask.getProcessDefinitionId(),
|
||||
delegateTask.getProcessInstanceId(),
|
||||
delegateTask.getTaskDefinitionKey(),
|
||||
delegateTask.getId()
|
||||
);
|
||||
|
||||
+26
-3
@@ -1,13 +1,16 @@
|
||||
package com.ydw.bat.wkflow.listener.policyComplianceProgramReviewProcess;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.BusProcessNew;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.Datas;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.FlowUserRelInfo;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.ZchgxxmscSybDataEO;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessNewService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IDatasService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IFlowUserRelInfoService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IZchgxxmscSybDataEOService;
|
||||
import com.ydw.bat.wkflow.util.SpringContextUtil;
|
||||
import com.ydw.bat.wkflow.util.enums.FlowTypeEnum;
|
||||
import org.activiti.engine.delegate.DelegateTask;
|
||||
@@ -15,9 +18,7 @@ import org.activiti.engine.delegate.TaskListener;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
public class PolicyComplianceProgramReviewProcess7After implements TaskListener {
|
||||
@Override
|
||||
@@ -25,6 +26,7 @@ public class PolicyComplianceProgramReviewProcess7After implements TaskListener
|
||||
IDatasService datasService = SpringContextUtil.getBean(IDatasService.class);
|
||||
IBusProcessNewService busBean = SpringContextUtil.getBean(IBusProcessNewService.class);
|
||||
IFlowUserRelInfoService flowUserRelInfoService = SpringContextUtil.getBean(IFlowUserRelInfoService.class);
|
||||
IZchgxxmscSybDataEOService zchgxxmscSybDataEOService = SpringContextUtil.getBean(IZchgxxmscSybDataEOService.class);
|
||||
|
||||
QueryWrapper<Datas> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("ACTI_TASK_ID", delegateTask.getId());
|
||||
@@ -39,6 +41,27 @@ public class PolicyComplianceProgramReviewProcess7After implements TaskListener
|
||||
if (StringUtils.isNotEmpty(zrrUserIds)) {
|
||||
List<String> nextUserList = Arrays.asList(zrrUserIds.split(","));
|
||||
if (CollectionUtils.isNotEmpty(nextUserList)) {
|
||||
// departmentType字段: value: undertaking 事业部 productPlanning 产品规划部
|
||||
String departmentType = jsonForm.getString("departmentType");
|
||||
if (StringUtils.equals(departmentType,"undertaking")) {
|
||||
JSONArray sybDataList = jsonForm.getJSONArray("infoTableDatas");
|
||||
|
||||
List<ZchgxxmscSybDataEO> zchgxxmscSybDataEOList = new ArrayList<>();
|
||||
for (String nextUser : nextUserList) {
|
||||
ZchgxxmscSybDataEO zchgxxmscSybDataEO = null;
|
||||
for (Object sybData : sybDataList) {
|
||||
zchgxxmscSybDataEO = JSONObject.parseObject(JSONObject.toJSONString(sybData),ZchgxxmscSybDataEO.class);
|
||||
zchgxxmscSybDataEO.setId(UUID.randomUUID().toString());
|
||||
zchgxxmscSybDataEO.setZrrUserId(nextUser);
|
||||
zchgxxmscSybDataEO.setPrcId(delegateTask.getProcessInstanceId());
|
||||
zchgxxmscSybDataEO.setCreateTime(new Date());
|
||||
zchgxxmscSybDataEOList.add(zchgxxmscSybDataEO);
|
||||
}
|
||||
}
|
||||
|
||||
zchgxxmscSybDataEOService.batchInsert(zchgxxmscSybDataEOList);
|
||||
}
|
||||
|
||||
List<FlowUserRelInfo> flowUserRelInfoList = new ArrayList<>();
|
||||
|
||||
List<BusProcessNew> addBusProcessNewList = new ArrayList<>();
|
||||
|
||||
+24
-4
@@ -1,18 +1,25 @@
|
||||
package com.ydw.bat.wkflow.listener.policyComplianceProgramReviewProcess;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ydw.bat.wkflow.business_activiti.service.TaskTodoService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.BusProcessNew;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.Datas;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.ZchgxxmscSybDataEO;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessNewService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IDatasService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IPolicySolicitOpinionEOService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IZchgxxmscSybDataEOService;
|
||||
import com.ydw.bat.wkflow.util.SpringContextUtil;
|
||||
import org.activiti.engine.delegate.DelegateTask;
|
||||
import org.activiti.engine.delegate.TaskListener;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class PolicyComplianceProgramReviewProcess8After implements TaskListener {
|
||||
@Override
|
||||
public void notify(DelegateTask delegateTask) {
|
||||
@@ -20,6 +27,7 @@ public class PolicyComplianceProgramReviewProcess8After implements TaskListener
|
||||
IBusProcessNewService busBean = SpringContextUtil.getBean(IBusProcessNewService.class);
|
||||
TaskTodoService taskTodoService = SpringContextUtil.getBean(TaskTodoService.class);
|
||||
IPolicySolicitOpinionEOService policySolicitOpinionEOService = SpringContextUtil.getBean(IPolicySolicitOpinionEOService.class);
|
||||
IZchgxxmscSybDataEOService zchgxxmscSybDataEOService = SpringContextUtil.getBean(IZchgxxmscSybDataEOService.class);
|
||||
|
||||
QueryWrapper<Datas> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("ACTI_TASK_ID", delegateTask.getId());
|
||||
@@ -41,10 +49,22 @@ public class PolicyComplianceProgramReviewProcess8After implements TaskListener
|
||||
busProcessNewNext.setUserId((String) delegateTask.getVariable("djrUserId"));
|
||||
busBean.save(busProcessNewNext);
|
||||
|
||||
// 保存责任人填写的征求意见信息
|
||||
object.put("currentUserId",delegateTask.getAssignee());
|
||||
object.put("prcId",delegateTask.getProcessInstanceId());
|
||||
policySolicitOpinionEOService.batchInsert(object);
|
||||
// 保存责任人填写的数据信息
|
||||
// departmentType字段: value: undertaking 事业部 productPlanning 产品规划部
|
||||
String departmentType = jsonForm.getString("departmentType");
|
||||
if (StringUtils.equals(departmentType,"undertaking") && jsonForm.containsKey("sybDataList")) {
|
||||
JSONArray sybDataListArr = jsonForm.getJSONArray("sybDataList");
|
||||
List<ZchgxxmscSybDataEO> zchgxxmscSybDataEOList = new ArrayList<>();
|
||||
ZchgxxmscSybDataEO zchgxxmscSybDataEO = null;
|
||||
for (Object sybData : sybDataListArr) {
|
||||
zchgxxmscSybDataEO = JSONObject.parseObject(JSONObject.toJSONString(sybData),ZchgxxmscSybDataEO.class);
|
||||
zchgxxmscSybDataEO.setModifyTime(new Date());
|
||||
zchgxxmscSybDataEOList.add(zchgxxmscSybDataEO);
|
||||
}
|
||||
zchgxxmscSybDataEOService.updateBatchById(zchgxxmscSybDataEOList);
|
||||
} else if (StringUtils.equals(departmentType,"productPlanning")) {
|
||||
|
||||
}
|
||||
|
||||
submitMethod = "pageSubmit";
|
||||
} else {
|
||||
|
||||
+21
-9
@@ -1,14 +1,13 @@
|
||||
package com.ydw.bat.wkflow.listener.policyComplianceProgramReviewProcess;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.BusProcessNew;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.Datas;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.FlowUserRelInfo;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessNewService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IDatasService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IFlowUserRelInfoService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IPolicySolicitOpinionEOService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.ZchgxxmscSybDataEO;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.*;
|
||||
import com.ydw.bat.wkflow.util.SpringContextUtil;
|
||||
import com.ydw.bat.wkflow.util.enums.ApprovalFlagEnum;
|
||||
import com.ydw.bat.wkflow.util.enums.FlowTypeEnum;
|
||||
@@ -17,6 +16,7 @@ import org.activiti.engine.delegate.TaskListener;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class PolicyComplianceProgramReviewProcess9After implements TaskListener {
|
||||
@@ -25,7 +25,7 @@ public class PolicyComplianceProgramReviewProcess9After implements TaskListener
|
||||
IDatasService datasService = SpringContextUtil.getBean(IDatasService.class);
|
||||
IBusProcessNewService busBean = SpringContextUtil.getBean(IBusProcessNewService.class);
|
||||
IFlowUserRelInfoService flowUserRelInfoService = SpringContextUtil.getBean(IFlowUserRelInfoService.class);
|
||||
// IPolicySolicitOpinionEOService policySolicitOpinionEOService = SpringContextUtil.getBean(IPolicySolicitOpinionEOService.class);
|
||||
IZchgxxmscSybDataEOService zchgxxmscSybDataEOService = SpringContextUtil.getBean(IZchgxxmscSybDataEOService.class);
|
||||
|
||||
QueryWrapper<Datas> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("ACTI_TASK_ID", delegateTask.getId());
|
||||
@@ -105,10 +105,22 @@ public class PolicyComplianceProgramReviewProcess9After implements TaskListener
|
||||
submitMethod = "timerAutoSubmit";
|
||||
}
|
||||
|
||||
// // 保存责任人填写的征求意见信息
|
||||
// object.put("currentUserId",delegateTask.getAssignee());
|
||||
// object.put("prcId",delegateTask.getProcessInstanceId());
|
||||
// policySolicitOpinionEOService.batchInsert(object);
|
||||
// 保存责任人对接人修改的数据信息
|
||||
// departmentType字段: value: undertaking 事业部 productPlanning 产品规划部
|
||||
String departmentType = jsonForm.getString("departmentType");
|
||||
if (StringUtils.equals(departmentType,"undertaking") && jsonForm.containsKey("sybDataList")) {
|
||||
JSONArray sybDataListArr = jsonForm.getJSONArray("sybDataList");
|
||||
List<ZchgxxmscSybDataEO> zchgxxmscSybDataEOList = new ArrayList<>();
|
||||
ZchgxxmscSybDataEO zchgxxmscSybDataEO = null;
|
||||
for (Object sybData : sybDataListArr) {
|
||||
zchgxxmscSybDataEO = JSONObject.parseObject(JSONObject.toJSONString(sybData),ZchgxxmscSybDataEO.class);
|
||||
zchgxxmscSybDataEO.setModifyTime(new Date());
|
||||
zchgxxmscSybDataEOList.add(zchgxxmscSybDataEO);
|
||||
}
|
||||
zchgxxmscSybDataEOService.updateBatchById(zchgxxmscSybDataEOList);
|
||||
} else if (StringUtils.equals(departmentType,"productPlanning")) {
|
||||
|
||||
}
|
||||
|
||||
// 存储当前节点意见
|
||||
BusProcessNew busProcessNew = new BusProcessNew();
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ public class PolicySolicitOpinionProcess12After implements TaskListener {
|
||||
delegateTask.setVariable("hqrUserIdList", nextUserList);
|
||||
|
||||
boolean existTaskFlag = taskTodoService.whetherExistTaskByTaskDefinitionKey(
|
||||
delegateTask.getProcessDefinitionId(),
|
||||
delegateTask.getProcessInstanceId(),
|
||||
delegateTask.getTaskDefinitionKey(),
|
||||
delegateTask.getId()
|
||||
);
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public class PolicySolicitOpinionProcess13After implements TaskListener {
|
||||
int hqrUserPassCount = (int) delegateTask.getVariable("hqrUserPassCount");
|
||||
delegateTask.setVariable("hqrUserPassCount", hqrUserPassCount + 1);
|
||||
boolean existTaskFlag = taskTodoService.whetherExistTaskByTaskDefinitionKey(
|
||||
delegateTask.getProcessDefinitionId(),
|
||||
delegateTask.getProcessInstanceId(),
|
||||
delegateTask.getTaskDefinitionKey(),
|
||||
delegateTask.getId()
|
||||
);
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public class PolicySolicitOpinionProcess14After implements TaskListener {
|
||||
int sdr2UserPassCount = (int) delegateTask.getVariable("sdr2UserPassCount");
|
||||
delegateTask.setVariable("sdr2UserPassCount", sdr2UserPassCount + 1);
|
||||
boolean existTaskFlag = taskTodoService.whetherExistTaskByTaskDefinitionKey(
|
||||
delegateTask.getProcessDefinitionId(),
|
||||
delegateTask.getProcessInstanceId(),
|
||||
delegateTask.getTaskDefinitionKey(),
|
||||
delegateTask.getId()
|
||||
);
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ public class PolicySolicitOpinionProcess16After implements TaskListener {
|
||||
|
||||
|
||||
boolean existTaskFlag = taskTodoService.whetherExistTaskByTaskDefinitionKey(
|
||||
delegateTask.getProcessDefinitionId(),
|
||||
delegateTask.getProcessInstanceId(),
|
||||
delegateTask.getTaskDefinitionKey(),
|
||||
delegateTask.getId()
|
||||
);
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ public class PolicySolicitOpinionProcess2After implements TaskListener {
|
||||
delegateTask.setVariable("shr1UserPassCount", shr1UserPassCount + 1);
|
||||
|
||||
boolean existTaskFlag = taskTodoService.whetherExistTaskByTaskDefinitionKey(
|
||||
delegateTask.getProcessDefinitionId(),
|
||||
delegateTask.getProcessInstanceId(),
|
||||
delegateTask.getTaskDefinitionKey(),
|
||||
delegateTask.getId()
|
||||
);
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ public class PolicySolicitOpinionProcess4After implements TaskListener {
|
||||
delegateTask.setVariable("sdr1UserPassCount", sdr1UserPassCount + 1);
|
||||
|
||||
boolean existTaskFlag = taskTodoService.whetherExistTaskByTaskDefinitionKey(
|
||||
delegateTask.getProcessDefinitionId(),
|
||||
delegateTask.getProcessInstanceId(),
|
||||
delegateTask.getTaskDefinitionKey(),
|
||||
delegateTask.getId()
|
||||
);
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ydw.bat.wkflow.business_main.datas.mapper.ZchgxxmscSybDataEOMapper">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user