Commit 99e24d78 authored by 刘林's avatar 刘林

fix(jg):车用气瓶bug修改

parent 3cbd6301
......@@ -1492,7 +1492,7 @@ public class DataDockServiceImpl {
? "jg_pl"
: "his".equals(equipmentInfoForm.get("DATA_SOURCE"))
? "jg_his_pl"
: "jg_black_pl";
: "jg_his_black_pl";
Arrays.stream(equipInfoExcelDtos.toArray(new EquipInfoExcelDto[0])).forEach(equ -> {
if (!equ.getEquList().equals(equList) || !equ.getEquCategory().equals(equCategory)){
......
......@@ -2121,8 +2121,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
boolMust.must(meBuilder);
// 查询下次检验日期大于当前天的设备
long currentDayTime = DateUtil.parse(DateUtil.now(), "yyy-MM-dd").getTime();
boolMust.must(QueryBuilders.rangeQuery("NEXT_INSPECT_DATE").gte(currentDayTime));
//long currentDayTime = DateUtil.parse(DateUtil.now(), "yyy-MM-dd").getTime();
//boolMust.must(QueryBuilders.rangeQuery("NEXT_INSPECT_DATE").gte(currentDayTime));
// DATA_SOURCE 为“jg”开头的数据(从监管新加或复制的设备)
// 20240314 提出的监管业务不要让企业用户选到之前一码通认领或补录的设备,让从监管业务中去新增
......@@ -3718,7 +3718,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Map<String, Object> fillingMediumMap = fillingMedium.stream().collect(Collectors.toMap(DictionarieValueModel::getDictDataKey, DictionarieValueModel::getDictDataValue));
Page<JSONObject> result = jgUseRegistrationMapper.queryForUnitVesselEquipmentPage(page, jsonObject, recordList);
result.getRecords().forEach(i -> {
i.put("chargingMedium", fillingMediumMap.get(i.get("chargingMedium")));
i.put("chargingMedium", Optional.ofNullable(fillingMediumMap.get(i.get("chargingMedium"))).orElse(""));
i.put("productPhoto", JSONArray.parseArray(i.getString("productPhoto")));
i.put("cylinderStampAttachment", JSONArray.parseArray(i.getString("cylinderStampAttachment")));
i.put("informationSituation",InformationManageTypeEnum.getName(i.getString("informationSituation")));
......
......@@ -356,7 +356,15 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
BigDecimal totalVolume = Optional.ofNullable(equipmentLists)
.orElse(Collections.emptyList())
.stream()
.map(x -> new BigDecimal(String.valueOf(x.get("singleBottleVolume"))))
.map(x -> {
Object volume = x.get("singleBottleVolume");
try {
return volume != null ? new BigDecimal(volume.toString()) : BigDecimal.ZERO;
} catch (NumberFormatException e) {
// 如果数据非法(如 "null" 或其他非数字字符串),记个日志或置 0
return BigDecimal.ZERO;
}
})
.reduce(BigDecimal.ZERO, BigDecimal::add);
vehicleInformation.setVolume(totalVolume.toPlainString());
......
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