Browse Source

1.干线-异常列表

2.老系统推送打托数据重试
pull/2/head
zhenghaoyu 1 year ago
parent
commit
9ae6c73104
  1. 7
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseAbnormalRecordEntity.java
  2. 2
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseAbnormalRecordClient.java
  3. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java
  4. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  5. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java
  6. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
  7. 86
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  8. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java
  9. 38
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  10. 15
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/OldSystemPushController.java
  11. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseAbnormalRecordClient.java
  12. 58
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/AsyncDataServiceImpl.java

7
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseAbnormalRecordEntity.java

@ -87,4 +87,11 @@ public class WarehouseAbnormalRecordEntity extends TenantEntity {
@ApiModelProperty(name = "备注",notes = "")
private String remark;
@ApiModelProperty(name = "关联id",notes = "")
private Long associationId;
@ApiModelProperty(name = "关联类型",notes = "")
private Integer associationType;
}

2
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseAbnormalRecordClient.java

@ -39,6 +39,4 @@ public interface IWarehouseAbnormalRecordClient {
@PostMapping(API_PREFIX+"/addAbnormalRecord")
void addAbnormalRecord(@RequestBody WarehouseAbnormalRecordEntity warehouseAbnormalRecordEntity);
}

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

@ -100,4 +100,6 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper<TrunklineCarsLoa
List<TrunklineCarsLoadScanEntity> findListByLoadIdOrderByCreateTimeAsc(@Param("loadId") Long loadId);
IPage<TrunklineCarsLoadScanVO> abnormalList(IPage<Object> page, @Param("loadCarsDTO") LoadCarsDTO loadCarsDTO);
List<TrunklineCarsLoadScanEntity> abnormalListStartCarByLoadIdAndWarehouseId(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
}

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

@ -469,4 +469,13 @@
and (ltcls.is_data = 0 or ltcls.loading_abnormal = 1 or ltcls.unload_abnormal = 1)
</select>
<select id="abnormalListStartCarByLoadIdAndWarehouseId" resultType="com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity">
select *
from logpm_trunkline_cars_load_scan
where load_id = #{loadId}
and warehouse_id = #{warehouseId}
and loading_abnormal = 1
and scan_status = '1'
</select>
</mapper>

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java

@ -11,4 +11,10 @@ public interface ICarsLoadAsyncService {
void costShareByLoadId(Long loadId,TrunklineCarsLoadEntity carsLoadEntity);
void abnormalListStartCarByLoadIdAndWarehouseId(Long loadId, Long warehouseId,Long userId,Long deptId,String nickName,String tenantId,String warehouseName);
void abnormalListUnloadByLoadIdAndWarehouseId(Long loadId, Long warehouseId, String warehouseName, Long loadScanId, String tenantId, Long userId, String nickName, Long firstLong);
void abnormalListUnloadCheckByLoadIdAndWarehouseId(Long loadId, Long warehouseId, String nodeName, String tenantId, Long userId, String nickName, Long firstLong);
}

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

@ -95,4 +95,6 @@ public interface ITrunklineCarsLoadScanService extends BaseService<TrunklineCars
List<TrunklineCarsLoadScanEntity> findListByLoadIdOrderByCreateTimeAsc(Long loadId);
IPage<TrunklineCarsLoadScanVO> abnormalList(IPage<Object> page, LoadCarsDTO loadCarsDTO);
List<TrunklineCarsLoadScanEntity> abnormalListStartCarByLoadIdAndWarehouseId(Long loadId, Long warehouseId);
}

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

