Browse Source

Merge branch 'pre-production'

# Conflicts:
#	blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java
master
pref_mail@163.com 6 months ago
parent
commit
433498e5dd
  1. 45
      blade-biz-common/src/main/java/org/springblade/common/constant/Inventory/InventoryStockTypeStatusConstant.java
  2. 7
      blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java
  3. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/factorydata/FactoryDataConstants.java
  4. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  5. 15
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/UpdateOrderDTO.java
  6. 7
      blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/util/FactoryDataUtil.java
  7. 4
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  8. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java
  9. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadEntity.java
  10. 2
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java
  11. 3
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java
  12. 10
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java
  13. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.java
  14. 5
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.xml
  15. 15
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  16. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesCompletionRecordService.java
  17. 4
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesCompletionRecordServiceImpl.java
  18. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  19. 25
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java
  20. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java
  21. 44
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionStockupAppController.java
  22. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java
  23. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  24. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java
  25. 51
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  26. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  27. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java
  28. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  29. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryDetailsService.java
  30. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  31. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillStockService.java
  32. 53
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryDetailsServiceImpl.java
  33. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  34. 107
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  35. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  36. 50
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  37. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  38. 568
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  39. 47
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillStockServiceImpl.java
  40. 8
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java
  41. 27
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  42. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java
  43. 47
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml
  44. 16
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  45. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java
  46. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  47. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java
  48. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
  49. 105
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  50. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java
  51. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  52. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java
  53. 53
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  54. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java
  55. 7
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java
  56. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseConfigServiceImpl.java
  57. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java
  58. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

45
blade-biz-common/src/main/java/org/springblade/common/constant/Inventory/InventoryStockTypeStatusConstant.java

