Browse Source

1.解决签收超时问题

single_db
zhenghaoyu 1 year ago
parent
commit
c447edf882
  1. 18
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java
  2. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/Resp.java
  3. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

18
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java

@ -142,8 +142,17 @@ public class DistributionSignforAppController {
@PostMapping("/signfor")
@ApiOperationSupport(order = 2)
public R signfor(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
R msg = distributionSignforService.signfor(distrilbutionloadingscanDTO);
return msg;
R r = distributionSignforService.signfor(distrilbutionloadingscanDTO);
try{
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<String> packageCodes = (List<String>) r.getData();
for (String packageCode : packageCodes) {
updownTypeClient.downPackageOrDelTray(packageCode,myCurrentWarehouse.getId());
}
}catch (Exception e){
log.error("#############signfor: 下架失败");
}
return r;
}
/**
@ -217,8 +226,9 @@ public class DistributionSignforAppController {
public R oneclick(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
distributionSignfor.setIsClerk(false);
R r = distributionSignforService.oneclick(distributionSignfor);
List<Long> packageIds = (List<Long>)r.getData();
try{
List<Long> packageIds = (List<Long>)r.getData();
String orderPackageCodes = null;
for (Long packageId : packageIds) {
if(StringUtils.isBlank(orderPackageCodes)){
@ -230,7 +240,7 @@ public class DistributionSignforAppController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
updownTypeClient.downPackageOrDelTray(orderPackageCodes,myCurrentWarehouse.getId());
}catch (Exception e){
log.error("##############oneclick: 更新包件下架状态失败 packageIds={}",packageIds);
log.error("##############oneclick: 更新包件下架状态失败");
}
return r;
}

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/Resp.java

@ -1,7 +1,6 @@
package com.logpm.distribution.bean;
import lombok.Data;
import org.apache.poi.ss.formula.functions.T;
import org.springblade.core.tool.api.R;
@Data
@ -17,6 +16,15 @@ public class Resp extends R {
return resp;
}
public static Resp scanSuccessWithData(String msg,String audio,Object data){
Resp resp = new Resp();
resp.setCode(200);
resp.setMsg(msg);
resp.setData(data);
resp.setAudio(audio);
return resp;
}
public static Resp scanFail(String msg,String audio){
Resp resp = new Resp();
resp.setCode(3001);

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

@ -790,6 +790,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Transactional
public R signfor(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
List<String> packageCodes = new ArrayList<>();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// ---------------------------------2023-09-09 包件签收调整---------------------------------------------------------------
@ -864,7 +865,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//更新签收人
Integer m = distributionSignforMapper.updateSignUser(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), AuthUtil.getUser());
//下架解托
warehouseUpdownTypeClient.downPackageOrDelTray(loadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId());
packageCodes.add(loadscanEntity.getOrderPackageCode());
// warehouseUpdownTypeClient.downPackageOrDelTray(loadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId());
//维护订单状态
} else {
//这里装车的数据需要进行补录
@ -931,7 +933,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//更新签收人
Integer m = distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser());
//包件解托下架
warehouseUpdownTypeClient.downPackageOrDelTray(collect.get(0).getOrderPackageCode(), myCurrentWarehouse.getId());
packageCodes.add(collect.get(0).getOrderPackageCode());
// warehouseUpdownTypeClient.downPackageOrDelTray(collect.get(0).getOrderPackageCode(), myCurrentWarehouse.getId());
}
//修改包件状态为装车、签收
DistributionParcelListEntity updatePackage = collect.get(0);
@ -983,7 +986,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionReservationService.maintenanceReservationInfo(distrilbutionloadingscanDTO.getReservationId());
//维护配送任务
distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId());
return Resp.scanSuccess("签收成功", str);
return Resp.scanSuccessWithData("签收成功", str,packageCodes);
}
private boolean judgmentClient(DistributionReservationEntity distributionReservationEntity, Long stockArticleId) {

Loading…
Cancel
Save