feat: 企标更改流程列表接收数据
This commit is contained in:
+95
@@ -0,0 +1,95 @@
|
|||||||
|
package com.jero.modules.activiti.process.esChange.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 java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企标修改流程意见内容列表
|
||||||
|
* @TableName process_es_change_opinion
|
||||||
|
*/
|
||||||
|
@TableName(value ="process_es_change_opinion")
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class EsChangeOpinion implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键ID")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private String orgCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "业务id")
|
||||||
|
private String businessId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条款号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "条款号")
|
||||||
|
private String clauseNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条款名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "条款名称")
|
||||||
|
private String clauseName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改后
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改后")
|
||||||
|
private String afterUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改理由
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改理由")
|
||||||
|
private String updateReason;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
}
|
||||||
+7
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@@ -190,6 +191,12 @@ public class ProcessEsChange implements Serializable {
|
|||||||
@ApiModelProperty(value = "采用国际标准号")
|
@ApiModelProperty(value = "采用国际标准号")
|
||||||
private String internationalStandardNum;
|
private String internationalStandardNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改意见内容列表
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<EsChangeOpinion> list;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
package com.jero.modules.activiti.process.esChange.mapper;
|
||||||
|
|
||||||
|
import com.jero.modules.activiti.process.esChange.entity.EsChangeOpinion;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ThinkBook
|
||||||
|
* @description 针对表【process_es_change_opinion(企标修改流程意见内容列表)】的数据库操作Mapper
|
||||||
|
* @createDate 2023-12-04 15:22:36
|
||||||
|
* @Entity com.jero.modules.activiti.process.esChange.entity.EsChangeOpinion
|
||||||
|
*/
|
||||||
|
public interface EsChangeOpinionMapper extends BaseMapper<EsChangeOpinion> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package com.jero.modules.activiti.process.esChange.service;
|
||||||
|
|
||||||
|
import com.jero.modules.activiti.process.esChange.entity.EsChangeOpinion;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ThinkBook
|
||||||
|
* @description 针对表【process_es_change_opinion(企标修改流程意见内容列表)】的数据库操作Service
|
||||||
|
* @createDate 2023-12-04 15:22:36
|
||||||
|
*/
|
||||||
|
public interface EsChangeOpinionService extends IService<EsChangeOpinion> {
|
||||||
|
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
package com.jero.modules.activiti.process.esChange.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.modules.activiti.process.esChange.entity.EsChangeOpinion;
|
||||||
|
import com.jero.modules.activiti.process.esChange.service.EsChangeOpinionService;
|
||||||
|
import com.jero.modules.activiti.process.esChange.mapper.EsChangeOpinionMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ThinkBook
|
||||||
|
* @description 针对表【process_es_change_opinion(企标修改流程意见内容列表)】的数据库操作Service实现
|
||||||
|
* @createDate 2023-12-04 15:22:36
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class EsChangeOpinionServiceImpl extends ServiceImpl<EsChangeOpinionMapper, EsChangeOpinion>
|
||||||
|
implements EsChangeOpinionService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+28
-5
@@ -15,10 +15,10 @@ import com.jero.modules.activiti.process.common.entity.ProcessDraft;
|
|||||||
import com.jero.modules.activiti.process.common.enums.ProcessType;
|
import com.jero.modules.activiti.process.common.enums.ProcessType;
|
||||||
import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
||||||
import com.jero.modules.activiti.process.common.service.ProcessDraftService;
|
import com.jero.modules.activiti.process.common.service.ProcessDraftService;
|
||||||
import com.jero.modules.activiti.process.esArchive.entity.ProcessEsArchive;
|
import com.jero.modules.activiti.process.esChange.entity.EsChangeOpinion;
|
||||||
import com.jero.modules.activiti.process.esArchive.entity.vo.ESArchiveDataVO;
|
|
||||||
import com.jero.modules.activiti.process.esChange.entity.ProcessEsChange;
|
import com.jero.modules.activiti.process.esChange.entity.ProcessEsChange;
|
||||||
import com.jero.modules.activiti.process.esChange.entity.vo.ESChangeDataVO;
|
import com.jero.modules.activiti.process.esChange.entity.vo.ESChangeDataVO;
|
||||||
|
import com.jero.modules.activiti.process.esChange.service.EsChangeOpinionService;
|
||||||
import com.jero.modules.activiti.process.esChange.service.ProcessEsChangeService;
|
import com.jero.modules.activiti.process.esChange.service.ProcessEsChangeService;
|
||||||
import com.jero.modules.activiti.process.esChange.mapper.ProcessEsChangeMapper;
|
import com.jero.modules.activiti.process.esChange.mapper.ProcessEsChangeMapper;
|
||||||
import com.jero.modules.activiti.service.ProcessAllService;
|
import com.jero.modules.activiti.service.ProcessAllService;
|
||||||
@@ -54,6 +54,9 @@ public class ProcessEsChangeServiceImpl extends ServiceImpl<ProcessEsChangeMappe
|
|||||||
@Resource
|
@Resource
|
||||||
private RuntimeService runtimeService;
|
private RuntimeService runtimeService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private EsChangeOpinionService esChangeOpinionService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startProcess(ESChangeDataVO changeData) {
|
public void startProcess(ESChangeDataVO changeData) {
|
||||||
// 执行流程发起前的操作
|
// 执行流程发起前的操作
|
||||||
@@ -64,6 +67,7 @@ public class ProcessEsChangeServiceImpl extends ServiceImpl<ProcessEsChangeMappe
|
|||||||
String userId = UserUtils.getUserId();
|
String userId = UserUtils.getUserId();
|
||||||
// 业务数据
|
// 业务数据
|
||||||
ProcessEsChange esChange = changeData.getData();
|
ProcessEsChange esChange = changeData.getData();
|
||||||
|
List<EsChangeOpinion> opinionList = esChange.getList();
|
||||||
// 通用数据
|
// 通用数据
|
||||||
CommonVO common = changeData.getCommon();
|
CommonVO common = changeData.getCommon();
|
||||||
// 人员数据
|
// 人员数据
|
||||||
@@ -83,6 +87,11 @@ public class ProcessEsChangeServiceImpl extends ServiceImpl<ProcessEsChangeMappe
|
|||||||
esChange.setProcessInstanceId(processInstanceId);
|
esChange.setProcessInstanceId(processInstanceId);
|
||||||
// 保存到业务流程表
|
// 保存到业务流程表
|
||||||
saveOrUpdate(esChange);
|
saveOrUpdate(esChange);
|
||||||
|
if (opinionList != null && !opinionList.isEmpty()) {
|
||||||
|
// 遍历 opinionList,设置 opinion 的 BusinessId
|
||||||
|
opinionList.forEach(opinion -> opinion.setBusinessId(esChange.getId()));
|
||||||
|
esChangeOpinionService.saveOrUpdateBatch(opinionList);
|
||||||
|
}
|
||||||
// 保存选人信息
|
// 保存选人信息
|
||||||
processNodeLinkService.saveNodeUserLink(processDefinitionId, processInstanceId, this.getUserMap(variables));
|
processNodeLinkService.saveNodeUserLink(processDefinitionId, processInstanceId, this.getUserMap(variables));
|
||||||
// 根据流程实例id更新流程总表
|
// 根据流程实例id更新流程总表
|
||||||
@@ -118,11 +127,16 @@ public class ProcessEsChangeServiceImpl extends ServiceImpl<ProcessEsChangeMappe
|
|||||||
public void saveToDraft(ESChangeDataVO changeData) {
|
public void saveToDraft(ESChangeDataVO changeData) {
|
||||||
CommonVO commonVO = changeData.getCommon();
|
CommonVO commonVO = changeData.getCommon();
|
||||||
ProcessEsChange esChange = changeData.getData();
|
ProcessEsChange esChange = changeData.getData();
|
||||||
ProcessDraft existDraft = actFlowCommonService.getExistDraftAndRemove(commonVO, ProcessTypeEnum.ES_ARCHIVE);
|
List<EsChangeOpinion> opinionList = esChange.getList();
|
||||||
|
ProcessDraft existDraft = actFlowCommonService.getExistDraftAndRemove(commonVO, ProcessTypeEnum.ES_CHANGE);
|
||||||
if (existDraft != null) esChange.setId(existDraft.getProjectId());
|
if (existDraft != null) esChange.setId(existDraft.getProjectId());
|
||||||
// TODO 底下表格
|
|
||||||
saveOrUpdate(esChange);
|
saveOrUpdate(esChange);
|
||||||
actFlowCommonService.addDraft(commonVO, ProcessTypeEnum.ES_ARCHIVE, esChange.getId());
|
if (opinionList != null && !opinionList.isEmpty()) {
|
||||||
|
// 遍历 opinionList,设置 opinion 的 BusinessId
|
||||||
|
opinionList.forEach(opinion -> opinion.setBusinessId(esChange.getId()));
|
||||||
|
esChangeOpinionService.saveOrUpdateBatch(opinionList);
|
||||||
|
}
|
||||||
|
actFlowCommonService.addDraft(commonVO, ProcessTypeEnum.ES_CHANGE, esChange.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startRunTask(ESChangeDataVO changeData) {
|
public void startRunTask(ESChangeDataVO changeData) {
|
||||||
@@ -143,6 +157,11 @@ public class ProcessEsChangeServiceImpl extends ServiceImpl<ProcessEsChangeMappe
|
|||||||
lambdaQueryWrapper.eq(ProcessEsChange::getProcessInstanceId, processInstanceId);
|
lambdaQueryWrapper.eq(ProcessEsChange::getProcessInstanceId, processInstanceId);
|
||||||
lambdaQueryWrapper.eq(ProcessEsChange::getDelFlag, YesOrNoEnum.NO.getValue());
|
lambdaQueryWrapper.eq(ProcessEsChange::getDelFlag, YesOrNoEnum.NO.getValue());
|
||||||
ProcessEsChange data = getOne(lambdaQueryWrapper);
|
ProcessEsChange data = getOne(lambdaQueryWrapper);
|
||||||
|
// 获取修改意见列表
|
||||||
|
LambdaQueryWrapper<EsChangeOpinion> opinionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
opinionLambdaQueryWrapper.eq(EsChangeOpinion::getBusinessId, data.getId());
|
||||||
|
List<EsChangeOpinion> opinionList = esChangeOpinionService.list(opinionLambdaQueryWrapper);
|
||||||
|
data.setList(opinionList);
|
||||||
changeData.setData(data);
|
changeData.setData(data);
|
||||||
return changeData;
|
return changeData;
|
||||||
}
|
}
|
||||||
@@ -185,6 +204,10 @@ public class ProcessEsChangeServiceImpl extends ServiceImpl<ProcessEsChangeMappe
|
|||||||
lambdaQueryWrapper.eq(ProcessEsChange::getId, businessId);
|
lambdaQueryWrapper.eq(ProcessEsChange::getId, businessId);
|
||||||
lambdaQueryWrapper.eq(ProcessEsChange::getDelFlag, YesOrNoEnum.NO.getValue());
|
lambdaQueryWrapper.eq(ProcessEsChange::getDelFlag, YesOrNoEnum.NO.getValue());
|
||||||
ProcessEsChange data = getOne(lambdaQueryWrapper);
|
ProcessEsChange data = getOne(lambdaQueryWrapper);
|
||||||
|
LambdaQueryWrapper<EsChangeOpinion> opinionLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
opinionLambdaQueryWrapper.eq(EsChangeOpinion::getBusinessId, data.getId());
|
||||||
|
List<EsChangeOpinion> opinionList = esChangeOpinionService.list(opinionLambdaQueryWrapper);
|
||||||
|
data.setList(opinionList);
|
||||||
changeDataVO.setData(data);
|
changeDataVO.setData(data);
|
||||||
return changeDataVO;
|
return changeDataVO;
|
||||||
}
|
}
|
||||||
|
|||||||
+27
-27
@@ -290,16 +290,16 @@ public class LawsEnterpriseStandardServiceImpl extends ServiceImpl<LawsEnterpris
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 责任部门暂不导入
|
// 责任部门暂不导入
|
||||||
// String zrbm = dto.getZrbm();
|
String zrbm = dto.getZrbm();
|
||||||
// if (oldDeptMap.get(zrbm) != null && oldDeptMap.get(zrbm).get(0) != null) {
|
if (oldDeptMap.get(zrbm) != null && oldDeptMap.get(zrbm).get(0) != null) {
|
||||||
// String curOrgName = oldDeptMap.get(zrbm).get(0).getCurOrgName();
|
String curOrgName = oldDeptMap.get(zrbm).get(0).getCurOrgName();
|
||||||
// if (StrUtil.isNotBlank(curOrgName)) {
|
if (StrUtil.isNotBlank(curOrgName)) {
|
||||||
// List<SysDepart> departList = curDeptMap.get(curOrgName);
|
List<SysDepart> departList = curDeptMap.get(curOrgName);
|
||||||
// if (departList.size() != 0) {
|
if (departList.size() == 1) {
|
||||||
// gb.setResponsibleDepartment(departList.get(0).getId());
|
fb.setResponsibleDepartment(departList.get(0).getId());
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
String zrr = dto.getZrr();
|
String zrr = dto.getZrr();
|
||||||
String zrrid = dto.getZrrid();
|
String zrrid = dto.getZrrid();
|
||||||
if (StrUtil.isNotBlank(zrr) && StrUtil.isNotBlank(zrrid)) {
|
if (StrUtil.isNotBlank(zrr) && StrUtil.isNotBlank(zrrid)) {
|
||||||
@@ -972,16 +972,16 @@ public class LawsEnterpriseStandardServiceImpl extends ServiceImpl<LawsEnterpris
|
|||||||
gb.setReplacedByStandardNumber(dto.getBtdbzh());
|
gb.setReplacedByStandardNumber(dto.getBtdbzh());
|
||||||
|
|
||||||
// 责任部门暂不导入
|
// 责任部门暂不导入
|
||||||
// String zrbm = dto.getZrbm();
|
String zrbm = dto.getZrbm();
|
||||||
// if (oldDeptMap.get(zrbm) != null && oldDeptMap.get(zrbm).get(0) != null) {
|
if (oldDeptMap.get(zrbm) != null && oldDeptMap.get(zrbm).get(0) != null) {
|
||||||
// String curOrgName = oldDeptMap.get(zrbm).get(0).getCurOrgName();
|
String curOrgName = oldDeptMap.get(zrbm).get(0).getCurOrgName();
|
||||||
// if (StrUtil.isNotBlank(curOrgName)) {
|
if (StrUtil.isNotBlank(curOrgName)) {
|
||||||
// List<SysDepart> departList = curDeptMap.get(curOrgName);
|
List<SysDepart> departList = curDeptMap.get(curOrgName);
|
||||||
// if (departList.size() != 0) {
|
if (departList.size() == 1) {
|
||||||
// gb.setResponsibleDepartment(departList.get(0).getId());
|
gb.setResponsibleDepartment(departList.get(0).getId());
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
String zrr = dto.getZrr();
|
String zrr = dto.getZrr();
|
||||||
String zrrid = dto.getZrrid();
|
String zrrid = dto.getZrrid();
|
||||||
if (StrUtil.isNotBlank(zrr) && StrUtil.isNotBlank(zrrid)) {
|
if (StrUtil.isNotBlank(zrr) && StrUtil.isNotBlank(zrrid)) {
|
||||||
@@ -1027,7 +1027,7 @@ public class LawsEnterpriseStandardServiceImpl extends ServiceImpl<LawsEnterpris
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 3. 将文件关系列表转为Map,用于快速查找
|
// 3. 将文件关系列表转为Map,用于快速查找
|
||||||
// Map<String, List<OSSFile>> standardNumberToFileMap = ossFileList.stream().collect(Collectors.groupingBy(OSSFile::getStandardNo));
|
Map<String, List<OSSFile>> standardNumberToFileMap = ossFileList.stream().collect(Collectors.groupingBy(OSSFile::getStandardNo));
|
||||||
|
|
||||||
// 4. 遍历待保存或更新的列表,设置ID
|
// 4. 遍历待保存或更新的列表,设置ID
|
||||||
StringBuilder oldIds = new StringBuilder();
|
StringBuilder oldIds = new StringBuilder();
|
||||||
@@ -1074,12 +1074,12 @@ public class LawsEnterpriseStandardServiceImpl extends ServiceImpl<LawsEnterpris
|
|||||||
}
|
}
|
||||||
String standardId = entity.getId();
|
String standardId = entity.getId();
|
||||||
// 保存文件关联
|
// 保存文件关联
|
||||||
// List<OSSFile> ossFiles = standardNumberToFileMap.get(entity.getStandardNumber());
|
List<OSSFile> ossFiles = standardNumberToFileMap.get(entity.getStandardNumber());
|
||||||
// if (ossFiles != null && !ossFiles.isEmpty()) {
|
if (ossFiles != null && !ossFiles.isEmpty()) {
|
||||||
// OSSFile ossFile = ossFiles.get(0);
|
OSSFile ossFile = ossFiles.get(0);
|
||||||
// ossFile.setStandardId(standardId);
|
ossFile.setStandardId(standardId);
|
||||||
// ossFileService.save(ossFile);
|
ossFileService.save(ossFile);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
log.info("老法规国标覆盖导入完成");
|
log.info("老法规国标覆盖导入完成");
|
||||||
// 获取当前时间戳(毫秒)
|
// 获取当前时间戳(毫秒)
|
||||||
|
|||||||
Reference in New Issue
Block a user