Commit 0778eba6 authored by suhuiguang's avatar suhuiguang

fix(大编辑):bug修复

1.管道使用信息变化已主表为主 2.使用登记审核完成后更新管道汇总表字段 2管道es增加使用登记证编号
parent c95cd65e
...@@ -66,18 +66,16 @@ public class ProjectContraptionChangeDataDto extends BaseChangeDataDto { ...@@ -66,18 +66,16 @@ public class ProjectContraptionChangeDataDto extends BaseChangeDataDto {
private String productQualificationCertificate; private String productQualificationCertificate;
@FieldDisplayDefine(value = "使用地点代码_省", typeHandler = "regionCodeTypeHandler") @FieldDisplayDefine(value = "使用省份", typeHandler = "regionCodeTypeHandler")
private String province; private String province;
@FieldDisplayDefine(value = "使用地点代码_市", typeHandler = "regionCodeTypeHandler") @FieldDisplayDefine(value = "使用市", typeHandler = "regionCodeTypeHandler")
private String city; private String city;
@FieldDisplayDefine(value = "使用区县", typeHandler = "regionCodeTypeHandler")
@FieldDisplayDefine(value = "使用地点代码_区(县)", typeHandler = "regionCodeTypeHandler")
private String county; private String county;
@FieldDisplayDefine(value = "使用街道/镇", typeHandler = "regionCodeTypeHandler")
@FieldDisplayDefine(value = "使用地点代码_街道(镇)", typeHandler = "regionCodeTypeHandler")
private String street; private String street;
...@@ -85,19 +83,19 @@ public class ProjectContraptionChangeDataDto extends BaseChangeDataDto { ...@@ -85,19 +83,19 @@ public class ProjectContraptionChangeDataDto extends BaseChangeDataDto {
private String address; private String address;
@FieldDisplayDefine(value = "使用地点名称省") @FieldDisplayDefine(value = "使用地点名称省", isRepeatColumn = true)
private String provinceName; private String provinceName;
@FieldDisplayDefine(value = "使用地点_市名称") @FieldDisplayDefine(value = "使用地点_市名称", isRepeatColumn = true)
private String cityName; private String cityName;
@FieldDisplayDefine(value = "使用地点_区名称") @FieldDisplayDefine(value = "使用地点_区名称", isRepeatColumn = true)
private String countyName; private String countyName;
@FieldDisplayDefine(value = " 使用地点_街道名称") @FieldDisplayDefine(value = " 使用地点_街道名称", isRepeatColumn = true)
private String streetName; private String streetName;
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
</delete> </delete>
<select id="queryPageListByChangeIds" resultType="com.yeejoin.amos.boot.module.jg.api.dto.JgResumeInfoDto"> <select id="queryPageListByChangeIds" resultType="com.yeejoin.amos.boot.module.jg.api.dto.JgResumeInfoDto">
SELECT * SELECT
*
FROM tzs_jg_resume_info FROM tzs_jg_resume_info
WHERE WHERE
<foreach collection="equIds" item="id" open="(" separator="or" close=")"> <foreach collection="equIds" item="id" open="(" separator="or" close=")">
......
...@@ -948,6 +948,11 @@ public class CommonEquipDataProcessService { ...@@ -948,6 +948,11 @@ public class CommonEquipDataProcessService {
item.put("inspectReport", JSON.parse(r.getInspectReport())); item.put("inspectReport", JSON.parse(r.getInspectReport()));
// 兼容逻辑,管道级别 原业务存的name,编辑存的code,进行转换name/code->code // 兼容逻辑,管道级别 原业务存的name,编辑存的code,进行转换name/code->code
item.put("deviceLevel", pieLineLevelTypeHandler.getCodeByName(r.getDeviceLevel())); item.put("deviceLevel", pieLineLevelTypeHandler.getCodeByName(r.getDeviceLevel()));
// 原始业务不包含此字段 需要加上 否则流程中第一次编辑时该字段丢失导致安装信息无法更新
if(r.getConstructionInfoSeq() == null){
IdxBizJgConstructionInfo constructionInfo = jgConstructionInfoService.queryNewestDetailIdByRecord(r.getRecord());
item.put("constructionInfoSeq", constructionInfo.getSequenceNbr());
}
item.put("isEdit", true); item.put("isEdit", true);
return item; return item;
}).collect(Collectors.toList())); }).collect(Collectors.toList()));
......
...@@ -95,7 +95,7 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS ...@@ -95,7 +95,7 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
// 技术参数变更日志 // 技术参数变更日志
this.buildTechParamChangeLog(record, pipelineNew, pipelineOld, projectContraptionChangeDataDto, allChangeColumns); this.buildTechParamChangeLog(record, pipelineNew, pipelineOld, projectContraptionChangeDataDto, allChangeColumns);
} else {// 实时更新 } else {// 实时更新
// 基本信息 // 基本信息-特殊管道的使用信息变化更新但是不记录变更流水
this.updateUseInfo(pipelineNew, projectContraptionChangeDataDto, allChangeColumns); this.updateUseInfo(pipelineNew, projectContraptionChangeDataDto, allChangeColumns);
// 安装信息 // 安装信息
this.updateConstructionInfo(pipelineNew, projectContraptionChangeDataDto, allChangeColumns); this.updateConstructionInfo(pipelineNew, projectContraptionChangeDataDto, allChangeColumns);
...@@ -218,7 +218,8 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS ...@@ -218,7 +218,8 @@ public class SingleProjectEquipChangeProcess implements IEquipChangeDataProcessS
// 冗余的字典名称字段更新 // 冗余的字典名称字段更新
commonEquipDataProcessService.setNameByCode2UseInfo(useInfoNew); commonEquipDataProcessService.setNameByCode2UseInfo(useInfoNew);
List<FieldChangeMeta> useInfoFieldChangeMetas = commonEquipDataProcessService.simpleTrackAndUpdate(commonEquipDataProcessService.getJgUseRegistrationService().getUseInfoMapper(), useInfoOld, useInfoNew, projectContraptionChangeDataDto.getProjectContraptionId() + "/" + useInfoNew.getRecord(), "record", useInfoNew.getRecord()); List<FieldChangeMeta> useInfoFieldChangeMetas = commonEquipDataProcessService.simpleTrackAndUpdate(commonEquipDataProcessService.getJgUseRegistrationService().getUseInfoMapper(), useInfoOld, useInfoNew, projectContraptionChangeDataDto.getProjectContraptionId() + "/" + useInfoNew.getRecord(), "record", useInfoNew.getRecord());
allChangeColumns.addAll(useInfoFieldChangeMetas); // 管道不记录使用信息变化,使用信息的变化已装置来体现
// allChangeColumns.addAll(useInfoFieldChangeMetas);
} }
static void setNewUseAddressInfo(ProjectContraptionChangeDataDto projectContraptionChangeDataDto, IdxBizJgUseInfo useInfoNew) { static void setNewUseAddressInfo(ProjectContraptionChangeDataDto projectContraptionChangeDataDto, IdxBizJgUseInfo useInfoNew) {
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl; package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgConstructionInfoService; import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgConstructionInfoService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgConstructionInfoDto; import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgConstructionInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo;
...@@ -41,4 +42,20 @@ public class IdxBizJgConstructionInfoServiceImpl extends BaseService<IdxBizJgCon ...@@ -41,4 +42,20 @@ public class IdxBizJgConstructionInfoServiceImpl extends BaseService<IdxBizJgCon
} }
return result; return result;
} }
/**
* 查询最新的一条施工信息主键
* @param record 设备唯一标识
* @return 主键
*/
public IdxBizJgConstructionInfo queryNewestDetailIdByRecord(String record) {
IdxBizJgConstructionInfo result = new IdxBizJgConstructionInfo();
QueryWrapper<IdxBizJgConstructionInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(IdxBizJgConstructionInfo::getRecord,record).orderByDesc(IdxBizJgConstructionInfo::getUscDate).select(TzsBaseEntity::getSequenceNbr);
List<IdxBizJgConstructionInfo> constructionInfoList = list(queryWrapper);
if(!ValidationUtil.isEmpty(constructionInfoList)){
BeanUtils.copyProperties(constructionInfoList.get(0),result);;
}
return result;
}
} }
\ No newline at end of file
...@@ -43,6 +43,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext ...@@ -43,6 +43,7 @@ import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
import com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext; import com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext;
import com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingEditPermForCurrentUser; import com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingEditPermForCurrentUser;
import com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.useRegister.UseRegisterBackupManager; import com.yeejoin.amos.boot.module.jg.biz.edit.process.biz.useRegister.UseRegisterBackupManager;
import com.yeejoin.amos.boot.module.jg.biz.edit.typeHandler.PieLineLevelTypeHandler;
import com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent; import com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent;
import com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher; import com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient; import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
...@@ -262,6 +263,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -262,6 +263,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
@Autowired @Autowired
private IdxBizJgTechParamsPipelineServiceImpl idxBizJgTechParamsPipelineServiceImpl; private IdxBizJgTechParamsPipelineServiceImpl idxBizJgTechParamsPipelineServiceImpl;
@Autowired
private PieLineLevelTypeHandler pieLineLevelTypeHandler;
/** /**
* @param auditPassDate 通过时间 * @param auditPassDate 通过时间
...@@ -1275,6 +1279,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1275,6 +1279,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
for (Map<String, Object> piePine : piePines) { for (Map<String, Object> piePine : piePines) {
JSONObject item = JSONObject.parseObject(JSON.toJSONString(piePine)); JSONObject item = JSONObject.parseObject(JSON.toJSONString(piePine));
IdxBizJgTechParamsPipeline pipeline = new IdxBizJgTechParamsPipeline(); IdxBizJgTechParamsPipeline pipeline = new IdxBizJgTechParamsPipeline();
pipeline.setDeviceLevel(pieLineLevelTypeHandler.getCodeByName(item.getString("deviceLevel")));
pipeline.setPipeName(item.getString("pipeName"));
pipeline.setPipelineNumber(item.getString("pipelineNumber"));
pipeline.setMedium(item.getString("medium")); pipeline.setMedium(item.getString("medium"));
pipeline.setPressure(item.getString("pressure")); pipeline.setPressure(item.getString("pressure"));
pipeline.setNominalDiameter(item.getString("nominalDiameter")); pipeline.setNominalDiameter(item.getString("nominalDiameter"));
...@@ -1295,11 +1302,11 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1295,11 +1302,11 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
idxBizJgDesignInfoService.update(lambdaDes); idxBizJgDesignInfoService.update(lambdaDes);
// 安装信息修改 // 安装信息修改
if (item.getString("constructionInfoSeq") != null) { if (item.getString("constructionInfoSeq") != null) {
LambdaUpdateWrapper<IdxBizJgConstructionInfo> updateWrapper1 = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<IdxBizJgConstructionInfo> constructionInfoLambdaUpdateWrapper = new LambdaUpdateWrapper<>();
updateWrapper1.eq(TzsBaseEntity::getSequenceNbr, item.getString("constructionInfoSeq")); constructionInfoLambdaUpdateWrapper.eq(TzsBaseEntity::getSequenceNbr, item.getString("constructionInfoSeq"));
updateWrapper1.set(IdxBizJgConstructionInfo::getUscUnitName, item.getString("uscUnitName")); constructionInfoLambdaUpdateWrapper.set(IdxBizJgConstructionInfo::getUscUnitName, item.getString("uscUnitName"));
updateWrapper1.set(IdxBizJgConstructionInfo::getUscDate, ValidationUtil.isEmpty(item.getString("uscDate")) ? null : DateUtil.parse(item.getString("uscDate"), DatePattern.NORM_MONTH_FORMAT)); constructionInfoLambdaUpdateWrapper.set(IdxBizJgConstructionInfo::getUscDate, ValidationUtil.isEmpty(item.getString("uscDate")) ? null : DateUtil.parse(item.getString("uscDate"), DatePattern.NORM_MONTH_FORMAT));
idxBizJgConstructionInfoService.update(updateWrapper1); idxBizJgConstructionInfoService.update(constructionInfoLambdaUpdateWrapper);
} }
} }
} }
......
...@@ -271,7 +271,7 @@ public class IdxBizJgUseInfo extends TzsBaseEntity implements IBaseChangeData { ...@@ -271,7 +271,7 @@ public class IdxBizJgUseInfo extends TzsBaseEntity implements IBaseChangeData {
* 工程装置名称(工业管道使用) * 工程装置名称(工业管道使用)
*/ */
@TableField("\"PROJECT_CONTRAPTION\"") @TableField("\"PROJECT_CONTRAPTION\"")
@FieldDisplayDefine(value = "工程装置名称(工业管道使用)") @FieldDisplayDefine(value = "工程装置名称(工业管道使用)", isRepeatColumn = true)
private String projectContraption; private String projectContraption;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment