Browse Source

1.干线运单bug修复

2.新增修复包件运单信息
visual
zhenghaoyu 6 months ago
parent
commit
d38087526d
  1. 41
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java
  2. 8
      blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java
  3. 36
      blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml
  4. 8
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java
  5. 20
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java
  6. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.java
  7. 8
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineAdvanceDetailMapper.xml
  8. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineAdvanceDetailService.java
  9. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  10. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceDetailServiceImpl.java

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

@ -915,5 +915,46 @@ public class SyncOrderInfoToPlatform {
return ReturnT.SUCCESS;
}
@XxlJob("syncWaybillInfoParceList")
public ReturnT<String> syncWaybillInfoParceList(String param) {
log.info("############syncWaybillInfoParceList: 同步运单下订单信息 开始");
if(StringUtil.isBlank(param)){
log.warn("###########syncWaybillOrderInfo: 仓库id为空");
throw new CustomerException(405,"仓库id为空");
}
List<JSONObject> list = warehouseMappingDataService.findAllNeedWaybillList();
list.forEach(json -> {
Integer id = json.getInt("id");
String waybillNo = json.getStr("waybillNo");
WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo);
if(Objects.isNull(warehouseWaybillEntity)){
log.warn("###########syncWaybillOrderInfo: 运单信息为空");
throw new CustomerException(405,"运单信息为空");
}
List<String> orderCodes = warehouseMappingDataService.findOrderCodeList(waybillNo);
Long waybillId = warehouseWaybillEntity.getId();
Long departureWarehouseId = warehouseWaybillEntity.getDepartureWarehouseId();
String departureWarehouseName = warehouseWaybillEntity.getDepartureWarehouseName();
Long destinationWarehouseId = warehouseWaybillEntity.getDestinationWarehouseId();
String destinationWarehouseName = warehouseWaybillEntity.getDestinationWarehouseName();
warehouseMappingDataService.updateParcelListWaybillInfo(orderCodes,waybillId,waybillNo,departureWarehouseId,departureWarehouseName,destinationWarehouseId,destinationWarehouseName);
warehouseMappingDataService.updateRepairParcelListWaybillById(id,1);
});
log.info("############syncWaybillOrderInfo: 同步运单信息 完成");
return ReturnT.SUCCESS;
}
}

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

@ -138,5 +138,13 @@ public interface WarehouseMappingDataMapper {
List<JSONObject> findSyncWaybillOrderInfo();
void updateSyncWaybillOrderRecordById(@Param("id") Integer id, @Param("status") int status);
List<JSONObject> findAllNeedWaybillList();
List<String> findOrderCodeList(@Param("waybillNo") String waybillNo);
void updateParcelListWaybillInfo(@Param("orderCodes") List<String> orderCodes, @Param("waybillId") Long waybillId, @Param("waybillNo") String waybillNo, @Param("departureWarehouseId") Long departureWarehouseId, @Param("departureWarehouseName") String departureWarehouseName, @Param("destinationWarehouseId") Long destinationWarehouseId, @Param("destinationWarehouseName") String destinationWarehouseName);
void updateRepairParcelListWaybillById(@Param("id") Integer id, @Param("status") int status);
}

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

@ -451,4 +451,40 @@
where id = #{id}
</update>
<select id="findAllNeedWaybillList" resultType="cn.hutool.json.JSONObject">
select id id,
waybill_no waybillNo,
warehouse_id warehouseId
from repair_parcel_list_waybill
where status = 0
</select>
<select id="findOrderCodeList" resultType="string">
select order_code
from logpm_trunkline_waybill_order
where waybill_no = #{waybillNo}
and is_deleted = 0
</select>
<update id="updateParcelListWaybillInfo">
update logpm_distribution_parcel_list
set ldpl.waybill_id = #{waybillId},
ldpl.waybill_number = #{waybillNo},
ldpl.send_warehouse_name = #{departureWarehouseName},
ldpl.send_warehouse_id = #{departureWarehouseId},
ldpl.accept_warehouse_id = #{destinationWarehouseId},
ldpl.accept_warehouse_name = #{destinationWarehouseName}
where ldpl.order_code in
<foreach collection="orderCodes" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<update id="updateRepairParcelListWaybillById" >
update repair_parcel_list_waybill
set status = #{status}
where id = #{id}
</update>
</mapper>

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

