Browse Source

Merge remote-tracking branch 'origin/dev' into dev

master
zhaoqiaobo 10 months ago
parent
commit
e40a06944b
  1. 1
      blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  3. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  4. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java
  5. 48
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  7. 162
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  8. 132
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  9. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  10. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

1
blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java

@ -43,6 +43,7 @@ public enum WorkNodeEnums implements Serializable {
CANCEL_DELIVERY(262, "计划取消"),
PLAN_BILLOFLADING(263, "计划自提"),
CANCEL_BILLOFLADING(264, "取消自提"),
PLAN_DISTRIBUTION(265, "计划配车"),
DISTRIBUTION_LOADING(270, "配送装车"),
DISTRIBUTION_ABNORMAL_LOADING(271, "异常装车"),
DISTRIBUTION_CANCEL_LOADING(272, "取消装车"),

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -519,7 +519,7 @@ public class DistributionDeliveryListController extends BladeController {
@PostMapping("/deliveryZeroPackage")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "PC签收包件")
@ApiOperation(value = "PC签收计划零担")
public R deliveryZeroPackage(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
R r = distributionSignforService.signforZeroPC(distrilbutionloadingscanDTO);
return r;

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

@ -513,6 +513,8 @@
and lds.assign_status = 20
and lds.forklift_id = #{param.userId}
</where>
GROUP BY
lds.id
UNION
SELECT DISTINCT
lds.id,
@ -602,6 +604,8 @@
and lds.assign_status = 20
and lds.forklift_id = #{param.userId}
</where>
GROUP BY
lds.id
) t
<where>
<if test="param.customName !=null and param.customName !=''">
@ -823,6 +827,7 @@
<where>
lds.id = #{param.stockupId}
</where>
</select>
<select id="selectStockupPage" resultType="com.logpm.distribution.vo.DistributionStockupListVO">

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

@ -335,4 +335,10 @@ public interface IDistributionAsyncService {
void saveOtherDataBaseNew(String tenantId,List<DistributionBusinessPreOrderEntity> dataResult, String mallName);
/**
* 推送预约下包件转配送日志
* @param reservationIds
*/
void recordsReservationDeliveryLog(String reservationIds,BasicdataWarehouseEntity warehouse,BladeUser user,String trainNumber);
}

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

@ -79,14 +79,11 @@ import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity;
import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import com.logpm.trunkline.entity.TrunklineWaybillOrderEntity;
import com.logpm.trunkline.entity.TrunklineWaybillPackageEntity;
import com.logpm.trunkline.feign.ITrunklineAdvanceClient;
import com.logpm.trunkline.feign.ITrunklineAdvanceDetailClient;
import com.logpm.trunkline.feign.ITrunklineWaybillOrderClient;
import com.logpm.trunkline.feign.ITrunklineWaybillPackageClient;
import com.logpm.trunkline.feign.ITrunklineWaybillTrackClient;
import com.logpm.trunkline.feign.*;
import com.logpm.trunkline.vo.TrunklineAdvanceDetailVO;
import com.logpm.warehouse.entity.WarehouseWayBillDetail;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehousePackageTrackLogClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient;
@ -125,12 +122,14 @@ import org.springblade.common.constant.stockup.StockupTypeConstant;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.entity.Tenant;
import org.springblade.system.feign.ISysClient;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
@ -211,6 +210,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
private final ISysClient sysClient;
private final ITrunklinePackageTrackLogClient trunklinePackageTrackLogClient;
@ -2971,4 +2971,42 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
}
@Override
@Async
public void recordsReservationDeliveryLog(String reservationIds,BasicdataWarehouseEntity warehouse,BladeUser user,String trainNumber) {
List<Long> list = Func.toLongList(reservationIds);
if (!list.isEmpty()) {
List<DistributionReservationPackageEntity> distributionReservationPackageEntities = distributionReservationPackageMapper.selectList(Wrappers.<DistributionReservationPackageEntity>query().lambda()
.in(DistributionReservationPackageEntity::getReservationId, list)
.ne(DistributionReservationPackageEntity::getPacketBarStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
List<JSONObject> aaa = new ArrayList<>();
if (!distributionReservationPackageEntities.isEmpty()) {
distributionReservationPackageEntities.forEach(rp->{
String content = "包件在"+warehouse.getName()+"由"+ AuthUtil.getUser().getNickName()+"转车次任务,操作方式:批量预约任务转配送,车次号:"+trainNumber;
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",rp.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",user.getUserId());
trunklinePackageTrackLog.put("updateUser",user.getUserId());
trunklinePackageTrackLog.put("updateTime",new Date());
trunklinePackageTrackLog.put("isDeleted",0);
trunklinePackageTrackLog.put("status",1);
trunklinePackageTrackLog.put("createDept",warehouse.getDepartment());
trunklinePackageTrackLog.put("orderPackageCode",rp.getPacketBarCode());
trunklinePackageTrackLog.put("warehouseId",warehouse.getId());
trunklinePackageTrackLog.put("warehouseName",warehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.PLAN_DISTRIBUTION.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName());
aaa.add(trunklinePackageTrackLog);
});
}
if (!aaa.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
}
}
}

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

@ -790,7 +790,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",loadscanEntity.getScanUser());
}catch (Exception e){
log.info("装车日志数据错误>>>>>>>>>>>>>>>>>>data:{}",trunklinePackageTrackLog);
log.error("装车日志数据错误",e);
}
aaa.add(trunklinePackageTrackLog);
orderPackageCodes.add(loadscanEntity.getOrderPackageCode());

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