@ -0,0 +1,45 @@
package org.springblade.common.constant.Inventory;
/**
* 订单包件状态
* 关联码表 order_package_status
*
* @author pref
*/
public enum InventoryStockTypeStatusConstant {
shengcheng("生成", "10"),
caiji("采集", "20");
/**
* 状态
*/
private String name;
/**
*
*/
private String value;
private InventoryStockTypeStatusConstant(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

7
blade-biz-common/src/main/java/org/springblade/common/constant/OldSystemDataPushConfig.java

@ -102,6 +102,13 @@ public class OldSystemDataPushConfig {
//自贡仓 //自贡仓
warehourseIds.add("44"); warehourseIds.add("44");
//新都仓
warehourseIds.add("144");
//仁寿欧派大家居
warehourseIds.add("127");
} }

2
blade-biz-common/src/main/java/org/springblade/common/constant/factorydata/FactoryDataConstants.java

@ -83,6 +83,7 @@ public abstract class FactoryDataConstants {
/** /**
* 曼好家工厂订单 * 曼好家工厂订单
*/ */
String MWH_NODE_DATA_PUSH = "factory.data.queue.mwh.nodeDataPush" + DEVAUTH;
String MWH_FACTORY_ORDER = "factory.data.queue.mwh.factoryOrder" + DEVAUTH; String MWH_FACTORY_ORDER = "factory.data.queue.mwh.factoryOrder" + DEVAUTH;
/** /**
* 金牌工厂订单 * 金牌工厂订单
@ -134,6 +135,7 @@ public abstract class FactoryDataConstants {
/** /**
* 曼好家工厂订单 * 曼好家工厂订单
*/ */
String MWH_NODE_DATA_PUSH = "mwh.nodeDataPush" + DEVAUTH;
String MWH_FACTORY_ORDER = "mwh.factoryOrder" + DEVAUTH; String MWH_FACTORY_ORDER = "mwh.factoryOrder" + DEVAUTH;
/** /**
* 金牌工厂订单 * 金牌工厂订单

4
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java

@ -21,6 +21,7 @@ import com.logpm.distribution.dto.FindParamterDTO;
import com.logpm.distribution.dto.OrderPackageDTO; import com.logpm.distribution.dto.OrderPackageDTO;
import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.vo.DistributionParcelListVO; import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.UpdateOrderDTO;
import com.logpm.distribution.vo.ZeroPackageSupplyVO; import com.logpm.distribution.vo.ZeroPackageSupplyVO;
import org.springblade.common.constant.ModuleNameConstant; import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.BladePage;
@ -167,6 +168,9 @@ public interface IDistributionParcelListClient {
@GetMapping(API_PREFIX + "/updateEntityByOpenOrder") @GetMapping(API_PREFIX + "/updateEntityByOpenOrder")
void updateEntityByOpenOrder(@RequestParam Long advanceId, @RequestParam Long waybillId); void updateEntityByOpenOrder(@RequestParam Long advanceId, @RequestParam Long waybillId);
@PostMapping(API_PREFIX + "/updateEntityByOpenOrderByAdvanceIds")
void updateEntityByOpenOrderByAdvanceIds(@RequestBody UpdateOrderDTO updateOrderDTO);
@GetMapping(API_PREFIX + "/findByWaybillNumber") @GetMapping(API_PREFIX + "/findByWaybillNumber")
List<DistributionParcelListEntity> findByWaybillNumber(@RequestParam String waybillNumber); List<DistributionParcelListEntity> findByWaybillNumber(@RequestParam String waybillNumber);

15
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/UpdateOrderDTO.java

@ -0,0 +1,15 @@
package com.logpm.distribution.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class UpdateOrderDTO implements Serializable {
private List<Long> advanceIds;
private Long waybillId;
}

7
blade-service-api/logpm-factory-data-api/src/main/java/com/logpm/factorydata/util/FactoryDataUtil.java

@ -27,6 +27,13 @@ public class FactoryDataUtil {
factorys.put(BrandEnums.OLO.getValue(), FactoryDataConstants.Mq.RoutingKeys.OLO_NODE_DATA_PUSH); factorys.put(BrandEnums.OLO.getValue(), FactoryDataConstants.Mq.RoutingKeys.OLO_NODE_DATA_PUSH);
factorys.put(BrandEnums.SFY.getValue(), FactoryDataConstants.Mq.RoutingKeys.SFY_NODE_DATA_PUSH); factorys.put(BrandEnums.SFY.getValue(), FactoryDataConstants.Mq.RoutingKeys.SFY_NODE_DATA_PUSH);
factorys.put(BrandEnums.MTMM.getValue(), FactoryDataConstants.Mq.RoutingKeys.MENGTIAN_NODE_DATA_PUSH); factorys.put(BrandEnums.MTMM.getValue(), FactoryDataConstants.Mq.RoutingKeys.MENGTIAN_NODE_DATA_PUSH);
factorys.put(BrandEnums.MHJ.getValue(), FactoryDataConstants.Mq.RoutingKeys.MWH_NODE_DATA_PUSH);
// 皮阿诺
factorys.put(BrandEnums.PAN.getValue(), FactoryDataConstants.Mq.RoutingKeys.PIANO_NODE_DATA_PUSH);
// 欧派
factorys.put(BrandEnums.OP.getValue(), FactoryDataConstants.Mq.RoutingKeys.OPPEIN_NODE_DATA_PUSH);
// 金牌
factorys.put(BrandEnums.JP.getValue(), FactoryDataConstants.Mq.RoutingKeys.JP_NODE_DATA_PUSH);
} }

4
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java

@ -71,6 +71,8 @@ public class LoadCarsDTO implements Serializable {
private String trayCode; private String trayCode;
private String trayName; private String trayName;
private String unloadTrayName;
private String unloadTrayCode;
private String trayType; private String trayType;
private Integer isZero; private Integer isZero;
private String scanCode; private String scanCode;
@ -189,4 +191,6 @@ public class LoadCarsDTO implements Serializable {
private List<TrunklineCarsLoadLinePhotoEntity> addUrlList = new ArrayList<>(); private List<TrunklineCarsLoadLinePhotoEntity> addUrlList = new ArrayList<>();
private List<Long> removeUrlList = new ArrayList<>(); private List<Long> removeUrlList = new ArrayList<>();
private Long endWarehouseId;
} }

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java

@ -117,6 +117,7 @@ public class OpenOrderDTO implements Serializable {
private Integer trunklineCompleteOrNot;//干线是否整车 0否 1是 private Integer trunklineCompleteOrNot;//干线是否整车 0否 1是
private Long trunklineVehicleTypeId;//提货车型id
private String trunklineVehicleType;//提货车型 private String trunklineVehicleType;//提货车型
private String pickupVehicleType;//提货车型 private String pickupVehicleType;//提货车型

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadEntity.java

@ -130,6 +130,9 @@ public class TrunklineCarsLoadEntity extends TenantEntity {
/** 卸车件数 */ /** 卸车件数 */
@ApiModelProperty(name = "卸车件数",notes = "") @ApiModelProperty(name = "卸车件数",notes = "")
private Integer unloadNumber ; private Integer unloadNumber ;
/** 卸车件数 */
@ApiModelProperty(name = "在车件数",notes = "")
private Integer stockNumber ;
/** 异常件数 */ /** 异常件数 */
@ApiModelProperty(name = "异常件数",notes = "") @ApiModelProperty(name = "异常件数",notes = "")
private Integer abnormalNum ; private Integer abnormalNum ;

2
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java

@ -15,6 +15,8 @@ public class UnloadPackageVO implements Serializable {
private Integer unloadNum; private Integer unloadNum;
private String trayName; private String trayName;
private String trayCode; private String trayCode;
private String unloadTrayName;
private String unloadTrayCode;
private String scanStatus; private String scanStatus;
private String unloadNodeName; private String unloadNodeName;
private String orderCode; private String orderCode;

3
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java

@ -468,6 +468,9 @@ public class WarehouseWaybillEntity extends TenantEntity {
@ApiModelProperty(value = "干线是否整车 0否 1是") @ApiModelProperty(value = "干线是否整车 0否 1是")
private Integer trunklineCompleteOrNot; private Integer trunklineCompleteOrNot;
@ApiModelProperty(value = "干线车型 ")
private Long trunklineVehicleTypeId;
@ApiModelProperty(value = "干线车型 ") @ApiModelProperty(value = "干线车型 ")
private String trunklineVehicleType; private String trunklineVehicleType;

10
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java

@ -174,8 +174,14 @@ public class AftersalesWorkOrderExcel implements Serializable {
* 异常问题描述 * 异常问题描述
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("异常问题描述") @ExcelProperty("调查经过")
private String problemDescription; private String investigationProcess;
// /**
// * 异常问题描述
// */
// @ColumnWidth(20)
// @ExcelProperty("异常问题描述")
// private String problemDescription;
/** /**
* 审核人 * 审核人
*/ */

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.java

@ -52,5 +52,5 @@ public interface AftersalesCompletionRecordMapper extends BaseMapper<AftersalesC
*/ */
List<AftersalesCompletionRecordExcel> exportAftersalesCompletionRecord(@Param("ew") Wrapper<AftersalesCompletionRecordEntity> queryWrapper); List<AftersalesCompletionRecordExcel> exportAftersalesCompletionRecord(@Param("ew") Wrapper<AftersalesCompletionRecordEntity> queryWrapper);
String getTotalMoney(@Param("param") AftersalesWorkOrderVO aftersalesWorkOrderVO, @Param("warehouseId") Long id); String getTotalMoney(@Param("param") AftersalesWorkOrderVO aftersalesWorkOrderVO);
} }

5
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesCompletionRecordMapper.xml

@ -41,11 +41,6 @@
<if test="#{param.id}!=null"> <if test="#{param.id}!=null">
and work_order_id = #{param.id} and work_order_id = #{param.id}
</if> </if>
<if test="#{warehouseId} !=null">
and warehouse_id = #{warehouseId}
</if>
</select> </select>
</mapper> </mapper>

15
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -87,6 +87,7 @@
lawo.process_number, lawo.process_number,
lawo.customer_service_name customerServiceName, lawo.customer_service_name customerServiceName,
lawo.warehouse_id warehouseId, lawo.warehouse_id warehouseId,
lawo.investigation_process investigationProcess,
lawo.customer_service_id customerServiceId lawo.customer_service_id customerServiceId
FROM FROM
logpm_aftersales_work_order lawo logpm_aftersales_work_order lawo
@ -195,8 +196,9 @@
lawo.waybill_number, lawo.waybill_number,
lawo.order_code, lawo.order_code,
lawo.train_number, lawo.train_number,
lawo.FIRST, GROUP_CONCAT(DISTINCT laap.`first`) AS first,
lawo.secondary, GROUP_CONCAT(DISTINCT laap.secondary) AS secondary,
GROUP_CONCAT(DISTINCT laap.brand_name) AS brandName,
lawo.vehicle_route, lawo.vehicle_route,
lawo.deliver_goods_time, lawo.deliver_goods_time,
lawo.discovery_time, lawo.discovery_time,
@ -219,17 +221,18 @@
lawo.process_number, lawo.process_number,
lawo.customer_service_name customerServiceName, lawo.customer_service_name customerServiceName,
lawo.warehouse_id warehouseId, lawo.warehouse_id warehouseId,
lawo.brand_name brandName, lawo.investigation_process investigationProcess,
lawo.customer_service_id customerServiceId lawo.customer_service_id customerServiceId
FROM FROM
logpm_aftersales_work_order lawo logpm_aftersales_work_order lawo
LEFT JOIN logpm_aftersales_processor lap ON lawo.id = lap.work_order_id LEFT JOIN logpm_aftersales_processor lap ON lawo.id = lap.work_order_id
AND lap.types_of = '2'
AND lap.conditions IN ( 1, 2 )
LEFT JOIN logpm_aftersales_completion_record lacr ON lacr.work_order_id = lawo.id LEFT JOIN logpm_aftersales_completion_record lacr ON lacr.work_order_id = lawo.id
AND lacr.is_deleted = '0' LEFT JOIN logpm_aftersales_abnormal_package AS laap ON laap.work_order_id = lawo.id
<where> <where>
lawo.is_deleted = 0 lawo.is_deleted = 0
AND lap.types_of = '2'
AND lap.conditions IN ( 1, 2 )
AND lacr.is_deleted = '0'
<if test="param.ids != null and param.ids != ''"> <if test="param.ids != null and param.ids != ''">
and lawo.id IN and lawo.id IN
<bind name="idList" value="param.ids.split(',')"/> <bind name="idList" value="param.ids.split(',')"/>

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesCompletionRecordService.java

@ -53,5 +53,5 @@ public interface IAftersalesCompletionRecordService extends BaseService<Aftersal
/** /**
* 获取金额总数 * 获取金额总数
*/ */
String getTotalMoney(AftersalesWorkOrderVO aftersalesWorkOrder, Long id); String getTotalMoney(AftersalesWorkOrderVO aftersalesWorkOrder);
} }

4
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesCompletionRecordServiceImpl.java

@ -53,7 +53,7 @@ public class AftersalesCompletionRecordServiceImpl extends BaseServiceImpl<After
} }
@Override @Override
public String getTotalMoney(AftersalesWorkOrderVO aftersalesWorkOrderVO, Long id) { public String getTotalMoney(AftersalesWorkOrderVO aftersalesWorkOrderVO) {
return baseMapper.getTotalMoney(aftersalesWorkOrderVO,id); return baseMapper.getTotalMoney(aftersalesWorkOrderVO);
} }
} }

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -1099,7 +1099,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if(ObjectUtils.isNotNull(myCurrentWarehouse)){ if(ObjectUtils.isNotNull(myCurrentWarehouse)){
id=myCurrentWarehouse.getId(); id=myCurrentWarehouse.getId();
} }
workOrder.setTotalAmount(completionRecordService.getTotalMoney(workOrder,id)); workOrder.setTotalAmount(completionRecordService.getTotalMoney(workOrder));
if(myCurrentWarehouse!=null){ if(myCurrentWarehouse!=null){
List<AftersalesCompletionRecipientEntity> aftersalesCompletionRecipientEntities = collect.get(workOrder.getId()); List<AftersalesCompletionRecipientEntity> aftersalesCompletionRecipientEntities = collect.get(workOrder.getId());
if(ObjectUtils.isNotNull(aftersalesCompletionRecipientEntities)){ if(ObjectUtils.isNotNull(aftersalesCompletionRecipientEntities)){

25
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java

@ -37,6 +37,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;
@ -198,15 +199,7 @@ public class BasicdataDriverArteryController extends BladeController {
boolean save = basicdataDriverArteryService.save(basicdataDriverArtery); boolean save = basicdataDriverArteryService.save(basicdataDriverArtery);
if (save) { if (save) {
Long driverId = basicdataDriverArtery.getId(); List<BasicdataDriverWarehouseEntity> driverWarehouseList = getBasicdataDriverWarehouseEntities(basicdataDriverArtery);
List<Long> warehouseIds = basicdataDriverArtery.getWarehouseIds();
List<BasicdataDriverWarehouseEntity> driverWarehouseList = new ArrayList<>();
for (Long warehouseId : warehouseIds) {
BasicdataDriverWarehouseEntity basicdataDriverWarehouseEntity = new BasicdataDriverWarehouseEntity();
basicdataDriverWarehouseEntity.setWarehouseId(warehouseId);
basicdataDriverWarehouseEntity.setDriverId(driverId);
driverWarehouseList.add(basicdataDriverWarehouseEntity);
}
basicdataDriverWarehouseService.saveBatch(driverWarehouseList); basicdataDriverWarehouseService.saveBatch(driverWarehouseList);
} }
@ -217,6 +210,20 @@ public class BasicdataDriverArteryController extends BladeController {
return R.status(save); return R.status(save);
} }
@NotNull
private static List<BasicdataDriverWarehouseEntity> getBasicdataDriverWarehouseEntities(BasicdataDriverArteryDTO basicdataDriverArtery) {
Long driverId = basicdataDriverArtery.getId();
List<Long> warehouseIds = basicdataDriverArtery.getWarehouseIds();
List<BasicdataDriverWarehouseEntity> driverWarehouseList = new ArrayList<>();
for (Long warehouseId : warehouseIds) {
BasicdataDriverWarehouseEntity basicdataDriverWarehouseEntity = new BasicdataDriverWarehouseEntity();
basicdataDriverWarehouseEntity.setWarehouseId(warehouseId);
basicdataDriverWarehouseEntity.setDriverId(driverId);
driverWarehouseList.add(basicdataDriverWarehouseEntity);
}
return driverWarehouseList;
}
/** /**
* 司机信息表 修改 * 司机信息表 修改
*/ */

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java

@ -133,7 +133,7 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
@Override @Override
public List<BasicdataWarehouseEntity> getWarehouseList() { public List<BasicdataWarehouseEntity> getWarehouseList() {
List<BasicdataWarehouseEntity> myWatchWarehouse = getMyWatchWarehouse(); List<BasicdataWarehouseEntity> myWatchWarehouse = getMyWatchWarehouse();
if (myWatchWarehouse.size() > 0) { if (!myWatchWarehouse.isEmpty()) {
return myWatchWarehouse; return myWatchWarehouse;
} }
List<BasicdataWarehouseEntity> basicdataGoodsShelfVOList = warehouseMapper.getWarehouseList(); List<BasicdataWarehouseEntity> basicdataGoodsShelfVOList = warehouseMapper.getWarehouseList();

44
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionStockupAppController.java

@ -122,6 +122,7 @@ public class DistributionStockupAppController extends BladeController {
private final BladeRedis redis; private final BladeRedis redis;
private final ITrunklinePackageTrackLogClient trunklinePackageTrackLogClient; private final ITrunklinePackageTrackLogClient trunklinePackageTrackLogClient;
private final IDistributionNodeWorkService distributionNodeWorkService; private final IDistributionNodeWorkService distributionNodeWorkService;
private final IDistributionDeliveryDetailsService distributionDeliveryDetailsService;
/** /**
@ -721,28 +722,35 @@ public class DistributionStockupAppController extends BladeController {
private int judgmentIsStockUp(Long reservationId, Long stockListId, DistributionParcelListEntity distributionParcelListEntity, Long warehouseId, String cargoNumber) { private int judgmentIsStockUp(Long reservationId, Long stockListId, DistributionParcelListEntity distributionParcelListEntity, Long warehouseId, String cargoNumber) {
List<DistributionReservationStocklistEntity> distributionReservationStocklistEntities = distributionReservationMapper.selectStockListByReservationId(reservationId); List<DistributionReservationStocklistEntity> distributionReservationStocklistEntities = distributionReservationMapper.selectStockListByReservationId(reservationId);
List<Long> stockListIds = new ArrayList<>();
if (Func.isNotEmpty(distributionReservationStocklistEntities)) { if (Func.isNotEmpty(distributionReservationStocklistEntities)) {
//查询库存品信息 //查询库存品信息
List<Long> stockListIds = distributionReservationStocklistEntities.stream().map(DistributionReservationStocklistEntity::getStocklistId).collect(Collectors.toList()); stockListIds = distributionReservationStocklistEntities.stream().map(DistributionReservationStocklistEntity::getStocklistId).collect(Collectors.toList());
}
List<DistributionStockListEntity> stockListEntityList = distributionStockListService.list(Wrappers.<DistributionStockListEntity>query().lambda() List<DistributionDeliveryDetailsEntity> detailsEntities = distributionDeliveryDetailsService.list(Wrappers.<DistributionDeliveryDetailsEntity>query().lambda()
.in(DistributionStockListEntity::getId, stockListIds) .eq(DistributionDeliveryDetailsEntity::getBillLadingId, reservationId)
.eq(DistributionStockListEntity::getWarehouseId, warehouseId) );
.eq(DistributionStockListEntity::getCargoNumber, cargoNumber) if (!detailsEntities.isEmpty()) {
); stockListIds = detailsEntities.stream().map(DistributionDeliveryDetailsEntity::getStockListId).collect(Collectors.toList());
boolean isHave = stockListEntityList.stream().map(DistributionStockListEntity::getCargoNumber).anyMatch(s -> s.contains(distributionParcelListEntity.getMaterialCode()));
if (!isHave) {
//判断包件是否属于计划物料信息
return 1;
}
//判断该库存品包件是否属于计划的批次
boolean isHaveIncomingBatch = stockListEntityList.stream().map(DistributionStockListEntity::getIncomingBatch).anyMatch(s -> s.contains(distributionParcelListEntity.getOrderCode()));
if (!isHaveIncomingBatch) {
return 2;
}
} }
List<DistributionStockListEntity> stockListEntityList = distributionStockListService.list(Wrappers.<DistributionStockListEntity>query().lambda()
.in(DistributionStockListEntity::getId, stockListIds)
.eq(DistributionStockListEntity::getWarehouseId, warehouseId)
.eq(DistributionStockListEntity::getCargoNumber, cargoNumber)
);
boolean isHave = stockListEntityList.stream().map(DistributionStockListEntity::getCargoNumber).anyMatch(s -> s.contains(distributionParcelListEntity.getMaterialCode()));
if (!isHave) {
//判断包件是否属于计划物料信息
return 1;
}
//判断该库存品包件是否属于计划的批次
boolean isHaveIncomingBatch = stockListEntityList.stream().map(DistributionStockListEntity::getIncomingBatch).anyMatch(s -> s.contains(distributionParcelListEntity.getOrderCode()));
if (!isHaveIncomingBatch) {
return 2;
}
return 3; return 3;
} }

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java

@ -180,7 +180,6 @@ public class DistributionReservationController extends BladeController {
public R autonomouslySave(@Valid @RequestBody DistributionReservationDTO distributionReservationDTO) { public R autonomouslySave(@Valid @RequestBody DistributionReservationDTO distributionReservationDTO) {
try{ try{
R result = reservationService.insertAutonomouslyReservation(distributionReservationDTO); R result = reservationService.insertAutonomouslyReservation(distributionReservationDTO);
return result; return result;
}catch (Exception e){ }catch (Exception e){
return R.fail(e.getMessage()); return R.fail(e.getMessage());

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java

@ -34,6 +34,7 @@ import com.logpm.distribution.service.IDistributionParcelListService;
import com.logpm.distribution.service.IDistributionParcelNumberService; import com.logpm.distribution.service.IDistributionParcelNumberService;
import com.logpm.distribution.service.IDistributionStockArticleService; import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.vo.DistributionParcelListVO; import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.UpdateOrderDTO;
import com.logpm.distribution.vo.ZeroPackageSupplyVO; import com.logpm.distribution.vo.ZeroPackageSupplyVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -333,6 +334,11 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
} }
@Override
public void updateEntityByOpenOrderByAdvanceIds(UpdateOrderDTO updateOrderDTO) {
distributionParcelListService.updateEntityByOpenOrderByAdvanceIds(updateOrderDTO);
}
@Override @Override
public List<DistributionParcelListEntity> findByWaybillNumber(String waybillNumber) { public List<DistributionParcelListEntity> findByWaybillNumber(String waybillNumber) {
return distributionParcelListService.findByWaybillNumber(waybillNumber); return distributionParcelListService.findByWaybillNumber(waybillNumber);

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java

@ -131,8 +131,8 @@ public interface DistributionStockListMapper extends BaseMapper<DistributionStoc
/** /**
* 扣减对应库存品的冻结数量 * 扣减对应库存品的冻结数量
* @param k * @param stockListId
* @param size * @param num
*/ */
void decreaseStockListQuantityOccupied(@Param("stockListId") Long stockListId,@Param("num") int num); void decreaseStockListQuantityOccupied(@Param("stockListId") Long stockListId,@Param("num") int num);

51
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml

@ -381,11 +381,24 @@
and ldsl.warehouse_id = #{warehouseId} and ldsl.warehouse_id = #{warehouseId}
</select> </select>
<select id="listAllocation" resultType="com.logpm.distribution.vo.DistributionStockListAllocationVO"> <select id="listAllocation" resultType="com.logpm.distribution.vo.DistributionStockListAllocationVO">
select lwug.position_code allocationTitle,ldsi.market_name marketName,lwug.num,lwug.create_time createTime,ldsi.cargo_unit cargoUnit, SELECT
ldsi.unpack,ldsi.quantity_stock quantityStock,ldsi.unpacking_quantity unpackingQuantity,ldsi.description_goods descriptionGoods lwga.qr_code allocationTitle,
from logpm_distribution_stock_list ldsi ldsi.market_name marketName,
LEFT JOIN logpm_warehouse_updown_goods lwug on ldsi.material_id = lwug.association_id and ldsi.incoming_batch = lwug.incoming_batch lwug.num,
and ldsi.market_id = lwug.market_id and lwug.association_type = '4' and lwug.warehouse_id = ldsi.warehouse_id lwug.create_time createTime,
ldsi.cargo_unit cargoUnit,
ldsi.unpack,
ldsi.quantity_stock quantityStock,
ldsi.unpacking_quantity unpackingQuantity,
ldsi.description_goods descriptionGoods
FROM
logpm_distribution_stock_list ldsi
LEFT JOIN logpm_warehouse_updown_goods lwug ON ldsi.material_id = lwug.association_id AND lwug.incoming_batch = ldsi.incoming_batch
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lwug.allocation_id = lwga.id
AND ldsi.incoming_batch = lwug.incoming_batch
AND ldsi.market_id = lwug.market_id
AND lwug.association_type = '4'
AND lwug.warehouse_id = ldsi.warehouse_id
<where> <where>
lwug.id is not null lwug.id is not null
<if test="param.materialId != null and param.materialId != '' "> and ldsi.material_id = #{param.materialId}</if> <if test="param.materialId != null and param.materialId != '' "> and ldsi.material_id = #{param.materialId}</if>
@ -399,21 +412,27 @@
</select> </select>
<select id="listAllocationOrder" resultType="com.logpm.distribution.vo.DistributionStockListAllocationVO"> <select id="listAllocationOrder" resultType="com.logpm.distribution.vo.DistributionStockListAllocationVO">
select lwug.position_code allocationTitle, SELECT
lwga.qr_code AS allocationTitle,
lwug.allocation_id, lwug.allocation_id,
ldsi.market_name marketName, ldsi.market_name AS marketName,
sum(lwug.num) num, sum( lwug.num ) AS num,
lwug.create_time createTime, lwug.create_time AS createTime,
ldsi.cargo_unit cargoUnit, ldsi.cargo_unit AS cargoUnit,
ldsi.unpack, ldsi.unpack,
ldsi.quantity_stock quantityStock, ldsi.quantity_stock AS quantityStock,
ldsi.unpacking_quantity unpackingQuantity, ldsi.unpacking_quantity AS unpackingQuantity,
ldsi.description_goods descriptionGoods ldsi.description_goods AS descriptionGoods
FROM FROM
logpm_distribution_stock_list ldsi logpm_distribution_stock_list ldsi
left join logpm_distribution_stock_list_info ldsli on ldsli.material_id = ldsi.material_id AND ldsli.warehouse_id = ldsi.warehouse_id LEFT JOIN logpm_distribution_stock_list_info ldsli ON ldsli.material_id = ldsi.material_id
AND ldsi.market_id = ldsli.market_id and ldsli.incoming_batch = ldsi.incoming_batch AND ldsli.warehouse_id = ldsi.warehouse_id
LEFT JOIN logpm_warehouse_updown_goods lwug ON ldsli.parcel_list_id = lwug.association_id and lwug.association_type = '3' AND ldsi.market_id = ldsli.market_id
AND ldsli.incoming_batch = ldsi.incoming_batch
AND ldsli.tenant_id = '627683'
LEFT JOIN logpm_warehouse_updown_goods lwug ON ldsli.parcel_list_id = lwug.association_id
AND lwug.association_type = '3'
LEFT JOIN logpm_warehouse_goods_allocation AS lwga ON lwga.id = lwug.allocation_id
<where> <where>
lwug.id is not null lwug.id is not null
<if test="param.id != null "> and ldsi.id = #{param.id}</if> <if test="param.id != null "> and ldsi.id = #{param.id}</if>

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -264,7 +264,6 @@
logpm_distribution_stockup lds logpm_distribution_stockup lds
LEFT JOIN logpm_distribution_stockup_info ldsi ON ldsi.stockup_id = lds.id LEFT JOIN logpm_distribution_stockup_info ldsi ON ldsi.stockup_id = lds.id
LEFT JOIN logpm_distribution_reservation ldr ON ldsi.reservation_id = ldr.id LEFT JOIN logpm_distribution_reservation ldr ON ldsi.reservation_id = ldr.id
LEFT JOIN logpm_distribution_reservation_package ldrp ON ldrp.reservation_id = ldsi.reservation_id
<where> <where>
lds.is_deleted = 0 AND ldsi.stock_status != 4 lds.is_deleted = 0 AND ldsi.stock_status != 4

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java

@ -20,12 +20,10 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.distribution.dto.DistributionDeliveryDetailsDTO;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO; import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
import com.logpm.distribution.dto.app.BillLadingAppDTO; import com.logpm.distribution.dto.app.BillLadingAppDTO;
import com.logpm.distribution.entity.DistributionDeliveryDetailsEntity; import com.logpm.distribution.entity.DistributionDeliveryDetailsEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity; import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import com.logpm.distribution.excel.DistrilbutionBillLadingExcel; import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
import com.logpm.distribution.vo.*; import com.logpm.distribution.vo.*;
@ -92,7 +90,7 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper<DistrilbutionB
*/ */
List<DistrilbutionBillLadingAppVO> getInventory(@Param("param") DistrilbutionBillLadingEntity distrilbutionBillLadingEntity); List<DistrilbutionBillLadingAppVO> getInventory(@Param("param") DistrilbutionBillLadingEntity distrilbutionBillLadingEntity);
DistrilbutionBillLadingVO getBillLadingNum(@Param("param") DistrilbutionBillLadingDTO billLadingEntity); DistrilbutionBillLadingVO getBillLadingNum(@Param("param") DistrilbutionBillLadingEntity billLadingEntity);
List<DistrilbutionBillLadingViewVO> getViewDetailOwn(@Param("id") String id); List<DistrilbutionBillLadingViewVO> getViewDetailOwn(@Param("id") String id);

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -744,12 +744,14 @@
</select> </select>
<select id="selectBillLadingPlanNum" resultType="java.lang.Integer"> <select id="selectBillLadingPlanNum" resultType="java.lang.Integer">
SELECT( SELECT(
IF((SELECT sum(packet_number) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = #{billLadingId} AND packet_bar_status != 2) IS NULL,0,(SELECT sum(packet_number) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = #{billLadingId} AND packet_bar_status != 2)) IFNULL((SELECT sum(packet_number) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = #{billLadingId} AND packet_bar_status != 2),0)
+
IFNULL((SELECT sum(quantity) FROM logpm_distribution_delivery_details WHERE bill_lading_id = #{billLadingId} AND inventory_status != 2) ,0)
+ +
IF((SELECT sum(quantity) FROM logpm_distribution_delivery_details WHERE bill_lading_id = #{billLadingId} AND inventory_status != 2) IS NULL ,0,(SELECT sum(quantity) FROM logpm_distribution_delivery_details WHERE bill_lading_id = #{billLadingId} AND inventory_status != 2) ) ) IFNULL((SELECT sum(quantity) FROM logpm_distribution_reservation_zero_package WHERE reservation_id =#{billLadingId} AND zero_package_status != 2 AND type = 3) ,0 ))
</select> </select>
<select id="selectBillLadingLoading" resultType="java.lang.Integer"> <select id="selectBillLadingLoading" resultType="java.lang.Integer">
SELECT sum(quantity) FROM logpm_distribution_bill_lading_scan WHERE bill_lading_id =#{billLadingId} AND is_deleted = 0 SELECT IFNULL(sum(quantity),0) FROM logpm_distribution_bill_lading_scan WHERE bill_lading_id =#{billLadingId} AND is_deleted = 0
</select> </select>
<select id="selectBillLadingPackagePlanNum" resultType="java.lang.Integer"> <select id="selectBillLadingPackagePlanNum" resultType="java.lang.Integer">
SELECT SELECT

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryDetailsService.java

@ -87,4 +87,6 @@ public interface IDistributionDeliveryDetailsService extends BaseService<Distrib
List<DistributionBillInventoryExcel> getBillOrderInventoryExcel(Map<String, Object> distributionDeliveryDetails); List<DistributionBillInventoryExcel> getBillOrderInventoryExcel(Map<String, Object> distributionDeliveryDetails);
List<DistributionBillInventoryExcel> getBillLadingDetailOrderInventoryExcel(Long id); List<DistributionBillInventoryExcel> getBillLadingDetailOrderInventoryExcel(Long id);
void maintainInvnetory(Long l);
} }

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java

@ -284,4 +284,6 @@ public interface IDistributionParcelListService extends BaseService<Distribution
boolean maintainInWarehouse(Long orderPackageId,String taskCode); boolean maintainInWarehouse(Long orderPackageId,String taskCode);
Map<String, Object> findOrderInfoByOrderPackageCode(String orderPackageCode, Long warehouseId); Map<String, Object> findOrderInfoByOrderPackageCode(String orderPackageCode, Long warehouseId);
void updateEntityByOpenOrderByAdvanceIds(UpdateOrderDTO updateOrderDTO);
} }

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillStockService.java

@ -124,4 +124,11 @@ public interface IDistrilbutionBillStockService extends BaseService<Distrilbutio
* @return * @return
*/ */
boolean judgmentRemove(Long billLadingId, Long orderId); boolean judgmentRemove(Long billLadingId, Long orderId);
/**
* 维护计划内订单状态
* @param orderIds
* @param id
*/
void maintenancePlanOrderStatus(List<Long> orderIds, Long id);
} }

53
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryDetailsServiceImpl.java

@ -20,17 +20,24 @@ import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.distribution.entity.DisStockListDetailEntity;
import com.logpm.distribution.entity.DistributionDeliveryDetailsEntity; import com.logpm.distribution.entity.DistributionDeliveryDetailsEntity;
import com.logpm.distribution.entity.DistrilbutionBillStockEntity; import com.logpm.distribution.entity.DistrilbutionBillStockEntity;
import com.logpm.distribution.excel.DistributionBillInventoryExcel; import com.logpm.distribution.excel.DistributionBillInventoryExcel;
import com.logpm.distribution.excel.DistributionBillOrderPackExcel; import com.logpm.distribution.excel.DistributionBillOrderPackExcel;
import com.logpm.distribution.excel.DistributionDeliveryDetailsExcel; import com.logpm.distribution.excel.DistributionDeliveryDetailsExcel;
import com.logpm.distribution.mapper.DistributionDeliveryDetailsMapper; import com.logpm.distribution.mapper.DistributionDeliveryDetailsMapper;
import com.logpm.distribution.service.IDisStockListDetailService;
import com.logpm.distribution.service.IDistributionDeliveryDetailsService; import com.logpm.distribution.service.IDistributionDeliveryDetailsService;
import com.logpm.distribution.vo.DistributionBillInventoryVO; import com.logpm.distribution.vo.DistributionBillInventoryVO;
import com.logpm.distribution.vo.DistributionDeliveryDetailsVO; import com.logpm.distribution.vo.DistributionDeliveryDetailsVO;
import com.logpm.distribution.vo.app.DistrilbutionBillLadingInventoryAppVO; import com.logpm.distribution.vo.app.DistrilbutionBillLadingInventoryAppVO;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.Inventory.InventoryPackageStatusConstant;
import org.springblade.common.constant.Inventory.InventorySigningStatusConstant;
import org.springblade.common.constant.Inventory.InventoryStockUpStatusConstant;
import org.springblade.common.constant.delivery.DeliveryStockStatuConstant; import org.springblade.common.constant.delivery.DeliveryStockStatuConstant;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
@ -39,8 +46,10 @@ import org.springblade.system.cache.DictCache;
import org.springblade.system.entity.User; import org.springblade.system.entity.User;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
/** /**
* 提货订单明细 服务实现类 * 提货订单明细 服务实现类
@ -49,8 +58,13 @@ import java.util.Map;
* @since 2023-06-28 * @since 2023-06-28
*/ */
@Service @Service
@AllArgsConstructor
public class DistributionDeliveryDetailsServiceImpl extends BaseServiceImpl<DistributionDeliveryDetailsMapper, DistributionDeliveryDetailsEntity> implements IDistributionDeliveryDetailsService { public class DistributionDeliveryDetailsServiceImpl extends BaseServiceImpl<DistributionDeliveryDetailsMapper, DistributionDeliveryDetailsEntity> implements IDistributionDeliveryDetailsService {
private final IDisStockListDetailService disStockListDetailService;
@Override @Override
public IPage<DistributionDeliveryDetailsVO> selectDistributionDeliveryDetailsPage(IPage<DistributionDeliveryDetailsVO> page, DistributionDeliveryDetailsVO distributionDeliveryDetails) { public IPage<DistributionDeliveryDetailsVO> selectDistributionDeliveryDetailsPage(IPage<DistributionDeliveryDetailsVO> page, DistributionDeliveryDetailsVO distributionDeliveryDetails) {
return page.setRecords(baseMapper.selectDistributionDeliveryDetailsPage(page, distributionDeliveryDetails)); return page.setRecords(baseMapper.selectDistributionDeliveryDetailsPage(page, distributionDeliveryDetails));
@ -143,4 +157,43 @@ public class DistributionDeliveryDetailsServiceImpl extends BaseServiceImpl<Dist
} }
return billOrderInventoryExcel; return billOrderInventoryExcel;
} }
@Override
public void maintainInvnetory(Long billId) {
List<DistributionDeliveryDetailsEntity> detailsEntities = this.list(Wrappers.<DistributionDeliveryDetailsEntity>query().lambda()
.eq(DistributionDeliveryDetailsEntity::getBillLadingId, billId)
.ne(DistributionDeliveryDetailsEntity::getInventoryStatus, InventoryPackageStatusConstant.quxiao.getValue())
);
List<DistributionDeliveryDetailsEntity> updateDeliveryDetailsList = new ArrayList<>();
for (DistributionDeliveryDetailsEntity detailsEntity : detailsEntities) {
List<DisStockListDetailEntity> detailEntities = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getReservationId, billId)
.eq(DisStockListDetailEntity::getStockListId, detailsEntity.getStockListId())
.ne(DisStockListDetailEntity::getStockPackageStatus, InventoryPackageStatusConstant.quxiao.getValue())
);
DistributionDeliveryDetailsEntity updateDeliveryDetailsEntity = new DistributionDeliveryDetailsEntity();
updateDeliveryDetailsEntity.setId(detailsEntity.getId());
int sum = 0;
int stockupNUm = 0;
if (detailEntities.isEmpty()) {
detailsEntity.setStockStatus(InventoryPackageStatusConstant.quxiao.getValue());
detailsEntity.setConditions("10");
}else {
sum = detailEntities.stream().mapToInt(DisStockListDetailEntity::getNum).sum();
stockupNUm = detailEntities.stream().filter(f-> InventoryStockUpStatusConstant.yibeihuo.getValue().equals(f.getStockStatus())).mapToInt(DisStockListDetailEntity::getNum).sum();
}
detailsEntity.setQuantity(sum);
detailsEntity.setRealityQuantity(stockupNUm);
if (Objects.equals(sum , stockupNUm)){
detailsEntity.setConditions("30");
}else {
detailsEntity.setConditions("20");
}
updateDeliveryDetailsList.add(detailsEntity);
}
if (!updateDeliveryDetailsList.isEmpty()) {
this.updateBatchById(updateDeliveryDetailsList);
}
}
} }

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -4189,7 +4189,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionReservationEntity> deletedList = oldList.stream().filter(f -> !newList.stream().map(DistributionReservationEntity::getId).collect(Collectors.toList()).contains(f.getId())).collect(Collectors.toList()); List<DistributionReservationEntity> deletedList = oldList.stream().filter(f -> !newList.stream().map(DistributionReservationEntity::getId).collect(Collectors.toList()).contains(f.getId())).collect(Collectors.toList());
if (!deletedList.isEmpty()) { if (!deletedList.isEmpty()) {
//存在取消 //存在取消
for (DistributionReservationEntity reservationEntity : addNewList) { for (DistributionReservationEntity reservationEntity : deletedList) {
String reservationContent = user.getNickName() + "在" + myCurrentWarehouse.getName() String reservationContent = user.getNickName() + "在" + myCurrentWarehouse.getName()
+ "进行预约计划取消转配送;预约计划:" + reservationEntity.getReservationCode() + "进行预约计划取消转配送;预约计划:" + reservationEntity.getReservationCode()
+ "车次号:" + deliveryListEntity.getTrainNumber(); + "车次号:" + deliveryListEntity.getTrainNumber();
@ -4208,7 +4208,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionPlanLogService.saveBatch(reservationLogList); distributionPlanLogService.saveBatch(reservationLogList);
String distributionContent = user.getNickName() + "在" + myCurrentWarehouse.getName() String distributionContent = user.getNickName() + "在" + myCurrentWarehouse.getName()
+ "修改市配配送计划;车次号:" + deliveryListEntity.getTrainNumber() + "修改市配配送计划;车次号:" + deliveryListEntity.getTrainNumber()
+ "预约编号:[" + oldList.stream().map(DistributionReservationEntity::getReservationCode).collect(Collectors.joining(",")) + "]变更为-->[" + newList.stream().map(DistributionReservationEntity::getReservationCode).collect(Collectors.joining(",")) + "]"; + "预约编号:[" + oldList.stream().map(DistributionReservationEntity::getReservationCode).collect(Collectors.joining(",")) + "]变更为-->[" + newList.stream().map(DistributionReservationEntity::getReservationCode).collect(Collectors.joining(",")) + "]"+"当前总件数:"+(newList.stream().mapToInt(DistributionReservationEntity::getReservationNum).sum()+newList.stream().mapToInt(DistributionReservationEntity::getReservationStockListNum).sum());
DistributionPlanLogEntity distributionPlanLogEntity = new DistributionPlanLogEntity(); DistributionPlanLogEntity distributionPlanLogEntity = new DistributionPlanLogEntity();
distributionPlanLogEntity.setContent(distributionContent); distributionPlanLogEntity.setContent(distributionContent);
distributionPlanLogEntity.setRefId(deliveryListEntity.getId()); distributionPlanLogEntity.setRefId(deliveryListEntity.getId());
@ -4216,7 +4216,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionPlanLogEntity.setWarehouseId(myCurrentWarehouse.getId()); distributionPlanLogEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionPlanLogEntity.setWarehouseName(myCurrentWarehouse.getName()); distributionPlanLogEntity.setWarehouseName(myCurrentWarehouse.getName());
distributionPlanLogEntity.setOperator(user.getNickName()); distributionPlanLogEntity.setOperator(user.getNickName());
distributionPlanLogEntity.setType(3); distributionPlanLogEntity.setType(2);
distributionPlanLogService.save(distributionPlanLogEntity); distributionPlanLogService.save(distributionPlanLogEntity);
} }
} }
@ -8860,7 +8860,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "扫描装车进行下架、解托"); warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "扫描装车进行下架、解托");
} }
//检查是否存在有装车异常,进行处理 //检查是否存在有装车异常,进行处理
distributionSignforService.maintenanceSignfor(reservationId);
String content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getScanUser() + "扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode(); String content = "包件在" + myCurrentWarehouse.getName() + "由" + loadscanEntity.getScanUser() + "扫描装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
JSONObject packageLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_LOADING.getCode()); JSONObject packageLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
packageLogs.add(packageLog); packageLogs.add(packageLog);
@ -9026,6 +9026,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} else { } else {
log.error("#######################查询预约订单信息错误,reservationID:{}", distrilbutionloadingscanDTO.getReservationId()); log.error("#######################查询预约订单信息错误,reservationID:{}", distrilbutionloadingscanDTO.getReservationId());
} }
distributionSignforService.maintenanceSignfor(distrilbutionloadingscanDTO.getReservationId());
} }
break; break;
case 3: case 3:
@ -9112,6 +9113,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//维护配送装车状态 //维护配送装车状态
distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId()); distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId());
//备货库位下架 //备货库位下架
distributionSignforService.maintenanceSignfor(distrilbutionloadingscanDTO.getReservationId());
JSONObject inventoryJsonObject = new JSONObject(); JSONObject inventoryJsonObject = new JSONObject();
inventoryJsonObject.put("code", distributionLoadscaninvnEntity.getOrderPackageCode()); inventoryJsonObject.put("code", distributionLoadscaninvnEntity.getOrderPackageCode());
inventoryJsonObject.put("warehouseId", myCurrentWarehouse.getId()); inventoryJsonObject.put("warehouseId", myCurrentWarehouse.getId());
@ -9277,6 +9279,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
String s = orderCodes.stream().collect(Collectors.joining(",")); String s = orderCodes.stream().collect(Collectors.joining(","));
distributionStockArticleService.maintenanceOrderInfo(s, myCurrentWarehouse.getId()); distributionStockArticleService.maintenanceOrderInfo(s, myCurrentWarehouse.getId());
} }
//维护异常信息
warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects); warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects);
trunklinePackageTrackLogClient.addPackageTrackLog(packageLogs); trunklinePackageTrackLogClient.addPackageTrackLog(packageLogs);
Integer carLaodNum = getCarLaodNum(distrilbutionloadingscanDTO.getDeliveryId()); Integer carLaodNum = getCarLaodNum(distrilbutionloadingscanDTO.getDeliveryId());

107
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -24,7 +24,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.zxing.WriterException;
import com.logpm.basic.entity.BasicMaterialEntity; import com.logpm.basic.entity.BasicMaterialEntity;
import com.logpm.basic.feign.IBasicMaterialClient; import com.logpm.basic.feign.IBasicMaterialClient;
import com.logpm.basicdata.entity.BasicdataClientEntity; import com.logpm.basicdata.entity.BasicdataClientEntity;
@ -35,30 +34,10 @@ import com.logpm.basicdata.feign.IBasicdataGoodsAllocationClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.dto.DistributionParcelListDTO; import com.logpm.distribution.dto.DistributionParcelListDTO;
import com.logpm.distribution.dto.app.StockupDTO; import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.entity.DistributionReservationZeroPackageEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.entity.DistributionStockListInfoEntity;
import com.logpm.distribution.entity.DistrilbutionBillPackageEntity;
import com.logpm.distribution.entity.*; import com.logpm.distribution.entity.*;
import com.logpm.distribution.excel.DistributionParcelListExcel; import com.logpm.distribution.excel.DistributionParcelListExcel;
import com.logpm.distribution.mapper.DistributionParcelListMapper; import com.logpm.distribution.mapper.DistributionParcelListMapper;
import com.logpm.distribution.mapper.DistributionStockArticleMapper; import com.logpm.distribution.mapper.DistributionStockArticleMapper;
import com.logpm.distribution.service.IDistributionParcelDetailsService;
import com.logpm.distribution.service.IDistributionParcelListService;
import com.logpm.distribution.service.IDistributionParcelNumberService;
import com.logpm.distribution.service.IDistributionReservationZeroPackageService;
import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.service.IDistributionStockListInfoService;
import com.logpm.distribution.service.IDistributionStockListService;
import com.logpm.distribution.service.IDistrilbutionBillPackageService;
import com.logpm.distribution.vo.DistributionParcelListBaseVO;
import com.logpm.distribution.vo.DistributionParcelListNodeVO;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.DistributionParcelListZeroVO;
import com.logpm.distribution.vo.PackageStockupVO;
import com.logpm.distribution.service.*; import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.*; import com.logpm.distribution.vo.*;
import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient; import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient;
@ -98,20 +77,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.awt.image.BufferedImage;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.TreeSet;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -601,6 +568,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
if (isAutoWarehouse == Integer.parseInt(IsOrNoConstant.yes.getValue()) && !Objects.isNull(defaultGoodsAllocation)){ if (isAutoWarehouse == Integer.parseInt(IsOrNoConstant.yes.getValue()) && !Objects.isNull(defaultGoodsAllocation)){
//进行此包件的默认上架 //进行此包件的默认上架
warehouseUpdownTypeClient.upShelfPackage( i.getOrderPackageCode(),defaultGoodsAllocation.getId(),myCurrentWarehouse.getId(),"自动上架"); warehouseUpdownTypeClient.upShelfPackage( i.getOrderPackageCode(),defaultGoodsAllocation.getId(),myCurrentWarehouse.getId(),"自动上架");
} }
}); });
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity(); DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity();
@ -1052,7 +1020,10 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
warehouseUpdownGoodsEntity.setAssociationValue(distributionParcelListEntity.getOrderPackageCode()); warehouseUpdownGoodsEntity.setAssociationValue(distributionParcelListEntity.getOrderPackageCode());
WarehouseUpdownGoodsEntity locationInformation = warehouseUpdownGoodsClient.getLocationInformation(warehouseUpdownGoodsEntity); WarehouseUpdownGoodsEntity locationInformation = warehouseUpdownGoodsClient.getLocationInformation(warehouseUpdownGoodsEntity);
if (Func.isNotEmpty(locationInformation)) { if (Func.isNotEmpty(locationInformation)) {
distributionStockListInfo.setStorageLocation(locationInformation.getAllocationTitle()); BasicdataGoodsAllocationEntity entityByAllocationId = allocationClient.getEntityByAllocationId(locationInformation.getAllocationId());
if (!Objects.isNull(entityByAllocationId)){
distributionStockListInfo.setStorageLocation(entityByAllocationId.getQrCode());
}
} }
distributionStockListInfo.setFactory(distributionStockArticleEntity.getFactoryTrain()); distributionStockListInfo.setFactory(distributionStockArticleEntity.getFactoryTrain());
distributionStockListInfo.setDespatch(distributionStockArticleEntity.getTrainNumber()); distributionStockListInfo.setDespatch(distributionStockArticleEntity.getTrainNumber());
@ -1483,4 +1454,70 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
} }
return orderInfoByOrderPackageCode; return orderInfoByOrderPackageCode;
} }
@Override
public void updateEntityByOpenOrderByAdvanceIds(UpdateOrderDTO updateOrderDTO) {
Long waybillId = updateOrderDTO.getWaybillId();
List<Long> advanceIds = updateOrderDTO.getAdvanceIds();
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId);
if (Objects.isNull(waybillEntity)) {
log.warn("############updateEntityByOpenOrderByAdvanceIds: 运单信息不存在 waybillId={}", waybillId);
throw new CustomerException(405, "运单信息不存在");
}
Long departureWarehouseId = waybillEntity.getDepartureWarehouseId();
String departureWarehouseName = waybillEntity.getDepartureWarehouseName();
Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId();
String destinationWarehouseName = waybillEntity.getDestinationWarehouseName();
String waybillNo = waybillEntity.getWaybillNo();
QueryWrapper<DistributionParcelListEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.in("advance_id", advanceIds)
.eq("is_deleted", 0);
List<DistributionParcelListEntity> listEntityList = baseMapper.selectList(queryWrapper);
Set<String> orderCodes = new TreeSet<>();
for (DistributionParcelListEntity parcelListEntity : listEntityList) {
Long packageWarehouseId = parcelListEntity.getWarehouseId();
parcelListEntity.setWaybillId(waybillId);
parcelListEntity.setWaybillNumber(waybillNo);
parcelListEntity.setSendWarehouseId(departureWarehouseId);
parcelListEntity.setSendWarehouseName(departureWarehouseName);
parcelListEntity.setAcceptWarehouseId(destinationWarehouseId);
parcelListEntity.setAcceptWarehouseName(destinationWarehouseName);
if (departureWarehouseId.equals(destinationWarehouseId)) {
parcelListEntity.setIsTransfer(0);
} else {
if (destinationWarehouseId.equals(packageWarehouseId)) {
parcelListEntity.setIsTransfer(0);
} else {
parcelListEntity.setIsTransfer(1);
}
}
orderCodes.add(parcelListEntity.getOrderCode());
}
updateBatchById(listEntityList);
Long consigneeId = waybillEntity.getConsigneeId();
BasicdataClientEntity basicdataClientEntity = basicdataClientClient.findEntityById(consigneeId);
for (String orderCode : orderCodes) {
QueryWrapper<DistributionStockArticleEntity> stockArticleEntityQueryWrapper = new QueryWrapper<>();
stockArticleEntityQueryWrapper.eq("order_code", orderCode)
.eq("is_deleted", 0);
List<DistributionStockArticleEntity> stockArticleEntities = distributionStockArticleMapper.selectList(stockArticleEntityQueryWrapper);
for (DistributionStockArticleEntity stockArticleEntity : stockArticleEntities) {
Long orderId = stockArticleEntity.getId();
String waybillNumber = baseMapper.findOrderWaybillNo(orderId);
stockArticleEntity.setWaybillNumber(waybillNumber);
stockArticleEntity.setMallId(consigneeId);
stockArticleEntity.setMallCode(basicdataClientEntity.getClientCode());
stockArticleEntity.setMallName(basicdataClientEntity.getClientName());
stockArticleEntity.setConsigneePerson(waybillEntity.getConsigneeName());
stockArticleEntity.setConsigneeMobile(waybillEntity.getConsigneeMobile());
stockArticleEntity.setConsigneeAddress(waybillEntity.getConsigneeAddress());
stockArticleEntity.setConsigneeUnit(basicdataClientEntity.getClientName());
}
distributionStockArticleService.updateBatchById(stockArticleEntities);
}
}
} }

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -3514,10 +3514,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionReservationMapper.updateById(reservationEntity); distributionReservationMapper.updateById(reservationEntity);
//进行日志的添加 //进行日志的添加
BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
NodeFanoutMsg<ReservationVO> nodeFanoutMsg = buildNodeFanoutMsgByReservation(reservationEntity,map,BizOperationEnums.ADD); NodeFanoutMsg<ReservationVO> nodeFanoutMsg = buildNodeFanoutMsgByReservation(reservationEntity,map,BizOperationEnums.ADD);
distributionNodeWorkService.planReservation(nodeFanoutMsg,AuthUtil.getUser()); distributionNodeWorkService.planReservation(nodeFanoutMsg,AuthUtil.getUser());
handleCreatedReservationPlanLog(reservationEntity,user,myCurrentWarehouse);
return R.status(true); return R.status(true);
} }

50
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -3326,17 +3326,18 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (distributionLoadscanEntity.getSignforState().equals(2)) { if (distributionLoadscanEntity.getSignforState().equals(2)) {
return Resp.scanFail("重复扫描", "重复扫描"); return Resp.scanFail("重复扫描", "重复扫描");
} }
DistributionLoadscanEntity newDistributionLoadscanEntity = new DistributionLoadscanEntity();
newDistributionLoadscanEntity.setId(distributionLoadscanEntity.getId());
//进行签收记录数据的维护 //进行签收记录数据的维护
distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date())); newDistributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscanEntity.setSignforState(2); newDistributionLoadscanEntity.setSignforState(2);
distributionLoadscanEntity.setReceivedQuantity(distributionLoadscanEntity.getLoadedNub()); newDistributionLoadscanEntity.setReceivedQuantity(distributionLoadscanEntity.getLoadedNub());
distributionLoadscanEntity.setWarehouseId(myCurrentWarehouse.getId()); newDistributionLoadscanEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionLoadscanEntity.setWarehouseName(myCurrentWarehouse.getName()); newDistributionLoadscanEntity.setWarehouseName(myCurrentWarehouse.getName());
distributionLoadscanEntity.setSigningUser(nickName); newDistributionLoadscanEntity.setSigningUser(nickName);
distributionLoadscanEntity.setSigningUserId(userId); newDistributionLoadscanEntity.setSigningUserId(userId);
distributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.wenyuanpiliangqianshou.getValue()); newDistributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.wenyuanpiliangqianshou.getValue());
distributionLoadscanService.updateById(distributionLoadscanEntity); distributionLoadscanService.updateById(newDistributionLoadscanEntity);
packageLockIds.add(distributionLoadscanEntity.getPackageId()); packageLockIds.add(distributionLoadscanEntity.getPackageId());
pushDatas.add(distributionLoadscanEntity); pushDatas.add(distributionLoadscanEntity);
//更新签收人 //更新签收人
@ -3478,7 +3479,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionReservationService.maintenanceReservationInfo(distrilbutionloadingscanDTO.getReservationId()); distributionReservationService.maintenanceReservationInfo(distrilbutionloadingscanDTO.getReservationId());
//维护配送任务 //维护配送任务
distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId()); distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId());
//维护签收异常状态
this.maintenanceSignfor(distrilbutionloadingscanDTO.getReservationId());
// 推送作业节点 // 推送作业节点
@ -9126,21 +9128,23 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
*/ */
private DistributionLoadscanEntity updateSignDistributionLoadscanEntity(DistributionLoadscanEntity loadscanEntity, BladeUser user, DistributionParcelListEntity parcelListEntity) { private DistributionLoadscanEntity updateSignDistributionLoadscanEntity(DistributionLoadscanEntity loadscanEntity, BladeUser user, DistributionParcelListEntity parcelListEntity) {
String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()); String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date());
loadscanEntity.setSigningTime(now); DistributionLoadscanEntity distributionLoadscanEntity = new DistributionLoadscanEntity();
loadscanEntity.setSignforState(2); distributionLoadscanEntity.setId(loadscanEntity.getId());
loadscanEntity.setOneClick(1); distributionLoadscanEntity.setSigningTime(now);
loadscanEntity.setOneQclick(1); distributionLoadscanEntity.setSignforState(2);
loadscanEntity.setIsInsert(2); distributionLoadscanEntity.setOneClick(1);
loadscanEntity.setReceivedQuantity(parcelListEntity.getQuantity()); distributionLoadscanEntity.setOneQclick(1);
loadscanEntity.setSigningUser(user.getNickName()); distributionLoadscanEntity.setIsInsert(2);
loadscanEntity.setSigningUserId(user.getUserId()); distributionLoadscanEntity.setReceivedQuantity(parcelListEntity.getQuantity());
loadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getValue()); distributionLoadscanEntity.setSigningUser(user.getNickName());
loadscanEntity.setSignforState(LoadScanSigningStatusConstant.weiqianshou.getValue()); distributionLoadscanEntity.setSigningUserId(user.getUserId());
distributionLoadscanEntity.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getValue());
distributionLoadscanEntity.setSignforState(LoadScanSigningStatusConstant.weiqianshou.getValue());
if (loadscanEntity.getLoadedNub().equals(loadscanEntity.getReceivedQuantity())) { if (loadscanEntity.getLoadedNub().equals(loadscanEntity.getReceivedQuantity())) {
loadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue()); distributionLoadscanEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
} }
return loadscanEntity; return distributionLoadscanEntity;
} }

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -3202,6 +3202,15 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
// 查询预约单上的商城 // 查询预约单上的商城
DistributionReservationEntity distributionReservationEntity = distributionReservationMapper.selectById(reservationId); DistributionReservationEntity distributionReservationEntity = distributionReservationMapper.selectById(reservationId);
String mallName = "";
if (!Objects.isNull(distributionReservationEntity)){
mallName = distributionReservationEntity.getReceivingUnit();
}
//查询自提
DistrilbutionBillLadingEntity billLadingEntity = distrilbutionBillLadingService.getById(reservationId);
if (!Objects.isNull(billLadingEntity)){
mallName = billLadingEntity.getConsigneeUnit();
}
//查询货位上物料信息 //查询货位上物料信息
// todo // todo
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
@ -3235,7 +3244,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
LambdaQueryWrapper<DistributionStockListEntity> lambdaQueryWrapper = new LambdaQueryWrapper(); LambdaQueryWrapper<DistributionStockListEntity> lambdaQueryWrapper = new LambdaQueryWrapper();
lambdaQueryWrapper.eq(DistributionStockListEntity::getIncomingBatch, incomingBatches); lambdaQueryWrapper.eq(DistributionStockListEntity::getIncomingBatch, incomingBatches);
lambdaQueryWrapper.eq(DistributionStockListEntity::getCargoNumber, cargoNumber); lambdaQueryWrapper.eq(DistributionStockListEntity::getCargoNumber, cargoNumber);
lambdaQueryWrapper.eq(DistributionStockListEntity::getMarketName, distributionReservationEntity.getMallName()); lambdaQueryWrapper.eq(DistributionStockListEntity::getMarketName, mallName);
// 入库 时间先进的先出 // 入库 时间先进的先出
lambdaQueryWrapper.orderByAsc(DistributionStockListEntity::getCreateTime); lambdaQueryWrapper.orderByAsc(DistributionStockListEntity::getCreateTime);
DistributionStockListEntity distributionStockListEntities = distributionStockListMapper.selectOne(lambdaQueryWrapper); DistributionStockListEntity distributionStockListEntities = distributionStockListMapper.selectOne(lambdaQueryWrapper);

568
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -38,49 +38,14 @@ import com.logpm.distribution.dto.DistributionStockListDTO;
import com.logpm.distribution.dto.DistrilbutionBillLadingDTO; import com.logpm.distribution.dto.DistrilbutionBillLadingDTO;
import com.logpm.distribution.dto.OrderStatusDTO; import com.logpm.distribution.dto.OrderStatusDTO;
import com.logpm.distribution.dto.app.BillLadingAppDTO; import com.logpm.distribution.dto.app.BillLadingAppDTO;
import com.logpm.distribution.entity.DisStockListDetailEntity; import com.logpm.distribution.entity.*;
import com.logpm.distribution.entity.DistributionBillLadingScanEntity;
import com.logpm.distribution.entity.DistributionDeliveryChargeEntity;
import com.logpm.distribution.entity.DistributionDeliveryDetailsEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.entity.DistributionPrintEntity;
import com.logpm.distribution.entity.DistributionReservationZeroPackageEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.entity.DistributionStockEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.entity.DistributionStockupEntity;
import com.logpm.distribution.entity.DistributionStockupInfoEntity;
import com.logpm.distribution.entity.DistributionStockupScanEntity;
import com.logpm.distribution.entity.DistrilbutionBillLadingEntity;
import com.logpm.distribution.entity.DistrilbutionBillPackageEntity;
import com.logpm.distribution.entity.DistrilbutionBillStockEntity;
import com.logpm.distribution.excel.DistributionBillInventoryExcel; import com.logpm.distribution.excel.DistributionBillInventoryExcel;
import com.logpm.distribution.excel.DistributionBillOrderExcel; import com.logpm.distribution.excel.DistributionBillOrderExcel;
import com.logpm.distribution.excel.DistributionBillOrderPackExcel; import com.logpm.distribution.excel.DistributionBillOrderPackExcel;
import com.logpm.distribution.excel.DistrilbutionBillLadingExcel; import com.logpm.distribution.excel.DistrilbutionBillLadingExcel;
import com.logpm.distribution.mapper.DistributionStockListMapper; import com.logpm.distribution.mapper.DistributionStockListMapper;
import com.logpm.distribution.mapper.DistrilbutionBillLadingMapper; import com.logpm.distribution.mapper.DistrilbutionBillLadingMapper;
import com.logpm.distribution.service.IDisStockListDetailService; import com.logpm.distribution.service.*;
import com.logpm.distribution.service.IDistributionAsyncService;
import com.logpm.distribution.service.IDistributionBillLadingScanService;
import com.logpm.distribution.service.IDistributionDeliveryChargeService;
import com.logpm.distribution.service.IDistributionDeliveryDetailsService;
import com.logpm.distribution.service.IDistributionNodeWorkService;
import com.logpm.distribution.service.IDistributionParcelListService;
import com.logpm.distribution.service.IDistributionParcelNumberService;
import com.logpm.distribution.service.IDistributionPrintService;
import com.logpm.distribution.service.IDistributionReservationService;
import com.logpm.distribution.service.IDistributionReservationZeroPackageService;
import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.service.IDistributionStockListService;
import com.logpm.distribution.service.IDistributionStockService;
import com.logpm.distribution.service.IDistributionStockupInfoService;
import com.logpm.distribution.service.IDistributionStockupScanService;
import com.logpm.distribution.service.IDistributionStockupService;
import com.logpm.distribution.service.IDistrilbutionBillLadingService;
import com.logpm.distribution.service.IDistrilbutionBillPackageService;
import com.logpm.distribution.service.IDistrilbutionBillStockService;
import com.logpm.distribution.vo.DistributionDeliveryDetailsVO; import com.logpm.distribution.vo.DistributionDeliveryDetailsVO;
import com.logpm.distribution.vo.DistributionParcelNumberVO; import com.logpm.distribution.vo.DistributionParcelNumberVO;
import com.logpm.distribution.vo.DistributionStockArticleVO; import com.logpm.distribution.vo.DistributionStockArticleVO;
@ -110,16 +75,15 @@ import com.logpm.oldproject.feign.IOldSignPushClient;
import com.logpm.trunkline.dto.WaybillLogDTO; import com.logpm.trunkline.dto.WaybillLogDTO;
import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient; import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient;
import com.logpm.trunkline.feign.ITrunklineWaybillTrackClient; import com.logpm.trunkline.feign.ITrunklineWaybillTrackClient;
import com.logpm.warehouse.entity.WarehouseConfigEntity;
import com.logpm.warehouse.feign.IWarehouseConfigClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.sun.org.apache.xpath.internal.operations.Bool; import com.sun.org.apache.xpath.internal.operations.Bool;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.logging.log4j.util.Strings; import org.apache.logging.log4j.util.Strings;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.*;
import org.springblade.common.constant.Inventory.InventoryStockUpStatusConstant; import org.springblade.common.constant.Inventory.*;
import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.constant.RedisKeyConstant;
import org.springblade.common.constant.WorkNodeEnums;
import org.springblade.common.constant.billLading.BillLadingStatusConstant; import org.springblade.common.constant.billLading.BillLadingStatusConstant;
import org.springblade.common.constant.common.IsOrNoConstant; import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.order.OrderReservationStatusConstant; import org.springblade.common.constant.order.OrderReservationStatusConstant;
@ -255,6 +219,11 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
@Autowired @Autowired
private ITrunklineWaybillTrackClient trunklineWaybillTrackClient; private ITrunklineWaybillTrackClient trunklineWaybillTrackClient;
@Autowired
private IDistributionPlanLogService distributionPlanLogService;
@Autowired
private IWarehouseConfigClient warehouseConfigClient;
@Override @Override
@ -418,7 +387,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
//修改 //修改
if (!distrilbutionBillLading.getBillPackageEntityList().isEmpty() || !distrilbutionBillLading.getUnBillPackageEntityList().isEmpty()) { if (!distrilbutionBillLading.getBillPackageEntityList().isEmpty() || !distrilbutionBillLading.getUnBillPackageEntityList().isEmpty()) {
//修改新增包件 //修改新增包件
//todo
List<JSONObject> jsonObjects = updateBillPackeg(distrilbutionBillLading, myCurrentWarehouse, billLadingEntity.getPickupBatch()); List<JSONObject> jsonObjects = updateBillPackeg(distrilbutionBillLading, myCurrentWarehouse, billLadingEntity.getPickupBatch());
if (!jsonObjects.isEmpty()) { if (!jsonObjects.isEmpty()) {
logs.addAll(jsonObjects); logs.addAll(jsonObjects);
@ -622,7 +590,9 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
updateStockBill(distrilbutionBillLading); updateStockBill(distrilbutionBillLading);
} }
//修改自提单信息 //修改自提单信息
//进行自提单的修改日志记录
Integer integer = baseMapper.selectBillLadingPlanNum(distrilbutionBillLading.getId());
handleUpdateDistributionPlanLog(billLadingEntity, distrilbutionBillLading, AuthUtil.getUser(), myCurrentWarehouse, integer);
} else { } else {
//设置lockey //设置lockey
String lockKey = "lock:" + distrilbutionBillLading.getStockArticleId(); String lockKey = "lock:" + distrilbutionBillLading.getStockArticleId();
@ -682,7 +652,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
List<DistributionParcelListDTO> zeroPackageList = distrilbutionBillLading.getParcelLisList(); List<DistributionParcelListDTO> zeroPackageList = distrilbutionBillLading.getParcelLisList();
zeroPackageMap = zeroPackageList.stream().collect(Collectors.groupingBy(DistributionParcelListDTO::getStockArticleId)); zeroPackageMap = zeroPackageList.stream().collect(Collectors.groupingBy(DistributionParcelListDTO::getStockArticleId));
} }
this.saveDistrilbutionBillLading(distrilbutionBillLading); this.saveDistrilbutionBillLading(distrilbutionBillLading, myCurrentWarehouse);
// List<DistrilbutionBillPackageEntity> packageEntityList = new ArrayList<>(); // List<DistrilbutionBillPackageEntity> packageEntityList = new ArrayList<>();
if (StringUtils.isNotBlank(distrilbutionBillLading.getStockArticleId())) { if (StringUtils.isNotBlank(distrilbutionBillLading.getStockArticleId())) {
String[] split = distrilbutionBillLading.getStockArticleId().split(","); String[] split = distrilbutionBillLading.getStockArticleId().split(",");
@ -916,10 +886,10 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}); });
distributionDeliveryDetailsService.saveBatch(detailsEntities); distributionDeliveryDetailsService.saveBatch(detailsEntities);
} }
Integer integer = baseMapper.selectBillLadingPlanNum(distrilbutionBillLading.getId());
handleCreatedDistributionPlanLog(distrilbutionBillLading, AuthUtil.getUser(), myCurrentWarehouse, integer);
} }
//添加库存品信息 //添加库存品信息
//添加费用 //添加费用
if (!distrilbutionBillLading.getFei().isEmpty()) { if (!distrilbutionBillLading.getFei().isEmpty()) {
//删除和自提相关的所有费用 //删除和自提相关的所有费用
@ -948,6 +918,76 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
return true; return true;
} }
private void handleCreatedDistributionPlanLog(DistrilbutionBillLadingEntity billLadingEntity, BladeUser user, BasicdataWarehouseEntity warehouse, Integer planNum) {
String planContent = user.getNickName() + "在" + warehouse.getName()
+ "创建自提计划;自提计划编号:" + billLadingEntity.getPickupBatch()
+ ";收货单位:" + billLadingEntity.getConsigneeUnit()
+ ",提货人:" + billLadingEntity.getConsignee()
+ ",提货车牌:" + billLadingEntity.getPickUpPlate()
+ ",提货证件:" + (billLadingEntity.getDeliveryDocument() != null ? billLadingEntity.getDeliveryDocument() : "未填写")
+ ",计划件数:" + planNum;
DistributionPlanLogEntity distributionPlanLogEntity = new DistributionPlanLogEntity();
distributionPlanLogEntity.setContent(planContent);
distributionPlanLogEntity.setRefId(billLadingEntity.getId());
distributionPlanLogEntity.setRefCode(billLadingEntity.getPickupBatch());
distributionPlanLogEntity.setWarehouseId(warehouse.getId());
distributionPlanLogEntity.setWarehouseName(warehouse.getName());
distributionPlanLogEntity.setOperator(user.getNickName());
distributionPlanLogEntity.setType(2);
distributionPlanLogService.save(distributionPlanLogEntity);
}
private void handleUpdateDistributionPlanLog(DistrilbutionBillLadingEntity oldEntity, DistrilbutionBillLadingEntity newEntity, BladeUser user, BasicdataWarehouseEntity warehouse, Integer planNum) {
if (StringUtils.isBlank(oldEntity.getDeliveryDocument())) {
oldEntity.setDeliveryDocument("未填写");
}
if (StringUtils.isBlank(newEntity.getDeliveryDocument())) {
newEntity.setDeliveryDocument("未填写");
}
String planContent = user.getNickName() + "在" + warehouse.getName()
+ "修改自提计划;自提计划编号:" + oldEntity.getPickupBatch()
+ ";收货单位:" + ((Objects.isNull(oldEntity.getConsigneeUnit())?"未填写":oldEntity.getConsigneeUnit()).equals((Objects.isNull(newEntity.getConsigneeUnit())?"未填写":newEntity.getConsigneeUnit())) ? oldEntity.getConsigneeUnit() : "由" + oldEntity.getConsigneeUnit() + "变更为-->" + newEntity.getConsigneeUnit())
+ ",提货人:" + (oldEntity.getConsignee().equals(newEntity.getConsignee()) ? oldEntity.getConsignee() : "由" + oldEntity.getConsignee() + "变更为-->" + newEntity.getConsignee())
+ ",提货车牌:" + (oldEntity.getPickUpPlate().equals(newEntity.getPickUpPlate()) ? oldEntity.getPickUpPlate() : "由" + oldEntity.getPickUpPlate() + "变更为-->" + newEntity.getPickUpPlate())
+ ",提货证件:" + (oldEntity.getDeliveryDocument().equals(newEntity.getDeliveryDocument()) ? oldEntity.getDeliveryDocument() : "由" + oldEntity.getDeliveryDocument() + "变更为-->" + newEntity.getDeliveryDocument())
+ ",计划件数:" + planNum;
DistributionPlanLogEntity distributionPlanLogEntity = new DistributionPlanLogEntity();
distributionPlanLogEntity.setContent(planContent);
distributionPlanLogEntity.setRefId(oldEntity.getId());
distributionPlanLogEntity.setRefCode(oldEntity.getPickupBatch());
distributionPlanLogEntity.setWarehouseId(warehouse.getId());
distributionPlanLogEntity.setWarehouseName(warehouse.getName());
distributionPlanLogEntity.setOperator(user.getNickName());
distributionPlanLogEntity.setType(2);
distributionPlanLogService.save(distributionPlanLogEntity);
}
private List<DistributionPlanLogEntity> handleCancelDistributionPlanLog(List<Long> ids, BladeUser user, BasicdataWarehouseEntity warehouse) {
List<DistributionPlanLogEntity> logsList = new ArrayList<>();
if (!ids.isEmpty()) {
List<DistrilbutionBillLadingEntity> distrilbutionBillLadingEntities = this.listByIds(ids);
for (DistrilbutionBillLadingEntity distrilbutionBillLadingEntity : distrilbutionBillLadingEntities) {
String planContent = user.getNickName() + "在" + warehouse.getName()
+ "取消自提计划;自提计划编号:" + distrilbutionBillLadingEntity.getPickupBatch();
DistributionPlanLogEntity distributionPlanLogEntity = new DistributionPlanLogEntity();
distributionPlanLogEntity.setContent(planContent);
distributionPlanLogEntity.setRefId(distrilbutionBillLadingEntity.getId());
distributionPlanLogEntity.setRefCode(distrilbutionBillLadingEntity.getPickupBatch());
distributionPlanLogEntity.setWarehouseId(warehouse.getId());
distributionPlanLogEntity.setWarehouseName(warehouse.getName());
distributionPlanLogEntity.setOperator(user.getNickName());
distributionPlanLogEntity.setType(2);
logsList.add(distributionPlanLogEntity);
}
}
if (!logsList.isEmpty()) {
return logsList;
}
return null;
}
private NodeFanoutMsg<DeliveryOfPickupPlanVO> buildNodeFanoutMsgForBill(DistrilbutionBillLadingDTO distrilbutionBillLading, List<DistrilbutionBillPackageEntity> packageEntityList, List<DistributionDeliveryDetailsEntity> detailsEntities, List<DistributionReservationZeroPackageEntity> zeroPackageEntityList, List<DistributionDeliveryChargeEntity> listEntity) { private NodeFanoutMsg<DeliveryOfPickupPlanVO> buildNodeFanoutMsgForBill(DistrilbutionBillLadingDTO distrilbutionBillLading, List<DistrilbutionBillPackageEntity> packageEntityList, List<DistributionDeliveryDetailsEntity> detailsEntities, List<DistributionReservationZeroPackageEntity> zeroPackageEntityList, List<DistributionDeliveryChargeEntity> listEntity) {
if (distrilbutionBillLading.getId() == null) { if (distrilbutionBillLading.getId() == null) {
@ -1160,6 +1200,10 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
log.error(method + "存在已提货或签收自提单:{}", errorBillLading); log.error(method + "存在已提货或签收自提单:{}", errorBillLading);
return R.fail(errorBillLading + "已提货或已签收!!!"); return R.fail(errorBillLading + "已提货或已签收!!!");
} }
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)) {
return R.fail(403, "未授权!!!");
}
//查询是否存在自提扫描的有效包件 //查询是否存在自提扫描的有效包件
List<DistributionBillLadingScanEntity> ladingScanEntities = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda() List<DistributionBillLadingScanEntity> ladingScanEntities = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda()
.in(DistributionBillLadingScanEntity::getBillLadingId, ids) .in(DistributionBillLadingScanEntity::getBillLadingId, ids)
@ -1173,6 +1217,8 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
Integer a = this.cancelBillLodingPackage(ids); Integer a = this.cancelBillLodingPackage(ids);
switch (a) { switch (a) {
case 0: case 0:
//日志记录
List<DistributionPlanLogEntity> cancelLogList = handleCancelDistributionPlanLog(ids, AuthUtil.getUser(), myCurrentWarehouse);
//进行自提单的取消 //进行自提单的取消
this.removeBatchByIds(ids); this.removeBatchByIds(ids);
//取消备货任务 //取消备货任务
@ -1190,6 +1236,10 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
} }
//对自提所有的包件进行状态恢复 //对自提所有的包件进行状态恢复
distributionAsyncService.maintenanceCancelBillLading(ids); distributionAsyncService.maintenanceCancelBillLading(ids);
//取消日志记录
if (!cancelLogList.isEmpty()) {
distributionPlanLogService.saveBatch(cancelLogList);
}
return R.status(true); return R.status(true);
case 1: case 1:
return R.fail("未授权!!!"); return R.fail("未授权!!!");
@ -1337,7 +1387,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
if (Func.isNotEmpty(builder)) { if (Func.isNotEmpty(builder)) {
String string = builder.deleteCharAt(builder.length() - 1).toString(); String string = builder.deleteCharAt(builder.length() - 1).toString();
if(StringUtils.isNotBlank(string)){ if (StringUtils.isNotBlank(string)) {
warehouseUpdownTypeClient.downPackageOrDelTray(string, myCurrentWarehouse.getId(), "签收下架解托"); warehouseUpdownTypeClient.downPackageOrDelTray(string, myCurrentWarehouse.getId(), "签收下架解托");
} }
} }
@ -1413,7 +1463,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
// 转换仓库ID // 转换仓库ID
// modifyWarehouseId(delivery); // modifyWarehouseId(delivery);
Map<String,Object> map = oldSystemDataPushClient.pushOldSystemSignInfo(delivery); Map<String, Object> map = oldSystemDataPushClient.pushOldSystemSignInfo(delivery);
Boolean flag = (Boolean) map.get("result"); Boolean flag = (Boolean) map.get("result");
return flag; return flag;
} catch (Exception e) { } catch (Exception e) {
@ -2554,7 +2604,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
records.forEach(i -> { records.forEach(i -> {
if (groupedEntities != null) { if (groupedEntities != null) {
List<DistributionDeliveryChargeEntity> list = groupedEntities.get(i.getId()); List<DistributionDeliveryChargeEntity> list = groupedEntities.get(i.getId());
if (!Func.isEmpty(groupedEntities.get(i.getId()))){ if (!Func.isEmpty(groupedEntities.get(i.getId()))) {
list.forEach(ii -> ii.setCostName(DictBizCache.getValue(DictBizConstant.DELIVERY_COST, ii.getCost()))); list.forEach(ii -> ii.setCostName(DictBizCache.getValue(DictBizConstant.DELIVERY_COST, ii.getCost())));
i.setList(list); i.setList(list);
} }
@ -3255,8 +3305,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
Object billLadingId = distributionBillLading.get("id"); Object billLadingId = distributionBillLading.get("id");
String coding = distributionBillLading.get("coding").toString(); String coding = distributionBillLading.get("coding").toString();
String type = distributionBillLading.get("type").toString(); String type = distributionBillLading.get("type").toString();
try { try {
DistrilbutionBillLadingEntity billLadingEntity1 = baseMapper.selectById((Serializable) billLadingId); DistrilbutionBillLadingEntity billLadingEntity1 = baseMapper.selectById((Serializable) billLadingId);
DistrilbutionAppBillLadingOrderMainVO billLadingOrderMainVO = baseMapper.getBillLadingOrderMainVO(Long.parseLong(billLadingId.toString())); DistrilbutionAppBillLadingOrderMainVO billLadingOrderMainVO = baseMapper.getBillLadingOrderMainVO(Long.parseLong(billLadingId.toString()));
@ -3283,7 +3331,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
distributionBillLadingScan.setScanUser(AuthUtil.getUser().getNickName()); distributionBillLadingScan.setScanUser(AuthUtil.getUser().getNickName());
return processScan(type, distributionBillLadingScan.getBillLadingId(), coding, distributionBillLadingScan, myCurrentWarehouse, billLadingEntity1.getPickupBatch()); return processScan(type, distributionBillLadingScan.getBillLadingId(), coding, distributionBillLadingScan, myCurrentWarehouse, billLadingEntity1.getPickupBatch());
// return Resp.scanSuccess("签收成功", "签收成功"); // return Resp.scanSuccess("签收成功", "签收成功");
@ -3367,6 +3414,11 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
if (matchedPackage == null) { if (matchedPackage == null) {
return Resp.scanFail("系统无此编码!", "系统无此编码"); return Resp.scanFail("系统无此编码!", "系统无此编码");
} }
DisStockListDetailEntity disStockListDetailEntity = new DisStockListDetailEntity();
disStockListDetailEntity.setId(matchedPackage.getId());
disStockListDetailEntity.setStockLockingStatus(InventoryLoadingStatusConstant.yizhuangche.getValue());
disStockListDetailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue());
disStockListDetailService.updateById(disStockListDetailEntity);
List<DistributionBillLadingScanEntity> billLadingScanEntities = new ArrayList<>(); List<DistributionBillLadingScanEntity> billLadingScanEntities = new ArrayList<>();
distributionBillLadingScan.setPacketBarCode(coding); distributionBillLadingScan.setPacketBarCode(coding);
@ -3513,7 +3565,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
//查询订单包件数量签收的信息 //查询订单包件数量签收的信息
DistributionStockArticleEntity one = distributionStockArticleEntityList.stream().filter(s -> s.getId().equals(so.getStockArticleId())).findFirst().orElse(null); DistributionStockArticleEntity one = distributionStockArticleEntityList.stream().filter(s -> s.getId().equals(so.getStockArticleId())).findFirst().orElse(null);
DistributionStockArticleEntity upObj =new DistributionStockArticleEntity(); DistributionStockArticleEntity upObj = new DistributionStockArticleEntity();
upObj.setId(so.getStockArticleId()); upObj.setId(so.getStockArticleId());
@ -3815,8 +3867,17 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
String[] split = ids.split(","); String[] split = ids.split(",");
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)) { if (Func.isEmpty(myCurrentWarehouse)) {
return R.fail(403,"未授权!!!"); return R.fail(403, "未授权!!!");
} }
Integer isAutoRelease;
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(myCurrentWarehouse.getId());
if (!Objects.isNull(warehouseConfig)) {
isAutoRelease = warehouseConfig.getIsAutoRelease() != null ? warehouseConfig.getIsAutoRelease() : 0;
} else {
isAutoRelease = 0;
}
Set<Long> parcelListIds = new HashSet<>(); Set<Long> parcelListIds = new HashSet<>();
for (int i = 0; i < split.length; i++) { for (int i = 0; i < split.length; i++) {
String s = split[i]; String s = split[i];
@ -3841,6 +3902,14 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
if (ladingScanEntities.isEmpty()) { if (ladingScanEntities.isEmpty()) {
return R.fail("无签收数据!!"); return R.fail("无签收数据!!");
} }
if (Objects.equals(isAutoRelease, Integer.parseInt(IsOrNoConstant.no.getValue()))) {
//检查是否进行签收完毕
Integer planNum = baseMapper.selectBillLadingPlanNum(Long.valueOf(s));
Integer sum = ladingScanEntities.stream().mapToInt(DistributionBillLadingScanEntity::getQuantity).sum();
if (!Objects.equals(planNum, sum)) {
return R.fail("当前任务未签收完成!!!");
}
}
//修改提货状态 //修改提货状态
DistrilbutionBillLadingEntity billLadingEntity = new DistrilbutionBillLadingEntity(); DistrilbutionBillLadingEntity billLadingEntity = new DistrilbutionBillLadingEntity();
billLadingEntity.setConditions(BillLadingStatusConstant.yiqianshou.getValue()); billLadingEntity.setConditions(BillLadingStatusConstant.yiqianshou.getValue());
@ -3855,98 +3924,117 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
Integer integer = this.selectBillLadingPlanNum(Long.parseLong(s)); Integer integer = this.selectBillLadingPlanNum(Long.parseLong(s));
if (Func.isNotEmpty(ladingScanEntities)) { if (Func.isNotEmpty(ladingScanEntities)) {
int sum = ladingScanEntities.stream().filter(f -> "2".equals(f.getMaterialType())).mapToInt(DistributionBillLadingScanEntity::getQuantity).sum(); int sum = ladingScanEntities.stream().filter(f -> "2".equals(f.getMaterialType())).mapToInt(DistributionBillLadingScanEntity::getQuantity).sum();
// if (sum == 0){ if (integer != sum) {
// //未进行任何签收扫描的操作这里需要进行拦截 //存在资源释放操作
// throw new ServiceException("无签收数据"); releaseBillLadingResource(Long.parseLong(s), myCurrentWarehouse, distrilbutionBillLadingEntity.getPickupBatch());
// }
// } try {
if (integer != sum) { if (sum > 0) {
//存在资源释放操作 parcelListIds.addAll(ladingScanEntities.stream().map(DistributionBillLadingScanEntity::getParcelListId).collect(Collectors.toSet()));
releaseBillLadingResource(Long.parseLong(s), myCurrentWarehouse,distrilbutionBillLadingEntity.getPickupBatch()); List<DistributionParcelListEntity> listByOrderPackageCode = distributionParcelListService.findListByOrderPackageCode(ladingScanEntities.stream().map(DistributionBillLadingScanEntity::getPacketBarCode).collect(Collectors.toList()), myCurrentWarehouse.getId());
} // 根据品牌分组
try { Map<String, List<DistributionParcelListEntity>> collect = listByOrderPackageCode.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getBrandName));
if (sum > 0){ for (Map.Entry<String, List<DistributionParcelListEntity>> entry : collect.entrySet()) {
parcelListIds.addAll(ladingScanEntities.stream().map(DistributionBillLadingScanEntity::getParcelListId).collect(Collectors.toSet())); String brand = entry.getKey();
List<DistributionParcelListEntity> listByOrderPackageCode = distributionParcelListService.findListByOrderPackageCode(ladingScanEntities.stream().map(DistributionBillLadingScanEntity::getPacketBarCode).collect(Collectors.toList()), myCurrentWarehouse.getId()); List<DistributionParcelListEntity> list2 = entry.getValue();
// 根据品牌分组 // 按订单分组
Map<String, List<DistributionParcelListEntity>> collect = listByOrderPackageCode.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getBrandName));
for (Map.Entry<String, List<DistributionParcelListEntity>> entry : collect.entrySet()) {
String brand = entry.getKey();
List<DistributionParcelListEntity> list2 = entry.getValue();
// 按订单分组
// Map<String, List<DistributionParcelListEntity>> collect1 = list.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getOrderCode)); // Map<String, List<DistributionParcelListEntity>> collect1 = list.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getOrderCode));
// for (Map.Entry<String, List<DistributionParcelListEntity>> stringListEntry : collect1.entrySet()) { // for (Map.Entry<String, List<DistributionParcelListEntity>> stringListEntry : collect1.entrySet()) {
// String orderCode = stringListEntry.getKey(); // String orderCode = stringListEntry.getKey();
// List<DistributionParcelListEntity> list2 = stringListEntry.getValue(); // List<DistributionParcelListEntity> list2 = stringListEntry.getValue();
JSONObject js = new JSONObject(); JSONObject js = new JSONObject();
js.put("boId", billLadingEntity.getId()); js.put("boId", billLadingEntity.getId());
js.put("consignee", distrilbutionBillLadingEntity.getConsignee()); js.put("consignee", distrilbutionBillLadingEntity.getConsignee());
js.put("images", list1.stream().map(m -> m.getSite()).collect(Collectors.toList())); js.put("images", list1.stream().map(m -> m.getSite()).collect(Collectors.toList()));
NodePushMsg msg = new NodePushMsg(); NodePushMsg msg = new NodePushMsg();
msg.setNode(WorkNodeEnums.CLERK_REVIEW); msg.setNode(WorkNodeEnums.CLERK_REVIEW);
msg.setBrand(BrandEnums.getByValue(brand)); msg.setBrand(BrandEnums.getByValue(brand));
msg.setWarehouse(myCurrentWarehouse.getName()); msg.setWarehouse(myCurrentWarehouse.getName());
msg.setOperator(AuthUtil.getNickName()); msg.setOperator(AuthUtil.getNickName());
msg.setOperatorTime(new Date()); msg.setOperatorTime(new Date());
msg.setContent(list2.stream().map(pushData->{ msg.setContent(list2.stream().map(pushData -> {
return PushData.builder() return PushData.builder()
.packageCode(pushData.getOrderPackageCode()) .packageCode(pushData.getOrderPackageCode())
.warehouseName(myCurrentWarehouse.getName()) .warehouseName(myCurrentWarehouse.getName())
.waybillNumber(pushData.getWaybillNumber()) .waybillNumber(pushData.getWaybillNumber())
.orderCode(pushData.getOrderCode()) .orderCode(pushData.getOrderCode())
.build(); .build();
}).collect(Collectors.toList())); }).collect(Collectors.toList()));
msg.setMain(JSONUtil.toJsonStr(js)); msg.setMain(JSONUtil.toJsonStr(js));
log.info("推送工厂数据:{}", JSONUtil.toJsonStr(msg)); log.info("推送工厂数据:{}", JSONUtil.toJsonStr(msg));
factoryDataMessageSender.sendNodeDataByBrand(msg); factoryDataMessageSender.sendNodeDataByBrand(msg);
} }
}
}catch (Exception e){
log.error("推送失败:{}", e);
} }
for (DistributionBillLadingScanEntity ladingScanEntity : ladingScanEntities) { } catch (Exception e) {
if(ladingScanEntity.getStockArticleId()!=null){ log.error("推送失败:{}", e);
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(ladingScanEntity.getStockArticleId()); }
if(stockArticleEntity!=null){ for (DistributionBillLadingScanEntity ladingScanEntity : ladingScanEntities) {
// 签收发送消息到工厂 if (ladingScanEntity.getStockArticleId() != null) {
pushFactoryOrderData(myCurrentWarehouse.getId(), ladingScanEntity.getParcelListId().toString(), stockArticleEntity.getOrderCode()); DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(ladingScanEntity.getStockArticleId());
} if (stockArticleEntity != null) {
// 签收发送消息到工厂
pushFactoryOrderData(myCurrentWarehouse.getId(), ladingScanEntity.getParcelListId().toString(), stockArticleEntity.getOrderCode());
} }
} }
} }
//修改订单状态 }
List<DistrilbutionBillStockEntity> list = distrilbutionBillStockService.list(Wrappers.<DistrilbutionBillStockEntity>query().lambda() //修改订单状态
.eq(DistrilbutionBillStockEntity::getBillLadingId, s) List<DistrilbutionBillStockEntity> list = distrilbutionBillStockService.list(Wrappers.<DistrilbutionBillStockEntity>query().lambda()
.apply("order_status in ( '1' , '3')") .eq(DistrilbutionBillStockEntity::getBillLadingId, s)
.apply("order_status in ( '1' , '3')")
// .or(ew -> ew.eq(DistrilbutionBillStockEntity::getBillLadingId, s).apply(DistrilbutionBillStockEntity::getOrderStatus, "2")) // .or(ew -> ew.eq(DistrilbutionBillStockEntity::getBillLadingId, s).apply(DistrilbutionBillStockEntity::getOrderStatus, "2"))
); );
List<String> orderCode = new ArrayList<>();
List<Long> orderIds = new ArrayList<>();
if (!list.isEmpty()) { if (!list.isEmpty()) {
list.forEach(li -> { list.forEach(li -> {
DistributionStockArticleEntity stockArticleEntity = new DistributionStockArticleEntity(); DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(li.getStockArticleId());
stockArticleEntity.setId(li.getStockArticleId()); if (IsOrNoConstant.no.getValue().equals(stockArticleEntity.getIsZero())) {
List<DistributionParcelListEntity> list2 = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda() //开启自动释放才可以进行 否则这里无法进行复核
.eq(DistributionParcelListEntity::getStockArticleId, li.getStockArticleId()) if (Integer.parseInt(IsOrNoConstant.yes.getValue()) == (isAutoRelease)) {
.apply("order_package_status != 70 ") Integer i1 = updatePack(li.getStockArticleId(), Long.valueOf(s));
); if (i1 > 0) {
if (list2.isEmpty()) { //存在释放 需要对订单状态进行维护
stockArticleEntity.setOrderStatus(OrderStatusConstant.qianshou.getValue()); orderCode.add(stockArticleEntity.getOrderCode());
orderIds.add(stockArticleEntity.getId());
}
}
} else { } else {
stockArticleEntity.setOrderStatus(OrderStatusConstant.bufenqianshou.getValue()); if (Integer.parseInt(IsOrNoConstant.yes.getValue()) == (isAutoRelease)) {
} //释放零担
//回退包件数据 Integer i2 = updateZeroPack(li.getStockArticleId(), Long.valueOf(s));
Integer i1 = updatePack(li.getStockArticleId(), Long.valueOf(s)); switch (i2) {
if (i1 > 0) { case 1:
stockArticleEntity.setOrderStatus(OrderStatusConstant.bufenqianshou.getValue()); orderCode.add(stockArticleEntity.getOrderCode());
orderIds.add(stockArticleEntity.getId());
break;
case 0:
throw new CustomerException("查询零担信息错误");
default:
log.error("updateZeroPack>>>>>>>>>>>>>未知返回值");
}
}
} }
distributionStockArticleService.updateById(stockArticleEntity);
}); });
distributionAsyncService.sendFactorySignforInfo(s, myCurrentWarehouse, AuthUtil.getUser()); distributionAsyncService.sendFactorySignforInfo(s, myCurrentWarehouse, AuthUtil.getUser());
if (!orderIds.isEmpty()) {
//维护计划内进行释放订单状态
distrilbutionBillStockService.maintenancePlanOrderStatus(orderIds, billLadingEntity.getId());
}
} }
//处理库存品签收数据 if (!orderCode.isEmpty()) {
updateStock(s, scanEntityList); String collect = orderCode.stream().distinct().collect(Collectors.joining(","));
distributionStockArticleService.maintenanceOrderInfo(collect, myCurrentWarehouse.getId());
}
if (Integer.parseInt(IsOrNoConstant.yes.getValue()) == (isAutoRelease)) {
//释放库存品
updateStock(s, scanEntityList);
}
Integer num = baseMapper.selectBillLadingLoading(billLadingEntity.getId());
//自提复核日志
handleDExamineDistributionPlanLog(billLadingEntity,AuthUtil.getUser(),myCurrentWarehouse,num);
// 回传老系统自提数据 // 回传老系统自提数据
sendOldSystem(Long.parseLong(s)); sendOldSystem(Long.parseLong(s));
//整理运单信息 //整理运单信息
@ -3955,6 +4043,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
NodeFanoutMsg<PickUpByReCheckVO> nodeFanoutMsg = buildPickUpByReCheckVO(billLadingEntity, ladingScanEntities, myCurrentWarehouse); NodeFanoutMsg<PickUpByReCheckVO> nodeFanoutMsg = buildPickUpByReCheckVO(billLadingEntity, ladingScanEntities, myCurrentWarehouse);
iDistributionNodeWorkService.billofladingSignforCheck(nodeFanoutMsg, AuthUtil.getUser()); iDistributionNodeWorkService.billofladingSignforCheck(nodeFanoutMsg, AuthUtil.getUser());
} }
// 回传工厂数据 // 回传工厂数据
// sendFactory(myCurrentWarehouse, parcelListIds); // sendFactory(myCurrentWarehouse, parcelListIds);
@ -3962,6 +4051,102 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
return R.success("操作成功"); return R.success("操作成功");
} }
private void handleDExamineDistributionPlanLog(DistrilbutionBillLadingEntity billLadingEntity, BladeUser user, BasicdataWarehouseEntity myCurrentWarehouse,Integer num) {
String planContent = user.getNickName() + "在" + myCurrentWarehouse.getName()
+ "完成自提计划;自提计划编号:" + billLadingEntity.getPickupBatch()
+ ",签收件数:" + num;
DistributionPlanLogEntity distributionPlanLogEntity = new DistributionPlanLogEntity();
distributionPlanLogEntity.setContent(planContent);
distributionPlanLogEntity.setRefId(billLadingEntity.getId());
distributionPlanLogEntity.setRefCode(billLadingEntity.getPickupBatch());
distributionPlanLogEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionPlanLogEntity.setWarehouseName(myCurrentWarehouse.getName());
distributionPlanLogEntity.setOperator(user.getNickName());
distributionPlanLogEntity.setType(2);
distributionPlanLogService.save(distributionPlanLogEntity);
}
private Integer updateZeroPack(Long stockArticleId, Long billId) {
//查询零担计划信息
List<DistributionReservationZeroPackageEntity> reservationZeroPackageEntities = distributionZeroPackageService.list(Wrappers.<DistributionReservationZeroPackageEntity>query().lambda()
.eq(DistributionReservationZeroPackageEntity::getReservationId, billId)
.eq(DistributionReservationZeroPackageEntity::getStockArticleId, stockArticleId)
.eq(DistributionReservationZeroPackageEntity::getType, "3")
.ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
List<DistributionReservationZeroPackageEntity> recoveryReservationZeroPackageEntities = new ArrayList<>();
List<DistributionReservationZeroPackageEntity> updateReservationZeroPackageEntities = new ArrayList<>();
if (!reservationZeroPackageEntities.isEmpty()) {
List<Long> zeropackageIds = reservationZeroPackageEntities.stream().map(DistributionReservationZeroPackageEntity::getParcelListId).collect(Collectors.toList());
//查询此品类的签收数量
List<DistributionBillLadingScanEntity> ladingScanEntities = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda()
.eq(DistributionBillLadingScanEntity::getBillLadingId, billId)
.eq(DistributionBillLadingScanEntity::getStockArticleId, stockArticleId)
.in(DistributionBillLadingScanEntity::getParcelListId, zeropackageIds)
);
if (!ladingScanEntities.isEmpty()) {
//收集需要进行恢复的数据
Map<Long, List<DistributionBillLadingScanEntity>> loadingPackageMap = ladingScanEntities.stream().collect(Collectors.groupingBy(DistributionBillLadingScanEntity::getParcelListId));
for (DistributionReservationZeroPackageEntity reservationZeroPackageEntity : reservationZeroPackageEntities) {
if (!Objects.isNull(loadingPackageMap.get(reservationZeroPackageEntity.getParcelListId()))) {
//进行签收的数量比对
DistributionBillLadingScanEntity ladingScanEntity = loadingPackageMap.get(reservationZeroPackageEntity.getParcelListId()).get(0);
if (!Objects.equals(reservationZeroPackageEntity.getQuantity(), ladingScanEntity.getQuantity())) {
//存在数据差异
int i = reservationZeroPackageEntity.getQuantity() - ladingScanEntity.getQuantity();
DistributionReservationZeroPackageEntity distributionReservationZeroPackageEntity = new DistributionReservationZeroPackageEntity();
distributionReservationZeroPackageEntity.setParcelListId(reservationZeroPackageEntity.getParcelListId());
distributionReservationZeroPackageEntity.setQuantity(i);
recoveryReservationZeroPackageEntities.add(distributionReservationZeroPackageEntity);
reservationZeroPackageEntity.setQuantity(ladingScanEntity.getQuantity());
updateReservationZeroPackageEntities.add(reservationZeroPackageEntity);
}
//计划和签收一致 不进行处理
} else {
DistributionReservationZeroPackageEntity distributionReservationZeroPackageEntity = new DistributionReservationZeroPackageEntity();
distributionReservationZeroPackageEntity.setParcelListId(reservationZeroPackageEntity.getParcelListId());
distributionReservationZeroPackageEntity.setQuantity(reservationZeroPackageEntity.getQuantity());
recoveryReservationZeroPackageEntities.add(distributionReservationZeroPackageEntity);
reservationZeroPackageEntity.setQuantity(0);
reservationZeroPackageEntity.setZeroPackageStatus(ReservationPackageStatusConstant.quxiao.getValue());
//进行整个品类释放
updateReservationZeroPackageEntities.add(reservationZeroPackageEntity);
}
}
} else {
recoveryReservationZeroPackageEntities.addAll(reservationZeroPackageEntities);
reservationZeroPackageEntities.stream().forEach(rz -> {
rz.setZeroPackageStatus(ReservationPackageStatusConstant.quxiao.getValue());
rz.setQuantity(0);
});
//进行整个品类释放
updateReservationZeroPackageEntities.addAll(reservationZeroPackageEntities);
}
} else {
return 0;
}
if (!recoveryReservationZeroPackageEntities.isEmpty()) {
//存在需要释放的
for (DistributionReservationZeroPackageEntity recoveryReservationZeroPackageEntity : recoveryReservationZeroPackageEntities) {
DistributionParcelNumberEntity distributionParcelNumberEntity = distributionParcelNumberService.getOne(Wrappers.<DistributionParcelNumberEntity>query().lambda()
.eq(DistributionParcelNumberEntity::getParcelListId, recoveryReservationZeroPackageEntity.getParcelListId())
);
distributionParcelNumberEntity.setDeliveryQuantity(distributionParcelNumberEntity.getDeliveryQuantity() - recoveryReservationZeroPackageEntity.getQuantity());
distributionParcelNumberService.updateById(distributionParcelNumberEntity);
distributionParcelListService.maintenanceZerpPackageInfo(recoveryReservationZeroPackageEntity.getParcelListId());
}
}
if (!updateReservationZeroPackageEntities.isEmpty()) {
//存在需要修改计划的
distributionZeroPackageService.updateBatchById(updateReservationZeroPackageEntities);
}
return 1;
}
private NodeFanoutMsg<PickUpByReCheckVO> buildPickUpByReCheckVO(DistrilbutionBillLadingEntity billLadingEntity, List<DistributionBillLadingScanEntity> ladingScanEntities, BasicdataWarehouseEntity myCurrentWarehouse) { private NodeFanoutMsg<PickUpByReCheckVO> buildPickUpByReCheckVO(DistrilbutionBillLadingEntity billLadingEntity, List<DistributionBillLadingScanEntity> ladingScanEntities, BasicdataWarehouseEntity myCurrentWarehouse) {
NodeFanoutMsg<org.springblade.common.model.workNode.PickUpByReCheckVO> nodeFanoutMsg = new NodeFanoutMsg(); NodeFanoutMsg<org.springblade.common.model.workNode.PickUpByReCheckVO> nodeFanoutMsg = new NodeFanoutMsg();
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD);
@ -4058,7 +4243,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
} }
} }
public void releaseBillLadingResource(Long l, BasicdataWarehouseEntity warehouse,String pickupBatch) { public void releaseBillLadingResource(Long l, BasicdataWarehouseEntity warehouse, String pickupBatch) {
List<DistrilbutionBillPackageEntity> list = distrilbutionBillPackageService.list(Wrappers.<DistrilbutionBillPackageEntity>query().lambda() List<DistrilbutionBillPackageEntity> list = distrilbutionBillPackageService.list(Wrappers.<DistrilbutionBillPackageEntity>query().lambda()
.eq(DistrilbutionBillPackageEntity::getBillLadingId, l) .eq(DistrilbutionBillPackageEntity::getBillLadingId, l)
.ne(DistrilbutionBillPackageEntity::getPacketBarStatus, 2) .ne(DistrilbutionBillPackageEntity::getPacketBarStatus, 2)
@ -4163,23 +4348,52 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
*/ */
public void updateStock(String billId, List<DistributionBillLadingScanEntity> scanEntityList) { public void updateStock(String billId, List<DistributionBillLadingScanEntity> scanEntityList) {
List<DisStockListDetailEntity> list = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda() List<DisStockListDetailEntity> list = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getReservationId, billId)); .eq(DisStockListDetailEntity::getReservationId, billId)
.ne(DisStockListDetailEntity::getStockPackageStatus, InventoryPackageStatusConstant.quxiao.getValue())
);
if (ObjectUtils.isNotNull(list)) { if (ObjectUtils.isNotNull(list)) {
//处理库存 // //处理库存
list.stream().filter(i -> "10".equals(i.getStockSignfoStatus())).forEach(i -> { // list.stream().filter(i -> "10".equals(i.getStockSignfoStatus())).forEach(i -> {
//添加自提库存品记录 // //添加自提库存品记录
DistributionBillLadingScanEntity billLadingScan = new DistributionBillLadingScanEntity(); // DistributionBillLadingScanEntity billLadingScan = new DistributionBillLadingScanEntity();
billLadingScan.setMaterialType("1"); // billLadingScan.setMaterialType("1");
billLadingScan.setScanType(2); // billLadingScan.setScanType(2);
billLadingScan.setBillLadingId(Long.valueOf(billId)); // billLadingScan.setBillLadingId(Long.valueOf(billId));
billLadingScan.setQuantity(1); // billLadingScan.setQuantity(1);
billLadingScan.setStockListId(i.getStockListId()); // billLadingScan.setStockListId(i.getStockListId());
billLadingScan.setPacketBarCode(i.getStockPackageCode()); // billLadingScan.setPacketBarCode(i.getStockPackageCode());
scanEntityList.add(billLadingScan); // scanEntityList.add(billLadingScan);
}); // });
if (!scanEntityList.isEmpty()) { // if (!scanEntityList.isEmpty()) {
distributionBillLadingScanService.saveBatch(scanEntityList); // distributionBillLadingScanService.saveBatch(scanEntityList);
// }
List<DisStockListDetailEntity> cancelList = new ArrayList<>();
List<DisStockListDetailEntity> recoveryInventoryPackageList = list.stream().filter(f -> InventorySigningStatusConstant.weiqianshou.getValue().equals(f.getStockSignfoStatus())).collect(Collectors.toList());
if (!recoveryInventoryPackageList.isEmpty()) {
Map<Long, List<DisStockListDetailEntity>> recoveryInventoryPackageGroupByMap = recoveryInventoryPackageList.stream().collect(Collectors.groupingBy(DisStockListDetailEntity::getStockListId));
recoveryInventoryPackageGroupByMap.forEach((k,v)->{
//进行指定库存品的冻结数量进行释放
DistributionStockListEntity stockListEntity = distributionStockListService.getById(k);
if (Objects.isNull(stockListEntity)){
log.error("查询库存品信息错误>>>>>>>>>>>>>>>>>updateStock,id:{}",k);
throw new CustomerException("查询库存品信息错误");
}
//维护库存品的冻结数量
distributionStockListMapper.decreaseStockListQuantityOccupied(k,v.stream().mapToInt(DisStockListDetailEntity::getNum).sum());
cancelList.addAll(v);
});
} }
if (!cancelList.isEmpty()) {
cancelList.stream().forEach(c->c.setStockPackageStatus(InventoryPackageStatusConstant.quxiao.getValue()));
List<DisStockListDetailEntity> packageList = cancelList.stream().filter(p -> InventoryStockTypeStatusConstant.caiji.getValue().equals(p.getStockType()) && InventoryStockUpStatusConstant.yibeihuo.getValue().equals(p.getStockStatus())).collect(Collectors.toList());
if (!packageList.isEmpty()) {
//TODO这是包件转的库存品进行包件的
//对此包件进行取消备货标识,增加此包件的日志记录
}
disStockListDetailService.updateBatchById(cancelList);
}
//维护此自提下的所有库存品信息
distributionDeliveryDetailsService.maintainInvnetory(Long.parseLong(billId));
} }
@ -4193,7 +4407,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Integer updatePack(Long ids, Long billId) { public Integer updatePack(Long ids, Long billId) {
List<DistrilbutionBillPackageEntity> list = distrilbutionBillPackageService.list(Wrappers.<DistrilbutionBillPackageEntity>query().lambda() List<DistrilbutionBillPackageEntity> list = distrilbutionBillPackageService.list(Wrappers.<DistrilbutionBillPackageEntity>query().lambda()
.eq(DistrilbutionBillPackageEntity::getBillLadingId, billId) .eq(DistrilbutionBillPackageEntity::getBillLadingId, billId)
.eq(DistrilbutionBillPackageEntity::getStockArticleId, ids) .eq(DistrilbutionBillPackageEntity::getStockArticleId, ids)
@ -4210,7 +4423,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
DistrilbutionBillPackageEntity next = iterator.next(); DistrilbutionBillPackageEntity next = iterator.next();
if (ObjectUtils.isNotNull(next.getParceListId())) { if (ObjectUtils.isNotNull(next.getParceListId())) {
boolean b = list1.stream().anyMatch(q -> { boolean b = list1.stream().anyMatch(q -> {
if (ObjectUtils.isNotNull(q.getParcelListId())) { if (ObjectUtils.isNotNull(q.getParcelListId())) {
return q.getParcelListId().equals(next.getParceListId()); return q.getParcelListId().equals(next.getParceListId());
} }
@ -4220,10 +4432,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
//删除包件 //删除包件
iterator.remove(); iterator.remove();
} }
} }
} }
//回退包件信息 //回退包件信息
list.forEach(i -> { list.forEach(i -> {
@ -4272,7 +4481,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void saveDistrilbutionBillLading(DistrilbutionBillLadingDTO distrilbutionBillLading) { public void saveDistrilbutionBillLading(DistrilbutionBillLadingDTO distrilbutionBillLading, BasicdataWarehouseEntity warehouse) {
//判断是不是零担 //判断是不是零担
List<DistributionParcelListDTO> list = new ArrayList<>(); List<DistributionParcelListDTO> list = new ArrayList<>();
boolean isZeroType = false; boolean isZeroType = false;
@ -4283,60 +4492,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
isZeroType = true; isZeroType = true;
} }
this.save(distrilbutionBillLading); this.save(distrilbutionBillLading);
// if (isZeroType) { //新增自提日志
// if (list.isEmpty()) {
// throw new ServiceException("类型数据未填写!!!");
// }
// List<DistributionReservationZeroPackageEntity> zeroPackageEntityList = new ArrayList<>();
// List<DistributionParcelNumberEntity> parcelNumberEntityList = new ArrayList<>();
// AtomicInteger nu = new AtomicInteger();
// //是 添加物料信息
// list.forEach(i -> {
// if (i.getQuantity() != 0) {
// DistributionReservationZeroPackageEntity zeroPackageEntity = new DistributionReservationZeroPackageEntity();
// zeroPackageEntity.setQuantity(i.getQuantity());
// zeroPackageEntity.setReservationId(distrilbutionBillLading.getId());
// zeroPackageEntity.setType("3");
// zeroPackageEntity.setCategoryName(i.getFirsts());
// zeroPackageEntity.setZeroPackageStatus("1");
// zeroPackageEntity.setStockArticleId(i.getStockArticleId());
// zeroPackageEntity.setRealityQuantity(0);
// //修改包件配送数量
// //查询
// DistributionStockArticleEntity byId = distributionStockArticleService.getById(i.getStockArticleId());
// DistributionParcelNumberEntity one = distributionParcelNumberService.getOne(Wrappers.<DistributionParcelNumberEntity>query().lambda().eq(DistributionParcelNumberEntity::getParcelListId, i.getId()));
//
// int i1 = one.getDeliveryQuantity() + i.getQuantity();
// //全部数据不能大于预约数
// if (ObjectUtils.isNotNull(one) && i1 <= one.getHandQuantity()) {
// nu.addAndGet(i.getQuantity());
// DistributionParcelNumberEntity parcelNumberEntity = new DistributionParcelNumberEntity();
// parcelNumberEntity.setId(one.getId());
// parcelNumberEntity.setDeliveryQuantity(one.getDeliveryQuantity() + i.getQuantity());
// parcelNumberEntity.setHandQuantity(byId.getHandQuantity());
// parcelNumberEntityList.add(parcelNumberEntity);
// zeroPackageEntity.setParcelListId(one.getParcelListId());
// zeroPackageEntityList.add(zeroPackageEntity);
// } else {
// throw new ServiceException("配送数量大于在库数量!!");
// }
//
// }
// });
// if (!parcelNumberEntityList.isEmpty()) {
// parcelNumberEntityList.forEach(p -> {
// if (nu.get() <= p.getHandQuantity()) {
// p.setHandQuantity(null);
// distributionParcelNumberService.updateById(p);
// } else {
// throw new ServiceException("预约数量大于在库数量!!");
// }
// });
// } else {
// throw new ServiceException("数据异常,请联系管理员!!");
// }
// distributionZeroPackageService.saveBatch(zeroPackageEntityList);
// }
// 创建备货任务 // 创建备货任务
DistributionStockupEntity distributionStockupEntity = buildDistributionStockupEntityBydistrilbutionBillLading(distrilbutionBillLading); DistributionStockupEntity distributionStockupEntity = buildDistributionStockupEntityBydistrilbutionBillLading(distrilbutionBillLading);

47
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillStockServiceImpl.java

@ -37,6 +37,9 @@ import com.logpm.distribution.vo.*;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.reservation.ReservationOrderStatusConstant;
import org.springblade.common.constant.reservation.ReservationPackageStatusConstant;
import org.springblade.common.exception.CustomerException; import org.springblade.common.exception.CustomerException;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.cache.BladeRedis;
@ -89,6 +92,10 @@ public class DistrilbutionBillStockServiceImpl extends BaseServiceImpl<Distrilbu
@Lazy @Lazy
private IDistributionStockArticleService distributionStockArticleService; private IDistributionStockArticleService distributionStockArticleService;
@Autowired
@Lazy
private IDistributionReservationZeroPackageService distributionReservationZeroPackageService;
@Override @Override
@ -336,4 +343,44 @@ public class DistrilbutionBillStockServiceImpl extends BaseServiceImpl<Distrilbu
return ladingScanEntities.isEmpty(); return ladingScanEntities.isEmpty();
} }
@Override
public void maintenancePlanOrderStatus(List<Long> orderIds, Long billId) {
List<Long> cancelBillOrderIds = new ArrayList<>();
for (Long orderId : orderIds) {
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(orderId);
if (IsOrNoConstant.no.getValue().equals(stockArticleEntity.getIsZero())){
//查询是否还存在有计划的包件 如果没有则进行取消
List<DistrilbutionBillPackageEntity> list = distrilbutionBillPackageService.list(Wrappers.<DistrilbutionBillPackageEntity>query().lambda()
.eq(DistrilbutionBillPackageEntity::getBillLadingId, billId)
.eq(DistrilbutionBillPackageEntity::getStockArticleId, orderId)
.ne(DistrilbutionBillPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
if (list.isEmpty()) {
//需要取消的订单
cancelBillOrderIds.add(orderId);
}
}else {
List<DistributionReservationZeroPackageEntity> reservationZeroPackageEntities = distributionReservationZeroPackageService.list(Wrappers.<DistributionReservationZeroPackageEntity>query().lambda()
.eq(DistributionReservationZeroPackageEntity::getReservationId, billId)
.eq(DistributionReservationZeroPackageEntity::getStockArticleId, orderId)
.ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
if (reservationZeroPackageEntities.isEmpty()) {
log.info("取消的零担信息:{}",orderId);
//需要取消的订单
cancelBillOrderIds.add(orderId);
}
}
}
if (!cancelBillOrderIds.isEmpty()) {
//存在需要进行取消的订单
this.update(Wrappers.<DistrilbutionBillStockEntity>update().lambda()
.in(DistrilbutionBillStockEntity::getStockArticleId,cancelBillOrderIds)
.eq(DistrilbutionBillStockEntity::getBillLadingId,billId)
.set(DistrilbutionBillStockEntity::getOrderStatus, ReservationOrderStatusConstant.quxiao.getValue())
);
}
}
} }

8
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java

@ -759,10 +759,10 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
for (ReceivingOrderEntity receivingOrderEntity : list) { for (ReceivingOrderEntity receivingOrderEntity : list) {
if (!ArrayUtil.contains(ouPaiProperties.getJidiCanshu(), receivingOrderEntity.getFromWarehouseName())) { // if (!ArrayUtil.contains(ouPaiProperties.getJidiCanshu(), receivingOrderEntity.getFromWarehouseName())) {
log.info(FactoryConstant.OUPAI, "推送老系统失败,当前仓库不是双流仓,推送失败 {}", receivingOrderEntity.getCurrentWarehouseName()); // log.info(FactoryConstant.OUPAI, "推送老系统失败,当前仓库不是双流仓,推送失败 {}", receivingOrderEntity.getCurrentWarehouseName());
continue; // continue;
} // }
// 查询这个派车单下面的订单 // 查询这个派车单下面的订单
List<FactoryOrderEntity> factoryOrderEntities = factoryOrderService.lambdaQuery().eq(FactoryOrderEntity::getReceivingId, receivingOrderEntity.getId()).eq(FactoryOrderEntity::getTurnStatus, 0).list(); List<FactoryOrderEntity> factoryOrderEntities = factoryOrderService.lambdaQuery().eq(FactoryOrderEntity::getReceivingId, receivingOrderEntity.getId()).eq(FactoryOrderEntity::getTurnStatus, 0).list();
log.info(">>>>>>>>>>>>>>>>>>>>>handlerOuPaiDataToHt 派车单 {} 派车单下面订单集合长度 {}", receivingOrderEntity.getCode(), factoryOrderEntities.size()); log.info(">>>>>>>>>>>>>>>>>>>>>handlerOuPaiDataToHt 派车单 {} 派车单下面订单集合长度 {}", receivingOrderEntity.getCode(), factoryOrderEntities.size());

27
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java

@ -53,9 +53,17 @@ public class CarsLoadController {
//当前登录人选择的仓库 //当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<Long> warehouseIds = new ArrayList<>();
if(!Objects.isNull(myCurrentWarehouse)){ if(!Objects.isNull(myCurrentWarehouse)){
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); Long warehouseId = myCurrentWarehouse.getId();
warehouseIds.add(warehouseId);
}else{
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
myWatchWarehouse.forEach(warehouseEntity -> {
warehouseIds.add(warehouseEntity.getId());
});
} }
loadCarsDTO.setWarehouseIds(warehouseIds);
IPage<TrunklineCarsLoadVO> pages = carsLoadService.loadCarsPageList(loadCarsDTO); IPage<TrunklineCarsLoadVO> pages = carsLoadService.loadCarsPageList(loadCarsDTO);
@ -80,9 +88,22 @@ public class CarsLoadController {
//当前登录人选择的仓库 //当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(!Objects.isNull(myCurrentWarehouse)){ if(Objects.isNull(myCurrentWarehouse)){
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"多仓权限无法操作,请选择仓库");
} }
// List<Long> warehouseIds = new ArrayList<>();
// if(!Objects.isNull(myCurrentWarehouse)){
// Long warehouseId = myCurrentWarehouse.getId();
// warehouseIds.add(warehouseId);
// }else{
// List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
// myWatchWarehouse.forEach(warehouseEntity -> {
// warehouseIds.add(warehouseEntity.getId());
// });
// }
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
IPage<TrunklineCarsLoadVO> pages = carsLoadService.arriveCarsPageList(loadCarsDTO); IPage<TrunklineCarsLoadVO> pages = carsLoadService.arriveCarsPageList(loadCarsDTO);
return R.data(pages); return R.data(pages);
}catch (CustomerException e){ }catch (CustomerException e){

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java

@ -83,4 +83,8 @@ public interface TrunklineAdvanceDetailMapper extends BaseMapper<TrunklineAdvanc
void clearWaybillInfoByWaybillId(@Param("waybillId") Long waybillId); void clearWaybillInfoByWaybillId(@Param("waybillId") Long waybillId);
AdvancenceTotalNumberVO findTotalNumberByAdvanceIds(@Param("advanceIds") List<Long> advanceIds); AdvancenceTotalNumberVO findTotalNumberByAdvanceIds(@Param("advanceIds") List<Long> advanceIds);
void updateWaybillNoByAdvanceIds(@Param("advanceIds") List<Long> advanceIds, @Param("waybillNo") String waybillNo, @Param("waybillId") Long waybillId);
List<TrunklineAdvanceDetailVO> findListByAdvanceIds(@Param("advanceIds") List<Long> advanceIds);
} }

47
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml

@ -184,6 +184,17 @@
where advance_id = #{advanceId} where advance_id = #{advanceId}
</update> </update>
<update id="updateWaybillNoByAdvanceIds" >
update logpm_trunkline_advance_detail
set waybill_no = #{waybillNo},
waybill_id = #{waybillId}
where advance_id in
<foreach collection="advanceIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<select id="findIncomingWarehouseName" resultType="String"> <select id="findIncomingWarehouseName" resultType="String">
select incoming_warehouse_name select incoming_warehouse_name
from logpm_trunkline_advance_detail from logpm_trunkline_advance_detail
@ -517,4 +528,40 @@
and is_deleted = 0 and is_deleted = 0
</select> </select>
<select id="findListByAdvanceIds" resultType="com.logpm.trunkline.vo.TrunklineAdvanceDetailVO">
select ltad.id id,
ltad.warehouse_id warehouseId,
ltad.warehouse_name warehouseName,
lta.waybill_no waybillNo,
ltad.order_code orderCode,
lta.train_number trainNumber,
ltad.package_status packageStatus,
ltad.first_pack_name firstPackName,
ltad.second_pack_name secondPackName,
ltad.third_pack_name thirdPackName,
ltad.material_code materialCode,
ltad.material_name materialName,
ltad.order_package_code orderPackageCode,
ltad.brand brand,
ltad.service_num serviceNum,
ltad.quantity quantity,
lwtg.tray_code trayCode,
lwt.pallet_name trayName,
ltad.system_type systemType,
ltad.weight weight,
ltad.volume volume,
ltad.advance_id advanceId,
ltad.incoming_warehouse_name incomingWarehouseName,
ltad.now_warehouse_name nowWarehouseName,
ltad.create_time createTime
from logpm_trunkline_advance_detail ltad
left join logpm_trunkline_advance lta on lta.id = ltad.advance_id
left join logpm_warehouse_tray_goods lwtg on lwtg.association_value = ltad.order_package_code
left join logpm_warehouse_tray lwt on lwt.id = lwtg.tray_id
where advance_id in
<foreach collection="advanceIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper> </mapper>

16
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -8,6 +8,7 @@
ltcl.cars_line_name carsLineName, ltcl.cars_line_name carsLineName,
ltcl.plan_loading_number planLoadingNumber, ltcl.plan_loading_number planLoadingNumber,
ltcl.real_loading_number realLoadingNumber, ltcl.real_loading_number realLoadingNumber,
ltcl.stock_number stockCarsNum,
ltcl.unload_number unloadNumber, ltcl.unload_number unloadNumber,
ltcl.loading_type loadingType, ltcl.loading_type loadingType,
ltcl.full_load_rate fullLoadRate, ltcl.full_load_rate fullLoadRate,
@ -42,9 +43,18 @@
where ltcl.is_deleted = 0 where ltcl.is_deleted = 0
and ltcl.load_type != '4' and ltcl.load_type != '4'
and ltcl.load_status != '100' and ltcl.load_status != '100'
<if test="param.warehouseIds != null and param.warehouseIds.size() > 0" >
and ltcl.start_warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.warehouseId != null" > <if test="param.warehouseId != null" >
and ltcl.start_warehouse_id = #{param.warehouseId} and ltcl.start_warehouse_id = #{param.warehouseId}
</if> </if>
<if test="param.endWarehouseId != null" >
and Locate(#{param.endWarehouseId},ltcl.end_warehouse_ids) > 0
</if>
<if test="param.loadCarsNo != null and param.loadCarsNo != ''"> <if test="param.loadCarsNo != null and param.loadCarsNo != ''">
and ltcl.cars_no = #{param.loadCarsNo} and ltcl.cars_no = #{param.loadCarsNo}
</if> </if>
@ -98,6 +108,7 @@
ltcl.cars_no carsNo, ltcl.cars_no carsNo,
ltcl.plan_loading_number planLoadingNumber, ltcl.plan_loading_number planLoadingNumber,
ltcl.real_loading_number realLoadingNumber, ltcl.real_loading_number realLoadingNumber,
ltcl.stock_number stockCarsNum,
ltcl.unload_number unloadNumber, ltcl.unload_number unloadNumber,
ltcl.full_load_rate fullLoadRate, ltcl.full_load_rate fullLoadRate,
ltcl.is_customer isCustomer, ltcl.is_customer isCustomer,
@ -560,6 +571,7 @@
<if test="param.warehouseName != null and param.warehouseName != ''"> <if test="param.warehouseName != null and param.warehouseName != ''">
and (Locate(#{param.warehouseName},ltcl.start_warehouse_name) > 0 or Locate(#{param.warehouseName},ltcl.end_warehouse_name) > 0) and (Locate(#{param.warehouseName},ltcl.start_warehouse_name) > 0 or Locate(#{param.warehouseName},ltcl.end_warehouse_name) > 0)
</if> </if>
order by ltcl.create_time desc
</select> </select>
<select id="findZeroListByWarehouseId" resultType="com.logpm.trunkline.vo.ZeroSuppleListVO"> <select id="findZeroListByWarehouseId" resultType="com.logpm.trunkline.vo.ZeroSuppleListVO">
@ -681,13 +693,11 @@
select dpl.brand_name brand,dpl.order_code,dpl.waybill_number, select dpl.brand_name brand,dpl.order_code,dpl.waybill_number,
dpl.send_warehouse_id startWarehouseId,dpl.send_warehouse_name startWarehouseName, dpl.send_warehouse_id startWarehouseId,dpl.send_warehouse_name startWarehouseName,
dpl.accept_warehouse_id endWarehouseId,dpl.accept_warehouse_name endWarehouseName, dpl.accept_warehouse_id endWarehouseId,dpl.accept_warehouse_name endWarehouseName,
group_concat(dpl.order_package_code) packageCode dpl.order_package_code packageCode
from logpm_trunkline_cars_load_scan t from logpm_trunkline_cars_load_scan t
left join logpm_distribution_parcel_list dpl on dpl.order_package_code = t.scan_code and dpl.warehouse_id = #{warehouseId} left join logpm_distribution_parcel_list dpl on dpl.order_package_code = t.scan_code and dpl.warehouse_id = #{warehouseId}
where t.load_id = #{loadId} where t.load_id = #{loadId}
and dpl.id is not null and dpl.id is not null
group by dpl.brand_name,dpl.send_warehouse_id,dpl.send_warehouse_name ,
dpl.accept_warehouse_id ,dpl.accept_warehouse_name ,dpl.order_code,dpl.waybill_number
</select> </select>
<update id="updateWaybillOrderIsCustemer"> <update id="updateWaybillOrderIsCustemer">

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java

@ -185,4 +185,6 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper<TrunklineCarsLoa
List<Long> findAllIdListByLoadIdAndScanStatus(@Param("loadId") Long loadId, @Param("scanStatus") String scanStatus); List<Long> findAllIdListByLoadIdAndScanStatus(@Param("loadId") Long loadId, @Param("scanStatus") String scanStatus);
CustmoerUnloadNumVO findCarsLoadCustomeNumByLoadIdAndUnloadWarehouseId(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId); CustmoerUnloadNumVO findCarsLoadCustomeNumByLoadIdAndUnloadWarehouseId(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
Integer findStockNumByLoadId(@Param("loadId") Long loadId);
} }

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -115,6 +115,12 @@
<if test="param.trayCode != null and param.trayCode != ''"> <if test="param.trayCode != null and param.trayCode != ''">
and Locate(#{param.trayCode},cls.tray_code) > 0 and Locate(#{param.trayCode},cls.tray_code) > 0
</if> </if>
<if test="param.unloadTrayName != null and param.unloadTrayName != ''">
and Locate(#{param.unloadTrayName},cls.unload_tray_name) > 0
</if>
<if test="param.unloadTrayCode != null and param.unloadTrayCode != ''">
and Locate(#{param.unloadTrayCode},cls.unload_tray_code) > 0
</if>
<if test="param.unloadNodeName != null and param.unloadNodeName != ''"> <if test="param.unloadNodeName != null and param.unloadNodeName != ''">
and Locate(#{param.unloadNodeName},cls.unload_node_name) > 0 and Locate(#{param.unloadNodeName},cls.unload_node_name) > 0
</if> </if>
@ -940,6 +946,8 @@
unload_num unloadNum, unload_num unloadNum,
tray_code trayCode, tray_code trayCode,
tray_name trayName, tray_name trayName,
unload_tray_code unloadTrayCode,
unload_tray_name unloadTrayName,
scan_status scanStatus, scan_status scanStatus,
unload_node_name unloadNodeName, unload_node_name unloadNodeName,
order_code orderCode, order_code orderCode,
@ -993,5 +1001,12 @@
and sign_order_id is not null and sign_order_id is not null
</select> </select>
<select id="findStockNumByLoadId" resultType="int">
select IFNULL(sum(num),0)
from logpm_trunkline_cars_load_scan
where load_id = #{loadId}
and scan_status = '1'
</select>
</mapper> </mapper>

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java

@ -100,4 +100,8 @@ public interface ITrunklineAdvanceDetailService extends BaseService<TrunklineAdv
void sendReportIncomingData(Long userId, String nickName, List<TrunklineAdvanceDetailEntity> sendAdvanceDetailEntityList, Long warehouseId, String warehouseName,Integer incomingType); void sendReportIncomingData(Long userId, String nickName, List<TrunklineAdvanceDetailEntity> sendAdvanceDetailEntityList, Long warehouseId, String warehouseName,Integer incomingType);
void sendReportAdvanceOpenData(String nickName, Long userId, Long warehouseId, String warehouseName, List<TrunklineAdvanceDetailEntity> updateAdvanceDetailList, WarehouseWaybillEntity waybillEntity); void sendReportAdvanceOpenData(String nickName, Long userId, Long warehouseId, String warehouseName, List<TrunklineAdvanceDetailEntity> updateAdvanceDetailList, WarehouseWaybillEntity waybillEntity);
void updateWaybillNoByAdvanceIds(List<Long> advanceIds, String waybillNo, Long waybillId);
List<TrunklineAdvanceDetailVO> findListByAdvanceIds(List<Long> advanceIds);
} }

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java

@ -181,4 +181,6 @@ public interface ITrunklineCarsLoadScanService extends BaseService<TrunklineCars
List<Long> findAllIdListByLoadIdAndScanStatus(Long loadId, String scanStatus); List<Long> findAllIdListByLoadIdAndScanStatus(Long loadId, String scanStatus);
CustmoerUnloadNumVO findCarsLoadCustomeNumByLoadIdAndUnloadWarehouseId(Long loadId, Long warehouseId); CustmoerUnloadNumVO findCarsLoadCustomeNumByLoadIdAndUnloadWarehouseId(Long loadId, Long warehouseId);
Integer findStockNumByLoadId(Long loadId);
} }

105
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -23,6 +23,7 @@ import com.logpm.distribution.feign.IDistributionParcelListClient;
import com.logpm.distribution.feign.IDistributionParcelNumberClient; import com.logpm.distribution.feign.IDistributionParcelNumberClient;
import com.logpm.distribution.feign.IDistributionReservationStockarticleClient; import com.logpm.distribution.feign.IDistributionReservationStockarticleClient;
import com.logpm.distribution.feign.IDistributionStockArticleClient; import com.logpm.distribution.feign.IDistributionStockArticleClient;
import com.logpm.distribution.vo.UpdateOrderDTO;
import com.logpm.statistics.feign.IOrderInfoClient; import com.logpm.statistics.feign.IOrderInfoClient;
import com.logpm.trunkline.dto.*; import com.logpm.trunkline.dto.*;
import com.logpm.trunkline.entity.*; import com.logpm.trunkline.entity.*;
@ -262,55 +263,57 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//收货单位-----根据三方商场找到对应的clientId //收货单位-----根据三方商场找到对应的clientId
Long clientId = basicdataTripartiteMallClient.getClientIdByNameAndBrandAndCode(dealerName,StringUtil.isBlank(dealerCode)?"":dealerCode, brand); Long clientId = basicdataTripartiteMallClient.getClientIdByNameAndBrandAndCode(dealerName,StringUtil.isBlank(dealerCode)?"":dealerCode, brand);
BasicdataClientVO basicdataClientEntity = basicdataClientClient.findEntityVoById(clientId); if(!Objects.isNull(clientId)){
if (!Objects.isNull(basicdataClientEntity)) { BasicdataClientVO basicdataClientEntity = basicdataClientClient.findEntityVoById(clientId);
openOrderVO.setConsigneeClientId(clientId); if (!Objects.isNull(basicdataClientEntity)) {
openOrderVO.setConsignee(basicdataClientEntity.getClientName()); openOrderVO.setConsigneeClientId(clientId);
openOrderVO.setConsigneeName(basicdataClientEntity.getLinkman()); openOrderVO.setConsignee(basicdataClientEntity.getClientName());
openOrderVO.setConsigneeMobile(basicdataClientEntity.getPhone()); openOrderVO.setConsigneeName(basicdataClientEntity.getLinkman());
openOrderVO.setConsigneeAddress(basicdataClientEntity.getDetailedly()); openOrderVO.setConsigneeMobile(basicdataClientEntity.getPhone());
openOrderVO.setConsigneeAddress(basicdataClientEntity.getDetailedly());
List<String> destinationArray = new ArrayList<>(); List<String> destinationArray = new ArrayList<>();
String badeRegionAreaId = basicdataClientEntity.getBladeRegionAreaId(); String badeRegionAreaId = basicdataClientEntity.getBladeRegionAreaId();
String bladeRegionProvinceId = basicdataClientEntity.getBladeRegionProvinceId(); String bladeRegionProvinceId = basicdataClientEntity.getBladeRegionProvinceId();
String bladeRegionCityId = basicdataClientEntity.getBladeRegionCityId(); String bladeRegionCityId = basicdataClientEntity.getBladeRegionCityId();
destinationArray.add(bladeRegionProvinceId); destinationArray.add(bladeRegionProvinceId);
destinationArray.add(bladeRegionCityId); destinationArray.add(bladeRegionCityId);
String name = regionFeign.getName(bladeRegionCityId); String name = regionFeign.getName(bladeRegionCityId);
String areaId = bladeRegionCityId; String areaId = bladeRegionCityId;
if (!StringUtil.isBlank(badeRegionAreaId)) { if (!StringUtil.isBlank(badeRegionAreaId)) {
destinationArray.add(badeRegionAreaId); destinationArray.add(badeRegionAreaId);
name = regionFeign.getName(badeRegionAreaId); name = regionFeign.getName(badeRegionAreaId);
areaId = badeRegionAreaId; areaId = badeRegionAreaId;
} }
openOrderVO.setDefaultDeliveryWay("2");
String typeService = "1";
BasicdataStoreBusinessEntity storeBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(clientId, 3);
if(!Objects.isNull(storeBusinessEntity)){
typeService = storeBusinessEntity.getMold();
}
if ("1".equals(typeService)){
openOrderVO.setDefaultDeliveryWay("2"); openOrderVO.setDefaultDeliveryWay("2");
}else if("2".equals(typeService)){ String typeService = "1";
openOrderVO.setDefaultDeliveryWay("3"); BasicdataStoreBusinessEntity storeBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(clientId, 3);
}else if("3".equals(typeService)){ if(!Objects.isNull(storeBusinessEntity)){
openOrderVO.setDefaultDeliveryWay("1"); typeService = storeBusinessEntity.getMold();
} }
if ("1".equals(typeService)){
openOrderVO.setDefaultDeliveryWay("2");
}else if("2".equals(typeService)){
openOrderVO.setDefaultDeliveryWay("3");
}else if("3".equals(typeService)){
openOrderVO.setDefaultDeliveryWay("1");
}
openOrderVO.setDestination(name); openOrderVO.setDestination(name);
openOrderVO.setDestinationCode(areaId); openOrderVO.setDestinationCode(areaId);
openOrderVO.setDestinationArray(destinationArray); openOrderVO.setDestinationArray(destinationArray);
openOrderVO.setDefaultPayWay(basicdataClientEntity.getDefaultPaymentMethods()); openOrderVO.setDefaultPayWay(basicdataClientEntity.getDefaultPaymentMethods());
//查询目的仓数据 //查询目的仓数据
BasicdataStorageServicesEntity basicdataStorageServicesEntity = basicdataStorageServicesClient.findEntityBySendWarehouseIdAndClientId(warehouseId, clientId); BasicdataStorageServicesEntity basicdataStorageServicesEntity = basicdataStorageServicesClient.findEntityBySendWarehouseIdAndClientId(warehouseId, clientId);
if (!Objects.isNull(basicdataStorageServicesEntity)) { if (!Objects.isNull(basicdataStorageServicesEntity)) {
openOrderVO.setDestinationWarehouseId(basicdataStorageServicesEntity.getServeWarehouseId()); openOrderVO.setDestinationWarehouseId(basicdataStorageServicesEntity.getServeWarehouseId());
openOrderVO.setDestinationWarehouseName(basicdataStorageServicesEntity.getServeWarehouseName()); openOrderVO.setDestinationWarehouseName(basicdataStorageServicesEntity.getServeWarehouseName());
}
} }
} }
@ -568,6 +571,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setPickupCompleteOrNot(openOrderDTO.getPickupCompleteOrNot()); waybillEntity.setPickupCompleteOrNot(openOrderDTO.getPickupCompleteOrNot());
waybillEntity.setTrunklineCompleteOrNot(openOrderDTO.getTrunklineCompleteOrNot()); waybillEntity.setTrunklineCompleteOrNot(openOrderDTO.getTrunklineCompleteOrNot());
waybillEntity.setTrunklineVehicleType(openOrderDTO.getTrunklineVehicleType()); waybillEntity.setTrunklineVehicleType(openOrderDTO.getTrunklineVehicleType());
waybillEntity.setTrunklineVehicleTypeId(openOrderDTO.getTrunklineVehicleTypeId());
waybillEntity.setPickupVehicleType(openOrderDTO.getPickupVehicleType()); waybillEntity.setPickupVehicleType(openOrderDTO.getPickupVehicleType());
waybillEntity.setAbolishStatus(0); waybillEntity.setAbolishStatus(0);
waybillEntity.setFreezeStatus(0); waybillEntity.setFreezeStatus(0);
@ -654,12 +658,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillOrderEntity.setHandleNumber(incomingNum); waybillOrderEntity.setHandleNumber(incomingNum);
waybillOrderEntities.add(waybillOrderEntity); waybillOrderEntities.add(waybillOrderEntity);
//更新暂存单包件的运单信息
advanceDetailService.updateWaybillNoByAdvanceId(advanceId, waybillNo, waybillId);
List<TrunklineAdvanceDetailVO> list = advanceDetailService.findList(advanceId);
trunklineWaybillPackageService.saveList(list, waybillEntity);
trunklineWaybillPackageService.updateWaybillStatus(waybillEntity);
distributionParcelListClient.updateEntityByOpenOrder(advanceId, waybillId);
// orderCodes.add(advanceEntity.getOrderCode()); // orderCodes.add(advanceEntity.getOrderCode());
advanceEntity.setWaybillStatus("1"); advanceEntity.setWaybillStatus("1");
advanceEntity.setWaybillNo(waybillNo); advanceEntity.setWaybillNo(waybillNo);
@ -669,6 +667,18 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//修改暂存单的状态为已开单 //修改暂存单的状态为已开单
advanceService.updateBatchById(advanceEntityList); advanceService.updateBatchById(advanceEntityList);
//更新暂存单包件的运单信息
if(CollUtil.isNotEmpty(advanceIds)){
advanceDetailService.updateWaybillNoByAdvanceIds(advanceIds, waybillNo, waybillId);
List<TrunklineAdvanceDetailVO> list = advanceDetailService.findListByAdvanceIds(advanceIds);
trunklineWaybillPackageService.saveList(list, waybillEntity);
UpdateOrderDTO updateOrderDTO = new UpdateOrderDTO();
updateOrderDTO.setAdvanceIds(advanceIds);
updateOrderDTO.setWaybillId(waybillId);
distributionParcelListClient.updateEntityByOpenOrderByAdvanceIds(updateOrderDTO);
}
trunklineWaybillPackageService.updateWaybillStatus(waybillEntity);
//修改暂存单明细的结算品类 //修改暂存单明细的结算品类
List<TrunklineAdvanceDetailEntity> updateAdvanceDetailList = openOrderDTO.getUpdateAdvanceDetailList(); List<TrunklineAdvanceDetailEntity> updateAdvanceDetailList = openOrderDTO.getUpdateAdvanceDetailList();
advanceDetailService.updateBatchById(updateAdvanceDetailList); advanceDetailService.updateBatchById(updateAdvanceDetailList);
@ -746,6 +756,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setPickupCompleteOrNot(openOrderDTO.getPickupCompleteOrNot()); waybillEntity.setPickupCompleteOrNot(openOrderDTO.getPickupCompleteOrNot());
waybillEntity.setTrunklineCompleteOrNot(openOrderDTO.getTrunklineCompleteOrNot()); waybillEntity.setTrunklineCompleteOrNot(openOrderDTO.getTrunklineCompleteOrNot());
waybillEntity.setTrunklineVehicleType(openOrderDTO.getTrunklineVehicleType()); waybillEntity.setTrunklineVehicleType(openOrderDTO.getTrunklineVehicleType());
waybillEntity.setTrunklineVehicleTypeId(openOrderDTO.getTrunklineVehicleTypeId());
waybillEntity.setPickupVehicleType(openOrderDTO.getPickupVehicleType()); waybillEntity.setPickupVehicleType(openOrderDTO.getPickupVehicleType());
waybillEntity.setDepartureWarehouseId(openOrderDTO.getDepartureWarehouseId()); waybillEntity.setDepartureWarehouseId(openOrderDTO.getDepartureWarehouseId());
waybillEntity.setDepartureWarehouseName(openOrderDTO.getDepartureWarehouseName()); waybillEntity.setDepartureWarehouseName(openOrderDTO.getDepartureWarehouseName());

12
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java

@ -216,7 +216,7 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline
String filename = QRCodeUtil.createCodeToFile(vo.getQrCode()); String filename = QRCodeUtil.createCodeToFile(vo.getQrCode());
map.put("img", QRCodeUtil.getEmpAutograph(filename)); map.put("img", QRCodeUtil.getEmpAutograph(filename));
// 订单号 生成二维码 // 订单号 生成二维码
String fileTypeName = QRCodeUtil.createCodeToFile(vo.getQrCode()); String fileTypeName = QRCodeUtil.createCodeToFile(vo.getOrderCode());
map.put("imgType", QRCodeUtil.getEmpAutograph(fileTypeName)); map.put("imgType", QRCodeUtil.getEmpAutograph(fileTypeName));
data.add(map); data.add(map);
String tempData = TemplateUtil.popTemplate(template.getTemplateName(), map, orderPackgeCodeDataVO.getTemplateHtml()); String tempData = TemplateUtil.popTemplate(template.getTemplateName(), map, orderPackgeCodeDataVO.getTemplateHtml());
@ -542,4 +542,14 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline
sendFanoutService.sendFanoutMsg(fanoutMsg); sendFanoutService.sendFanoutMsg(fanoutMsg);
} }
@Override
public void updateWaybillNoByAdvanceIds(List<Long> advanceIds, String waybillNo, Long waybillId) {
baseMapper.updateWaybillNoByAdvanceIds(advanceIds, waybillNo, waybillId);
}
@Override
public List<TrunklineAdvanceDetailVO> findListByAdvanceIds(List<Long> advanceIds) {
return baseMapper.findListByAdvanceIds(advanceIds);
}
} }

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java

@ -830,6 +830,11 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
Long consigneeId = waybillEntity.getConsigneeId(); Long consigneeId = waybillEntity.getConsigneeId();
String consigneeName1= waybillEntity.getConsignee(); String consigneeName1= waybillEntity.getConsignee();
List<TrunklineAdvanceDetailEntity> advanceDetailEntities1 = orderCodeMap.get(orderCode);
//把advanceDetailEntities1中素有所有元素的incomeCategoryName去重并拼接成一个字符串
String incomeCategoryName = advanceDetailEntities1.stream().map(TrunklineAdvanceDetailEntity::getIncomeCategoryName).distinct().collect(Collectors.joining(","));
stockArticleEntity.setDescriptionGoods(incomeCategoryName);
BasicdataClientEntity clientEntity = basicdataClientClient.findByName(consigneeName1); BasicdataClientEntity clientEntity = basicdataClientClient.findByName(consigneeName1);
if(!Objects.isNull(clientEntity)){ if(!Objects.isNull(clientEntity)){
stockArticleEntity.setMallId(clientEntity.getId()); stockArticleEntity.setMallId(clientEntity.getId());

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java

@ -464,4 +464,9 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl<TrunklineC
return baseMapper.findCarsLoadCustomeNumByLoadIdAndUnloadWarehouseId(loadId,warehouseId); return baseMapper.findCarsLoadCustomeNumByLoadIdAndUnloadWarehouseId(loadId,warehouseId);
} }
@Override
public Integer findStockNumByLoadId(Long loadId) {
return baseMapper.findStockNumByLoadId(loadId);
}
} }

53
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -472,15 +472,19 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId);
String warehouseAddress = ""; String warehouseAddress = "";
if (CollUtil.isNotEmpty(brands)) { if (CollUtil.isNotEmpty(brands)) {
for (LoadScanBrandDTO brand : brands) { // 按品牌分组
String packageCode = brand.getPackageCode(); Map<String, List<LoadScanBrandDTO>> brandMap = brands.stream().collect(Collectors.groupingBy(LoadScanBrandDTO::getBrand));
for (Map.Entry<String, List<LoadScanBrandDTO>> entry : brandMap.entrySet()) {
List<LoadScanBrandDTO> value = entry.getValue();
LoadScanBrandDTO brand = value.get(0);
String packageCode = value.stream().map(LoadScanBrandDTO::getPackageCode).collect(Collectors.joining(","));
if (StrUtil.isEmpty(packageCode)) { if (StrUtil.isEmpty(packageCode)) {
continue; continue;
} }
// 发车 // 发车
if (ObjectUtil.equal(type, 1)) { if (ObjectUtil.equal(type, 1)) {
if (ObjectUtil.isEmpty(node)) { if (ObjectUtil.isEmpty(node)) {
if (ObjectUtil.equal(warehouseId, brand.getStartWarehouseId())) { if (ObjectUtil.equal(warehouseId, Long.parseLong(brand.getStartWarehouseId()))) {
node = WorkNodeEnums.INITIAL_WAREHOUSE_DEPART; node = WorkNodeEnums.INITIAL_WAREHOUSE_DEPART;
} else { } else {
node = WorkNodeEnums.TRANSFER_WAREHOUSE_DEPART; node = WorkNodeEnums.TRANSFER_WAREHOUSE_DEPART;
@ -505,7 +509,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
.startWarehouse(brand.getStartWarehouseName()) .startWarehouse(brand.getStartWarehouseName())
.endWarehouse(brand.getEndWarehouseName()) .endWarehouse(brand.getEndWarehouseName())
.content(StrUtil.split(packageCode, ",").stream().map(data->{ .content(StrUtil.split(packageCode, ",").stream().map(data->{
return PushData.builder() return PushData.builder()
.packageCode(data) .packageCode(data)
.warehouseName(warehouseEntity.getName()) .warehouseName(warehouseEntity.getName())
.orderCode(brand.getOrderCode()) .orderCode(brand.getOrderCode())
@ -1481,6 +1485,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadEntity.setPlanLoadingNumber(0); carsLoadEntity.setPlanLoadingNumber(0);
carsLoadEntity.setRealLoadingNumber(0); carsLoadEntity.setRealLoadingNumber(0);
carsLoadEntity.setUnloadNumber(0); carsLoadEntity.setUnloadNumber(0);
carsLoadEntity.setStockNumber(0);
carsLoadEntity.setAbnormalNum(0); carsLoadEntity.setAbnormalNum(0);
carsLoadEntity.setNowWarehouseId(warehouseId); carsLoadEntity.setNowWarehouseId(warehouseId);
carsLoadEntity.setIsSettlement("1"); carsLoadEntity.setIsSettlement("1");
@ -1579,15 +1584,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsLoadLineService.updatePlanLoadingNumberByLoadLineId(planNum, loadLineId); trunklineCarsLoadLineService.updatePlanLoadingNumberByLoadLineId(planNum, loadLineId);
} }
carsLoadEntity.setPlanLoadingNumber(loadPlanNum); carsLoadEntity.setPlanLoadingNumber(loadPlanNum);
updateById(carsLoadEntity); // updateById(carsLoadEntity);
//装车 卸车数量 //装车 卸车数量
Integer realLoadingNum = trunklineCarsLoadScanService.findNumByLoadId(loadId);//配载计划实际装车数量 Integer realLoadingNum = trunklineCarsLoadScanService.findNumByLoadId(loadId);//配载计划实际装车数量
Integer realUnloadingNum = trunklineCarsLoadScanService.findUnloadNumByLoadId(loadId);//配载计划实际卸车数量 Integer realUnloadingNum = trunklineCarsLoadScanService.findUnloadNumByLoadId(loadId);//配载计划实际卸车数量
Integer stockCarNum = trunklineCarsLoadScanService.findStockNumByLoadId(loadId);//配载计划在车件数
Integer abnormalNum = trunklineCarsLoadScanService.findAbnormalNumByLoadId(loadId);//配载计划装车异常数量 Integer abnormalNum = trunklineCarsLoadScanService.findAbnormalNumByLoadId(loadId);//配载计划装车异常数量
// Integer unloadAbnormalNum = trunklineCarsUnloadLogService.findAbnormalNumByLoadId(loadId);//配载计划卸车异常数量 // Integer unloadAbnormalNum = trunklineCarsUnloadLogService.findAbnormalNumByLoadId(loadId);//配载计划卸车异常数量
carsLoadEntity.setRealLoadingNumber(realLoadingNum); carsLoadEntity.setRealLoadingNumber(realLoadingNum);
carsLoadEntity.setUnloadNumber(realUnloadingNum); carsLoadEntity.setUnloadNumber(realUnloadingNum);
carsLoadEntity.setStockNumber(stockCarNum);
carsLoadEntity.setAbnormalNum(abnormalNum); carsLoadEntity.setAbnormalNum(abnormalNum);
updateById(carsLoadEntity); updateById(carsLoadEntity);
@ -4154,7 +4161,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String value = DictBizCache.getValue(DictBizConstant.CARS_LOAD_STATUS, loadStatus); String value = DictBizCache.getValue(DictBizConstant.CARS_LOAD_STATUS, loadStatus);
Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber(); Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber();
Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber(); Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber();
trunklineCarsLoadVO.setRealLoadingNumber(realLoadingNumber - unloadNumber); Integer stockCarsNum = trunklineCarsLoadVO.getStockNumber();
trunklineCarsLoadVO.setRealLoadingNumber(stockCarsNum);
trunklineCarsLoadVO.setLoadStatus(value); trunklineCarsLoadVO.setLoadStatus(value);
} }
pageList.setRecords(records); pageList.setRecords(records);
@ -4941,7 +4949,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
} }
List<HasNotFinalNodeIdDataVO> list = trunklineCarsLoadScanService.findNoFinalNodeData(loadId, warehouseId); List<HasNotFinalNodeIdDataVO> list = trunklineCarsLoadScanService.findNoFinalNodeData(loadId, warehouseId);
if (Objects.isNull(list) || list.size() == 0) { if (Objects.isNull(list) || list.isEmpty()) {
return R.success("未有需要添加目的仓的数据"); return R.success("未有需要添加目的仓的数据");
} else { } else {
return R.data(list); return R.data(list);
@ -7895,7 +7903,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
JSONObject abnormalRecord = abnormalRecordClient.findListByCarsNoAndUpWarehouseId(carsNo, warehouseId); JSONObject abnormalRecord = abnormalRecordClient.findListByCarsNoAndUpWarehouseId(carsNo, warehouseId);
map.put("three", "当前待处理异常 " + abnormalRecord.getInteger("dealwithNum") + " 条、已处理异常 " + abnormalRecord.getInteger("noDealwithNum") + " 条"); if(abnormalRecord != null){
map.put("three", "当前待处理异常 " + abnormalRecord.getInteger("dealwithNum") + " 条、已处理异常 " + abnormalRecord.getInteger("noDealwithNum") + " 条");
}
return R.data(map); return R.data(map);
} }
@ -8124,11 +8135,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String loadStatus = trunklineCarsLoadVO.getLoadStatus(); String loadStatus = trunklineCarsLoadVO.getLoadStatus();
trunklineCarsLoadVO.setLoadStatus(DictBizCache.getValue(DictBizConstant.CARS_LOAD_STATUS, loadStatus)); trunklineCarsLoadVO.setLoadStatus(DictBizCache.getValue(DictBizConstant.CARS_LOAD_STATUS, loadStatus));
int i = realLoadingNumber - unloadNumber; // int i = realLoadingNumber - unloadNumber;
if(i < 0) { // if(i < 0) {
i = 0; // i = 0;
} // }
trunklineCarsLoadVO.setStockCarsNum(i); trunklineCarsLoadVO.setStockCarsNum(carsLoadEntity.getStockNumber());
trunklineCarsLoadVO.setLoadScanOrderList(loadScanOrderList); trunklineCarsLoadVO.setLoadScanOrderList(loadScanOrderList);
trunklineCarsLoadVO.setZeroList(zeroList); trunklineCarsLoadVO.setZeroList(zeroList);
trunklineCarsLoadVO.setExceptionList(exceptionList); trunklineCarsLoadVO.setExceptionList(exceptionList);
@ -8486,7 +8497,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber(); Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber();
Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber(); Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber();
trunklineCarsLoadVO.setRealLoadingNumber(realLoadingNumber - unloadNumber); Integer stockCarNumber = trunklineCarsLoadVO.getStockNumber();
trunklineCarsLoadVO.setRealLoadingNumber(stockCarNumber);
trunklineCarsLoadVO.setTotalLoadingNum(realLoadingNumber); trunklineCarsLoadVO.setTotalLoadingNum(realLoadingNumber);
} }
pageList.setRecords(records); pageList.setRecords(records);
@ -8920,8 +8932,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName()); trunklineCarsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName());
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
trunklineCarsLoadScanEntity.setUnloadTime(new Date()); trunklineCarsLoadScanEntity.setUnloadTime(new Date());
trunklineCarsLoadScanEntity.setUnloadTrayCode(unloadTrayCode); if(isData==1){
trunklineCarsLoadScanEntity.setUnloadTrayName(unloadTrayName); trunklineCarsLoadScanEntity.setUnloadTrayCode(unloadTrayCode);
trunklineCarsLoadScanEntity.setUnloadTrayName(unloadTrayName);
}
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity); trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity);
loadScanId = trunklineCarsLoadScanEntity.getId(); loadScanId = trunklineCarsLoadScanEntity.getId();
@ -9085,6 +9099,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
} else { } else {
String scanStatus = carsLoadScanEntity.getScanStatus(); String scanStatus = carsLoadScanEntity.getScanStatus();
if(!"1".equals(scanStatus)){ if(!"1".equals(scanStatus)){
carsLoadScanEntity.setUnloadTrayCode(unloadTrayCode);
carsLoadScanEntity.setUnloadTrayName(unloadTrayName);
trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
log.warn("##############unloadPackage: 包件已卸车 orderPackageCode={}", orderPackageCode); log.warn("##############unloadPackage: 包件已卸车 orderPackageCode={}", orderPackageCode);
return R.fail(405, "包件已卸车"); return R.fail(405, "包件已卸车");
} }
@ -10623,8 +10640,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
BeanUtil.copy(carsLoadEntity, trunklineCarsLoadVO); BeanUtil.copy(carsLoadEntity, trunklineCarsLoadVO);
Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber(); Integer realLoadingNumber = trunklineCarsLoadVO.getRealLoadingNumber();
Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber(); Integer unloadNumber = trunklineCarsLoadVO.getUnloadNumber();
int stockCarNumber = realLoadingNumber - unloadNumber;
trunklineCarsLoadVO.setUnloadNumber(loadLineEntity.getUnloadNumber()); trunklineCarsLoadVO.setUnloadNumber(loadLineEntity.getUnloadNumber());
trunklineCarsLoadVO.setRealLoadingNumber(realLoadingNumber - unloadNumber); trunklineCarsLoadVO.setRealLoadingNumber(stockCarNumber<0?0:stockCarNumber);
trunklineCarsLoadVO.setUnloadScanOrderList(unloadScanOrderList); trunklineCarsLoadVO.setUnloadScanOrderList(unloadScanOrderList);
trunklineCarsLoadVO.setUnloadZeroList(zeroList); trunklineCarsLoadVO.setUnloadZeroList(zeroList);
trunklineCarsLoadVO.setExceptionList(exceptionList); trunklineCarsLoadVO.setExceptionList(exceptionList);

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java

@ -252,6 +252,7 @@ public class WarehouseWaybillController extends BladeController {
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse(); List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
myWatchWarehouse.forEach(warehouseEntity -> warehouseIds.add(warehouseEntity.getId())); myWatchWarehouse.forEach(warehouseEntity -> warehouseIds.add(warehouseEntity.getId()));
} }
waybillDTO.setWarehouseIds(warehouseIds);
IPage<WarehouseWaybillVO> pages = warehouseWaybillService.pageList(waybillDTO); IPage<WarehouseWaybillVO> pages = warehouseWaybillService.pageList(waybillDTO);

7
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

@ -2974,6 +2974,13 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
} }
for (QuestDetailEntity i : questDetailEntityList) { for (QuestDetailEntity i : questDetailEntityList) {
if (i.getQuestStatus().equals(1)) { if (i.getQuestStatus().equals(1)) {
if (!Objects.isNull(i.getAllocationId())){
BasicdataGoodsAllocationEntity entityByAllocationId = basicdataGoodsAllocationClient.getEntityByAllocationId(Long.parseLong(i.getAllocationId()));
if (Objects.isNull(entityByAllocationId)){
return Resp.scanFail("当前包件在"+entityByAllocationId.getQrCode()+"已盘点!", "当前包件在"+entityByAllocationId.getQrCode()+"已盘点!");
}
}
return Resp.scanFail("当前包件已盘点!", "当前包件已盘点!"); return Resp.scanFail("当前包件已盘点!", "当前包件已盘点!");
} }
} }

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseConfigServiceImpl.java

@ -45,16 +45,15 @@ public class WarehouseConfigServiceImpl extends BaseServiceImpl<WarehouseConfigM
return R.status(this.updateById(warehouseConfigEntity)); return R.status(this.updateById(warehouseConfigEntity));
} }
} else { } else {
BasicdataGoodsAllocationEntity defaultGoodsAllocation = basicdataGoodsAllocationClient.findDefaultGoodsAllocation(warehouseConfigEntity.getWarehouseId());
BasicdataGoodsAllocationEntity goodsAllocationEntity = basicdataGoodsAllocationClient.findEntityByQrCode(warehouseConfigEntity.getWarehouseId(), warehouseConfigEntity.getDefaultAllocation()); BasicdataGoodsAllocationEntity goodsAllocationEntity = basicdataGoodsAllocationClient.findEntityByQrCode(warehouseConfigEntity.getWarehouseId(), warehouseConfigEntity.getDefaultAllocation());
if (Objects.isNull(goodsAllocationEntity)) { if (!Objects.isNull(defaultGoodsAllocation)) {
return R.fail("查询库位信息失败,请输入正确的库位名称!!!"); flag = basicdataGoodsAllocationClient.closeDefaultAllocation(goodsAllocationEntity.getId());
} }
this.updateById(warehouseConfigEntity);
//关闭配置进行默认库位的清理 //关闭配置进行默认库位的清理
flag = basicdataGoodsAllocationClient.closeDefaultAllocation(goodsAllocationEntity.getId());
warehouseConfigEntity.setDefaultAllocation(""); warehouseConfigEntity.setDefaultAllocation("");
this.updateById(warehouseConfigEntity);
return R.status(flag); return R.status(this.updateById(warehouseConfigEntity));
} }
return R.fail("未知错误!!!"); return R.fail("未知错误!!!");

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

