Browse Source

一键签收梦天推送调整

single_db
汤建军 1 year ago
parent
commit
6a915da8d5
  1. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java
  2. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java

@ -30,6 +30,7 @@ import com.logpm.distribution.entity.DistributionSignPrintEntity;
import com.logpm.distribution.entity.DistributionSignforEntity; import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.excel.DistributionSignforExcel; import com.logpm.distribution.excel.DistributionSignforExcel;
import com.logpm.distribution.excel.DistributionSignforOwnExcel; import com.logpm.distribution.excel.DistributionSignforOwnExcel;
import com.logpm.distribution.service.IDistributionAsyncService;
import com.logpm.distribution.service.IDistributionReservationService; import com.logpm.distribution.service.IDistributionReservationService;
import com.logpm.distribution.service.IDistributionSignforService; import com.logpm.distribution.service.IDistributionSignforService;
import com.logpm.distribution.service.impl.DistributionAddvalueServiceImpl; import com.logpm.distribution.service.impl.DistributionAddvalueServiceImpl;
@ -82,6 +83,8 @@ public class DistributionSignforController extends BladeController {
private final IBasicdataWarehouseClient warehouseClient; private final IBasicdataWarehouseClient warehouseClient;
private final IDistributionAsyncService distributionAsyncService;
/** /**
* 签收管理 详情 * 签收管理 详情
*/ */
@ -268,9 +271,18 @@ public class DistributionSignforController extends BladeController {
@ApiOperation(value = "新增", notes = "传入distributionSignfor") @ApiOperation(value = "新增", notes = "传入distributionSignfor")
public R oneclick(@Valid @RequestBody DistributionSignforDTO distributionSignfor) { public R oneclick(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
distributionSignfor.setIsClerk(true); distributionSignfor.setIsClerk(true);
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
R r = distributionSignforService.oneclick(distributionSignfor); R r = distributionSignforService.oneclick(distributionSignfor);
List<String> packageCodes = (List<String>)r.getData(); List<String> packageCodes = (List<String>)r.getData();
try{ try{
Map<String,Object> data = (Map<String, Object>) r.getData();
if (Func.isNotEmpty(data)){
List<Long> packageIds = (List<Long>) data.get("packageIds");
Long signId = (Long) data.get("signId");
distributionAsyncService.handlPakcage(packageIds, myCurrentWarehouse.getId());
distributionAsyncService.sendReviewFactory(signId,myCurrentWarehouse.getName() ,myCurrentWarehouse.getId());
}
String orderPackageCodes = null; String orderPackageCodes = null;
for (String packageCode : packageCodes) { for (String packageCode : packageCodes) {
if(StringUtils.isBlank(orderPackageCodes)){ if(StringUtils.isBlank(orderPackageCodes)){
@ -279,7 +291,6 @@ public class DistributionSignforController extends BladeController {
orderPackageCodes = orderPackageCodes + "," +packageCode; orderPackageCodes = orderPackageCodes + "," +packageCode;
} }
} }
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
updownTypeClient.downPackageOrDelTray(orderPackageCodes,myCurrentWarehouse.getId()); updownTypeClient.downPackageOrDelTray(orderPackageCodes,myCurrentWarehouse.getId());
}catch (Exception e){ }catch (Exception e){
log.error("##############oneclick: 更新包件下架状态失败 packageCodes={}",packageCodes); log.error("##############oneclick: 更新包件下架状态失败 packageCodes={}",packageCodes);

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

@ -2768,6 +2768,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error("#############deliveryId参数错误:{}", distributionSignfor.getDeliveryId()); log.error("#############deliveryId参数错误:{}", distributionSignfor.getDeliveryId());
return R.fail("服务器正忙~~"); return R.fail("服务器正忙~~");
} }
Map<String,Object> map = new HashMap<>();
DistributionDeliverySelfEntity distributionDeliverySelfEntity = null; DistributionDeliverySelfEntity distributionDeliverySelfEntity = null;
if (distributionDeliveryListEntity.getKind().equals("1")) { if (distributionDeliveryListEntity.getKind().equals("1")) {
//自主 //自主
@ -3139,11 +3141,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionStockArticleService.maintenanceOrderInfo(orderCode,myCurrentWarehouse.getId()); distributionStockArticleService.maintenanceOrderInfo(orderCode,myCurrentWarehouse.getId());
} }
if (Func.isNotEmpty(packageIds)) { if (Func.isNotEmpty(packageIds)) {
distributionAsyncService.handlPakcage(packageIds, myCurrentWarehouse.getId()); map.put("packageIds",packageIds);
map.put("signId",distributionSignforEntity.getId());
map.put("warehouse",myCurrentWarehouse);
// distributionAsyncService.handlPakcage(packageIds, myCurrentWarehouse.getId());
//批量推送 //批量推送
distributionAsyncService.sendReviewFactory(distributionSignforEntity.getId(),myCurrentWarehouse.getName() ,myCurrentWarehouse.getId()); // distributionAsyncService.sendReviewFactory(distributionSignforEntity.getId(),myCurrentWarehouse.getName() ,myCurrentWarehouse.getId());
} }
} }
@ -3179,9 +3183,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
boolean update = this.update(set); boolean update = this.update(set);
//维护配送信息 //维护配送信息
distributionDeliveryListService.maintenanceDeliveryInfo(distributionSignforEntity.getDeliveryId()); distributionDeliveryListService.maintenanceDeliveryInfo(distributionSignforEntity.getDeliveryId());
return R.status(true); return R.data(map);
} @Override }
@Override
@Transactional @Transactional
public R oneclickPDA(DistributionSignforDTO distributionSignfor) { public R oneclickPDA(DistributionSignforDTO distributionSignfor) {

Loading…
Cancel
Save