Browse Source

1.干线bug修复

master
zhenghaoyu 6 months ago
parent
commit
7a6a0f753b
  1. 38
      blade-service/logpm-patch/src/main/java/com/logpm/patch/jobhandle/SyncOrderInfoToPlatform.java
  2. 4
      blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.java
  3. 13
      blade-service/logpm-patch/src/main/java/com/logpm/patch/mapper/WarehouseMappingDataMapper.xml
  4. 4
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/IWarehouseMappingDataService.java
  5. 10
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/WarehouseMappingDataServiceImpl.java

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

@ -876,5 +876,43 @@ public class SyncOrderInfoToPlatform {
return ReturnT.SUCCESS;
}
@XxlJob("syncWaybillOrderInfo")
public ReturnT<String> syncWaybillOrderInfo(String param) {
log.info("############syncWaybillOrderInfo: 同步运单下订单信息 开始");
List<JSONObject> waybillJSONs = warehouseMappingDataService.findSyncWaybillOrderInfo();
if(StringUtil.isBlank(param)){
log.warn("###########syncWaybillOrderInfo: 仓库id为空");
throw new CustomerException(405,"仓库id为空");
}
Long warehouseId = Long.parseLong(param);
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId);
if(Objects.isNull(warehouseEntity)){
log.warn("###########syncWaybillOrderInfo: 仓库信息为空");
throw new CustomerException(405,"仓库信息为空");
}
Integer oldId = warehouseEntity.getOldId();
waybillJSONs.forEach(waybillJSON -> {
Integer id = waybillJSON.getInt("id");
String waybillNo = waybillJSON.getStr("waybillNo");
List<String> list = advanceClient.findListByWaybillNo(waybillNo);
syncOrderInfoService.handleData(list,oldId,warehouseId,null,null);
warehouseMappingDataService.updateSyncWaybillOrderRecordById(id,1);
});
log.info("############syncWaybillOrderInfo: 同步运单信息 完成");
return ReturnT.SUCCESS;
}
}

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

@ -134,5 +134,9 @@ public interface WarehouseMappingDataMapper {
List<JSONObject> findAllWaybillNo();
void updateStatusById(@Param("id") Long id, @Param("status") int status);
List<JSONObject> findSyncWaybillOrderInfo();
void updateSyncWaybillOrderRecordById(@Param("id") Integer id, @Param("status") int status);
}

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

@ -437,5 +437,18 @@
where id = #{id}
</update>
<select id="findSyncWaybillOrderInfo" resultType="cn.hutool.json.JSONObject">
select id id,
waybill_no waybillNo,
status status
from sync_waybill_order_record
where status = 0
</select>
<update id="updateSyncWaybillOrderRecordById">
update sync_waybill_order_record
set status = #{status}
where id = #{id}
</update>
</mapper>

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

@ -115,4 +115,8 @@ public interface IWarehouseMappingDataService {
List<JSONObject> findAllWaybillNo();
void updateStatusById(Long id, int status);
List<JSONObject> findSyncWaybillOrderInfo();
void updateSyncWaybillOrderRecordById(Integer id, int status);
}

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

@ -275,4 +275,14 @@ public class WarehouseMappingDataServiceImpl implements IWarehouseMappingDataSer
public void updateStatusById(Long id, int status) {
warehouseMappingDataMapper.updateStatusById(id,status);
}
@Override
public List<JSONObject> findSyncWaybillOrderInfo() {
return warehouseMappingDataMapper.findSyncWaybillOrderInfo();
}
@Override
public void updateSyncWaybillOrderRecordById(Integer id, int status) {
warehouseMappingDataMapper.updateSyncWaybillOrderRecordById(id,status);
}
}

Loading…
Cancel
Save