Browse Source

1.修改时间威24小时

2.修复节点推送的数据提供格式
dev
pref_mail@163.com 1 month ago
parent
commit
4846e57206
  1. 5
      blade-biz-common/src/main/java/org/springblade/common/constant/OperatModeConstant.java
  2. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscanEntity.java
  3. 38
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  4. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionNodeWorkServiceImpl.java
  5. 73
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  6. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/OldWaybillClient.java

5
blade-biz-common/src/main/java/org/springblade/common/constant/OperatModeConstant.java

@ -5,7 +5,8 @@ package org.springblade.common.constant;
*/
public interface OperatModeConstant {
public static final String SCAN = "扫描";
public static final String BATCH = "批量";
public static final String SCAN = "司机扫描签收";
public static final String BATCH = "司机批量签收";
public static final String CLERK= "文员批量签收";
}

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscanEntity.java

@ -350,7 +350,7 @@ public class DistributionLoadscanEntity extends TenantEntity {
/**
* 是否异常装车 1- 2-
* 是否是零担 1 =零单
*/
@ApiModelProperty(value = "是否异常装车 1-否 2-是")
private Integer isZero;

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

@ -763,7 +763,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionSignforEntity.setDeliveryDriverName(distributionDeliveryList.getDriverName());
distributionSignforEntity.setDeliveryDriverId(distributionDeliveryList.getDriverId());
//配送时间
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String format = simpleDateFormat.format(new Date());
distributionSignforEntity.setDeliveryTime(format);
//通过客户查询已经上车的订单(待定)
@ -1369,9 +1369,37 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
for (DistributionLoadscanEntity distributionParcelListEntity : pushNodeList) {
PackageData packageData = new PackageData();
packageData.setPackageCode(distributionParcelListEntity.getOrderPackageCode());
packageData.setPackageType(PackageTypeEnums.CMP);
packageData.setNumber(1);
if(distributionParcelListEntity.getIsZero().equals(1)){
//标识零担
packageData.setNumber(distributionParcelListEntity.getPackageNub());
DistributionParcelListEntity byId = distributionParcelListService.getById(distributionParcelListEntity.getPackageId());
if(Func.isNotEmpty(byId)){
packageData.setOrderCode(byId.getOrderCode());
if(Func.isEmpty(byId.getBrandName())){
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(byId.getStockArticleId());
if(ObjectUtils.isNotNull(stockArticleEntity)){
packageData.setBrand(stockArticleEntity.getBrand());
}
}else{
packageData.setBrand(byId.getBrandName());
}
packageData.setWaybillNumber(byId.getWaybillNumber());
// 获取品类
packageData.setProductName(byId.getFirsts());
}
packageData.setPackageCode(distributionParcelListEntity.getOrderPackageCode());
packageData.setPackageType(PackageTypeEnums.LTL);
packageData.setNumber(1);
}else if(distributionParcelListEntity.getIsZero().equals(0)){
// 包件
packageData.setPackageCode(distributionParcelListEntity.getOrderPackageCode());
packageData.setPackageType(PackageTypeEnums.CMP);
packageData.setNumber(1);
}
data.add(packageData);
}
@ -4957,7 +4985,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (abnormalPackageLoadingNum != 0) {
return Resp.scanFail("存在异常请处理", "存在异常请处理");
}
String format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date());
String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
String loadingId = distrilbutionloadingscanDTO.getLoadingId();
Boolean b = false;
Boolean isEnd = false;

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

@ -188,7 +188,7 @@ public class DistributionNodeWorkServiceImpl implements IDistributionNodeWorkSer
.build();
factoryDataMessageSender.sendNodeDataByBrand(nodePushMsg);
} catch (Exception e) {
log.error("推送工厂失败:{}", e);
log.error("推送工厂失败:", e);
}
}

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