@ -1157,35 +1157,10 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
String reservationIds = allocationDTO.getReservationIds();
//创建备货任务
DistributionStockupDTO stockup = allocationDTO.getStockup();
// DistributionStockupEntity stockupentity = Func.copy(stockup, DistributionStockupEntity.class);
List<Long> ids = Func.toLongList(reservationIds);
// DistributionStockupEntity distributionStockupEntity = Func.copy(stockup, DistributionStockupEntity.class);
Integer stockListTotal = distributionReservationStocklistMapper.getStockListTotal(ids);
//这里判断是否选择了司机
// if (Func.isEmpty(stockupentity.getForkliftId())) {
// //这里就是米有选择司机
// distributionStockupEntity.setAssignStatus(StockAssignStatusConstant.weizhipai.getValue());
// distributionStockupEntity.setStockupStatus(StockupStatusConstant.weibeihuo.getValue());
// } else {
// distributionStockupEntity.setAssignTime(new Date());
// distributionStockupEntity.setAssignStatus(StockAssignStatusConstant.yizhipai.getValue());
// distributionStockupEntity.setStockupStatus(StockupStatusConstant.daibeihuo.getValue());
// distributionStockupEntity.if (Func.equals(reservationEntity.getStockupStatus(), ReservationStockupStatusConstant.weibeihuo.getValue())) {
// //如果预约已经备货
// DistributionStockupInfoEntity stockupInfoEntity = new DistributionStockupInfoEntity();
// stockupInfoEntity.setStockUpType(StockupTypeConstant.shipei.getValue());
// stockupInfoEntity.setReservationId(ids.get(i));
// stockupInfoEntity.setStockupId(distributionStockupEntity.getId());
// distributionStockupInfoService.save(stockupInfoEntity);
// reservationEntity.setStockupStatus(ReservationStockupStatusConstant.daibeihuo.getValue());
// }(stockup.getForkliftId());
// distributionStockupEntity.setForkliftName(stockup.getForkliftName());
// }
DistributionDeliveryListEntity distributionDeliveryListEntity = new DistributionDeliveryListEntity();
//设置车次号
// String today = DateUtil.today();
// String random = Func.random(7, RandomType.ALL);
String numberMa = trainNumberMa();
distributionDeliveryListEntity.setTrainNumber(numberMa);
distributionDeliveryListEntity.setFee(BigDecimal.ZERO);
@ -1220,35 +1195,11 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
stockupEntity = new DistributionStockupEntity();
stockupEntity.setAssignStatus(StockAssignStatusConstant.weizhipai.getValue());
stockupEntity.setStockupStatus(StockupStatusConstant.weibeihuo.getValue());
//这里就需要构建备货任务中间表
// if (Func.isNotEmpty(stockup.getGoodsAreaName())) {
// distributionStockupEntity.setStockupArea(stockup.getGoodsAreaName());
// distributionStockupEntity.setGoodsAreaId(stockup.getGoodsAreaId());
// }
// if (Func.isNotEmpty(stockup.getGoodsAreaName())) {
// distributionStockupEntity.setStockupArea(stockup.getGoodsAreaName());
// distributionStockupEntity.setGoodsAreaId(stockup.getGoodsAreaId());
// }
// if (Func.isNotEmpty(stockup.getLoadAndUnload())) {
// distributionStockupEntity.setTeamResponsibility(stockup.getLoadAndUnload());
// }
// if (Func.isNotEmpty(stockup.getOutboundDate())) {
// distributionStockupEntity.setOutboundDate(stockup.getOutboundDate());
// }
// if (Func.isNotEmpty(stockup.getStockupDate())) {
// distributionStockupEntity.setStockupDate(stockup.getStockupDate());
// }
// if (Func.isNotEmpty(stockup.getLoadAndUnload())) {
// distributionStockupEntity.setTeamResponsibility(stockup.getLoadAndUnload());
// }
// distributionStockupEntity.setStockupUser(user.getUserName());
// distributionStockupEntity.setStockupUserId(user.getUserId());
stockupEntity.setTypeService(DistributionTypeConstant.shipie.getValue());
//编码生成规则 BH+仓库编码+年月日+序号00001
stockupEntity.setStockupCode(bianMa());
stockupEntity.setStockupStatus(StockupStatusConstant.weibeihuo.getValue());
stockupEntity.setStockupDate(new Date());
// stockupEntity.setOutboundDate(new Date());
stockupEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionStockupService.save(stockupEntity);
}
@ -1273,7 +1224,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationEntity.setStockupStatus(ReservationStockupStatusConstant.daibeihuo.getValue());
}
DistributionSignforEntity distributionSignforEntity = new DistributionSignforEntity();
// String trainNumberMa = trainNumberMa();
distributionSignforEntity.setTrainNumber(numberMa);
distributionSignforEntity.setReservationId(reservationEntity.getId());
distributionSignforEntity.setDeliveryId(distributionDeliveryListEntity.getId());
@ -1282,8 +1232,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionSignforService.save(distributionSignforEntity);
//修改预约信息为待配送
reservationEntity.setReservationStatus(ReservationStatusConstant.daipeisong.getValue());
//这里需要查询出订单数量
// Long count = distributionReservationStocklistService.getBaseMapper().selectCount(Wrappers.<DistributionReservationStocklistEntity>query().lambda().eq(DistributionReservationStocklistEntity::getReservationId, reservationEntity.getId()));
Integer orderCount = baseMapper.selectStockArticleCount(reservationEntity.getId());
//查询出该预约下的订单数量
//预约订单数量
@ -1291,7 +1239,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//统计包件数量
packageNum.getAndAdd(reservationEntity.getReservationNum());
inventoryNum.getAndAdd(reservationEntity.getReservationStockListNum());
//TODO 设置是否齐套
this.updateById(reservationEntity);
//订单自编号拼接
QueryWrapper<DistributionReservationStockarticleEntity> q = Condition.getQueryWrapper(new HashMap<String, Object>(), DistributionReservationStockarticleEntity.class);
@ -1317,8 +1264,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
} else {
stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
}
//拼接订单编号
// orderIds.append(stockArticleEntity.getId()).append(",");
//拼接订单自编号
hashSet.add(stockArticleEntity.getOrderCode());
//存在数据来源,维护订单、包件和配送的关系
@ -1333,6 +1278,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
p.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.daibeihuo.getValue());
distributionParcelListService.updateById(p);
});
});
}
if (!Func.isEmpty(reservationStocklistEntityList)) {
@ -1348,16 +1294,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
hashSet.add(stockListEntity.getOrderCode());
stockListId.append(stockListEntity.getId()).append(",");
//这里需要将库存品信息和配送进行信息绑定
// DistributionLoadscaninvnEntity loadscaninvnEntity = new DistributionLoadscaninvnEntity();
// loadscaninvnEntity.setTrainNumber(distributionDeliveryListEntity.getTrainNumber());
//// packageNum.getAndAdd(l.getReservationNum());
// //TODO 需要设置库存品的SKU码*-
// loadscaninvnEntity.setReservationId(reservationEntity.getId());
// loadscaninvnEntity.setInventoryId(l.getStocklistId());
// loadscaninvnEntity.setPackageNub(l.getReservationNum());
// loadscaninvnEntity.setDeliveryId(distributionDeliveryListEntity.getId());
// distributionLoadscaninvnService.save(loadscaninvnEntity);
});
}
}
@ -1380,7 +1316,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionDeliveryListEntity.setVehicleName(tripartiteEntity.getVehicleNum());
distributionDeliveryListEntity.setDistributionCompany(tripartite.getDistributionCompany());
distributionDeliveryListEntity.setDistributionCompanyId(tripartite.getDistributionCompanyId());
//TODO 这里可以对三方配送的机构编号进行添加
} else {
//这里就是自主配送
List<DistributionDeliverySelfDTO> allocationInfo = allocationDTO.getAllocationInfo();
@ -1430,30 +1365,17 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionDeliveryListEntity.setOrderNumber(orderNum.get());
distributionDeliveryListEntity.setType(DistributionTypeConstant.shipie.getValue());
distributionDeliveryListEntity.setOrderCode(String.join(",", hashSet));
// distributionDeliveryListEntity.setTaskTime(allocationDTO.getTaskTime());
distributionDeliveryListEntity.setNoteNumber(deliveryListMa());
distributionDeliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.weizhuangche.getValue());
String taskTime = allocationDTO.getTaskTime();
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// Date parse = null;
// try {
// parse = format.parse(taskTime);
// } catch (ParseException e) {
// e.printStackTrace();
// }
if (Func.isNotEmpty(allocationDTO.getRemarks())) {
distributionDeliveryListEntity.setRemarks(allocationDTO.getRemarks());
}
distributionDeliveryListEntity.setTaskTime(taskTime);
// distributionDeliveryListEntity.setNoteNumber(Func.random(13, RandomType.INT));
// if (orderIds.length() > 1) {
// distributionDeliveryListEntity.setOrderId(orderIds.deleteCharAt(orderIds.length() - 1).toString());
// }
// distributionDeliveryListEntity.setReservationId(reservationIds);
distributionDeliveryListEntity.setDeliveryNumber(packageNum.get());
distributionDeliveryListEntity.setInventoryNub(inventoryNum.get());
distributionDeliveryListService.updateById(distributionDeliveryListEntity);
distributionAsyncService.recordsReservationDeliveryLog(reservationIds,myCurrentWarehouse,user,distributionDeliveryListEntity.getTrainNumber());
return R.status(true);
}
@ -1550,7 +1472,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
distributionParcelListService.updateById(parcelListEntity);
distributionAsyncService.checkStockArticleReservationStatus(p);
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"新增计划配送,操作方式:新增订单选中包件,预约任务号:"+reservationEntity.getReservationCode();
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"新增计划市配配送,操作方式:新增订单选中包件,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId());
@ -1597,7 +1519,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionParcelListService.updateById(dp);
distributionAsyncService.checkStockArticleReservationStatus(dp);
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"新增计划配送,操作方式:新增订单系统默认选中,预约任务号:"+reservationEntity.getReservationCode();
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"新增计划市配配送,操作方式:新增订单系统默认选中,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime());
@ -1757,7 +1679,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(reservationPackageEntity.getParceListId());
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"取消计划配送,操作方式:取消选中包件,预约任务号:"+reservationEntity.getReservationCode();
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"取消计划市配配送,操作方式:取消选中包件,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime());
@ -1921,7 +1843,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
packageEntityList.forEach(p -> {
p.setPacketBarStatus(ReservationPackageStatusConstant.quxiao.getValue());
distributionReservationPackageService.updateById(p);
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"取消计划配送,操作方式:取消订单,预约任务号:"+reservationEntity.getReservationCode();
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"取消计划市配配送,操作方式:取消订单,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime());
@ -2206,7 +2128,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//获取所有订单
List<DistributionStockArticleDTO> stockArticle = allocationDTO.getStockArticle();
//根据运单号进行分组
//TODO 这里先根据运单号进行运单信息查询,后期根据运单进行
Map<String, List<DistributionStockArticleDTO>> mallClient = stockArticle.stream().collect(Collectors.groupingBy(DistributionStockArticleDTO::getConsigneeUnit));
//配送任务仓库名称
HashSet<String> deliveryWarehouseName = new HashSet<>();
@ -2221,13 +2142,13 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//查询运单信息
//收货单位
Date date = new Date();
List<JSONObject> aaa = new ArrayList<>();
mallClient.forEach((k, v) -> {
clientTotal.getAndIncrement();
// AtomicInteger receivingUnit = new AtomicInteger();
//这里查询有问题
DistributionReservationDTO reservation = allocationDTO.getReservation();
DistributionReservationEntity reservationEntity = Func.copy(reservation, DistributionReservationEntity.class);
reservationEntity.setWaybillNo(k);
reservationEntity.setReservationCode(reservationMa());
reservationEntity.setWarehouseId(myCurrentWarehouse.getId());
reservationEntity.setReservationStatus(ReservationStatusConstant.daipeisong.getValue());
//这里采用订单上的收货信息
@ -2236,10 +2157,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//订单号
HashSet<String> orderNumber = new HashSet<>();
//运单号
// HashSet<String> waybillNo = new HashSet<>();
//运单ID -------这里运单Id后续可能变更为运单号
HashSet<String> waybillId = new HashSet<>();
HashSet<String> waybillNo = new HashSet<>();
//订单服务号
HashSet<String> serviceNumber = new HashSet<>();
@ -2268,14 +2186,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
v.forEach(s -> {
List<Long> packageLockIds = new ArrayList<>();
DistributionStockArticleDTO stockArticleDTO = Func.copy(s, DistributionStockArticleDTO.class);
// WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(s.getWaybillNumber());
// if (Func.isNotEmpty(warehouseWaybillEntity.getConsigneeMobile())){
// marketPhone.add(warehouseWaybillEntity.getConsigneeMobile());
// }
// if (Func.isNotEmpty(warehouseWaybillEntity.getConsigneeAddress())){
// consigneeAddress.add(warehouseWaybillEntity.getConsigneeMobile());
// }
WarehouseWaybillEntity wayBillEntity = warehouseWaybillClient.findByWaybillNo(s.getWaybillNumber());
if (Func.isNotEmpty(wayBillEntity)) {
waybillId.add(wayBillEntity.getId().toString());
@ -2299,15 +2209,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isNotEmpty(s.getOrderCode())) {
orderNumber.add(s.getOrderCode());
}
// if (Func.isNotEmpty(s.getWaybillNumber())){
// waybillNo.add(s.getWaybillNumber());
// }
if (Func.isNotEmpty(s.getWarehouse())) {
warehouseName.add(s.getWarehouse());
}
// if (Func.isNotEmpty(s.getWaybillId())){
// waybillId.add(s.getWaybillId().toString());
// }
if (Func.isNotEmpty(s.getWaybillNumber())) {
waybillNo.add(s.getWaybillNumber());
}
@ -2320,9 +2224,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isNotEmpty(s.getConsigneeMobile())) {
consigneeMobile.add(s.getConsigneeMobile());
}
// if (Func.isNotEmpty(s.getConsigneeAddress())){
// consigneeAddress.add(s.getConsigneeAddress());
// }
if (Func.isNotEmpty(s.getServiceNumber())) {
serviceNumber.add(s.getServiceNumber());
}
@ -2346,6 +2247,25 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
packageLockIds.add(p.getId());
//这里根据包件进行订单状态的改变
// distributionAsyncService.checkStockArticleReservationStatus(p);
String content = "包件在"+myCurrentWarehouse.getName()+"由"+ AuthUtil.getUser().getNickName()+"计划商配配送,操作方式:订单选择包件,预约任务号:"+reservation.getReservationCode()+",车次号:"+distributionDeliveryListEntity.getTrainNumber();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",p.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",user.getUserId());
trunklinePackageTrackLog.put("updateUser",user.getUserId());
trunklinePackageTrackLog.put("updateTime",new Date());
trunklinePackageTrackLog.put("isDeleted",0);
trunklinePackageTrackLog.put("status",1);
trunklinePackageTrackLog.put("createDept",reservationPackageEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",reservationPackageEntity.getPacketBarCode());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.PLAN_DISTRIBUTION.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName());
aaa.add(trunklinePackageTrackLog);
});
} else {
//没有进行包件选择 默认添加可配送的所有包件
@ -2378,14 +2298,27 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionParcelListService.updateById(dp);
distributionAsyncService.checkStockArticleReservationStatus(dp);
packageLockIds.add(dp.getId());
String content = "包件在"+myCurrentWarehouse.getName()+"由"+ AuthUtil.getUser().getNickName()+"计划商配配送,操作方式:系统默认选择可用包件,预约任务号:"+reservation.getReservationCode()+",车次号:"+distributionDeliveryListEntity.getTrainNumber();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",dp.getTenantId());
trunklinePackageTrackLog.put("createTime",new Date());
trunklinePackageTrackLog.put("createUser",user.getUserId());
trunklinePackageTrackLog.put("updateUser",user.getUserId());
trunklinePackageTrackLog.put("updateTime",new Date());
trunklinePackageTrackLog.put("isDeleted",0);
trunklinePackageTrackLog.put("status",1);
trunklinePackageTrackLog.put("createDept",distributionReservationPackageEntity.getCreateDept());
trunklinePackageTrackLog.put("orderPackageCode",distributionReservationPackageEntity.getPacketBarCode());
trunklinePackageTrackLog.put("warehouseId",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.PLAN_DISTRIBUTION.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getUser().getNickName());
aaa.add(trunklinePackageTrackLog);
}
}
// stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
});
// s.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
// s.setAvailableQuantity(0);
// distributionStockArticleService.updateById(s);
}
//维护订单信息
distributionStockArticleService.maintenanceOrderInfo(s.getOrderCode(),myCurrentWarehouse.getId());
@ -2506,7 +2439,6 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
// reservationEntity.setWaybillId(String.join(",", waybillId));
reservationEntity.setReservationDate(date);
// -----------------------预约信息完善----------------------------
reservationEntity.setReservationCode(reservationMa());
reservationEntity.setReplaceFee(BigDecimal.ZERO);
reservationEntity.setFee(BigDecimal.ZERO);
reservationEntity.setCollectFee(BigDecimal.ZERO);
@ -2631,7 +2563,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionDeliveryListEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionDeliveryListService.updateById(distributionDeliveryListEntity);
//推送信息至运单追中日志
if (!aaa.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
// 创建处理商场信息队列
createBusinessPreConversionQueue(distributionDeliveryListEntity.getId());
@ -3299,7 +3233,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
p.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
distributionParcelListService.updateById(p);
orderPackageCodes.add(p.getOrderPackageCode());
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"计划配送,操作方式:选择包件,预约任务号:"+reservationEntity.getReservationCode();
String content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getUser().getNickName()+"计划市配配送,操作方式:选择包件,预约任务号:"+reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog= new JSONObject();
trunklinePackageTrackLog.put("tenantId",reservationEntity.getTenantId());
trunklinePackageTrackLog.put("createTime",reservationEntity.getCreateTime());

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

@ -998,7 +998,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error(method + "参数异常,ReservationId为空");
return R.fail("请联系管理员");
}
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
String zeroPackageIds = distrilbutionloadingscanDTO.getZeroPackageIds();
Long reservationId = distrilbutionloadingscanDTO.getReservationId();
List<Long> list = Func.toLongList(zeroPackageIds);
@ -1077,8 +1076,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
unLoadscanEntity.setIsAbnormalSigning(1);
unLoadscanEntity.setIsAbnormalLoading(1);
unLoadscanEntity.setIsZero(1);
unLoadscanEntity.setWarehouseId(myCurrentWarehouse.getId());
unLoadscanEntity.setWarehouseName(myCurrentWarehouse.getName());
unLoadscanEntity.setTrainNumber(deliveryListEntity.getTrainNumber());
unLoadscanEntity.setVehicleId(deliveryListEntity.getVehicleId());
unLoadscanEntity.setVehicleName(vehicleNub);
@ -2780,10 +2777,13 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
List<String> orderpackages = new ArrayList<>();
List<Long> packageLockIds = new ArrayList<>();
List<JSONObject> jsonObjects = new ArrayList<>();
List<JSONObject> aaa = new ArrayList<>();
for (String orderPackageCode : orderPackageCodes) {
List<DistributionParcelListEntity> collect = parcelListEntityList.stream().filter(p -> p.getOrderPackageCode().equals(orderPackageCode)).collect(Collectors.toList());
String content = "";
if (Func.isNotEmpty(collect) && collect.size() == 1) {
//存在则查询该包件是否进行装车
JSONObject trunklinePackageTrackLog= new JSONObject();
DistributionLoadscanEntity loadscanEntity = distributionLoadscanMapper.selectOne(Wrappers.<DistributionLoadscanEntity>query().lambda()
.ne(DistributionLoadscanEntity::getScanStatus, 1)
.eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId())
@ -2812,7 +2812,26 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
Integer m = distributionSignforMapper.updateSignUser(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), AuthUtil.getUser());
//下架解托
warehouseUpdownTypeClient.downPackageOrDelTray(loadscanEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "签收下架解托");
//维护订单状态
content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getNickName()+"后台签收,装车方式:扫描装车,配送车次号:"+deliveryListEntity.getTrainNumber()+"预约任务号:"+distributionReservationEntity.getReservationCode();
try {
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",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getNickName());
}catch (Exception e){
log.error("装车日志数据错误",e);
}
aaa.add(trunklinePackageTrackLog);
} else {
//这里装车的数据需要进行补录
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfDTO();
@ -2890,7 +2909,26 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//更新签收人
Integer m = distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), AuthUtil.getUser());
// 包件解托下架
// warehouseUpdownTypeClient.downPackageOrDelTray(collect.get(0).getOrderPackageCode(), myCurrentWarehouse.getId());
content = "包件在"+myCurrentWarehouse.getName()+"由"+AuthUtil.getNickName()+"后台签收,装车方式:补录装车,配送车次号:"+deliveryListEntity.getTrainNumber()+"预约任务号:"+distributionReservationEntity.getReservationCode();
try {
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",myCurrentWarehouse.getId());
trunklinePackageTrackLog.put("warehouseName",myCurrentWarehouse.getName());
trunklinePackageTrackLog.put("workNode",WorkNodeEnums.DISTRIBUTION_LOADING.getCode());
trunklinePackageTrackLog.put("content",content);
trunklinePackageTrackLog.put("operator",AuthUtil.getNickName());
}catch (Exception e){
log.error("装车日志数据错误",e);
}
aaa.add(trunklinePackageTrackLog);
}
//修改包件状态为装车、签收
DistributionParcelListEntity updatePackage = collect.get(0);
@ -2909,6 +2947,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
throw new RuntimeException("包件数据异常,请联系管理员!!!");
}
}
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
//添加缓存
if (!packageLockIds.isEmpty()) {
List<Long> a = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + "trainNumber:" + deliveryListEntity.getTrainNumber() + "orderPackageCode:");
@ -2956,88 +2996,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return false;
}
// List<DistributionLoadscanEntity> distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
// .ne(DistributionLoadscanEntity::getScanStatus, 1)
// .eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId())
// .eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())
// .eq(DistributionLoadscanEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())
// );
// if (Func.isEmpty(distributionLoadscanEntities) || distributionLoadscanEntities.size() == 0) {
// //这里就是出现多货的情况
// }
// //需要将这个方法抽取到异步Service中
// //这里就应该对签收的包件进行状态变更
// Long deliveryId = distrilbutionloadingscanDTO.getDeliveryId();
// distributionLoadscanEntities.forEach(l -> {
// DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(l.getPackageId());
//// distributionAsyncService.changeOrderSignforStatus(parcelListEntity);
// distributionAsyncService.changeDeliverySignforListStatus(deliveryId, parcelListEntity);
// distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
// distributionLoadscanEntity.setSignforState(2);
// distributionLoadscanEntity.setReceivedQuantity(distributionLoadscanEntity.getLoadedNub());
// distributionLoadscaninvnMapper.updateById(distributionLoadscanEntity);
// });
//这里签收还需要进行管乐配送任务的签收状态修改
//查询出这个配送任务的所有订单
// List<DistributionLoadscaninvnEntity> distributionLoadscaninvnEntities = distributionLoadscaninvnMapper.selectList(new QueryWrapper<DistributionLoadscaninvnEntity>().lambda()
// .ne(DistributionLoadscaninvnEntity::getScanStatus, 1)
// .eq(DistributionLoadscaninvnEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode())
// );
// if (distributionLoadscanEntities.size() <= 0) {
//TODO 查询库存品
//无拆包
// List<DistributionLoadscaninvnEntity> distributionLoadscanvnEntities = new ArrayList<>();
// distributionLoadscanvnEntities = baseMapper.selectdeliveryworkVnScan(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
// if (distributionLoadscanvnEntities.size() <= 0) {
// //拆包从备货查询
// distributionLoadscanvnEntities = baseMapper.selectdeliveryworkVnScanStock(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
// if (distributionLoadscanvnEntities.size()<=0){
// return R.fail(3007, "没有该货物");
// }
// }
// if (distributionLoadscanvnEntities.size()>0){
// //修改装车表状态
// boolean b =false;
// for (DistributionLoadscaninvnEntity distributionLoadscanEntity : distributionLoadscanvnEntities) {
// distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
// distributionLoadscanEntity.setSignforState(2);
// distributionLoadscanEntity.setReceivedQuantity(distributionLoadscanEntity.getLoadedNub());
// distributionLoadscaninvnMapper.updateById(distributionLoadscanEntity);
// //修改签收表司机签收数量
// this.update(new UpdateWrapper<DistributionSignforEntity>().lambda()
// .eq(DistributionSignforEntity::getReservationId,distributionLoadscanEntity.getReservationId())
// .setSql("received_quantity = received_quantity + "+distributionLoadscanEntity.getLoadedNub())
// );
// }
// }
// return R.fail(3006, "客户的该货物并未装车处理");
// }
// //修改装车表状态
// boolean b = false;
// for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) {
// if (ObjectUtils.isNotNull(distributionLoadscanEntity.getSignforState()) && distributionLoadscanEntity.getSignforState() == 2) {
// continue;
// }
// distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
// distributionLoadscanEntity.setSignforState(2);
// distributionLoadscanEntity.setReceivedQuantity(1);
// b = distributionLoadscanService.updateById(distributionLoadscanEntity);
// //修改签收表司机签收数量
// this.update(new UpdateWrapper<DistributionSignforEntity>().lambda()
// .eq(DistributionSignforEntity::getReservationId, distributionLoadscanEntity.getReservationId())
// .setSql("received_quantity = received_quantity + " + distributionLoadscanEntity.getPackageNub())
// );
// }
// distributionLoadscanService.update(new UpdateWrapper<DistributionLoadscanEntity>().lambda()
// .ne(DistributionLoadscanEntity::getScanStatus, 1)
// .eq(DistributionLoadscanEntity::getPacketBarCode, distrilbutionloadingscanDTO.getBarcode())
// .set(DistributionLoadscanEntity::getSigningTime,simpleDateFormat.format(new Date()))
// .set(DistributionLoadscanEntity::gets)
// )
// return R.status(b);
// }
@Override
public DistributionSignforVO getOneCustom(Long id) {

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

@ -1977,8 +1977,11 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
// 这里在和原始对象进行比较
check2ObjSome(t, stockArticleEntity);
if (!cn.hutool.core.util.ObjectUtil.isAllEmpty(t.getGenre(), t.getReservationStatus(),
t.getHandQuantity(), t.getDeliveryQuantity(), t.getOrderStatus(), t.getSigninQuantity())) {
baseMapper.updateDistributionStockArticleEntityById(t);
}
// 根据跳进进行更新
}

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

