重点认证标准/政策合规性项目审查流程开发、对接。
This commit is contained in:
@@ -109,6 +109,9 @@ public class TodoTaskController extends BaseAction {
|
||||
@Autowired
|
||||
private IZchgxxmscSybDataEOService zchgxxmscSybDataEOService;
|
||||
|
||||
@Autowired
|
||||
private IZchgxxmscCpghbDataEOService zchgxxmscCpghbDataEOService;
|
||||
|
||||
@ApiOperation(value = "我的待办任务列表")
|
||||
@ApiImplicitParams({@ApiImplicitParam(name = "name", value = "名称"),
|
||||
@ApiImplicitParam(name = "current", value = "当前页"),
|
||||
@@ -589,6 +592,23 @@ public class TodoTaskController extends BaseAction {
|
||||
zchgxxmscSybDataEOList.forEach(sybDataEO -> {sybDataEO.setZrrUserId(assignee);});
|
||||
this.zchgxxmscSybDataEOService.updateBatchById(zchgxxmscSybDataEOList);
|
||||
}
|
||||
|
||||
List<ZchgxxmscCpghbDataEO> zchgxxmscCpghbDataEOList = this.zchgxxmscCpghbDataEOService.queryZchgxxmscCpghbDataEOList(params);
|
||||
if (CollectionUtils.isNotEmpty(zchgxxmscCpghbDataEOList)) {
|
||||
zchgxxmscCpghbDataEOList.forEach(cpghbDataEO -> {cpghbDataEO.setZrrUserId(assignee);});
|
||||
this.zchgxxmscCpghbDataEOService.updateBatchById(zchgxxmscCpghbDataEOList);
|
||||
}
|
||||
} else if (StringUtils.equals(task.getTaskDefinitionKey(),"PolicyComplianceProgramReviewProcessKey9")){
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("taskDefinitionKey","PolicyComplianceProgramReviewProcessKey8");
|
||||
params.put("currentUserId",userId);
|
||||
params.put("pId",task.getProcessInstanceId());
|
||||
|
||||
List<ZchgxxmscCpghbDataEO> zchgxxmscCpghbDataEOList = this.zchgxxmscCpghbDataEOService.queryZchgxxmscCpghbDataEOList(params);
|
||||
if (CollectionUtils.isNotEmpty(zchgxxmscCpghbDataEOList)) {
|
||||
zchgxxmscCpghbDataEOList.forEach(cpghbDataEO -> {cpghbDataEO.setZrrUserId(assignee);});
|
||||
this.zchgxxmscCpghbDataEOService.updateBatchById(zchgxxmscCpghbDataEOList);
|
||||
}
|
||||
}
|
||||
|
||||
this.changeFlowUserRelInfoAssignee(assignee, userId, pId, str, FlowTypeEnum.ZCHGXXMSCLC.getValue(),task);
|
||||
@@ -1993,6 +2013,11 @@ public class TodoTaskController extends BaseAction {
|
||||
zchgxxmscSybDataEOList.add(zchgxxmscSybDataEO);
|
||||
}
|
||||
this.zchgxxmscSybDataEOService.updateBatchById(zchgxxmscSybDataEOList);
|
||||
} else if (StringUtils.equals(departmentType,"productPlanning") && jsonForm.containsKey("cpghbDataList")) {
|
||||
// 保存产品规划部的责任人填写的信息
|
||||
object.put("currentUserId",one.getUserId());
|
||||
object.put("prcId",busProcessName.getPrcId());
|
||||
this.zchgxxmscCpghbDataEOService.batchInsert(object);
|
||||
}
|
||||
}
|
||||
return WrapMapper.ok("保存成功");
|
||||
@@ -3266,7 +3291,12 @@ public class TodoTaskController extends BaseAction {
|
||||
jsonForm.put("sybDataList",zchgxxmscSybDataEOList);
|
||||
}
|
||||
|
||||
// object3.put("cpghbDataList","");
|
||||
List<ZchgxxmscCpghbDataEO> zchgxxmscCpghbDataEOList = this.zchgxxmscCpghbDataEOService.queryZchgxxmscCpghbDataEOList(params);
|
||||
if (CollectionUtils.isNotEmpty(zchgxxmscCpghbDataEOList)) {
|
||||
JSONObject jsonForm = object3.getJSONObject("form");
|
||||
jsonForm.put("cpghbDataList",zchgxxmscCpghbDataEOList);
|
||||
}
|
||||
|
||||
processNew.setMesg(object3.toJSONString());
|
||||
QueryWrapper wrapper = new QueryWrapper();
|
||||
wrapper.eq("TODO_ID",processNew.getId());
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* @Description: 重点认证标准/政策合规性项目审查-产品规划部数据明细表
|
||||
* @author: wangzhijiang
|
||||
* @date: 2023-10-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("ZCHGXXMSC_CPGHB_DATA_DETAIL")
|
||||
@ApiModel(value="ZchgxxmscCpghbDataDetail对象", description="")
|
||||
public class ZchgxxmscCpghbDataDetailEO {
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "ID", type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
// 流程实例id
|
||||
@TableField("PRC_ID")
|
||||
private String prcId;
|
||||
|
||||
// 产品规划部数据id
|
||||
@TableField("ZCHGXXMSC_CPGHB_DATA_ID")
|
||||
private String zchgxxmscCpghbDataId;
|
||||
|
||||
// 标准/政策id
|
||||
@TableField("LAW_ID")
|
||||
private String lawId;
|
||||
|
||||
// 输入值
|
||||
@TableField("INPUT_VALUE")
|
||||
private String inputValue;
|
||||
}
|
||||
+185
@@ -0,0 +1,185 @@
|
||||
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 重点认证标准/政策合规性项目审查-产品规划部数据表
|
||||
* @author: wangzhijiang
|
||||
* @date: 2023-10-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("ZCHGXXMSC_CPGHB_DATA")
|
||||
@ApiModel(value="ZchgxxmscCpghbData对象", description="")
|
||||
public class ZchgxxmscCpghbDataEO {
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "ID", type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
// 流程实例id
|
||||
@TableField("PRC_ID")
|
||||
private String prcId;
|
||||
|
||||
// 责任人用户id
|
||||
@TableField("ZRR_USER_ID")
|
||||
private String zrrUserId;
|
||||
|
||||
// 业务
|
||||
@TableField("BUSINESS")
|
||||
private String business;
|
||||
|
||||
// 平台
|
||||
@TableField("PLATFORM")
|
||||
private String platform;
|
||||
|
||||
// 项目
|
||||
@TableField("PROJECT")
|
||||
private String project;
|
||||
|
||||
// 项目描述
|
||||
@TableField("PROJECT_DESCRIPTION")
|
||||
private String projectDescription;
|
||||
|
||||
// 当前节点
|
||||
@TableField("CURRENT_NODE")
|
||||
private String currentNode;
|
||||
|
||||
// G0
|
||||
@TableField("G_ZERO_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gZeroDate;
|
||||
|
||||
// G1
|
||||
@TableField("G_ONE_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gOneDate;
|
||||
|
||||
// G2
|
||||
@TableField("G_TWO_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gTwoDate;
|
||||
|
||||
// G3
|
||||
@TableField("G_THREE_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gThreeDate;
|
||||
|
||||
// G4
|
||||
@TableField("G_FOUR_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gFourDate;
|
||||
|
||||
// G5
|
||||
@TableField("G_FIVE_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gFiveDate;
|
||||
|
||||
// G6
|
||||
@TableField("G_SIX_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gSixDate;
|
||||
|
||||
// G7
|
||||
@TableField("G_SEVEN_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gSevenDate;
|
||||
|
||||
// G8
|
||||
@TableField("G_EIGHT_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gEightDate;
|
||||
|
||||
// G9
|
||||
@TableField("G_NINE_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gNineDate;
|
||||
|
||||
// G10
|
||||
@TableField("G_TEN_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gTenDate;
|
||||
|
||||
// G11
|
||||
@TableField("G_ELEVEN_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gElevenDate;
|
||||
|
||||
// G12
|
||||
@TableField("G_TWELVE_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gTwelveDate;
|
||||
|
||||
// G13
|
||||
@TableField("G_THIRTEEN_DATE")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date gThirteenDate;
|
||||
|
||||
// 提出人/创建人
|
||||
@TableField("CREATE_USER_ID")
|
||||
private String createUserId;
|
||||
|
||||
// 标准填写信息
|
||||
@TableField("INFO_TABLE_DATA")
|
||||
private String infoTableData;
|
||||
|
||||
// 概念状态
|
||||
@TableField("CONCEPTUAL_STATE")
|
||||
private String conceptualState;
|
||||
|
||||
// 概念计划下发时间
|
||||
@TableField("CONCEPT_PLAN_RELEASE_TIME")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date conceptPlanReleaseTime;
|
||||
|
||||
// 概念修订计划
|
||||
@TableField("CONCEPT_REVISION_PLAN")
|
||||
private String conceptRevisionPlan;
|
||||
|
||||
// 其它说明
|
||||
@TableField("ADDITIONAL_NOTES")
|
||||
private String additionalNotes;
|
||||
|
||||
// 创建时间
|
||||
@TableField("CREATE_TIME")
|
||||
private Date createTime;
|
||||
|
||||
// 更新人
|
||||
@TableField("MODIFY_USER_ID")
|
||||
private String modifyUserId;
|
||||
|
||||
// 更新时间
|
||||
@TableField("MODIFY_TIME")
|
||||
private Date modifyTime;
|
||||
|
||||
// @TableField(exist = false)
|
||||
// private List<ZchgxxmscCpghbDataDetailEO> zchgxxmscCpghbDataDetailEOList;
|
||||
}
|
||||
+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.ZchgxxmscCpghbDataDetailEO;
|
||||
|
||||
public interface ZchgxxmscCpghbDataDetailEOMapper extends BaseMapper<ZchgxxmscCpghbDataDetailEO> {
|
||||
}
|
||||
+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.ZchgxxmscCpghbDataEO;
|
||||
|
||||
public interface ZchgxxmscCpghbDataEOMapper extends BaseMapper<ZchgxxmscCpghbDataEO> {
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
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.ZchgxxmscCpghbDataDetailEO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IZchgxxmscCpghbDataDetailEOService extends IService<ZchgxxmscCpghbDataDetailEO> {
|
||||
|
||||
void batchInsert(List<ZchgxxmscCpghbDataDetailEO> zchgxxmscCpghbDataDetailEOList);
|
||||
|
||||
List<ZchgxxmscCpghbDataDetailEO> queryZchgxxmscCpghbDataDetailEOList(List<String> zchgxxmscCpghbDataIdList);
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.ydw.bat.wkflow.business_main.datas.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.ZchgxxmscCpghbDataEO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IZchgxxmscCpghbDataEOService extends IService<ZchgxxmscCpghbDataEO> {
|
||||
|
||||
void batchInsert(JSONObject json);
|
||||
|
||||
List<ZchgxxmscCpghbDataEO> queryZchgxxmscCpghbDataEOList(Map<String,Object> params);
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
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.ZchgxxmscCpghbDataDetailEO;
|
||||
import com.ydw.bat.wkflow.business_main.datas.mapper.ZchgxxmscCpghbDataDetailEOMapper;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IZchgxxmscCpghbDataDetailEOService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class ZchgxxmscCpghbDataDetailEOServiceImpl extends ServiceImpl<ZchgxxmscCpghbDataDetailEOMapper, ZchgxxmscCpghbDataDetailEO> implements IZchgxxmscCpghbDataDetailEOService {
|
||||
|
||||
@Override
|
||||
public void batchInsert(List<ZchgxxmscCpghbDataDetailEO> zchgxxmscCpghbDataDetailEOList) {
|
||||
if (CollectionUtils.isNotEmpty(zchgxxmscCpghbDataDetailEOList)) {
|
||||
this.saveBatch(zchgxxmscCpghbDataDetailEOList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZchgxxmscCpghbDataDetailEO> queryZchgxxmscCpghbDataDetailEOList(List<String> zchgxxmscCpghbDataIdList) {
|
||||
List<ZchgxxmscCpghbDataDetailEO> result = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(zchgxxmscCpghbDataIdList)) {
|
||||
zchgxxmscCpghbDataIdList = zchgxxmscCpghbDataIdList.stream().distinct().collect(Collectors.toList());
|
||||
QueryWrapper<ZchgxxmscCpghbDataDetailEO> cpghbDataDetailQueryWrap = new QueryWrapper<>();
|
||||
cpghbDataDetailQueryWrap.lambda().in(ZchgxxmscCpghbDataDetailEO::getZchgxxmscCpghbDataId,zchgxxmscCpghbDataIdList);
|
||||
result = this.list(cpghbDataDetailQueryWrap);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
package com.ydw.bat.wkflow.business_main.datas.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
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.ZchgxxmscCpghbDataEO;
|
||||
import com.ydw.bat.wkflow.business_main.datas.mapper.ZchgxxmscCpghbDataEOMapper;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IFlowUserRelInfoService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IZchgxxmscCpghbDataDetailEOService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IZchgxxmscCpghbDataEOService;
|
||||
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 ZchgxxmscCpghbDataEOServiceImpl extends ServiceImpl<ZchgxxmscCpghbDataEOMapper, ZchgxxmscCpghbDataEO> implements IZchgxxmscCpghbDataEOService {
|
||||
|
||||
@Autowired
|
||||
private IFlowUserRelInfoService flowUserRelInfoService;
|
||||
@Autowired
|
||||
private IZchgxxmscCpghbDataDetailEOService zchgxxmscCpghbDataDetailEOService;
|
||||
|
||||
@Override
|
||||
public void batchInsert(JSONObject json) {
|
||||
String currentUserId = json.getString("currentUserId");
|
||||
String prcId = json.getString("prcId");
|
||||
String removeIds = json.getString("removeIds");
|
||||
|
||||
JSONObject jsonForm = json.getJSONObject("form");
|
||||
if (StringUtils.isNotEmpty(removeIds)) {
|
||||
List<String> removeIdList = Arrays.asList(removeIds.split(","));
|
||||
this.removeByIds(removeIdList);
|
||||
}
|
||||
JSONArray cpghbDataListArr = jsonForm.getJSONArray("cpghbDataList");
|
||||
List<ZchgxxmscCpghbDataEO> addZchgxxmscCpghbDataEOList = new ArrayList<>();
|
||||
List<ZchgxxmscCpghbDataEO> updateZchgxxmscCpghbDataEOList = new ArrayList<>();
|
||||
ZchgxxmscCpghbDataEO zchgxxmscCpghbDataEO = null;
|
||||
|
||||
for (Object cpghbData : cpghbDataListArr) {
|
||||
zchgxxmscCpghbDataEO = JSONObject.parseObject(JSONObject.toJSONString(cpghbData), ZchgxxmscCpghbDataEO.class);
|
||||
|
||||
zchgxxmscCpghbDataEO.setPrcId(prcId);
|
||||
if (StringUtils.isEmpty(zchgxxmscCpghbDataEO.getId())) {
|
||||
zchgxxmscCpghbDataEO.setId(UUID.randomUUID().toString());
|
||||
zchgxxmscCpghbDataEO.setZrrUserId(currentUserId);
|
||||
zchgxxmscCpghbDataEO.setCreateUserId(currentUserId);
|
||||
zchgxxmscCpghbDataEO.setCreateTime(new Date());
|
||||
addZchgxxmscCpghbDataEOList.add(zchgxxmscCpghbDataEO);
|
||||
} else {
|
||||
zchgxxmscCpghbDataEO.setModifyUserId(currentUserId);
|
||||
zchgxxmscCpghbDataEO.setModifyTime(new Date());
|
||||
updateZchgxxmscCpghbDataEOList.add(zchgxxmscCpghbDataEO);
|
||||
}
|
||||
}
|
||||
|
||||
if (CollectionUtils.isNotEmpty(addZchgxxmscCpghbDataEOList)) {
|
||||
this.saveBatch(addZchgxxmscCpghbDataEOList);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(updateZchgxxmscCpghbDataEOList)) {
|
||||
this.updateBatchById(updateZchgxxmscCpghbDataEOList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZchgxxmscCpghbDataEO> queryZchgxxmscCpghbDataEOList(Map<String, Object> params) {
|
||||
|
||||
List<ZchgxxmscCpghbDataEO> result = new ArrayList<>();
|
||||
String taskDefinitionKey = (String) params.get("taskDefinitionKey");
|
||||
String currentUserId = (String) params.get("currentUserId");
|
||||
String prcId = (String) params.get("pId");
|
||||
|
||||
QueryWrapper<ZchgxxmscCpghbDataEO> cpghbEoQueryWrap = new QueryWrapper<>();
|
||||
cpghbEoQueryWrap.lambda().eq(ZchgxxmscCpghbDataEO::getPrcId, prcId);
|
||||
|
||||
if (StringUtils.equals(taskDefinitionKey, "PolicyComplianceProgramReviewProcessKey8")) {
|
||||
// 责任人处理
|
||||
cpghbEoQueryWrap.lambda().eq(ZchgxxmscCpghbDataEO::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()));
|
||||
}
|
||||
cpghbEoQueryWrap.lambda().in(ZchgxxmscCpghbDataEO::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("设置一个无法满足的条件");
|
||||
}
|
||||
cpghbEoQueryWrap.lambda().in(ZchgxxmscCpghbDataEO::getZrrUserId, userIdList);
|
||||
}
|
||||
cpghbEoQueryWrap.orderByAsc("create_time");
|
||||
result = this.list(cpghbEoQueryWrap);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -45,7 +45,7 @@ public class ZchgxxmscSybDataEOServiceImpl extends ServiceImpl<ZchgxxmscSybDataE
|
||||
sybEoQueryWrap.lambda().eq(ZchgxxmscSybDataEO::getZrrUserId, currentUserId);
|
||||
} else if (StringUtils.equals(taskDefinitionKey, "PolicyComplianceProgramReviewProcessKey9")) {
|
||||
// 责任对接人汇总
|
||||
// 查询当前责任对接人分配出去的责任人,获取这些责任人填写的征求意见列表
|
||||
// 查询当前责任对接人分配出去的责任人,获取这些责任人填写的数据列表
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
userIdList.add(currentUserId);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ZchgxxmscSybDataEOServiceImpl extends ServiceImpl<ZchgxxmscSybDataE
|
||||
sybEoQueryWrap.lambda().in(ZchgxxmscSybDataEO::getZrrUserId, userIdList);
|
||||
} else if (StringUtils.equals(taskDefinitionKey, "PolicyComplianceProgramReviewProcessKey10")) {
|
||||
// 责任单位审批
|
||||
// 查询当前责任单位被分配出去的责任人对接人,根据责任对接人获取分配出去的责任人,获取这些责任人填写的征求意见列表
|
||||
// 查询当前责任单位被分配出去的责任人对接人,根据责任对接人获取分配出去的责任人,获取这些责任人填写的数据列表
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
|
||||
QueryWrapper<FlowUserRelInfo> furQueryWrap = new QueryWrapper<>();
|
||||
|
||||
+6
-7
@@ -7,10 +7,7 @@ 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.business_main.datas.service.*;
|
||||
import com.ydw.bat.wkflow.util.SpringContextUtil;
|
||||
import org.activiti.engine.delegate.DelegateTask;
|
||||
import org.activiti.engine.delegate.TaskListener;
|
||||
@@ -25,9 +22,8 @@ public class PolicyComplianceProgramReviewProcess8After implements TaskListener
|
||||
public void notify(DelegateTask delegateTask) {
|
||||
IDatasService datasService = SpringContextUtil.getBean(IDatasService.class);
|
||||
IBusProcessNewService busBean = SpringContextUtil.getBean(IBusProcessNewService.class);
|
||||
TaskTodoService taskTodoService = SpringContextUtil.getBean(TaskTodoService.class);
|
||||
IPolicySolicitOpinionEOService policySolicitOpinionEOService = SpringContextUtil.getBean(IPolicySolicitOpinionEOService.class);
|
||||
IZchgxxmscSybDataEOService zchgxxmscSybDataEOService = SpringContextUtil.getBean(IZchgxxmscSybDataEOService.class);
|
||||
IZchgxxmscCpghbDataEOService zchgxxmscCpghbDataEOService = SpringContextUtil.getBean(IZchgxxmscCpghbDataEOService.class);
|
||||
|
||||
QueryWrapper<Datas> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("ACTI_TASK_ID", delegateTask.getId());
|
||||
@@ -63,7 +59,10 @@ public class PolicyComplianceProgramReviewProcess8After implements TaskListener
|
||||
}
|
||||
zchgxxmscSybDataEOService.updateBatchById(zchgxxmscSybDataEOList);
|
||||
} else if (StringUtils.equals(departmentType,"productPlanning")) {
|
||||
|
||||
// 保存产品规划部的责任人填写的信息
|
||||
object.put("currentUserId",delegateTask.getAssignee());
|
||||
object.put("prcId",delegateTask.getProcessInstanceId());
|
||||
zchgxxmscCpghbDataEOService.batchInsert(object);
|
||||
}
|
||||
|
||||
submitMethod = "pageSubmit";
|
||||
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
package com.ydw.bat.wkflow.listener.policyComplianceProgramReviewProcess.timer;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.BusProcessName;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.BusProcessNew;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessNameService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessNewService;
|
||||
import com.ydw.bat.wkflow.business_wkflow.form.dto.FormSubmitDto;
|
||||
import com.ydw.bat.wkflow.business_wkflow.form.service.FormValsService;
|
||||
import com.ydw.bat.wkflow.util.enums.ApprovalFlagEnum;
|
||||
import com.ydw.bat.wkflow.util.enums.FlowTypeEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.activiti.engine.TaskService;
|
||||
import org.activiti.engine.task.Task;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 重点认证标准/政策合规性项目审查流程定时器
|
||||
* @author: wangzhijiang
|
||||
* @date: 2023-10-26
|
||||
*/
|
||||
@Component
|
||||
@EnableScheduling
|
||||
@Slf4j
|
||||
public class PolicyComplianceProgramReviewProcessTimer {
|
||||
|
||||
@Autowired
|
||||
private IBusProcessNameService busProcessNameService;
|
||||
@Autowired
|
||||
private TaskService taskService;
|
||||
@Autowired
|
||||
private IBusProcessNewService busProcessNewService;
|
||||
@Autowired
|
||||
private FormValsService formValsService;
|
||||
|
||||
/**
|
||||
* @Description: 自动提交待办任务
|
||||
* @author: wangzhijiang
|
||||
* @date: 2023-10-23
|
||||
* @Param:
|
||||
* @return:
|
||||
*/
|
||||
@Scheduled(cron = "10 11 11 * * ? ")//每天十点执行
|
||||
// @Scheduled(cron = "0/15 * * * * ? ")
|
||||
public void autoSubmitZrbmTask() {
|
||||
QueryWrapper<BusProcessName> bpnQueryWrap = new QueryWrapper<>();
|
||||
bpnQueryWrap.lambda().eq(BusProcessName::getPrcType, FlowTypeEnum.ZCHGXXMSCLC.getValue());
|
||||
bpnQueryWrap.lambda().lt(BusProcessName::getResponsibleUnitDeadlineDate, new Date());
|
||||
List<BusProcessName> busProcessNameList = this.busProcessNameService.list(bpnQueryWrap);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(busProcessNameList)) {
|
||||
List<String> actiProcInstIdList = busProcessNameList.stream().map(BusProcessName::getPrcId).distinct().collect(Collectors.toList());
|
||||
this.recursionComplteZrbmTask(actiProcInstIdList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归提交待办任务
|
||||
*
|
||||
* @param actiProcInstIdList
|
||||
*/
|
||||
public void recursionComplteZrbmTask(List<String> actiProcInstIdList) {
|
||||
for (String actiProcInstId : actiProcInstIdList) {
|
||||
List<Task> taskList = this.taskService.createTaskQuery().processInstanceId(actiProcInstId).list().stream().filter(task -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(task.getTaskDefinitionKey(), "PolicyComplianceProgramReviewProcessKey7")
|
||||
|| StringUtils.equals(task.getTaskDefinitionKey(), "PolicyComplianceProgramReviewProcessKey8")
|
||||
|| StringUtils.equals(task.getTaskDefinitionKey(), "PolicyComplianceProgramReviewProcessKey9")
|
||||
|| StringUtils.equals(task.getTaskDefinitionKey(), "PolicyComplianceProgramReviewProcessKey10")) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).distinct().collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(taskList)) {
|
||||
for (Task task : taskList) {
|
||||
JSONObject formJson = new JSONObject();
|
||||
|
||||
QueryWrapper<BusProcessNew> newQueryWrapper = new QueryWrapper<>();
|
||||
newQueryWrapper.lambda().eq(BusProcessNew::getTaskId, task.getId());
|
||||
BusProcessNew busProcessNew = this.busProcessNewService.getOne(newQueryWrapper);
|
||||
if (ObjectUtils.isNotEmpty(busProcessNew)) {
|
||||
formJson = JSONObject.parseObject(busProcessNew.getMesg());
|
||||
JSONObject jsonForm = formJson.getJSONObject("form");
|
||||
jsonForm.put("approvalFlag",ApprovalFlagEnum.PASS.getValue());
|
||||
jsonForm.put("internalReviewFlag", "1");
|
||||
formJson.put("commentText","");
|
||||
}
|
||||
formJson.put("submitMethod", "timerAutoSubmit");
|
||||
formJson.put("approvalFlag", ApprovalFlagEnum.PASS.getValue());
|
||||
formJson.put("internalReviewFlag", "1");
|
||||
|
||||
FormSubmitDto formSubmitDto = new FormSubmitDto();
|
||||
formSubmitDto.setForm(formJson.toString());
|
||||
formSubmitDto.setTask_id(task.getId());
|
||||
this.formValsService.saveFormVals(formSubmitDto, task.getTaskDefinitionKey());
|
||||
|
||||
this.taskService.complete(task.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
List<String> actiProcInstIds = this.queryZrbmTaskByActiProcInstId(actiProcInstIdList);
|
||||
if (CollectionUtils.isNotEmpty(actiProcInstIds)) {
|
||||
this.recursionComplteZrbmTask(actiProcInstIds);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据流程实例id,查询还有待办任务的流程。
|
||||
*
|
||||
* @param actiProcInstIdList
|
||||
* @return
|
||||
*/
|
||||
public List<String> queryZrbmTaskByActiProcInstId(List<String> actiProcInstIdList) {
|
||||
List<String> result = new ArrayList<>();
|
||||
for (String actiProcInstId : actiProcInstIdList) {
|
||||
List<Task> taskList = this.taskService.createTaskQuery().processInstanceId(actiProcInstId).list().stream().filter(task -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(task.getTaskDefinitionKey(), "PolicyComplianceProgramReviewProcessKey7")
|
||||
|| StringUtils.equals(task.getTaskDefinitionKey(), "PolicyComplianceProgramReviewProcessKey8")
|
||||
|| StringUtils.equals(task.getTaskDefinitionKey(), "PolicyComplianceProgramReviewProcessKey9")
|
||||
|| StringUtils.equals(task.getTaskDefinitionKey(), "PolicyComplianceProgramReviewProcessKey10")) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).distinct().collect(Collectors.toList());
|
||||
if (taskList.size() != 0) {
|
||||
result.add(actiProcInstId);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -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.ZchgxxmscCpghbDataDetailEOMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -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.ZchgxxmscCpghbDataEOMapper">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user