Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev-pushdata-important
Diss 1 year ago
parent
commit
cda46c2179
  1. 1
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataCarrierEntity.java
  2. 1
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataVehicleEntity.java
  3. 8
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java
  4. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java
  5. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  6. 6
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java
  7. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataCodeClient.java
  8. 22
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  9. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java
  10. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java
  11. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionBillLadingDTO.java
  12. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  13. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.xml
  14. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  15. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  16. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  17. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  18. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  19. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  20. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java
  21. 24
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  22. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java
  23. 78
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  24. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
  25. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDisStockListDetailService.java
  26. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  27. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  28. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
  29. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  30. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
  31. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillLadingService.java
  32. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DisStockListDetailServiceImpl.java
  33. 138
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  34. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  35. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  36. 31
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  37. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java
  38. 33
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  39. 640
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  40. 5
      blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java
  41. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java
  42. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  43. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
  44. 43
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  45. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java
  46. 30
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  47. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml
  48. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java
  49. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

1
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataCarrierEntity.java

@ -208,4 +208,5 @@ public class BasicdataCarrierEntity extends TenantEntity {
@ApiModelProperty(value = "预留5") @ApiModelProperty(value = "预留5")
private String reserve5; private String reserve5;
} }

1
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataVehicleEntity.java

@ -319,4 +319,5 @@ public class BasicdataVehicleEntity extends TenantEntity {
@ApiModelProperty(value = "预留5") @ApiModelProperty(value = "预留5")
private String reserve5; private String reserve5;
} }

8
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java

@ -80,4 +80,12 @@ public interface IBasicdataClientClient {
@GetMapping(API_PREFIX+"/findListByClientName") @GetMapping(API_PREFIX+"/findListByClientName")
List<JSONObject> findListByClientName(@RequestParam String clientName); List<JSONObject> findListByClientName(@RequestParam String clientName);
/**
* 根据Id查询客户
* @param mallId
* @return
*/
@GetMapping(API_PREFIX+"/getMallById")
BasicdataClientEntity getMallById(Long mallId);
} }

5
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java

@ -60,6 +60,11 @@ public class DistributionAppDeliveryListVO extends DistributionDeliveryListEntit
*/ */
@ApiModelProperty(value = "完成装车客户数") @ApiModelProperty(value = "完成装车客户数")
private Integer loadCusNub; private Integer loadCusNub;
/**
* 装车客户数
*/
@ApiModelProperty(value = "装车件数")
private Integer scannedNumber;
/** /**
* 配车状态 * 配车状态

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

@ -274,7 +274,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
//查询客服岗位 //查询客服岗位
List<DictBiz> numberRules = DictBizCache.getList("work_order_number_rules"); List<DictBiz> numberRules = DictBizCache.getList("work_order_number_rules");
SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
if (numberRules.isEmpty()) { if (ObjectUtils.isNull(numberRules) || numberRules.isEmpty()) {
log.info("注意,注意!工单号字典未配置!请配置!"); log.info("注意,注意!工单号字典未配置!请配置!");
} else { } else {
Optional<DictBiz> first2 = pcWorkOrder.stream().filter(i -> i.getDictKey().equals(workOrderType)).findFirst(); Optional<DictBiz> first2 = pcWorkOrder.stream().filter(i -> i.getDictKey().equals(workOrderType)).findFirst();

6
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java

@ -114,4 +114,10 @@ public class BasicdataClientClient implements IBasicdataClientClient {
return basicdataClientService.findListByClientName(clientName); return basicdataClientService.findListByClientName(clientName);
} }
@Override
@GetMapping(API_PREFIX+"/getMallById")
public BasicdataClientEntity getMallById(Long mallId) {
return basicdataClientService.getById(mallId);
}
} }

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataCodeClient.java

@ -1,5 +1,6 @@
package com.logpm.basicdata.feign; package com.logpm.basicdata.feign;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import com.logpm.basicdata.service.IBasicdataCodeService; import com.logpm.basicdata.service.IBasicdataCodeService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -16,4 +17,5 @@ public class BasicdataCodeClient implements IBasicdataCodeClient {
public String getCodeByType(Integer type,String warehouseCode,String orderCode) { public String getCodeByType(Integer type,String warehouseCode,String orderCode) {
return basicdataCodeService.getCodeByType(type,warehouseCode,orderCode); return basicdataCodeService.getCodeByType(type,warehouseCode,orderCode);
} }
} }

22
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -482,4 +482,26 @@ public class DistributionDeliveryListController extends BladeController {
R r = distributionSignforService.signforInPC(distrilbutionloadingscanDTO); R r = distributionSignforService.signforInPC(distrilbutionloadingscanDTO);
return r; return r;
} }
@PostMapping("/cancelDelivery")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "PC签收包件")
public R cancelDelivery(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
R r = distributionDeliveryListService.cancelDelivery(distrilbutionloadingscanDTO.getDeliveryId());
if (r.isSuccess()){
//取消成功,维护配送单状态和数量
distributionDeliveryListService.maintenanceDeliveryNum(distrilbutionloadingscanDTO.getDeliveryId());
distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId());
}
return r;
}
} }

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java

@ -31,6 +31,7 @@ import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.excel.DistributionSignforExcel; import com.logpm.distribution.excel.DistributionSignforExcel;
import com.logpm.distribution.excel.DistributionSignforOwnExcel; import com.logpm.distribution.excel.DistributionSignforOwnExcel;
import com.logpm.distribution.service.IDistributionAsyncService; import com.logpm.distribution.service.IDistributionAsyncService;
import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.service.IDistributionReservationService; import com.logpm.distribution.service.IDistributionReservationService;
import com.logpm.distribution.service.IDistributionSignforService; import com.logpm.distribution.service.IDistributionSignforService;
import com.logpm.distribution.service.impl.DistributionAddvalueServiceImpl; import com.logpm.distribution.service.impl.DistributionAddvalueServiceImpl;
@ -85,6 +86,8 @@ public class DistributionSignforController extends BladeController {
private final IDistributionAsyncService distributionAsyncService; private final IDistributionAsyncService distributionAsyncService;
private final IDistributionDeliveryListService distributionDeliveryListService;
/** /**
* 签收管理 详情 * 签收管理 详情
*/ */
@ -306,8 +309,11 @@ public class DistributionSignforController extends BladeController {
@ApiOperation(value = "修改", notes = "传入distributionSignfor") @ApiOperation(value = "修改", notes = "传入distributionSignfor")
public R update(@Valid @RequestBody DistributionSignforDTO distributionSignfor) { public R update(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
R r= distributionSignforService.recheck(distributionSignfor.getId()); R r= distributionSignforService.recheck(distributionSignfor);
if (r.isSuccess()){
//维护配送状态
distributionDeliveryListService.maintenanceDeliveryInfo(distributionSignfor.getDeliveryId());
}
// return R.status(distributionSignforService.updateById(distributionSignfor)); // return R.status(distributionSignforService.updateById(distributionSignfor));
return r; return r;
} }

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

@ -275,6 +275,13 @@ public class DistrilbutionBillLadingController extends BladeController {
return R.status(distrilbutionBillLadingService.ownSaveOrUpdate(distrilbutionBillLading)); return R.status(distrilbutionBillLadingService.ownSaveOrUpdate(distrilbutionBillLading));
} }
@PostMapping("/cancelBillLoding")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "批量取消自提单", notes = "传入distrilbutionBillLading")
public R cancelBillLoding(@Valid @RequestBody DistrilbutionBillLadingDTO distrilbutionBillLadingDTO) {
return distrilbutionBillLadingService.cancelBillLoding(distrilbutionBillLadingDTO.getBillLodingIds());
}
/** /**

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionBillLadingDTO.java

@ -42,6 +42,11 @@ public class DistrilbutionBillLadingDTO extends DistrilbutionBillLadingEntity {
* *
*/ */
private String name; private String name;
/**
*
*/
private String billLodingIds;
/** /**
* 提货批次 * 提货批次
*/ */

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -210,7 +210,7 @@
left JOIN logpm_distribution_signfor lds on lddl.id = lds.delivery_id left JOIN logpm_distribution_signfor lds on lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation ldr on ldr.id = lds.reservation_id LEFT JOIN logpm_distribution_reservation ldr on ldr.id = lds.reservation_id
<where> <where>
lddl.is_deleted = 0 AND (IF(lddl.delivery_number is null ,0,lddl.delivery_number) + IF(lddl.inventory_nub is null ,0,lddl.inventory_nub)) > 0 lddl.is_deleted = 0 AND (IF(lddl.delivery_number is null ,0,lddl.delivery_number) + IF(lddl.inventory_nub is null ,0,lddl.inventory_nub)) > 0 AND lddl.customers_number > 0
<if test="param.trainNumber != null and param.trainNumber!=''"> <if test="param.trainNumber != null and param.trainNumber!=''">
and lddl.train_number like concat('%',#{param.trainNumber},'%') and lddl.train_number like concat('%',#{param.trainNumber},'%')
</if> </if>
@ -757,7 +757,7 @@
logpm_distribution_delivery_list lddl logpm_distribution_delivery_list lddl
left join logpm_distribution_delivery_self ldds on lddl.id =ldds.delivery_id left join logpm_distribution_delivery_self ldds on lddl.id =ldds.delivery_id
<where> <where>
lddl.is_deleted =0 and lddl.warehouse_id =#{warehouseId} lddl.is_deleted =0 and lddl.customers_number > 0 and lddl.warehouse_id =#{warehouseId}
<if test=" param.type != null and param.type != ''">and lddl.type = #{param.type}</if> <if test=" param.type != null and param.type != ''">and lddl.type = #{param.type}</if>
<if test="array != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(array)"> <if test="array != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(array)">
and lddl.id in and lddl.id in
@ -1171,6 +1171,7 @@
logpm_distribution_signfor lds logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id JOIN logpm_distribution_reservation ldr ON lds.reservation_id = ldr.id
<where> <where>
ldr.reservation_status != 40
<if test="deliveryListId != null and deliveryListId != ''"> <if test="deliveryListId != null and deliveryListId != ''">
and lds.delivery_id = #{deliveryListId} and lds.delivery_id = #{deliveryListId}
</if> </if>

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.xml

@ -256,9 +256,6 @@
</select> </select>
<select id="getLoadCountNum" resultType="int"> <select id="getLoadCountNum" resultType="int">
SELECT SELECT
count( ldl.id ) count( ldl.id )
FROM FROM
@ -268,8 +265,6 @@
ldl.is_deleted = 0 ldl.is_deleted = 0
AND ldl.delivery_id = #{deliveryId} AND ldl.delivery_id = #{deliveryId}
AND ldl.scan_status != '1' AND ldl.scan_status != '1'
AND ldl.is_abnormal_loading = 1
</select> </select>
<select id="selectLoadingNumByReservationId" resultType="java.lang.Integer"> <select id="selectLoadingNumByReservationId" resultType="java.lang.Integer">
SELECT (IF((SELECT sum(loaded_nub) FROM logpm_distribution_loadscan WHERE reservation_id = #{reservationId} AND scan_state != 1 AND is_abnormal_loading != 2) is null,0,(SELECT sum(loaded_nub) FROM logpm_distribution_loadscan WHERE reservation_id = #{reservationId} AND scan_state != 1 AND is_abnormal_loading != 2))) SELECT (IF((SELECT sum(loaded_nub) FROM logpm_distribution_loadscan WHERE reservation_id = #{reservationId} AND scan_state != 1 AND is_abnormal_loading != 2) is null,0,(SELECT sum(loaded_nub) FROM logpm_distribution_loadscan WHERE reservation_id = #{reservationId} AND scan_state != 1 AND is_abnormal_loading != 2)))

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

@ -171,4 +171,11 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
List<Map<String, Integer>> selectAllErrorReservationOrder(); List<Map<String, Integer>> selectAllErrorReservationOrder();
List<DistributionParcelListEntity> findByWaybillNumber(@Param("waybillNumber") String waybillNumber); List<DistributionParcelListEntity> findByWaybillNumber(@Param("waybillNumber") String waybillNumber);
/**
* 还原包件状态 -- 未出库
* @param packageIds
* @return
*/
Integer restorePakcageByIds(@Param("packageIds")List<Long> packageIds);
} }

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -1073,6 +1073,12 @@
where order_code = #{orderCode} where order_code = #{orderCode}
and warehouse_id = #{warehouseId} and warehouse_id = #{warehouseId}
</update> </update>
<update id="restorePakcageByIds">
UPDATE logpm_distribution_parcel_list SET order_package_status = 20,order_package_reservation_status = 10,order_package_loading_status = 10 WHERE id IN
<foreach collection="packageIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</update>
<select id="selectAllErrorReservationOrder"> <select id="selectAllErrorReservationOrder">
SELECT reservation_id,COUNT(1) as num from ( SELECT reservation_id,COUNT(1) as num from (

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java

@ -70,8 +70,7 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
List<DistributionStockupOrderListVO> selectStockupOrderList(@Param("reservationId")Long reservationId,@Param("isZero") String isZero); List<DistributionStockupOrderListVO> selectStockupOrderList(@Param("reservationId")Long reservationId,@Param("isZero") String isZero);
List<DistributionStockupStockListVO> selectStockupStockList(@Param("reservationId")Long reservationId); List<DistributionStockupStockListVO> selectStockupStockList(@Param("reservationId")Long reservationId);
List<DistributionStockupStockListVO> selectStockupStockListNew(@Param("reservationId")Long reservationId,@Param("warehouseId") Long warehouseId); List<DistributionStockupStockListVO> selectStockupStockListNew(@Param("reservationId")Long reservationId,@Param("warehouseId")Long warehouseId,@Param("mallName")String mallName);
Integer selectOrderNumByReservationId(@Param("reservationId")Long reservationId); Integer selectOrderNumByReservationId(@Param("reservationId")Long reservationId);
Integer selectPlanNum(@Param("reservationId")Long reservationId); Integer selectPlanNum(@Param("reservationId")Long reservationId);
@ -119,8 +118,8 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
/** /**
* 查询预约单下指定订单包件列表 * 查询预约单下指定订单包件列表
* @param id * @param orderIds
* @param id1 * @param param
* @return * @return
*/ */
IPage<DistributionParcelListEntity> getReservationPackage(IPage<DistributionParcelListEntity> page,@Param("orderIds") List<Long> orderIds,@Param("param")Map<String,Object> param); IPage<DistributionParcelListEntity> getReservationPackage(IPage<DistributionParcelListEntity> page,@Param("orderIds") List<Long> orderIds,@Param("param")Map<String,Object> param);
@ -133,8 +132,8 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
/** /**
* 通过预约和订单查询预约订单中间表 * 通过预约和订单查询预约订单中间表
* @param id * @param reservationId
* @param id1 * @param warehourseId
* @return * @return
*/ */
List<DistributionParcelListEntity> selectPackageByReservationAndStockArticle(@Param("reservationId") Long reservationId,@Param("stockArticleId") Long stockArticleId,@Param("warehourseId") Long warehourseId); List<DistributionParcelListEntity> selectPackageByReservationAndStockArticle(@Param("reservationId") Long reservationId,@Param("stockArticleId") Long stockArticleId,@Param("warehourseId") Long warehourseId);

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -335,10 +335,12 @@
LEFT JOIN logpm_distribution_stock_list ldsl ON ldrs.stocklist_id = ldsl.id LEFT JOIN logpm_distribution_stock_list ldsl ON ldrs.stocklist_id = ldsl.id
WHERE WHERE
ldrs.reservation_id = #{reservationId} ldrs.reservation_id = #{reservationId}
AND ldsl.market_name = #{mallName}
group by ldsl.cargo_number group by ldsl.cargo_number
) t ) t
LEFT JOIN logpm_distribution_stock_list ldslNew ON t.cargo_number = ldslNew.cargo_number LEFT JOIN logpm_distribution_stock_list ldslNew ON t.cargo_number = ldslNew.cargo_number
LEFT JOIN logpm_distribution_stock ldss ON ldss.stock_list_id = t.id where ldslNew.is_deleted = 0 LEFT JOIN logpm_distribution_stock ldss ON ldss.stock_list_id = t.id
where ldslNew.is_deleted = 0
<!-- SELECT--> <!-- SELECT-->
<!-- ldsl.sku AS sku,--> <!-- ldsl.sku AS sku,-->
@ -1156,6 +1158,7 @@
ldsa.order_code, ldsa.order_code,
ldrs.is_have_data, ldrs.is_have_data,
ldsa.id AS id, ldsa.id AS id,
ldsa.waybill_number AS waybillNumber,
ldrs.is_zero ldrs.is_zero
FROM FROM
logpm_distribution_reservation AS lds logpm_distribution_reservation AS lds

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

@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionSignforDTO; import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.excel.DistributionSignforExcel; import com.logpm.distribution.excel.DistributionSignforExcel;
import com.logpm.distribution.vo.*; import com.logpm.distribution.vo.*;
@ -313,4 +314,10 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return * @return
*/ */
List<DistributionAppPackageDetailVO> signingPackageDetail(@Param("reservationId") Long reservationId); List<DistributionAppPackageDetailVO> signingPackageDetail(@Param("reservationId") Long reservationId);
/**
* 查询配送单关联预约
* @param deliveryId
*/
List<DistributionReservationEntity> selectReservationByDeliveryId(Long deliveryId);
} }

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -349,7 +349,7 @@
JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id
<where> <where>
lds.is_deleted = 0 and ldr.is_deleted = 0 and lddl.is_deleted = 0 lds.is_deleted = 0 and ldr.is_deleted = 0 and lddl.is_deleted = 0 AND (ldr.reservation_num + ldr.reservation_stock_list_num) > 0
<if test="param.mallName != null and param.mallName!=''"> <if test="param.mallName != null and param.mallName!=''">
and ldr.mall_name like concat('%',#{param.mallName},'%') and ldr.mall_name like concat('%',#{param.mallName},'%')
</if> </if>
@ -1279,4 +1279,11 @@
ldr.id = #{reservationId} ldr.id = #{reservationId}
</select> </select>
<select id="selectReservationByDeliveryId">
SELECT ldr.* FROM logpm_distribution_signfor AS lds LEFT JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id
WHERE lds.delivery_id = #{deliveryId}
AND ldr.reservation_status != 40
AND ldr.is_deleted = 0
AND lds.is_deleted = 0
</select>
</mapper> </mapper>

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

@ -152,4 +152,6 @@ public interface DistributionStockListMapper extends BaseMapper<DistributionStoc
List<DistributionMerchantStockListVO> selectMerchantHaveDataStockListInfo(@Param("stockListId") Long stockListId); List<DistributionMerchantStockListVO> selectMerchantHaveDataStockListInfo(@Param("stockListId") Long stockListId);
List<DistributionMerchantStockListVO> selectMerchantNotHaveDataStockListInfo(@Param("stockListId")Long id); List<DistributionMerchantStockListVO> selectMerchantNotHaveDataStockListInfo(@Param("stockListId")Long id);
IPage<DistributionStockListAllocationVO> listAllocationOrder(IPage<Object> page, @Param("param") DistributionStockListEntity distributionStockListEntity);
} }

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