@ -269,18 +269,32 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
if (Func.isEmpty(one)){
log.info("#############拆包查询父级库存品物不存在##############id:{},MarketId:{},WarehouseId:{}",distributionStockListDTO.getId(),distributionStockListDTO.getMarketId(),myCurrentWarehouse.getId());
return false;
}
BasicMaterialEntity materialEntity = basicMaterialClient.getMaterialOwnId(one.getMaterialId());
if(Func.isEmpty(materialEntity)){
log.info("#############拆包查询库存品物品不存在id:{}",distributionStockListDTO.getId());
return false;
}
if ((one.getQuantityStock() - one.getQuantityOccupied()) < distributionStockListDTO.getUnpackingQuantity()){
log.info("#############拆包查询父级库存品当前可用数量不足以支持拆包数量id:{},当前可用数量:{},拆包数量:{}",distributionStockListDTO.getId(),(one.getQuantityStock() - one.getQuantityOccupied()) ,distributionStockListDTO.getUnpackingQuantity());
return false;
}
if (Func.isNotEmpty(one2)) {
//查询是否存在有拆包产物
//存在则是进行数量的累加
//有修改
DistributionStockListEntity d = one2;
d.setId(one2.getId());
int i = one2.getQuantityStock() + (distributionStockListDTO.getUnpackingQuantity()* Integer.parseInt(distributionStockListDTO.getPackageNum())) ;
int i = one2.getQuantityStock() + (distributionStockListDTO.getUnpackingQuantity()* Integer.parseInt(materialEntity.getPackageNum())) ;
log.info(one2.getIncomingBatch()+"拆包剩余在库数量:{}",i);
d.setQuantityStock(i);
d.setWarehouseId(myCurrentWarehouse.getId());
@ -340,7 +354,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
distributionStockListEntity.setPid(one.getId());
distributionStockListEntity.setCargoNumber(basicMaterialEntity.getProductCode());
distributionStockListEntity.setSku(distributionStockListDTO.getSku());
distributionStockListEntity.setQuantityStock((distributionStockListDTO.getUnpackingQuantity() * Integer.parseInt(distributionStockListDTO.getPackageNum())));
distributionStockListEntity.setQuantityStock((distributionStockListDTO.getUnpackingQuantity() * Integer.parseInt(materialEntity.getPackageNum())));
distributionStockListEntity.setUnpackingQuantity(0);
distributionStockListEntity.setOutboundQuantity(0);
distributionStockListEntity.setMaterialId(aLong);
@ -363,7 +377,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
distributionStockListInfo.setGroundingTime(new Date());
distributionStockListInfo.setPid(distributionStockListDTO.getId());
distributionStockListInfo.setSourceType("2");
distributionStockListInfo.setQuantityStock((distributionStockListDTO.getStoreNum() * Integer.parseInt(distributionStockListDTO.getPackageNum())));
distributionStockListInfo.setQuantityStock((distributionStockListDTO.getStoreNum() * Integer.parseInt(materialEntity.getPackageNum())));
distributionStockListInfoService.save(distributionStockListInfo);
} else {
log.error("#################查询库存品失败");

Loading…
Cancel
Save