@ -119,4 +119,12 @@ public interface IWarehouseMappingDataService {
List<JSONObject> findSyncWaybillOrderInfo();
void updateSyncWaybillOrderRecordById(Integer id, int status);
List<JSONObject> findAllNeedWaybillList();
List<String> findOrderCodeList(String waybillNo);
void updateParcelListWaybillInfo(List<String> orderCodes, Long waybillId, String waybillNo, Long departureWarehouseId, String departureWarehouseName, Long destinationWarehouseId, String destinationWarehouseName);
void updateRepairParcelListWaybillById(Integer id, int status);
}

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

@ -285,4 +285,24 @@ public class WarehouseMappingDataServiceImpl implements IWarehouseMappingDataSer
public void updateSyncWaybillOrderRecordById(Integer id, int status) {
warehouseMappingDataMapper.updateSyncWaybillOrderRecordById(id,status);
}
@Override
public List<JSONObject> findAllNeedWaybillList() {
return warehouseMappingDataMapper.findAllNeedWaybillList();
}
@Override
public List<String> findOrderCodeList(String waybillNo) {
return warehouseMappingDataMapper.findOrderCodeList(waybillNo);
}
@Override
public void updateParcelListWaybillInfo(List<String> orderCodes, Long waybillId, String waybillNo, Long departureWarehouseId, String departureWarehouseName, Long destinationWarehouseId, String destinationWarehouseName) {
warehouseMappingDataMapper.updateParcelListWaybillInfo(orderCodes,waybillId,waybillNo,departureWarehouseId,departureWarehouseName,destinationWarehouseId,destinationWarehouseName);
}
@Override
public void updateRepairParcelListWaybillById(Integer id, int status) {
warehouseMappingDataMapper.updateRepairParcelListWaybillById(id,status);
}
}

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

@ -87,4 +87,6 @@ public interface TrunklineAdvanceDetailMapper extends BaseMapper<TrunklineAdvanc
void updateWaybillNoByAdvanceIds(@Param("advanceIds") List<Long> advanceIds, @Param("waybillNo") String waybillNo, @Param("waybillId") Long waybillId);
List<TrunklineAdvanceDetailVO> findListByAdvanceIds(@Param("advanceIds") List<Long> advanceIds);
void deleteByAdvanceIds(@Param("advanceIds") List<Long> advanceIds);
}

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

@ -565,4 +565,12 @@
</foreach>
</select>
<delete id="deleteByAdvanceIds" >
delete from logpm_trunkline_advance_detail
where advance_id in
<foreach collection="advanceIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

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

@ -104,4 +104,6 @@ public interface ITrunklineAdvanceDetailService extends BaseService<TrunklineAdv
void updateWaybillNoByAdvanceIds(List<Long> advanceIds, String waybillNo, Long waybillId);
List<TrunklineAdvanceDetailVO> findListByAdvanceIds(List<Long> advanceIds);
void deleteByAdvanceIds(List<Long> advanceIds);
}

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

@ -1059,9 +1059,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
throw new CustomerException(405, "已有包件出库,不能删除");
}
for (Long advanceId : advanceIds) {
advanceDetailService.deleteByAdvanceId(advanceId);
}
advanceDetailService.deleteByAdvanceIds(advanceIds);
advanceService.deletedAdvance(advanceIds);
//删除所有在库包件,并更新订单信息

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

@ -552,4 +552,9 @@ public class TrunklineAdvanceDetailServiceImpl extends BaseServiceImpl<Trunkline
public List<TrunklineAdvanceDetailVO> findListByAdvanceIds(List<Long> advanceIds) {
return baseMapper.findListByAdvanceIds(advanceIds);
}
@Override
public void deleteByAdvanceIds(List<Long> advanceIds) {
baseMapper.deleteByAdvanceIds(advanceIds);
}
}

Loading…
Cancel
Save