Browse Source

异常装车BUG修复

master
汤建军 10 months ago
parent
commit
71a91f9b5c
  1. 80
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java
  2. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

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

@ -75,7 +75,7 @@ public class DistributionSignforAppController {
@ApiOperationSupport(order = 5)
@ApiOperation(value = "列表", notes = "DistributionAppDeliveryListDTO")
public R<List<DistributionAppSignforVO>> custom(DistributionAppDeliveryListDTO distributionDeliveryList) {
List<DistributionAppSignforVO> pages = distributionSignforService.getAppDeliveryreservationListPage( distributionDeliveryList);
List<DistributionAppSignforVO> pages = distributionSignforService.getAppDeliveryreservationListPage(distributionDeliveryList);
return R.data(pages);
}
@ -87,7 +87,7 @@ public class DistributionSignforAppController {
@ApiOperationSupport(order = 5)
@ApiOperation(value = "列表", notes = "DistributionAppDeliveryListDTO")
public R<List<DistributionAppStockArticleVO>> order(DistributionAppDeliveryListDTO distributionDeliveryList) {
List<DistributionAppStockArticleVO> pages = distributionSignforService.getAppDeliveryorderListPage( distributionDeliveryList);
List<DistributionAppStockArticleVO> pages = distributionSignforService.getAppDeliveryorderListPage(distributionDeliveryList);
return R.data(pages);
}
@ -141,30 +141,30 @@ public class DistributionSignforAppController {
@PostMapping("/signfor")
@ApiOperationSupport(order = 2)
public R signfor(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
R r = distributionSignforService.signfor(distrilbutionloadingscanDTO);
R r = distributionSignforService.signfor(distrilbutionloadingscanDTO);
long time = new Date().getTime();
try{
try {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn("#############signfor:"+time+" 下架仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
if (Objects.isNull(myCurrentWarehouse)) {
log.warn("#############signfor:" + time + " 下架仓库信息为空 myCurrentWarehouse={}", myCurrentWarehouse);
throw new CustomerException("下架仓库信息为空");
}
List<String> packageCodes = (List<String>) r.getData();
log.info("#############signfor:"+time+" 处理下架的包件 packageCodes={}",packageCodes);
log.info("#############signfor:" + time + " 处理下架的包件 packageCodes={}", packageCodes);
String orderPackageCodes = null;
if(packageCodes!=null){
if (packageCodes != null) {
for (String packageCode : packageCodes) {
if(StringUtils.isBlank(orderPackageCodes)){
if (StringUtils.isBlank(orderPackageCodes)) {
orderPackageCodes = packageCode;
}else{
} else {
orderPackageCodes = orderPackageCodes + "," + packageCode;
}
}
updownTypeClient.downPackageOrDelTray(orderPackageCodes,myCurrentWarehouse.getId(),"签收下架解托");
updownTypeClient.downPackageOrDelTray(orderPackageCodes, myCurrentWarehouse.getId(), "签收下架解托");
}
}catch (Exception e){
log.error("#############signfor:"+time+" 下架失败",e);
} catch (Exception e) {
log.error("#############signfor:" + time + " 下架失败", e);
}
return r;
}
@ -175,7 +175,7 @@ public class DistributionSignforAppController {
@PostMapping("/zeroSignfor")
@ApiOperationSupport(order = 2)
public R zeroSignfor(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
R msg = distributionSignforService.zeroSignfor(distrilbutionloadingscanDTO);
R msg = distributionSignforService.zeroSignfor(distrilbutionloadingscanDTO);
return msg;
}
@ -185,7 +185,7 @@ public class DistributionSignforAppController {
@PostMapping("/signforIn")
@ApiOperationSupport(order = 2)
public R signforIn(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
R msg = distributionSignforService.signforIn(distrilbutionloadingscanDTO);
R msg = distributionSignforService.signforIn(distrilbutionloadingscanDTO);
return msg;
}
@ -211,23 +211,23 @@ public class DistributionSignforAppController {
}
/**
* 司机扫描签收管理 不在配送单签收
*/
@PostMapping("/signforcontinue")
@ApiOperationSupport(order = 2)
public R signforcontinue(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
R msg = distributionSignforService.signforcontinue(distrilbutionloadingscanDTO);
R msg = distributionSignforService.signforcontinue(distrilbutionloadingscanDTO);
return msg;
}
/**
* 司机签收管理 确认签收
*/
@PostMapping("/signforack")
@ApiOperationSupport(order = 2)
public R signforack(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
R msg = distributionSignforService.signforack(distributionSignfor);
R msg = distributionSignforService.signforack(distributionSignfor);
return msg;
}
@ -239,21 +239,21 @@ public class DistributionSignforAppController {
@ApiOperation(value = "司机一键签收", notes = "传入distributionSignfor")
public R oneclick(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
distributionSignfor.setIsClerk(false);
R r = distributionSignforService.oneclickPDA(distributionSignfor);
List<String> packageCodes = (List<String>)r.getData();
try{
R r = distributionSignforService.oneclickPDA(distributionSignfor);
List<String> packageCodes = (List<String>) r.getData();
try {
String orderPackageCodes = null;
for (String packageCode : packageCodes) {
if(StringUtils.isBlank(orderPackageCodes)){
orderPackageCodes = packageCode+"";
}else{
if (StringUtils.isBlank(orderPackageCodes)) {
orderPackageCodes = packageCode + "";
} else {
orderPackageCodes = orderPackageCodes + "," + packageCode;
}
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
updownTypeClient.downPackageOrDelTray(orderPackageCodes,myCurrentWarehouse.getId(),"司机一键签收下架解托");
}catch (Exception e){
log.error("##############oneclick: 更新包件下架状态失败 packageCodes={}",packageCodes);
updownTypeClient.downPackageOrDelTray(orderPackageCodes, myCurrentWarehouse.getId(), "司机一键签收下架解托");
} catch (Exception e) {
log.error("##############oneclick: 更新包件下架状态失败 packageCodes={}", packageCodes);
}
return r;
}
@ -265,9 +265,10 @@ public class DistributionSignforAppController {
@ApiOperationSupport(order = 4)
@ApiOperation(value = "离线签收", notes = "传入Json串")
public R offline(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
R msg = distributionSignforService.offline(distributionSignfor.getOfflineJson());
R msg = distributionSignforService.offline(distributionSignfor.getOfflineJson());
return msg;
}
/**
* 签收管理 回显照片信息
*/
@ -275,19 +276,19 @@ public class DistributionSignforAppController {
@ApiOperationSupport(order = 4)
@ApiOperation(value = "回显照片", notes = "回显照片")
public R prices(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
if(ObjectUtil.isNotEmpty(distributionSignfor.getReservationId())){
if (ObjectUtil.isNotEmpty(distributionSignfor.getReservationId())) {
Map<String, List<DistributionSignPrintEntity>> one = distributionSignforService.prices(distributionSignfor);
DistributionSignforEntity one1 = distributionSignforService.getOne(Wrappers.<DistributionSignforEntity>query().lambda()
.eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId())
);
Map<String,Object> map = new HashMap<>();
map.put("deliverySignPictures",one); //司机签收图片
map.put("driverRemarks",one1.getDriverRemarks()); //driverRemarks
Map<String, Object> map = new HashMap<>();
map.put("deliverySignPictures", one); //司机签收图片
map.put("driverRemarks", one1.getDriverRemarks()); //driverRemarks
return R.data(map);
}else {
return R.fail(3002,"参数不能为空不对!!");
} else {
return R.fail(3002, "参数不能为空不对!!");
}
}
@ -298,23 +299,24 @@ public class DistributionSignforAppController {
@ApiOperationSupport(order = 4)
@ApiOperation(value = "修改签收照片信息", notes = "修改签收照片信息")
public R updatePicture(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
if(ObjectUtil.isNotEmpty(distributionSignfor.getReservationId())){
if (ObjectUtil.isNotEmpty(distributionSignfor.getReservationId())) {
return R.data(distributionSignforService.updatePicture(distributionSignfor));
}else {
return R.fail(3002,"参数不能为空不对!!");
} else {
return R.fail(3002, "参数不能为空不对!!");
}
}
/**
* 查询签收包件列表
*
* @param reservationId
* @return
*/
@GetMapping("/signingPackageDetail")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "查询签收包件列表" )
@ApiOperation(value = "查询签收包件列表")
public R signingPackageDetail(@RequestParam Long reservationId) {
return distributionSignforService.signingPackageDetail(reservationId);
return distributionSignforService.signingPackageDetail(reservationId);
}
}

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

@ -3049,7 +3049,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return R.fail(403, "配送错误!!!");
}
List<Long> packageLockIds = new ArrayList<>();
List<String> orderPackageCodes = new ArrayList<>();
List<JSONObject> aaa = new ArrayList<>();
if (Func.isNotEmpty(parcelListEntityList) && parcelListEntityList.size() == 1) {
DistributionParcelListEntity parcelListEntity = parcelListEntityList.get(0);
@ -3192,7 +3191,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
JSONObject trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode());
aaa.add(trunklinePackageTrackLog);
assert loadscanEntity != null;
orderPackageCodes.add(distributionLoadscanEntity.getOrderPackageCode());
} else {
return Resp.scanFail("操作失败", "不属于该客户");
@ -3265,7 +3263,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
packageLockIds.add(distributionLoadscanEntity.getPackageId());
JSONObject trunklinePackageTrackLog= handleLogJSONObject(myCurrentWarehouse,AuthUtil.getUser(),parcelListEntity.getOrderPackageCode(),content,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode());
aaa.add(trunklinePackageTrackLog);
orderPackageCodes.add(loadscanEntity.getOrderPackageCode());
} else {
return Resp.scanFail("操作失败", "不属于该客户");

Loading…
Cancel
Save