Commit 01422e0d authored by suhuiguang's avatar suhuiguang

1.编辑功能增加是否资料齐全功能

2.历史有证编辑增加单位内编号
parent a697164b
......@@ -43,4 +43,7 @@ public class EquipDesignChangeDataDto extends BaseChangeDataDto {
@FieldDisplayDefine(value = "其他附件", type = JSON.class)
private String otherAccessoriesDes;
@FieldDisplayDefine(value = "设计资料是否完整齐全")
private String designIsComplete;
}
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine;
import com.yeejoin.amos.boot.biz.common.annotation.Group;
import lombok.Data;
......@@ -49,4 +50,7 @@ public class EquipFactoryChangeDataDto extends BaseChangeDataDto {
@FieldDisplayDefine(value = "锅炉能效证明文件", type = JSON.class)
private String boilerEnergyEfficiencyCertificate;
@FieldDisplayDefine(value = "制造资料是否完整齐全")
private String factoryIsComplete;
}
......@@ -19,4 +19,7 @@ public class EquipUseInfoChangeDataDto extends BaseChangeDataDto {
@FieldDisplayDefine(value = "单位内部编号")
private String useInnerCode;
@FieldDisplayDefine(value = "设备来源", isExist = false)
private String dataSource;
}
......@@ -72,6 +72,7 @@ public class EquipChangeDataUpdateService {
updateWrapper.set(IdxBizJgDesignInfo::getAppraisalDate, equipDesignChangeDataDto.getAppraisalDate());
updateWrapper.set(IdxBizJgDesignInfo::getDrawingDo, equipDesignChangeDataDto.getDrawingDo());
updateWrapper.set(IdxBizJgDesignInfo::getDesignStandard, equipDesignChangeDataDto.getDesignStandard());
updateWrapper.set(equipDesignChangeDataDto.getDesignIsComplete() != null , IdxBizJgDesignInfo::getDesignIsComplete, equipDesignChangeDataDto.getDesignIsComplete());
idxBizJgDesignInfoMapper.update(null, updateWrapper);
}
......@@ -92,6 +93,7 @@ public class EquipChangeDataUpdateService {
updateWrapper.set(IdxBizJgFactoryInfo::getImported, equipFactoryChangeDataDto.getImported());
updateWrapper.set(IdxBizJgFactoryInfo::getInsUseMaintainExplain, equipFactoryChangeDataDto.getInsUseMaintainExplain());
updateWrapper.set(IdxBizJgFactoryInfo::getBoilerEnergyEfficiencyCertificate, equipFactoryChangeDataDto.getBoilerEnergyEfficiencyCertificate());
updateWrapper.set(equipFactoryChangeDataDto.getFactoryIsComplete() != null, IdxBizJgFactoryInfo::getFactoryIsComplete, equipFactoryChangeDataDto.getFactoryIsComplete());
jgFactoryInfoMapper.update(null, updateWrapper);
this.updateFactoryEsData(record, equipFactoryChangeDataDto);
}
......
......@@ -4520,4 +4520,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
public JSONObject getHisData(JgUseRegistration jgUseRegistration){
return commonService.queryHistoryData(jgUseRegistration.getSequenceNbr());
}
public IdxBizJgUseInfo getUseInfo(String record){
LambdaQueryWrapper<IdxBizJgUseInfo> lambda = new QueryWrapper<IdxBizJgUseInfo>().lambda();
lambda.eq(IdxBizJgUseInfo::getRecord, record);
return useInfoMapper.selectOne(lambda);
}
}
\ No newline at end of file
......@@ -57,6 +57,7 @@ public class SingleDataChangeProcessStrategy implements IChangeDataProcessStrate
EquipRegisterChangeDataDto registerChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipRegisterChangeDataDto.class);
EquipFactoryChangeDataDto factoryChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipFactoryChangeDataDto.class);
EquipDesignChangeDataDto designChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipDesignChangeDataDto.class);
EquipUseInfoChangeDataDto useInfoChangeDataDto = commonEquipDataProcessService.castMap2Bean(changeData, EquipUseInfoChangeDataDto.class);
commonEquipDataProcessService.buildChangeFields(record, designChangeDataDto, factoryChangeDataDto, registerChangeDataDto, allChangeColumns);
// 前置校验
commonEquipDataProcessService.checkValidField(record, registerChangeDataDto, null, null, null);
......@@ -66,6 +67,7 @@ public class SingleDataChangeProcessStrategy implements IChangeDataProcessStrate
commonEquipDataProcessService.dealBizDataForEquip(record, registerChangeDataDto);
commonEquipDataProcessService.dealBizDataForEquip(record, factoryChangeDataDto);
commonEquipDataProcessService.dealBizDataForEquip(record, designChangeDataDto);
commonEquipDataProcessService.dealBizDataForEquip(record, useInfoChangeDataDto);
// 设备技术参数入库处理
commonEquipDataProcessService.updateTechParamInfo(registerChangeDataDto, record, changeData, allChangeColumns);
// 更新单据对应的证信息
......@@ -129,11 +131,14 @@ public class SingleDataChangeProcessStrategy implements IChangeDataProcessStrate
BaseTechParamsFieldDto techParamsFieldDto = commonEquipDataProcessService.buildTechParamInfo(equipRegisterChangeDataDto, record);
// 其他信息:目前为气瓶的信息化情况
EquipOtherInfoChangeDataDto otherInfoChangeDataDto = commonEquipDataProcessService.buildOtherInfo(record);
// 使用信息
EquipUseInfoChangeDataDto equipUseInfoChangeDataDto = commonEquipDataProcessService.buildUseInfo(record);
re.putAll(BeanUtil.beanToMap(equipRegisterChangeDataDto));
re.putAll(BeanUtil.beanToMap(factoryChangeDataDto));
re.putAll(BeanUtil.beanToMap(designChangeDataDto));
re.putAll(BeanUtil.beanToMap(techParamsFieldDto));
re.putAll(BeanUtil.beanToMap(otherInfoChangeDataDto));
re.putAll(BeanUtil.beanToMap(equipUseInfoChangeDataDto));
commonEquipDataProcessService.castJsonFields(re);
return commonEquipDataProcessService.cast2UnderCase(re);
}
......
......@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.InformationManageTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper;
import com.yeejoin.amos.feign.systemctl.Systemctl;
......@@ -65,6 +66,9 @@ public class UseRegisterUpdateService {
String record = useRegistrationService.setDefaultRecord(jgUseRegistration, null);
// 更新 设计、制造、基本信息json
useRegistrationService.fillLastEquipBaseInfo(jsonObject, record);
IdxBizJgUseInfo useInfo = useRegistrationService.getUseInfo(record);
// 更新单位内部编号
jsonObject.put("useInnerCode", useInfo.getUseInnerCode());
// 补充"车牌号"字段
LambdaQueryWrapper<IdxBizJgRegisterInfo> wrapper = new QueryWrapper<IdxBizJgRegisterInfo>().lambda().eq(IdxBizJgRegisterInfo::getRecord, record);
IdxBizJgRegisterInfo idxBizJgRegisterInfo = idxBizJgRegisterInfoMapper.selectOne(wrapper);
......
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