Commit b6f487dd authored by 刘林's avatar 刘林

fix(jg):证号超长,车用气瓶报错问题处理

parent 0a7a10de
package com.yeejoin.amos.boot.module.jg.biz.service.impl; package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapBuilder; import cn.hutool.core.map.MapBuilder;
...@@ -463,7 +464,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -463,7 +464,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
return ResponseHelper.buildResponse(batchSubmitOrUpdatePipeline(equipmentInfoForm, submitType)); return ResponseHelper.buildResponse(batchSubmitOrUpdatePipeline(equipmentInfoForm, submitType));
} catch (Exception e) { } catch (Exception e) {
log.error("操作失败,数据异常: {}", e.getMessage(), e); log.error("操作失败,数据异常: {}", e.getMessage(), e);
handleError(e, String.valueOf(paramMap.getOrDefault(SEQUENCE_NBR, "未知序号"))); handleError(e, String.valueOf(paramMap.getOrDefault(SEQUENCE_NBR, "")));
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
} }
} }
...@@ -1089,10 +1090,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1089,10 +1090,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if(!PipelineEnum.PRESSURE_PIPELINE.getCode().equals(map.get("equList"))) { if(!PipelineEnum.PRESSURE_PIPELINE.getCode().equals(map.get("equList"))) {
this.checkForDelete(records); this.checkForDelete(records);
} }
if (CollUtil.isNotEmpty(records)) {
// 删除涉及的19张表的数据 // 删除涉及的19张表的数据
superviseInfoMapper.deleteDataAll(records); superviseInfoMapper.deleteDataAll(records);
}
if (CollUtil.isNotEmpty(list)) {
// 删除es中的数据 // 删除es中的数据
esEquipmentCategory.deleteAll(list); esEquipmentCategory.deleteAll(list);
}
return true; return true;
} }
......
...@@ -374,6 +374,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -374,6 +374,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
equips.forEach(equip -> { equips.forEach(equip -> {
Map<String, Object> objectHashMap = new HashMap<>(); Map<String, Object> objectHashMap = new HashMap<>();
BeanUtil.beanToMap(equip, objectHashMap, false, false); BeanUtil.beanToMap(equip, objectHashMap, false, false);
objectHashMap.replaceAll((k, v) -> v == null ? "" : v);
objectHashMap.put("record", equip.getSEQUENCE_NBR()); objectHashMap.put("record", equip.getSEQUENCE_NBR());
objectHashMap.put("ADDRESS", concatDetailAddress(equip)); objectHashMap.put("ADDRESS", concatDetailAddress(equip));
arrayList.add(objectHashMap); arrayList.add(objectHashMap);
......
...@@ -2126,7 +2126,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -2126,7 +2126,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// 更新设备信息 // 更新设备信息
this.updateEquipInfo(vehicleInformation, registerInfo, otherInfo, String.valueOf(x.get("record"))); this.updateEquipInfo(vehicleInformation, registerInfo, otherInfo, String.valueOf(x.get("record")));
// 更新es // 更新es
this.updateEquipEsData(vehicleInformation, otherInfo, registerInfo, String.valueOf(x.get("record"))); this.updateEquipEsData(vehicleInformation, otherInfo, registerInfo, String.valueOf(x.get("record")), useInfo);
// 查询设备制造信息 // 查询设备制造信息
LambdaQueryWrapper<IdxBizJgFactoryInfo> factoryInfoWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<IdxBizJgFactoryInfo> factoryInfoWrapper = new LambdaQueryWrapper<>();
factoryInfoWrapper.eq(IdxBizJgFactoryInfo::getRecord, String.valueOf(x.get("record"))); factoryInfoWrapper.eq(IdxBizJgFactoryInfo::getRecord, String.valueOf(x.get("record")));
...@@ -2343,7 +2343,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -2343,7 +2343,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// 更新设备信息 // 更新设备信息
this.updateEquipInfo(vehicleInformation, registerInfo, otherInfo, String.valueOf(x.get("record"))); this.updateEquipInfo(vehicleInformation, registerInfo, otherInfo, String.valueOf(x.get("record")));
// 更新es // 更新es
this.updateEquipEsData(vehicleInformation, otherInfo, registerInfo, String.valueOf(x.get("record"))); this.updateEquipEsData(vehicleInformation, otherInfo, registerInfo, String.valueOf(x.get("record")), useInfo);
// 查询设备制造信息 // 查询设备制造信息
LambdaQueryWrapper<IdxBizJgFactoryInfo> factoryInfoWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<IdxBizJgFactoryInfo> factoryInfoWrapper = new LambdaQueryWrapper<>();
factoryInfoWrapper.eq(IdxBizJgFactoryInfo::getRecord, String.valueOf(x.get("record"))); factoryInfoWrapper.eq(IdxBizJgFactoryInfo::getRecord, String.valueOf(x.get("record")));
...@@ -2412,7 +2412,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -2412,7 +2412,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
this.createCode(jgVehicleInformation, registerInfo, otherInfo); this.createCode(jgVehicleInformation, registerInfo, otherInfo);
} }
private void updateEquipEsData(JgVehicleInformation jgVehicleInformation, IdxBizJgOtherInfo otherInfo, IdxBizJgRegisterInfo registerInfo, String equId) { private void updateEquipEsData(JgVehicleInformation jgVehicleInformation, IdxBizJgOtherInfo otherInfo,
IdxBizJgRegisterInfo registerInfo, String equId ,IdxBizJgUseInfo useInfo) {
// 更新es // 更新es
HashMap<String, Map<String, Object>> objMap = new HashMap<>(); HashMap<String, Map<String, Object>> objMap = new HashMap<>();
HashMap<String, Object> param = new HashMap<>(); HashMap<String, Object> param = new HashMap<>();
...@@ -2422,7 +2423,9 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -2422,7 +2423,9 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
//param.put("ADDRESS", otherInfo.get); //param.put("ADDRESS", otherInfo.get);
param.put("USE_PLACE", jgVehicleInformation.getUseUnitAddress()); param.put("USE_PLACE", jgVehicleInformation.getUseUnitAddress());
param.put("STATUS", "已认领"); param.put("STATUS", "已认领");
param.put("EQU_STATE", 1); if (useInfo.getEquState() == null) {
param.putIfAbsent("EQU_STATE", 1);
}
param.put("IS_INTO_MANAGEMENT", true); param.put("IS_INTO_MANAGEMENT", true);
param.put("ORG_BRANCH_CODE", jgVehicleInformation.getOrgBranchCode()); param.put("ORG_BRANCH_CODE", jgVehicleInformation.getOrgBranchCode());
param.put("ORG_BRANCH_NAME", jgVehicleInformation.getOrgBranchName()); param.put("ORG_BRANCH_NAME", jgVehicleInformation.getOrgBranchName());
......
...@@ -871,7 +871,7 @@ ...@@ -871,7 +871,7 @@
<w:sz w:val="24"/> <w:sz w:val="24"/>
</w:rPr> </w:rPr>
<w:pict> <w:pict>
<v:shape id="文本框 20" o:spid="_x0000_s1029" o:spt="202" type="#_x0000_t202" style="position:absolute;left:0pt;margin-left:254.45pt;margin-top:132.1pt;height:20.5pt;width:165.5pt;z-index:251678720;mso-width-relative:page;mso-height-relative:page;" fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600"> <v:shape id="文本框 20" o:spid="_x0000_s1029" o:spt="202" type="#_x0000_t202" style="position:absolute;left:0pt;margin-left:254.45pt;margin-top:132.1pt;height:20.5pt;width:275.5pt;z-index:251678720;mso-width-relative:page;mso-height-relative:page;" fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600">
<v:path/> <v:path/>
<v:fill on="t" color2="#FFFFFF" focussize="0,0"/> <v:fill on="t" color2="#FFFFFF" focussize="0,0"/>
<v:stroke on="f" weight="0.5pt"/> <v:stroke on="f" weight="0.5pt"/>
......
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