|
|
|
@ -379,8 +379,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
waybillEntity.setTotalCount(openOrderDTO.getTotalCount()); |
|
|
|
|
waybillEntity.setTotalVolume(openOrderDTO.getTotalVolume()); |
|
|
|
|
waybillEntity.setTotalWeight(openOrderDTO.getTotalWeghit()); |
|
|
|
|
waybillEntity.setDearCode(openOrderDTO.getDearCode()); |
|
|
|
|
waybillEntity.setDearName(openOrderDTO.getDearName()); |
|
|
|
|
waybillEntity.setDealerCode(openOrderDTO.getDealerCode()); |
|
|
|
|
waybillEntity.setDealerName(openOrderDTO.getDealerName()); |
|
|
|
|
//统计当前订单的在库数
|
|
|
|
|
List<Long> advanceIds = openOrderDTO.getAdvanceIds(); |
|
|
|
|
AdvanceDetailStockNumVO advanceDetailStockNumVO = advanceDetailService.findStockNumByAdvanceIds(advanceIds); |
|
|
|
@ -421,7 +421,10 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
waybillEntity.setAgent(AuthUtil.getUserName()); |
|
|
|
|
waybillEntity.setAgentId(AuthUtil.getUserId()); |
|
|
|
|
waybillEntity.setDocumentMakingTime(CommonUtil.StringToDate(openOrderDTO.getOpenOrderDate())); |
|
|
|
|
|
|
|
|
|
waybillEntity.setPickupCompleteOrNot(openOrderDTO.getPickupCompleteOrNot()); |
|
|
|
|
waybillEntity.setTrunklineCompleteOrNot(openOrderDTO.getTrunklineCompleteOrNot()); |
|
|
|
|
waybillEntity.setTrunklineVehicleType(openOrderDTO.getTrunklineVehicleType()); |
|
|
|
|
waybillEntity.setPickupVehicleType(openOrderDTO.getPickupVehicleType()); |
|
|
|
|
Long waybillId = warehouseWaybillClient.addEnntity(waybillEntity); |
|
|
|
|
|
|
|
|
|
if (!Objects.isNull(waybillId)) { |
|
|
|
@ -608,6 +611,16 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
|
|
|
|
|
WarehouseWaybillEntity waybillEntity = new WarehouseWaybillEntity(); |
|
|
|
|
waybillEntity.setWaybillNo(waybillNo); |
|
|
|
|
waybillEntity.setBrandId(openOrderDTO.getBrandId()); |
|
|
|
|
waybillEntity.setBrand(openOrderDTO.getBrand()); |
|
|
|
|
waybillEntity.setDeparture(openOrderDTO.getDeparture()); |
|
|
|
|
waybillEntity.setDepartureCode(openOrderDTO.getDepartureCode()); |
|
|
|
|
waybillEntity.setDealerCode(openOrderDTO.getDealerCode()); |
|
|
|
|
waybillEntity.setDealerName(openOrderDTO.getDealerName()); |
|
|
|
|
waybillEntity.setPickupCompleteOrNot(openOrderDTO.getPickupCompleteOrNot()); |
|
|
|
|
waybillEntity.setTrunklineCompleteOrNot(openOrderDTO.getTrunklineCompleteOrNot()); |
|
|
|
|
waybillEntity.setTrunklineVehicleType(openOrderDTO.getTrunklineVehicleType()); |
|
|
|
|
waybillEntity.setPickupVehicleType(openOrderDTO.getPickupVehicleType()); |
|
|
|
|
waybillEntity.setDepartureWarehouseId(openOrderDTO.getDepartureWarehouseId()); |
|
|
|
|
waybillEntity.setDepartureWarehouseName(openOrderDTO.getDepartureWarehouseName()); |
|
|
|
|
waybillEntity.setDestinationWarehouseId(openOrderDTO.getDestinationWarehouseId()); |
|
|
|
@ -2140,6 +2153,74 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
log.info("###################verifyData: 验证改单数据"); |
|
|
|
|
StringBuilder stringBuilder = new StringBuilder(); |
|
|
|
|
List<EditOrderMsgVO> msgList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
String newDeparture = openOrderDTO.getDeparture(); |
|
|
|
|
String departure = waybillEntity.getDeparture(); |
|
|
|
|
if(!ObjectUtil.equals(newDeparture,departure)){ |
|
|
|
|
// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("发站"); |
|
|
|
|
editOrderMsgVO.setOldValue(departure); |
|
|
|
|
editOrderMsgVO.setNewValue(newDeparture); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// String newDepartureCode = openOrderDTO.getDepartureCode();
|
|
|
|
|
// String departureCode = waybillEntity.getDepartureCode();
|
|
|
|
|
// if(!ObjectUtil.equals(newDepartureCode,departureCode)){
|
|
|
|
|
//// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
|
|
|
|
|
// EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
|
|
|
|
|
// editOrderMsgVO.setItemName("发站");
|
|
|
|
|
// editOrderMsgVO.setOldValue(departure);
|
|
|
|
|
// editOrderMsgVO.setNewValue(newDeparture);
|
|
|
|
|
// msgList.add(editOrderMsgVO);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
Integer newPickupCompleteOrNot = openOrderDTO.getPickupCompleteOrNot(); |
|
|
|
|
Integer pickupCompleteOrNot = waybillEntity.getPickupCompleteOrNot(); |
|
|
|
|
if(!ObjectUtil.equals(newPickupCompleteOrNot,pickupCompleteOrNot)){ |
|
|
|
|
// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("提货是否整车"); |
|
|
|
|
editOrderMsgVO.setOldValue(pickupCompleteOrNot==1?"是":"否"); |
|
|
|
|
editOrderMsgVO.setNewValue(newPickupCompleteOrNot==1?"是":"否"); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Integer newTrunklineCompleteOrNot = openOrderDTO.getTrunklineCompleteOrNot(); |
|
|
|
|
Integer trunklineCompleteOrNot = waybillEntity.getTrunklineCompleteOrNot(); |
|
|
|
|
if(!ObjectUtil.equals(newTrunklineCompleteOrNot,trunklineCompleteOrNot)){ |
|
|
|
|
// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("干线是否整车"); |
|
|
|
|
editOrderMsgVO.setOldValue(trunklineCompleteOrNot==1?"是":"否"); |
|
|
|
|
editOrderMsgVO.setNewValue(newTrunklineCompleteOrNot==1?"是":"否"); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newTrunklineVehicleType = openOrderDTO.getTrunklineVehicleType(); |
|
|
|
|
String trunklineVehicleType = waybillEntity.getTrunklineVehicleType(); |
|
|
|
|
if(!ObjectUtil.equals(newTrunklineVehicleType,trunklineVehicleType)){ |
|
|
|
|
// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("干线车型"); |
|
|
|
|
editOrderMsgVO.setOldValue(DictBizCache.getValue("price_vehicle_type",trunklineVehicleType)); |
|
|
|
|
editOrderMsgVO.setNewValue(DictBizCache.getValue("price_vehicle_type",newTrunklineVehicleType)); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newPickupVehicleType = openOrderDTO.getPickupVehicleType(); |
|
|
|
|
String pickupVehicleType = waybillEntity.getPickupVehicleType(); |
|
|
|
|
if(!ObjectUtil.equals(newPickupVehicleType,pickupVehicleType)){ |
|
|
|
|
// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("提货车型"); |
|
|
|
|
editOrderMsgVO.setOldValue(DictBizCache.getValue("price_vehicle_type",pickupVehicleType)); |
|
|
|
|
editOrderMsgVO.setNewValue(DictBizCache.getValue("price_vehicle_type",newPickupVehicleType)); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String newDestination = openOrderDTO.getDestination(); |
|
|
|
|
String destination = waybillEntity.getDestination(); |
|
|
|
|
if(!ObjectUtil.equals(newDestination,destination)){ |
|
|
|
@ -2639,6 +2720,44 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
private String verifyUpdateData(OpenOrderDTO openOrderDTO, WarehouseWaybillEntity waybillEntity) { |
|
|
|
|
log.info("###################verifyUpdateData: 验证改单数据"); |
|
|
|
|
StringBuilder stringBuilder = new StringBuilder(); |
|
|
|
|
|
|
|
|
|
String newDeparture = openOrderDTO.getDeparture(); |
|
|
|
|
String departure = waybillEntity.getDeparture(); |
|
|
|
|
if(!ObjectUtil.equals(newDeparture,departure)){ |
|
|
|
|
stringBuilder.append("发站:").append(departure).append("-->").append(newDeparture).append(";"); |
|
|
|
|
waybillEntity.setDeparture(newDeparture); |
|
|
|
|
waybillEntity.setDepartureCode(openOrderDTO.getDepartureCode()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Integer newPickupCompleteOrNot = openOrderDTO.getPickupCompleteOrNot(); |
|
|
|
|
Integer pickupCompleteOrNot = waybillEntity.getPickupCompleteOrNot(); |
|
|
|
|
if(!ObjectUtil.equals(newPickupCompleteOrNot,pickupCompleteOrNot)){ |
|
|
|
|
stringBuilder.append("提货是否整车:").append(pickupCompleteOrNot==1?"是":"否").append("-->").append(newPickupCompleteOrNot==1?"是":"否").append(";"); |
|
|
|
|
waybillEntity.setPickupCompleteOrNot(newPickupCompleteOrNot); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Integer newTrunklineCompleteOrNot = openOrderDTO.getTrunklineCompleteOrNot(); |
|
|
|
|
Integer trunklineCompleteOrNot = waybillEntity.getTrunklineCompleteOrNot(); |
|
|
|
|
if(!ObjectUtil.equals(newTrunklineCompleteOrNot,trunklineCompleteOrNot)){ |
|
|
|
|
stringBuilder.append("干线是否整车:").append(trunklineCompleteOrNot==1?"是":"否").append("-->").append(newTrunklineCompleteOrNot==1?"是":"否").append(";"); |
|
|
|
|
waybillEntity.setTrunklineCompleteOrNot(newTrunklineCompleteOrNot); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newTrunklineVehicleType = openOrderDTO.getTrunklineVehicleType(); |
|
|
|
|
String trunklineVehicleType = waybillEntity.getTrunklineVehicleType(); |
|
|
|
|
if(!ObjectUtil.equals(newTrunklineVehicleType,trunklineVehicleType)){ |
|
|
|
|
stringBuilder.append("干线车型:").append(DictBizCache.getValue("price_vehicle_type",trunklineVehicleType)).append("-->").append(DictBizCache.getValue("price_vehicle_type",newTrunklineVehicleType)).append(";"); |
|
|
|
|
waybillEntity.setTrunklineVehicleType(newTrunklineVehicleType); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newPickupVehicleType = openOrderDTO.getPickupVehicleType(); |
|
|
|
|
String pickupVehicleType = waybillEntity.getPickupVehicleType(); |
|
|
|
|
if(!ObjectUtil.equals(newPickupVehicleType,pickupVehicleType)){ |
|
|
|
|
stringBuilder.append("提货车型:").append(DictBizCache.getValue("price_vehicle_type",pickupVehicleType)).append("-->").append(DictBizCache.getValue("price_vehicle_type",newPickupVehicleType)).append(";"); |
|
|
|
|
waybillEntity.setPickupVehicleType(newPickupVehicleType); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String newDestination = openOrderDTO.getDestination(); |
|
|
|
|
String destination = waybillEntity.getDestination(); |
|
|
|
|
if (!destination.equals(newDestination)) { |
|
|
|
|