@ -6,7 +6,9 @@ import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.feign.IDistributionStockArticleClient;
import com.logpm.trunkline.entity.*;
import com.logpm.trunkline.service.*;
import com.logpm.warehouse.entity.WarehouseAbnormalRecordEntity;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseAbnormalRecordClient;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
@ -41,6 +43,8 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
private IDistributionStockArticleClient distributionStockArticleClient;
@Autowired
private IBasicdataWarehouseClient warehouseClient;
@Autowired
private IWarehouseAbnormalRecordClient abnormalRecordClient;
@Async
@Override
@ -318,4 +322,86 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService {
}
@Async
@Override
public void abnormalListStartCarByLoadIdAndWarehouseId(Long loadId, Long warehouseId,Long userId,Long deptId,String nickName,String tenantId,String warehouseName) {
//先查询
List<TrunklineCarsLoadScanEntity> ls = trunklineCarsLoadScanService.abnormalListStartCarByLoadIdAndWarehouseId(loadId,warehouseId);
for (TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity : ls) {
Integer isData = trunklineCarsLoadScanEntity.getIsData();
if(isData == 1){
String loadCode = trunklineCarsLoadScanEntity.getLoadCode();
String waybillNo = trunklineCarsLoadScanEntity.getWaybillNo();
String orderCode = trunklineCarsLoadScanEntity.getOrderCode();
String scanCode = trunklineCarsLoadScanEntity.getScanCode();
Long scanId = trunklineCarsLoadScanEntity.getId();
//无装车计划
WarehouseAbnormalRecordEntity abnormalRecordEntity = new WarehouseAbnormalRecordEntity();
abnormalRecordEntity.setTenantId(tenantId);
abnormalRecordEntity.setCreateUser(userId);
abnormalRecordEntity.setUpdateUser(userId);
abnormalRecordEntity.setCreateDept(deptId);
abnormalRecordEntity.setType("2");
abnormalRecordEntity.setAbnormalType("2");
abnormalRecordEntity.setCarType("1");
abnormalRecordEntity.setUpWarehouseId(warehouseId);
abnormalRecordEntity.setUpWarehouseName(warehouseName);
abnormalRecordEntity.setCarsNo(loadCode);
abnormalRecordEntity.setWaybillNo(waybillNo);
abnormalRecordEntity.setOrderCode(orderCode);
abnormalRecordEntity.setOrderPackageCode(scanCode);
abnormalRecordEntity.setUpUserId(userId);
abnormalRecordEntity.setUpUserName(nickName);
abnormalRecordEntity.setAbnormalStatus(0);
abnormalRecordEntity.setUpTime(new Date());
abnormalRecordEntity.setAssociationId(scanId);
abnormalRecordEntity.setAssociationType(1);
abnormalRecordEntity.setRemark("无计划装车");
abnormalRecordClient.addAbnormalRecord(abnormalRecordEntity);
}
}
}
@Async
@Override
public void abnormalListUnloadByLoadIdAndWarehouseId(Long loadId, Long warehouseId, String warehouseName, Long loadScanId, String tenantId, Long userId, String nickName, Long deptId) {
TrunklineCarsLoadScanEntity carsLoadScanEntity = trunklineCarsLoadScanService.getById(loadScanId);
if(!Objects.isNull(carsLoadScanEntity)){
String loadCode = carsLoadScanEntity.getLoadCode();
String waybillNo = carsLoadScanEntity.getWaybillNo();
String orderCode = carsLoadScanEntity.getOrderCode();
String scanCode = carsLoadScanEntity.getScanCode();
//无装车记录
WarehouseAbnormalRecordEntity abnormalRecordEntity = new WarehouseAbnormalRecordEntity();
abnormalRecordEntity.setTenantId(tenantId);
abnormalRecordEntity.setCreateUser(userId);
abnormalRecordEntity.setUpdateUser(userId);
abnormalRecordEntity.setCreateDept(deptId);
abnormalRecordEntity.setType("1");
abnormalRecordEntity.setAbnormalType("3");
abnormalRecordEntity.setCarType("1");
abnormalRecordEntity.setUpWarehouseId(warehouseId);
abnormalRecordEntity.setUpWarehouseName(warehouseName);
abnormalRecordEntity.setCarsNo(loadCode);
abnormalRecordEntity.setWaybillNo(waybillNo);
abnormalRecordEntity.setOrderCode(orderCode);
abnormalRecordEntity.setOrderPackageCode(scanCode);
abnormalRecordEntity.setUpUserId(userId);
abnormalRecordEntity.setUpUserName(nickName);
abnormalRecordEntity.setAbnormalStatus(0);
abnormalRecordEntity.setUpTime(new Date());
abnormalRecordEntity.setAssociationId(loadScanId);
abnormalRecordEntity.setAssociationType(1);
abnormalRecordEntity.setRemark("无装车记录");
abnormalRecordClient.addAbnormalRecord(abnormalRecordEntity);
}
}
@Async
@Override
public void abnormalListUnloadCheckByLoadIdAndWarehouseId(Long loadId, Long warehouseId, String nodeName, String tenantId, Long userId, String nickName, Long firstLong) {
}
}

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