@ -387,6 +387,30 @@
</select> </select>
<select id="listAllocationOrder" resultType="com.logpm.distribution.vo.DistributionStockListAllocationVO">
select lwug.position_code allocationTitle,
lwug.allocation_id,
ldsi.market_name marketName,
sum(lwug.num) num,
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_distribution_stock_list_info ldsli on ldsli.material_id = ldsi.material_id AND ldsli.warehouse_id = ldsi.warehouse_id
AND ldsi.market_id = ldsli.market_id and ldsli.incoming_batch = ldsi.incoming_batch
LEFT JOIN logpm_warehouse_updown_goods lwug ON ldsli.parcel_list_id = lwug.association_id and lwug.association_type = '3'
<where>
<if test="param.id != null "> and ldsi.id = #{param.id}</if>
</where>
group by lwug.allocation_id
</select>
<select id="selectAllStockList" resultType="com.logpm.distribution.vo.DistributionStockListVO"> <select id="selectAllStockList" resultType="com.logpm.distribution.vo.DistributionStockListVO">
SELECT SELECT
ldsl.tenant_id, ldsl.tenant_id,

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

@ -19,8 +19,12 @@ package com.logpm.distribution.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper; 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.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.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.*;
@ -91,4 +95,21 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper<DistrilbutionB
List<DistrilbutionBillLadingVO> exportDistributionBillLading(@Param("param") Map<String, Object> param, @Param("idArr") List<String> idArr); List<DistrilbutionBillLadingVO> exportDistributionBillLading(@Param("param") Map<String, Object> param, @Param("idArr") List<String> idArr);
/**
* 取消订制品包件
* @param billLodingIds
* @return
*/
Integer cancelBillLadingPackage(@Param("ids")List<Long> ids);
/**
* 查询自提单关联包件
* @param billLodingIds
* @return
*/
List<DistributionParcelListEntity> selectBillLadingPackage(@Param("ids")List<Long> ids);
List<DistributionDeliveryDetailsEntity> selectBillLadingInventory(@Param("ids")List<Long> ids);
} }

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

@ -25,6 +25,12 @@
<result column="certificate_type" property="certificateType"/> <result column="certificate_type" property="certificateType"/>
<result column="total_cost" property="totalCost"/> <result column="total_cost" property="totalCost"/>
</resultMap> </resultMap>
<update id="cancelBillLadingPackage">
UPDATE logpm_distrilbution_bill_package SET packet_bar_status = 3 WHERE bill_lading_id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<select id="pageList" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO"> <select id="pageList" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO">
select dbl.id,GROUP_CONCAT(DISTINCT dsa.service_number) serviceNumber,GROUP_CONCAT(DISTINCT dsa.waybill_number) waybillNumber,GROUP_CONCAT(DISTINCT dsa.consignee_unit) select dbl.id,GROUP_CONCAT(DISTINCT dsa.service_number) serviceNumber,GROUP_CONCAT(DISTINCT dsa.waybill_number) waybillNumber,GROUP_CONCAT(DISTINCT dsa.consignee_unit)
@ -121,40 +127,35 @@
</select> </select>
<select id="exportDistributionBillLading" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO"> <select id="exportDistributionBillLading" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO">
select dbl.id, SELECT
dsa.service_number serviceNumber, dbl.id,
dsa.waybill_number waybillNumber, dsa.service_number AS serviceNumber,
dsa.consignee_unit consigneeUnit, dsa.waybill_number AS waybillNumber,
dsa.customer_name customerName, dsa.consignee_unit AS consigneeUnit,
dsa.customer_telephone customerTelephone, dsa.customer_name AS customerName,
dsa.customer_telephone AS customerTelephone,
dsa.warehouse, dsa.warehouse,
dsa.warehouse_entry_time warehouseEntryTime, dsa.warehouse_entry_time AS warehouseEntryTime,
dsa.storage_fee storageFee, dsa.storage_fee AS storageFee,
dsa.total_number totalNumber, (count(DISTINCT ldbp.id,0)+count(DISTINCT lddd.quantity,0)) AS totalNumber,
dbl.certificate_type certificateType, dbl.certificate_type AS certificateType,
dsa.brand, dsa.brand,
dsa.type_service typeService, dsa.type_service AS typeService,
dbl.pick_up_time pickUpTime, dbl.pick_up_time AS pickUpTime,
dbl.consignee, dbl.consignee,
dbl.delivery_document deliveryDocument, dbl.delivery_document AS deliveryDocument,
dbl.conditions, dbl.conditions,
dbl.total_cost totalCost, dbl.total_cost AS totalCost,
dbl.pick_up_plate pickUpPlate, dbl.pick_up_plate AS pickUpPlate,
dbl.pickup_batch pickupBatch, dbl.pickup_batch AS pickupBatch,
( count(DISTINCT ldbls.id ) AS stopNum
select COUNT(lds.id) FROM
from logpm_distribution_delivery_details lddd logpm_distrilbution_bill_lading dbl
LEFT JOIN logpm_distribution_stock lds on lds.stock_list_id = lddd.stock_list_id LEFT JOIN logpm_distrilbution_bill_stock AS ldbs ON ldbs.bill_lading_id = dbl.id AND ldbs.order_status != 3
where lddd.bill_lading_id = dbl.id LEFT JOIN logpm_distribution_stock_article dsa ON ldbs.stock_article_id = dsa.id
) + ( LEFT JOIN logpm_distrilbution_bill_package AS ldbp ON ldbp.stock_article_id = dsa.id AND ldbp.bill_lading_id = dbl.id AND ldbp.packet_bar_status != 3
select COUNT(lds.id) LEFT JOIN logpm_distribution_delivery_details AS lddd ON lddd.bill_lading_id = dbl.id AND lddd.inventory_status != 3
from logpm_distrilbution_bill_stock ldbs LEFT JOIN logpm_distribution_bill_lading_scan ldbls ON ldbls.bill_lading_id = dbl.id
LEFT JOIN logpm_distribution_stock lds on lds.stock_article = ldbs.stock_article_id
where ldbs.bill_lading_id = dbl.id
) stopNum
from logpm_distrilbution_bill_lading dbl
LEFT JOIN logpm_distribution_stock_article dsa
on dbl.stock_article_id = dsa.id
<where> <where>
dbl.is_deleted = 0 dbl.is_deleted = 0
<if test="param.serviceNumber != null and param.serviceNumber != ''"> <if test="param.serviceNumber != null and param.serviceNumber != ''">
@ -219,6 +220,7 @@
</if> </if>
</where> </where>
GROUP BY dbl.id
</select> </select>
<select id="selectDistrilbutionBillLadingPage" resultMap="distrilbutionBillLadingResultMap"> <select id="selectDistrilbutionBillLadingPage" resultMap="distrilbutionBillLadingResultMap">
@ -453,5 +455,21 @@
LEFT JOIN logpm_distribution_stockup_info ldsi on dbl.id = ldsi.reservation_id and ldsi.stock_up_type = #{distrilbutionBillLading.stockupType} LEFT JOIN logpm_distribution_stockup_info ldsi on dbl.id = ldsi.reservation_id and ldsi.stock_up_type = #{distrilbutionBillLading.stockupType}
where ldsi.stockup_id = #{distrilbutionBillLading.id}; where ldsi.stockup_id = #{distrilbutionBillLading.id};
</select> </select>
<select id="selectBillLadingPackage"
resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
SELECT ldpl.* FROM logpm_distrilbution_bill_package AS ldbp LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldbp.parce_list_id = ldpl.id
WHERE packet_bar_status != '3' AND bill_lading_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectBillLadingInventory"
resultType="com.logpm.distribution.entity.DistributionDeliveryDetailsEntity">
SELECT * FROM logpm_distribution_delivery_details WHERE inventory_status != '3' AND bill_lading_id IN
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper> </mapper>

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

@ -123,6 +123,7 @@
CASE CASE
WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3)) = 0 THEN 20 WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3)) = 0 THEN 20
WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3)) > 0 THEN 10 WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3)) > 0 THEN 10
WHEN (SELECT COUNT(id) FROM logpm_distribution_bill_lading_scan WHERE stock_article_id = ldsa.id) - (SELECT COUNT(id) FROM logpm_distrilbution_bill_package WHERE stock_article_id = ldsa.id AND packet_bar_status IN (1,3)) &lt; 0 THEN 30
END AS conditions, END AS conditions,
(select GROUP_CONCAT(DISTINCT ldpl.material_name ) (select GROUP_CONCAT(DISTINCT ldpl.material_name )
from logpm_distribution_parcel_list ldpl from logpm_distribution_parcel_list ldpl

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

@ -68,4 +68,10 @@ public interface IDisStockListDetailService extends BaseService<DisStockListDeta
*/ */
OrderPackgeCodeDataVO getPrintDetail(Map<String, Object> disStockListDetail) throws Exception; OrderPackgeCodeDataVO getPrintDetail(Map<String, Object> disStockListDetail) throws Exception;
/**
* 取消库存品包件信息
* @param stockListId
* @param billLadingId
*/
void cancelInventoryPackageByReservationIdAnStockListId(Long stockListId, Long billLadingId);
} }

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java

@ -25,6 +25,7 @@ import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO; import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.DistributionDeliveryListEntity; import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.excel.DistributionDeliveryListExcel; import com.logpm.distribution.excel.DistributionDeliveryListExcel;
import com.logpm.distribution.vo.*; import com.logpm.distribution.vo.*;
@ -405,6 +406,19 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
*/ */
void maintenanceDeliveryNum(Long deliveryId); void maintenanceDeliveryNum(Long deliveryId);
/**
* 取消配送任务
* @param deliveryId
*/
R cancelDelivery(Long deliveryId);
/**
* 查询配送任务下异常包件信息
* @param deliveryId
* @return
*/
List<DistributionLoadscanEntity> selectAbnormalLoadingBydeliveryId(Long deliveryId);
/** /**
* 查询签收预约客户包件信息 * 查询签收预约客户包件信息

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

@ -180,4 +180,10 @@ public interface IDistributionParcelListService extends BaseService<Distribution
*/ */
List<DistributionParcelListEntity> findByWaybillNumber(String waybillId); List<DistributionParcelListEntity> findByWaybillNumber(String waybillId);
/**
* 批量还原包件状态
* @param packageIds
* @return
*/
Integer restorePakcageByIds(List<Long> packageIds);
} }

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

@ -173,7 +173,7 @@ public interface IDistributionReservationService extends BaseService<Distributio
List<DistributionStockupOrderListVO> selectStockupOrderList(Long reservationId,String isZero); List<DistributionStockupOrderListVO> selectStockupOrderList(Long reservationId,String isZero);
List<DistributionStockupStockListVO> selectStockupStockList(Long reservationId,Long warehouseId); List<DistributionStockupStockListVO> selectStockupStockList(Long reservationId,Long warehouseId,String mallName);
Integer selectOrderNumByReservationId(Long reservationId); Integer selectOrderNumByReservationId(Long reservationId);

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java

@ -22,6 +22,7 @@ import com.logpm.distribution.dto.DistributionAddvalueDTO;
import com.logpm.distribution.dto.DistributionSignforDTO; import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.dto.DistrilbutionAppsignforDTO; import com.logpm.distribution.dto.DistrilbutionAppsignforDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO; import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.entity.DistributionSignPrintEntity; import com.logpm.distribution.entity.DistributionSignPrintEntity;
import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.excel.DistributionSignforExcel; import com.logpm.distribution.excel.DistributionSignforExcel;
@ -244,7 +245,7 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
* 推送签收信息到工厂 * 推送签收信息到工厂
* @param id * @param id
*/ */
R recheck(Long id); R recheck(DistributionSignforDTO distributionSignforDTO);
/** /**
* 查询是否可以进行复核签收 * 查询是否可以进行复核签收
@ -275,4 +276,11 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
R signingPackageDetail(Long reservationId); R signingPackageDetail(Long reservationId);
/**
* 查询配送关联预约单
* @param deliveryId
* @return
*/
List<DistributionReservationEntity> selectReservationByDeliveryId(Long deliveryId);
} }

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

@ -182,6 +182,12 @@ public interface IDistributionStockListService extends BaseService<DistributionS
*/ */
List<DistributionMerchantStockListVO> getMerchantStockList(String materielCode); List<DistributionMerchantStockListVO> getMerchantStockList(String materielCode);
/**
* 维护库存品的占用数量
* @param stockListId
* @param quantity
*/
void updateInventoryQuantityOccupied(Long stockListId, Integer quantity);
// /** // /**

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

@ -214,4 +214,11 @@ public interface IDistrilbutionBillLadingService extends BaseService<Distrilbuti
R getReceivedImage(BillLadingAppDTO billLadingAppDTO); R getReceivedImage(BillLadingAppDTO billLadingAppDTO);
boolean signImages(DistrilbutionBillLadingDTO distrilbutionBillLading); boolean signImages(DistrilbutionBillLadingDTO distrilbutionBillLading);
/**
* 批量取消自提单
* @param billLodingIds
* @return
*/
R cancelBillLoding(String billLodingIds);
} }

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DisStockListDetailServiceImpl.java

