Browse Source

随车资料完成状态更新

master
fanzongzhe 2 years ago
parent
commit
61066a1778
  1. 9
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverService.java

9
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverService.java

@ -40,6 +40,7 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
/**
* 新增或修改
*
* @param dto
* @return
*/
@ -49,9 +50,6 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
String sid = dto.getSid();
BusVehicleInformationHandover entity = fetchBySid(sid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
//移交状态改为移交中
entity.setTransferStateKey("003");
entity.setTransferStateValue("移交中");
BusVehicleInformationDto informationDto = dto.getBusVehicleInformation();
//判断是不是一次交接还是二次
List<BusVehicleInformation> informations = busVehicleInformationService.getByHandoverSid(sid);
@ -61,7 +59,7 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
if ("001".equals(information.getHandoverNum())) {
BeanUtil.copyProperties(information, twiceInformation, "id", "sid", "recTime", "transferName", "transferRemarks", "remarks", "vehicleHandoverData");
if (null != informationDto.getRecTime()) {
twiceInformation.setRecTime(informationDto.getRecTime());
twiceInformation.setRecTime(null);
}
if (null != information.getVehicleKeyNum() && information.getVehicleKeyNum() != 0) {
twiceInformation.setVehicleKeyNum(information.getVehicleKeyNum());
@ -87,6 +85,9 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
//一次交接
BusVehicleInformation newInformation = new BusVehicleInformation();
BeanUtil.copyProperties(informationDto, newInformation, "id", "sid");
//移交状态改为移交中
entity.setTransferStateKey("003");
entity.setTransferStateValue("移交中");
newInformation.setHandoverNum("001");
//接收人
newInformation.setRecName(dto.getRecName());

Loading…
Cancel
Save