|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.logpm.trunkline.service.impl; |
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
@ -11,6 +12,7 @@ import com.logpm.basic.entity.BasicMaterialEntity;
|
|
|
|
|
import com.logpm.basic.feign.IBasicMaterialClient; |
|
|
|
|
import com.logpm.basicdata.entity.*; |
|
|
|
|
import com.logpm.basicdata.feign.*; |
|
|
|
|
import com.logpm.basicdata.vo.BasicdataClientVO; |
|
|
|
|
import com.logpm.basicdata.vo.BasicdataFreightApiVO; |
|
|
|
|
import com.logpm.distribution.entity.DistributionParcelListEntity; |
|
|
|
|
import com.logpm.distribution.entity.DistributionParcelNumberEntity; |
|
|
|
@ -35,7 +37,6 @@ import org.springblade.common.constant.IncomingTypeEnum;
|
|
|
|
|
import org.springblade.common.constant.order.*; |
|
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
|
import org.springblade.common.utils.CommonUtil; |
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.BeanUtil; |
|
|
|
@ -87,6 +88,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
private final ITrunklineWaybillReturnService trunklineWaybillReturnService; |
|
|
|
|
private final IBasicdataOpenIncomingClient basicdataOpenIncomingClient; |
|
|
|
|
private final ITrunklineCarsLoadService carsLoadService; |
|
|
|
|
private final IBasicdataStoreContactClient basicdataStoreContactClient; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<TrunklineAdvanceVO> advancePageList(AdvanceDTO advanceDTO) { |
|
|
|
@ -148,20 +150,39 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
//发货单位
|
|
|
|
|
Long shipperId = basicdataForwardingUnitClient.findForwardingUnitByWarehouseId(warehouseId); |
|
|
|
|
if (!Objects.isNull(shipperId)) { |
|
|
|
|
BasicdataClientEntity basicdataClientEntity = basicdataClientClient.findEntityById(shipperId); |
|
|
|
|
BasicdataClientVO basicdataClientEntity = basicdataClientClient.findEntityVoById(shipperId); |
|
|
|
|
if (!Objects.isNull(basicdataClientEntity)) { |
|
|
|
|
openOrderVO.setShipperClientId(shipperId); |
|
|
|
|
openOrderVO.setShipper(basicdataClientEntity.getClientName()); |
|
|
|
|
openOrderVO.setShipperName(basicdataClientEntity.getLinkman()); |
|
|
|
|
openOrderVO.setShipperMobile(basicdataClientEntity.getPhone()); |
|
|
|
|
openOrderVO.setShipperAddress(basicdataClientEntity.getDetailedly()); |
|
|
|
|
|
|
|
|
|
List<String> departureArray = new ArrayList<>(); |
|
|
|
|
String badeRegionAreaId = basicdataClientEntity.getBladeRegionAreaId(); |
|
|
|
|
String bladeRegionProvinceId = basicdataClientEntity.getBladeRegionProvinceId(); |
|
|
|
|
String bladeRegionCityId = basicdataClientEntity.getBladeRegionCityId(); |
|
|
|
|
departureArray.add(bladeRegionProvinceId); |
|
|
|
|
departureArray.add(bladeRegionCityId); |
|
|
|
|
String name = regionFeign.getName(bladeRegionCityId); |
|
|
|
|
String areaId = bladeRegionCityId; |
|
|
|
|
if (!StringUtil.isBlank(badeRegionAreaId)) { |
|
|
|
|
departureArray.add(badeRegionAreaId); |
|
|
|
|
name = regionFeign.getName(badeRegionAreaId); |
|
|
|
|
areaId = badeRegionAreaId; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
openOrderVO.setDeparture(name); |
|
|
|
|
openOrderVO.setDepartureCode(areaId); |
|
|
|
|
openOrderVO.setDepartureArray(departureArray); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//收货单位-----根据三方商场找到对应的clientId
|
|
|
|
|
Long clientId = basicdataTripartiteMallClient.getClientIdByNameAndBrand(dealerName, brand); |
|
|
|
|
BasicdataClientEntity basicdataClientEntity = basicdataClientClient.findEntityById(clientId); |
|
|
|
|
BasicdataClientVO basicdataClientEntity = basicdataClientClient.findEntityVoById(clientId); |
|
|
|
|
if (!Objects.isNull(basicdataClientEntity)) { |
|
|
|
|
openOrderVO.setConsigneeClientId(clientId); |
|
|
|
|
openOrderVO.setConsignee(basicdataClientEntity.getClientName()); |
|
|
|
@ -277,7 +298,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
return R.success("验证成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = ServiceException.class) |
|
|
|
|
// @Transactional(rollbackFor = ServiceException.class)
|
|
|
|
|
@Override |
|
|
|
|
public R openWaybill(OpenOrderDTO openOrderDTO) { |
|
|
|
|
log.info("############openWaybill: 开单开始 openOrderDTO={}", openOrderDTO); |
|
|
|
@ -352,10 +373,14 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
|
|
|
|
|
waybillEntity.setDestination(openOrderDTO.getDestination()); |
|
|
|
|
waybillEntity.setDestinationCode(openOrderDTO.getDestinationCode()); |
|
|
|
|
waybillEntity.setDeparture(openOrderDTO.getDeparture()); |
|
|
|
|
waybillEntity.setDepartureCode(openOrderDTO.getDepartureCode()); |
|
|
|
|
waybillEntity.setGoodsName(openOrderDTO.getGoodsName()); |
|
|
|
|
waybillEntity.setTotalCount(openOrderDTO.getTotalCount()); |
|
|
|
|
waybillEntity.setTotalVolume(openOrderDTO.getTotalVolume()); |
|
|
|
|
waybillEntity.setTotalWeight(openOrderDTO.getTotalWeghit()); |
|
|
|
|
waybillEntity.setDearCode(openOrderDTO.getDearCode()); |
|
|
|
|
waybillEntity.setDearName(openOrderDTO.getDearName()); |
|
|
|
|
//统计当前订单的在库数
|
|
|
|
|
List<Long> advanceIds = openOrderDTO.getAdvanceIds(); |
|
|
|
|
AdvanceDetailStockNumVO advanceDetailStockNumVO = advanceDetailService.findStockNumByAdvanceIds(advanceIds); |
|
|
|
@ -536,7 +561,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
//判断是否是开单及入库的配置
|
|
|
|
|
Boolean aBoolean = basicdataOpenIncomingClient.checkOpenIncoming(warehouseId, brandId); |
|
|
|
|
if (Boolean.TRUE.equals(aBoolean)) { |
|
|
|
|
openOrderAsyncService.incomingPackageBatch(advanceIds, AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getTenantId(), AuthUtil.getNickName(), IncomingTypeEnum.OPEN_TO_IN.getCode()); |
|
|
|
|
openOrderAsyncService.incomingPackageBatch(advanceIds, AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getTenantId(), AuthUtil.getNickName(), IncomingTypeEnum.OPEN_TO_IN.getCode(),warehouseId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//异步存入日志
|
|
|
|
@ -1407,13 +1432,14 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
map.put("warehouseWaybill", warehouseWaybillVO); |
|
|
|
|
map.put("payTypeList", DictBizCache.getList(DictBizConstant.OPEN_ORDER_PAY_TYPE)); |
|
|
|
|
map.put("payWayList", DictBizCache.getList(DictBizConstant.OPEN_ORDER_PAY_WAY)); |
|
|
|
|
map.put("deliveryWayList", DictBizCache.getList(DictBizConstant.OPEN_ORDER_DELIVERY_WAY)); |
|
|
|
|
map.put("urgencyList", DictBizCache.getList(DictBizConstant.OPEN_ORDER_URGENCY)); |
|
|
|
|
map.put("receiptList", DictBizCache.getList(DictBizConstant.OPEN_ORDER_RECEIPT)); |
|
|
|
|
map.put("transportTypeList", DictBizCache.getList(DictBizConstant.OPEN_ORDER_TRANSPORT_TYPE)); |
|
|
|
|
map.put("warehouseWaybill",warehouseWaybillVO); |
|
|
|
|
map.put("payTypeList",DictBizCache.getList(DictBizConstant.OPEN_ORDER_PAY_TYPE)); |
|
|
|
|
map.put("payWayList",DictBizCache.getList(DictBizConstant.OPEN_ORDER_PAY_WAY)); |
|
|
|
|
map.put("deliveryWayList",DictBizCache.getList(DictBizConstant.OPEN_ORDER_DELIVERY_WAY)); |
|
|
|
|
map.put("urgencyList",DictBizCache.getList(DictBizConstant.OPEN_ORDER_URGENCY)); |
|
|
|
|
map.put("receiptList",DictBizCache.getList(DictBizConstant.OPEN_ORDER_RECEIPT)); |
|
|
|
|
map.put("transportTypeList",DictBizCache.getList(DictBizConstant.OPEN_ORDER_TRANSPORT_TYPE)); |
|
|
|
|
map.put("editWaybillReasonTypeList",DictBizCache.getList(DictBizConstant.EDIT_WAYBILL_REASON_TYPE)); |
|
|
|
|
|
|
|
|
|
return R.data(map); |
|
|
|
|
} |
|
|
|
@ -1450,9 +1476,10 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
log.warn("#############updateWaybill: 运单信息不存在 waybillId={}", waybillId); |
|
|
|
|
return R.fail(405, "运单信息不存在"); |
|
|
|
|
} |
|
|
|
|
String updateMsg = verifyData(openOrderDTO, waybillEntity); |
|
|
|
|
// String updateMsg = verifyData(openOrderDTO,waybillEntity);
|
|
|
|
|
List<EditOrderMsgVO> list = verifyData(openOrderDTO,waybillEntity); |
|
|
|
|
|
|
|
|
|
return R.data(updateMsg); |
|
|
|
|
return R.data(list); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -1926,7 +1953,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
//绑定订单和运单的关系
|
|
|
|
|
List<TrunklineAdvanceEntity> advanceEntityList = advanceService.findListByIds(advanceIds); |
|
|
|
|
List<TrunklineWaybillOrderEntity> waybillOrderEntities = new ArrayList<>(); |
|
|
|
|
for (TrunklineAdvanceEntity advanceEntity : advanceEntityList) { |
|
|
|
|
Set<String> orderCodes = new TreeSet<>(); |
|
|
|
|
for (TrunklineAdvanceEntity advanceEntity:advanceEntityList){ |
|
|
|
|
Long advanceId = advanceEntity.getId(); |
|
|
|
|
String waybillStatus = advanceEntity.getWaybillStatus(); |
|
|
|
|
if ("1".equals(waybillStatus)) { |
|
|
|
@ -1946,6 +1974,10 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
waybillOrderEntities.add(waybillOrderEntity); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// List<TrunklineAdvanceDetailVO> list = advanceDetailService.findList(advanceEntity.getId());
|
|
|
|
|
// trunklineWaybillPackageService.saveList(list,waybillEntity);
|
|
|
|
|
// distributionParcelListClient.updateEntityByOpenOrder(advanceId,warehouseId,waybillId);
|
|
|
|
|
// orderCodes.add(advanceEntity.getOrderCode());
|
|
|
|
|
advanceEntity.setWaybillStatus("1"); |
|
|
|
|
advanceEntity.setWaybillNo(waybillEntity.getWaybillNo()); |
|
|
|
|
} |
|
|
|
@ -1953,6 +1985,15 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
//修改暂存单的状态为已开单
|
|
|
|
|
advanceService.updateBatchById(advanceEntityList); |
|
|
|
|
|
|
|
|
|
// Integer isTransfer = 1;
|
|
|
|
|
// if(departureWarehouseId.equals(destinationWarehouseId)){
|
|
|
|
|
// isTransfer = 0;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// for (String orderCode : orderCodes) {
|
|
|
|
|
// distributionParcelListClient.updateTransferStatus(orderCode,warehouseId,isTransfer);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//计算扫码入库的包件是否需要把运单和提货单挂上
|
|
|
|
|
List<BillladingPackageVO> billladingPackageList = advanceDetailService.findBillladingPackageByAdvanceIdsAnd(advanceIds); |
|
|
|
@ -2095,76 +2136,128 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
return R.data(list); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private String verifyData(OpenOrderDTO openOrderDTO, WarehouseWaybillEntity waybillEntity) { |
|
|
|
|
private List<EditOrderMsgVO> verifyData(OpenOrderDTO openOrderDTO, WarehouseWaybillEntity waybillEntity) { |
|
|
|
|
log.info("###################verifyData: 验证改单数据"); |
|
|
|
|
StringBuilder stringBuilder = new StringBuilder(); |
|
|
|
|
List<EditOrderMsgVO> msgList = new ArrayList<>(); |
|
|
|
|
String newDestination = openOrderDTO.getDestination(); |
|
|
|
|
String destination = waybillEntity.getDestination(); |
|
|
|
|
if (!destination.equals(newDestination)) { |
|
|
|
|
stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(newDestination,destination)){ |
|
|
|
|
// stringBuilder.append("到站:").append(destination).append("-->").append(newDestination).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("到站"); |
|
|
|
|
editOrderMsgVO.setOldValue(destination); |
|
|
|
|
editOrderMsgVO.setNewValue(newDestination); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
Long newDestinationWarehouseId = openOrderDTO.getDestinationWarehouseId(); |
|
|
|
|
String newDestinationWarehouseName = openOrderDTO.getDestinationWarehouseName(); |
|
|
|
|
Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId(); |
|
|
|
|
String departureWarehouseName = waybillEntity.getDepartureWarehouseName(); |
|
|
|
|
if (!destinationWarehouseId.equals(newDestinationWarehouseId)) { |
|
|
|
|
stringBuilder.append("目的仓:").append(departureWarehouseName).append("-->").append(newDestinationWarehouseName).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(destinationWarehouseId,newDestinationWarehouseId)){ |
|
|
|
|
// stringBuilder.append("目的仓:").append(departureWarehouseName).append("-->").append(newDestinationWarehouseName).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("目的仓"); |
|
|
|
|
editOrderMsgVO.setOldValue(departureWarehouseName); |
|
|
|
|
editOrderMsgVO.setNewValue(newDestinationWarehouseName); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
Long newShipperId = openOrderDTO.getShipperId(); |
|
|
|
|
String newShipper = openOrderDTO.getShipper(); |
|
|
|
|
Long shipperId = waybillEntity.getShipperId(); |
|
|
|
|
String shipper = waybillEntity.getShipper(); |
|
|
|
|
if (!shipperId.equals(newShipperId)) { |
|
|
|
|
stringBuilder.append("发货单位:").append(shipper).append("-->").append(newShipper).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(shipperId,newShipperId)){ |
|
|
|
|
// stringBuilder.append("发货单位:").append(shipper).append("-->").append(newShipper).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("发货单位"); |
|
|
|
|
editOrderMsgVO.setOldValue(shipper); |
|
|
|
|
editOrderMsgVO.setNewValue(newShipper); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newShipperName = openOrderDTO.getShipperName(); |
|
|
|
|
String shipperName = waybillEntity.getShipperName(); |
|
|
|
|
shipperName = StringUtil.isBlank(shipperName) ? "" : shipperName; |
|
|
|
|
if (!shipperName.equals(newShipperName)) { |
|
|
|
|
stringBuilder.append("发货人:").append(shipperName).append("-->").append(newShipperName).append(";"); |
|
|
|
|
shipperName = StringUtil.isBlank(shipperName)?"":shipperName; |
|
|
|
|
if(!ObjectUtil.equals(shipperName,newShipperName)){ |
|
|
|
|
// stringBuilder.append("发货人:").append(shipperName).append("-->").append(newShipperName).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("发货人"); |
|
|
|
|
editOrderMsgVO.setOldValue(shipperName); |
|
|
|
|
editOrderMsgVO.setNewValue(newShipperName); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newShipperMobile = openOrderDTO.getShipperMobile(); |
|
|
|
|
String shipperMobile = waybillEntity.getShipperMobile(); |
|
|
|
|
shipperMobile = StringUtil.isBlank(shipperMobile) ? "" : shipperMobile; |
|
|
|
|
if (!shipperMobile.equals(newShipperMobile)) { |
|
|
|
|
stringBuilder.append("发货人电话:").append(shipperMobile).append("-->").append(newShipperMobile).append(";"); |
|
|
|
|
shipperMobile = StringUtil.isBlank(shipperMobile)?"":shipperMobile; |
|
|
|
|
if(!ObjectUtil.equals(shipperMobile,newShipperMobile)){ |
|
|
|
|
// stringBuilder.append("发货人电话:").append(shipperMobile).append("-->").append(newShipperMobile).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("发货人电话"); |
|
|
|
|
editOrderMsgVO.setOldValue(shipperMobile); |
|
|
|
|
editOrderMsgVO.setNewValue(newShipperMobile); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newShipperAddress = openOrderDTO.getShipperAddress(); |
|
|
|
|
String shipperAddress = waybillEntity.getShipperAddress(); |
|
|
|
|
shipperAddress = StringUtil.isBlank(shipperAddress) ? "" : shipperAddress; |
|
|
|
|
if (!shipperAddress.equals(newShipperAddress)) { |
|
|
|
|
stringBuilder.append("发货人地址:").append(shipperAddress).append("-->").append(newShipperAddress).append(";"); |
|
|
|
|
shipperAddress = StringUtil.isBlank(shipperAddress)?"":shipperAddress; |
|
|
|
|
if(!ObjectUtil.equals(shipperAddress,newShipperAddress)){ |
|
|
|
|
// stringBuilder.append("发货人地址:").append(shipperAddress).append("-->").append(newShipperAddress).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("发货人电话"); |
|
|
|
|
editOrderMsgVO.setOldValue(shipperAddress); |
|
|
|
|
editOrderMsgVO.setNewValue(newShipperAddress); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Long newConsigneeId = openOrderDTO.getConsigneeId(); |
|
|
|
|
String newConsignee = openOrderDTO.getConsignee(); |
|
|
|
|
Long consigneeId = waybillEntity.getConsigneeId(); |
|
|
|
|
String consignee = waybillEntity.getConsignee(); |
|
|
|
|
if (!consigneeId.equals(newConsigneeId)) { |
|
|
|
|
stringBuilder.append("收货单位:").append(consignee).append("-->").append(newConsignee).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(consigneeId,newConsigneeId)){ |
|
|
|
|
// stringBuilder.append("收货单位:").append(consignee).append("-->").append(newConsignee).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("收货单位"); |
|
|
|
|
editOrderMsgVO.setOldValue(consignee); |
|
|
|
|
editOrderMsgVO.setNewValue(newConsignee); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newConsigneeName = openOrderDTO.getConsigneeName(); |
|
|
|
|
String consigneeName = waybillEntity.getConsigneeName(); |
|
|
|
|
consigneeName = StringUtil.isBlank(consigneeName) ? "" : consigneeName; |
|
|
|
|
if (!consigneeName.equals(newConsigneeName)) { |
|
|
|
|
stringBuilder.append("收货人:").append(consigneeName).append("-->").append(newConsigneeName).append(";"); |
|
|
|
|
consigneeName = StringUtil.isBlank(consigneeName)?"":consigneeName; |
|
|
|
|
if(!ObjectUtil.equals(consigneeName,newConsigneeName)){ |
|
|
|
|
// stringBuilder.append("收货人:").append(consigneeName).append("-->").append(newConsigneeName).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("收货人"); |
|
|
|
|
editOrderMsgVO.setOldValue(consigneeName); |
|
|
|
|
editOrderMsgVO.setNewValue(newConsigneeName); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newConsigneeMobile = openOrderDTO.getConsigneeMobile(); |
|
|
|
|
String consigneeMobile = waybillEntity.getConsigneeMobile(); |
|
|
|
|
consigneeMobile = StringUtil.isBlank(consigneeMobile) ? "" : consigneeMobile; |
|
|
|
|
if (!consigneeMobile.equals(newConsigneeMobile)) { |
|
|
|
|
stringBuilder.append("收货人电话:").append(consigneeMobile).append("-->").append(newConsigneeMobile).append(";"); |
|
|
|
|
consigneeMobile = StringUtil.isBlank(consigneeMobile)?"":consigneeMobile; |
|
|
|
|
if(!ObjectUtil.equals(consigneeMobile,newConsigneeMobile)){ |
|
|
|
|
// stringBuilder.append("收货人电话:").append(consigneeMobile).append("-->").append(newConsigneeMobile).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("收货人电话"); |
|
|
|
|
editOrderMsgVO.setOldValue(consigneeMobile); |
|
|
|
|
editOrderMsgVO.setNewValue(newConsigneeMobile); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newConsigneeAddress = openOrderDTO.getConsigneeAddress(); |
|
|
|
|
String consigneeAddress = waybillEntity.getConsigneeAddress(); |
|
|
|
|
consigneeAddress = StringUtil.isBlank(consigneeAddress) ? "" : consigneeAddress; |
|
|
|
|
if (!shipperAddress.equals(newShipperAddress)) { |
|
|
|
|
stringBuilder.append("发货人地址:").append(consigneeAddress).append("-->").append(newConsigneeAddress).append(";"); |
|
|
|
|
consigneeAddress = StringUtil.isBlank(consigneeAddress)?"":consigneeAddress; |
|
|
|
|
if(!ObjectUtil.equals(shipperAddress,newShipperAddress)){ |
|
|
|
|
// stringBuilder.append("发货人地址:").append(consigneeAddress).append("-->").append(newConsigneeAddress).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("发货人地址"); |
|
|
|
|
editOrderMsgVO.setOldValue(shipperAddress); |
|
|
|
|
editOrderMsgVO.setNewValue(newShipperAddress); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String removeMsg = null; |
|
|
|
@ -2174,20 +2267,24 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
Long waybillDetailId = waybillDetailDTO.getId(); |
|
|
|
|
|
|
|
|
|
WarehouseWayBillDetail warehouseWayBillDetail = warehouseWaybillDetailClient.findEntityByWaybillDetailId(waybillDetailId); |
|
|
|
|
if (Objects.isNull(warehouseWayBillDetail)) { |
|
|
|
|
if(Objects.isNull(warehouseWayBillDetail)){ |
|
|
|
|
log.warn("#################verifyUpdateData: 明细不存在"); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (StringUtil.isBlank(removeMsg)) { |
|
|
|
|
removeMsg = warehouseWayBillDetail.getProductName() + "(" + warehouseWayBillDetail.getNum() + ")"; |
|
|
|
|
} else { |
|
|
|
|
removeMsg = removeMsg + "," + warehouseWayBillDetail.getProductName() + "(" + warehouseWayBillDetail.getNum() + ")"; |
|
|
|
|
if(StringUtil.isBlank(removeMsg)){ |
|
|
|
|
removeMsg = warehouseWayBillDetail.getProductName()+"("+warehouseWayBillDetail.getNum()+")"; |
|
|
|
|
}else{ |
|
|
|
|
removeMsg = removeMsg + "," + warehouseWayBillDetail.getProductName()+"("+warehouseWayBillDetail.getNum()+")"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (StringUtil.isNotBlank(removeMsg)) { |
|
|
|
|
stringBuilder.append("明细移除:").append(removeMsg).append(";"); |
|
|
|
|
if(StringUtil.isNotBlank(removeMsg)){ |
|
|
|
|
// stringBuilder.append("明细移除:").append(removeMsg).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("明细移除"); |
|
|
|
|
editOrderMsgVO.setOldValue(removeMsg); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<WaybillDetailDTO> addList = openOrderDTO.getAddList(); |
|
|
|
@ -2195,197 +2292,346 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
|
|
|
|
|
|
|
|
|
|
Integer updateType = waybillDetailDTO.getUpdateType(); |
|
|
|
|
|
|
|
|
|
if (1 == updateType) { |
|
|
|
|
if(1 == updateType){ |
|
|
|
|
//新增
|
|
|
|
|
stringBuilder.append("明细新增:").append(waybillDetailDTO.getGoodsName()).append(" 数量 ").append(waybillDetailDTO.getNum()).append(" 单价 ").append(waybillDetailDTO.getPrice()).append(";"); |
|
|
|
|
// stringBuilder.append("明细新增:").append(waybillDetailDTO.getGoodsName()).append(" 数量 ").append(waybillDetailDTO.getNum()).append(" 单价 ").append(waybillDetailDTO.getPrice()).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("明细新增 "+waybillDetailDTO.getGoodsName()); |
|
|
|
|
editOrderMsgVO.setNewValue(" 数量 "+waybillDetailDTO.getNum()+" 单价 "+waybillDetailDTO.getPrice()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
|
|
|
|
|
} else if (2 == updateType) { |
|
|
|
|
|
|
|
|
|
}else if(2 == updateType){ |
|
|
|
|
//更新
|
|
|
|
|
Long waybillDetailId = waybillDetailDTO.getId(); |
|
|
|
|
WarehouseWayBillDetail warehouseWayBillDetail = warehouseWaybillDetailClient.findEntityByWaybillDetailId(waybillDetailId); |
|
|
|
|
if (Objects.isNull(warehouseWayBillDetail)) { |
|
|
|
|
if(Objects.isNull(warehouseWayBillDetail)){ |
|
|
|
|
log.warn("#################verifyUpdateData: 明细不存在"); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
Integer newNum = waybillDetailDTO.getNum(); |
|
|
|
|
Integer num = warehouseWayBillDetail.getNum(); |
|
|
|
|
if (!num.equals(newNum)) { |
|
|
|
|
stringBuilder.append("明细更新:").append(warehouseWayBillDetail.getProductName()).append(" 数量修改").append(num).append("-->").append(newNum).append(";"); |
|
|
|
|
if(!num.equals(newNum)){ |
|
|
|
|
// stringBuilder.append("明细更新:").append(warehouseWayBillDetail.getProductName()).append(" 数量修改").append(num).append("-->").append(newNum).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("明细更新 "+warehouseWayBillDetail.getProductName() +" 数量修改 "); |
|
|
|
|
editOrderMsgVO.setOldValue(num+""); |
|
|
|
|
editOrderMsgVO.setNewValue(newNum+""); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newPrice = waybillDetailDTO.getPrice(); |
|
|
|
|
BigDecimal price = warehouseWayBillDetail.getPrice(); |
|
|
|
|
if (price.compareTo(newPrice) != 0) { |
|
|
|
|
stringBuilder.append("明细更新:").append(warehouseWayBillDetail.getProductName()).append(" 单价修改").append(price).append("-->").append(newPrice).append(";"); |
|
|
|
|
if(price.compareTo(newPrice) != 0){ |
|
|
|
|
// stringBuilder.append("明细更新:").append(warehouseWayBillDetail.getProductName()).append(" 单价修改").append(price).append("-->").append(newPrice).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("明细更新 "+warehouseWayBillDetail.getProductName() +" 单价修改 "); |
|
|
|
|
editOrderMsgVO.setOldValue(price.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(newPrice.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Integer newChargeType = waybillDetailDTO.getChargeType(); |
|
|
|
|
Integer chargeType = warehouseWayBillDetail.getChargeType(); |
|
|
|
|
if (!chargeType.equals(newChargeType)) { |
|
|
|
|
stringBuilder.append("明细更新:").append(warehouseWayBillDetail.getProductName()).append(" 计价方式修改").append(chargeType).append("-->").append(newChargeType).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(chargeType,newChargeType)){ |
|
|
|
|
// stringBuilder.append("明细更新:").append(warehouseWayBillDetail.getProductName()).append(" 计价方式修改").append(chargeType).append("-->").append(newChargeType).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("明细更新 "+warehouseWayBillDetail.getProductName() +" 计价方式修改 "); |
|
|
|
|
editOrderMsgVO.setOldValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_CHARGE_TYPE,chargeType+"")); |
|
|
|
|
editOrderMsgVO.setNewValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_CHARGE_TYPE,newChargeType+"")); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Integer newTotalCount = openOrderDTO.getTotalCount(); |
|
|
|
|
Integer totalCount = waybillEntity.getTotalCount(); |
|
|
|
|
if (!totalCount.equals(newTotalCount)) { |
|
|
|
|
stringBuilder.append("货物总数:").append(totalCount).append("-->").append(newTotalCount).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(totalCount,newTotalCount)){ |
|
|
|
|
// stringBuilder.append("货物总数:").append(totalCount).append("-->").append(newTotalCount).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("货物总数"); |
|
|
|
|
editOrderMsgVO.setOldValue(totalCount+""); |
|
|
|
|
editOrderMsgVO.setNewValue(newTotalCount+""); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newTotalFreight = openOrderDTO.getTotalFreight(); |
|
|
|
|
BigDecimal totalFreight = waybillEntity.getTotalFreight(); |
|
|
|
|
if (totalFreight.compareTo(newTotalFreight) != 0) { |
|
|
|
|
stringBuilder.append("运费:").append(totalFreight).append("-->").append(newTotalFreight).append(";"); |
|
|
|
|
if(totalFreight.compareTo(newTotalFreight) != 0){ |
|
|
|
|
// stringBuilder.append("运费:").append(totalFreight).append("-->").append(newTotalFreight).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("运费"); |
|
|
|
|
editOrderMsgVO.setOldValue(totalFreight+""); |
|
|
|
|
editOrderMsgVO.setNewValue(newTotalFreight+""); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newDeliveryFee = openOrderDTO.getDeliveryFee(); |
|
|
|
|
BigDecimal deliveryFee = waybillEntity.getDeliveryFee(); |
|
|
|
|
if (deliveryFee.compareTo(newDeliveryFee) != 0) { |
|
|
|
|
stringBuilder.append("送货费:").append(deliveryFee).append("-->").append(newDeliveryFee).append(";"); |
|
|
|
|
if(deliveryFee.compareTo(newDeliveryFee) != 0){ |
|
|
|
|
// stringBuilder.append("送货费:").append(deliveryFee).append("-->").append(newDeliveryFee).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("送货费"); |
|
|
|
|
editOrderMsgVO.setOldValue(deliveryFee.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(newDeliveryFee.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newPickupFee = openOrderDTO.getPickupFee(); |
|
|
|
|
BigDecimal pickupFee = waybillEntity.getPickupFee(); |
|
|
|
|
if (pickupFee.compareTo(newPickupFee) != 0) { |
|
|
|
|
stringBuilder.append("提货费:").append(pickupFee).append("-->").append(newPickupFee).append(";"); |
|
|
|
|
if(pickupFee.compareTo(newPickupFee) != 0){ |
|
|
|
|
// stringBuilder.append("提货费:").append(pickupFee).append("-->").append(newPickupFee).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("提货费"); |
|
|
|
|
editOrderMsgVO.setOldValue(pickupFee.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(newPickupFee.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newWarehouseManagementFee = openOrderDTO.getWarehouseManagementFee(); |
|
|
|
|
BigDecimal warehouseManagementFee = waybillEntity.getWarehouseManagementFee(); |
|
|
|
|
if (warehouseManagementFee.compareTo(newWarehouseManagementFee) != 0) { |
|
|
|
|
stringBuilder.append("仓库管理费:").append(warehouseManagementFee).append("-->").append(newWarehouseManagementFee).append(";"); |
|
|
|
|
if(warehouseManagementFee.compareTo(newWarehouseManagementFee) != 0){ |
|
|
|
|
// stringBuilder.append("仓库管理费:").append(warehouseManagementFee).append("-->").append(newWarehouseManagementFee).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("仓库管理费"); |
|
|
|
|
editOrderMsgVO.setOldValue(warehouseManagementFee.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(newWarehouseManagementFee.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newStorageFee = openOrderDTO.getStorageFee(); |
|
|
|
|
BigDecimal storageFee = waybillEntity.getStorageFee(); |
|
|
|
|
if (storageFee.compareTo(newStorageFee) != 0) { |
|
|
|
|
stringBuilder.append("仓储费:").append(storageFee).append("-->").append(newStorageFee).append(";"); |
|
|
|
|
if(storageFee.compareTo(newStorageFee) != 0){ |
|
|
|
|
// stringBuilder.append("仓储费:").append(storageFee).append("-->").append(newStorageFee).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("仓储费"); |
|
|
|
|
editOrderMsgVO.setOldValue(storageFee.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(newStorageFee.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newHandlingFee = openOrderDTO.getHandlingFee(); |
|
|
|
|
BigDecimal handlingFee = waybillEntity.getHandlingFee(); |
|
|
|
|
if (handlingFee.compareTo(newHandlingFee) != 0) { |
|
|
|
|
stringBuilder.append("装卸费:").append(handlingFee).append("-->").append(newHandlingFee).append(";"); |
|
|
|
|
if(handlingFee.compareTo(newHandlingFee) != 0){ |
|
|
|
|
// stringBuilder.append("装卸费:").append(handlingFee).append("-->").append(newHandlingFee).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("装卸费"); |
|
|
|
|
editOrderMsgVO.setOldValue(handlingFee.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(newHandlingFee.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newInstallFee = openOrderDTO.getInstallFee(); |
|
|
|
|
BigDecimal installFee = waybillEntity.getInstallFee(); |
|
|
|
|
if (installFee.compareTo(newInstallFee) != 0) { |
|
|
|
|
stringBuilder.append("安装费:").append(installFee).append("-->").append(newInstallFee).append(";"); |
|
|
|
|
if(installFee.compareTo(newInstallFee) != 0){ |
|
|
|
|
// stringBuilder.append("安装费:").append(installFee).append("-->").append(newInstallFee).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("安装费"); |
|
|
|
|
editOrderMsgVO.setOldValue(installFee.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(newInstallFee.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newOtherFee = openOrderDTO.getOtherFee(); |
|
|
|
|
BigDecimal otherFee = waybillEntity.getOtherFee(); |
|
|
|
|
if (otherFee.compareTo(newOtherFee) != 0) { |
|
|
|
|
stringBuilder.append("其他费:").append(otherFee).append("-->").append(newOtherFee).append(";"); |
|
|
|
|
if(otherFee.compareTo(newOtherFee) != 0){ |
|
|
|
|
// stringBuilder.append("其他费:").append(otherFee).append("-->").append(newOtherFee).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("其他费"); |
|
|
|
|
editOrderMsgVO.setOldValue(otherFee.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(newOtherFee.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newInsuranceFee = openOrderDTO.getInsuranceFee(); |
|
|
|
|
BigDecimal insuranceFee = waybillEntity.getInsuranceFee(); |
|
|
|
|
if (insuranceFee.compareTo(newInsuranceFee) != 0) { |
|
|
|
|
stringBuilder.append("保价费:").append(insuranceFee).append("-->").append(newInsuranceFee).append(";"); |
|
|
|
|
if(insuranceFee.compareTo(newInsuranceFee) != 0){ |
|
|
|
|
// stringBuilder.append("保价费:").append(insuranceFee).append("-->").append(newInsuranceFee).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("保价费"); |
|
|
|
|
editOrderMsgVO.setOldValue(insuranceFee.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(newInsuranceFee.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newClaimingValue = openOrderDTO.getClaimingValue(); |
|
|
|
|
BigDecimal claimingValue = waybillEntity.getClaimingValue(); |
|
|
|
|
if (claimingValue.compareTo(newClaimingValue) != 0) { |
|
|
|
|
stringBuilder.append("申明价值:").append(claimingValue).append("-->").append(newClaimingValue).append(";"); |
|
|
|
|
if(claimingValue.compareTo(newClaimingValue) != 0){ |
|
|
|
|
// stringBuilder.append("申明价值:").append(claimingValue).append("-->").append(newClaimingValue).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("申明价值"); |
|
|
|
|
editOrderMsgVO.setOldValue(claimingValue.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(newClaimingValue.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newPayType = openOrderDTO.getPayType(); |
|
|
|
|
String payType = waybillEntity.getPayType(); |
|
|
|
|
if (!payType.equals(newPayType)) { |
|
|
|
|
stringBuilder.append("支付方式:").append(payType).append("-->").append(newPayType).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(payType,newPayType)){ |
|
|
|
|
// stringBuilder.append("支付方式:").append(payType).append("-->").append(newPayType).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("支付方式"); |
|
|
|
|
editOrderMsgVO.setOldValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_PAY_TYPE,payType)); |
|
|
|
|
editOrderMsgVO.setNewValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_PAY_TYPE,newPayType)); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newPayWay = openOrderDTO.getPayWay(); |
|
|
|
|
String payWay = waybillEntity.getPayWay(); |
|
|
|
|
if (!payWay.equals(newPayWay)) { |
|
|
|
|
stringBuilder.append("付款方式:").append(payWay).append("-->").append(newPayWay).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(payWay,newPayWay)){ |
|
|
|
|
// stringBuilder.append("付款方式:").append(payWay).append("-->").append(newPayWay).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("付款方式"); |
|
|
|
|
editOrderMsgVO.setOldValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_PAY_WAY,payWay)); |
|
|
|
|
editOrderMsgVO.setNewValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_PAY_WAY,newPayWay)); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal xianPay = openOrderDTO.getXianPay(); |
|
|
|
|
BigDecimal xPay = waybillEntity.getXPay(); |
|
|
|
|
if (xPay.compareTo(xianPay) != 0) { |
|
|
|
|
stringBuilder.append("现付:").append(xPay).append("-->").append(xianPay).append(";"); |
|
|
|
|
if(xPay.compareTo(xianPay) != 0){ |
|
|
|
|
// stringBuilder.append("现付:").append(xPay).append("-->").append(xianPay).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("现付"); |
|
|
|
|
editOrderMsgVO.setOldValue(xPay.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(xianPay.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal daoPay = openOrderDTO.getDaoPay(); |
|
|
|
|
BigDecimal dPay = waybillEntity.getDPay(); |
|
|
|
|
if (dPay.compareTo(daoPay) != 0) { |
|
|
|
|
stringBuilder.append("到付:").append(dPay).append("-->").append(daoPay).append(";"); |
|
|
|
|
if(dPay.compareTo(daoPay) != 0){ |
|
|
|
|
// stringBuilder.append("到付:").append(dPay).append("-->").append(daoPay).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("到付"); |
|
|
|
|
editOrderMsgVO.setOldValue(dPay.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(daoPay.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal yuePay = openOrderDTO.getYuePay(); |
|
|
|
|
BigDecimal yPay = waybillEntity.getYPay(); |
|
|
|
|
if (yPay.compareTo(yuePay) != 0) { |
|
|
|
|
stringBuilder.append("月结:").append(yPay).append("-->").append(yuePay).append(";"); |
|
|
|
|
if(yPay.compareTo(yuePay) != 0){ |
|
|
|
|
// stringBuilder.append("月结:").append(yPay).append("-->").append(yuePay).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("月结"); |
|
|
|
|
editOrderMsgVO.setOldValue(yPay.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(yuePay.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal huiPay = openOrderDTO.getHuiPay(); |
|
|
|
|
BigDecimal hPay = waybillEntity.getHPay(); |
|
|
|
|
if (hPay.compareTo(huiPay) != 0) { |
|
|
|
|
stringBuilder.append("月结:").append(hPay).append("-->").append(huiPay).append(";"); |
|
|
|
|
if(hPay.compareTo(huiPay) != 0){ |
|
|
|
|
// stringBuilder.append("回付:").append(hPay).append("-->").append(huiPay).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("回付"); |
|
|
|
|
editOrderMsgVO.setOldValue(hPay.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(huiPay.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newthirdOperationFee = openOrderDTO.getThirdOperationFee(); |
|
|
|
|
BigDecimal thirdOperationFee = waybillEntity.getThirdOperationFee(); |
|
|
|
|
if (thirdOperationFee.compareTo(newthirdOperationFee) != 0) { |
|
|
|
|
stringBuilder.append("三方操作费:").append(thirdOperationFee).append("-->").append(newthirdOperationFee).append(";"); |
|
|
|
|
if(thirdOperationFee.compareTo(newthirdOperationFee) != 0){ |
|
|
|
|
// stringBuilder.append("三方操作费:").append(thirdOperationFee).append("-->").append(newthirdOperationFee).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("三方操作费"); |
|
|
|
|
editOrderMsgVO.setOldValue(thirdOperationFee.toPlainString()); |
|
|
|
|
editOrderMsgVO.setNewValue(newthirdOperationFee.toPlainString()); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newdeliveryWay = openOrderDTO.getDeliveryWay(); |
|
|
|
|
String deliveryWay = waybillEntity.getDeliveryWay(); |
|
|
|
|
if (!deliveryWay.equals(newdeliveryWay)) { |
|
|
|
|
stringBuilder.append("送货方式:").append(deliveryWay).append("-->").append(newdeliveryWay).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(deliveryWay,newdeliveryWay)){ |
|
|
|
|
// stringBuilder.append("送货方式:").append(deliveryWay).append("-->").append(newdeliveryWay).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("送货方式"); |
|
|
|
|
editOrderMsgVO.setOldValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_DELIVERY_WAY,deliveryWay)); |
|
|
|
|
editOrderMsgVO.setNewValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_DELIVERY_WAY,newdeliveryWay)); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newurgency = openOrderDTO.getUrgency(); |
|
|
|
|
String urgency = waybillEntity.getUrgency(); |
|
|
|
|
if (!urgency.equals(newurgency)) { |
|
|
|
|
stringBuilder.append("紧急度:").append(urgency).append("-->").append(newurgency).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(urgency,newurgency)){ |
|
|
|
|
// stringBuilder.append("紧急度:").append(urgency).append("-->").append(newurgency).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("紧急度"); |
|
|
|
|
editOrderMsgVO.setOldValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_URGENCY,urgency)); |
|
|
|
|
editOrderMsgVO.setNewValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_URGENCY,newurgency)); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newreceipt = openOrderDTO.getReceipt(); |
|
|
|
|
String receipt = waybillEntity.getReceipt(); |
|
|
|
|
if (!receipt.equals(newreceipt)) { |
|
|
|
|
stringBuilder.append("回单方式:").append(receipt).append("-->").append(newreceipt).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(receipt,newreceipt)){ |
|
|
|
|
// stringBuilder.append("回单方式:").append(receipt).append("-->").append(newreceipt).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("回单方式"); |
|
|
|
|
editOrderMsgVO.setOldValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_RECEIPT,receipt)); |
|
|
|
|
editOrderMsgVO.setNewValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_RECEIPT,newreceipt)); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newtransportType = openOrderDTO.getTransportType(); |
|
|
|
|
String transportType = waybillEntity.getTransportType(); |
|
|
|
|
if (!transportType.equals(newtransportType)) { |
|
|
|
|
stringBuilder.append("运输方式:").append(transportType).append("-->").append(newtransportType).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(transportType,newtransportType)){ |
|
|
|
|
// stringBuilder.append("运输方式:").append(transportType).append("-->").append(newtransportType).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("运输方式"); |
|
|
|
|
editOrderMsgVO.setOldValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_TRANSPORT_TYPE,transportType)); |
|
|
|
|
editOrderMsgVO.setNewValue(DictBizCache.getValue(DictBizConstant.OPEN_ORDER_TRANSPORT_TYPE,newtransportType)); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Integer newreceiptNum = openOrderDTO.getReceiptNum(); |
|
|
|
|
Integer receiptNum = waybillEntity.getReceiptNum(); |
|
|
|
|
if (!receiptNum.equals(newreceiptNum)) { |
|
|
|
|
stringBuilder.append("回单数量:").append(receiptNum).append("-->").append(newreceiptNum).append(";"); |
|
|
|
|
if(!ObjectUtil.equals(receiptNum,newreceiptNum)){ |
|
|
|
|
// stringBuilder.append("回单数量:").append(receiptNum).append("-->").append(newreceiptNum).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("回单数量"); |
|
|
|
|
editOrderMsgVO.setOldValue(receiptNum+""); |
|
|
|
|
editOrderMsgVO.setNewValue(newreceiptNum+""); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BigDecimal newrebate = openOrderDTO.getRebate(); |
|
|
|
|
BigDecimal rebate = waybillEntity.getRebate(); |
|
|
|
|
if (!Objects.isNull(rebate)) { |
|
|
|
|
if (rebate.compareTo(newrebate) != 0) { |
|
|
|
|
stringBuilder.append("回扣:").append(rebate).append("-->").append(newrebate).append(";"); |
|
|
|
|
if(!Objects.isNull(rebate)){ |
|
|
|
|
if(rebate.compareTo(newrebate) != 0){ |
|
|
|
|
// stringBuilder.append("回扣:").append(rebate).append("-->").append(newrebate).append(";");
|
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("回扣"); |
|
|
|
|
editOrderMsgVO.setOldValue(rebate+""); |
|
|
|
|
editOrderMsgVO.setNewValue(newrebate+""); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String newRemark = openOrderDTO.getRemark(); |
|
|
|
|
String remark = waybillEntity.getRemark(); |
|
|
|
|
if (!StringUtil.isBlank(remark)) { |
|
|
|
|
if (!remark.equals(newRemark)) { |
|
|
|
|
stringBuilder.append("备注:").append(remark).append("-->").append(newRemark).append(";"); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if (!StringUtil.isBlank(newRemark)) { |
|
|
|
|
stringBuilder.append("备注:").append(remark).append("-->").append(newRemark).append(";"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(!ObjectUtil.equals(remark,newRemark)){ |
|
|
|
|
stringBuilder.append("备注:").append(remark).append("-->").append(newRemark).append(";"); |
|
|
|
|
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO(); |
|
|
|
|
editOrderMsgVO.setItemName("备注"); |
|
|
|
|
editOrderMsgVO.setOldValue(remark); |
|
|
|
|
editOrderMsgVO.setNewValue(newRemark); |
|
|
|
|
msgList.add(editOrderMsgVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// if(!StringUtil.isBlank(remark)){
|
|
|
|
|
// if(!remark.equals(newRemark)){
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// }else{
|
|
|
|
|
// if(!StringUtil.isBlank(newRemark)){
|
|
|
|
|
// stringBuilder.append("备注:").append(remark).append("-->").append(newRemark).append(";");
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return stringBuilder.toString(); |
|
|
|
|
return msgList; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|