|
|
|
@ -49,6 +49,7 @@ import com.logpm.oldproject.dto.SignPushDataUnitDTO;
|
|
|
|
|
import com.logpm.oldproject.entity.WarehouseEntity; |
|
|
|
|
import com.logpm.oldproject.feign.IOldSignPushClient; |
|
|
|
|
import com.logpm.oldproject.feign.IWarehouseClient; |
|
|
|
|
import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseUpdownStockUpAreaClient; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
@ -59,6 +60,7 @@ import org.springblade.common.constant.Inventory.InventoryLoadingStatusConstant;
|
|
|
|
|
import org.springblade.common.constant.Inventory.InventorySigningStatusConstant; |
|
|
|
|
import org.springblade.common.constant.RabbitConstant; |
|
|
|
|
import org.springblade.common.constant.RedisKeyConstant; |
|
|
|
|
import org.springblade.common.constant.WorkNodeEnums; |
|
|
|
|
import org.springblade.common.constant.billLading.BillLadingStatusConstant; |
|
|
|
|
import org.springblade.common.constant.common.IsOrNoConstant; |
|
|
|
|
import org.springblade.common.constant.delivery.DeliveryLoadingStatusConstant; |
|
|
|
@ -230,6 +232,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
@Autowired |
|
|
|
|
private IWarehouseUpdownStockUpAreaClient warehouseUpdownStockUpAreaClient; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private ITrunklinePackageTrackLogClient trunklinePackageTrackLogClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<DistributionSignforVO> selectDistributionSignforPage(IPage<DistributionSignforVO> page, DistributionSignforVO distributionSignfor) { |
|
|
|
@ -2428,6 +2433,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
return Resp.scanFail("此码不是订制品", "此码不是订制品"); |
|
|
|
|
} |
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(); |
|
|
|
|
List<JSONObject> aaa = new ArrayList<>(); |
|
|
|
|
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.selectPackageListByReservationId(distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
|
//查询该客户是否存在该包件信息
|
|
|
|
|
List<DistributionParcelListEntity> collect = parcelListEntityList.stream().filter(p -> p.getOrderPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList()); |
|
|
|
@ -2483,6 +2489,24 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
//下架解托
|
|
|
|
|
warehouseUpdownTypeClient.downPackageOrDelTray(loadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托"); |
|
|
|
|
//维护订单状态
|
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getScanUser()+"扫描签收,装车方式:扫描装车,配送车次号:"+deliveryListEntity.getTrainNumber()+"预约任务号:"+distributionReservationEntity.getReservationCode(); |
|
|
|
|
JSONObject trunklinePackageTrackLog= new JSONObject(); |
|
|
|
|
trunklinePackageTrackLog.put("tenantId",loadscanEntity.getTenantId()); |
|
|
|
|
trunklinePackageTrackLog.put("createTime",loadscanEntity.getCreateTime()); |
|
|
|
|
trunklinePackageTrackLog.put("createUser",loadscanEntity.getCreateUser()); |
|
|
|
|
trunklinePackageTrackLog.put("updateUser",loadscanEntity.getUpdateUser()); |
|
|
|
|
trunklinePackageTrackLog.put("updateTime",loadscanEntity.getUpdateTime()); |
|
|
|
|
trunklinePackageTrackLog.put("isDeleted",loadscanEntity.getIsDeleted()); |
|
|
|
|
trunklinePackageTrackLog.put("status",loadscanEntity.getStatus()); |
|
|
|
|
trunklinePackageTrackLog.put("createDept",loadscanEntity.getCreateDept()); |
|
|
|
|
trunklinePackageTrackLog.put("orderPackageCode",loadscanEntity.getOrderPackageCode()); |
|
|
|
|
trunklinePackageTrackLog.put("warehouseId",loadscanEntity.getWarehouseId()==null?myCurrentWarehouse.getId():loadscanEntity.getWarehouseId()); |
|
|
|
|
trunklinePackageTrackLog.put("warehouseId",loadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntity.getWarehouseName()); |
|
|
|
|
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode()); |
|
|
|
|
trunklinePackageTrackLog.put("content",content); |
|
|
|
|
trunklinePackageTrackLog.put("operator",loadscanEntity.getScanUser()); |
|
|
|
|
aaa.add(trunklinePackageTrackLog); |
|
|
|
|
orderPackageCodes.add(loadscanEntity.getOrderPackageCode()); |
|
|
|
|
} else { |
|
|
|
|
//这里装车的数据需要进行补录
|
|
|
|
|
// DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
|
|
|
|
@ -2553,6 +2577,28 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
//包件解托下架
|
|
|
|
|
warehouseUpdownTypeClient.downPackageOrDelTray(collect.get(0).getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托"); |
|
|
|
|
packageLockIds.add(distributionLoadscanEntity.getPackageId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getScanUser()+"扫描签收,装车方式:补录装车,配送车次号:"+deliveryListEntity.getTrainNumber()+"预约任务号:"+distributionReservationEntity.getReservationCode(); |
|
|
|
|
JSONObject trunklinePackageTrackLog= new JSONObject(); |
|
|
|
|
trunklinePackageTrackLog.put("tenantId",distributionLoadscanEntity.getTenantId()); |
|
|
|
|
trunklinePackageTrackLog.put("createTime",distributionLoadscanEntity.getCreateTime()); |
|
|
|
|
trunklinePackageTrackLog.put("createUser",distributionLoadscanEntity.getCreateUser()); |
|
|
|
|
trunklinePackageTrackLog.put("updateUser",distributionLoadscanEntity.getUpdateUser()); |
|
|
|
|
trunklinePackageTrackLog.put("updateTime",distributionLoadscanEntity.getUpdateTime()); |
|
|
|
|
trunklinePackageTrackLog.put("isDeleted",distributionLoadscanEntity.getIsDeleted()); |
|
|
|
|
trunklinePackageTrackLog.put("status",distributionLoadscanEntity.getStatus()); |
|
|
|
|
trunklinePackageTrackLog.put("createDept",distributionLoadscanEntity.getCreateDept()); |
|
|
|
|
trunklinePackageTrackLog.put("orderPackageCode",distributionLoadscanEntity.getOrderPackageCode()); |
|
|
|
|
trunklinePackageTrackLog.put("warehouseId",distributionLoadscanEntity.getWarehouseId()==null?myCurrentWarehouse.getId():loadscanEntity.getWarehouseId()); |
|
|
|
|
trunklinePackageTrackLog.put("warehouseId",distributionLoadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():loadscanEntity.getWarehouseName()); |
|
|
|
|
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode()); |
|
|
|
|
trunklinePackageTrackLog.put("content",content); |
|
|
|
|
trunklinePackageTrackLog.put("operator",loadscanEntity.getScanUser()); |
|
|
|
|
aaa.add(trunklinePackageTrackLog); |
|
|
|
|
orderPackageCodes.add(loadscanEntity.getOrderPackageCode()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//修改包件状态为装车、签收
|
|
|
|
|
DistributionParcelListEntity updatePackage = collect.get(0); |
|
|
|
@ -2637,6 +2683,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionReservationService.maintenanceReservationInfo(distrilbutionloadingscanDTO.getReservationId()); |
|
|
|
|
//维护配送任务
|
|
|
|
|
distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
|
|
|
|
|
trunklinePackageTrackLogClient.addPackageTrackLog(aaa,orderPackageCodes,WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode()); |
|
|
|
|
return Resp.scanSuccessWithData("签收成功", str, orderPackageCodes); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error(">>>>> 签收异常报错", e); |
|
|
|
@ -3091,6 +3139,8 @@ 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); |
|
|
|
|
if (parcelListEntity.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) { |
|
|
|
@ -3151,6 +3201,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
return Resp.scanFail("重复操作!!", "重复操作"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
String content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getScanUser()+"扫描异常签收,装车方式:补录装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
JSONObject trunklinePackageTrackLog= new JSONObject(); |
|
|
|
|
switch (reservationEntity.getDeliveryType()) { |
|
|
|
|
case "1": |
|
|
|
|
//商配
|
|
|
|
@ -3223,12 +3275,31 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionLoadscanService.save(distributionLoadscanEntity); |
|
|
|
|
Integer j = distributionSignforMapper.updateSignforByReservationId(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
} else { |
|
|
|
|
content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getScanUser()+"扫描异常签收,装车方式:扫描装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
distributionLoadscanService.updateById(distributionLoadscanEntity); |
|
|
|
|
distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); |
|
|
|
|
} |
|
|
|
|
trunklinePackageTrackLog.put("tenantId",distributionLoadscanEntity.getTenantId()); |
|
|
|
|
trunklinePackageTrackLog.put("createTime",distributionLoadscanEntity.getCreateTime()); |
|
|
|
|
trunklinePackageTrackLog.put("createUser",distributionLoadscanEntity.getCreateUser()); |
|
|
|
|
trunklinePackageTrackLog.put("updateUser",distributionLoadscanEntity.getUpdateUser()); |
|
|
|
|
trunklinePackageTrackLog.put("updateTime",distributionLoadscanEntity.getUpdateTime()); |
|
|
|
|
trunklinePackageTrackLog.put("isDeleted",distributionLoadscanEntity.getIsDeleted()); |
|
|
|
|
trunklinePackageTrackLog.put("status",distributionLoadscanEntity.getStatus()); |
|
|
|
|
trunklinePackageTrackLog.put("createDept",distributionLoadscanEntity.getCreateDept()); |
|
|
|
|
trunklinePackageTrackLog.put("orderPackageCode",distributionLoadscanEntity.getOrderPackageCode()); |
|
|
|
|
trunklinePackageTrackLog.put("warehouseId",distributionLoadscanEntity.getWarehouseId()==null?myCurrentWarehouse.getId():distributionLoadscanEntity.getWarehouseId()); |
|
|
|
|
trunklinePackageTrackLog.put("warehouseId",distributionLoadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():distributionLoadscanEntity.getWarehouseName()); |
|
|
|
|
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode()); |
|
|
|
|
trunklinePackageTrackLog.put("content",content); |
|
|
|
|
trunklinePackageTrackLog.put("operator",distributionLoadscanEntity.getScanUser()); |
|
|
|
|
aaa.add(trunklinePackageTrackLog); |
|
|
|
|
orderPackageCodes.add(loadscanEntity.getOrderPackageCode()); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
return Resp.scanFail("操作失败", "不属于该客户"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
case "2": |
|
|
|
|
//市配
|
|
|
|
@ -3286,6 +3357,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
if (Func.isEmpty(loadscanEntity)) { |
|
|
|
|
distributionLoadscanService.save(distributionLoadscanEntity); |
|
|
|
|
} else { |
|
|
|
|
content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getScanUser()+"扫描异常签收,装车方式:扫描装车,配送车次号:"+distributionDeliveryListEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode(); |
|
|
|
|
distributionLoadscanService.updateById(distributionLoadscanEntity); |
|
|
|
|
} |
|
|
|
|
Integer j = distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub()); |
|
|
|
@ -3293,6 +3365,24 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); |
|
|
|
|
//修改包件装车、签收状态
|
|
|
|
|
packageLockIds.add(distributionLoadscanEntity.getPackageId()); |
|
|
|
|
|
|
|
|
|
trunklinePackageTrackLog.put("tenantId",distributionLoadscanEntity.getTenantId()); |
|
|
|
|
trunklinePackageTrackLog.put("createTime",distributionLoadscanEntity.getCreateTime()); |
|
|
|
|
trunklinePackageTrackLog.put("createUser",distributionLoadscanEntity.getCreateUser()); |
|
|
|
|
trunklinePackageTrackLog.put("updateUser",distributionLoadscanEntity.getUpdateUser()); |
|
|
|
|
trunklinePackageTrackLog.put("updateTime",distributionLoadscanEntity.getUpdateTime()); |
|
|
|
|
trunklinePackageTrackLog.put("isDeleted",distributionLoadscanEntity.getIsDeleted()); |
|
|
|
|
trunklinePackageTrackLog.put("status",distributionLoadscanEntity.getStatus()); |
|
|
|
|
trunklinePackageTrackLog.put("createDept",distributionLoadscanEntity.getCreateDept()); |
|
|
|
|
trunklinePackageTrackLog.put("orderPackageCode",distributionLoadscanEntity.getOrderPackageCode()); |
|
|
|
|
trunklinePackageTrackLog.put("warehouseId",distributionLoadscanEntity.getWarehouseId()==null?myCurrentWarehouse.getId():distributionLoadscanEntity.getWarehouseId()); |
|
|
|
|
trunklinePackageTrackLog.put("warehouseId",distributionLoadscanEntity.getWarehouseName()==null?myCurrentWarehouse.getName():distributionLoadscanEntity.getWarehouseName()); |
|
|
|
|
trunklinePackageTrackLog.put("workNode", WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode()); |
|
|
|
|
trunklinePackageTrackLog.put("content",content); |
|
|
|
|
trunklinePackageTrackLog.put("operator",distributionLoadscanEntity.getScanUser()); |
|
|
|
|
aaa.add(trunklinePackageTrackLog); |
|
|
|
|
orderPackageCodes.add(loadscanEntity.getOrderPackageCode()); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
return Resp.scanFail("操作失败", "不属于该客户"); |
|
|
|
|
} |
|
|
|
@ -3304,6 +3394,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionParcelListService.updateById(parcelListEntity); |
|
|
|
|
//维护订单信息
|
|
|
|
|
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), parcelListEntity.getWarehouseId()); |
|
|
|
|
//构建异常签收
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
//查询一次是否进行了异常装车,如果没有进行异常装车数据进行审核
|
|
|
|
@ -3340,6 +3431,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
distributionParcelListMapper.updateOrderPackageCodeById(parcelListEntity.getId(), OrderPackageStatusConstant.yiqianshou.getValue()); |
|
|
|
|
//还需要维护包件状态
|
|
|
|
|
distributionAsyncService.maintenanceOrderStatus(parcelListEntity.getOrderCode(), parcelListEntity.getWarehouseId()); |
|
|
|
|
trunklinePackageTrackLogClient.addPackageTrackLog(aaa,orderPackageCodes,WorkNodeEnums.DISTRIBUTION_ABNORMAL_SIGN_FOR.getCode()); |
|
|
|
|
} else { |
|
|
|
|
log.error("############出现相同的包件码:{}", distrilbutionloadingscanDTO.getBarcode()); |
|
|
|
|
return Resp.scanFail("操作失败", "包件信息有误"); |
|
|
|
|