From e3994645c6ec0a90fc9bb9d546b12b7a3a4c0995 Mon Sep 17 00:00:00 2001 From: fanzongzhe <285169773@qq.com> Date: Wed, 1 Nov 2023 15:36:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=8F=E8=BD=A6=E8=B5=84=E6=96=99=E4=BA=A4?= =?UTF-8?q?=E6=8E=A5=E4=BF=AE=E6=94=B9=E6=B1=BD=E8=BD=A6=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E8=B4=A8=E9=87=8F=E8=AF=81=E6=98=8E=E4=B9=A6=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commoncontract/CommonContractService.java | 42 +-- .../BusVehicleInformation.java | 16 +- .../AppSaveDataDto.java | 14 +- .../BusVehicleInformationHandover.java | 2 +- .../BusVehicleInformationHandoverDto.java | 2 +- .../BusVehicleInformationHandoverService.java | 259 +++++++++--------- 6 files changed, 174 insertions(+), 161 deletions(-) diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java index 84de54018c..0cf2ca30c4 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java @@ -2054,9 +2054,9 @@ public class CommonContractService extends MybatisBaseService future10 = pool.submit(() -> { - return getRisk(appOrderDetailsVo,dto); + return getRisk(appOrderDetailsVo, dto); }); List filesList = new ArrayList<>(); if (StringUtils.isNotBlank(future10.get())) { @@ -2620,7 +2620,7 @@ public class CommonContractService extends MybatisBaseService maniFestBeanList; private String orgPath; @ApiModelProperty("车钥匙个数") - private Integer vehicleKeyNum; // 车钥匙个数 + private String vehicleKeyNum; // 车钥匙个数 @ApiModelProperty("一致性证书0无1有") - private Integer certificate; // 一致性证书0无1有 + private String certificate; // 一致性证书0无1有 @ApiModelProperty("申请表0无1有") - private Integer applyForm; // 申请表0无1有 + private String applyForm; // 申请表0无1有 @ApiModelProperty("保修手册、说明书0无1有") - private Integer manual; // 保修手册、说明书0无1有 + private String manual; // 保修手册、说明书0无1有 @ApiModelProperty("环保清单0无1有") - private Integer environmentalList; // 环保清单0无1有 + private String environmentalList; // 环保清单0无1有 @ApiModelProperty("驾驶员卡0无1有") - private Integer dirverCard; // 驾驶员卡0无1有 + private String dirverCard; // 驾驶员卡0无1有 @ApiModelProperty("气瓶产品质量证明书(燃气车)0无1有") - private Integer gasCertificate; // 气瓶产品质量证明书(燃气车)0无1有 + private String gasCertificate; // 气瓶产品质量证明书(燃气车)0无1有 @ApiModelProperty("交接资料") private String vehicleHandoverData; // @ApiModelProperty("移交备注") diff --git a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandover.java b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandover.java index 02b3674e12..0be75470fc 100644 --- a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandover.java +++ b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandover.java @@ -48,7 +48,7 @@ public class BusVehicleInformationHandover extends BaseEntity { @ApiModelProperty("关联业务sid") private String busSid; @ApiModelProperty("是否是燃气车 0不是1是") - private Integer isFuelVehicle; // 是否是燃气车 0不是1是 + private String isFuelVehicle; // 是否是燃气车 0不是1是 @ApiModelProperty("使用组织全路径") private String orgSidPath; @ApiModelProperty("接收人sid") diff --git a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverDto.java b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverDto.java index 0fb01d1896..618af01b03 100644 --- a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverDto.java +++ b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverDto.java @@ -53,7 +53,7 @@ public class BusVehicleInformationHandoverDto implements Dto { @ApiModelProperty("随车资料") private BusVehicleInformationDto busVehicleInformation; @ApiModelProperty("是否是燃气车 0不是1是") - private Integer isFuelVehicle; // 是否是燃气车 0不是1是 + private String isFuelVehicle; // 是否是燃气车 0不是1是 @ApiModelProperty("是否完成") private Boolean complete; // ture/false 完成/未完成 @ApiModelProperty("是否修改状态") diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverService.java index c81cf57356..537b6003f2 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverService.java @@ -35,6 +35,7 @@ import com.yxt.messagecenter.api.message.MessagePushTransferDto; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.ArrayList; @@ -78,6 +79,7 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService saveOrUpdate(BusVehicleInformationHandoverDto dto) { ResultBean rb = ResultBean.fireFail(); if (StringUtils.isNotBlank(dto.getSid())) { @@ -109,19 +111,23 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService 0) { - Integer num = busVehicleInformation.getVehicleKeyNum(); - int value = num.intValue(); + if (StringUtils.isNotBlank(busVehicleInformation.getVehicleKeyNum())) { + String vehicleKeyNum = busVehicleInformation.getVehicleKeyNum(); + int value = Integer.parseInt(vehicleKeyNum); str.append("车钥匙" + value + "把、"); } //一致性证书 - if (busVehicleInformation.getCertificate() > 0) { - str.append("一致性证书、"); + if (StringUtils.isNotBlank(busVehicleInformation.getCertificate())) { + if (busVehicleInformation.getCertificate().equals("1")) { + str.append("一致性证书、"); + } } //申请表 - if (busVehicleInformation.getApplyForm() > 0) { - str.append("申请表、"); + if (StringUtils.isNotBlank(busVehicleInformation.getApplyForm())) { + if (busVehicleInformation.getApplyForm().equals("1")) { + str.append("申请表、"); + } } //保修手册、说明书 - if (busVehicleInformation.getManual() > 0) { - str.append("保修手册、说明书、"); + if (StringUtils.isNotBlank(busVehicleInformation.getManual())) { + if (busVehicleInformation.getManual().equals("1")) { + str.append("保修手册、说明书、"); + } } //环保清单 - - if (busVehicleInformation.getEnvironmentalList() > 0) { - str.append("环保清单、"); + if (StringUtils.isNotBlank(busVehicleInformation.getEnvironmentalList())) { + if (busVehicleInformation.getEnvironmentalList().equals("1")) { + str.append("环保清单、"); + } } //驾驶员卡 - if (busVehicleInformation.getDirverCard() > 0) { - str.append("驾驶员卡、"); + if (StringUtils.isNotBlank(busVehicleInformation.getDirverCard())) { + if (busVehicleInformation.getDirverCard().equals("1")) { + str.append("驾驶员卡、"); + } } - if (null != busVehicleInformation.getGasCertificate()) { - if (busVehicleInformation.getGasCertificate() > 0) { - if (busVehicleInformation.getIsFuelVehicle() == 0) { - str.append("气瓶检测合格证、"); - } + //气瓶合格证 + if (StringUtils.isNotBlank(busVehicleInformation.getGasCertificate())) { + if (busVehicleInformation.getGasCertificate().equals("1")) { + str.append("气瓶质量证明书、LNG/CNG 汽车气瓶及供气系统安装检验合格证、车用气瓶安装监督检验证书、"); } } str.delete(str.length() - 1, str.length()); @@ -223,25 +240,22 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService informationList = busVehicleInformationService.getByHandoverSid(dto.getSid()); - if (null != informationList && informationList.size() > 0) { + informationList.removeAll(Collections.singleton(null)); + if (!informationList.isEmpty()) { for (BusVehicleInformation busVehicleInformation : informationList) { if ("001".equals(busVehicleInformation.getHandoverNum())) { - if (busVehicleInformation.getVehicleKeyNum() < 1 - || busVehicleInformation.getCertificate() < 1 - || busVehicleInformation.getApplyForm() < 1 - || busVehicleInformation.getManual() < 1 - || busVehicleInformation.getEnvironmentalList() < 1 - || busVehicleInformation.getDirverCard() < 1 + if ((StringUtils.isNotBlank(busVehicleInformation.getVehicleKeyNum()) && busVehicleInformation.getVehicleKeyNum().equals("0")) + || (StringUtils.isNotBlank(busVehicleInformation.getCertificate()) && busVehicleInformation.getCertificate().equals("0")) + || (StringUtils.isNotBlank(busVehicleInformation.getManual()) && busVehicleInformation.getManual().equals("0")) + || (StringUtils.isNotBlank(busVehicleInformation.getApplyForm()) && busVehicleInformation.getApplyForm().equals("0")) + || (StringUtils.isNotBlank(busVehicleInformation.getEnvironmentalList()) && busVehicleInformation.getEnvironmentalList().equals("0")) + || (StringUtils.isNotBlank(busVehicleInformation.getDirverCard()) && busVehicleInformation.getDirverCard().equals("0")) ) { entity.setCompleteState(0); } else { - if (null != busVehicleInformation.getGasCertificate()) { - if (busVehicleInformation.getGasCertificate() < 1) { - if (busVehicleInformation.getIsFuelVehicle() == 0) { - entity.setCompleteState(0); - } else { - entity.setCompleteState(1); - } + if (StringUtils.isNotBlank(busVehicleInformation.getGasCertificate()) && busVehicleInformation.getGasCertificate().equals("0")) { + if (busVehicleInformation.getIsFuelVehicle().equals("0")) { + entity.setCompleteState(0); } else { entity.setCompleteState(1); } @@ -262,9 +276,9 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService busVehicleInformations = busVehicleInformationService.getByHandoverSid(sid); - if (null != busVehicleInformations && busVehicleInformations.size() > 0) { + busVehicleInformations.removeAll(Collections.singleton(null)); + if (!busVehicleInformations.isEmpty()) { for (BusVehicleInformation informationServiceByHandoverSid : busVehicleInformations) { //第一次的记录编辑回显 if (times.equals("1") && informationServiceByHandoverSid.getHandoverNum().equals("001")) { BusVehicleInformationVo informationVo = new BusVehicleInformationVo(); BeanUtil.copyProperties(informationServiceByHandoverSid, informationVo, "id", "sid"); - if (null == informationServiceByHandoverSid.getApplyForm()) { + if (StringUtils.isBlank(informationServiceByHandoverSid.getApplyForm())) { informationVo.setApplyForm(""); } - if (null == informationServiceByHandoverSid.getCertificate()) { + if (StringUtils.isBlank(informationServiceByHandoverSid.getCertificate())) { informationVo.setCertificate(""); } - if (null == informationServiceByHandoverSid.getVehicleKeyNum()) { + if (StringUtils.isBlank(informationServiceByHandoverSid.getVehicleKeyNum())) { informationVo.setVehicleKeyNum(""); } - if (null == informationServiceByHandoverSid.getManual()) { + if (StringUtils.isBlank(informationServiceByHandoverSid.getManual())) { informationVo.setManual(""); } - if (null == informationServiceByHandoverSid.getEnvironmentalList()) { + if (StringUtils.isBlank(informationServiceByHandoverSid.getEnvironmentalList())) { informationVo.setEnvironmentalList(""); } - if (null == informationServiceByHandoverSid.getDirverCard()) { + if (StringUtils.isBlank(informationServiceByHandoverSid.getDirverCard())) { informationVo.setDirverCard(""); } - if (null == informationServiceByHandoverSid.getGasCertificate()) { + if (StringUtils.isBlank(informationServiceByHandoverSid.getGasCertificate())) { informationVo.setGasCertificate(""); } informationVo.setVehicleHandoverData(informationServiceByHandoverSid.getVehicleHandoverData()); @@ -399,59 +414,57 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService maniFestBeanList = dto.getManiFestBeanList(); for (AppManiFestBean appManiFestBean : maniFestBeanList) { if (appManiFestBean.getKey().equals("vehicLeKeyNum")) { - dto.setVehicleKeyNum(Integer.parseInt(appManiFestBean.getValue())); + dto.setVehicleKeyNum(appManiFestBean.getValue()); } if (appManiFestBean.getKey().equals("certificate")) { - dto.setCertificate(Integer.parseInt(appManiFestBean.getValue())); + dto.setCertificate(appManiFestBean.getValue()); } if (appManiFestBean.getKey().equals("applyForm")) { - dto.setApplyForm(Integer.parseInt(appManiFestBean.getValue())); + dto.setApplyForm(appManiFestBean.getValue()); } if (appManiFestBean.getKey().equals("manual")) { - dto.setManual(Integer.parseInt(appManiFestBean.getValue())); + dto.setManual(appManiFestBean.getValue()); } if (appManiFestBean.getKey().equals("environmentalList")) { - dto.setEnvironmentalList(Integer.parseInt(appManiFestBean.getValue())); + dto.setEnvironmentalList(appManiFestBean.getValue()); } if (appManiFestBean.getKey().equals("dirverCard")) { - dto.setDirverCard(Integer.parseInt(appManiFestBean.getValue())); + dto.setDirverCard(appManiFestBean.getValue()); } if (appManiFestBean.getKey().equals("gasCertificate")) { - dto.setGasCertificate(Integer.parseInt(appManiFestBean.getValue())); + dto.setGasCertificate(appManiFestBean.getValue()); } } if (StringUtils.isNotBlank(dto.getRemarks())) { dto.setTransferRemarks(dto.getRemarks()); } - if (null == dto.getGasCertificate()) { - dto.setGasCertificate(0); + if (StringUtils.isBlank(dto.getGasCertificate())) { + dto.setGasCertificate("0"); } StringBuffer str = new StringBuffer(); //车钥匙 - if (dto.getVehicleKeyNum() > 0) { - Integer num = dto.getVehicleKeyNum(); - int value = num.intValue(); + if (dto.getVehicleKeyNum().equals("1")) { + int value = Integer.parseInt(dto.getVehicleKeyNum()); str.append("车钥匙" + value + "把、"); } //一致性证书 - if (dto.getCertificate() > 0) { + if (dto.getCertificate().equals("1")) { str.append("一致性证书、"); } //申请表 - if (dto.getApplyForm() > 0) { + if (dto.getApplyForm().equals("1")) { str.append("申请表、"); } //保修手册、说明书 - if (dto.getManual() > 0) { - str.append("保修手册、说明书、"); + if (dto.getManual().equals("1")) { + str.append("申请表、"); } //环保清单 - - if (dto.getEnvironmentalList() > 0) { + if (dto.getEnvironmentalList().equals("1")) { str.append("环保清单、"); } //驾驶员卡 - if (dto.getDirverCard() > 0) { + if (dto.getDirverCard().equals("1")) { str.append("驾驶员卡、"); } - if (dto.getGasCertificate() > 0) { - if (entity.getIsFuelVehicle() == 0) { - str.append("气瓶检测合格证、"); + if (dto.getGasCertificate().equals("1")) { + if (entity.getIsFuelVehicle().equals("0")) { + str.append("气瓶质量证明书、LNG/CNG 汽车气瓶及供气系统安装检验合格证、车用气瓶安装监督检验证书、"); } } str.delete(str.length() - 1, str.length()); @@ -795,24 +806,26 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService informationList = busVehicleInformationService.getByHandoverSid(dto.getSid()); - if (null != informationList && informationList.size() > 0) { + if (!informationList.isEmpty()) { for (BusVehicleInformation busVehicleInformation : informationList) { if ("001".equals(busVehicleInformation.getHandoverNum())) { - if (busVehicleInformation.getVehicleKeyNum() < 1 - || busVehicleInformation.getCertificate() < 1 - || busVehicleInformation.getApplyForm() < 1 - || busVehicleInformation.getManual() < 1 - || busVehicleInformation.getEnvironmentalList() < 1 - || busVehicleInformation.getDirverCard() < 1 + if ((StringUtils.isNotBlank(busVehicleInformation.getVehicleKeyNum()) && busVehicleInformation.getVehicleKeyNum().equals("0")) + || (StringUtils.isNotBlank(busVehicleInformation.getCertificate()) && busVehicleInformation.getCertificate().equals("0")) + || (StringUtils.isNotBlank(busVehicleInformation.getManual()) && busVehicleInformation.getManual().equals("0")) + || (StringUtils.isNotBlank(busVehicleInformation.getApplyForm()) && busVehicleInformation.getApplyForm().equals("0")) + || (StringUtils.isNotBlank(busVehicleInformation.getEnvironmentalList()) && busVehicleInformation.getEnvironmentalList().equals("0")) + || (StringUtils.isNotBlank(busVehicleInformation.getDirverCard()) && busVehicleInformation.getDirverCard().equals("0")) ) { entity.setCompleteState(0); } else { - if (busVehicleInformation.getGasCertificate() < 1) { - if (busVehicleInformation.getIsFuelVehicle() == 0) { + if (StringUtils.isNotBlank(busVehicleInformation.getGasCertificate()) && busVehicleInformation.getGasCertificate().equals("0")) { + if (busVehicleInformation.getIsFuelVehicle().equals("0")) { entity.setCompleteState(0); } else { entity.setCompleteState(1); } + } else { + entity.setCompleteState(1); } } } @@ -864,31 +877,31 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService