Browse Source

1.干线bug修复

dist.1.2.0^2
zhenghaoyu 7 months ago
parent
commit
afe61e1f2c
  1. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  2. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadOrderInfoVO.java
  3. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  4. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  5. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  7. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  8. 20
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java
  9. 4
      blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java
  10. 14
      blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml
  11. 2
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISyncOrderInfoService.java
  12. 3
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java
  13. 17
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java
  14. 10
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java
  15. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  16. 14
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
  17. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCostShareRecordMapper.xml
  18. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  19. 1
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

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

@ -227,4 +227,7 @@ public interface IDistributionParcelListClient {
@PostMapping(API_PREFIX + "/findListByStockArticleIds")
List<ZeroPackageSupplyVO> findListByStockArticleIds(@RequestBody List<Long> orderIdList);
@GetMapping(API_PREFIX + "/updateWaybillIdByWaybillNo")
void updateWaybillIdByWaybillNo(@RequestParam Long waybillId, @RequestParam String waybillNo);
}

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadOrderInfoVO.java

@ -17,6 +17,7 @@ public class CarsLoadOrderInfoVO implements Serializable {
private BigDecimal unloadIncome;
private BigDecimal costZhang;
private BigDecimal costPiece;
private BigDecimal income;
private BigDecimal weight;
private BigDecimal volume;
private BigDecimal orderFreight;

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

@ -535,4 +535,9 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
public List<ZeroPackageSupplyVO> findListByStockArticleIds(List<Long> orderIdList) {
return distributionParcelListService.findListByStockArticleIds(orderIdList);
}
@Override
public void updateWaybillIdByWaybillNo(Long waybillId, String waybillNo) {
distributionParcelListService.updateWaybillIdByWaybillNo(waybillId,waybillNo);
}
}

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

@ -306,4 +306,5 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
List<ZeroPackageSupplyVO> findListByStockArticleIds(@Param("orderIdList") List<Long> orderIdList);
void updateWaybillIdByWaybillNo(@Param("waybillId") Long waybillId, @Param("waybillNo") String waybillNo);
}

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

@ -1915,4 +1915,11 @@
</foreach>
</select>
<update id="updateWaybillIdByWaybillNo">
update logpm_distribution_parcel_list
set waybill_id = #{waybillId}
where waybill_number = #{waybillNo}
</update>
</mapper>

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

@ -260,4 +260,6 @@ public interface IDistributionParcelListService extends BaseService<Distribution
void addZeroPackageQuantity(Long packageId, int num);
List<ZeroPackageSupplyVO> findListByStockArticleIds(List<Long> orderIdList);
void updateWaybillIdByWaybillNo(Long waybillId, String waybillNo);
}

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

@ -1369,6 +1369,11 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
return baseMapper.findListByStockArticleIds(orderIdList);
}
@Override
public void updateWaybillIdByWaybillNo(Long waybillId, String waybillNo) {
baseMapper.updateWaybillIdByWaybillNo(waybillId,waybillNo);
}
private JSONObject handleLogJSONObject(BasicdataWarehouseEntity warehouse, BladeUser user, String orderPackageCode, String content, Integer node) {
JSONObject trunklinePackageTrackLog = new JSONObject();

20
blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java

@ -856,5 +856,25 @@ public class SyncOrderInfoToPlatform {
}
@XxlJob("syncWaybillInfo")
public ReturnT<String> syncWaybillInfo(String param) {
log.info("############syncWaybillInfo: 同步运单信息 开始");
List<JSONObject> waybillJSONs = warehouseMappingDataService.findAllWaybillNo();
waybillJSONs.forEach(waybillJSON -> {
Long id = waybillJSON.getLong("id");
String waybillNo = waybillJSON.getStr("waybillNo");
syncOrderInfoService.syncWaybillInfo(waybillNo);
warehouseMappingDataService.updateStatusById(id,1);
});
log.info("############syncWaybillInfo: 同步运单信息 完成");
return ReturnT.SUCCESS;
}
}

4
blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java

@ -130,5 +130,9 @@ public interface WarehouseMappingDataMapper {
* @param remarks
*/
void updateClearSignforRemarks(@Param("singnforId")Long id,@Param("remarks") String remarks);
List<JSONObject> findAllWaybillNo();
void updateStatusById(@Param("id") Long id, @Param("status") int status);
}

14
blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml

@ -424,4 +424,18 @@
and ldsl.id is not null
</select>
<select id="findAllWaybillNo" resultType="cn.hutool.json.JSONObject">
select id id,
waybill_no waybillNo
from sync_old_waybill_info
where status = 0
</select>
<update id="updateStatusById" >
update sync_old_waybill_info
set status = #{status}
where id = #{id}
</update>
</mapper>

2
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/ISyncOrderInfoService.java

@ -30,4 +30,6 @@ public interface ISyncOrderInfoService {
void dealWithPackageUpdown(String orderPackageCode, Long allocationId,Long warehouseId);
void clearOrderPackageDownAndDelTray(String orderPackageCode, Long warehouseId);
void syncWaybillInfo(String waybillNo);
}

3
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java

@ -112,4 +112,7 @@ public interface IWarehouseMappingDataService {
List<StockAllocationInfoVO> findStockAllocationInfo();
List<JSONObject> findAllWaybillNo();
void updateStatusById(Long id, int status);
}

17
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

@ -370,6 +370,23 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId,"系统下架解托");
}
@Override
public void syncWaybillInfo(String waybillNo) {
saveWaybillEntity(waybillNo);
WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if(!Objects.isNull(warehouseWaybillEntity)){
Long waybillId = warehouseWaybillEntity.getId();
//把包件上是这个运单号的没有运单id的加上
distributionParcelListClient.updateWaybillIdByWaybillNo(waybillId,waybillNo);
}
}
@Transactional(rollbackFor = Exception.class)
@Override

10
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java

@ -265,4 +265,14 @@ public class WarehouseMappingDataServiceImpl implements IWarehouseMappingDataSer
public List<StockAllocationInfoVO> findStockAllocationInfo() {
return warehouseMappingDataMapper.findStockAllocationInfo();
}
@Override
public List<JSONObject> findAllWaybillNo() {
return warehouseMappingDataMapper.findAllWaybillNo();
}
@Override
public void updateStatusById(Long id, int status) {
warehouseMappingDataMapper.updateStatusById(id,status);
}
}

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

@ -964,7 +964,7 @@
and final_node_id = #{warehouseId}
</select>
<select id="findSignPackageListBySignOrderId" resultType="">
<select id="findSignPackageListBySignOrderId" resultType="com.logpm.trunkline.vo.SignPackageVO">
select id carsLoadScanId,
scan_code orderPackageCode,
num num,

14
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml

@ -109,7 +109,7 @@
wb.create_time createTime,
wb.destination destination,
wb.destination_warehouse_name destinationWarehouseName,
IF(wb.check_user_id = NULL , 0,1) checkStatus,
IF(wb.check_user_id is null , 0,1) checkStatus,
wb.shipper shipper,
wb.shipper_name shipperName,
wb.consignee consignee,
@ -178,11 +178,15 @@
IFNULL(lww.total_freight/lww.total_count*ltco.unload_num,0) unloadIncome,
IFNULL(lww.total_freight/lww.total_count*ltco.plan_num,0) orderLineCost,
ltwo.total_number orderNum,
sum(IF(ltcls.scan_status = '3',ltcls.num,0)) signNum
sum(IF(ltcls.scan_status = '3',ltcls.num,0)) signNum,
sum(ltcsr.cost_piece) costPiece,
sum(ltcsr.cost_zhang) costZhang,
sum(ltcsr.income) income
from logpm_trunkline_cars_order ltco
left join logpm_trunkline_cars_load_scan ltcls on ltcls.waybill_no = ltco.waybill_no and ltcls.order_code = ltco.order_code
left join logpm_trunkline_waybill_order ltwo on ltwo.order_code = ltco.order_code and ltwo.waybill_no = ltco.waybill_no and ltwo.is_deleted = 0
left join logpm_warehouse_waybill lww on lww.waybill_no = ltwo.waybill_no
left join logpm_trunkline_cars_load_scan ltcls on ltcls.waybill_no = ltco.waybill_no and ltcls.order_code = ltco.order_code
left join logpm_trunkline_waybill_order ltwo on ltwo.order_code = ltco.order_code and ltwo.waybill_no = ltco.waybill_no and ltwo.is_deleted = 0
left join logpm_warehouse_waybill lww on lww.waybill_no = ltwo.waybill_no
left join logpm_trunkline_cost_share_record ltcsr on ltco.load_id = ltcsr.load_id and ltco.waybill_no = ltcsr.waybill_no and ltco.order_code = ltcsr.order_code and ltcls.scan_code = ltcsr.product_code
where ltco.load_id = #{loadId}
and ltco.waybill_no = #{waybillNo}
group by ltco.order_code

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

@ -12,7 +12,7 @@
</select>
<select id="findTotalUnloadNumByLoad" resultType="int">
select sum(num)
select IFNULL(sum(num),0)
from logpm_trunkline_cost_share_record
where load_id = #{loadId}
</select>

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

@ -285,6 +285,11 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
BigDecimal countTransportCost = carsLoadEntity.getCountTransportCost();
Integer totalUnloadNum = trunklineCostShareRecordService.findTotalUnloadNumByLoad(loadId);
if(totalUnloadNum.equals(0)){
log.warn("###############costShareZhang: 分摊件数为0");
throw new CustomerException(405,"分摊件数为0");
}
//计算单件成本
BigDecimal costPiece = countTransportCost.divide(new BigDecimal(totalUnloadNum),2, RoundingMode.HALF_UP);

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

@ -4626,7 +4626,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
distributionStockArticleEntity.setIncomingNum(warehouseWaybill.getStockCount());
//零担订单默认齐套
distributionStockArticleEntity.setCompleteSet(2);
distributionStockArticleEntity.setBrand(warehouseWaybill.getBrand());
distributionStockArticleEntity.setResource("零担");

Loading…
Cancel
Save