Browse Source

1.包件跟踪日志逻辑优化

master
zhenghaoyu 8 months ago
parent
commit
89d54c236d
  1. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklinePackageTrackLogClient.java
  2. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  3. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  4. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  5. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklinePackageTrackLogClient.java
  6. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklinePackageTrackLogClient.java

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@ -16,6 +17,6 @@ public interface ITrunklinePackageTrackLogClient {
String API_PREFIX = "trunklinePackageTrackLog/client";
@PostMapping(API_PREFIX+"/addBatchPackageTrackLog")
void addPackageTrackLog(@RequestParam List<JSONObject> addPackageTrackLogList, @RequestParam List<String> orderPackageCodes, @RequestParam Integer workNode);
void addPackageTrackLog(@RequestBody List<JSONObject> addPackageTrackLogList);
}

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -49,11 +49,11 @@ import com.logpm.distribution.vo.app.DistributionAppParcelListVO;
import com.logpm.distribution.vo.app.DistributionAppReservationVO;
import com.logpm.distribution.vo.print.PrintPreviewVO;
import com.logpm.distribution.wrapper.*;
import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient;
import com.logpm.factorydata.enums.BrandEnums;
import com.logpm.factorydata.util.FactoryDataMessageSender;
import com.logpm.factorydata.vo.NodePushMsg;
import com.logpm.factorydata.vo.PushData;
import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient;
import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.*;
@ -85,7 +85,6 @@ import org.springblade.common.constant.stockup.StockAssignStatusConstant;
import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.serviceConstant.ServiceConstant;
import org.springblade.common.utils.CommonUtil;
import org.springblade.common.utils.QRCodeUtil;
import org.springblade.common.utils.StringSplitUtil;
import org.springblade.common.utils.TemplateUtil;
@ -1054,7 +1053,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects);
//查询已装车件数
// String str = getLoadingMsg(distrilbutionloadingscanDTO);
trunklinePackageTrackLogClient.addPackageTrackLog(aaa,orderPackageCodes,WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
Integer carLaodNum = getCarLaodNum(distrilbutionloadingscanDTO.getDeliveryId());
return Resp.scanSuccessWithData("装车成功", carLaodNum + "件", carLaodNum);
@ -5589,7 +5588,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
}
trunklinePackageTrackLogClient.addPackageTrackLog(aaa,orderPackageCodes,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode());
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
return Resp.scanSuccess("操作成功", "异常" + abnormalTotal + "件");

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -1906,7 +1906,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
});
if (!addOrderPackageCodes.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(addPackageLog,addOrderPackageCodes,WorkNodeEnums.PLAN_DELIVERY.getCode());
trunklinePackageTrackLogClient.addPackageTrackLog(addPackageLog);
}
if (Func.isNotEmpty(oldStockArticle)) {
@ -1984,7 +1984,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
});
}
if (!cancelOrderPackageCodes.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(cancelPackageLog,cancelOrderPackageCodes,WorkNodeEnums.CANCEL_DELIVERY.getCode());
trunklinePackageTrackLogClient.addPackageTrackLog(cancelPackageLog);
}
//库存品修改
//查询出原来的库存品信息
@ -2733,7 +2733,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
});
if (!aaa.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(aaa,orderPackageCodes,WorkNodeEnums.CANCEL_DELIVERY.getCode());
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
}
} else if (rs.getIsZero().equals(IsOrNoConstant.yes.getValue())) {
@ -3322,7 +3322,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
distributionReservationStockarticleEntity.setReservationNum(packageNum.get());
//日志记录
trunklinePackageTrackLogClient.addPackageTrackLog(aaa,orderPackageCodes,WorkNodeEnums.PLAN_DELIVERY.getCode());
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
//维护对应订单的配送件数
} else if ("1".equals(s.getIsZero())) {
//零担订单处理

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -2691,7 +2691,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//维护配送任务
distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId());
trunklinePackageTrackLogClient.addPackageTrackLog(aaa,orderPackageCodes,WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
return Resp.scanSuccessWithData("签收成功", str, orderPackageCodes);
} catch (Exception e) {
log.error(">>>>> 签收异常报错", e);
@ -3452,7 +3452,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionParcelListMapper.updateOrderPackageCodeById(parcelListEntity.getId(), OrderPackageStatusConstant.yiqianshou.getValue());
//还需要维护包件状态
distributionAsyncService.maintenanceOrderStatus(parcelListEntity.getOrderCode(), parcelListEntity.getWarehouseId());
trunklinePackageTrackLogClient.addPackageTrackLog(aaa,orderPackageCodes,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode());
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
} else {
log.error("############出现相同的包件码:{}", distrilbutionloadingscanDTO.getBarcode());
return Resp.scanFail("操作失败", "包件信息有误");
@ -5294,7 +5294,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
map.put("warehouseId", myCurrentWarehouse.getId());
warehouseUpdownTypeClient.downDeliveryPackage(map);
trunklinePackageTrackLogClient.addPackageTrackLog(aaa,packageCodes,WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode());
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
}
//批量维护订单信息

12
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklinePackageTrackLogClient.java

@ -10,6 +10,7 @@ import springfox.documentation.annotations.ApiIgnore;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@Slf4j
@ApiIgnore()
@ -20,14 +21,21 @@ public class TrunklinePackageTrackLogClient implements ITrunklinePackageTrackLog
private final IPackageTrackLogAsyncService packageTrackLogAsyncService;
@Override
public void addPackageTrackLog(List<JSONObject> addPackageTrackLogList, List<String> orderPackageCodes, Integer workNode) {
public void addPackageTrackLog(List<JSONObject> addPackageTrackLogList) {
List<WarehousePackageTrackLogEntity> ls = new ArrayList<>();
List<String> orderPackageCodes = new ArrayList<>();
final Integer[] workNode = {null};
addPackageTrackLogList.forEach(jsonObject -> {
WarehousePackageTrackLogEntity warehousePackageTrackLogEntity = jsonObject.toJavaObject(WarehousePackageTrackLogEntity.class);
orderPackageCodes.add(warehousePackageTrackLogEntity.getOrderPackageCode());
if (Objects.isNull(workNode[0])){
workNode[0] = warehousePackageTrackLogEntity.getWorkNode();
}
ls.add(warehousePackageTrackLogEntity);
});
packageTrackLogAsyncService.addBatchPackageTrackLog(ls, orderPackageCodes, workNode);
packageTrackLogAsyncService.addBatchPackageTrackLog(ls, orderPackageCodes, workNode[0]);
}
}

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

@ -34,6 +34,7 @@ import com.logpm.factorydata.vo.PushData;
import com.logpm.trunkline.bean.Resp;
import com.logpm.trunkline.dto.*;
import com.logpm.trunkline.entity.*;
import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient;
import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper;
import com.logpm.trunkline.service.*;
import com.logpm.trunkline.vo.*;
@ -112,9 +113,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
private final IBasicdataDriverArteryClient driverArteryClient;
private final ITrunklineLoadSignPhotoService loadSignPhotoService;
private final ITrunklineWaybillPackageService waybillPackageService;
private final ITrunklinePackageTrackLogClient packageTrackLogClient;
@Override
public IPage<TrunklineCarsLoadVO> loadCarsPageList(LoadCarsDTO loadCarsDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(loadCarsDTO.getPageNum());
page.setSize(loadCarsDTO.getPageSize());

Loading…
Cancel
Save