Browse Source

库存品一键装车+一键签收出库调整

training
kilo 1 year ago
parent
commit
4960905cd1
  1. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscaninvnEntity.java
  2. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  3. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  4. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  5. 255
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

6
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscaninvnEntity.java

@ -278,6 +278,12 @@ public class DistributionLoadscaninvnEntity extends TenantEntity {
@ApiModelProperty(value = "配送表id")
private Long deliveryId;
/**
* 配送表id
*/
@ApiModelProperty(value = "配送表id")
private Long inventoryPackageId;
/**
* 装车数量
*/

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java

@ -191,7 +191,7 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
*/
Integer updateSignforByReservationId(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("packageNub") Integer packageNub);
Integer updatesignforByinvn(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("packageNub") Integer packageNub);
Integer updateLoadAndsignforByinvn(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("packageNub") Integer packageNub);
/**
* 删除预约配送中间白哦
@ -240,4 +240,13 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
List<DistributionSignPrintVO> selectSignImgsUrl(@Param("reservationId")Long reservationId);
List<DistributionSignforVO> exportDistributionSignforSigningOwn(@Param("param") DistributionSignforVO distributionSignforVO);
/**
* 修改库存品签收数量
* @param deliveryId
* @param reservationId
* @param packageNub
* @return
*/
Integer updatesignforByinvn(@Param("deliveryId") Long deliveryId,@Param("reservationId") Long reservationId,@Param("packageNub") Integer packageNub);
}

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -57,9 +57,12 @@
<update id="updateSignforByReservationId">
UPDATE logpm_distribution_signfor lds set lds.received_quantity = ( lds.received_quantity + #{packageNub} ),lds.loaded_number = ( lds.loaded_number + #{packageNub} ) WHERE lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id =#{deliveryId}
</update>
<update id="updatesignforByinvn">
<update id="updateLoadAndsignforByinvn">
UPDATE logpm_distribution_signfor lds set lds.loadedin_number = ( lds.loadedin_number + #{packageNub} ),lds.receivedin_quantity = ( lds.receivedin_quantity + #{packageNub} ) WHERE lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id =#{deliveryId}
</update>
<update id="updatesignforByinvn">
UPDATE logpm_distribution_signfor lds set lds.receivedin_quantity = ( lds.receivedin_quantity + #{packageNub} ) WHERE lds.is_deleted =0 and lds.reservation_id = #{reservationId} and lds.delivery_id =#{deliveryId}
</update>
<delete id="deleteByReservationAndDeliveryId">
DELETE FROM logpm_distribution_signfor
<where>

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -1651,10 +1651,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//存在库存品海为进行装车
for (DisStockListDetailEntity disStockListDetailEntity : stockListDetailEntityList) {
if (disStockListDetailEntity.getStockLockingStatus().equals(InventoryLoadingStatusConstant.weizhuangche.getValue())) {
disStockListDetailEntity.setStockLockingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
disStockListDetailService.updateById(disStockListDetailEntity);
DistributionLoadscaninvnEntity loadscaninvnEntity = new DistributionLoadscaninvnEntity();
BladeUser user = AuthUtil.getUser();
// loadscaninvnEntity.setScanUser(user.getUserName());
loadscaninvnEntity.setScanUser(user.getNickName());
loadscaninvnEntity.setInventoryPackageId(disStockListDetailEntity.getId());
loadscaninvnEntity.setDriverName(distributionDeliverySelfEntity.getDriverName());
loadscaninvnEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub());
loadscaninvnEntity.setScanStatus(LoadingStatusConstant.yijianzhuangche.getValue());
@ -2117,6 +2120,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} else {
List<DisStockListDetailEntity> disStockListDetailEntities = detailEntities.stream().filter(d -> d.getStockPackageCode().equals(barcode)).collect(Collectors.toList());
if (disStockListDetailEntities.size() == 1) {
DisStockListDetailEntity disStockListDetailEntity = disStockListDetailEntities.get(0);
disStockListDetailEntity.setStockLockingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
disStockListDetailService.updateById(disStockListDetailEntity);
DistributionLoadscaninvnEntity distributionLoadscaninvnEntity = getDistributionLoadscaninvnEntity(distrilbutionloadingscanDTO, distributionDeliverySelfEntity, disStockListDetailEntities);
distributionLoadscaninvnService.save(distributionLoadscaninvnEntity);
//查询本车次是否第一次扫码,没有则更新上车时间
@ -2143,7 +2149,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
String msg = getLoadingMsg(distrilbutionloadingscanDTO);
return Resp.scanSuccess("扫描成功", msg);
}
/**
* 构建对象
*
@ -2179,6 +2184,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionLoadscaninvnEntity.setInventoryId(disStockListDetailEntities.get(0).getStockListId());
distributionLoadscaninvnEntity.setReservationId(disStockListDetailEntities.get(0).getReservationId());
distributionLoadscaninvnEntity.setOneClick(1);
distributionLoadscaninvnEntity.setInventoryPackageId(disStockListDetailEntities.get(0).getId());
distributionLoadscaninvnEntity.setLoadedNub(disStockListDetailEntities.get(0).getNum());
distributionLoadscaninvnEntity.setDeliveryId(distrilbutionloadingscanDTO.getDeliveryId());
distributionLoadscaninvnEntity.setIsInsert(LoadingIsInsertConstant.zhengchang.getValue());
@ -2332,7 +2338,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//判断当前登录人是否为司机
List<DistributionAppDeliveryListVO> distributionAppDeliveryListVOS = new ArrayList<>();
boolean delivery = false;
String value1 = DictBizCache.getValue("role_class", "delivery_driver_new");
String value1 = DictBizCache.getValue("role_class", "delivery_driver");
if (roleId.contains(value1)) delivery = true;

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

@ -200,6 +200,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
});
return list;
}
@Override
public List<DistributionSignforOwnExcel> exportDistributionSignforOwn(Map<String, Object> distributionSignfor) {
@ -1363,6 +1364,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
@Override
@Transactional
public R oneclick(DistributionSignforDTO distributionSignfor) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)) {
@ -1426,7 +1428,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return R.fail("签收失败");
}
BladeUser user = AuthUtil.getUser();
//处理库存品
//查询出该客户下的库存品信息
List<DisStockListDetailEntity> detailEntities = distributionReservationMapper.selectInventoryListByReservation(distributionSignforEntity.getReservationId());
@ -1434,108 +1435,194 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
boolean flag = detailEntities.stream().allMatch(s -> Func.isNotEmpty(s.getStockPackageCode()));
//只要库存品没有进行备货操作则不能进行一件装车操作
if (flag) {
//库存品均已备货
List<DisStockListDetailEntity> unLoadingiNventoryList = detailEntities.stream().filter(i -> i.getStockLockingStatus().equals(InventoryLoadingStatusConstant.weizhuangche.getValue())).collect(Collectors.toList());
if (Func.isNotEmpty(unLoadingiNventoryList) && unLoadingiNventoryList.size() > 0) {
for (DisStockListDetailEntity disStockListDetailEntity : unLoadingiNventoryList) {
// --------------------修改库存品包件装车和签收状态——————————————————————————————————————————
disStockListDetailEntity.setStockLockingStatus(InventoryLoadingStatusConstant.yizhuangche.getValue());
disStockListDetailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue());
disStockListDetailService.updateById(disStockListDetailEntity);
DistributionLoadscaninvnEntity loadscaninvnEntity = new DistributionLoadscaninvnEntity();
for (DisStockListDetailEntity detailEntity : detailEntities) {
DistributionLoadscaninvnEntity loadscaninvnEntity = distributionLoadscaninvnService.getOne(Wrappers.<DistributionLoadscaninvnEntity>query().lambda()
.eq(DistributionLoadscaninvnEntity::getReservationId, detailEntity.getReservationId())
.eq(DistributionLoadscaninvnEntity::getInventoryId, detailEntity.getStockListId())
.eq(DistributionLoadscaninvnEntity::getOrderPackageCode, detailEntity.getStockPackageCode())
.eq(DistributionLoadscaninvnEntity::getInventoryPackageId, detailEntity.getId())
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(loadscaninvnEntity)) {
if (!loadscaninvnEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())){
//存在库存品装车数据,这里进行签收状态修改
loadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
loadscaninvnEntity.setOneClick(1);
loadscaninvnEntity.setOneQclick(2);
loadscaninvnEntity.setSigningUser(user.getNickName());
loadscaninvnEntity.setSigningUserId(user.getUserId());
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscaninvnService.updateById(loadscaninvnEntity);
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
}
}else {
//不存在装车数据 这里需要进行装车数据的补录
detailEntity.setStockLockingStatus(InventoryLoadingStatusConstant.yizhuangche.getValue());
detailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue());
disStockListDetailService.updateById(detailEntity);
DistributionLoadscaninvnEntity newLoadscaninvnEntity = new DistributionLoadscaninvnEntity();
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverId())) {
loadscaninvnEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
newLoadscaninvnEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
}
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverName())) {
loadscaninvnEntity.setDriverName(distributionDeliverySelfEntity.getDriverName());
newLoadscaninvnEntity.setDriverName(distributionDeliverySelfEntity.getDriverName());
}
if (Func.isNotEmpty(distributionDeliverySelfEntity.getVehicleId())) {
loadscaninvnEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId());
newLoadscaninvnEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId());
}
if (Func.isNotEmpty(distributionDeliverySelfEntity.getVehicleNub())) {
loadscaninvnEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub());
newLoadscaninvnEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub());
}
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverPhone())) {
loadscaninvnEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone());
}
loadscaninvnEntity.setLoadingId(distributionDeliverySelfEntity.getId().toString());
loadscaninvnEntity.setOrderPackageCode(disStockListDetailEntity.getStockPackageCode());
loadscaninvnEntity.setInventoryId(disStockListDetailEntity.getStockListId());
loadscaninvnEntity.setDeliveryId(distributionSignforEntity.getDeliveryId());
loadscaninvnEntity.setReservationId(distributionSignforEntity.getReservationId());
loadscaninvnEntity.setScanUser(user.getNickName());
loadscaninvnEntity.setScanTime(new Date());
loadscaninvnEntity.setPackageNub(disStockListDetailEntity.getNum());
loadscaninvnEntity.setScanStatus(LoadingStatusConstant.yijianzhuangche.getValue());
loadscaninvnEntity.setIsInsert(LoadingIsInsertConstant.bulu.getValue());
loadscaninvnEntity.setScanType("1");
loadscaninvnEntity.setType(2);
loadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
loadscaninvnEntity.setIsSignfor(1);
loadscaninvnEntity.setReceivedQuantity(disStockListDetailEntity.getNum());
loadscaninvnEntity.setOneClick(2);
loadscaninvnEntity.setOneQclick(2);
loadscaninvnEntity.setSigningUser(user.getNickName());
loadscaninvnEntity.setSigningUserId(user.getUserId());
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
newLoadscaninvnEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone());
}
newLoadscaninvnEntity.setLoadingId(distributionDeliverySelfEntity.getId().toString());
newLoadscaninvnEntity.setOrderPackageCode(detailEntity.getStockPackageCode());
newLoadscaninvnEntity.setInventoryId(detailEntity.getStockListId());
newLoadscaninvnEntity.setDeliveryId(distributionSignforEntity.getDeliveryId());
newLoadscaninvnEntity.setReservationId(distributionSignforEntity.getReservationId());
newLoadscaninvnEntity.setInventoryPackageId(detailEntity.getId());
newLoadscaninvnEntity.setScanUser(user.getNickName());
newLoadscaninvnEntity.setScanTime(new Date());
newLoadscaninvnEntity.setPackageNub(detailEntity.getNum());
newLoadscaninvnEntity.setScanStatus(LoadingStatusConstant.yijianzhuangche.getValue());
newLoadscaninvnEntity.setIsInsert(LoadingIsInsertConstant.bulu.getValue());
newLoadscaninvnEntity.setScanType("1");
newLoadscaninvnEntity.setType(2);
newLoadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
newLoadscaninvnEntity.setIsSignfor(1);
newLoadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
newLoadscaninvnEntity.setOneClick(2);
newLoadscaninvnEntity.setOneQclick(2);
newLoadscaninvnEntity.setSigningUser(user.getNickName());
newLoadscaninvnEntity.setSigningUserId(user.getUserId());
newLoadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
if (distributionSignfor.getIsClerk()) {
loadscaninvnEntity.setMsg("文员一键签收数据补录");
newLoadscaninvnEntity.setMsg("文员一键签收数据补录");
} else {
loadscaninvnEntity.setMsg("司机一键签收数据补录");
newLoadscaninvnEntity.setMsg("司机一键签收数据补录");
}
distributionLoadscaninvnService.save(loadscaninvnEntity);
distributionLoadscaninvnService.save(newLoadscaninvnEntity);
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
//更新签收表的签收数量和装车数量
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
Integer j = distributionSignforMapper.updateLoadAndsignforByinvn(newLoadscaninvnEntity.getDeliveryId(), newLoadscaninvnEntity.getReservationId(), newLoadscaninvnEntity.getPackageNub());
//维护预约库存品数据
//扣减库存
DistributionStockListEntity stockListEntity = distributionStockListService.getById(disStockListDetailEntity.getStockListId());
stockListEntity.setQuantityOccupied(stockListEntity.getQuantityOccupied() - loadscaninvnEntity.getPackageNub());
stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - loadscaninvnEntity.getPackageNub());
stockListEntity.setOutboundQuantity(stockListEntity.getOutboundQuantity() + loadscaninvnEntity.getPackageNub());
DistributionStockListEntity stockListEntity = distributionStockListService.getById(detailEntity.getStockListId());
stockListEntity.setQuantityOccupied(stockListEntity.getQuantityOccupied() - newLoadscaninvnEntity.getPackageNub());
stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - newLoadscaninvnEntity.getPackageNub());
stockListEntity.setOutboundQuantity(stockListEntity.getOutboundQuantity() + newLoadscaninvnEntity.getPackageNub());
distributionStockListService.updateById(stockListEntity);
}
}
//库存品扫描记录补充
for (DisStockListDetailEntity detailEntity : detailEntities) {
if (detailEntity.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())) {
detailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue());
disStockListDetailService.updateById(detailEntity);
//查询出对于的装车扫描记录
List<DistributionLoadscaninvnEntity> list = distributionLoadscaninvnService.list(Wrappers.<DistributionLoadscaninvnEntity>query().lambda()
.eq(DistributionLoadscaninvnEntity::getDeliveryId, distributionSignfor.getDeliveryId())
.eq(DistributionLoadscaninvnEntity::getReservationId, distributionSignfor.getReservationId())
.eq(DistributionLoadscaninvnEntity::getOrderPackageCode, detailEntity.getStockPackageCode())
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
if (list.size() == 1) {
//正常进行扫描记录签收修改
DistributionLoadscaninvnEntity loadscaninvnEntity = list.get(0);
if (distributionSignfor.getIsClerk()) {
loadscaninvnEntity.setMsg("文员一键签收数据补录");
} else {
loadscaninvnEntity.setMsg("司机一键签收数据补录");
}
loadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
loadscaninvnEntity.setOneClick(1);
loadscaninvnEntity.setOneQclick(2);
loadscaninvnEntity.setSigningUser(user.getUserName());
loadscaninvnEntity.setSigningUserId(user.getUserId());
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscaninvnService.updateById(loadscaninvnEntity);
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
} else {
log.error("################库存品未进行备货操作+{}" + list);
//此时说明在同一配送任务下,同一客户出现了相同的库存品包件码
}
}
//对库存品包件上级的状态维护
distributionAsyncService.checkStockArticleListSigningStatus(detailEntity);
}
// //库存品均已备货
// List<DisStockListDetailEntity> unLoadingiNventoryList = detailEntities.stream().filter(i -> i.getStockLockingStatus().equals(InventoryLoadingStatusConstant.weizhuangche.getValue())).collect(Collectors.toList());
// if (Func.isNotEmpty(unLoadingiNventoryList) && unLoadingiNventoryList.size() > 0) {
// for (DisStockListDetailEntity disStockListDetailEntity : unLoadingiNventoryList) {
//// --------------------修改库存品包件装车和签收状态——————————————————————————————————————————
// disStockListDetailEntity.setStockLockingStatus(InventoryLoadingStatusConstant.yizhuangche.getValue());
// disStockListDetailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue());
// disStockListDetailService.updateById(disStockListDetailEntity);
//
// DistributionLoadscaninvnEntity loadscaninvnEntity = new DistributionLoadscaninvnEntity();
// if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverId())) {
// loadscaninvnEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
// }
// if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverName())) {
// loadscaninvnEntity.setDriverName(distributionDeliverySelfEntity.getDriverName());
// }
// if (Func.isNotEmpty(distributionDeliverySelfEntity.getVehicleId())) {
// loadscaninvnEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId());
// }
// if (Func.isNotEmpty(distributionDeliverySelfEntity.getVehicleNub())) {
// loadscaninvnEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub());
// }
// if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverPhone())) {
// loadscaninvnEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone());
// }
// loadscaninvnEntity.setLoadingId(distributionDeliverySelfEntity.getId().toString());
// loadscaninvnEntity.setOrderPackageCode(disStockListDetailEntity.getStockPackageCode());
// loadscaninvnEntity.setInventoryId(disStockListDetailEntity.getStockListId());
// loadscaninvnEntity.setDeliveryId(distributionSignforEntity.getDeliveryId());
// loadscaninvnEntity.setReservationId(distributionSignforEntity.getReservationId());
// loadscaninvnEntity.setScanUser(user.getNickName());
// loadscaninvnEntity.setScanTime(new Date());
// loadscaninvnEntity.setPackageNub(disStockListDetailEntity.getNum());
// loadscaninvnEntity.setScanStatus(LoadingStatusConstant.yijianzhuangche.getValue());
// loadscaninvnEntity.setIsInsert(LoadingIsInsertConstant.bulu.getValue());
// loadscaninvnEntity.setScanType("1");
// loadscaninvnEntity.setType(2);
// loadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
// loadscaninvnEntity.setIsSignfor(1);
// loadscaninvnEntity.setReceivedQuantity(disStockListDetailEntity.getNum());
// loadscaninvnEntity.setOneClick(2);
// loadscaninvnEntity.setOneQclick(2);
// loadscaninvnEntity.setSigningUser(user.getNickName());
// loadscaninvnEntity.setSigningUserId(user.getUserId());
// loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
//
// if (distributionSignfor.getIsClerk()) {
// loadscaninvnEntity.setMsg("文员一键签收数据补录");
// } else {
// loadscaninvnEntity.setMsg("司机一键签收数据补录");
// }
// distributionLoadscaninvnService.save(loadscaninvnEntity);
// Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
// //更新签收表的签收数量和装车数量
// Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
// //维护预约库存品数据
// //扣减库存
// DistributionStockListEntity stockListEntity = distributionStockListService.getById(disStockListDetailEntity.getStockListId());
// stockListEntity.setQuantityOccupied(stockListEntity.getQuantityOccupied() - loadscaninvnEntity.getPackageNub());
// stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - loadscaninvnEntity.getPackageNub());
// stockListEntity.setOutboundQuantity(stockListEntity.getOutboundQuantity() + loadscaninvnEntity.getPackageNub());
// distributionStockListService.updateById(stockListEntity);
// }
// }
// //库存品扫描记录补充
// for (DisStockListDetailEntity detailEntity : detailEntities) {
// if (detailEntity.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())) {
// detailEntity.setStockSignfoStatus(InventorySigningStatusConstant.yiqianshou.getValue());
// disStockListDetailService.updateById(detailEntity);
// //查询出对于的装车扫描记录
// List<DistributionLoadscaninvnEntity> list = distributionLoadscaninvnService.list(Wrappers.<DistributionLoadscaninvnEntity>query().lambda()
// .eq(DistributionLoadscaninvnEntity::getDeliveryId, distributionSignfor.getDeliveryId())
// .eq(DistributionLoadscaninvnEntity::getReservationId, distributionSignfor.getReservationId())
// .eq(DistributionLoadscaninvnEntity::getOrderPackageCode, detailEntity.getStockPackageCode())
// .ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
// if (list.size() == 1) {
// //正常进行扫描记录签收修改
// DistributionLoadscaninvnEntity loadscaninvnEntity = list.get(0);
// if (distributionSignfor.getIsClerk()) {
// loadscaninvnEntity.setMsg("文员一键签收数据补录");
// } else {
// loadscaninvnEntity.setMsg("司机一键签收数据补录");
// }
// loadscaninvnEntity.setSignforState(LoadScanSigningStatusConstant.yiqianshou.getValue());
// loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
// loadscaninvnEntity.setOneClick(1);
// loadscaninvnEntity.setOneQclick(2);
// loadscaninvnEntity.setSigningUser(user.getUserName());
// loadscaninvnEntity.setSigningUserId(user.getUserId());
// loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
// loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
// distributionLoadscaninvnService.updateById(loadscaninvnEntity);
// Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
// Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
// } else {
// log.error("################库存品未进行备货操作+{}" + list);
// //此时说明在同一配送任务下,同一客户出现了相同的库存品包件码
// }
// }
// //对库存品包件上级的状态维护
// distributionAsyncService.checkStockArticleListSigningStatus(detailEntity);
// }
} else {
log.error("################库存品未进行备货操作+{}" + detailEntities);
return R.fail("一键装车失败!!!库存品都备货了!?");

Loading…
Cancel
Save