Browse Source

Merge branch 'fix_bug_2024-01-09' into dev

single_db
pref_mail@163.com 1 year ago
parent
commit
af78355eab
  1. 8
      blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java
  2. 14
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java
  3. 9
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataVehicleController.java
  4. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java
  5. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.java
  6. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.xml
  7. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataVehicleService.java
  8. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java
  9. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java
  10. 146
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionStockArticleExcel.java
  11. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  12. 31
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  13. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

8
blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java

@ -41,10 +41,10 @@ public class LauncherServiceImpl implements LauncherService {
PropsUtil.setProperty(props, "spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile)); PropsUtil.setProperty(props, "spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile));
PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.username","nacos"); // PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.username","nacos");
PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.password","Nacos123123"); // PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.password","Nacos123123");
PropsUtil.setProperty(props, "spring.cloud.nacos.config.username","nacos"); // PropsUtil.setProperty(props, "spring.cloud.nacos.config.username","nacos");
PropsUtil.setProperty(props, "spring.cloud.nacos.config.password","Nacos123123"); // PropsUtil.setProperty(props, "spring.cloud.nacos.config.password","Nacos123123");
PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile)); PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));

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

@ -450,5 +450,17 @@ public class DistributionStockArticleEntity extends TenantEntity {
@ApiModelProperty(value = "配载件数") @ApiModelProperty(value = "配载件数")
private Integer carsLoadNum; private Integer carsLoadNum;
/**
* 未入库数量
*/
@TableField(exist = false)
private Integer unreceivedQuantity;
/**
* 创建用户id和时间
*/
@TableField(exist = false)
private Long createUser;
@TableField(exist = false)
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
private Date createTime;
} }

9
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataVehicleController.java

@ -33,6 +33,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
@ -126,8 +127,12 @@ public class BasicdataVehicleController extends BladeController {
@GetMapping("/dictionary") @GetMapping("/dictionary")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "车辆信息表",notes = "传入code") @ApiOperation(value = "车辆信息表",notes = "传入code")
public R<List<BasicdataVehicleVO>> dictionary() { public R<List<BasicdataVehicleVO>> dictionary(@RequestParam(value = "vehicleNub",required = false) String vehicleNub) {
List<BasicdataVehicleVO> dictionary = basicdataVehicleService.selectBasicdataVehicleDictionary();
log.info(">>>>112 {}",vehicleNub);
List<BasicdataVehicleVO> dictionary = basicdataVehicleService.selectBasicdataVehicleDictionary(vehicleNub);
return R.data(dictionary); return R.data(dictionary);
} }

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java

@ -151,7 +151,8 @@ public class BasicdataWarehouseController extends BladeController {
@GetMapping("/listName") @GetMapping("/listName")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入warehouseWarehouse") @ApiOperation(value = "分页", notes = "传入warehouseWarehouse")
public R<List<BasicdataWarehouseEntity>> listName(String name) { public R<List<BasicdataWarehouseEntity>> listName(@RequestParam("name") String name) {
log.info(">>>>>>>>>>>>>传入warehouseWarehouse name {}",name);
List<BasicdataWarehouseEntity> pages = warehouseService.pageListName(name); List<BasicdataWarehouseEntity> pages = warehouseService.pageListName(name);
return R.data(pages); return R.data(pages);
} }

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.java

@ -59,7 +59,7 @@ public interface BasicdataVehicleMapper extends BaseMapper<BasicdataVehicleEntit
* *
* @return * @return
*/ */
List<BasicdataVehicleVO> selectBasicdataDictionary(); List<BasicdataVehicleVO> selectBasicdataDictionary(@Param("vehicleNub") String vehicleNub);
List<BasicdataVehicleEntity> findCarListByName(@Param("carNumber") String carNumber); List<BasicdataVehicleEntity> findCarListByName(@Param("carNumber") String carNumber);
} }

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.xml

