Browse Source

随车资料交接修改汽车产品质量证明书提示文字

zhanglei
fanzongzhe 2 years ago
parent
commit
e3994645c6
  1. 42
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/commoncontract/CommonContractService.java
  2. 16
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformation/BusVehicleInformation.java
  3. 14
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/AppSaveDataDto.java
  4. 2
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandover.java
  5. 2
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverDto.java
  6. 259
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverService.java

42
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<CommonContractMapp
printConfirmVo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + urlAll); printConfirmVo.setDownloadUrl(docPdfComponent.getPrefixTemplateUrl() + urlAll);
list.add(printConfirmVo); list.add(printConfirmVo);
} }
}else{ } else {
Future<String> future10 = pool.submit(() -> { Future<String> future10 = pool.submit(() -> {
return getRisk(appOrderDetailsVo,dto); return getRisk(appOrderDetailsVo, dto);
}); });
List<File> filesList = new ArrayList<>(); List<File> filesList = new ArrayList<>();
if (StringUtils.isNotBlank(future10.get())) { if (StringUtils.isNotBlank(future10.get())) {
@ -2620,7 +2620,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
String staffSid = sysUserVo.getStaffSid(); String staffSid = sysUserVo.getStaffSid();
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(params.getOrgPath()).getData(); String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(params.getOrgPath()).getData();
//======================= //=======================
if(StringUtils.isNotBlank(params.getMenuUrl())){ if (StringUtils.isNotBlank(params.getMenuUrl())) {
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); PrivilegeQuery privilegeQuery = new PrivilegeQuery();
privilegeQuery.setOrgPath(params.getOrgPath()); privilegeQuery.setOrgPath(params.getOrgPath());
privilegeQuery.setMenuUrl(params.getMenuUrl()); privilegeQuery.setMenuUrl(params.getMenuUrl());
@ -2657,7 +2657,7 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
return rb.success().setData(page); return rb.success().setData(page);
} }
} }
}else{ } else {
/*SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.selectByOrgSidPath(params.getOrgPath()).getData(); /*SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.selectByOrgSidPath(params.getOrgPath()).getData();
qw.eq("cc.staffSid", staffSid); qw.eq("cc.staffSid", staffSid);
qw.eq("cc.orgSid", sysOrganizationVo.getSid());*/ qw.eq("cc.orgSid", sysOrganizationVo.getSid());*/
@ -2908,48 +2908,48 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
// str.append("合格证、"); // str.append("合格证、");
// } // }
//车钥匙 //车钥匙
if (null != information.getVehicleKeyNum()) { if (StringUtils.isNotBlank(information.getVehicleKeyNum())) {
if (information.getVehicleKeyNum() < 1) { if (information.getVehicleKeyNum().equals("0")) {
str.append("车钥匙、"); str.append("车钥匙、");
} }
} else { } else {
str.append("车钥匙、"); str.append("车钥匙、");
} }
//一致性证书 //一致性证书
if (null != information.getCertificate()) { if (StringUtils.isNotBlank(information.getCertificate())) {
if (information.getCertificate() < 1) { if (information.getCertificate().equals("0")) {
str.append("一致性证书、"); str.append("一致性证书、");
} }
} else { } else {
str.append("一致性证书、"); str.append("一致性证书、");
} }
//申请表 //申请表
if (null != information.getApplyForm()) { if (StringUtils.isNotBlank(information.getApplyForm())) {
if (information.getApplyForm() < 1) { if (information.getApplyForm().equals("0")) {
str.append("申请表、"); str.append("申请表、");
} }
} else { } else {
str.append("申请表、"); str.append("申请表、");
} }
//保修手册、说明书 //保修手册、说明书
if (null != information.getManual()) { if (StringUtils.isNotBlank(information.getManual())) {
if (information.getManual() < 1) { if (information.getManual().equals("0")) {
str.append("保修手册、说明书、"); str.append("保修手册、说明书、");
} }
} else { } else {
str.append("保修手册、说明书、"); str.append("保修手册、说明书、");
} }
//环保清单 //环保清单
if (null != information.getEnvironmentalList()) { if (StringUtils.isNotBlank(information.getEnvironmentalList())) {
if (information.getEnvironmentalList() < 1) { if (information.getEnvironmentalList().equals("0")) {
str.append("环保清单、"); str.append("环保清单、");
} }
} else { } else {
str.append("环保清单、"); str.append("环保清单、");
} }
//驾驶员卡 //驾驶员卡
if (null != information.getDirverCard()) { if (StringUtils.isNotBlank(information.getDirverCard())) {
if (information.getDirverCard() < 1) { if (information.getDirverCard().equals("0")) {
str.append("驾驶员卡、"); str.append("驾驶员卡、");
} }
} else { } else {
@ -2962,14 +2962,14 @@ public class CommonContractService extends MybatisBaseService<CommonContractMapp
BaseVehicleModel model = baseVehicleModelService.selectDetails(vehicleVo.getModelSid()).getData(); BaseVehicleModel model = baseVehicleModelService.selectDetails(vehicleVo.getModelSid()).getData();
if (null != model) { if (null != model) {
if (StringUtils.isNotBlank(model.getFuelType())) { if (StringUtils.isNotBlank(model.getFuelType())) {
if ("002".equals(model.getFuelType())) { if ("004".equals(model.getFuelType()) || "04".equals(model.getFuelType())) {
//气瓶检测合格证 //气瓶检测合格证
if (null != information.getGasCertificate()) { if (StringUtils.isNotBlank(information.getGasCertificate())) {
if (information.getGasCertificate() < 1) { if (information.getGasCertificate().equals("0")) {
str.append("气瓶检测合格证、"); str.append("气瓶质量证明书、LNG/CNG 汽车气瓶及供气系统安装检验合格证、车用气瓶安装监督检验证书、");
} }
} else { } else {
str.append("气瓶检测合格证、"); str.append("气瓶质量证明书、LNG/CNG 汽车气瓶及供气系统安装检验合格证、车用气瓶安装监督检验证书、");
} }
} }
} }

16
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformation/BusVehicleInformation.java

@ -19,25 +19,25 @@ import java.util.Date;
public class BusVehicleInformation extends BaseEntity { public class BusVehicleInformation extends BaseEntity {
@ApiModelProperty("车钥匙个数") @ApiModelProperty("车钥匙个数")
private Integer vehicleKeyNum; // 车钥匙个数 private String vehicleKeyNum; // 车钥匙个数
@ApiModelProperty("一致性证书0无1有") @ApiModelProperty("一致性证书0无1有")
private Integer certificate; // 一致性证书0无1有 private String certificate; // 一致性证书0无1有
@ApiModelProperty("申请表0无1有") @ApiModelProperty("申请表0无1有")
private Integer applyForm; // 申请表0无1有 private String applyForm; // 申请表0无1有
@ApiModelProperty("保修手册、说明书0无1有") @ApiModelProperty("保修手册、说明书0无1有")
private Integer manual; // 保修手册、说明书0无1有 private String manual; // 保修手册、说明书0无1有
@ApiModelProperty("环保清单0无1有") @ApiModelProperty("环保清单0无1有")
private Integer environmentalList; // 环保清单0无1有 private String environmentalList; // 环保清单0无1有
@ApiModelProperty("驾驶员卡0无1有") @ApiModelProperty("驾驶员卡0无1有")
private Integer dirverCard; // 驾驶员卡0无1有 private String dirverCard; // 驾驶员卡0无1有
@ApiModelProperty("气瓶产品质量证明书(燃气车)0无1有") @ApiModelProperty("气瓶产品质量证明书(燃气车)0无1有")
private Integer gasCertificate; // 气瓶产品质量证明书(燃气车)0无1有 private String gasCertificate; // 气瓶产品质量证明书(燃气车)0无1有
@ApiModelProperty("随车资料交接表sid") @ApiModelProperty("随车资料交接表sid")
private String handoverSid; // 随车资料交接表sid private String handoverSid; // 随车资料交接表sid
@ApiModelProperty("交接次数") @ApiModelProperty("交接次数")
private String handoverNum; // 交接次数 private String handoverNum; // 交接次数
@ApiModelProperty("是否是燃气车 0不是1是") @ApiModelProperty("是否是燃气车 0不是1是")
private Integer isFuelVehicle; // 是否是燃气车 0不是1是 private String isFuelVehicle; // 是否是燃气车 0不是1是
@ApiModelProperty("接收人") @ApiModelProperty("接收人")
private String recName; // 接收人 private String recName; // 接收人
@ApiModelProperty("接收时间") @ApiModelProperty("接收时间")

14
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/AppSaveDataDto.java

@ -31,19 +31,19 @@ public class AppSaveDataDto implements Dto {
private List<AppManiFestBean> maniFestBeanList; private List<AppManiFestBean> maniFestBeanList;
private String orgPath; private String orgPath;
@ApiModelProperty("车钥匙个数") @ApiModelProperty("车钥匙个数")
private Integer vehicleKeyNum; // 车钥匙个数 private String vehicleKeyNum; // 车钥匙个数
@ApiModelProperty("一致性证书0无1有") @ApiModelProperty("一致性证书0无1有")
private Integer certificate; // 一致性证书0无1有 private String certificate; // 一致性证书0无1有
@ApiModelProperty("申请表0无1有") @ApiModelProperty("申请表0无1有")
private Integer applyForm; // 申请表0无1有 private String applyForm; // 申请表0无1有
@ApiModelProperty("保修手册、说明书0无1有") @ApiModelProperty("保修手册、说明书0无1有")
private Integer manual; // 保修手册、说明书0无1有 private String manual; // 保修手册、说明书0无1有
@ApiModelProperty("环保清单0无1有") @ApiModelProperty("环保清单0无1有")
private Integer environmentalList; // 环保清单0无1有 private String environmentalList; // 环保清单0无1有
@ApiModelProperty("驾驶员卡0无1有") @ApiModelProperty("驾驶员卡0无1有")
private Integer dirverCard; // 驾驶员卡0无1有 private String dirverCard; // 驾驶员卡0无1有
@ApiModelProperty("气瓶产品质量证明书(燃气车)0无1有") @ApiModelProperty("气瓶产品质量证明书(燃气车)0无1有")
private Integer gasCertificate; // 气瓶产品质量证明书(燃气车)0无1有 private String gasCertificate; // 气瓶产品质量证明书(燃气车)0无1有
@ApiModelProperty("交接资料") @ApiModelProperty("交接资料")
private String vehicleHandoverData; // private String vehicleHandoverData; //
@ApiModelProperty("移交备注") @ApiModelProperty("移交备注")

2
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") @ApiModelProperty("关联业务sid")
private String busSid; private String busSid;
@ApiModelProperty("是否是燃气车 0不是1是") @ApiModelProperty("是否是燃气车 0不是1是")
private Integer isFuelVehicle; // 是否是燃气车 0不是1是 private String isFuelVehicle; // 是否是燃气车 0不是1是
@ApiModelProperty("使用组织全路径") @ApiModelProperty("使用组织全路径")
private String orgSidPath; private String orgSidPath;
@ApiModelProperty("接收人sid") @ApiModelProperty("接收人sid")

2
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("随车资料") @ApiModelProperty("随车资料")
private BusVehicleInformationDto busVehicleInformation; private BusVehicleInformationDto busVehicleInformation;
@ApiModelProperty("是否是燃气车 0不是1是") @ApiModelProperty("是否是燃气车 0不是1是")
private Integer isFuelVehicle; // 是否是燃气车 0不是1是 private String isFuelVehicle; // 是否是燃气车 0不是1是
@ApiModelProperty("是否完成") @ApiModelProperty("是否完成")
private Boolean complete; // ture/false 完成/未完成 private Boolean complete; // ture/false 完成/未完成
@ApiModelProperty("是否修改状态") @ApiModelProperty("是否修改状态")

259
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.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.util.ArrayList; import java.util.ArrayList;
@ -78,6 +79,7 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
* @param dto * @param dto
* @return * @return
*/ */
@Transactional(rollbackFor = Exception.class)
public ResultBean<String> saveOrUpdate(BusVehicleInformationHandoverDto dto) { public ResultBean<String> saveOrUpdate(BusVehicleInformationHandoverDto dto) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
if (StringUtils.isNotBlank(dto.getSid())) { if (StringUtils.isNotBlank(dto.getSid())) {
@ -109,19 +111,23 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
if (null != informationDto.getRecTime()) { if (null != informationDto.getRecTime()) {
twiceInformation.setRecTime(null); twiceInformation.setRecTime(null);
} }
if (null != information.getVehicleKeyNum() && information.getVehicleKeyNum() != 0) { if (StringUtils.isNotBlank(information.getVehicleKeyNum())) {
twiceInformation.setVehicleKeyNum(information.getVehicleKeyNum()); if (!information.getVehicleKeyNum().equals("0")) {
twiceInformation.setVehicleKeyNum(information.getVehicleKeyNum());
}
} }
if (information.getIsFuelVehicle() == 1) { if (StringUtils.isNotBlank(information.getIsFuelVehicle())) {
twiceInformation.setGasCertificate(1); if (information.getIsFuelVehicle().equals("1")) {
} else { twiceInformation.setGasCertificate("1");
twiceInformation.setGasCertificate(0); } else if (information.getIsFuelVehicle().equals("0")) {
twiceInformation.setGasCertificate("0");
}
} }
twiceInformation.setCertificate(1); twiceInformation.setCertificate("1");
twiceInformation.setApplyForm(1); twiceInformation.setApplyForm("1");
twiceInformation.setManual(1); twiceInformation.setManual("1");
twiceInformation.setEnvironmentalList(1); twiceInformation.setEnvironmentalList("1");
twiceInformation.setDirverCard(1); twiceInformation.setDirverCard("1");
twiceInformation.setHandoverNum("002"); twiceInformation.setHandoverNum("002");
twiceInformation.setTransferRemarks(informationDto.getTransferRemarks()); twiceInformation.setTransferRemarks(informationDto.getTransferRemarks());
twiceInformation.setTransferName(informationDto.getTransferName()); twiceInformation.setTransferName(informationDto.getTransferName());
@ -148,8 +154,8 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
//一次交接 //一次交接
BusVehicleInformation newInformation = new BusVehicleInformation(); BusVehicleInformation newInformation = new BusVehicleInformation();
BeanUtil.copyProperties(informationDto, newInformation, "id", "sid"); BeanUtil.copyProperties(informationDto, newInformation, "id", "sid");
if (null == informationDto.getGasCertificate()) { if (StringUtils.isBlank(informationDto.getGasCertificate())) {
newInformation.setGasCertificate(0); newInformation.setGasCertificate("0");
} }
//移交状态改为移交中 //移交状态改为移交中
entity.setTransferStateKey("003"); entity.setTransferStateKey("003");
@ -163,44 +169,55 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
newInformation.setTransferName(informationDto.getTransferName()); newInformation.setTransferName(informationDto.getTransferName());
newInformation.setTransferRemarks(informationDto.getTransferRemarks()); newInformation.setTransferRemarks(informationDto.getTransferRemarks());
newInformation.setHandoverSid(sid); newInformation.setHandoverSid(sid);
if (null != fetchBySid(sid).getIsFuelVehicle()) { BusVehicleInformationHandover informationHandover = fetchBySid(sid);
newInformation.setIsFuelVehicle(fetchBySid(sid).getIsFuelVehicle()); if (null != informationHandover) {
if (StringUtils.isNotBlank(informationHandover.getIsFuelVehicle())) {
newInformation.setIsFuelVehicle(informationHandover.getIsFuelVehicle());
}
} }
busVehicleInformationService.insert(newInformation); busVehicleInformationService.insert(newInformation);
BusVehicleInformation busVehicleInformation = busVehicleInformationService.fetchBySid(newInformation.getSid()); BusVehicleInformation busVehicleInformation = busVehicleInformationService.fetchBySid(newInformation.getSid());
StringBuffer str = new StringBuffer(); StringBuffer str = new StringBuffer();
//车钥匙 //车钥匙
if (busVehicleInformation.getVehicleKeyNum() > 0) { if (StringUtils.isNotBlank(busVehicleInformation.getVehicleKeyNum())) {
Integer num = busVehicleInformation.getVehicleKeyNum(); String vehicleKeyNum = busVehicleInformation.getVehicleKeyNum();
int value = num.intValue(); int value = Integer.parseInt(vehicleKeyNum);
str.append("车钥匙" + value + "把、"); str.append("车钥匙" + value + "把、");
} }
//一致性证书 //一致性证书
if (busVehicleInformation.getCertificate() > 0) { if (StringUtils.isNotBlank(busVehicleInformation.getCertificate())) {
str.append("一致性证书、"); if (busVehicleInformation.getCertificate().equals("1")) {
str.append("一致性证书、");
}
} }
//申请表 //申请表
if (busVehicleInformation.getApplyForm() > 0) { if (StringUtils.isNotBlank(busVehicleInformation.getApplyForm())) {
str.append("申请表、"); if (busVehicleInformation.getApplyForm().equals("1")) {
str.append("申请表、");
}
} }
//保修手册、说明书 //保修手册、说明书
if (busVehicleInformation.getManual() > 0) { if (StringUtils.isNotBlank(busVehicleInformation.getManual())) {
str.append("保修手册、说明书、"); if (busVehicleInformation.getManual().equals("1")) {
str.append("保修手册、说明书、");
}
} }
//环保清单 //环保清单
if (StringUtils.isNotBlank(busVehicleInformation.getEnvironmentalList())) {
if (busVehicleInformation.getEnvironmentalList() > 0) { if (busVehicleInformation.getEnvironmentalList().equals("1")) {
str.append("环保清单、"); str.append("环保清单、");
}
} }
//驾驶员卡 //驾驶员卡
if (busVehicleInformation.getDirverCard() > 0) { if (StringUtils.isNotBlank(busVehicleInformation.getDirverCard())) {
str.append("驾驶员卡、"); if (busVehicleInformation.getDirverCard().equals("1")) {
str.append("驾驶员卡、");
}
} }
if (null != busVehicleInformation.getGasCertificate()) { //气瓶合格证
if (busVehicleInformation.getGasCertificate() > 0) { if (StringUtils.isNotBlank(busVehicleInformation.getGasCertificate())) {
if (busVehicleInformation.getIsFuelVehicle() == 0) { if (busVehicleInformation.getGasCertificate().equals("1")) {
str.append("气瓶检测合格证、"); str.append("气瓶质量证明书、LNG/CNG 汽车气瓶及供气系统安装检验合格证、车用气瓶安装监督检验证书、");
}
} }
} }
str.delete(str.length() - 1, str.length()); str.delete(str.length() - 1, str.length());
@ -223,25 +240,22 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
messageFeign.pushTransferMessage(messagePushTransferDto); messageFeign.pushTransferMessage(messagePushTransferDto);
} }
List<BusVehicleInformation> informationList = busVehicleInformationService.getByHandoverSid(dto.getSid()); List<BusVehicleInformation> informationList = busVehicleInformationService.getByHandoverSid(dto.getSid());
if (null != informationList && informationList.size() > 0) { informationList.removeAll(Collections.singleton(null));
if (!informationList.isEmpty()) {
for (BusVehicleInformation busVehicleInformation : informationList) { for (BusVehicleInformation busVehicleInformation : informationList) {
if ("001".equals(busVehicleInformation.getHandoverNum())) { if ("001".equals(busVehicleInformation.getHandoverNum())) {
if (busVehicleInformation.getVehicleKeyNum() < 1 if ((StringUtils.isNotBlank(busVehicleInformation.getVehicleKeyNum()) && busVehicleInformation.getVehicleKeyNum().equals("0"))
|| busVehicleInformation.getCertificate() < 1 || (StringUtils.isNotBlank(busVehicleInformation.getCertificate()) && busVehicleInformation.getCertificate().equals("0"))
|| busVehicleInformation.getApplyForm() < 1 || (StringUtils.isNotBlank(busVehicleInformation.getManual()) && busVehicleInformation.getManual().equals("0"))
|| busVehicleInformation.getManual() < 1 || (StringUtils.isNotBlank(busVehicleInformation.getApplyForm()) && busVehicleInformation.getApplyForm().equals("0"))
|| busVehicleInformation.getEnvironmentalList() < 1 || (StringUtils.isNotBlank(busVehicleInformation.getEnvironmentalList()) && busVehicleInformation.getEnvironmentalList().equals("0"))
|| busVehicleInformation.getDirverCard() < 1 || (StringUtils.isNotBlank(busVehicleInformation.getDirverCard()) && busVehicleInformation.getDirverCard().equals("0"))
) { ) {
entity.setCompleteState(0); entity.setCompleteState(0);
} else { } else {
if (null != busVehicleInformation.getGasCertificate()) { if (StringUtils.isNotBlank(busVehicleInformation.getGasCertificate()) && busVehicleInformation.getGasCertificate().equals("0")) {
if (busVehicleInformation.getGasCertificate() < 1) { if (busVehicleInformation.getIsFuelVehicle().equals("0")) {
if (busVehicleInformation.getIsFuelVehicle() == 0) { entity.setCompleteState(0);
entity.setCompleteState(0);
} else {
entity.setCompleteState(1);
}
} else { } else {
entity.setCompleteState(1); entity.setCompleteState(1);
} }
@ -262,9 +276,9 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
if (null != model) { if (null != model) {
if (StringUtils.isNotBlank(model.getFuelType())) { if (StringUtils.isNotBlank(model.getFuelType())) {
if ("004".equals(model.getFuelType()) || "04".equals(model.getFuelType())) { if ("004".equals(model.getFuelType()) || "04".equals(model.getFuelType())) {
entity.setIsFuelVehicle(0); entity.setIsFuelVehicle("0");
} else { } else {
entity.setIsFuelVehicle(1); entity.setIsFuelVehicle("1");
} }
} }
} }
@ -364,31 +378,32 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
recName = vo.getRecName(); recName = vo.getRecName();
} }
List<BusVehicleInformation> busVehicleInformations = busVehicleInformationService.getByHandoverSid(sid); List<BusVehicleInformation> busVehicleInformations = busVehicleInformationService.getByHandoverSid(sid);
if (null != busVehicleInformations && busVehicleInformations.size() > 0) { busVehicleInformations.removeAll(Collections.singleton(null));
if (!busVehicleInformations.isEmpty()) {
for (BusVehicleInformation informationServiceByHandoverSid : busVehicleInformations) { for (BusVehicleInformation informationServiceByHandoverSid : busVehicleInformations) {
//第一次的记录编辑回显 //第一次的记录编辑回显
if (times.equals("1") && informationServiceByHandoverSid.getHandoverNum().equals("001")) { if (times.equals("1") && informationServiceByHandoverSid.getHandoverNum().equals("001")) {
BusVehicleInformationVo informationVo = new BusVehicleInformationVo(); BusVehicleInformationVo informationVo = new BusVehicleInformationVo();
BeanUtil.copyProperties(informationServiceByHandoverSid, informationVo, "id", "sid"); BeanUtil.copyProperties(informationServiceByHandoverSid, informationVo, "id", "sid");
if (null == informationServiceByHandoverSid.getApplyForm()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getApplyForm())) {
informationVo.setApplyForm(""); informationVo.setApplyForm("");
} }
if (null == informationServiceByHandoverSid.getCertificate()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getCertificate())) {
informationVo.setCertificate(""); informationVo.setCertificate("");
} }
if (null == informationServiceByHandoverSid.getVehicleKeyNum()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getVehicleKeyNum())) {
informationVo.setVehicleKeyNum(""); informationVo.setVehicleKeyNum("");
} }
if (null == informationServiceByHandoverSid.getManual()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getManual())) {
informationVo.setManual(""); informationVo.setManual("");
} }
if (null == informationServiceByHandoverSid.getEnvironmentalList()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getEnvironmentalList())) {
informationVo.setEnvironmentalList(""); informationVo.setEnvironmentalList("");
} }
if (null == informationServiceByHandoverSid.getDirverCard()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getDirverCard())) {
informationVo.setDirverCard(""); informationVo.setDirverCard("");
} }
if (null == informationServiceByHandoverSid.getGasCertificate()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getGasCertificate())) {
informationVo.setGasCertificate(""); informationVo.setGasCertificate("");
} }
informationVo.setVehicleHandoverData(informationServiceByHandoverSid.getVehicleHandoverData()); informationVo.setVehicleHandoverData(informationServiceByHandoverSid.getVehicleHandoverData());
@ -399,59 +414,57 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
if (times.equals("2")) { if (times.equals("2")) {
BusVehicleInformationVo informationVo = new BusVehicleInformationVo(); BusVehicleInformationVo informationVo = new BusVehicleInformationVo();
BeanUtil.copyProperties(informationServiceByHandoverSid, informationVo, "id", "sid"); BeanUtil.copyProperties(informationServiceByHandoverSid, informationVo, "id", "sid");
if (null == informationServiceByHandoverSid.getApplyForm()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getApplyForm())) {
informationVo.setApplyForm(""); informationVo.setApplyForm("");
} }
if (null == informationServiceByHandoverSid.getCertificate()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getCertificate())) {
informationVo.setCertificate(""); informationVo.setCertificate("");
} }
if (null == informationServiceByHandoverSid.getVehicleKeyNum()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getVehicleKeyNum())) {
informationVo.setVehicleKeyNum(""); informationVo.setVehicleKeyNum("");
} }
if (null == informationServiceByHandoverSid.getManual()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getManual())) {
informationVo.setManual(""); informationVo.setManual("");
} }
if (null == informationServiceByHandoverSid.getEnvironmentalList()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getEnvironmentalList())) {
informationVo.setEnvironmentalList(""); informationVo.setEnvironmentalList("");
} }
if (null == informationServiceByHandoverSid.getDirverCard()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getDirverCard())) {
informationVo.setDirverCard(""); informationVo.setDirverCard("");
} }
if (null == informationServiceByHandoverSid.getGasCertificate()) { if (StringUtils.isBlank(informationServiceByHandoverSid.getGasCertificate())) {
informationVo.setGasCertificate(""); informationVo.setGasCertificate("");
} }
String handoverNum = "001"; String handoverNum = "001";
StringBuffer str = new StringBuffer(); StringBuffer str = new StringBuffer();
BusVehicleInformation infor = busVehicleInformationService.selectByHandoverNumAndHandoverSid(handoverNum, sid); BusVehicleInformation infor = busVehicleInformationService.selectByHandoverNumAndHandoverSid(handoverNum, sid);
//车钥匙 //车钥匙
if (infor.getVehicleKeyNum() < 1) { if (infor.getVehicleKeyNum().equals("0")) {
str.append("车钥匙、"); str.append("车钥匙、");
} }
//一致性证书 //一致性证书
if (infor.getCertificate() < 1) { if (infor.getCertificate().equals("0")) {
str.append("一致性证书、"); str.append("一致性证书、");
} }
//申请表 //申请表
if (infor.getApplyForm() < 1) { if (infor.getApplyForm().equals("0")) {
str.append("申请表、"); str.append("申请表、");
} }
//保修手册、说明书 //保修手册、说明书
if (infor.getManual() < 1) { if (infor.getManual().equals("0")) {
str.append("保修手册、说明书、"); str.append("保修手册、说明书、");
} }
//环保清单 //环保清单
if (infor.getEnvironmentalList() < 1) { if (infor.getEnvironmentalList().equals("0")) {
str.append("环保清单、"); str.append("环保清单、");
} }
//驾驶员卡 //驾驶员卡
if (infor.getDirverCard() < 1) { if (infor.getDirverCard().equals("0")) {
str.append("驾驶员卡、"); str.append("驾驶员卡、");
} }
if (null != infor.getGasCertificate()) { if (infor.getGasCertificate().equals("0")) {
if (infor.getGasCertificate() < 1) { if (infor.getIsFuelVehicle().equals("0")) {
if (infor.getIsFuelVehicle() == 0) { str.append("气瓶质量证明书、LNG/CNG 汽车气瓶及供气系统安装检验合格证、车用气瓶安装监督检验证书、");
str.append("气瓶检测合格证、");
}
} }
} }
str.delete(str.length() - 1, str.length()); str.delete(str.length() - 1, str.length());
@ -714,64 +727,62 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
List<AppManiFestBean> maniFestBeanList = dto.getManiFestBeanList(); List<AppManiFestBean> maniFestBeanList = dto.getManiFestBeanList();
for (AppManiFestBean appManiFestBean : maniFestBeanList) { for (AppManiFestBean appManiFestBean : maniFestBeanList) {
if (appManiFestBean.getKey().equals("vehicLeKeyNum")) { if (appManiFestBean.getKey().equals("vehicLeKeyNum")) {
dto.setVehicleKeyNum(Integer.parseInt(appManiFestBean.getValue())); dto.setVehicleKeyNum(appManiFestBean.getValue());
} }
if (appManiFestBean.getKey().equals("certificate")) { if (appManiFestBean.getKey().equals("certificate")) {
dto.setCertificate(Integer.parseInt(appManiFestBean.getValue())); dto.setCertificate(appManiFestBean.getValue());
} }
if (appManiFestBean.getKey().equals("applyForm")) { if (appManiFestBean.getKey().equals("applyForm")) {
dto.setApplyForm(Integer.parseInt(appManiFestBean.getValue())); dto.setApplyForm(appManiFestBean.getValue());
} }
if (appManiFestBean.getKey().equals("manual")) { if (appManiFestBean.getKey().equals("manual")) {
dto.setManual(Integer.parseInt(appManiFestBean.getValue())); dto.setManual(appManiFestBean.getValue());
} }
if (appManiFestBean.getKey().equals("environmentalList")) { if (appManiFestBean.getKey().equals("environmentalList")) {
dto.setEnvironmentalList(Integer.parseInt(appManiFestBean.getValue())); dto.setEnvironmentalList(appManiFestBean.getValue());
} }
if (appManiFestBean.getKey().equals("dirverCard")) { if (appManiFestBean.getKey().equals("dirverCard")) {
dto.setDirverCard(Integer.parseInt(appManiFestBean.getValue())); dto.setDirverCard(appManiFestBean.getValue());
} }
if (appManiFestBean.getKey().equals("gasCertificate")) { if (appManiFestBean.getKey().equals("gasCertificate")) {
dto.setGasCertificate(Integer.parseInt(appManiFestBean.getValue())); dto.setGasCertificate(appManiFestBean.getValue());
} }
} }
if (StringUtils.isNotBlank(dto.getRemarks())) { if (StringUtils.isNotBlank(dto.getRemarks())) {
dto.setTransferRemarks(dto.getRemarks()); dto.setTransferRemarks(dto.getRemarks());
} }
if (null == dto.getGasCertificate()) { if (StringUtils.isBlank(dto.getGasCertificate())) {
dto.setGasCertificate(0); dto.setGasCertificate("0");
} }
StringBuffer str = new StringBuffer(); StringBuffer str = new StringBuffer();
//车钥匙 //车钥匙
if (dto.getVehicleKeyNum() > 0) { if (dto.getVehicleKeyNum().equals("1")) {
Integer num = dto.getVehicleKeyNum(); int value = Integer.parseInt(dto.getVehicleKeyNum());
int value = num.intValue();
str.append("车钥匙" + value + "把、"); str.append("车钥匙" + value + "把、");
} }
//一致性证书 //一致性证书
if (dto.getCertificate() > 0) { if (dto.getCertificate().equals("1")) {
str.append("一致性证书、"); str.append("一致性证书、");
} }
//申请表 //申请表
if (dto.getApplyForm() > 0) { if (dto.getApplyForm().equals("1")) {
str.append("申请表、"); str.append("申请表、");
} }
//保修手册、说明书 //保修手册、说明书
if (dto.getManual() > 0) { if (dto.getManual().equals("1")) {
str.append("保修手册、说明书、"); str.append("申请表、");
} }
//环保清单 //环保清单
if (dto.getEnvironmentalList().equals("1")) {
if (dto.getEnvironmentalList() > 0) {
str.append("环保清单、"); str.append("环保清单、");
} }
//驾驶员卡 //驾驶员卡
if (dto.getDirverCard() > 0) { if (dto.getDirverCard().equals("1")) {
str.append("驾驶员卡、"); str.append("驾驶员卡、");
} }
if (dto.getGasCertificate() > 0) { if (dto.getGasCertificate().equals("1")) {
if (entity.getIsFuelVehicle() == 0) { if (entity.getIsFuelVehicle().equals("0")) {
str.append("气瓶检测合格证、"); str.append("气瓶质量证明书、LNG/CNG 汽车气瓶及供气系统安装检验合格证、车用气瓶安装监督检验证书、");
} }
} }
str.delete(str.length() - 1, str.length()); str.delete(str.length() - 1, str.length());
@ -795,24 +806,26 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
entity.setTransferStateKey("003"); entity.setTransferStateKey("003");
entity.setTransferStateValue("移交中"); entity.setTransferStateValue("移交中");
List<BusVehicleInformation> informationList = busVehicleInformationService.getByHandoverSid(dto.getSid()); List<BusVehicleInformation> informationList = busVehicleInformationService.getByHandoverSid(dto.getSid());
if (null != informationList && informationList.size() > 0) { if (!informationList.isEmpty()) {
for (BusVehicleInformation busVehicleInformation : informationList) { for (BusVehicleInformation busVehicleInformation : informationList) {
if ("001".equals(busVehicleInformation.getHandoverNum())) { if ("001".equals(busVehicleInformation.getHandoverNum())) {
if (busVehicleInformation.getVehicleKeyNum() < 1 if ((StringUtils.isNotBlank(busVehicleInformation.getVehicleKeyNum()) && busVehicleInformation.getVehicleKeyNum().equals("0"))
|| busVehicleInformation.getCertificate() < 1 || (StringUtils.isNotBlank(busVehicleInformation.getCertificate()) && busVehicleInformation.getCertificate().equals("0"))
|| busVehicleInformation.getApplyForm() < 1 || (StringUtils.isNotBlank(busVehicleInformation.getManual()) && busVehicleInformation.getManual().equals("0"))
|| busVehicleInformation.getManual() < 1 || (StringUtils.isNotBlank(busVehicleInformation.getApplyForm()) && busVehicleInformation.getApplyForm().equals("0"))
|| busVehicleInformation.getEnvironmentalList() < 1 || (StringUtils.isNotBlank(busVehicleInformation.getEnvironmentalList()) && busVehicleInformation.getEnvironmentalList().equals("0"))
|| busVehicleInformation.getDirverCard() < 1 || (StringUtils.isNotBlank(busVehicleInformation.getDirverCard()) && busVehicleInformation.getDirverCard().equals("0"))
) { ) {
entity.setCompleteState(0); entity.setCompleteState(0);
} else { } else {
if (busVehicleInformation.getGasCertificate() < 1) { if (StringUtils.isNotBlank(busVehicleInformation.getGasCertificate()) && busVehicleInformation.getGasCertificate().equals("0")) {
if (busVehicleInformation.getIsFuelVehicle() == 0) { if (busVehicleInformation.getIsFuelVehicle().equals("0")) {
entity.setCompleteState(0); entity.setCompleteState(0);
} else { } else {
entity.setCompleteState(1); entity.setCompleteState(1);
} }
} else {
entity.setCompleteState(1);
} }
} }
} }
@ -864,31 +877,31 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
StringBuffer str = new StringBuffer(); StringBuffer str = new StringBuffer();
BusVehicleInformation infor = busVehicleInformationService.selectByHandoverNumAndHandoverSid(handoverNum, sid); BusVehicleInformation infor = busVehicleInformationService.selectByHandoverNumAndHandoverSid(handoverNum, sid);
//车钥匙 //车钥匙
if (infor.getVehicleKeyNum() < 1) { if (infor.getVehicleKeyNum().equals("0")) {
str.append("车钥匙、"); str.append("车钥匙、");
} }
//一致性证书 //一致性证书
if (infor.getCertificate() < 1) { if (infor.getCertificate().equals("0")) {
str.append("一致性证书、"); str.append("一致性证书、");
} }
//申请表 //申请表
if (infor.getApplyForm() < 1) { if (infor.getApplyForm().equals("0")) {
str.append("申请表、"); str.append("申请表、");
} }
//保修手册、说明书 //保修手册、说明书
if (infor.getManual() < 1) { if (infor.getManual().equals("0")) {
str.append("保修手册、说明书、"); str.append("保修手册、说明书、");
} }
//环保清单 //环保清单
if (infor.getEnvironmentalList() < 1) { if (infor.getEnvironmentalList().equals("0")) {
str.append("环保清单、"); str.append("环保清单、");
} }
//驾驶员卡 //驾驶员卡
if (infor.getDirverCard() < 1) { if (infor.getDirverCard().equals("0")) {
str.append("驾驶员卡、"); str.append("驾驶员卡、");
} }
if (infor.getGasCertificate() < 1) { if (infor.getGasCertificate().equals("0")) {
if (infor.getIsFuelVehicle() == 0) { if (infor.getIsFuelVehicle().equals("0")) {
str.append("气瓶检测合格证、"); str.append("气瓶检测合格证、");
} }
} }
@ -927,18 +940,18 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
entity.setIsFuelVehicle(handover.getIsFuelVehicle()); entity.setIsFuelVehicle(handover.getIsFuelVehicle());
entity.setHandoverSid(sid); entity.setHandoverSid(sid);
entity.setVehicleKeyNum(information.getVehicleKeyNum()); entity.setVehicleKeyNum(information.getVehicleKeyNum());
entity.setCertificate(1); entity.setCertificate("1");
entity.setApplyForm(1); entity.setApplyForm("1");
entity.setManual(1); entity.setManual("1");
entity.setEnvironmentalList(1); entity.setEnvironmentalList("1");
entity.setDirverCard(1); entity.setDirverCard("1");
entity.setTransferSid(dto.getUserSid()); entity.setTransferSid(dto.getUserSid());
entity.setReceiverSid(receiverSid); entity.setReceiverSid(receiverSid);
entity.setRecName(handover.getRecName()); entity.setRecName(handover.getRecName());
if (entity.getIsFuelVehicle() == 0) { if (entity.getIsFuelVehicle().equals("0")) {
entity.setGasCertificate(1); entity.setGasCertificate("1");
} else { } else {
entity.setGasCertificate(0); entity.setGasCertificate("0");
} }
if (StringUtils.isNotBlank(dto.getUserSid())) { if (StringUtils.isNotBlank(dto.getUserSid())) {
SysUserInfoVo data = sysUserFeign.selectUserInfoByUserSid(dto.getUserSid()).getData(); SysUserInfoVo data = sysUserFeign.selectUserInfoByUserSid(dto.getUserSid()).getData();

Loading…
Cancel
Save