|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|