@ -20,6 +20,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
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.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -248,6 +249,15 @@ public class DisStockListDetailServiceImpl extends BaseServiceImpl<DisStockListD
} }
} }
@Override
public void cancelInventoryPackageByReservationIdAnStockListId(Long stockListId, Long billLadingId) {
UpdateWrapper<DisStockListDetailEntity> updateWrapper = new UpdateWrapper<>();
updateWrapper.lambda().eq(DisStockListDetailEntity::getStockListId,stockListId)
.eq(DisStockListDetailEntity::getReservationId,billLadingId)
.set(DisStockListDetailEntity::getStockPackageStatus,2);
this.update(updateWrapper);
}
/** /**
* 赋值模板转换 * 赋值模板转换
* @param id * @param id

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

@ -25,6 +25,7 @@ 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.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO; import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO;
import com.logpm.basic.entity.BasicPrintTemplateEntity; import com.logpm.basic.entity.BasicPrintTemplateEntity;
import com.logpm.basic.feign.IBasicPrintTemplateClient; import com.logpm.basic.feign.IBasicPrintTemplateClient;
@ -577,8 +578,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} }
//查询当前扫描的包件是否进行了装车 //查询当前扫描的包件是否进行了装车
DistributionParcelListEntity parcelList = distributionParcelListService.selectByOrderPackageCode(distrilbutionloadingscanDTO.getBarcode(), myCurrentWarehouse.getId()); DistributionParcelListEntity parcelList = distributionParcelListService.selectByOrderPackageCode(distrilbutionloadingscanDTO.getBarcode(), myCurrentWarehouse.getId());
if (!Objects.isNull(parcelList)){ if (!Objects.isNull(parcelList)) {
if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelList.getOrderPackageLoadingStatus())){ if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelList.getOrderPackageLoadingStatus())) {
return Resp.scanFail("操作失败", "包件已装车"); return Resp.scanFail("操作失败", "包件已装车");
} }
} }
@ -601,8 +602,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
BeanUtils.copyProperties(distributionDeliveryTripartiteEntity, distributionDeliverySelfEntity); BeanUtils.copyProperties(distributionDeliveryTripartiteEntity, distributionDeliverySelfEntity);
} }
if (distrilbutionloadingscanDTO.getType() == 1) { if (distrilbutionloadingscanDTO.getType() == 1) {
if (!Objects.isNull(parcelList)){ if (!Objects.isNull(parcelList)) {
if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelList.getOrderPackageLoadingStatus())){ if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelList.getOrderPackageLoadingStatus())) {
return Resp.scanFail("操作失败", "包件已装车"); return Resp.scanFail("操作失败", "包件已装车");
} }
} }
@ -669,14 +670,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Integer j = distributionSignforMapper.updateloadByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub()); Integer j = distributionSignforMapper.updateloadByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
Map<String,Object> map = new HashMap(); Map<String, Object> map = new HashMap();
String distrilbutionloadingscanDTOJson = JSONObject.toJSONString(distrilbutionloadingscanDTO); String distrilbutionloadingscanDTOJson = JSONObject.toJSONString(distrilbutionloadingscanDTO);
map.put("distrilbutionloadingscanDTO",distrilbutionloadingscanDTOJson); map.put("distrilbutionloadingscanDTO", distrilbutionloadingscanDTOJson);
String parcelListEntityJson = JSONObject.toJSONString(parcelListEntity); String parcelListEntityJson = JSONObject.toJSONString(parcelListEntity);
map.put("parcelListEntity",parcelListEntityJson); map.put("parcelListEntity", parcelListEntityJson);
map.put("myCurrentWarehouseId",myCurrentWarehouse.getId()); map.put("myCurrentWarehouseId", myCurrentWarehouse.getId());
String reservationEntityJson = JSONObject.toJSONString(reservationEntity); String reservationEntityJson = JSONObject.toJSONString(reservationEntity);
map.put("reservationEntity",reservationEntityJson); map.put("reservationEntity", reservationEntityJson);
log.info(">>>>>>>>>>>>> 进入延迟队列处理包件相关信息状态"); log.info(">>>>>>>>>>>>> 进入延迟队列处理包件相关信息状态");
@ -1498,7 +1499,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)) { if (Objects.isNull(myCurrentWarehouse)) {
return R.fail(403,"请选择仓库!!"); return R.fail(403, "请选择仓库!!");
// throw n/**/ew CustomerException(403, "仓库信息不能为空"); // throw n/**/ew CustomerException(403, "仓库信息不能为空");
} }
/* /*
@ -2196,19 +2197,17 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override @Override
public IPage<DistributionAppDeliveryListVO> selectDistributionAppDeliveryListPage(IPage<DistributionAppDeliveryListVO> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) { public IPage<DistributionAppDeliveryListVO> selectDistributionAppDeliveryListPage(IPage<DistributionAppDeliveryListVO> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) {
List<DistributionAppDeliveryListVO> distributionAppDeliveryListVOS = new ArrayList<>();
//获取当前登录人 try {
//获取当前登录人
BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
String roleId = user.getRoleId(); String roleId = user.getRoleId();
//判断当前登录人是否为司机 //判断当前登录人是否为司机
List<DistributionAppDeliveryListVO> distributionAppDeliveryListVOS = new ArrayList<>();
boolean delivery = false; boolean delivery = false;
String value1 = DictBizCache.getValue("role_class", "delivery_driver_new"); String value1 = DictBizCache.getValue("role_class", "delivery_driver_new");
if (roleId.contains(value1)) delivery = true; if (roleId.contains(value1)) delivery = true;
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
// R<String> value = dictBizClient.getValue("role_class", roleId); // R<String> value = dictBizClient.getValue("role_class", roleId);
if (delivery) { if (delivery) {
//查询当前登录人的配送任务 //查询当前登录人的配送任务
@ -2227,6 +2226,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} else { } else {
distributionAppDeliveryListVOS = baseMapper.selectDistributionAppDeliveryListPage(page, distributionAppDeliveryListDTO, null, myCurrentWarehouse.getId()); distributionAppDeliveryListVOS = baseMapper.selectDistributionAppDeliveryListPage(page, distributionAppDeliveryListDTO, null, myCurrentWarehouse.getId());
} }
log.info(">>>>>>>>>>>>>>>>> distributionAppDeliveryListVOS 司机配送任务列表 {}", distributionAppDeliveryListVOS);
//转换字典字段 //转换字典字段
for (DistributionAppDeliveryListVO distributionAppDeliveryListVO : distributionAppDeliveryListVOS) { for (DistributionAppDeliveryListVO distributionAppDeliveryListVO : distributionAppDeliveryListVOS) {
@ -2257,7 +2258,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} }
//查询包件签收件数 //查询包件签收件数
Integer lad = distributionLoadscanMapper.selectCount(new QueryWrapper<DistributionLoadscanEntity>().lambda().eq(DistributionLoadscanEntity::getDeliveryId, distributionAppDeliveryListVO.getId()).eq(DistributionLoadscanEntity::getSignforState, 2)).intValue(); Integer lad = distributionLoadscanMapper.selectCount(new QueryWrapper<DistributionLoadscanEntity>().lambda().eq(DistributionLoadscanEntity::getDeliveryId, distributionAppDeliveryListVO.getId()).eq(DistributionLoadscanEntity::getSignforState, 2)).intValue();
//查询库存品签收件数 //查询库存品签收件数
Integer nad = distributionLoadscaninvnMapper.selectCount(new QueryWrapper<DistributionLoadscaninvnEntity>().lambda().eq(DistributionLoadscaninvnEntity::getDeliveryId, distributionAppDeliveryListVO.getId()).eq(DistributionLoadscaninvnEntity::getSignforState, 2)).intValue(); Integer nad = distributionLoadscaninvnMapper.selectCount(new QueryWrapper<DistributionLoadscaninvnEntity>().lambda().eq(DistributionLoadscaninvnEntity::getDeliveryId, distributionAppDeliveryListVO.getId()).eq(DistributionLoadscaninvnEntity::getSignforState, 2)).intValue();
//维护计划数 //维护计划数
@ -2267,7 +2267,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
int invertoryNum = reservationEntityList.stream().mapToInt(DistributionReservationEntity::getReservationStockListNum).sum(); int invertoryNum = reservationEntityList.stream().mapToInt(DistributionReservationEntity::getReservationStockListNum).sum();
distributionAppDeliveryListVO.setDeliveryNumber(packageNum + invertoryNum); distributionAppDeliveryListVO.setDeliveryNumber(packageNum + invertoryNum);
} else { } else {
return null; continue;
} }
distributionAppDeliveryListVO.setSignNub(lad + nad); distributionAppDeliveryListVO.setSignNub(lad + nad);
//查询完成客户数 //查询完成客户数
@ -2343,7 +2343,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionAppDeliveryListVO.setDriverName(stringBuilder.toString()); distributionAppDeliveryListVO.setDriverName(stringBuilder.toString());
} }
} }
} catch (Exception e) {
log.error(">>>>>>>> 司机配送装车查询 报错", e);
}
return page.setRecords(distributionAppDeliveryListVOS); return page.setRecords(distributionAppDeliveryListVOS);
} }
@Override @Override
@ -3020,9 +3024,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//此订单包件数量统计 //此订单包件数量统计
AtomicInteger orderPackageNum = new AtomicInteger(); AtomicInteger orderPackageNum = new AtomicInteger();
if (Func.isEmpty(oldOrder.get(s.getId()))) { if (Func.isEmpty(oldOrder.get(s.getId()))) {
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())){ if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())) {
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}",reservationEntity.getId()); log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId());
throw new RuntimeException("收货单位:"+reservationEntity.getMallName()+"客户:"+reservationEntity.getConsignee()+"完成复核签收,无法追加订单"); throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "完成复核签收,无法追加订单");
} }
DistributionReservationStockarticleEntity reservationStockarticleEntity = new DistributionReservationStockarticleEntity(); DistributionReservationStockarticleEntity reservationStockarticleEntity = new DistributionReservationStockarticleEntity();
if (s.getIsZero().equals(IsOrNoConstant.no.getValue())) { if (s.getIsZero().equals(IsOrNoConstant.no.getValue())) {
@ -3051,7 +3055,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, s.getId()).ne(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.yizhuangche.getValue()).ne(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.yiyueyue.getValue()).notIn(DistributionParcelListEntity::getOrderPackageStatus, new String[]{OrderPackageStatusConstant.yichuku.getValue(), OrderPackageStatusConstant.yiqianshou.getValue()})); List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, s.getId()).ne(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.yizhuangche.getValue()).ne(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.yiyueyue.getValue()).notIn(DistributionParcelListEntity::getOrderPackageStatus, new String[]{OrderPackageStatusConstant.yichuku.getValue(), OrderPackageStatusConstant.yiqianshou.getValue()}));
if (Func.isEmpty(distributionParcelListEntities)) { if (Func.isEmpty(distributionParcelListEntities)) {
log.error("##############添加空订单"); log.error("##############添加空订单");
throw new RuntimeException(s.getOrderCode()+"无可用包件!!!"); throw new RuntimeException(s.getOrderCode() + "无可用包件!!!");
} }
distributionParcelListEntities.forEach(dp -> { distributionParcelListEntities.forEach(dp -> {
if (!dp.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) { if (!dp.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) {
@ -3164,9 +3168,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(packageListInfo)) { if (Func.isNotEmpty(packageListInfo)) {
packageListInfo.forEach(p -> { packageListInfo.forEach(p -> {
if (Func.isEmpty(oldPackageList.get(p.getId()))) { if (Func.isEmpty(oldPackageList.get(p.getId()))) {
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())){ if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())) {
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}",reservationEntity.getId()); log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId());
throw new RuntimeException("收货单位:"+reservationEntity.getMallName()+"客户:"+reservationEntity.getConsignee()+"完成复核签收,无法追加订单"); throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "完成复核签收,无法追加订单");
} }
//为该订单新增了包件 //为该订单新增了包件
DistributionReservationPackageEntity reservationPackageEntity = new DistributionReservationPackageEntity(); DistributionReservationPackageEntity reservationPackageEntity = new DistributionReservationPackageEntity();
@ -3186,9 +3190,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}); });
//进行取消包件的数据清理 //进行取消包件的数据清理
oldPackageList.forEach((a, b) -> { oldPackageList.forEach((a, b) -> {
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())){ if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())) {
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}",reservationEntity.getId()); log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId());
throw new RuntimeException("收货单位:"+reservationEntity.getMallName()+"客户:"+reservationEntity.getConsignee()+"完成复核签收,无法追加订单"); throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "完成复核签收,无法追加订单");
} }
DistributionReservationPackageEntity reservationPackageEntity = b.get(0); DistributionReservationPackageEntity reservationPackageEntity = b.get(0);
reservationPackageEntity.setPacketBarStatus(ReservationPackageStatusConstant.quxiao.getValue()); reservationPackageEntity.setPacketBarStatus(ReservationPackageStatusConstant.quxiao.getValue());
@ -3285,9 +3289,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}); });
if (Func.isNotEmpty(oldOrder)) { if (Func.isNotEmpty(oldOrder)) {
oldOrder.forEach((m, n) -> { oldOrder.forEach((m, n) -> {
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())){ if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())) {
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}",reservationEntity.getId()); log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId());
throw new RuntimeException("收货单位:"+reservationEntity.getMallName()+"客户:"+reservationEntity.getConsignee()+"完成复核签收,无法追加订单"); throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "完成复核签收,无法追加订单");
} }
DistributionReservationStockarticleEntity reservationStockarticleEntity = n.get(0); DistributionReservationStockarticleEntity reservationStockarticleEntity = n.get(0);
if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())) { if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())) {
@ -4169,16 +4173,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<Long> orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList()); List<Long> orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList());
if (Func.isNotEmpty(orderIds)) { if (Func.isNotEmpty(orderIds)) {
//查询该客户的非零但订单包间 //查询该客户的非零但订单包间
IPage<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackage(page,orderIds, distributionDeliveryInfoDTO); IPage<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackage(page, orderIds, distributionDeliveryInfoDTO);
parcelListVOIPage.setTotal(parcelListEntityList.getTotal()); parcelListVOIPage.setTotal(parcelListEntityList.getTotal());
// List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackageNew(distributionDeliveryInfoDTO); // List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackageNew(distributionDeliveryInfoDTO);
log.info(">>>>>> parcelListEntityList {}",parcelListEntityList); log.info(">>>>>> parcelListEntityList {}", parcelListEntityList);
List<DistributionParcelListVO> parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList.getRecords()); List<DistributionParcelListVO> parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList.getRecords());
for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) { for (DistributionParcelListVO distributionParcelListVO : parcelListVOList) {
log.info(">>>>>> distributionParcelListVO {}",distributionParcelListVO); log.info(">>>>>> distributionParcelListVO {}", distributionParcelListVO);
if (Func.isNotEmpty(loadingDataMap)) { if (Func.isNotEmpty(loadingDataMap)) {
DistributionLoadscanEntity loadscanEntity = loadingDataMap.get(distributionParcelListVO.getId()); DistributionLoadscanEntity loadscanEntity = loadingDataMap.get(distributionParcelListVO.getId());
log.info(">>>>>> loadscanEntity {}",loadscanEntity); log.info(">>>>>> loadscanEntity {}", loadscanEntity);
if (Func.isNotEmpty(loadscanEntity)) { if (Func.isNotEmpty(loadscanEntity)) {
if (loadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) { if (loadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) {
@ -4224,7 +4228,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} }
} }
} }
log.info(">>>>>> distributionParcelListVO2 {}",distributionParcelListVO); log.info(">>>>>> distributionParcelListVO2 {}", distributionParcelListVO);
distributionParcelListVOS.add(distributionParcelListVO); distributionParcelListVOS.add(distributionParcelListVO);
} }
@ -5134,7 +5138,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())); List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()));
if (Func.isNotEmpty(parcelListEntities) && parcelListEntities.size() == 1) { if (Func.isNotEmpty(parcelListEntities) && parcelListEntities.size() == 1) {
DistributionParcelListEntity parcelListEntity = parcelListEntities.get(0); DistributionParcelListEntity parcelListEntity = parcelListEntities.get(0);
if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelListEntity.getOrderPackageLoadingStatus())){ if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelListEntity.getOrderPackageLoadingStatus())) {
//包件已装车 //包件已装车
log.error("重复异常装车,:{}", parcelListEntity.getOrderPackageCode()); log.error("重复异常装车,:{}", parcelListEntity.getOrderPackageCode());
return Resp.scanFail("操作失败", "包件已装车"); return Resp.scanFail("操作失败", "包件已装车");
@ -5289,13 +5293,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
DistributionReservationOrderPackageVO reservationOrderPackageVO = new DistributionReservationOrderPackageVO(); DistributionReservationOrderPackageVO reservationOrderPackageVO = new DistributionReservationOrderPackageVO();
LambdaQueryWrapper<DistributionParcelListEntity> parcelListEntityLambdaQueryWrapper = Wrappers.<DistributionParcelListEntity>query().lambda() LambdaQueryWrapper<DistributionParcelListEntity> parcelListEntityLambdaQueryWrapper = Wrappers.<DistributionParcelListEntity>query().lambda()
.notIn(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue(),OrderPackageStatusConstant.yichuku.getValue()) .notIn(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue(), OrderPackageStatusConstant.yichuku.getValue())
.ne(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.yizhuangche.getValue()) .ne(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.yizhuangche.getValue())
.eq(DistributionParcelListEntity::getStockArticleId, orderId); .eq(DistributionParcelListEntity::getStockArticleId, orderId);
if (Func.isNotEmpty(reservationPackageList)){ if (Func.isNotEmpty(reservationPackageList)) {
List<Long> packageIds = reservationPackageList.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()); List<Long> packageIds = reservationPackageList.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList());
if (Func.isNotEmpty(packageIds)){ if (Func.isNotEmpty(packageIds)) {
parcelListEntityLambdaQueryWrapper.notIn(DistributionParcelListEntity::getId,packageIds); parcelListEntityLambdaQueryWrapper.notIn(DistributionParcelListEntity::getId, packageIds);
} }
} }
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(parcelListEntityLambdaQueryWrapper); List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(parcelListEntityLambdaQueryWrapper);
@ -6474,7 +6478,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询产品名称拼接 //查询产品名称拼接
String productName = distributionReservationPackageService.getConcatThirdProductByOrderId(reservationId, stockArticleId); String productName = distributionReservationPackageService.getConcatThirdProductByOrderId(reservationId, stockArticleId);
String materialNames = distributionReservationPackageService.getConcatMaterialName(reservationId,stockArticleId); String materialNames = distributionReservationPackageService.getConcatMaterialName(reservationId, stockArticleId);
temp.put("产品名称", productName); temp.put("产品名称", productName);
//todo 单位是否需要查询物料表 //todo 单位是否需要查询物料表
@ -6744,6 +6748,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} }
@Override @Override
@Transactional
public void maintenanceDeliveryNum(Long deliveryId) { public void maintenanceDeliveryNum(Long deliveryId) {
DistributionDeliveryListEntity deliveryListEntity = this.getById(deliveryId); DistributionDeliveryListEntity deliveryListEntity = this.getById(deliveryId);
if (Func.isNotEmpty(deliveryListEntity)) { if (Func.isNotEmpty(deliveryListEntity)) {
@ -6754,11 +6759,58 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
deliveryListEntity.setDeliveryNumber(packageNum); deliveryListEntity.setDeliveryNumber(packageNum);
deliveryListEntity.setInventoryNub(inventoryNum); deliveryListEntity.setInventoryNub(inventoryNum);
} }
deliveryListEntity.setCustomersNumber(distributionReservationEntities.size());
this.updateById(deliveryListEntity); this.updateById(deliveryListEntity);
} }
} }
@Override
@Transactional
public R cancelDelivery(Long deliveryId) {
String method = "###################DistributionDeliveryListServiceImpl执行方法cancelDelivery,";
DistributionDeliveryListEntity deliveryListEntity = this.getById(deliveryId);
if (Func.isEmpty(deliveryListEntity)) {
log.info(method + "参数缺失deliveryId:{}", deliveryId);
return R.fail("服务器正忙!!!");
}
List<DistributionReservationEntity> reservationEntities = distributionSignforService.selectReservationByDeliveryId(deliveryId);
if (Func.isEmpty(reservationEntities)) {
log.info(method + "预约查询失败:{}", deliveryId);
return R.fail("服务器正忙!!!");
}
String reservationCodes = reservationEntities.stream().filter(f -> !f.getLoadingStatus().equals(ReservationLoadingStatusConstant.daizhuangche.getValue())).map(DistributionReservationEntity::getReservationCode).collect(Collectors.joining(","));
if (Func.isNotEmpty(reservationCodes)) {
log.info(method + "存在装车数据:{}", reservationCodes);
return R.fail(deliveryListEntity.getTrainNumber() + "存在装车包件!!!");
}
//该配送是否存在异常装车或者异常签收数据
List<DistributionLoadscanEntity> loadscanEntityList = distributionDeliveryListService.selectAbnormalLoadingBydeliveryId(deliveryId);
if (Func.isNotEmpty(loadscanEntityList)) {
log.info(method + "存在异常装车数据:{}", deliveryId);
return R.fail(reservationCodes + "存在异常装车、签收包条!!!");
}
boolean flag = false;
for (DistributionReservationEntity reservationEntity : reservationEntities) {
DistributionReservationDTO reservationDTO = Func.copy(reservationEntity, DistributionReservationDTO.class);
flag = distributionReservationService.cancelReservation(reservationDTO);
if (!flag) {
log.info(method + "取消预约失败:{}", deliveryId);
throw new RuntimeException("取消配送计划失败,请联系管理员");
}
}
return R.status(flag);
}
@Override
public List<DistributionLoadscanEntity> selectAbnormalLoadingBydeliveryId(Long deliveryId) {
return distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, deliveryId)
.eq(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
.eq(DistributionLoadscanEntity::getIsAbnormalLoading, 2)
);
}
@Override @Override
@Transactional @Transactional
public void maintenanceDeliveryInfo(Long deliveryId) { public void maintenanceDeliveryInfo(Long deliveryId) {
@ -6798,10 +6850,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionSignforEntity> list = distributionSignforService.list(Wrappers.<DistributionSignforEntity>query().lambda() List<DistributionSignforEntity> list = distributionSignforService.list(Wrappers.<DistributionSignforEntity>query().lambda()
.eq(DistributionSignforEntity::getDeliveryId, deliveryId) .eq(DistributionSignforEntity::getDeliveryId, deliveryId)
); );
if (!list.isEmpty()){ if (!list.isEmpty()) {
//查看所有的签收信息是否均已完成 //查看所有的签收信息是否均已完成
boolean anyMatch = list.stream().allMatch(s -> s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())); boolean anyMatch = list.stream().allMatch(s -> s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue()));
if (anyMatch){ if (anyMatch) {
deliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.yiwancheng.getValue()); deliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.yiwancheng.getValue());
} }
} }

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

@ -926,4 +926,9 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
return baseMapper.findByWaybillNumber(waybillNumber); return baseMapper.findByWaybillNumber(waybillNumber);
} }
@Override
public Integer restorePakcageByIds(List<Long> packageIds) {
return baseMapper.restorePakcageByIds(packageIds);
}
} }

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

@ -2863,8 +2863,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
} }
@Override @Override
public List<DistributionStockupStockListVO> selectStockupStockList(Long reservationId,Long warehouseId) { public List<DistributionStockupStockListVO> selectStockupStockList(Long reservationId,Long warehouseId,String mallName) {
return baseMapper.selectStockupStockListNew(reservationId,warehouseId); return baseMapper.selectStockupStockListNew(reservationId,warehouseId,mallName);
} }
@Override @Override

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

@ -218,10 +218,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
Integer abnormalLoading = distributionLoadscanMapper.selectAbnormalLoadingByReservationId(d.getReservationId()); Integer abnormalLoading = distributionLoadscanMapper.selectAbnormalLoadingByReservationId(d.getReservationId());
//该客户的异常签收件数 //该客户的异常签收件数
Integer abnormalSigning = distributionLoadscanMapper.selectAbnormalSigningByReservationId(d.getReservationId()); Integer abnormalSigning = distributionLoadscanMapper.selectAbnormalSigningByReservationId(d.getReservationId());
// DistributionLoadingNumDTO reservationSigningNum = distributionReservationMapper.selectReservationSigningNum(d.getReservationId()); // DistributionLoadingNumDTO reservationSigningNum = distributionReservationMapper.selectReservationSigningNum(d.getReservationId());
if (d.getDeliveryType().equals(DistributionTypeConstant.shipie.getValue())){ if (d.getDeliveryType().equals(DistributionTypeConstant.shipie.getValue())){
List<DisStockListDetailEntity> disStockListDetailEntities = distributionReservationMapper.selectInventoryListByReservation(d.getReservationId()); List<DisStockListDetailEntity> disStockListDetailEntities = distributionReservationMapper.selectInventoryListByReservation(d.getReservationId());
if (Func.isNotEmpty(disStockListDetailEntities)){ if (Func.isNotEmpty(disStockListDetailEntities)){
@ -392,7 +389,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (Func.isNotEmpty(packageLoadingMap.get(p.getId()))){ if (Func.isNotEmpty(packageLoadingMap.get(p.getId()))){
DistributionLoadscanEntity distributionLoadscanEntity = packageLoadingMap.get(p.getId()); DistributionLoadscanEntity distributionLoadscanEntity = packageLoadingMap.get(p.getId());
detailDTO.setLoadingTime(distributionLoadscanEntity.getScanTime()); detailDTO.setLoadingTime(distributionLoadscanEntity.getScanTime());
detailDTO.setLoadingStatusName(OrderPackageLoadingStatusConstant.weizhuancghe.getName()); detailDTO.setLoadingStatusName(OrderPackageLoadingStatusConstant.yizhuangche.getName());
if (distributionLoadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())){ if (distributionLoadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())){
//签收 //签收
detailDTO.setSigningTime(distributionLoadscanEntity.getSigningTime()); detailDTO.setSigningTime(distributionLoadscanEntity.getSigningTime());
@ -477,31 +474,34 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override @Override
@Transactional @Transactional
public R recheck(Long id) { public R recheck(DistributionSignforDTO distributionSignforDTO) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)) { if (Func.isEmpty(myCurrentWarehouse)) {
return R.fail(403, "未授权!!!"); return R.fail(403, "未授权!!!");
} }
if (Func.isEmpty(id)){ if (Func.isEmpty(distributionSignforDTO.getId())){
log.error("参数缺失,signforId:{}",id); log.error("参数缺失,signforId:{}",distributionSignforDTO.getId());
return null; return null;
} }
DistributionSignforEntity distributionSignfor = this.getById(id); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss.SSS");
DistributionSignforEntity distributionSignfor = this.getById(distributionSignforDTO.getId());
BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
distributionSignfor.setExamineUserId(user.getUserId()); distributionSignfor.setExamineUserId(user.getUserId());
distributionSignfor.setSigningStatus(SignforStatusConstant.yiqianshou.getValue()); distributionSignfor.setSigningStatus(SignforStatusConstant.yiqianshou.getValue());
//复核时间为签收时间
String format = sdf.format(new Date());
distributionSignfor.setSigningTime(format);
distributionSignfor.setExamineUserName(user.getNickName()); distributionSignfor.setExamineUserName(user.getNickName());
this.updatePicture(distributionSignforDTO);
this.updateById(distributionSignfor); this.updateById(distributionSignfor);
distributionAsyncService.sendReviewFactory(id,myCurrentWarehouse.getName(), myCurrentWarehouse.getId());
distributionAsyncService.sendReviewFactory(distributionSignforDTO.getId(),myCurrentWarehouse.getName(), myCurrentWarehouse.getId());
//还需要对未装车未签收的包件进行状态的回退 //还需要对未装车未签收的包件进行状态的回退
boolean flag = this.judgmentSignIsHavePackage(distributionSignfor.getReservationId()); boolean flag = this.judgmentSignIsHavePackage(distributionSignfor.getReservationId());
if (!flag){ if (!flag){
distributionAsyncService.releaseSource(distributionSignfor.getReservationId(), myCurrentWarehouse.getId()); distributionAsyncService.releaseSource(distributionSignfor.getReservationId(), myCurrentWarehouse.getId());
} }
//维护配送状态
distributionDeliveryListService.maintenanceDeliveryInfo(distributionSignfor.getDeliveryId());
return R.success("操作成功"); return R.success("操作成功");
} }
@ -758,6 +758,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return R.data(details); return R.data(details);
} }
@Override
public List<DistributionReservationEntity> selectReservationByDeliveryId(Long deliveryId) {
return baseMapper.selectReservationByDeliveryId(deliveryId);
}
private boolean judgmentSignIsHavePackage(Long reservationId) { private boolean judgmentSignIsHavePackage(Long reservationId) {
boolean flag = false; boolean flag = false;
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationId); List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationId);
@ -4120,6 +4126,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
} }
@Override @Override
@Transactional
public Boolean updatePicture(DistributionSignforDTO distributionSignfor) { public Boolean updatePicture(DistributionSignforDTO distributionSignfor) {
if (ObjectUtils.isNotNull(distributionSignfor.getMap())) { if (ObjectUtils.isNotNull(distributionSignfor.getMap())) {

39
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

@ -40,7 +40,6 @@ import com.logpm.distribution.vo.app.DistributionMerchantStockListVO;
import com.logpm.distribution.vo.app.StockMallVO; import com.logpm.distribution.vo.app.StockMallVO;
import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity; import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity;
import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient; import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient;
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.printTemplate.PrintTemplateStatusConstant; import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
@ -220,7 +219,6 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
/** /**
* *
* @param distributionStockListDTO * @param distributionStockListDTO
* @return
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ -297,6 +295,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
stockListEntity.setUnpackingQuantity( list.get(0).getUnpackingQuantity() + distributionStockListDTO.getUnpackingQuantity()); stockListEntity.setUnpackingQuantity( list.get(0).getUnpackingQuantity() + distributionStockListDTO.getUnpackingQuantity());
this.updateById(stockListEntity); this.updateById(stockListEntity);
//添加拆包记录 //添加拆包记录
DistributionUnpackingDetailsEntity distributionUnpackingDetails= new DistributionUnpackingDetailsEntity(); DistributionUnpackingDetailsEntity distributionUnpackingDetails= new DistributionUnpackingDetailsEntity();
distributionUnpackingDetails.setStockArticleId(Optional.ofNullable(list.get(0).getStockArticleId()).orElse(null)); distributionUnpackingDetails.setStockArticleId(Optional.ofNullable(list.get(0).getStockArticleId()).orElse(null));
@ -465,7 +464,31 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
@Override @Override
public IPage<DistributionStockListAllocationVO> listAllocation(IPage<Object> page, Map<String, Object> distributionStockList) { public IPage<DistributionStockListAllocationVO> listAllocation(IPage<Object> page, Map<String, Object> distributionStockList) {
DistributionStockListEntity distributionStockListEntity = JSONObject.parseObject(JSONObject.toJSONString(distributionStockList), DistributionStockListEntity.class); DistributionStockListEntity distributionStockListEntity = JSONObject.parseObject(JSONObject.toJSONString(distributionStockList), DistributionStockListEntity.class);
return baseMapper.listAllocation(page,distributionStockListEntity); IPage<DistributionStockListAllocationVO> pageList = null;
Long marketId = distributionStockListEntity.getMarketId();
Long materialId = distributionStockListEntity.getMaterialId();
String incomingBatch = distributionStockListEntity.getIncomingBatch();
Long warehouseId = distributionStockListEntity.getWarehouseId();
QueryWrapper<DistributionStockListEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("market_id",marketId)
.eq("material_id",materialId)
.eq("incoming_batch",incomingBatch)
.eq("warehouse_id",warehouseId);
distributionStockListEntity = getOne(queryWrapper);
if(Objects.isNull(distributionStockListEntity)){
log.warn("##################listAllocation: 库存品信息不存在");
return null;
}
String sourceType = distributionStockListEntity.getSourceType();
if("1".equals(sourceType)){
pageList = baseMapper.listAllocationOrder(page,distributionStockListEntity);
}else{
pageList = baseMapper.listAllocation(page,distributionStockListEntity);
}
return pageList;
} }
@Override @Override
@ -681,6 +704,16 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
return distributionMerchantStockListVOS; return distributionMerchantStockListVOS;
} }
@Override
@Transactional
public void updateInventoryQuantityOccupied(Long stockListId, Integer quantity) {
DistributionStockListEntity stockListEntity = this.getById(stockListId);
if (Func.isNotEmpty(stockListEntity)){
stockListEntity.setQuantityOccupied(stockListEntity.getQuantityOccupied() - quantity);
this.updateById(stockListEntity);
}
}
} }
// @Override // @Override

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

@ -26,7 +26,9 @@ 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.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataClientClient;
import com.logpm.basicdata.feign.IBasicdataCodeClient; import com.logpm.basicdata.feign.IBasicdataCodeClient;
import com.logpm.basicdata.feign.IBasicdataGoodsAreaClient; import com.logpm.basicdata.feign.IBasicdataGoodsAreaClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
@ -201,6 +203,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
@Autowired @Autowired
private DistributionStockListInfoMapper distributionStockListInfoMapper; private DistributionStockListInfoMapper distributionStockListInfoMapper;
@Autowired
private IBasicdataClientClient basicdataClientClient;
@Override @Override
public IPage<DistributionStockupVO> selectDistributionStockupPage(IPage<DistributionStockupVO> page, DistributionStockupVO distributionStockup) { public IPage<DistributionStockupVO> selectDistributionStockupPage(IPage<DistributionStockupVO> page, DistributionStockupVO distributionStockup) {
@ -1135,10 +1140,27 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
@Override @Override
public List<DistributionStockupStockListVO> selectStockupStockList(StockupDTO stockupDTO) { public List<DistributionStockupStockListVO> selectStockupStockList(StockupDTO stockupDTO) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
log.error("###########myCurrentWarehouse:{}",myCurrentWarehouse);
return null;
}
Long reservationId = stockupDTO.getReservationId();//预约单id Long reservationId = stockupDTO.getReservationId();//预约单id
DistributionReservationEntity reservationEntity = distributionReservationService.getById(reservationId); DistributionReservationEntity reservationEntity = distributionReservationService.getById(reservationId);
if (Func.isEmpty(reservationEntity)){
log.error("###########查询预约失败reservationId:{}",reservationId);
return null;
}
String mallName = reservationEntity.getMallName();
if (Func.isBlank(mallName)){
//预约商场名称为空 查看是否存在商场ID
if (Func.isNotEmpty(reservationEntity.getMallId())){
BasicdataClientEntity basicdataClientEntity = basicdataClientClient.getMallById(reservationEntity.getMallId());
mallName = basicdataClientEntity.getClientName();
}else {
log.error("###########预约单无商场信息:{}",reservationId);
}
}
if (stockupDTO.getTypeService().equals("3")) { if (stockupDTO.getTypeService().equals("3")) {
//自 //自
@ -1167,13 +1189,12 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
} else { } else {
//商,市 //商,市
List<DistributionStockupStockListVO> list = distributionReservationService.selectStockupStockList(reservationId,reservationEntity.getWarehouseId()); List<DistributionStockupStockListVO> list = distributionReservationService.selectStockupStockList(reservationId,myCurrentWarehouse.getId(),mallName);
for (int i = 0; i < list.size(); i++) { for (DistributionStockupStockListVO distributionStockupStockListVO : list) {
DistributionStockupStockListVO distributionStockupStockListVO = list.get(i);
if (distributionStockupStockListVO.getPlanNum().equals(distributionStockupStockListVO.getRealNum())) { if (distributionStockupStockListVO.getPlanNum().equals(distributionStockupStockListVO.getRealNum())) {
distributionStockupStockListVO.setCompleteStact(true); distributionStockupStockListVO.setCompleteStact(true);
} }
if (Func.isNotEmpty(distributionStockupStockListVO.getAllocations())){ if (Func.isNotEmpty(distributionStockupStockListVO.getAllocations())) {
String[] ids = distributionStockupStockListVO.getAllocations().split(","); String[] ids = distributionStockupStockListVO.getAllocations().split(",");
List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(ids); List<WarehouseGoodsAllocationEntity> allocationInforByIds = warehouseGoodsAllocationClient.getAllocationInforByIds(ids);

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

File diff suppressed because it is too large Load Diff

5
blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/service/impl/MtFactoryDataServiceImpl.java

@ -690,7 +690,6 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
logger.info("##############sendMtFactoryData 发送数据: {}", data); logger.info("##############sendMtFactoryData 发送数据: {}", data);
//先获取token //先获取token
String token = getMtToken(); String token = getMtToken();
//处理逻辑 //处理逻辑
@ -700,7 +699,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
.header("USERID", mtFactoryProperties.getUserid()) .header("USERID", mtFactoryProperties.getUserid())
.header("USERPWD", MD5Utils.md5Hex(mtFactoryProperties.getUserpwd().getBytes(StandardCharsets.UTF_8))) .header("USERPWD", MD5Utils.md5Hex(mtFactoryProperties.getUserpwd().getBytes(StandardCharsets.UTF_8)))
.header("Content-Type", "application/json") .header("Content-Type", "application/json")
.body(data).timeout(5 * 1000) .body(data).timeout(30 * 1000)
.execute().body(); .execute().body();
logger.info("##############sendMtFactoryData 接受数据: {}", result); logger.info("##############sendMtFactoryData 接受数据: {}", result);
@ -718,7 +717,7 @@ public class MtFactoryDataServiceImpl implements IMtFactoryDataService {
if (!Objects.isNull(jsonObject)) { if (!Objects.isNull(jsonObject)) {
Integer code = jsonObject.getInteger("Result"); Integer code = jsonObject.getInteger("Result");
String message = jsonObject.getString("Message"); String message = jsonObject.getString("Message");
if (code.equals(0)) { if (0==code) {
logger.info("##########sendMtFactoryData: 物流状态传递成功"); logger.info("##########sendMtFactoryData: 物流状态传递成功");
return Resp.success("物流状态传递成功"); return Resp.success("物流状态传递成功");
} else { } else {

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

@ -71,4 +71,6 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper<TrunklineCarsLoa
Integer findSignNumByLoadIdAndNodeIdAndOrderCodeAndeWaybillNo(@Param("loadId") Long loadId, @Param("nodeId") Long nodeId, @Param("orderCode") String orderCode, @Param("waybillNo") String waybillNo); Integer findSignNumByLoadIdAndNodeIdAndOrderCodeAndeWaybillNo(@Param("loadId") Long loadId, @Param("nodeId") Long nodeId, @Param("orderCode") String orderCode, @Param("waybillNo") String waybillNo);
Integer findRealSignNumBySignOrderId(@Param("signOrderId") Long signOrderId); Integer findRealSignNumBySignOrderId(@Param("signOrderId") Long signOrderId);
void updateFinalNodeIdAndFinalNodeNameById(@Param("loadScanId") Long loadScanId, @Param("finalNodeId") Long finalNodeId, @Param("finalNodeName") String finalNodeName);
} }

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

@ -281,4 +281,10 @@
where sign_order_id = #{signOrderId} where sign_order_id = #{signOrderId}
</select> </select>
<update id="updateFinalNodeIdAndFinalNodeNameById">
update logpm_trunkline_cars_load_scan
set final_node_id = #{finalNodeId},
final_node_name = #{finalNodeName}
where id = #{loadScanId}
</update>
</mapper> </mapper>

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

@ -67,4 +67,7 @@ public interface ITrunklineCarsLoadScanService extends BaseService<TrunklineCars
List<TrunklineCarsLoadScanEntity> findListByIds(List<Long> loadScanIds); List<TrunklineCarsLoadScanEntity> findListByIds(List<Long> loadScanIds);
Integer findRealSignNumBySignOrderId(Long signOrderId); Integer findRealSignNumBySignOrderId(Long signOrderId);
void updateFinalNodeIdAndFinalNodeNameById(Long loadScanId, Long finalNodeId, String finalNodeName);
} }

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

@ -871,9 +871,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<PacakgeDetailExcelDTO> pacakgeDetailExcelDTOS = EasyExcel.read(inputStream).head(PacakgeDetailExcelDTO.class).sheet(0).headRowNumber(2).doReadSync(); List<PacakgeDetailExcelDTO> pacakgeDetailExcelDTOS = EasyExcel.read(inputStream).head(PacakgeDetailExcelDTO.class).sheet(0).headRowNumber(2).doReadSync();
Map<String, List<PacakgeDetailExcelDTO>> listMap = pacakgeDetailExcelDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "-" + a.getTrainNumber())); Map<String, List<PacakgeDetailExcelDTO>> listMap = pacakgeDetailExcelDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "&" + a.getTrainNumber()));
listMap.remove("null-null"); listMap.remove("null&null");
Set<String> set = listMap.keySet(); Set<String> set = listMap.keySet();
List<TrunklineAdvanceDetailEntity> advanceDetailEntities = new ArrayList<>(); List<TrunklineAdvanceDetailEntity> advanceDetailEntities = new ArrayList<>();
@ -882,7 +882,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
for (String str : set) { for (String str : set) {
List<PacakgeDetailExcelDTO> detailExcelDTOS = listMap.get(str); List<PacakgeDetailExcelDTO> detailExcelDTOS = listMap.get(str);
PacakgeDetailExcelDTO pacakgeDetailExcelDTO = detailExcelDTOS.get(0); PacakgeDetailExcelDTO pacakgeDetailExcelDTO = detailExcelDTOS.get(0);
String[] split = str.split("-"); String[] split = str.split("&");
String orderCode = split[0]; String orderCode = split[0];
String trainNumber = split[1]; String trainNumber = split[1];
List<String> orderPackageCodes = new ArrayList<>(); List<String> orderPackageCodes = new ArrayList<>();
@ -981,10 +981,10 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
advanceDetailEntities.add(advanceDetailModel); advanceDetailEntities.add(advanceDetailModel);
} }
int all = orderPackageCodes.size() + advanceDetailEntities.size(); // int all = orderPackageCodes.size() + advanceDetailEntities.size();
if(all != advanceEntity.getTotalNum()){ // if(all != advanceEntity.getTotalNum()){
advanceService.updateTotalNumById(advanceEntity.getId(),all); // advanceService.updateTotalNumById(advanceEntity.getId(),all);
} // }
} }
advanceDetailService.saveBatch(advanceDetailEntities); advanceDetailService.saveBatch(advanceDetailEntities);
@ -1004,9 +1004,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<ImportCustomizedOuPaiDTO> importCustomizedOuPaiDTOS = EasyExcel.read(inputStream).head(ImportCustomizedOuPaiDTO.class).sheet(0).headRowNumber(1).doReadSync(); List<ImportCustomizedOuPaiDTO> importCustomizedOuPaiDTOS = EasyExcel.read(inputStream).head(ImportCustomizedOuPaiDTO.class).sheet(0).headRowNumber(1).doReadSync();
Map<String, List<ImportCustomizedOuPaiDTO>> listMap = importCustomizedOuPaiDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "-" + a.getTrainNumber())); Map<String, List<ImportCustomizedOuPaiDTO>> listMap = importCustomizedOuPaiDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "&" + a.getTrainNumber()));
listMap.remove("null-null"); listMap.remove("null&null");
Set<String> set = listMap.keySet(); Set<String> set = listMap.keySet();
@ -1015,7 +1015,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
for (String str : set) { for (String str : set) {
List<ImportCustomizedOuPaiDTO> paiDTOList = listMap.get(str); List<ImportCustomizedOuPaiDTO> paiDTOList = listMap.get(str);
ImportCustomizedOuPaiDTO importCustomizedOuPaiDTO = paiDTOList.get(0); ImportCustomizedOuPaiDTO importCustomizedOuPaiDTO = paiDTOList.get(0);
String[] split = str.split("-"); String[] split = str.split("&");
String orderCode = split[0]; String orderCode = split[0];
String trainNumber = split[1]; String trainNumber = split[1];
List<String> orderPackageCodes = new ArrayList<>(); List<String> orderPackageCodes = new ArrayList<>();
@ -1091,10 +1091,10 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
advanceDetailEntities.add(advanceDetailModel); advanceDetailEntities.add(advanceDetailModel);
} }
int all = orderPackageCodes.size() + advanceDetailEntities.size(); // int all = orderPackageCodes.size() + advanceDetailEntities.size();
if(all != trunklineAdvanceEntity.getTotalNum()){ // if(all != trunklineAdvanceEntity.getTotalNum()){
advanceService.updateTotalNumById(trunklineAdvanceEntity.getId(),all); // advanceService.updateTotalNumById(trunklineAdvanceEntity.getId(),all);
} // }
} }
advanceDetailService.saveBatch(advanceDetailEntities); advanceDetailService.saveBatch(advanceDetailEntities);
@ -1116,9 +1116,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
InputStream inputStream = file.getInputStream(); InputStream inputStream = file.getInputStream();
List<ImportStandardOuPaiDTO> importStandardOuPaiDTOS = EasyExcel.read(inputStream).head(ImportStandardOuPaiDTO.class).sheet(0).headRowNumber(1).doReadSync(); List<ImportStandardOuPaiDTO> importStandardOuPaiDTOS = EasyExcel.read(inputStream).head(ImportStandardOuPaiDTO.class).sheet(0).headRowNumber(1).doReadSync();
Map<String, List<ImportStandardOuPaiDTO>> listMap = importStandardOuPaiDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "-" + a.getTrainNumber())); Map<String, List<ImportStandardOuPaiDTO>> listMap = importStandardOuPaiDTOS.parallelStream().collect(Collectors.groupingBy(a -> a.getOrderCode() + "&" + a.getTrainNumber()));
listMap.remove("null-null"); listMap.remove("null&null");
Set<String> set = listMap.keySet(); Set<String> set = listMap.keySet();
@ -1126,7 +1126,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
for (String str : set) { for (String str : set) {
List<ImportStandardOuPaiDTO> paiDTOList = listMap.get(str); List<ImportStandardOuPaiDTO> paiDTOList = listMap.get(str);
ImportStandardOuPaiDTO importStandardOuPaiDTO = paiDTOList.get(0); ImportStandardOuPaiDTO importStandardOuPaiDTO = paiDTOList.get(0);
String[] split = str.split("-"); String[] split = str.split("&");
String orderCode = split[0]; String orderCode = split[0];
String trainNumber = split[1]; String trainNumber = split[1];
List<String> orderPackageCodes = new ArrayList<>(); List<String> orderPackageCodes = new ArrayList<>();
@ -1168,6 +1168,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
advanceDetailModel.setWarehouseId(warehouseId); advanceDetailModel.setWarehouseId(warehouseId);
advanceDetailModel.setWarehouseName(warehouseName); advanceDetailModel.setWarehouseName(warehouseName);
advanceDetailModel.setAdvanceId(trunklineAdvanceEntity.getId()); advanceDetailModel.setAdvanceId(trunklineAdvanceEntity.getId());
advanceDetailModel.setOrderPackageCode(orderPackageCode);
advanceDetailModel.setOrderCode(orderCode); advanceDetailModel.setOrderCode(orderCode);
advanceDetailModel.setBrand("欧派"); advanceDetailModel.setBrand("欧派");
advanceDetailModel.setSystemType("线上"); advanceDetailModel.setSystemType("线上");
@ -1218,10 +1219,10 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
advanceDetailEntities.add(advanceDetailModel); advanceDetailEntities.add(advanceDetailModel);
} }
int all = orderPackageCodes.size() + advanceDetailEntities.size(); // int all = orderPackageCodes.size() + advanceDetailEntities.size();
if(all != trunklineAdvanceEntity.getTotalNum()){ // if(all != trunklineAdvanceEntity.getTotalNum()){
advanceService.updateTotalNumById(trunklineAdvanceEntity.getId(),all); // advanceService.updateTotalNumById(trunklineAdvanceEntity.getId(),all);
} // }
} }
advanceDetailService.saveBatch(advanceDetailEntities); advanceDetailService.saveBatch(advanceDetailEntities);

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

@ -162,4 +162,9 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl<TrunklineC
return baseMapper.findRealSignNumBySignOrderId(signOrderId); return baseMapper.findRealSignNumBySignOrderId(signOrderId);
} }
@Override
public void updateFinalNodeIdAndFinalNodeNameById(Long loadScanId, Long finalNodeId, String finalNodeName) {
baseMapper.updateFinalNodeIdAndFinalNodeNameById(loadScanId,finalNodeId,finalNodeName);
}
} }

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

@ -1776,7 +1776,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
isAbnormal = 0; isAbnormal = 0;
remark = "正常装车"; remark = "正常装车";
} }
carsLoadScanEntity.setFinalNodeId(carsOrderEntity.getFinalNodeId()); Long finalNodeId = carsOrderEntity.getFinalNodeId();
BasicdataWarehouseEntity finalNode = basicdataWarehouseClient.getEntityWarehouseId(finalNodeId);
String finalNodeName = null;
if(!Objects.isNull(finalNode)){
finalNodeName = finalNode.getName();
}
carsLoadScanEntity.setFinalNodeId(finalNodeId);
carsLoadScanEntity.setFinalNodeName(finalNodeName);
} }
distributionParcelListClient.updateOrderPackageCodeById(packageId,"60"); distributionParcelListClient.updateOrderPackageCodeById(packageId,"60");
distributionStockArticleClient.submitHandleNumByOrderId(1,articleId); distributionStockArticleClient.submitHandleNumByOrderId(1,articleId);
@ -1852,6 +1859,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Integer isData = 1; Integer isData = 1;
Integer planNum = null; Integer planNum = null;
Integer difficult = 0; Integer difficult = 0;
Long finalNodeId = null;
String finalNodeName = null;
String loadCode = carsLoadEntity.getCarsNo(); String loadCode = carsLoadEntity.getCarsNo();
//判断订单是否在计划当中 //判断订单是否在计划当中
QueryWrapper<TrunklineCarsOrderEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<TrunklineCarsOrderEntity> queryWrapper = new QueryWrapper<>();
@ -1864,6 +1873,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
isAbnormal = 1; isAbnormal = 1;
remark = "有数据,无计划,异常装车"; remark = "有数据,无计划,异常装车";
}else{ }else{
finalNodeId = carsOrderEntity.getFinalNodeId();
BasicdataWarehouseEntity finalNode = basicdataWarehouseClient.getEntityWarehouseId(finalNodeId);
if(!Objects.isNull(finalNode)){
finalNodeName = finalNode.getName();
}
planNum = carsOrderEntity.getPlanNum();//计划件数 planNum = carsOrderEntity.getPlanNum();//计划件数
} }
@ -1910,7 +1924,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setTrayCode(trayCode); carsLoadScanEntity.setTrayCode(trayCode);
carsLoadScanEntity.setRemark(remark); carsLoadScanEntity.setRemark(remark);
carsLoadScanEntity.setFromWarehouseId(warehouseId); carsLoadScanEntity.setFromWarehouseId(warehouseId);
carsLoadScanEntity.setFinalNodeId(carsOrderEntity.getFinalNodeId()); carsLoadScanEntity.setFinalNodeId(finalNodeId);
carsLoadScanEntity.setFinalNodeName(finalNodeName);
trunklineCarsLoadScanService.save(carsLoadScanEntity); trunklineCarsLoadScanService.save(carsLoadScanEntity);
loadScanId = carsLoadScanEntity.getId(); loadScanId = carsLoadScanEntity.getId();
difficult = enterNum; difficult = enterNum;
@ -2406,7 +2421,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
for (LoadScanFinalNodeIdVO loadScanFinalNodeIdVO : loadScanFinalNodeIdList) { for (LoadScanFinalNodeIdVO loadScanFinalNodeIdVO : loadScanFinalNodeIdList) {
Long loadScanId = loadScanFinalNodeIdVO.getLoadScanId(); Long loadScanId = loadScanFinalNodeIdVO.getLoadScanId();
Long finalNodeId = loadScanFinalNodeIdVO.getFinalNodeId(); Long finalNodeId = loadScanFinalNodeIdVO.getFinalNodeId();
trunklineCarsLoadScanService.updateFinalNodeIdById(loadScanId,finalNodeId); String finalNodeName = null;
BasicdataWarehouseEntity finalNode = basicdataWarehouseClient.getEntityWarehouseId(finalNodeId);
if(!Objects.isNull(finalNode)){
finalNodeName = finalNode.getName();
}
trunklineCarsLoadScanService.updateFinalNodeIdAndFinalNodeNameById(loadScanId,finalNodeId,finalNodeName);
} }
@ -3646,6 +3666,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String orderCode = carsLoadScanEntity.getOrderCode(); String orderCode = carsLoadScanEntity.getOrderCode();
Long loadScanId = carsLoadScanEntity.getId(); Long loadScanId = carsLoadScanEntity.getId();
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId(); Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId();
Integer isData = carsLoadScanEntity.getIsData();
Integer isAbnormal = 0; Integer isAbnormal = 0;
if(warehouseId.equals(finalNodeId)){ if(warehouseId.equals(finalNodeId)){
carsLoadScanEntity.setUnloadAbnormal(0); carsLoadScanEntity.setUnloadAbnormal(0);
@ -3672,7 +3693,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId,warehouseName,loadId,loadCode,waybillId,waybillNo,orderCode,orderPackageCode,1, trunklineCarsUnloadLogService.savaUnloadLog(warehouseId,warehouseName,loadId,loadCode,waybillId,waybillNo,orderCode,orderPackageCode,1,
1,1,isAbnormal,trayId,trayCode,trayName,fromWarehouseId,loadScanId,remark); 1,1,isAbnormal,trayId,trayCode,trayName,fromWarehouseId,loadScanId,remark);
if(1 == isData){
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, fromWarehouseId); DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, fromWarehouseId);
if(Objects.isNull(parcelListEntity)){ if(Objects.isNull(parcelListEntity)){
log.warn("##############unloadPackage: 包件信息不存在 orderPackageCode={} fromWarehouseId={}",orderPackageCode,fromWarehouseId); log.warn("##############unloadPackage: 包件信息不存在 orderPackageCode={} fromWarehouseId={}",orderPackageCode,fromWarehouseId);
@ -3749,6 +3770,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionParcelListClient.updateOrderPackageCodeById(packageId,packageStatus); distributionParcelListClient.updateOrderPackageCodeById(packageId,packageStatus);
} }
} }
}
updateNumByLoadId(loadId); updateNumByLoadId(loadId);
return R.success("卸车成功"); return R.success("卸车成功");

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml

@ -116,7 +116,7 @@
`third_product` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三级品', `third_product` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三级品',
`market_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商场名称(库存品)', `market_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商场名称(库存品)',
`incoming_batch` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次号(库存品)', `incoming_batch` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次号(库存品)',
`material_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料名称(库存品)', `material_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料名称(库存品)',
`waybill_number` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '运单号', `waybill_number` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '运单号',
`send_warehouse_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发站仓名称', `send_warehouse_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发站仓名称',
`tray_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '托盘名称', `tray_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '托盘名称',

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -2127,12 +2127,12 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
@Override @Override
public void downPackageByOrderPackageCode(String orderPackageCode,String remark,Long warehouseId) { public void downPackageByOrderPackageCode(String orderPackageCode,String remark,Long warehouseId) {
QueryWrapper<WarehouseTrayGoodsEntity> trayGoodsQueryWrapper = new QueryWrapper<>(); QueryWrapper<WarehouseTrayGoodsEntity> trayGoodsQueryWrapper = new QueryWrapper<>();
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCode(orderPackageCode); DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode,warehouseId);
trayGoodsQueryWrapper.eq("association_type","3") trayGoodsQueryWrapper.eq("association_type","3")
.eq("association_value",orderPackageCode); .eq("association_value",orderPackageCode);
WarehouseTrayGoodsEntity trayGoodsEntity = warehouseTrayGoodsService.getOne(trayGoodsQueryWrapper); WarehouseTrayGoodsEntity trayGoodsEntity = warehouseTrayGoodsService.getOne(trayGoodsQueryWrapper);
StringBuffer stringBuffer = new StringBuffer(); StringBuffer stringBuffer = new StringBuffer();
if (Func.isNotEmpty(trayGoodsEntity)){ if (!Objects.isNull(trayGoodsEntity)){
Long trayGoodsId = trayGoodsEntity.getId(); Long trayGoodsId = trayGoodsEntity.getId();
Long trayTypeId = trayGoodsEntity.getTrayTypeId(); Long trayTypeId = trayGoodsEntity.getTrayTypeId();
Long trayId = trayGoodsEntity.getTrayId(); Long trayId = trayGoodsEntity.getTrayId();

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

@ -1370,7 +1370,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
WarehouseTrayGoodsEntity warehouseTrayGoodsEntity = warehouseTrayGoodsService.getOne(trayGoodsEntityQueryWrapper); WarehouseTrayGoodsEntity warehouseTrayGoodsEntity = warehouseTrayGoodsService.getOne(trayGoodsEntityQueryWrapper);
if(!Objects.isNull(warehouseTrayGoodsEntity)){ if(!Objects.isNull(warehouseTrayGoodsEntity)){
//有托盘,托盘下托 //有托盘,托盘下托
warehouseTrayTypeService.downPackageByOrderPackageCode(orderPackageCode,"包件下架:同步下托",warehouseId); warehouseTrayTypeService.downPackageByOrderPackageCode(orderPackageCode,"包件托",warehouseId);
} }
continue; continue;
} }

Loading…
Cancel
Save