Browse Source

1.干线bug修复

master
zhenghaoyu 5 months ago
parent
commit
a1be9abc14
  1. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  2. 4
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java
  3. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  4. 31
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  5. 220
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

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

@ -320,7 +320,7 @@ public interface IDistributionParcelListClient {
List<DistributionParcelListEntity> findListByOrderPackageCodesAndCode(@RequestBody List<String> orderPackageCodeGroup);
@PostMapping(API_PREFIX + "/findSignOrderPackageCodes")
List<String> findSignOrderPackageCodes(@RequestBody List<String> orderPackageCodeList);
List<String> findSignOrderPackageCodes(@RequestBody List<String> orderPackageCodes);
}

4
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java

@ -535,9 +535,9 @@ public class WaybillCheckListener {
String orderCode = orderInfoEntity.getOrderCode();
List<TrunklineAdvanceDetailEntity> advanceDetailList = advanceDetailGroupByOrderCode.get(orderCode);
//把advanceDetailList中所有orderPackageCode放入一个List
List<String> orderPackageCodeList = advanceDetailList.stream().map(TrunklineAdvanceDetailEntity::getOrderPackageCode).collect(Collectors.toList());
List<String> orderPackageCodes = advanceDetailList.stream().map(TrunklineAdvanceDetailEntity::getOrderPackageCode).collect(Collectors.toList());
//查询包件是否签收
List<String> signPackages = distributionParcelListClient.findSignOrderPackageCodes(orderPackageCodeList);
List<String> signPackages = distributionParcelListClient.findSignOrderPackageCodes(orderPackageCodes);
AtomicReference<Integer> signNum = new AtomicReference<>(0);

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

@ -261,7 +261,7 @@
t.waybill_number waybillNo,
t.entry_time_end warehouseEntryTimeEnd,
t.tray_name trayName,
lww.create_time createTime,
lww.document_making_time createTime,
lww.destination destination,
lww.destination_warehouse_name destinationWarehouseName,
lww.shipper shipper,
@ -336,10 +336,10 @@
and lww.abolish_status = 0
and lww.freeze_status = 0
<if test="param.openTimeStart != null">
and lww.create_time &gt;= #{param.openTimeStart}
and lww.document_making_time &gt;= #{param.openTimeStart}
</if>
<if test="param.openTimeEnd != null">
and lww.create_time &lt;= #{param.openTimeEnd}
and lww.document_making_time &lt;= #{param.openTimeEnd}
</if>
<if test="param.enterTimeStart != null">
and t.entry_time_end &gt;= #{param.enterTimeStart}

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

@ -9025,7 +9025,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String orderPackageStatus = parcelListEntity.getOrderPackageStatus();
if("20".equals(orderPackageStatus)){
log.warn("#########adnormalHasStock: 包件已入库 scanCode={} warehouseId={}",scanCode,warehouseId);
return R.fail(405,"包件已入库");
return R.success("包件已入库");
}else{
Integer unbingTray = 0;
if(StringUtil.isNotBlank(trayCode)){
@ -9959,6 +9959,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
currentStockArticleEntity.setId(currentOrderId);
} else {
currentOrderId = currentStockArticleEntity.getId();
String reservationStatus = currentStockArticleEntity.getReservationStatus();
if("30".equals(reservationStatus)){
currentStockArticleEntity.setReservationStatus("20");
}
String orderStatus = currentStockArticleEntity.getOrderStatus();
if("80".equals(orderStatus)){
currentStockArticleEntity.setOrderStatus("70");
}
currentStockArticleEntity.setGenre(1);
distributionStockArticleClient.updateEntity(currentStockArticleEntity);
}
@ -10103,6 +10111,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsLoadScanEntity.setUnloadTime(new Date());
trunklineCarsLoadScanEntity.setUnloadTrayCode(unloadTrayCode);
trunklineCarsLoadScanEntity.setUnloadTrayName(unloadTrayName);
trunklineCarsLoadScanEntity.setCustomerName(stockArticleEntity.getCustomerName());
trunklineCarsLoadScanEntity.setCustomerTelephone(stockArticleEntity.getCustomerTelephone());
trunklineCarsLoadScanEntity.setCustomerAddress(stockArticleEntity.getCustomerAddress());
trunklineCarsLoadScanEntity.setFirsts(parcelListEntity.getFirsts());
trunklineCarsLoadScanEntity.setSenconds(parcelListEntity.getSecond());
trunklineCarsLoadScanEntity.setThirds(parcelListEntity.getThirdProduct());
trunklineCarsLoadScanEntity.setMaterialCode(parcelListEntity.getMaterialCode());
trunklineCarsLoadScanEntity.setMaterialName(parcelListEntity.getMaterialName());
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity);
isData = 1;
@ -10149,8 +10165,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
currentStockArticleEntity.setId(currentOrderId);
} else {
currentOrderId = currentStockArticleEntity.getId();
stockArticleEntity.setGenre(1);
distributionStockArticleClient.updateEntity(stockArticleEntity);
String reservationStatus = currentStockArticleEntity.getReservationStatus();
if("30".equals(reservationStatus)){
currentStockArticleEntity.setReservationStatus("20");
}
String orderStatus = currentStockArticleEntity.getOrderStatus();
if("80".equals(orderStatus)){
currentStockArticleEntity.setOrderStatus("70");
}
currentStockArticleEntity.setGenre(1);
distributionStockArticleClient.updateEntity(currentStockArticleEntity);
}
//判断包件当前仓是否是目的仓

220
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -147,88 +147,103 @@
<select id="pageList" resultType="com.logpm.warehouse.vo.WarehouseWaybillVO">
select lww.id id,
lww.brand brand,
lww.waybill_no waybillNo,
lww.order_no orderNo,
lww.consignee consignee,
lbc.client_code consigneeCode,
lww.consignee_name consigneeName,
lww.consignee_mobile consigneeMobile,
lww.consignee_address consigneeAddress,
lww.shipper shipper,
lww.shipper_name shipperName,
lww.shipper_mobile shipperMobile,
lww.shipper_address shipperAddress,
lww.destination destination,
lww.departure departure,
lww.departure_warehouse_name departureWarehouseName,
lww.destination_warehouse_name destinationWarehouseName,
lww.delivery_way deliveryWay,
lww.customer_train customerTrain,
IFNULL(lww.return_status,0) returnStatus,
lww.remark remark,
lww.pay_type payType,
lww.pay_way payWay,
lww.x_pay xPay,
lww.d_pay dPay,
lww.h_pay hPay,
lww.y_pay yPay,
lww.service_type serviceType,
lww.cancle_check_remark cancleCheckRemark,
lww.cancle_check_user_name cancleCheckUserName,
lww.cancle_check_time cancleCheckTime,
lww.waybill_status waybillStatus,
lww.agent agent,
lww.waybill_type waybillType,
lww.document_making_time documentMakingTime,
lww.create_time createTime,
GROUP_CONCAT(lwwd.product_name) goodsName,
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.num,')')) productNum,
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.price,')')) productPrice,
lww.total_count totalCount,
sum(lwwd.weight) totalWeight,
sum(lwwd.volume) totalVolume,
lww.cost_piece costPiece,
lww.cost_zhang costZhang,
lww.cost_num costNum,
lww.total_freight totalFreight,
lww.delivery_fee deliveryFee,
lww.pickup_fee pickupFee,
lww.storage_fee storageFee,
lww.warehouse_management_fee warehouseManagementFee,
lww.sorting_fee sortingFee,
lww.handling_fee handlingFee,
lww.claiming_value claimingValue,
lww.rebate rebate,
lww.urgency urgency,
lww.receipt_num receiptNum,
lww.receipt receipt,
lww.transport_type transportType,
lww.third_operation_fee thirdOperationFee,
lww.pickup_complete_or_not pickupCompleteOrNot,
lww.trunkline_complete_or_not trunklineCompleteOrNot,
lww.freeze_status freezeStatus,
lww.freeze_user_name freezeUserName,
lww.freeze_time freezeTime,
lww.abolish_status abolishStatus,
lww.abolish_user_name abolishUserName,
lww.abolish_time abolishTime,
lww.sign_num signNum,
lww.sign_user_name signUserName,
lww.sign_time signTime,
lww.sign_check_user_name signCheckUserName,
lww.sign_check_time signCheckTime,
IFNULL(lww.check_status,0) checkStatus,
lww.check_reson checkReson,
lww.check_remark checkRemark,
lww.check_user_name checkUserName,
lww.check_time checkTime
lww.brand brand,
lww.waybill_no waybillNo,
lww.order_no orderNo,
lww.consignee consignee,
lww.consignee_name consigneeName,
lww.consignee_mobile consigneeMobile,
lww.consignee_address consigneeAddress,
lww.shipper shipper,
lww.shipper_name shipperName,
lww.shipper_mobile shipperMobile,
lww.shipper_address shipperAddress,
lww.destination destination,
lww.departure departure,
lww.departure_warehouse_name departureWarehouseName,
lww.destination_warehouse_name destinationWarehouseName,
lww.delivery_way deliveryWay,
lww.customer_train customerTrain,
IFNULL(lww.return_status,0) returnStatus,
lww.remark remark,
lww.pay_type payType,
lww.pay_way payWay,
lww.x_pay xPay,
lww.d_pay dPay,
lww.h_pay hPay,
lww.y_pay yPay,
lww.service_type serviceType,
lww.cancle_check_remark cancleCheckRemark,
lww.cancle_check_user_name cancleCheckUserName,
lww.cancle_check_time cancleCheckTime,
lww.waybill_status waybillStatus,
lww.agent agent,
lww.waybill_type waybillType,
lww.document_making_time documentMakingTime,
lww.create_time createTime,
GROUP_CONCAT( lwwd.product_name) goodsName,
GROUP_CONCAT( lwwd.num) productNum,
GROUP_CONCAT( lwwd.price) productPrice,
lww.total_count totalCount,
sum( lwwd.weight) totalWeight,
sum( lwwd.volume) totalVolume,
lww.cost_piece costPiece,
lww.cost_zhang costZhang,
lww.cost_num costNum,
lww.total_freight totalFreight,
lww.delivery_fee deliveryFee,
lww.pickup_fee pickupFee,
lww.storage_fee storageFee,
lww.warehouse_management_fee warehouseManagementFee,
lww.sorting_fee sortingFee,
lww.handling_fee handlingFee,
lww.claiming_value claimingValue,
lww.rebate rebate,
lww.urgency urgency,
lww.receipt_num receiptNum,
lww.receipt receipt,
lww.transport_type transportType,
lww.third_operation_fee thirdOperationFee,
lww.pickup_complete_or_not pickupCompleteOrNot,
lww.trunkline_complete_or_not trunklineCompleteOrNot,
lww.freeze_status freezeStatus,
lww.freeze_user_name freezeUserName,
lww.freeze_time freezeTime,
lww.abolish_status abolishStatus,
lww.abolish_user_name abolishUserName,
lww.abolish_time abolishTime,
lww.sign_num signNum,
lww.sign_user_name signUserName,
lww.sign_time signTime,
lww.sign_check_user_name signCheckUserName,
lww.sign_check_time signCheckTime,
IFNULL(lww.check_status,0) checkStatus,
lww.check_reson checkReson,
lww.check_remark checkRemark,
lww.check_user_name checkUserName,
lww.check_time checkTime
from logpm_warehouse_waybill lww
left join logpm_basicdata_client lbc on lbc.id = lww.consignee_id
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0
left join logpm_trunkline_waybill_track ltwt on ltwt.waybill_id = lww.id
where lww.is_deleted = 0
and lww.abolish_status = 0
<if test="param.warehouseIds != null and param.warehouseIds.size() > 0">
and lww.id in (select l.id
from logpm_warehouse_waybill l
left join logpm_trunkline_waybill_track wt on wt.waybill_id = l.id
where (l.departure_warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
or l.destination_warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
or wt.warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>)
group by l.id)
</if>
<if test="param.waybillNoList != null">
and lww.waybill_no in
<foreach collection="param.waybillNoList" item="item" open="(" separator="," close=")">
@ -355,6 +370,9 @@
<if test="param.freezeTimeEndDate != null">
and lww.freeze_time &lt;= #{param.freezeTimeEndDate}
</if>
<if test="param.checkStatus != null">
and IFNULL(lww.check_status,0) = #{param.checkStatus}
</if>
<if test="param.destinationWarehouseIds != null and param.destinationWarehouseIds.size() > 0 ">
and lww.destination_warehouse_id in
<foreach collection="param.destinationWarehouseIds" item="item" separator="," open="(" close=")">
@ -362,25 +380,6 @@
</foreach>
</if>
group by lww.id
<if test="param.warehouseIds != null and param.warehouseIds.size() > 0">
HAVING
<foreach collection="param.warehouseIds" item="item" index="index" open="(" close=")">
<if test="index == 0">
GROUP_CONCAT(DISTINCT ltwt.warehouse_id) like CONCAT('%',#{item},'%')
</if>
<if test="index != 0">
or GROUP_CONCAT(DISTINCT ltwt.warehouse_id) like CONCAT('%',#{item},'%')
</if>
</foreach>
or group_concat(lww.departure_warehouse_id) in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
or group_concat(lww.destination_warehouse_id) in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
order by lww.create_time desc
</select>
@ -948,15 +947,14 @@
lww.shipper_mobile shipperMobile,
lww.shipper_address shipperAddress,
lww.consignee consignee,
lbc.client_code consigneeCode,
lww.consignee_name consigneeName,
lww.consignee_mobile consigneeMobile,
lww.consignee_address consigneeAddress,
lww.destination destination,
lww.departure departure,
GROUP_CONCAT(lwwd.product_name) goodsName,
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.num,')')) productNum,
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.price,')')) productPrice,
GROUP_CONCAT(lwwd.num) productNum,
GROUP_CONCAT(lwwd.price) productPrice,
lww.cost_piece costPiece,
lww.cost_zhang costZhang,
lww.cost_num costNum,
@ -1004,10 +1002,27 @@
lww.document_making_time documentMakingTime,
lww.create_time createTime
from logpm_warehouse_waybill lww
left join logpm_basicdata_client lbc on lbc.id = lww.consignee_id
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0
where lww.is_deleted = 0
and lww.abolish_status = 0
<if test="param.warehouseIds != null and param.warehouseIds.size() > 0">
and lww.id in (select l.id
from logpm_warehouse_waybill l
left join logpm_trunkline_waybill_track wt on wt.waybill_id = l.id
where (l.departure_warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
or l.destination_warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
or wt.warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>)
group by l.id)
</if>
<if test="param.waybillNoList != null">
and lww.waybill_no in
<foreach collection="param.waybillNoList" item="item" open="(" separator="," close=")">
@ -1152,6 +1167,9 @@
<if test="param.freezeTimeEndDate != null">
and lww.freeze_time &lt;= #{param.freezeTimeEndDate}
</if>
<if test="param.checkStatus != null">
and IFNULL(lww.check_status,0) = #{param.checkStatus}
</if>
<if test="param.destinationWarehouseIds != null and param.destinationWarehouseIds.size() > 0 ">
and lww.destination_warehouse_id in
<foreach collection="param.destinationWarehouseIds" item="item" separator="," open="(" close=")">

Loading…
Cancel
Save