@ -435,7 +435,6 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
} else { } else {
//进行打托操作 //进行打托操作
BasicdataTrayEntity basicdataTray = basicdataTrayClient.findByTrayName(warehousingDetail.getTrayName()); BasicdataTrayEntity basicdataTray = basicdataTrayClient.findByTrayName(warehousingDetail.getTrayName());
List<NoDataStockListDTO> noDataStockListDTOS = new ArrayList<>(); List<NoDataStockListDTO> noDataStockListDTOS = new ArrayList<>();
NoDataStockListDTO noDataStockListDTO = new NoDataStockListDTO(); NoDataStockListDTO noDataStockListDTO = new NoDataStockListDTO();
noDataStockListDTO.setMarketId(entity.getMarketId()); noDataStockListDTO.setMarketId(entity.getMarketId());

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -912,7 +912,7 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
map.put("备注", warehouseWaybillEntity.getRemark()); map.put("备注", warehouseWaybillEntity.getRemark());
map.put("填票人", warehouseWaybillEntity.getAgent()); map.put("填票人", warehouseWaybillEntity.getAgent());
map.put("托运日期", DateUtil.format(warehouseWaybillEntity.getCreateTime(),"yyyy-MM-dd hh:mm:ss")); map.put("托运日期", DateUtil.format(warehouseWaybillEntity.getCreateTime(),"yyyy-MM-dd"));
// 格式化费用 保留2位小数 // 格式化费用 保留2位小数
map.put("运费总计", formatToTwoDecimalPlaces(sumFreight(warehouseWaybillEntity))); map.put("运费总计", formatToTwoDecimalPlaces(sumFreight(warehouseWaybillEntity)));

Loading…
Cancel
Save