@ -176,6 +176,9 @@
</select> </select>
<select id="selectBasicdataDictionary" resultType="com.logpm.basicdata.vo.BasicdataVehicleVO"> <select id="selectBasicdataDictionary" resultType="com.logpm.basicdata.vo.BasicdataVehicleVO">
select id,vehicle_nub,vehicle_owner from logpm_basicdata_vehicle where is_deleted = 0 select id,vehicle_nub,vehicle_owner from logpm_basicdata_vehicle where is_deleted = 0
<if test="vehicleNub!=null">
and vehicle_nub like concat('%',#{vehicleNub},'%')
</if>
</select> </select>
<select id="findCarListByName" resultType="com.logpm.basicdata.entity.BasicdataVehicleEntity"> <select id="findCarListByName" resultType="com.logpm.basicdata.entity.BasicdataVehicleEntity">
select * select *

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataVehicleService.java

@ -65,7 +65,7 @@ public interface IBasicdataVehicleService extends BaseService<BasicdataVehicleEn
/** /**
* 车辆信息表 字典 * 车辆信息表 字典
*/ */
List<BasicdataVehicleVO> selectBasicdataVehicleDictionary(); List<BasicdataVehicleVO> selectBasicdataVehicleDictionary(String vehicleNub);
/** /**
* 新增关联表 * 新增关联表
*/ */

8
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataVehicleServiceImpl.java

@ -36,6 +36,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
@ -87,8 +88,11 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl<BasicdataVehicl
} }
@Override @Override
public List<BasicdataVehicleVO> selectBasicdataVehicleDictionary() { public List<BasicdataVehicleVO> selectBasicdataVehicleDictionary(String vehicleNub) {
return baseMapper.selectBasicdataDictionary(); if(StringUtil.isBlank(vehicleNub)){
vehicleNub = null;
}
return baseMapper.selectBasicdataDictionary(vehicleNub);
} }
@Override @Override

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java

@ -135,7 +135,7 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
@Override @Override
public List<BasicdataWarehouseEntity> pageListName(String name) { public List<BasicdataWarehouseEntity> pageListName(String name) {
QueryWrapper<BasicdataWarehouseEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<BasicdataWarehouseEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(StringUtils.isNotBlank(name), BasicdataWarehouseEntity::getName, name); queryWrapper.lambda().like(StringUtils.isNotBlank(name), BasicdataWarehouseEntity::getName, name);
return baseMapper.selectList(queryWrapper); return baseMapper.selectList(queryWrapper);
} }

146
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionStockArticleExcel.java

