update 老法规系统国标导入
This commit is contained in:
+1
-18
@@ -61,24 +61,7 @@ public class ProcessFbEntryChange implements Serializable {
|
||||
@Excel(name = "0表示未删除,1表示删除", width = 15)
|
||||
@ApiModelProperty(value = "0表示未删除,1表示删除")
|
||||
private java.lang.Integer delFlag;
|
||||
/**流程示例id(流程信息)*/
|
||||
@Excel(name = "流程示例id(流程信息)", width = 15)
|
||||
@ApiModelProperty(value = "流程示例id(流程信息)")
|
||||
private java.lang.String processInstanceId;
|
||||
/**流程名称(流程信息)*/
|
||||
@Excel(name = "流程名称(流程信息)", width = 15)
|
||||
@ApiModelProperty(value = "流程名称(流程信息)")
|
||||
private java.lang.String processname;
|
||||
/**截止日期(流程信息)*/
|
||||
@Excel(name = "截止日期(流程信息)", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "截止日期(流程信息)")
|
||||
private java.util.Date processDueDate;
|
||||
/**流程说明(流程信息)*/
|
||||
@Excel(name = "流程说明(流程信息)", width = 15)
|
||||
@ApiModelProperty(value = "流程说明(流程信息)")
|
||||
private java.lang.String processDescription;
|
||||
|
||||
/**来源(1国内、2海外)*/
|
||||
@Excel(name = "来源(1国内、2海外)", width = 15)
|
||||
@ApiModelProperty(value = "来源(1国内、2海外)")
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.jero.modules.activiti.process.fb.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/2 14:35
|
||||
* @Description: 流程信息通用类
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="流程信息通用类", description="流程信息通用类")
|
||||
public class CommonProcessInfo {
|
||||
|
||||
/**流程实例id*/
|
||||
@Excel(name = "流程实例id", width = 15)
|
||||
@ApiModelProperty(value = "流程实例id")
|
||||
private java.lang.String processInstanceId;
|
||||
/**流程名称*/
|
||||
@Excel(name = "流程名称", width = 15)
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private java.lang.String processName;
|
||||
/**截止日期*/
|
||||
@Excel(name = "截止日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "截止日期")
|
||||
private java.util.Date processDueDate;
|
||||
/**流程说明*/
|
||||
@Excel(name = "流程说明", width = 15)
|
||||
@ApiModelProperty(value = "流程说明")
|
||||
private java.lang.String processDescription;
|
||||
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
package com.jero.modules.activiti.process.fb.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/1 17:16
|
||||
* @Description: 标准法规入库_变更流程_人员信息
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="标准法规入库_变更流程_人员信息", description="标准法规入库_变更流程_人员信息")
|
||||
public class FbEntryChangeUserVO {
|
||||
|
||||
/**法规工程师-发起*/
|
||||
@ApiModelProperty(value = "法规工程师-发起")
|
||||
private java.lang.String engineerId;
|
||||
|
||||
/**法规工程师主管级领导-审批*/
|
||||
@ApiModelProperty(value = "法规工程师主管级领导-审批")
|
||||
private java.lang.String leaderId;
|
||||
|
||||
}
|
||||
+5
-3
@@ -8,6 +8,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/1 17:11
|
||||
@@ -21,14 +23,14 @@ public class FbEntryChangeVO {
|
||||
|
||||
/**流程通用信息*/
|
||||
@ApiModelProperty(value = "流程通用信息")
|
||||
private CommonVO common;
|
||||
private CommonVO commonInfo;
|
||||
|
||||
/**业务信息*/
|
||||
@ApiModelProperty(value = "业务信息")
|
||||
private ProcessFbEntryChange data;
|
||||
private ProcessFbEntryChange businessInfo;
|
||||
|
||||
/**人员信息*/
|
||||
@ApiModelProperty(value = "人员信息")
|
||||
private FbEntryChangeUserVO flowUser;
|
||||
private Map<String, String> userInfoMap;
|
||||
|
||||
}
|
||||
|
||||
+25
-10
@@ -192,10 +192,33 @@ public class LawsEnterpriseStandardServiceImpl extends ServiceImpl<LawsEnterpris
|
||||
|
||||
private void oldSysGBImport(List<OldSystemImportDTO> gbDatalist) {
|
||||
long startTime = System.currentTimeMillis();
|
||||
//TODO 转换数据
|
||||
// 转换数据
|
||||
List<LawsDomesticStandard> gbList = new ArrayList<>();
|
||||
for (OldSystemImportDTO dto : gbDatalist) {
|
||||
LawsDomesticStandard gb = new LawsDomesticStandard();
|
||||
gb.setStandardNumber(dto.getBzh());
|
||||
|
||||
String[] parts = dto.getBzh().split("[-\\s]"); // 使用空格或破折号作为分隔符
|
||||
if (parts.length < 3) {
|
||||
parts = dto.getBzh().split("[—\\s]"); // 使用空格或破折号作为分隔符
|
||||
}
|
||||
// 标准类别
|
||||
gb.setStandardClass(parts[0]);
|
||||
// 标准号
|
||||
gb.setStandardNumberTemp(parts[1]);
|
||||
// 年代号
|
||||
gb.setYearNumber(parts[2]);
|
||||
|
||||
gb.setStandardName(dto.getBzmc());
|
||||
gb.setStandardEnglishName(dto.getBzywmc());
|
||||
gb.setReleaseDate(dto.getFbrq());
|
||||
gb.setImplementationDate(dto.getSsrq());
|
||||
String standardState = dto.getBzzt();
|
||||
gb.setStandardState(standardState.equals("现行有效") ? "8" : "9");
|
||||
// 代替被代替特殊逻辑
|
||||
gb.setSubstituteStandardNumber(dto.getTdbzh());
|
||||
gb.setReplacedByStandardNumber(dto.getBtdbzh());
|
||||
gbList.add(gb);
|
||||
}
|
||||
// 保存数据
|
||||
// 1. 首先获取所有现有的企标标准号
|
||||
@@ -213,7 +236,7 @@ public class LawsEnterpriseStandardServiceImpl extends ServiceImpl<LawsEnterpris
|
||||
if (existingEntity != null) {
|
||||
// 如果存在,则先删后增
|
||||
this.removeById(existingEntity.getId());
|
||||
// TODO 删除替代被替代
|
||||
// 删除替代
|
||||
lawsReplacedStandardService.removeRelation(existingEntity.getStandardNumber(), 1);
|
||||
}
|
||||
String tdbzh = entity.getSubstituteStandardNumber();
|
||||
@@ -284,14 +307,6 @@ public class LawsEnterpriseStandardServiceImpl extends ServiceImpl<LawsEnterpris
|
||||
this.removeById(existingEntity.getId());
|
||||
// 代替
|
||||
lawsReplacedStandardService.removeRelation(existingEntity.getStandardNumber(), 1);
|
||||
// 删除被代替
|
||||
String replacedBy = lawsReplacedStandardService.getReplacedBy(curStandardNumber, 1);
|
||||
if (StringUtils.isNotBlank(replacedBy)) {
|
||||
List<String> replaceCodeList = Arrays.asList(replacedBy.split(";"));
|
||||
replaceCodeList.forEach(replaceCode -> {
|
||||
lawsReplacedStandardService.removeRelation(replaceCode, 1);
|
||||
});
|
||||
}
|
||||
}
|
||||
String tdbzh = entity.getSubstituteStandardNumber();
|
||||
String btdbzh = entity.getReplacedByStandardNumber();
|
||||
|
||||
Reference in New Issue
Block a user