Browse Source

交车准备

master
dimengzhe 2 years ago
parent
commit
e66dd1321e
  1. 14
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoverprepare/BusHandoverPrepareService.java

14
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoverprepare/BusHandoverPrepareService.java

@ -629,26 +629,30 @@ public class BusHandoverPrepareService extends MybatisBaseService<BusHandoverPre
String remarks = query.getRemarks();
boolean isTrue = false;
BusVehicleInformation busVehicleInformation = busVehicleInformationService.fetchBySid(sid);
if(busVehicleInformation != null){
if (busVehicleInformation != null) {
busVehicleInformation.setRecTime(new Date());
if(StringUtils.isNotBlank(remarks)){
if (StringUtils.isNotBlank(remarks)) {
busVehicleInformation.setRemarks(remarks);
}
busVehicleInformationService.updateById(busVehicleInformation);
BusVehicleInformationHandover busVehicleInformationHandover = busVehicleInformationHandoverService.fetchBySid(busVehicleInformation.getHandoverSid());
if(busVehicleInformationHandover.getCompleteState() == 1){//已完成
if (busVehicleInformationHandover.getCompleteState() == 1) {//已完成
isTrue = true;
}
busVehicleInformationHandover.setTransferStateKey(CertificState.TransferState.TRANSTATE_YYJ.getCode());
busVehicleInformationHandover.setTransferStateValue(CertificState.TransferState.TRANSTATE_YYJ.getRemarks());
busVehicleInformationHandoverService.updateById(busVehicleInformationHandover);
busVehicleInformationService.updateById(busVehicleInformation);
}
if(isTrue){//若已完成,则更新状态为已确认
if (isTrue || "002".equals(busVehicleInformation.getHandoverNum())) {//若已完成,则更新状态为已确认
BusHandoverPrepareVehicle busHandoverPrepareVehicle = busHandoverPrepareVehicleService.fetchBySid(query.getBusSid());
busHandoverPrepareVehicle.setOnBoardDataState(1);
busHandoverPrepareVehicleService.updateById(busHandoverPrepareVehicle);
BusVehicleInformationHandover busVehicleInformationHandover = busVehicleInformationHandoverService.fetchBySid(busVehicleInformation.getHandoverSid());
busVehicleInformationHandover.setCompleteState(1);
busVehicleInformationHandoverService.updateById(busVehicleInformationHandover);
}
return rb.success();
}

Loading…
Cancel
Save