@ -17,13 +17,17 @@
package com.logpm.distribution.excel; package com.logpm.distribution.excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight; import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight; import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@ -40,6 +44,12 @@ import java.util.Date;
public class DistributionStockArticleExcel implements Serializable { public class DistributionStockArticleExcel implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 运单号
*/
@ColumnWidth(20)
@ExcelProperty("运单号")
private String waybillNumber;
/** /**
* 服务号 * 服务号
*/ */
@ -73,8 +83,7 @@ public class DistributionStockArticleExcel implements Serializable {
/** /**
* 仓库 * 仓库
*/ */
@ColumnWidth(20) @ExcelIgnore
@ExcelProperty("仓库编码")
private String warehouseCode; private String warehouseCode;
/** /**
* 入库时间 * 入库时间
@ -82,12 +91,30 @@ public class DistributionStockArticleExcel implements Serializable {
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("入库时间") @ExcelProperty("入库时间")
private Date warehouseEntryTime; private Date warehouseEntryTime;
/**
* 最新入库时间
*/
@ColumnWidth(20)
@ExcelProperty("最新入库时间")
private Date warehouseEntryTimeEnd;
/** /**
* 在库时间 * 在库时间
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("在库时间") @ExcelProperty("在库时间")
private String storeTime; private String storeTime;
/**
* 收货单位
*/
@ColumnWidth(20)
@ExcelProperty("收货单位")
private String consigneeUnit;
/**
* 收货人
*/
@ColumnWidth(20)
@ExcelProperty("收货人")
private String consigneePerson;
/** /**
* 订单总件数 * 订单总件数
*/ */
@ -101,35 +128,105 @@ public class DistributionStockArticleExcel implements Serializable {
@ExcelProperty("在库件数") @ExcelProperty("在库件数")
private Integer handQuantity; private Integer handQuantity;
/** /**
* 是否齐套 * 未入库数量
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("是否齐套") @ExcelProperty("未入库数量")
private String completeSet; private Integer unreceivedQuantity;
/**
* 分拣件数
*/
@ColumnWidth(20)
@ExcelProperty("分拣件数")
private Integer sortingQuantity;
/**
* 配送件数
*/
@ColumnWidth(20)
@ExcelProperty("配送件数")
private Integer deliveryQuantity;
/**
* 中转件数
*/
@ColumnWidth(20)
@ExcelProperty("中转件数")
private Integer transferQuantity;
/**
* 中转件数
*/
@ColumnWidth(20)
@ExcelProperty("签收件数")
private Integer signinQuantity;
/**
* 上架状态
*/
@ColumnWidth(20)
@ExcelProperty("上架状态")
private String groundingStatusName;
/**
* 订单来源
*/
@ColumnWidth(20)
@ExcelProperty("订单来源")
private String resource;
/** /**
* 品牌 * 品牌
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("品牌") @ExcelProperty("品牌")
private String brand; private String brand;
/**
* 所在托盘
*/
@ColumnWidth(20)
@ExcelProperty("所在托盘")
private String trays;
/**
* 冻结状态
*/
@ColumnWidth(20)
@ExcelProperty("冻结状态")
private String freezeStatusName;
/**
* 订单状态
*/
@ColumnWidth(20)
@ExcelProperty("订单状态")
private String orderStatusName;
/**
* 预约状态
*/
@ColumnWidth(20)
@ExcelProperty("预约状态")
private String reservationStatusName;
/**
* 备货状态
*/
@ColumnWidth(20)
@ExcelProperty("备货状态")
private String stockupStatusName;
/**
* 是否齐套
*/
@ColumnWidth(20)
@ExcelProperty("是否齐套")
private String completeSetName;
/** /**
* 服务类型 * 服务类型
*/ */
@ExcelIgnore
private String typeService;
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("服务类型") @ExcelProperty("服务类型")
private String typeService; private String typeServerName;
/** /**
* 顾客名字 * 顾客名字
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("顾客名字") @ExcelProperty("顾客名字")
private String customerName; private String customerName;
/**
* 运单号
*/
@ColumnWidth(20)
@ExcelProperty("运单号")
private String waybillNumber;
/** /**
* 顾客电话 * 顾客电话
*/ */
@ -143,23 +240,30 @@ public class DistributionStockArticleExcel implements Serializable {
@ExcelProperty("顾客地址") @ExcelProperty("顾客地址")
private String customerAddress; private String customerAddress;
/** /**
* 收货人 * 增值服务
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("收货人") @ExcelProperty("增值服务")
private String consigneePerson; private BigDecimal fee;
/** /**
* 收货单位 * 创建人
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("收货单位") @ExcelProperty("创建人")
private String consigneeUnit; private String createUserName;
/** /**
* 订单来源 * 创建时间
*/ */
@ColumnWidth(20) @ColumnWidth(20)
@ExcelProperty("订单来源") @ExcelProperty("创建时间")
private String resource; private Date createTime;
// /**
// * 配载件数
// */
// @ColumnWidth(20)
// @ExcelProperty("配载件数")
// private Integer carsLoadNum;
/** /**
* 类型;1 预约单 2库存单 * 类型;1 预约单 2库存单
*/ */

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

@ -729,6 +729,7 @@
ldsa.status, ldsa.status,
ldsa.is_deleted, ldsa.is_deleted,
ldsa.create_dept, ldsa.create_dept,
ldsa.incoming_num,
ldsa.reserve1, ldsa.reserve1,
ldsa.reserve2, ldsa.reserve2,
ldsa.reserve3, ldsa.reserve3,
@ -767,7 +768,7 @@
ldsa.rate, ldsa.rate,
ldsa.advance_id, ldsa.advance_id,
ldsa.waybill_id, ldsa.waybill_id,
group_concat(DISTINCT ldpl.waybill_number) as waybillNumber, ldsa.waybill_number AS waybillNumber,
ldsa.consignee_unit, ldsa.consignee_unit,
ldsa.collect_fee, ldsa.collect_fee,
ldsa.storage_fee, ldsa.storage_fee,

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

@ -573,6 +573,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} }
return Resp.scanFail("此码不是订制品", "此码不是订制品"); return Resp.scanFail("此码不是订制品", "此码不是订制品");
} }
//查询当前扫描的包件是否进行了装车
DistributionParcelListEntity parcelList = distributionParcelListService.selectByOrderPackageCode(distrilbutionloadingscanDTO.getBarcode(), myCurrentWarehouse.getId());
if (!Objects.isNull(parcelList)){
if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelList.getOrderPackageLoadingStatus())){
return Resp.scanFail("操作失败", "包件已装车");
}
}
//获取当前用户司机 //获取当前用户司机
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId()); DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
//异步确认包条扫描信息 //异步确认包条扫描信息
@ -5081,6 +5088,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())); List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode()));
if (Func.isNotEmpty(parcelListEntities) && parcelListEntities.size() == 1) { if (Func.isNotEmpty(parcelListEntities) && parcelListEntities.size() == 1) {
DistributionParcelListEntity parcelListEntity = parcelListEntities.get(0); DistributionParcelListEntity parcelListEntity = parcelListEntities.get(0);
if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelListEntity.getOrderPackageLoadingStatus())){
//包件已装车
log.error("重复异常装车,:{}", parcelListEntity.getOrderPackageCode());
return Resp.scanFail("操作失败", "包件已装车");
}
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId()); DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId());
if (Func.isEmpty(stockArticleEntity)) { if (Func.isEmpty(stockArticleEntity)) {
log.error("###############订单异常:{}", stockArticleEntity); log.error("###############订单异常:{}", stockArticleEntity);
@ -5154,10 +5166,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionLoadscanAbnormalEntity.setPackageCode(parcelListEntity.getOrderPackageCode()); distributionLoadscanAbnormalEntity.setPackageCode(parcelListEntity.getOrderPackageCode());
distributionLoadscanAbnormalEntity.setPackageId(parcelListEntity.getId()); distributionLoadscanAbnormalEntity.setPackageId(parcelListEntity.getId());
distributionLoadscanAbnormalService.save(distributionLoadscanAbnormalEntity); distributionLoadscanAbnormalService.save(distributionLoadscanAbnormalEntity);
//修改包件状态 维护订单状态
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yichuku.getValue());
distributionParcelListService.updateById(parcelListEntity);
//添加包件数据至扫描表中 //添加包件数据至扫描表中
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDeliveryId())) { if (Func.isNotEmpty(distributionDeliverySelfEntity.getDeliveryId())) {
loadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId()); loadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
@ -5190,8 +5198,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
loadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId()); loadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId());
loadscanEntity.setIsAbnormalLoading(2); loadscanEntity.setIsAbnormalLoading(2);
distributionLoadscanService.save(loadscanEntity); distributionLoadscanService.save(loadscanEntity);
//修改包件装车状态
//修改包件状态 维护订单状态
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
parcelListEntity.setOrderPackageStatus(OrderPackageStatusConstant.yichuku.getValue());
distributionParcelListService.updateById(parcelListEntity);
//出库 //出库
warehouseUpdownTypeClient.downPackage(distrilbutionloadingscanDTO.getBarcode(), myCurrentWarehouse.getId()); warehouseUpdownTypeClient.downDeliveryPackage(distrilbutionloadingscanDTO.getBarcode(), myCurrentWarehouse.getId());
//查询本车次是否第一次扫码,没有则更新上车时间 //查询本车次是否第一次扫码,没有则更新上车时间
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId()); Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量 //更新签收表的装车数量
@ -5199,11 +5212,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//维护订单信息 //维护订单信息
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), myCurrentWarehouse.getId()); distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), myCurrentWarehouse.getId());
//扣减订单在库数量
// distributionStockArticleMapper.deductionHandQuantity(loadscanEntity.getOrderId(), loadscanEntity.getLoadedNub());
//异步维护此异常装车包件的订单状态
// distributionAsyncService.maintenanceOrderStatus(parcelListEntity.getOrderCode(),myCurrentWarehouse.getId());
DistributionSignforEntity signforEntity = distributionSignforService.getOne(Wrappers.<DistributionSignforEntity>query().lambda().eq(DistributionSignforEntity::getReservationId, reservationEntity.getId()).eq(DistributionSignforEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())); DistributionSignforEntity signforEntity = distributionSignforService.getOne(Wrappers.<DistributionSignforEntity>query().lambda().eq(DistributionSignforEntity::getReservationId, reservationEntity.getId()).eq(DistributionSignforEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()));
if (Func.isNotEmpty(signforEntity)) { if (Func.isNotEmpty(signforEntity)) {
//标识该客户存在异常装车包件,为了后续的异常装车审核 //标识该客户存在异常装车包件,为了后续的异常装车审核
@ -5230,12 +5238,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override @Override
public R getPackageListByDeliveryIdAndOrderId(IPage<Object> page, Long deliveryId, Long orderId) { public R getPackageListByDeliveryIdAndOrderId(IPage<Object> page, Long deliveryId, Long orderId) {
List<DistributionParcelListVO> allPackageList = new ArrayList<>(); List<DistributionParcelListVO> allPackageList = new ArrayList<>();
List<DistributionParcelListEntity> reservationPackageList = baseMapper.getPackageListByDeliveryId(deliveryId, orderId); List<DistributionParcelListEntity> reservationPackageList = baseMapper.getPackageListByDeliveryId(deliveryId, orderId);
DistributionReservationOrderPackageVO reservationOrderPackageVO = new DistributionReservationOrderPackageVO(); DistributionReservationOrderPackageVO reservationOrderPackageVO = new DistributionReservationOrderPackageVO();
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, orderId).eq(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()).notIn(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue(), OrderPackageStatusConstant.yichuku.getValue())); List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, orderId).eq(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue()).notIn(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue(), OrderPackageStatusConstant.yichuku.getValue()));
if (Func.isNotEmpty(reservationPackageList)) { if (Func.isNotEmpty(reservationPackageList)) {
List<DistributionParcelListVO> parcelListVOS = DistributionParcelListWrapper.build().listVO(reservationPackageList); List<DistributionParcelListVO> parcelListVOS = DistributionParcelListWrapper.build().listVO(reservationPackageList);

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

@ -71,7 +71,9 @@ import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.cache.DictBizCache; import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.DictBiz; import org.springblade.system.entity.DictBiz;
import org.springblade.system.entity.User;
import org.springblade.system.feign.IDictBizClient; import org.springblade.system.feign.IDictBizClient;
import org.springblade.system.feign.IUserClient;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -125,7 +127,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
private final DistributionParcelNumberMapper distributionParcelNumberMapper; private final DistributionParcelNumberMapper distributionParcelNumberMapper;
private final IWarehouseTrayGoodsClient warehouseTrayGoodsClient; private final IWarehouseTrayGoodsClient warehouseTrayGoodsClient;
private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient; private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient;
private final IUserClient userClient;
@Override @Override
public IPage<DistributionStockArticleVO> selectDistributionStockArticlePage(IPage<DistributionStockArticleVO> page, DistributionStockArticleVO distributionStockArticle) { public IPage<DistributionStockArticleVO> selectDistributionStockArticlePage(IPage<DistributionStockArticleVO> page, DistributionStockArticleVO distributionStockArticle) {
@ -163,11 +165,36 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
List<DistributionStockArticleEntity> list = baseMapper.exportDistributionStockArticle(paramMap, idArr); List<DistributionStockArticleEntity> list = baseMapper.exportDistributionStockArticle(paramMap, idArr);
List<DistributionStockArticleExcel> excelList = new ArrayList<>(); List<DistributionStockArticleExcel> excelList = new ArrayList<>();
list.forEach(li -> { if (list.size()>61){
DistributionStockArticleExcel excel = new DistributionStockArticleExcel(); list.parallelStream().forEach(li -> {
BeanUtil.copyProperties(li,excel); li.setCreateUserName(userClient.userInfoById(li.getCreateUser()).getData().getName());
excelList.add(excel); DistributionStockArticleVO distributionStockArticleVO = DistributionStockArticleWrapper.build().entityVO(li);
}); DistributionStockArticleExcel excel = new DistributionStockArticleExcel();
if (distributionStockArticleVO.getTotalNumber() != null &&
distributionStockArticleVO.getIncomingNum() != null) {
distributionStockArticleVO.setUnreceivedQuantity(
distributionStockArticleVO.getTotalNumber() - distributionStockArticleVO.getIncomingNum()
);
}
BeanUtil.copyProperties(distributionStockArticleVO,excel);
excelList.add(excel);
});
}else {
list.forEach(li -> {
li.setCreateUserName(userClient.userInfoById(li.getCreateUser()).getData().getName());
DistributionStockArticleVO distributionStockArticleVO = DistributionStockArticleWrapper.build().entityVO(li);
DistributionStockArticleExcel excel = new DistributionStockArticleExcel();
if (distributionStockArticleVO.getTotalNumber() != null &&
distributionStockArticleVO.getIncomingNum() != null) {
distributionStockArticleVO.setUnreceivedQuantity(
distributionStockArticleVO.getTotalNumber() - distributionStockArticleVO.getIncomingNum()
);
}
BeanUtil.copyProperties(distributionStockArticleVO,excel);
excelList.add(excel);
});
}
return excelList; return excelList;
} }

Loading…
Cancel
Save