Commit f0531405 authored by 韩桐桐's avatar 韩桐桐

fix(jg):台套的历史设备登记

parent 84aa64e4
......@@ -2476,11 +2476,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 使用登记信息
JgUseRegistration jgUseRegistration = new JgUseRegistration();
jgUseRegistration.setRegDate(new Date());
LambdaQueryWrapper<IdxBizJgOtherInfo> otherLambda = new QueryWrapper<IdxBizJgOtherInfo>().lambda();
otherLambda.eq(IdxBizJgOtherInfo::getRecord, map.get("equipId"));
IdxBizJgOtherInfo otherInfo = otherInfoMapper.selectOne(otherLambda);
String supervisoryCode = otherInfo.getSupervisoryCode();
jgUseRegistration.setSupervisoryCode(supervisoryCode);
if (!ObjectUtils.isEmpty(map.get("otherAccessories"))) {
jgUseRegistration.setOtherAccessories(JSONObject.toJSONString(map.get("otherAccessories")));
}
......@@ -2587,7 +2583,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper<IdxBizJgRegisterInfo> lambdaReg = new QueryWrapper<IdxBizJgRegisterInfo>().lambda();
lambdaReg.eq(IdxBizJgRegisterInfo::getRecord, jgRelationEquip.getEquId());
IdxBizJgRegisterInfo registerInfo = idxBizJgRegisterInfoMapper.selectOne(lambdaReg);
registerInfo.setUseOrgCode(ValidationUtil.isEmpty(map.get("useRegistrationCode")) ? "" : String.valueOf(map.get("useRegistrationCode")));
registerInfo.setUseOrgCode(jgUseRegistration.getUseRegistrationCode());
idxBizJgRegisterInfoMapper.updateById(registerInfo);
// 查询设备制造信息
LambdaQueryWrapper<IdxBizJgFactoryInfo> factoryInfoWrapper = new LambdaQueryWrapper<>();
......@@ -2615,6 +2612,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
useInfo.setEstateUnitCreditCode(String.valueOf(map.get("estateUnitName")).split("_")[0]);
useInfo.setEstateUnitName(String.valueOf(map.get("estateUnitName")).split("_")[1]);
useInfoMapper.updateById(useInfo);
LambdaQueryWrapper<IdxBizJgOtherInfo> otherLambda = new QueryWrapper<IdxBizJgOtherInfo>().lambda();
otherLambda.eq(IdxBizJgOtherInfo::getRecord, map.get("equipId"));
IdxBizJgOtherInfo otherInfo = otherInfoMapper.selectOne(otherLambda);
// 生成监管码 96333码
this.createCode(map, jgUseRegistration, registerInfo, useInfo, otherInfo);
// 更新es
updateEsData(usePlace, map, otherInfo, jgUseRegistration, map);
......
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