Browse Source

库存品撤销转库存品、增加配送签收运单追踪

pull/1/head
汤建军 1 year ago
parent
commit
9448fd3e05
  1. 16
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/AddWaybillTrackDTO.java
  2. 6
      blade-service/logpm-distribution/pom.xml
  3. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java
  4. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockListController.java
  5. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockListDTO.java
  6. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  7. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  8. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  9. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListInfoMapper.xml
  10. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java
  11. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
  12. 68
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  13. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  14. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  15. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  16. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  17. 74
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

16
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/AddWaybillTrackDTO.java

@ -9,10 +9,26 @@ public class AddWaybillTrackDTO implements Serializable {
private Long waybillId;
private String waybillNo;
/**
* 已配送 90
* 已签收 100
*/
private String trackType;
/**
* 状态 -- 运单配送运单签收
*/
private String refer;
/**
* 操作描述
*/
private String operationRemark;
/**
* 操作人
*/
private String nickName;
/**
*
*/
private Long userId;
private Long warehouseId;
private String warehouseName;

6
blade-service/logpm-distribution/pom.xml

@ -116,6 +116,12 @@
<version>${bladex.project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-trunkline-api</artifactId>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java

@ -27,6 +27,7 @@ import com.logpm.distribution.dto.DistributionDeliveryAllocationDTO;
import com.logpm.distribution.dto.DistributionReservationDTO;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.excel.DistributionReservationExcel;
import com.logpm.distribution.service.IDistributionAsyncService;
import com.logpm.distribution.service.IDistributionReservationService;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.wrapper.DistributionReservationWrapper;
@ -70,6 +71,7 @@ public class DistributionReservationController extends BladeController {
private final IDistributionReservationService reservationService;
private final IBasicdataWarehouseClient basicdataWarehouseClient;
private final IUserClient userClient;
private final IDistributionAsyncService distributionAsyncService;
/**
* 预约列表 详情
@ -293,7 +295,7 @@ public class DistributionReservationController extends BladeController {
@ApiOperationSupport(order = 7)
@ApiOperation(value = "转商配任务")
public R deliveryBusinessTask(@RequestBody DistributionDeliveryAllocationDTO allocationDTO) {
R<?> result = reservationService.deliveryBusinessTask(allocationDTO);
R result = reservationService.deliveryBusinessTask(allocationDTO);
return result;
}

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

@ -214,9 +214,20 @@ public class DistributionStockListController extends BladeController {
/**
* 库存品管理 删除
*/
@PostMapping("/remove")
@PostMapping("/cancelAddStockListByPackage")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R cancelAddStockListByPackage(@RequestBody DistributionStockListDTO distributionStockListDTO) {
return distributionStockListService.cancelAddStockListByPackage(distributionStockListDTO);
}
/**
* 撤销订单转库存品
*/
@PostMapping("/cancel")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "撤销订单转库存品", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(distributionStockListService.deleteLogic(Func.toLongList(ids)));
}

15
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockListDTO.java

@ -47,6 +47,21 @@ public class DistributionStockListDTO extends DistributionStockListEntity {
* 包装数量
*/
private String packageNum;
/**
* 库存品ID
*/
private Long stockListId;
/**
* 包件ID
*/
private String packageIds;
/**
* 包件ID
*/
private String stockListInfoIds;
/**
* 包装数量
*/

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java

@ -477,4 +477,11 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
* @return
*/
DistributionDeliveryListEntity selectDeliveryByTrainNumber(@Param("warehouseId") Long warehouseId,@Param("trainNumber") String trainNumber);
/**
* 查询配送司机信息
* @param deliveryId
* @return
*/
Map<String, Object> selectDeliveryDriverInfo(@Param("deliveryId")Long deliveryId);
}

19
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -1980,5 +1980,24 @@
resultType="com.logpm.distribution.entity.DistributionDeliveryListEntity">
SELECT * FROM logpm_distribution_delivery_list WHERE train_number = #{trainNumber} AND warehouse_id =#{warehouseId}
</select>
<select id="selectDeliveryDriverInfo" resultType="java.util.Map">
SELECT
CASE lddl.kind
WHEN 1 THEN (SELECT ldds.driver_name FROM logpm_distribution_delivery_self AS ldds WHERE ldds.delivery_id = lddl.id AND is_master = 2)
WHEN 2 THEN (SELECT lddt.driver_name FROM logpm_distribution_delivery_tripartite AS lddt WHERE lddt.delivery_id = lddl.id )
END driverName,
CASE lddl.kind
WHEN 1 THEN (SELECT ldds.vehicle_nub FROM logpm_distribution_delivery_self AS ldds WHERE ldds.delivery_id = lddl.id AND is_master = 2)
WHEN 2 THEN (SELECT lddt.vehicle_num FROM logpm_distribution_delivery_tripartite AS lddt WHERE lddt.delivery_id = lddl.id )
END vehicleNub,
CASE lddl.kind
WHEN 1 THEN (SELECT ldds.driver_phone FROM logpm_distribution_delivery_self AS ldds WHERE ldds.delivery_id = lddl.id AND is_master = 2)
WHEN 2 THEN (SELECT lddt.driver_phone FROM logpm_distribution_delivery_tripartite AS lddt WHERE lddt.delivery_id = lddl.id )
END driverPhone
FROM
logpm_distribution_delivery_list AS lddl
WHERE
id = #{deliveryId}
</select>
</mapper>

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -523,10 +523,10 @@
<if test=" param.customerName != null and param.customerName != '' ">and ldsa.customer_name like
concat('%',#{param.customerName},'%')
</if>
<if test=" param.customerTelephone != null and param.customerTelephone != '' ">and
<if test=" param.customerTelephone != null and param.customerTelephone != '' ">and
ldsa.customer_telephone like concat('%',#{param.customerTelephone},'%')
</if>
<if test=" param.customerAddress != null and param.customerAddress != '' ">and ldsa.customer_address like
<if test=" param.customerAddress != null and param.customerAddress != '' ">and ldsa.customer_address like
concat('%',#{param.customerAddress},'%')
</if>
<if test=" param.trays != null and param.trays != '' ">and lwtg.tray_code like

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

@ -94,7 +94,7 @@
<select id="getStockListInfo" resultType="com.logpm.distribution.entity.DistributionStockListInfoEntity">
SELECT * FROM logpm_distribution_stock_list_info
WHERE
( incoming_batch=#{par.incomingBatch}
(incoming_batch=#{par.incomingBatch}
AND
market_id =#{par.marketId}
AND
@ -102,6 +102,7 @@
AND
service_type=#{par.serviceType}
AND
warehouse_id=#{par.warehouseId} ) OR stock_list_id =#{par.stockListId}
warehouse_id=#{par.warehouseId}
AND is_deleted = 0 ) OR (stock_list_id =#{par.stockListId} AND is_deleted = 0)
</select>
</mapper>

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java

@ -1,5 +1,6 @@
package com.logpm.distribution.service;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.distribution.dto.DistributionStockArticleDTO;
import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.dto.app.StockupDTO;
@ -7,6 +8,8 @@ import com.logpm.distribution.dto.app.StockupZeroDTO;
import com.logpm.distribution.entity.DisStockListDetailEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.warehouse.entity.WarehouseWarehouseEntity;
import org.springblade.core.secure.BladeUser;
import java.util.List;
@ -305,4 +308,10 @@ public interface IDistributionAsyncService {
* @param reservationId
*/
void releaseSource(Long reservationId,Long warehouseId);
/**
* 进行干线日志保存
* @param id
*/
void sendTrunkineLog(Long deliveryId,Long reservationId, BladeUser user, BasicdataWarehouseEntity warehouse,Integer a);
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java

@ -189,6 +189,14 @@ public interface IDistributionStockListService extends BaseService<DistributionS
*/
void updateInventoryQuantityOccupied(Long stockListId, Integer quantity);
/**
* 取消订单包件转库存品
* @param distributionStockListDTO
* @return
*/
R cancelAddStockListByPackage(DistributionStockListDTO distributionStockListDTO);
// /**
// * 查询库存品详情

68
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -21,7 +21,13 @@ import com.logpm.factory.mt.dto.MtReceiveDTO;
import com.logpm.factory.mt.dto.MtReceiveImagesDTO;
import com.logpm.factory.mt.feign.IMtOrderMainClinet;
import com.logpm.factory.oupai.feign.IOuPaiFactoryClinet;
import com.logpm.trunkline.dto.AddWaybillTrackDTO;
import com.logpm.trunkline.feign.ITrunklineWaybillOrderClient;
import com.logpm.trunkline.feign.ITrunklineWaybillTrackClient;
import com.logpm.warehouse.entity.WarehouseWarehouseEntity;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.DistributionTypeConstant;
@ -45,12 +51,14 @@ import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.constant.stockup.StockupTypeConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.tool.utils.Func;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
@ -99,6 +107,11 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
private final DistributionSignforMapper distributionSignforService;
private final ITrunklineWaybillTrackClient trunklineWaybillTrackClient;
private final IWarehouseWaybillClient waybillClient;
// private final
@Override
@Async
@Transactional(isolation = Isolation.READ_UNCOMMITTED, rollbackFor = Exception.class)
@ -1638,6 +1651,61 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
/**
* @param deliveryId
*/
@Override
public void sendTrunkineLog(Long deliveryId,Long reservationId, BladeUser user, BasicdataWarehouseEntity warehouse,Integer a) {
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(deliveryId);
List<DistributionParcelListEntity> distributionParcelListEntities = null;
if (1 ==a ){
distributionParcelListEntities = distributionDeliveryListMapper.selectPackageListByDeliveryListId(deliveryId);
}else {
distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationId);
}
//查询配送司机信息
Map<String,Object> driverInfo = distributionDeliveryListMapper.selectDeliveryDriverInfo(distributionDeliveryListEntity.getId());
if (Func.isNotEmpty(distributionParcelListEntities)){
Map<String, List<DistributionParcelListEntity>> listMap = distributionParcelListEntities.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getWaybillNumber));
listMap.forEach((k, v) ->{
StringBuilder builder = new StringBuilder();
//统计已装车数量
WarehouseWaybillEntity byWaybillNo = waybillClient.findByWaybillNo(k);
AddWaybillTrackDTO addWaybillTrackDTO = new AddWaybillTrackDTO();
addWaybillTrackDTO.setWaybillId(byWaybillNo.getId());
addWaybillTrackDTO.setWaybillNo(byWaybillNo.getWaybillNo());
if (1 ==a){
int sum = v.stream().filter(p -> OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(p.getOrderPackageLoadingStatus())).mapToInt(DistributionParcelListEntity::getQuantity).sum();
addWaybillTrackDTO.setTrackType("90");
addWaybillTrackDTO.setRefer("运单配送");
String msg = "运单配送:"+sum+"/"+v.size()+"件";
builder.append(msg);
//拼接配送信息
String deliveryMsg = "车牌号:"+ driverInfo.get("vehicleNub")+","+"司机姓名:"+driverInfo.get("driverName")+",司机电话:"+driverInfo.get("driverPhone")+",配送时间:"+distributionDeliveryListEntity.getTaskTime();
builder.append(deliveryMsg);
}else {
int sum = v.stream().filter(p -> OrderPackageStatusConstant.yiqianshou.getValue().equals(p.getOrderPackageStatus())).mapToInt(DistributionParcelListEntity::getQuantity).sum();
addWaybillTrackDTO.setTrackType("100");
addWaybillTrackDTO.setRefer("运单签收");
String msg = "运单签收:"+sum+"/"+v.size()+"件";
builder.append(msg);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.sss");
String deliveryMsg = "最近操作人:"+user.getNickName()+simpleDateFormat.format(new Date());
builder.append(deliveryMsg);
}
addWaybillTrackDTO.setNickName(user.getNickName());
addWaybillTrackDTO.setUserId(user.getUserId());
addWaybillTrackDTO.setWarehouseId(warehouse.getId());
addWaybillTrackDTO.setWarehouseName(warehouse.getName());
addWaybillTrackDTO.setOperationRemark(builder.toString());
trunklineWaybillTrackClient.addWaybillLog(addWaybillTrackDTO);
});
}
}
/**

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

@ -4514,6 +4514,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// return R.status(b);
// }else if (abnormalPackageLoadingNum != 0){
// }
distributionAsyncService.sendTrunkineLog(distributionDeliveryListEntity.getId(),null,AuthUtil.getUser(),warehouseClient.getMyCurrentWarehouse(),1);
return Resp.scanFail("发车成功", builder.toString());
}

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -881,6 +881,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
// BeanUtil.copyProperties(distributionStockListEntity,distributionStockListInfo);
distributionStockListInfo.setServiceNumber(distributionStockListEntity.getServiceNumber()); //服务号
distributionStockListInfo.setStockListId(distributionStockListEntity.getId()); //库存品ID
distributionStockListInfo.setDescriptionGoods(distributionStockListEntity.getMallName()); //物料名称
distributionStockListInfo.setCargoNumber(distributionStockListEntity.getCargoNumber()); //物料编号
distributionStockListInfo.setWarehouseName(distributionStockListEntity.getWarehouseName()); //仓库

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

@ -1974,7 +1974,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
@Override
@Transactional
public R<?> deliveryBusinessTask(DistributionDeliveryAllocationDTO allocationDTO) {
public R deliveryBusinessTask(DistributionDeliveryAllocationDTO allocationDTO) {
if (Func.isEmpty(allocationDTO)) {
log.error("参数异常allocationDTO+{" + allocationDTO + "}");
return R.fail("服务器正忙!!!");
@ -2426,6 +2426,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionDeliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.weizhuangche.getValue());
distributionDeliveryListEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionDeliveryListService.updateById(distributionDeliveryListEntity);
//推送信息至运单追中日志
return R.status(true);
}

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

@ -1623,6 +1623,9 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
stockArticleEntity.setDeliveryQuantity(deliveryQuantity);
stockArticleEntity.setSigninQuantity(signingQuantity);
stockArticleEntity.setDeliveryQuantity(deliveryQuantity);
if (inWarehouseQuantity > 0){
stockArticleEntity.setGenre(1);
}
this.updateById(stockArticleEntity);
}

74
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

@ -18,6 +18,8 @@ package com.logpm.distribution.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -42,6 +44,7 @@ import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity;
import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.utils.QRCodeUtil;
import org.springblade.common.utils.TemplateUtil;
@ -102,6 +105,9 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
@Autowired
@Lazy
private IDistributionParcelListService distributionParcelListService;
@Autowired
@Lazy
private IDistributionStockArticleService distributionStockArticleService;
@ -879,6 +885,74 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
this.updateById(stockListEntity);
}
}
/**
* @param distributionStockListDTO
* @return
*/
@Override
@Transactional
public R cancelAddStockListByPackage(DistributionStockListDTO distributionStockListDTO) {
String method = "#######################DistributionStockListServiceImpl.cancelAddStockListByPackage";
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
log.error(method+"未授权");
return R.fail(403,"未授权!!!");
}
Long stockListId = distributionStockListDTO.getStockListId();
if (Objects.isNull(stockListId)){
log.error(method+"stockListId参数缺失!!!");
return R.fail(403,"操作失败");
}
String packageIds = distributionStockListDTO.getPackageIds();
if (Objects.isNull(packageIds)){
log.error(method+"packageIds参数缺失!!!");
return R.fail(403,"操作失败");
}
//这里
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda()
.in(DistributionParcelListEntity::getId, Func.toLongList(packageIds))
.eq(DistributionParcelListEntity::getWarehouseId, myCurrentWarehouse.getId())
);
String collect = parcelListEntities.stream().filter(f -> OrderPackageStockupStatusConstant.yibeihu.getValue().equals(f.getOrderPackageStockupStatus())).map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.joining(","));
if (Func.isNotBlank(collect)){
log.error(method+"撤销物料存在包件已备货,collect:{}",collect);
return R.fail(collect+"已备货,无法撤销!!!");
}
if (Func.isEmpty(parcelListEntities)){
log.error(method+"查询包件失败,packageIds:{}",packageIds);
return R.fail(403,"操作失败");
}
List<String> orderCode = parcelListEntities.stream().map(DistributionParcelListEntity::getOrderCode).collect(Collectors.toList());
if (Func.isEmpty(orderCode) || orderCode.size()>1){
log.error(method+"包件数据错误,orderCode:{}",orderCode);
return R.fail(403,"操作失败");
}
LambdaUpdateWrapper<DistributionParcelListEntity> up = new UpdateWrapper<DistributionParcelListEntity>().lambda()
.set(DistributionParcelListEntity::getConditions, 1)
.set(DistributionParcelListEntity::getMaterialId, null)
.set(DistributionParcelListEntity::getMaterialName, null)
.set(DistributionParcelListEntity::getMaterialCode, null)
.set(DistributionParcelListEntity::getMaterialUnit, null)
.in(DistributionParcelListEntity::getId, packageIds);
//清理包件的物料信息
boolean update = distributionParcelListService.update(up);
//维护订单信息
distributionStockArticleService.maintenanceOrderInfo(orderCode.get(0),myCurrentWarehouse.getId());
//维护库存品信息
DistributionStockListEntity stockListEntity = this.getById(distributionStockListDTO.getStockListId());
if ((stockListEntity.getQuantityStock() - parcelListEntities.size()) > 0){
stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - parcelListEntities.size());
this.updateById(stockListEntity);
}else if ((stockListEntity.getQuantityStock() - parcelListEntities.size()) <= 0){
this.removeById(stockListEntity);
}
//清理库存品入库记录
distributionStockListInfoService.removeBatchByIds(Func.toLongList(distributionStockListDTO.getStockListInfoIds()));
return R.success("操作成功");
}
}
// @Override

Loading…
Cancel
Save