@ -7,6 +7,7 @@ import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity;
import com.logpm.trunkline.mapper.TrunklineCarsLoadScanMapper;
import com.logpm.trunkline.service.ITrunklineCarsLoadScanService;
import com.logpm.trunkline.vo.*;
import com.logpm.warehouse.feign.IWarehouseAbnormalRecordClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
@ -19,6 +20,9 @@ import java.util.Map;
@Service
@AllArgsConstructor
public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl<TrunklineCarsLoadScanMapper, TrunklineCarsLoadScanEntity> implements ITrunklineCarsLoadScanService {
private final IWarehouseAbnormalRecordClient warehouseAbnormalRecordClient;
@Override
public Integer findNumByLoadId(Long loadId) {
return baseMapper.findNumByLoadId(loadId);
@ -232,4 +236,9 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl<TrunklineC
return baseMapper.abnormalList(page,loadCarsDTO);
}
@Override
public List<TrunklineCarsLoadScanEntity> abnormalListStartCarByLoadIdAndWarehouseId(Long loadId, Long warehouseId) {
return baseMapper.abnormalListStartCarByLoadIdAndWarehouseId(loadId,warehouseId);
}
}

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

@ -39,6 +39,7 @@ import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.DictBiz;
@ -84,7 +85,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
private final IDistributionParcelNumberClient distributionParcelNumberClient;
private final ITrunklineCostShareRecordService trunklineCostShareRecordService;
private final ITrunklineAdvanceService advanceService;
private final IWarehouseAbnormalRecordClient abnormalRecordClient;
@Override
public IPage<TrunklineCarsLoadVO> loadCarsPageList(LoadCarsDTO loadCarsDTO) {
@ -286,6 +286,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsOrderService.updateStartNumByLoadIdAndWarehouseId(loadId,warehouseId);
//生成直发商家签收单
createCustomerSignOrder(loadId,warehouseId);
//生成异常列表
carsLoadAsyncService.abnormalListStartCarByLoadIdAndWarehouseId(loadId,warehouseId,AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()),AuthUtil.getNickName(),AuthUtil.getTenantId(), loadCarsDTO.getWarehouseName());
}catch (Exception e){
log.error("#############startCarByLoadId: 签收单或者更新数量失败",e);
}
@ -755,10 +757,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
try{
carsLoadAsyncService.saveLog(carsLoadEntity,currentCarsLoadLineEntity, CarsLoadLogTypeConstant.NET_UNLOAD_CARS_LOAD.getValue(),AuthUtil.getNickName(),AuthUtil.getUserId());
openOrderAsyncService.saveUnloadStartCarLog(currentCarsLoadLineEntity,AuthUtil.getNickName(),AuthUtil.getUserId());
}catch (Exception e){
log.warn("#############unloadByLoadId: 存入日志失败");
}
@ -794,6 +792,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
throw new CustomerException(400,"未知的卸车确认类型");
}
//无装车记录异常日志记录
try{
carsLoadAsyncService.abnormalListUnloadCheckByLoadIdAndWarehouseId(loadId,warehouseId,currentCarsLoadLineEntity.getNodeName(),AuthUtil.getTenantId(),AuthUtil.getUserId(),AuthUtil.getNickName(),Func.firstLong(AuthUtil.getDeptId()));
}catch (Exception e){
log.warn("###############unloadPackage: 存入异常列表记录失败");
}
//MQ卸车确认推送工厂
JSONObject jsonObject = new JSONObject();
@ -809,6 +814,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
rabbitTemplate.convertAndSend(RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_EXCHANGE, RabbitConstant.TRUNKLINE_UNLOAD_CONFIRM_ROUTING, map);
}
@Transactional(rollbackFor = Exception.class)
@ -4158,6 +4164,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//没有装车扫码记录
//不在计划中,则查询在哪个仓库中
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByOrderPackageCodeAndStatus(orderPackageCode);
Long loadScanId = null;
if(Objects.isNull(parcelListEntity)){
//没有包件数据
@ -4189,7 +4196,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName());
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity);
Long loadScanId = trunklineCarsLoadScanEntity.getId();
loadScanId = trunklineCarsLoadScanEntity.getId();
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId,warehouseName,loadId,loadCode,null,null,null,orderPackageCode,1,
1,0,1,trayId,trayCode,trayName,null,loadScanId,"无数据,补装车计划,异常装车");
@ -4240,7 +4247,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity);
Long loadScanId = trunklineCarsLoadScanEntity.getId();
loadScanId = trunklineCarsLoadScanEntity.getId();
//
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId,warehouseName,loadId,loadCode,waybillId,waybillNumber,orderCode,orderPackageCode,1,
@ -4313,18 +4320,27 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionStockArticleClient.addIncomingNum(currentOrderId,1);
}
}else{
Long packageId = distributionParcelListEntity.getId();
String packageStatus = "30";
distributionParcelListEntity.setOrderPackageStatus("20");
if(!Objects.isNull(warehouseWaybillEntity)){
Long destinationWarehouseId = warehouseWaybillEntity.getDestinationWarehouseId();//目的仓
if(destinationWarehouseId.equals(warehouseId)){
packageStatus = "20";
distributionParcelListEntity.setIsTransfer(0);
}else{
distributionParcelListEntity.setIsTransfer(1);
}
}
distributionParcelListClient.updateOrderPackageCodeById(packageId,packageStatus);
distributionParcelListClient.update(distributionParcelListEntity);
}
updownTypeClient.downPackageOrDelTray(orderPackageCode,wid);
}
//无装车记录异常日志记录
try{
carsLoadAsyncService.abnormalListUnloadByLoadIdAndWarehouseId(loadId,warehouseId,warehouseName,loadScanId,AuthUtil.getTenantId(),AuthUtil.getUserId(),AuthUtil.getNickName(),Func.firstLong(AuthUtil.getDeptId()));
}catch (Exception e){
log.warn("###############unloadPackage: 存入异常列表记录失败");
}
}else{
// carsLoadScanEntity.getS

15
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/OldSystemPushController.java

@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.warehouse.dto.TrayInfoDTO;
import com.logpm.warehouse.dto.WaybillDTO;
import com.logpm.warehouse.entity.SyncOldTrayTypeLogEntity;
import com.logpm.warehouse.entity.WarehouseLog;
import com.logpm.warehouse.entity.WarehouseTrayTypeEntity;
import com.logpm.warehouse.service.*;
@ -179,7 +178,7 @@ public class OldSystemPushController {
WarehouseLog warehouseLog = new WarehouseLog();
warehouseLog.setArgs(JSONObject.toJSONString(trayInfoDTO));
warehouseLog.setStatus(0);
warehouseLog.setType(2);
warehouseLog.setType(3);
warehouseLogService.save(warehouseLog);
asyncDataService.sendTrayInfoByOrderPackageCode(trayInfoDTO);
@ -188,21 +187,9 @@ public class OldSystemPushController {
warehouseLogService.updateById(warehouseLog);
return R.success("操作成功");
}catch (CustomerException e){
//存入打托信息
SyncOldTrayTypeLogEntity syncOldTrayTypeLogEntity = new SyncOldTrayTypeLogEntity();
syncOldTrayTypeLogEntity.setArgs(JSONObject.toJSONString(trayInfoDTO));
syncOldTrayTypeLogEntity.setSyncStatus(0);
syncOldTrayTypeLogEntity.setSyncNum(0);
syncOldTrayTypeLogService.save(syncOldTrayTypeLogEntity);
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
//存入打托信息
SyncOldTrayTypeLogEntity syncOldTrayTypeLogEntity = new SyncOldTrayTypeLogEntity();
syncOldTrayTypeLogEntity.setArgs(JSONObject.toJSONString(trayInfoDTO));
syncOldTrayTypeLogEntity.setSyncStatus(0);
syncOldTrayTypeLogEntity.setSyncNum(0);
syncOldTrayTypeLogService.save(syncOldTrayTypeLogEntity);
log.error("############sendOrders: 系统异常",e);
return R.fail(500,"############sendOrders: 系统异常");
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseAbnormalRecordClient.java

@ -15,6 +15,7 @@ public class WarehouseAbnormalRecordClient implements IWarehouseAbnormalRecordCl
@Override
public void addAbnormalRecord(WarehouseAbnormalRecordEntity warehouseAbnormalRecordEntity) {
warehouseAbnormalRecordEntity.setAbnormalStatus(0);
warehouseAbnormalRecordService.save(warehouseAbnormalRecordEntity);
}
}

58
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/AsyncDataServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.warehouse.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.basicdata.entity.BasicdataGoodsAllocationEntity;
import com.logpm.basicdata.entity.BasicdataGoodsShelfEntity;
@ -17,14 +18,12 @@ import com.logpm.oldproject.feign.ITrayClient;
import com.logpm.oldproject.feign.ITrayScanClient;
import com.logpm.oldproject.feign.ITrayScanDesClient;
import com.logpm.warehouse.dto.*;
import com.logpm.warehouse.entity.TaskQuestEntity;
import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity;
import com.logpm.warehouse.entity.WarehouseTrayTypeEntity;
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity;
import com.logpm.warehouse.entity.*;
import com.logpm.warehouse.service.*;
import com.logpm.warehouse.vo.AllocationWithTrayVO;
import com.logpm.warehouse.vo.QuestDetailVO;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.TenantNum;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.StringUtil;
@ -34,6 +33,7 @@ import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
@ -75,6 +75,8 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
private ITrayScanClient trayScanClient;
@Autowired
private ITrayScanDesClient trayScanDesClient;
@Autowired
private ISyncOldTrayTypeLogService syncOldTrayTypeLogService;
@Override
@Async
@ -419,6 +421,18 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
R r = trayTypeService.orderScanOrderPackageCodeSync(newTrayType,"T"+trayId,orderPackageCode,newWarehouseId);
int code1 = r.getCode();
if(code1 != 200){
//存入打托信息
SyncOldTrayTypeLogEntity syncOldTrayTypeLogEntity = new SyncOldTrayTypeLogEntity();
syncOldTrayTypeLogEntity.setCreateUser(1714696768639311873L);
syncOldTrayTypeLogEntity.setUpdateUser(1714696768639311873L);
syncOldTrayTypeLogEntity.setCreateDept(1649331096241836033L);
syncOldTrayTypeLogEntity.setTenantId(TenantNum.HUITONGCODE);
syncOldTrayTypeLogEntity.setCreateTime(new Date());
syncOldTrayTypeLogEntity.setUpdateTime(new Date());
syncOldTrayTypeLogEntity.setArgs(JSONObject.toJSONString(trayInfoDTO));
syncOldTrayTypeLogEntity.setSyncStatus(0);
syncOldTrayTypeLogEntity.setSyncNum(0);
syncOldTrayTypeLogService.save(syncOldTrayTypeLogEntity);
log.warn("####################orderStatusHandler: 二次打托失败 orderPackageCode={} trayCode={}",orderPackageCode,"T"+trayId);
}else{
log.info("####################orderStatusHandler: 二次打托成功 orderPackageCode={} trayCode={}",orderPackageCode,"T"+trayId);
@ -442,6 +456,18 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
R r = trayTypeService.orderScanOrderPackageCodeSync(newTrayType, "T" + trayId, orderPackageCode, newWarehouseId);
int code1 = r.getCode();
if(code1 != 200){
//存入打托信息
SyncOldTrayTypeLogEntity syncOldTrayTypeLogEntity = new SyncOldTrayTypeLogEntity();
syncOldTrayTypeLogEntity.setCreateUser(1714696768639311873L);
syncOldTrayTypeLogEntity.setUpdateUser(1714696768639311873L);
syncOldTrayTypeLogEntity.setCreateDept(1649331096241836033L);
syncOldTrayTypeLogEntity.setTenantId(TenantNum.HUITONGCODE);
syncOldTrayTypeLogEntity.setCreateTime(new Date());
syncOldTrayTypeLogEntity.setUpdateTime(new Date());
syncOldTrayTypeLogEntity.setArgs(JSONObject.toJSONString(trayInfoDTO));
syncOldTrayTypeLogEntity.setSyncStatus(0);
syncOldTrayTypeLogEntity.setSyncNum(0);
syncOldTrayTypeLogService.save(syncOldTrayTypeLogEntity);
log.warn("####################orderStatusHandler: 二次打托失败 orderPackageCode={} trayCode={}",orderPackageCode,"T"+trayId);
}else{
log.info("####################orderStatusHandler: 二次打托成功 orderPackageCode={} trayCode={}",orderPackageCode,"T"+trayId);
@ -454,9 +480,33 @@ public class AsyncDataServiceImpl implements IAsyncDataService {
R r = trayTypeService.orderScanOrderPackageCodeSync(newTrayType, "T" + trayId, orderPackageCode, newWarehouseId);
int code1 = r.getCode();
if(code1 != 200){
//存入打托信息
SyncOldTrayTypeLogEntity syncOldTrayTypeLogEntity = new SyncOldTrayTypeLogEntity();
syncOldTrayTypeLogEntity.setCreateUser(1714696768639311873L);
syncOldTrayTypeLogEntity.setUpdateUser(1714696768639311873L);
syncOldTrayTypeLogEntity.setCreateDept(1649331096241836033L);
syncOldTrayTypeLogEntity.setTenantId(TenantNum.HUITONGCODE);
syncOldTrayTypeLogEntity.setCreateTime(new Date());
syncOldTrayTypeLogEntity.setUpdateTime(new Date());
syncOldTrayTypeLogEntity.setArgs(JSONObject.toJSONString(trayInfoDTO));
syncOldTrayTypeLogEntity.setSyncStatus(0);
syncOldTrayTypeLogEntity.setSyncNum(0);
syncOldTrayTypeLogService.save(syncOldTrayTypeLogEntity);
log.warn("####################orderStatusHandler: 二次打托失败 orderPackageCode={} trayCode={}",orderPackageCode,"T"+trayId);
}
}else{
//存入打托信息
SyncOldTrayTypeLogEntity syncOldTrayTypeLogEntity = new SyncOldTrayTypeLogEntity();
syncOldTrayTypeLogEntity.setCreateUser(1714696768639311873L);
syncOldTrayTypeLogEntity.setUpdateUser(1714696768639311873L);
syncOldTrayTypeLogEntity.setCreateDept(1649331096241836033L);
syncOldTrayTypeLogEntity.setCreateTime(new Date());
syncOldTrayTypeLogEntity.setUpdateTime(new Date());
syncOldTrayTypeLogEntity.setTenantId(TenantNum.HUITONGCODE);
syncOldTrayTypeLogEntity.setArgs(JSONObject.toJSONString(trayInfoDTO));
syncOldTrayTypeLogEntity.setSyncStatus(0);
syncOldTrayTypeLogEntity.setSyncNum(0);
syncOldTrayTypeLogService.save(syncOldTrayTypeLogEntity);
log.warn("######################orderStatusHandler: 打托失败 msg={} code={}",msg,code);
log.warn("######################orderStatusHandler: 打托失败 orderPackageCode={} trayCode={}",orderPackageCode,"T"+trayId);
}

Loading…
Cancel
Save