update 标准法规入库/变更流程-业务表结构

This commit is contained in:
liao
2023-11-09 09:53:28 +08:00
parent 53b766ebb3
commit 5cb137950f
4 changed files with 44 additions and 253 deletions
@@ -4,7 +4,10 @@ import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import java.util.Map;
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 lombok.Data;
@@ -70,158 +73,12 @@ public class ProcessFbEntryChange implements Serializable {
@Excel(name = "操作类型(1标准法规入库、2标准法规变更)", width = 15)
@ApiModelProperty(value = "操作类型(1标准法规入库、2标准法规变更)")
private java.lang.String operateType;
/**标准性质*/
@Excel(name = "标准性质", width = 15)
@ApiModelProperty(value = "标准性质")
private java.lang.String standardProperty;
/**标准类别*/
@Excel(name = "标准类别", width = 15)
@ApiModelProperty(value = "标准类别")
private java.lang.String standardClass;
/**标准号*/
@Excel(name = "标准号", width = 15)
@ApiModelProperty(value = "标准号")
private java.lang.String standardNumberTemp;
/**标准编号*/
@Excel(name = "标准编号", width = 15)
@ApiModelProperty(value = "标准编号")
private java.lang.String standardNumber;
/**年代号*/
@Excel(name = "年代号", width = 15)
@ApiModelProperty(value = "年代号")
private java.lang.String yearNumber;
/**标准名称*/
@Excel(name = "标准名称", width = 15)
@ApiModelProperty(value = "标准名称")
private java.lang.String standardName;
/**标准英文名称*/
@Excel(name = "标准英文名称", width = 15)
@ApiModelProperty(value = "标准英文名称")
private java.lang.String standardEnglishName;
/**标准体系*/
@Excel(name = "标准体系", width = 15)
@ApiModelProperty(value = "标准体系")
private java.lang.String standardSystem;
/**发布日期*/
@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 releaseDate;
/**实施日期*/
@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 implementationDate;
/**在产车实施日期*/
@Excel(name = "在产车实施日期", width = 15)
@ApiModelProperty(value = "在产车实施日期")
private java.lang.String onTheProductionDate;
/**新车型实施日期*/
@Excel(name = "新车型实施日期", width = 15)
@ApiModelProperty(value = "新车型实施日期")
private java.lang.String newModelImplementationDate;
/**废止日期*/
@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 annulmentDate;
/**归口管理部门*/
@Excel(name = "归口管理部门", width = 15)
@ApiModelProperty(value = "归口管理部门")
private java.lang.String centralizedManagementDepartments;
/**分标委*/
@Excel(name = "分标委", width = 15)
@ApiModelProperty(value = "分标委")
private java.lang.String biddingCommittee;
/**责任部门*/
@Excel(name = "责任部门", width = 15)
@ApiModelProperty(value = "责任部门")
private java.lang.String responsibleDepartment;
/**责任部门负责人*/
@Excel(name = "责任部门负责人", width = 15)
@ApiModelProperty(value = "责任部门负责人")
private java.lang.String responsibleDepartmentUser;
/**企业参与情况*/
@Excel(name = "企业参与情况", width = 15)
@ApiModelProperty(value = "企业参与情况")
private java.lang.String enterpriseParticipation;
/**零部件名称*/
@Excel(name = "零部件名称", width = 15)
@ApiModelProperty(value = "零部件名称")
private java.lang.String partName;
/**适用认证*/
@Excel(name = "适用认证", width = 15)
@ApiModelProperty(value = "适用认证")
private java.lang.String applicableCertification;
/**适用车型*/
@Excel(name = "适用车型", width = 15)
@ApiModelProperty(value = "适用车型")
private java.lang.String applicableVehicle;
/**动力类型*/
@Excel(name = "动力类型", width = 15)
@ApiModelProperty(value = "动力类型")
private java.lang.String dynamicType;
/**代替标准号*/
@Excel(name = "代替标准号", width = 15)
@ApiModelProperty(value = "代替标准号")
private java.lang.String substituteStandardNumber;
/**被代替标准号*/
@Excel(name = "被代替标准号", width = 15)
@ApiModelProperty(value = "被代替标准号")
private java.lang.String replacedByStandardNumber;
/**引用标准*/
@Excel(name = "引用标准", width = 15)
@ApiModelProperty(value = "引用标准")
private java.lang.String referenceStandard;
/**被引用标准*/
@Excel(name = "被引用标准", width = 15)
@ApiModelProperty(value = "被引用标准")
private java.lang.String referencedStandard;
/**关联文件*/
@Excel(name = "关联文件", width = 15)
@ApiModelProperty(value = "关联文件")
private java.lang.String associatedFile;
/**采标程度*/
@Excel(name = "采标程度", width = 15)
@ApiModelProperty(value = "采标程度")
private java.lang.String degreeOfBidAcquisition;
/**采用国际标准号*/
@Excel(name = "采用国际标准号", width = 15)
@ApiModelProperty(value = "采用国际标准号")
private java.lang.String adoptTheInternationalStandardNumber;
/**关联国外标准*/
@Excel(name = "关联国外标准", width = 15)
@ApiModelProperty(value = "关联国外标准")
private java.lang.String associatedForeignStandards;
/**发布搞(原文)*/
@Excel(name = "发布搞(原文)", width = 15)
@ApiModelProperty(value = "发布搞(原文)")
private java.lang.String publishOfOriginal;
/**发布搞(译文)*/
@Excel(name = "发布搞(译文)", width = 15)
@ApiModelProperty(value = "发布搞(译文)")
private java.lang.String publishOfTranslation;
/**修改单*/
@Excel(name = "修改单", width = 15)
@ApiModelProperty(value = "修改单")
private java.lang.String modificationList;
/**报批稿*/
@Excel(name = "报批稿", width = 15)
@ApiModelProperty(value = "报批稿")
private java.lang.String draftForReview;
/**送审稿*/
@Excel(name = "送审稿", width = 15)
@ApiModelProperty(value = "送审稿")
private java.lang.String draftForApproval;
/**征求意见稿*/
@Excel(name = "征求意见稿", width = 15)
@ApiModelProperty(value = "征求意见稿")
private java.lang.String draftForComment;
/**草案*/
@Excel(name = "草案", width = 15)
@ApiModelProperty(value = "草案")
private java.lang.String draft;
/**JSON字符串*/
@Excel(name = "JSON字符串", width = 15)
@ApiModelProperty(value = "JSON字符串")
private java.lang.String businessJson;
@ApiModelProperty(value = "法规数据")
@TableField(exist = false)
private Map<String, Object> businessMap;
}
@@ -11,42 +11,6 @@
<result column="del_flag" property="delFlag" />
<result column="source" property="source" />
<result column="operate_type" property="operateType" />
<result column="standard_property" property="standardProperty" />
<result column="standard_class" property="standardClass" />
<result column="standard_number_temp" property="standardNumberTemp" />
<result column="standard_number" property="standardNumber" />
<result column="year_number" property="yearNumber" />
<result column="standard_name" property="standardName" />
<result column="standard_english_name" property="standardEnglishName" />
<result column="standard_system" property="standardSystem" />
<result column="release_date" property="releaseDate" />
<result column="implementation_date" property="implementationDate" />
<result column="on_the_production_date" property="onTheProductionDate" />
<result column="new_model_implementation_date" property="newModelImplementationDate" />
<result column="annulment_date" property="annulmentDate" />
<result column="centralized_management_departments" property="centralizedManagementDepartments" />
<result column="bidding_committee" property="biddingCommittee" />
<result column="responsible_department" property="responsibleDepartment" />
<result column="responsible_department_user" property="responsibleDepartmentUser" />
<result column="enterprise_participation" property="enterpriseParticipation" />
<result column="part_name" property="partName" />
<result column="applicable_certification" property="applicableCertification" />
<result column="applicable_vehicle" property="applicableVehicle" />
<result column="dynamic_type" property="dynamicType" />
<result column="substitute_standard_number" property="substituteStandardNumber" />
<result column="replaced_by_standard_number" property="replacedByStandardNumber" />
<result column="reference_standard" property="referenceStandard" />
<result column="referenced_standard" property="referencedStandard" />
<result column="associated_file" property="associatedFile" />
<result column="degree_of_bid_acquisition" property="degreeOfBidAcquisition" />
<result column="adopt_the_international_standard_number" property="adoptTheInternationalStandardNumber" />
<result column="associated_foreign_standards" property="associatedForeignStandards" />
<result column="publish_of_original" property="publishOfOriginal" />
<result column="publish_of_translation" property="publishOfTranslation" />
<result column="modification_list" property="modificationList" />
<result column="draft_for_review" property="draftForReview" />
<result column="draft_for_approval" property="draftForApproval" />
<result column="draft_for_comment" property="draftForComment" />
<result column="draft" property="draft" />
<result column="business_json" property="businessJson" />
</resultMap>
</mapper>
@@ -1,5 +1,6 @@
package com.jero.modules.activiti.process.fb.service.impl;
import com.alibaba.fastjson.JSON;
import com.jero.common.util.UUIDUtils;
import com.jero.modules.activiti.enums.ProcessTypeEnum;
import com.jero.modules.activiti.process.fb.common.ProcessDefinitionKey;
@@ -52,6 +53,7 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
public void addBusinessInfo(ProcessFbEntryChange processFbEntryChange) {
// 设置标准编号
setStandardNumber(processFbEntryChange);
processFbEntryChange.setBusinessJson(JSON.toJSONString(processFbEntryChange.getBusinessMap()));
save(processFbEntryChange);
}
@@ -63,7 +65,7 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
@Override
public void editBusinessInfo(ProcessFbEntryChange processFbEntryChange) {
// 设置标准编号
setStandardNumber(processFbEntryChange);
processFbEntryChange.setBusinessJson(JSON.toJSONString(processFbEntryChange.getBusinessMap()));
updateById(processFbEntryChange);
}
@@ -74,11 +76,12 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
**/
private void setStandardNumber(ProcessFbEntryChange processFbEntryChange) {
Map<String, Object> parameterMap = new HashMap<>();
parameterMap.put(FieldCommon.STANDARD_CLASS, processFbEntryChange.getStandardClass());
parameterMap.put(FieldCommon.STANDARD_NUMBER_TEMP, processFbEntryChange.getStandardNumberTemp());
parameterMap.put(FieldCommon.YEAR_NUMBER, processFbEntryChange.getYearNumber());
Map<String, Object> businessMap = processFbEntryChange.getBusinessMap();
parameterMap.put(FieldCommon.STANDARD_CLASS, businessMap.get(FieldCommon.STANDARD_CLASS));
parameterMap.put(FieldCommon.STANDARD_NUMBER_TEMP, businessMap.get(FieldCommon.STANDARD_NUMBER_TEMP));
parameterMap.put(FieldCommon.YEAR_NUMBER, businessMap.get(FieldCommon.YEAR_NUMBER));
lawsCommonService.setStandardNumber(parameterMap);
processFbEntryChange.setStandardNumber((String) parameterMap.get(FieldCommon.STANDARD_NUMBER));
businessMap.put(FieldCommon.STANDARD_NUMBER, parameterMap.get(FieldCommon.STANDARD_NUMBER));
}
/**
@@ -119,7 +122,7 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
String processInstanceId = processInfoVO.getBasicProcessInfoDTO().getProcessInstanceId();
// 如果流程结束
if (pass && processHandleService.isProcessFinish(processInstanceId)) {
Map<String, Object> objectMap = ObjectToMapUtil.transform(businessInfoDTO);
Map<String, Object> objectMap = JSON.parseObject(businessInfoDTO.getBusinessJson(), Map.class);
objectMap.put(FieldCommon.MODULE, businessInfoDTO.getSource());
if ("1".equals(businessInfoDTO.getOperateType())) {
// 如果是标准法规入库流程
@@ -154,7 +157,9 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
if (Objects.isNull(businessData)) {
throw new JeroBootException(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
}
String processName = businessData.getStandardNumber() + "-" + businessData.getStandardName();
String businessJson = businessData.getBusinessJson();
Map<String, Object> map = JSON.parseObject(businessJson, Map.class);
String processName = map.get(FieldCommon.STANDARD_NUMBER) + "-" + map.get(FieldCommon.STANDARD_NAME);
if ("1".equals(businessData.getOperateType())) { // 入库
processName = processName + "-" + "入库";
} else { // 变更
@@ -174,8 +179,10 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
ProcessFbEntryChange businessInfoDTO = processInfoVO.getBusinessInfoDTO();
if (StringUtils.isBlank(businessInfoDTO.getId())) { // 如果是发起时保存
businessInfoDTO.setId(UUIDUtils.randomUUID20());
businessInfoDTO.setBusinessJson(JSON.toJSONString(businessInfoDTO.getBusinessMap()));
save(businessInfoDTO);
} else { // 如果是审批时保存
businessInfoDTO.setBusinessJson(JSON.toJSONString(businessInfoDTO.getBusinessMap()));
updateById(businessInfoDTO);
}
processInfoVO.setBusinessId(businessInfoDTO.getId());
@@ -195,6 +202,8 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
public ProcessInfoVO<ProcessFbEntryChange> queryProcessInfoVO(String draftId, String processInstanceId) {
ProcessInfoVO processInfoVO = processHandleService.queryProcessInfoVO(draftId, processInstanceId);
ProcessFbEntryChange processFbEntryChange = getById(processInfoVO.getBusinessId());
Map<String, Object> map = JSON.parseObject(processFbEntryChange.getBusinessJson(), Map.class);
processFbEntryChange.setBusinessMap(map);
processInfoVO.setBusinessInfoDTO(processFbEntryChange);
return processInfoVO;
}