Commit ff4d6963 authored by suhuiguang's avatar suhuiguang

1.增加必填改成非必填的字段日期类型的,null字符串

parent e31a23a0
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl; ...@@ -3,6 +3,7 @@ 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.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapBuilder; import cn.hutool.core.map.MapBuilder;
import cn.hutool.core.map.MapUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -3350,10 +3351,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -3350,10 +3351,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper<IdxBizJgDesignInfo> lambdaDes = new QueryWrapper<IdxBizJgDesignInfo>().lambda(); LambdaQueryWrapper<IdxBizJgDesignInfo> lambdaDes = new QueryWrapper<IdxBizJgDesignInfo>().lambda();
lambdaDes.eq(IdxBizJgDesignInfo::getRecord, jgRelationEquip.getEquId()); lambdaDes.eq(IdxBizJgDesignInfo::getRecord, jgRelationEquip.getEquId());
IdxBizJgDesignInfo designInfo = idxBizJgDesignInfoService.getOne(lambdaDes); IdxBizJgDesignInfo designInfo = idxBizJgDesignInfoService.getOne(lambdaDes);
designInfo.setDesignUnitCreditCode(String.valueOf(map.get("designUnitCreditCode"))); designInfo.setDesignUnitCreditCode(MapUtil.getStr(map,"designUnitCreditCode"));
designInfo.setDesignUnitName(String.valueOf(map.get("designUnitName"))); designInfo.setDesignUnitName(MapUtil.getStr(map,"designUnitName"));
designInfo.setDesignLicenseNum(ObjectUtils.isEmpty(map.get("designLicenseNum")) ? null : String.valueOf(map.get("designLicenseNum"))); designInfo.setDesignLicenseNum(MapUtil.getStr(map,"designLicenseNum"));
designInfo.setDesignUseDate(String.valueOf(map.get("designUseDate"))); designInfo.setDesignUseDate(MapUtil.getStr(map, "designUseDate"));
designInfo.setDesignDate(!StringUtils.isEmpty(map.get("designDate")) ? DateUtil.parse(String.valueOf(map.get("designDate")), "yyyy-MM-dd") : null); designInfo.setDesignDate(!StringUtils.isEmpty(map.get("designDate")) ? DateUtil.parse(String.valueOf(map.get("designDate")), "yyyy-MM-dd") : null);
designInfo.setDrawingDo(ObjectUtils.isEmpty(map.get("drawingDo")) ? null : String.valueOf(map.get("drawingDo"))); designInfo.setDrawingDo(ObjectUtils.isEmpty(map.get("drawingDo")) ? null : String.valueOf(map.get("drawingDo")));
designInfo.setAppraisalUnit(ObjectUtils.isEmpty(map.get("appraisalUnit")) ? null : String.valueOf(map.get("appraisalUnit"))); designInfo.setAppraisalUnit(ObjectUtils.isEmpty(map.get("appraisalUnit")) ? null : String.valueOf(map.get("appraisalUnit")));
...@@ -3368,10 +3369,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -3368,10 +3369,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper<IdxBizJgFactoryInfo> factoryInfoWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<IdxBizJgFactoryInfo> factoryInfoWrapper = new LambdaQueryWrapper<>();
factoryInfoWrapper.eq(IdxBizJgFactoryInfo::getRecord, jgRelationEquip.getEquId()); factoryInfoWrapper.eq(IdxBizJgFactoryInfo::getRecord, jgRelationEquip.getEquId());
IdxBizJgFactoryInfo idxBizJgFactoryInfo = idxBizJgFactoryInfoService.getOne(factoryInfoWrapper); IdxBizJgFactoryInfo idxBizJgFactoryInfo = idxBizJgFactoryInfoService.getOne(factoryInfoWrapper);
idxBizJgFactoryInfo.setProduceUnitCreditCode(String.valueOf(map.get("produceUnitCreditCode"))); idxBizJgFactoryInfo.setProduceUnitCreditCode(MapUtil.getStr(map, "produceUnitCreditCode"));
idxBizJgFactoryInfo.setProduceUnitName(String.valueOf(map.get("produceUnitName"))); idxBizJgFactoryInfo.setProduceUnitName(MapUtil.getStr(map, "produceUnitName"));
idxBizJgFactoryInfo.setFactoryNum(String.valueOf(map.get("factoryNum"))); idxBizJgFactoryInfo.setFactoryNum(MapUtil.getStr(map, "factoryNum"));
idxBizJgFactoryInfo.setProduceLicenseNum(String.valueOf(map.get("produceLicenseNum"))); idxBizJgFactoryInfo.setProduceLicenseNum(MapUtil.getStr(map, "produceLicenseNum"));
idxBizJgFactoryInfo.setProduceDate(!StringUtils.isEmpty(map.get("produceDate")) ? DateUtil.parse(String.valueOf(map.get("produceDate")), "yyyy-MM-dd") : null); idxBizJgFactoryInfo.setProduceDate(!StringUtils.isEmpty(map.get("produceDate")) ? DateUtil.parse(String.valueOf(map.get("produceDate")), "yyyy-MM-dd") : null);
idxBizJgFactoryInfo.setImported(ObjectUtils.isEmpty(map.get("imported")) ? null : String.valueOf(map.get("imported"))); idxBizJgFactoryInfo.setImported(ObjectUtils.isEmpty(map.get("imported")) ? null : String.valueOf(map.get("imported")));
idxBizJgFactoryInfo.setProduceCountry(ObjectUtils.isEmpty(map.get("produceCountry")) ? null : String.valueOf(map.get("produceCountry"))); idxBizJgFactoryInfo.setProduceCountry(ObjectUtils.isEmpty(map.get("produceCountry")) ? null : String.valueOf(map.get("produceCountry")));
...@@ -3425,12 +3426,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -3425,12 +3426,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if (ObjectUtils.isEmpty(inspectionDetectionInfo.getSequenceNbr())) { if (ObjectUtils.isEmpty(inspectionDetectionInfo.getSequenceNbr())) {
inspectionDetectionInfo.setRecord((String) map.get("equipId")); inspectionDetectionInfo.setRecord((String) map.get("equipId"));
} }
inspectionDetectionInfo.setInspectOrgCode(String.valueOf(map.get("inspectOrgCode"))); inspectionDetectionInfo.setInspectOrgCode(MapUtil.getStr(map, "inspectOrgCode"));
inspectionDetectionInfo.setInspectOrgName(String.valueOf(map.get("inspectOrgName"))); inspectionDetectionInfo.setInspectOrgName(MapUtil.getStr(map, "inspectOrgName"));
inspectionDetectionInfo.setInspectConclusion(String.valueOf(map.get("inspectConclusion"))); inspectionDetectionInfo.setInspectConclusion(MapUtil.getStr(map,"inspectConclusion"));
inspectionDetectionInfo.setInspectType(String.valueOf(map.get("inspectType"))); inspectionDetectionInfo.setInspectType(MapUtil.getStr(map, "inspectType"));
inspectionDetectionInfo.setInspectDate(!StringUtils.isEmpty(map.get("inspectDate")) ? DateUtil.parse(String.valueOf(map.get("inspectDate")), "yyyy-MM-dd") : null); inspectionDetectionInfo.setInspectDate(!StringUtils.isEmpty(map.get("inspectDate")) ? DateUtil.parse(String.valueOf(map.get("inspectDate")), "yyyy-MM-dd") : null);
inspectionDetectionInfo.setInspectStaff(String.valueOf(map.get("inspectStaff"))); inspectionDetectionInfo.setInspectStaff(MapUtil.getStr(map, "inspectStaff"));
inspectionDetectionInfo.setNextInspectDate(!StringUtils.isEmpty(map.get("nextInspectDate")) ? DateUtil.parse(String.valueOf(map.get("nextInspectDate")), "yyyy-MM-dd") : null); inspectionDetectionInfo.setNextInspectDate(!StringUtils.isEmpty(map.get("nextInspectDate")) ? DateUtil.parse(String.valueOf(map.get("nextInspectDate")), "yyyy-MM-dd") : null);
inspectionDetectionInfo.setInspectReport(JSONObject.toJSONString(map.get("inspectReport"))); inspectionDetectionInfo.setInspectReport(JSONObject.toJSONString(map.get("inspectReport")));
iIdxBizJgInspectionDetectionInfoService.saveOrUpdateData(inspectionDetectionInfo); iIdxBizJgInspectionDetectionInfoService.saveOrUpdateData(inspectionDetectionInfo);
......
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