Browse Source

1.修复修改字段后的bug

dev-warehouse
zhenghaoyu 2 years ago
parent
commit
8d1aff10e4
  1. 5
      blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java
  2. 9
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java
  3. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  4. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java
  5. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java
  6. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationVO.java
  7. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java
  8. 29
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java
  9. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  10. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  11. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  12. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  13. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  14. 29
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  15. 33
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  16. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  17. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java
  18. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  19. 33
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionReservationWrapper.java
  20. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionStockArticleWrapper.java
  21. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

5
blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java

@ -15,7 +15,7 @@ public class DictBizConstant {
public static final String BASIC_GROUNDING = "basic_grounding";//上架状态
public static final String STOCKUP_STATUS = "stockup_status";//备货状态
public static final String RESERVATION_STATUS = "reservation_status";//预约状态
public static final String RESERVATION_STATUS = "order_reservation_status";//预约状态
public static final String ORDER_PACKAGE_STATUS = "order_package_status";//配送包件状态
@ -25,5 +25,8 @@ public class DictBizConstant {
public static final String PDA_AUDIO = "pda_audio";//PDA扫码语音
//--------------2023-08-02 ---------------------
public static final String PERIOD_OF_TIME = "period_of_time";//时段
}

9
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java

@ -17,14 +17,15 @@
package com.logpm.distribution.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.math.BigDecimal;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.math.BigDecimal;
import java.util.Date;
/**
* 配送管理 实体类
*
@ -203,7 +204,7 @@ public class DistributionDeliveryListEntity extends TenantEntity {
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private String orderSelfNumbering;
private String orderCode;
/**
* 备货时间
*/

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

@ -24,8 +24,6 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.math.BigInteger;
/**
* 在库订单包件清单 实体类
*
@ -67,7 +65,7 @@ public class DistributionParcelListEntity extends TenantEntity {
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private String orderSelfNumbering;
private String orderCode;
/**
* 仓库
*/
@ -86,7 +84,7 @@ public class DistributionParcelListEntity extends TenantEntity {
*/
@ApiModelProperty(value = "包条码")
@TableField("order_package_code")
private String packetBarCode;
private String orderPackageCode;
@ApiModelProperty(value = "货区信息")
private String cargoTitle;

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java

@ -27,7 +27,6 @@ import org.springblade.core.tenant.mp.TenantEntity;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* 配送在库订单 实体类
@ -83,7 +82,7 @@ public class DistributionStockArticleEntity extends TenantEntity {
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private String orderSelfNumbering;
private String orderCode;
/**
* 门店id

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java

@ -78,7 +78,7 @@ public class DistributionStockListEntity extends TenantEntity {
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private String orderSelfNumbering;
private String orderCode;
/**
* 在库订单ID
*/

6
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationVO.java

@ -16,10 +16,7 @@
*/
package com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistributionAddvalueEntity;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -37,6 +34,9 @@ import java.util.List;
public class DistributionReservationVO extends DistributionReservationEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "时段名称")
private String periodOfTimeName;
/**
* 库存品信息列表

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java

@ -17,7 +17,6 @@
package com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistributionStockupEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -61,7 +60,7 @@ public class DistributionStockupVO extends DistributionStockupEntity {
private String deliveryPhone;
private String mallName;
private String stockArticleId;
private String orderSelfNumbering; //订单自编号
private String orderCode; //订单自编号
private String descriptionGoods;
private String reservationNum;
private Date stockupDate;

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

@ -16,35 +16,36 @@
*/
package com.logpm.distribution.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
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.IDistributionReservationService;
import com.logpm.distribution.vo.DistributionReservationVO;
import com.logpm.distribution.wrapper.DistributionReservationWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
/**
* 预约列表 控制器
@ -77,9 +78,9 @@ public class DistributionReservationController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distrbutionReservation")
public R<IPage<DistributionReservationEntity>> list(@ApiIgnore @RequestParam Map<String, Object> distrbutionReservation, Query query) {
public R<IPage<DistributionReservationVO>> list(@ApiIgnore @RequestParam Map<String, Object> distrbutionReservation, Query query) {
IPage<DistributionReservationEntity> pages = reservationService.page(Condition.getPage(query), Condition.getQueryWrapper(distrbutionReservation, DistributionReservationEntity.class));
return R.data(pages);
return R.data(DistributionReservationWrapper.build().pageVO(pages));
}
/**

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml

@ -171,7 +171,7 @@
<select id="selectDistributionDeliveryinventoryPage" resultType="com.logpm.distribution.vo.DistributionStockListVO">
select
ldsl.sku sku,
ldsl.order_self_numbering orderSelfNumbering,
ldsl.order_code orderCode,
ldsl.description_goods descriptionGoods,
ldsl.unit unit,
( SELECT
@ -202,7 +202,7 @@
</select>
<select id="selectDistributionDeliveryOrderPage" resultType="com.logpm.distribution.vo.DistributionStockArticleVO">
SELECT
distinct ldsa.order_self_numbering orderSelfNumbering,
distinct ldsa.order_code orderCode,
ldsa.description_goods descriptionGoods,
(
SELECT
@ -264,7 +264,7 @@
</select>
<select id="selectDistributionAppDeliveryOrderPage" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT
ldsa.order_self_numbering orderSelfNumbering,
ldsa.order_code orderCdoe,
ldsa.complete_set completeSet,
ldrs.reservation_num reservationNum,
(SELECT COALESCE(COUNT(*), 0) from logpm_distribution_loadscan ldl WHERE ldl.order_id =ldsa.id and ldl.scan_status !=1 ) loadingNub
@ -277,8 +277,8 @@
<if test="param.state != null and param.state!=''">
and ldsa.state = #{param.state}
</if>
<if test="param.orderSelfNumbering != null and param.orderSelfNumbering!=''">
and ldsa.order_self_numbering = #{param.orderSelfNumbering}
<if test="param.orderCode != null and param.orderCode!=''">
and ldsa.order_code = #{param.orderCode}
</if>
AND ldr.id = #{param.reservationId}
</where>

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -20,7 +20,7 @@
<result column="reserve5" property="reserve5"/>
<result column="warehouse" property="warehouse"/>
<result column="conditions" property="conditions"/>
<result column="order_package_code" property="packetBarCode"/>
<result column="order_package_code" property="orderPackageCode"/>
<result column="goods_allocation" property="goodsAllocation"/>
<result column="pallet" property="pallet"/>
<result column="firsts" property="firsts"/>

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -93,7 +93,7 @@
ldsa.is_deleted,
ldsa.create_dept,
ldsa.service_number,
ldsa.order_self_numbering,
ldsa.order_code,
ldsa.mall_id,
ldsa.mall_code,
ldsa.mall_name,

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

@ -103,7 +103,7 @@
ldsa.reserve4,
ldsa.reserve5,
ldsa.service_number,
ldsa.order_self_numbering,
ldsa.order_code,
ldsa.mall_id,
ldsa.mall_code,
ldsa.mall_name,

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

@ -185,7 +185,7 @@
</select>
<select id="detailOrderOwn" resultType="com.logpm.distribution.vo.DistributionStockupVO">
select ldsa.order_self_numbering orderSelfNumbering,ldsa.description_goods descriptionGoods,ldrs.reservation_num reservationNum,
select ldsa.order_code orderCode,ldsa.description_goods descriptionGoods,ldrs.reservation_num reservationNum,
lds.stockup_status stockupStatus,lds.stockup_date stockupDate,lds.stockup_area stockupArea,(
select count(1)
from logpm_distribution_stock ds

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

@ -16,28 +16,25 @@
*/
package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.*;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.excel.DistributionDeliveryListExcel;
import com.logpm.distribution.mapper.*;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.excel.DistributionDeliveryListExcel;
import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.vo.app.*;
import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO;
import com.logpm.distribution.vo.app.DistributionAppDeliverySelfVO;
import com.logpm.distribution.vo.app.DistributionAppLoadscanVO;
import com.logpm.distribution.vo.app.DistributionAppReservationVO;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import net.bytebuddy.implementation.bytecode.Throw;
import org.apache.commons.lang.StringUtils;
import org.springblade.common.serviceConstant.ServiceConstant;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
@ -47,15 +44,11 @@ import org.springblade.core.tool.utils.RandomType;
import org.springblade.system.feign.IDictBizClient;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
@ -1269,7 +1262,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
parcelListEntities.forEach(p->{
DistributionReservationPackageEntity reservationPackageEntity = new DistributionReservationPackageEntity();
reservationPackageEntity.setReservationId(reservationEntity.getId());
reservationPackageEntity.setPacketBarCode(p.getPacketBarCode());
reservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
reservationPackageEntity.setStockArticleId(p.getStockArticleId());
reservationPackageEntity.setParceListId(p.getId());
distributionReservationPackageService.save(reservationPackageEntity);
@ -1283,7 +1276,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
packageList.forEach(p->{
DistributionReservationPackageEntity reservationPackageEntity = new DistributionReservationPackageEntity();
reservationPackageEntity.setReservationId(reservationEntity.getId());
reservationPackageEntity.setPacketBarCode(p.getPacketBarCode());
reservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
reservationPackageEntity.setStockArticleId(p.getStockArticleId());
reservationPackageEntity.setParceListId(p.getId());
distributionReservationPackageService.save(reservationPackageEntity);
@ -1310,7 +1303,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
parcelListEntities.forEach(p->{
DistributionReservationPackageEntity reservationPackageEntity = new DistributionReservationPackageEntity();
reservationPackageEntity.setReservationId(reservationEntity.getId());
reservationPackageEntity.setPacketBarCode(p.getPacketBarCode());
reservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
reservationPackageEntity.setStockArticleId(p.getStockArticleId());
reservationPackageEntity.setParceListId(p.getId());
distributionReservationPackageService.save(reservationPackageEntity);
@ -1325,7 +1318,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
packageList.forEach(p->{
DistributionReservationPackageEntity reservationPackageEntity = new DistributionReservationPackageEntity();
reservationPackageEntity.setReservationId(reservationEntity.getId());
reservationPackageEntity.setPacketBarCode(p.getPacketBarCode());
reservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
reservationPackageEntity.setStockArticleId(p.getStockArticleId());
reservationPackageEntity.setParceListId(p.getId());
distributionReservationPackageService.save(reservationPackageEntity);
@ -1393,7 +1386,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
reservationPackageEntity.setStockArticleId(s.getId());
reservationPackageEntity.setReservationId(reservationEntity.getId());
reservationPackageEntity.setParceListId(p.getId());
reservationPackageEntity.setPacketBarCode(p.getPacketBarCode());
reservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
distributionReservationPackageService.save(reservationPackageEntity);
packageTotal.getAndAdd(p.getQuantity());
//TODO 这里还需要对包件状态进行修改
@ -1409,7 +1402,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
reservationPackageEntity.setStockArticleId(s.getId());
reservationPackageEntity.setReservationId(reservationEntity.getId());
reservationPackageEntity.setParceListId(dp.getId());
reservationPackageEntity.setPacketBarCode(dp.getPacketBarCode());
reservationPackageEntity.setPacketBarCode(dp.getOrderPackageCode());
distributionReservationPackageService.save(reservationPackageEntity);
packageTotal.getAndAdd(dp.getQuantity());
//TODO 这里还需要对包件状态进行修改
@ -1426,7 +1419,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionReservationStockarticleService.save(reservationStockarticleEntity);
//统计订单的包件数量
orderTotal.getAndAdd(reservationStockarticleEntity.getReservationNum());
str.add(s.getOrderSelfNumbering());
str.add(s.getOrderCode());
});
//对预约信息进行修改
String s = String.join(",", str);

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

@ -232,7 +232,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionReservationPackageEntity.setReservationId(reservationId);
distributionReservationPackageEntity.setParceListId(p.getId());
distributionReservationPackageEntity.setStockArticleId(s.getId());
distributionReservationPackageEntity.setPacketBarCode(p.getPacketBarCode());
distributionReservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
//维护订单下包件信息
distributionReservationPackageService.save(distributionReservationPackageEntity);
//此时订单下的所有包件都处于预约状态,可用数为0
@ -261,7 +261,8 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionReservationStockarticleEntity.setReservationNum(packageNum.get());
//订单无数据源,不需要进行包件信息维护
//修改订单状态为已预约
s.setOrderStatus(ServiceConstant.ORDER_STATE_ALREADY_RESERVATION);
// s.setOrderStatus(ServiceConstant.ORDER_STATE_ALREADY_RESERVATION);
s.setReservationStatus(30+"");// TODO 需要根据订单预约的包件数量是否等于订单总包件数量,存入 部分预约和已预约的状态值
stockArticleCount.getAndAdd(s.getReservationNum());
DistributionStockArticleEntity stockArticleEntity = Func.copy(s, DistributionStockArticleEntity.class);
// if (stockArticleEntity.getStoreId()==-1){
@ -281,7 +282,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
// }
distributionStockArticleService.updateById(s);
//拼接订单自编号
arrayList.add(s.getOrderSelfNumbering());
arrayList.add(s.getOrderCode());
//拼接服务号
serviceNumber.add(s.getServiceNumber());
// //订单增值服务费
@ -312,7 +313,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
i.setQuantityOccupied(quantityOccupied+i.getReservationNum());
distributionStockListService.updateById(i);
Long stocklistId = i.getId();
arrayList.add(i.getOrderSelfNumbering());
arrayList.add(i.getOrderCode());
DistributionReservationStocklistEntity distributionReservationStocklistEntity = new DistributionReservationStocklistEntity();
distributionReservationStocklistEntity.setReservationId(reservationId);
distributionReservationStocklistEntity.setStocklistId(stocklistId);
@ -560,7 +561,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//拼接订单编号
orderIds.append(stockArticleEntity.getId()).append(",");
//拼接订单自编号
hashSet.add(stockArticleEntity.getOrderSelfNumbering());
hashSet.add(stockArticleEntity.getOrderCode());
//存在数据来源,维护订单、包件和配送的关系
if (stockArticleEntity.getHandQuantity() > r.getReservationNum()) {
//这里表示订单下的包件没有进行全部配送
@ -578,7 +579,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
reservationStocklistEntityList.forEach(l -> {
DistributionStockListEntity stockListEntity = distributionStockListService.getById(l.getStocklistId());
stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - l.getReservationNum());
hashSet.add(stockListEntity.getOrderSelfNumbering());
hashSet.add(stockListEntity.getOrderCode());
stockListId.append(stockListEntity.getId()).append(",");
//这里需要将库存品信息和配送进行信息绑定
DistributionLoadscaninvnEntity loadscaninvnEntity = new DistributionLoadscaninvnEntity();
@ -651,7 +652,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionDeliveryListEntity.setCustomersNumber(reservationIds.split(",").length);
distributionDeliveryListEntity.setOrderNumber(orderNum.get());
distributionDeliveryListEntity.setType(ServiceConstant.DELIVERY_TYPE_CUSTOMER);
distributionDeliveryListEntity.setOrderSelfNumbering(String.join(",", hashSet));
distributionDeliveryListEntity.setOrderCode(String.join(",", hashSet));
if (orderIds.length() > 1) {
distributionDeliveryListEntity.setOrderId(orderIds.deleteCharAt(orderIds.length() - 1).toString());
}
@ -775,7 +776,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
packageNum.getAndIncrement();
DistributionReservationPackageEntity distributionReservationPackageEntity = new DistributionReservationPackageEntity();
distributionReservationPackageEntity.setReservationId(distributionReservationDTO.getId());
distributionReservationPackageEntity.setPacketBarCode(p.getPacketBarCode());
distributionReservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
distributionReservationPackageEntity.setParceListId(p.getId());
distributionReservationPackageEntity.setStockArticleId(s.getId());
//维护订单下包件信息
@ -791,7 +792,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionReservationPackageEntity.setReservationId(distributionReservationDTO.getId());
distributionReservationPackageEntity.setParceListId(p.getId());
distributionReservationPackageEntity.setStockArticleId(s.getId());
distributionReservationPackageEntity.setPacketBarCode(p.getPacketBarCode());
distributionReservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
distributionReservationPackageService.save(distributionReservationPackageEntity);
});
s.setAvailableQuantity(s.getAvailableQuantity() - s.getReservationNum());
@ -811,7 +812,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
initTotal.getAndAccumulate(new BigDecimal(s.getStorageFee().toString()), BigDecimal::add);
//协商费用
initTotal.getAndAccumulate(new BigDecimal(s.getRate().toString()), BigDecimal::add);
hashSet.add(s.getOrderSelfNumbering());
hashSet.add(s.getOrderCode());
});
}
List<DistributionStockListDTO> inventoryList = distributionReservationDTO.getInventoryList();
@ -828,7 +829,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionReservationStocklistEntity.setReservationNum(i.getReservationNum());
distributionReservationStocklistEntity.setStocklistId(i.getId());
distributionReservationStocklistService.save(distributionReservationStocklistEntity);
hashSet.add(i.getOrderSelfNumbering());
hashSet.add(i.getOrderCode());
stockListNum.getAndAdd(distributionReservationStocklistEntity.getReservationNum());
});
}
@ -945,14 +946,14 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//维护订单数据,订单状态直接变更未待配送
stockArticleEntity.setOrderStatus(ServiceConstant.ORDER_STATE_WAIT_DELIVERY);
distributionStockArticleService.updateById(stockArticleEntity);
orderSelfNumbering.append(stockArticleEntity.getOrderSelfNumbering()).append(",");
orderSelfNumbering.append(stockArticleEntity.getOrderCode()).append(",");
//订单数量累加
AtomicInteger packageCount = new AtomicInteger();
//订单存在数据源,维护订单包件信息
//维护预约和订单关系
DistributionReservationStockarticleEntity reservationStockarticleEntity = new DistributionReservationStockarticleEntity();
List<DistributionParcelListEntity> packageList = a.getPackageList();
if (a.getPackageList().size() == 0) {
if (Objects.isNull(packageList) || packageList.size() == 0) {
Map<String, Object> map = new HashMap<String, Object>();
//这里就是默认添加订单下的所有包件
map.put("stockArticleId", stockArticleEntity.getId());
@ -964,7 +965,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
DistributionReservationPackageEntity reservationPackageEntity = new DistributionReservationPackageEntity();
reservationPackageEntity.setReservationId(reservationEntity.getId());
reservationPackageEntity.setStockArticleId(stockArticleEntity.getId());
reservationPackageEntity.setPacketBarCode(p.getPacketBarCode());
reservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
reservationPackageEntity.setParceListId(p.getId());
distributionReservationPackageService.save(reservationPackageEntity);
});
@ -974,7 +975,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
packageCount.getAndAdd(p.getQuantity());
DistributionReservationPackageEntity reservationPackageEntity = new DistributionReservationPackageEntity();
reservationPackageEntity.setReservationId(reservationEntity.getId());
reservationPackageEntity.setPacketBarCode(p.getPacketBarCode());
reservationPackageEntity.setPacketBarCode(p.getOrderPackageCode());
reservationPackageEntity.setStockArticleId(stockArticleEntity.getId());
reservationPackageEntity.setParceListId(p.getId());
distributionReservationPackageService.save(reservationPackageEntity);
@ -1058,7 +1059,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
// distributionDeliveryListEntity.setLoadingTeamName(stockup.getLoaderName());
// distributionDeliveryListEntity.setLoadingTeamId(stockup.getLoaderId());
// distributionDeliveryListEntity.setLeadTime(stockup.getStockupDate());
distributionDeliveryListEntity.setOrderSelfNumbering(orderSelfNumbering.deleteCharAt(orderSelfNumbering.length() - 1).toString());
distributionDeliveryListEntity.setOrderCode(orderSelfNumbering.deleteCharAt(orderSelfNumbering.length() - 1).toString());
distributionDeliveryListEntity.setOrderNumber(orderTotal.get());
distributionDeliveryListEntity.setDeliveryNumber(packageTotal.get());
distributionDeliveryListEntity.setCustomersNumber(clientNum.get());

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

@ -16,11 +16,9 @@
*/
package com.logpm.distribution.service.impl;
import com.aliyuncs.unmarshaller.JsonUnmashaller;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.BeanUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
@ -33,14 +31,13 @@ import com.logpm.distribution.mapper.DistributionAddvalueMapper;
import com.logpm.distribution.mapper.DistributionDeliveryListMapper;
import com.logpm.distribution.mapper.DistributionStockArticleMapper;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.wrapper.DistributionStockArticleWrapper;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
@ -287,7 +284,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
DistributionStockListEntity distributionStockListEntity = new DistributionStockListEntity();
distributionStockListEntity.setStockArticleId(Optional.ofNullable(distributionParcelList.getStockArticleId()).orElse(null)); //订单ID
distributionStockListEntity.setOrderSelfNumbering(Optional.ofNullable(distributionStockArticleEntity.getOrderSelfNumbering()).orElse(null)); //订单自编号
distributionStockListEntity.setOrderCode(Optional.ofNullable(distributionStockArticleEntity.getOrderCode()).orElse(null)); //订单自编号
// distributionStockListEntity.setIncomingBatch(distributionStockArticleEntity.get); //入库批次号
distributionStockListEntity.setServiceNumber(Optional.ofNullable(distributionStockArticleEntity.getServiceNumber()).orElse(null)); //服务号
distributionStockListEntity.setDescriptionGoods(Optional.ofNullable(distributionParcelList.getMaterialName()).orElse(null)); //物料名称
@ -332,8 +329,8 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
//这里进行订单查询
l.forEach(id -> {
DistributionStockArticleEntity distributionStockArticleEntity = this.baseMapper.selectById(id);
DistributionStockArticleVO distributionStockArticleVO = Func.copy(distributionStockArticleEntity, DistributionStockArticleVO.class);
distributionStockArticleEntityList.add(distributionStockArticleVO);
// DistributionStockArticleVO distributionStockArticleVO = Func.copy(distributionStockArticleEntity, DistributionStockArticleVO.class);
distributionStockArticleEntityList.add(DistributionStockArticleWrapper.build().entityVO(distributionStockArticleEntity));
});

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

@ -168,7 +168,7 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
//添加拆包记录
DistributionUnpackingDetailsEntity distributionUnpackingDetails= new DistributionUnpackingDetailsEntity();
distributionUnpackingDetails.setStockArticleId(Optional.ofNullable(one.getStockArticleId()).orElse(null));
distributionUnpackingDetails.setOrderSelfNumber(Optional.ofNullable(one.getOrderSelfNumbering()).orElse(null));
distributionUnpackingDetails.setOrderSelfNumber(Optional.ofNullable(one.getOrderCode()).orElse(null));
distributionUnpackingDetails.setItemName(Optional.ofNullable(one.getDescriptionGoods()).orElse(null));
distributionUnpackingDetails.setUnpackingQuantity(Optional.ofNullable(one.getUnpackingQuantity()).orElse(null));
distributionUnpackingDetails.setStockListId(Optional.ofNullable(distributionStockListDTO.getId()).orElse(null));

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -385,7 +385,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
queryWrapper.ne("order_self_numbering",orderSelfNumbering);
}
List<DistributionParcelListEntity> list = distributionParcelListService.list(queryWrapper);
vo.setOrderSelfNumbering(list.get(0).getOrderSelfNumbering());
vo.setOrderSelfNumbering(list.get(0).getOrderCode());
int pn = list.size();
vo.setPlanNum(pn);
planNum = planNum + pn;
@ -745,7 +745,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
//查询包件信息
List<DistributionParcelListEntity> list1 = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda()
.eq(DistributionParcelListEntity::getStockArticleId, so.getStockArticleId())
.eq(DistributionParcelListEntity::getPacketBarCode, coding)
.eq(DistributionParcelListEntity::getOrderPackageCode, coding)
);
if(list1.size() > 0){
n.set(true);

33
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionReservationWrapper.java

@ -0,0 +1,33 @@
package com.logpm.distribution.wrapper;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.vo.DistributionReservationVO;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.system.cache.DictBizCache;
import java.util.Objects;
/**
* @program: LogisticsPlatform-Service
* @description: 包件包装类
* @author: cyz
* @create: 2023-08-02 14:35
**/
public class DistributionReservationWrapper extends BaseEntityWrapper<DistributionReservationEntity, DistributionReservationVO> {
public static DistributionReservationWrapper build(){
return new DistributionReservationWrapper();
}
@Override
public DistributionReservationVO entityVO(DistributionReservationEntity entity) {
DistributionReservationVO reservationVO = Objects.requireNonNull(BeanUtil.copy(entity,DistributionReservationVO.class));
reservationVO.setPeriodOfTimeName(DictBizCache.getValue(DictBizConstant.PERIOD_OF_TIME,entity.getPeriodOfTime()));
return reservationVO;
}
}

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

@ -5,7 +5,9 @@ import com.logpm.distribution.vo.DistributionStockArticleVO;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.feign.IUserClient;
import java.util.Date;
import java.util.Objects;
@ -25,6 +27,8 @@ public class DistributionStockArticleWrapper extends BaseEntityWrapper<Distribut
public DistributionStockArticleVO entityVO(DistributionStockArticleEntity entity) {
DistributionStockArticleVO distributionStockupVO = Objects.requireNonNull(BeanUtil.copy(entity, DistributionStockArticleVO.class));
IUserClient userCliient = SpringUtil.getBean(IUserClient.class);
//计算在库天数
long time1 = entity.getWarehouseEntryTime().getTime(); //入库
@ -51,7 +55,7 @@ public class DistributionStockArticleWrapper extends BaseEntityWrapper<Distribut
distributionStockupVO.setFreezeStatusName(DictBizCache.getValue(DictBizConstant.FREEZE_STATUS,entity.getFreezeStatus()));
distributionStockupVO.setReservationStatusName(DictBizCache.getValue(DictBizConstant.RESERVATION_STATUS,entity.getReservationStatus()));
distributionStockupVO.setStockupStatusName(DictBizCache.getValue(DictBizConstant.STOCKUP_STATUS,entity.getStockupStatus()));
distributionStockupVO.setCreateUserName(userCliient.userInfoById(distributionStockupVO.getCreateUser()).getData().getName());
return distributionStockupVO;
}

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -391,14 +391,14 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
entity.setDeliveryQuantity(0);
entity.setTransferQuantity(0);
entity.setSigninQuantity(0);
entity.setGroundingStatus(0);
entity.setGroundingStatus(0+"");
entity.setIsOpai(1);
entity.setAvailableQuantity(allNum);
entity.setCreateUser(null);
entity.setCreateDept(null);
entity.setUpdateUser(null);
entity.setInventoryPersonId(null);
entity.setFreezeStatus(0);
entity.setFreezeStatus(0+"");
entity.setId(null);
Long aLong = distributionStockArticleClient.addData(entity);
if(aLong == 0){

Loading…
Cancel
Save