@ -775,7 +775,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
for (DistributionLoadscanEntity distributionLoadscanEntity : list) {
PackageData packageData = new PackageData();
packageData.setSignTime(org.springblade.core.tool.utils.DateUtil.parse(distributionLoadscanEntity.getSigningTime(),"yyyy-MM-dd hh:mm:ss"));
packageData.setSignTime(org.springblade.core.tool.utils.DateUtil.parse(distributionLoadscanEntity.getSigningTime(),"yyyy-MM-dd HH:mm:ss"));
packageData.setSignUser(distributionLoadscanEntity.getSigningUser());
// 增加装车扫描人
packageData.setLoadingUserName(distributionLoadscanEntity.getScanUser());
@ -915,6 +915,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
List<DisStockListDetailEntity> detailEntities = distributionReservationMapper.selectInventoryListByReservation(distrilbutionloadingscanDTO.getReservationId());
List<JSONObject> jsonObjects = new ArrayList<>();
if (Func.isNotEmpty(split)) {
List<DistributionLoadscaninvnEntity> pushList = new ArrayList<>();
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
for (String s : split) {
List<DisStockListDetailEntity> inventoryPackage = detailEntities.stream().filter(f -> Func.isNotEmpty(f.getStockPackageCode()) && f.getStockPackageCode().equals(s)).collect(Collectors.toList());
if (Func.isNotEmpty(inventoryPackage) && inventoryPackage.size() == 1) {
@ -938,6 +942,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscaninvnEntity.setSignforType(LoadScanSigningTypeStatusConstant.wenyuanpiliangqianshou.getValue());
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
loadscaninvnEntity.setOneQclick(1);
pushList.add(loadscaninvnEntity);
distributionLoadscaninvnService.updateById(loadscaninvnEntity);
// //维护签收数量
// Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
@ -950,7 +955,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//不存在装车数据,需要进行装车数据的补录
//库存品未进行装车
//这里装车的数据需要进行补录
DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfDTO();
if (deliveryListEntity.getKind().equals(ServiceConstant.DELIVERLIST_KIND_SELF)) {
distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectOne(new QueryWrapper<DistributionDeliverySelfEntity>().lambda()
@ -1006,6 +1011,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscaninvnEntity.setSigningUserId(user.getUserId());
distributionLoadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date(System.currentTimeMillis() + (6 * 1000))));
distributionLoadscaninvnService.save(distributionLoadscaninvnEntity);
pushList.add(distributionLoadscaninvnEntity);
// //更新装车数量
// Integer j = distributionSignforMapper.updateLoadAndsignforByinvn(distributionLoadscaninvnEntity.getDeliveryId(), distributionLoadscaninvnEntity.getReservationId(), distributionLoadscaninvnEntity.getPackageNub());
//更新签收人
@ -1020,6 +1026,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
jsonObject.put("num", 1);
jsonObject.put("remark", "文员签收");
jsonObjects.add(jsonObject);
}
//修改对应库存品包件的签收数量
DisStockListDetailEntity disStockListDetailEntity = inventoryPackage.get(0);
@ -1033,10 +1042,17 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
}
warehouseUpdownStockUpAreaClient.downStockUpShelf(jsonObjects);
// 增加PC库存品签收
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByStock(deliveryListEntity, pushList, OperatModeConstant.CLERK);
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
}
//维护签收数量
this.maintenanceSignfor(distrilbutionloadingscanDTO.getReservationId());
return R.status(true);
}
@ -1261,6 +1277,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// DistributionDeliveryTripartiteVO deliveryTripartiteInfo = distributionDeliveryTripartiteMapper.getDeliveryTripartiteInfo(deliveryListEntity.getId());
// BeanUtils.copyProperties(deliveryTripartiteInfo, deliverySelfInfo);
// }
List<DistributionLoadscanEntity> pushList = new ArrayList<>();
//查询该车次负责司机
for (DistributionReservationZeroPackageEntity reservationZeroPackageEntity : reservationZeroPackageEntities) {
//查询订单
@ -1351,6 +1370,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
unLoadscanEntity.setOneQclick(1);
unLoadscanEntity.setMsg("文员进行零担订单装车和签收补录");
distributionLoadscanService.save(unLoadscanEntity);
pushList.add(unLoadscanEntity);
//更新装车和签收数量
Integer i = distributionSignforMapper.updateSignforByReservationId(unLoadscanEntity.getDeliveryId(), unLoadscanEntity.getReservationId(), unLoadscanEntity.getReceivedQuantity());
//更新装车时间
@ -1380,6 +1400,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setPackageNub(reservationZeroPackageEntity.getQuantity());
loadscanEntity.setMsg("文员进行签收补录");
distributionLoadscanService.updateById(loadscanEntity);
pushList.add(loadscanEntity);
distributionParcelNumberEntity.setHandQuantity(a);
distributionParcelNumberEntity.setSigninQuantity(b);
distributionParcelNumberEntity.setOutboundQuantity(c);
@ -1400,6 +1422,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionDeliveryListService.updateById(deliveryListEntity);
//维护客户状态
distributionReservationService.maintenanceReservationInfo(reservationId);
// 发送作业节点
// 作业节点推送
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByZero(deliveryListEntity, pushList,OperatModeConstant.BATCH);
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
//查询计划和是否进行装车
return R.success("操作成功");
}
@ -3139,14 +3168,30 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
for (DistributionLoadscanEntity distributionParcelListEntity : pushList) {
PackageData packageData = new PackageData();
packageData.setPackageCode(distributionParcelListEntity.getOrderPackageCode());
packageData.setPackageType(PackageTypeEnums.CMP);
packageData.setNumber(1);
DistributionParcelListEntity distributionParcelListEntity1 = distributionParcelListService.selectByOrderPackageCode(distributionParcelListEntity.getOrderPackageCode(), distributionParcelListEntity.getWarehouseId());
if (Func.isNotEmpty(distributionParcelListEntity1)) {
packageData.setBrand(distributionParcelListEntity1.getBrandName());
DistributionParcelListEntity distributionParcelListEntity1 = distributionParcelListService.getById(distributionParcelListEntity.getPackageId());
if(distributionParcelListEntity.getIsZero().equals(0)){
// 包件
packageData.setPackageType(PackageTypeEnums.CMP);
packageData.setNumber(1);
if (Func.isNotEmpty(distributionParcelListEntity1)) {
packageData.setBrand(distributionParcelListEntity1.getBrandName());
packageData.setPackageCode(distributionParcelListEntity1.getOrderPackageCode());
packageData.setOrderCode(distributionParcelListEntity1.getOrderCode());
data.add(packageData);
}
}else if(distributionParcelListEntity.getIsZero().equals(1)){
// 零担
packageData.setPackageType(PackageTypeEnums.LTL);
packageData.setNumber(distributionLoadscanEntity.getReceivedQuantity());
if (Func.isNotEmpty(distributionParcelListEntity1)) {
packageData.setOrderCode(distributionParcelListEntity1.getOrderCode());
packageData.setBrand(distributionParcelListEntity1.getBrandName());
packageData.setWaybillNumber(distributionParcelListEntity1.getWaybillNumber());
packageData.setProductName(distributionParcelListEntity1.getFirsts());
}
}
data.add(packageData);
}
@ -3471,7 +3516,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// 推送作业节点
// 作业节点数据推送
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity, distributionReservationEntity, pushDatas, OperatModeConstant.BATCH);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(deliveryListEntity, distributionReservationEntity, pushDatas, OperatModeConstant.CLERK);
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
@ -6768,7 +6813,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return Resp.scanFail("服务器正忙...", "服务器正忙");
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List<String> orderCodes = new ArrayList<>();
List<DistributionLoadscanEntity> pushList = new ArrayList<>();
BladeUser user = AuthUtil.getUser();
@ -6978,7 +7023,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// 作业节点推送
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByZero(deliveryListEntity, pushList);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByZero(deliveryListEntity, pushList, OperatModeConstant.SCAN);
iDistributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
@ -6986,7 +7031,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return Resp.scanSuccess("签收成功", str);
}
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildDistributionSignforVOByZero(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushList) {
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildDistributionSignforVOByZero(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushList,String operatMode) {
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = new NodeFanoutMsg();
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD);
@ -6996,7 +7041,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
nodeFanoutMsg.setOperator(AuthUtil.getNickName());
nodeFanoutMsg.setOperatorTime(distributionDeliveryListEntity.getUpdateTime());
// DistributionTaskVO taskVO = buildDistributionTaskVO(distributionDeliveryListEntity, AuthUtil.getUserId());
org.springblade.common.model.DistributionSignforVO distributionLoadVO = new org.springblade.common.model.DistributionSignforVO();
DistributionLoadscanEntity distributionLoadscanEntity = pushList.get(0);
@ -7005,6 +7049,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadVO.setDriverId(distributionLoadscanEntity.getDriverId());
distributionLoadVO.setVehicleName(distributionLoadscanEntity.getVehicleName());
distributionLoadVO.setVehicleId(distributionLoadscanEntity.getVehicleId());
distributionLoadVO.setOperatMode(operatMode);
DistributionReservationEntity byId = distributionReservationService.getById(distributionLoadscanEntity.getReservationId());
if (!Func.isEmpty(byId)) {
distributionLoadVO.setReservationCode(byId.getReservationCode());

2
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/OldWaybillClient.java

@ -85,7 +85,7 @@ public class OldWaybillClient implements IOldWaybillClient {
for (int i1 = 0; i1 < unitNos.size(); i1++) {
String unitNo = unitNos.getString(i1);
log.info(">>>>>>>> 保存开单推送的已入库包件 {} 保存到新系统", unitNo);
String operationTime = DateUtil.format(new Date(), "yyyy-MM-dd hh:mm:ss");
String operationTime = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss");
oldSystemWaybillClient.handleDataToPlatform(unitNo, operationTime,warehouseId,1);
}
}

Loading…
Cancel
Save