Browse Source

Merge branch 'dev' into pre-production

newStockUp
pref_mail@163.com 1 year ago
parent
commit
320be4f9de
  1. 1
      blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/feign/IBasicMaterialClient.java
  2. 15
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java
  3. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockArticleEntity.java
  4. 2
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/entity/WayBillEntity.java
  5. 19
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  6. 171
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadEntity.java
  7. 119
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadLineEntity.java
  8. 59
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsOrderEntity.java
  9. 29
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java
  10. 22
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java
  11. 2
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java
  12. 89
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/QuestContrastVO.java
  13. 2
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TaskPackagelistVO.java
  14. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  15. 6
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java
  16. 19
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  17. 7
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java
  18. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  19. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  20. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java
  21. 114
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  22. 135
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  23. 4
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java
  24. 92
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  25. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadLineMapper.java
  26. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadLineMapper.xml
  27. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java
  28. 58
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  29. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java
  30. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
  31. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadLineService.java
  32. 14
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java
  33. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java
  34. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  35. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLineServiceImpl.java
  36. 58
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  37. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java
  38. 13
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTaskApiController.java
  39. 53
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/TaskQuestController.java
  40. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/QuestDetailDTO.java
  41. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.java
  42. 74
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml
  43. 32
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java
  44. 237
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java
  45. 10
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java

1
blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/feign/IBasicMaterialClient.java

@ -41,6 +41,7 @@ public interface IBasicMaterialClient {
String GETMATERIAL = API_PREFIX + "/getMaterial";
String GETMATERIALID = API_PREFIX + "/getMaterialId";
String ADDMATERIAL = API_PREFIX + "/addMaterial";
String GETMATERIALLIKE = API_PREFIX + "/getMaterialLike";
/**
* 获取物料基础信息列表

15
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataClientClient.java

@ -45,14 +45,15 @@ public interface IBasicdataClientClient {
String BASICDATACLIENTUSERENTITYLISTBYUSERID = API_PREFIX + "/BasicdataClientUserEntityListByUserId";
/**
* 获取基础客户表列表
*
* @param current 页号
* @param size 页数
* @return BladePage
*/
* 获取基础客户表列表
*
* @param current 页号
* @param size 页数
* @param customerName
* @return BladePage
*/
@GetMapping(TOP)
BladePage<BasicdataClientEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
BladePage<BasicdataClientEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size,@RequestParam("code") String customerName);
@GetMapping(API_PREFIX+"/findByName")
BasicdataClientEntity findByName(@RequestParam String customerName);

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

@ -445,6 +445,8 @@ public class DistributionStockArticleEntity extends TenantEntity {
private String isZero;//是否零担 0否 1是
@ApiModelProperty(value = "入库件数")
private Integer incomingNum;

2
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/entity/WayBillEntity.java

@ -254,7 +254,7 @@ public class WayBillEntity implements Serializable,Cloneable{
private Integer sendTiny ;
/** 紧急度:1=正常,2=急,3=加急,4=特急 */
@ApiModelProperty(name = "紧急度:1=正常,2=急,3=加急,4=特急",notes = "")
private Integer urgency ;
private String urgency ;
/** 回单数 */
@ApiModelProperty(name = "回单数",notes = "")
private Integer receiptNum ;

19
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java

@ -0,0 +1,19 @@
package com.logpm.trunkline.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class LoadCarsDTO implements Serializable {
private Long loadId;
private Integer pageNum;
private Integer pageSize;
private String loadCarsNo;
private Long warehouseId;
}

171
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadEntity.java

@ -0,0 +1,171 @@
package com.logpm.trunkline.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.math.BigDecimal;
import java.util.Date;
@Data
@TableName("logpm_trunkline_cars_load")
@ApiModel(value = "TrunklineCarsLoad对象", description = "车辆配载表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineCarsLoadEntity extends TenantEntity {
/** 预留1 */
@ApiModelProperty(name = "预留1",notes = "")
private String reserve1 ;
/** 预留2 */
@ApiModelProperty(name = "预留2",notes = "")
private String reserve2 ;
/** 预留3 */
@ApiModelProperty(name = "预留3",notes = "")
private String reserve3 ;
/** 预留4 */
@ApiModelProperty(name = "预留4",notes = "")
private String reserve4 ;
/** 预留5 */
@ApiModelProperty(name = "预留5",notes = "")
private String reserve5 ;
/** 创建人名称 */
@ApiModelProperty(name = "创建人名称",notes = "")
private String createUserName ;
/** 发车批次号 */
@ApiModelProperty(name = "发车批次号",notes = "")
private String carsNo ;
/** 路线名称 */
@ApiModelProperty(name = "路线名称",notes = "")
private String carsLineName ;
/** 司机id */
@ApiModelProperty(name = "司机id",notes = "")
private Long driverId ;
/** 副驾id */
@ApiModelProperty(name = "副驾id",notes = "")
private Long assistantId ;
/** 是否外请司机0否 1是 */
@ApiModelProperty(name = "是否外请司机0否 1是",notes = "")
private Integer isExternal ;
/** 司机名称 */
@ApiModelProperty(name = "司机名称",notes = "")
private String driverName ;
/** 司机电话 */
@ApiModelProperty(name = "司机电话",notes = "")
private String driverMobile ;
/** 车辆id */
@ApiModelProperty(name = "车辆id",notes = "")
private Long carId ;
/** 装车方式:1=手动装车,2=扫描装车 */
@ApiModelProperty(name = "装车方式:1=手动装车,2=扫描装车",notes = "")
private String loadingType ;
/** 送货方式:1=自提,2=送货 */
@ApiModelProperty(name = "送货方式:1=自提,2=送货",notes = "")
private String deliveryType ;
/** 付款方式:1=现付,2=回付 */
@ApiModelProperty(name = "付款方式:1=现付,2=回付",notes = "")
private String payMethod ;
/** 分摊方式:1=按单数分摊,2=按件数分摊,3=按重量分摊,4=按体积分摊,5=按公式分摊,6=按结算重量分摊 */
@ApiModelProperty(name = "分摊方式:1=按单数分摊,2=按件数分摊,3=按重量分摊,4=按体积分摊,5=按公式分摊,6=按结算重量分摊",notes = "")
private String chargeType ;
/** 是否为直发商家:1=是,2=否【用于配载】 */
@ApiModelProperty(name = "是否为直发商家:1=是,2=否【用于配载】",notes = "")
private String isCustomer ;
/** 客户类型:1=商场,2=C端客户[多选] */
@ApiModelProperty(name = "客户类型:1=商场,2=C端客户[多选]",notes = "")
private String customerType ;
/** 承运商id */
@ApiModelProperty(name = "承运商id",notes = "")
private Long carrierId ;
/** 承运商名称 */
@ApiModelProperty(name = "承运商名称",notes = "")
private String carrierName ;
/** 承运时间 */
@ApiModelProperty(name = "承运时间",notes = "")
private Date carrierTime ;
/** 车牌号 */
@ApiModelProperty(name = "车牌号",notes = "")
private String carNumber ;
/** 开始仓库id */
@ApiModelProperty(name = "开始仓库id",notes = "")
private Long startWarehouseId ;
/** 开始仓库名称 */
@ApiModelProperty(name = "开始仓库名称",notes = "")
private String startWarehouseName ;
/** 终点仓库ids(多个拼接) */
@ApiModelProperty(name = "终点仓库ids(多个拼接)",notes = "")
private String endWarehouseIds ;
/** 终点仓库名称(多个拼接) */
@ApiModelProperty(name = "终点仓库名称(多个拼接)",notes = "")
private String endWarehouseNames ;
/** 配载类型 配载类型:1=干线类型,2=支线类型,3=专车类型,4=外部中转,5=外围路线 */
@ApiModelProperty(name = "配载类型 配载类型:1=干线类型,2=支线类型,3=专车类型,4=外部中转,5=外围路线",notes = "")
private String loadType ;
/** 批次状态:1=已装车,2=已发车,-2=取消发车,3=网点到达,4=网点发车,5=终点到达,6=已卸车,7=已出库,8=已签收,9=出库到达 */
@ApiModelProperty(name = "批次状态:1=已装车,2=已发车,-2=取消发车,3=网点到达,4=网点发车,5=终点到达,6=已卸车,7=已出库,8=已签收,9=出库到达",notes = "")
private String loadStatus ;
/** 车辆满载率 */
@ApiModelProperty(name = "车辆满载率",notes = "")
private BigDecimal fullLoadRate ;
/** 计划装车件数 */
@ApiModelProperty(name = "计划装车件数",notes = "")
private Integer planLoadingNumber ;
/** 实际装车件数 */
@ApiModelProperty(name = "实际装车件数",notes = "")
private Integer realLoadingNumber ;
/** 卸车件数 */
@ApiModelProperty(name = "卸车件数",notes = "")
private Integer unloadNumber ;
/** 异常件数 */
@ApiModelProperty(name = "异常件数",notes = "")
private Integer abnormalNum ;
/** 最新到车仓库id */
@ApiModelProperty(name = "最新到车仓库id",notes = "")
private Long nowWarehouseId ;
/** 发车时间 */
@ApiModelProperty(name = "发车时间",notes = "")
private Date startTime ;
/** 到车时间 */
@ApiModelProperty(name = "到车时间",notes = "")
private Date arriveTime ;
/** 备注 */
@ApiModelProperty(name = "备注",notes = "")
private String remark ;
/** 合计运输费用 */
@ApiModelProperty(name = "合计运输费用",notes = "")
private BigDecimal countTransportCost ;
/** 代收货款 */
@ApiModelProperty(name = "代收货款",notes = "")
private BigDecimal replacePrice ;
/** 直发客户收货时间 */
@ApiModelProperty(name = "直发客户收货时间",notes = "")
private Date receivingTime ;
/** 是否结算:1=未结算,2=已结算 */
@ApiModelProperty(name = "是否结算:1=未结算,2=已结算",notes = "")
private String isSettlement ;
/** 结算金额 */
@ApiModelProperty(name = "结算金额",notes = "")
private BigDecimal settlementValue ;
/** 结算人 */
@ApiModelProperty(name = "结算人",notes = "")
private String settlementPerson ;
/** 结算人id */
@ApiModelProperty(name = "结算人id",notes = "")
private Long settlementPersonId ;
/** 滞留件数 */
@ApiModelProperty(name = "滞留件数",notes = "")
private Integer detentionNum ;
/** 成本确认:1=是,0=否 */
@ApiModelProperty(name = "成本确认:1=是,0=否",notes = "")
private String costAllocationType ;
/** 成本确认人id */
@ApiModelProperty(name = "成本确认人id",notes = "")
private Long costAllocationAdminId ;
/** 成本确认人 */
@ApiModelProperty(name = "成本确认人",notes = "")
private String costAllocationAdmin ;
}

119
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsLoadLineEntity.java

@ -0,0 +1,119 @@
package com.logpm.trunkline.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.math.BigDecimal;
import java.util.Date;
@Data
@TableName("logpm_trunkline_cars_load_line")
@ApiModel(value = "TrunklineCarsLoadLine对象", description = "车辆配载线路节点表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineCarsLoadLineEntity extends TenantEntity {
/** 预留1 */
@ApiModelProperty(name = "预留1",notes = "")
private String reserve1 ;
/** 预留2 */
@ApiModelProperty(name = "预留2",notes = "")
private String reserve2 ;
/** 预留3 */
@ApiModelProperty(name = "预留3",notes = "")
private String reserve3 ;
/** 预留4 */
@ApiModelProperty(name = "预留4",notes = "")
private String reserve4 ;
/** 预留5 */
@ApiModelProperty(name = "预留5",notes = "")
private String reserve5 ;
/** 车辆配载id */
@ApiModelProperty(name = "车辆配载id",notes = "")
private Long loadId ;
/** 节点类型 1仓库 2商场 */
@ApiModelProperty(name = "节点类型 1仓库 2商场",notes = "")
private String nodeType ;
/** clientId */
@ApiModelProperty(name = "clientId",notes = "")
private Long nodeId ;
/** 节点名称 */
@ApiModelProperty(name = "节点名称",notes = "")
private String nodeName ;
/** 联系人 */
@ApiModelProperty(name = "联系人",notes = "")
private String linkMan ;
/** 联系人电话 */
@ApiModelProperty(name = "联系人电话",notes = "")
private String linkPhone ;
/** 联系人地址 */
@ApiModelProperty(name = "联系人地址",notes = "")
private String linkAddress ;
/** 节点状态 0未到达 1已到达 */
@ApiModelProperty(name = "节点状态 0未到达 1已到达",notes = "")
private String nodeStatus ;
/** 排序 */
@ApiModelProperty(name = "排序",notes = "")
private Integer sort ;
/** 到车时间 */
@ApiModelProperty(name = "到车时间",notes = "")
private Date arriveDate ;
/** 发车时间 */
@ApiModelProperty(name = "发车时间",notes = "")
private Date startDate ;
/** 计划装车件数 */
@ApiModelProperty(name = "计划装车件数",notes = "")
private Integer planLoadingNumber ;
/** 实际装车件数 */
@ApiModelProperty(name = "实际装车件数",notes = "")
private Integer realLoadingNumber ;
/** 异常件数 */
@ApiModelProperty(name = "异常件数",notes = "")
private Integer abnormalNum ;
/** 卸车件数 */
@ApiModelProperty(name = "卸车件数",notes = "")
private Integer unloadNumber ;
/** 现付运输费 */
@ApiModelProperty(name = "现付运输费",notes = "")
private BigDecimal nowTransportCost ;
/** 现付油卡费 */
@ApiModelProperty(name = "现付油卡费",notes = "")
private BigDecimal oilCost ;
/** 回付运输费 */
@ApiModelProperty(name = "回付运输费",notes = "")
private BigDecimal backTransportCost ;
/** 到付运输费 */
@ApiModelProperty(name = "到付运输费",notes = "")
private BigDecimal reachTransportCost ;
/** 整车信息费 */
@ApiModelProperty(name = "整车信息费",notes = "")
private BigDecimal wholeCarInfoCost ;
/** 整车保险费 */
@ApiModelProperty(name = "整车保险费",notes = "")
private BigDecimal wholeCarInsuranceCost ;
/** 整车落地费 */
@ApiModelProperty(name = "整车落地费",notes = "")
private BigDecimal wholeCarGroundCost ;
/** 发站装车费 */
@ApiModelProperty(name = "发站装车费",notes = "")
private BigDecimal hairWholeCost ;
/** 发站其他费 */
@ApiModelProperty(name = "发站其他费",notes = "")
private BigDecimal hairWholeOtherCost ;
/** 到站卸车费 */
@ApiModelProperty(name = "到站卸车费",notes = "")
private BigDecimal unloadCost ;
/** 到站其他费 */
@ApiModelProperty(name = "到站其他费",notes = "")
private BigDecimal unloadOtherCost ;
/** 油费 */
@ApiModelProperty(name = "油费",notes = "")
private BigDecimal fuel ;
/** 路桥费 */
@ApiModelProperty(name = "路桥费",notes = "")
private BigDecimal tollFee ;
}

59
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsOrderEntity.java

@ -0,0 +1,59 @@
package com.logpm.trunkline.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("logpm_trunkline_cars_order")
@ApiModel(value = "TrunklineCarsOrder对象", description = "车辆配载节点关联订单表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineCarsOrderEntity extends TenantEntity {
/** 预留1 */
@ApiModelProperty(name = "预留1",notes = "")
private String reserve1 ;
/** 预留2 */
@ApiModelProperty(name = "预留2",notes = "")
private String reserve2 ;
/** 预留3 */
@ApiModelProperty(name = "预留3",notes = "")
private String reserve3 ;
/** 预留4 */
@ApiModelProperty(name = "预留4",notes = "")
private String reserve4 ;
/** 预留5 */
@ApiModelProperty(name = "预留5",notes = "")
private String reserve5 ;
/** 仓库id */
@ApiModelProperty(name = "仓库id",notes = "")
private Long warehouseId ;
/** 仓库名称 */
@ApiModelProperty(name = "仓库名称",notes = "")
private String warehouseName ;
/** 路线节点关联id */
@ApiModelProperty(name = "路线节点关联id",notes = "")
private Long loadLineId ;
/** 订单id */
@ApiModelProperty(name = "订单id",notes = "")
private Long orderId ;
/** 订单编码 */
@ApiModelProperty(name = "订单编码",notes = "")
private String orderCode ;
/** 运单id */
@ApiModelProperty(name = "运单id",notes = "")
private Long waybillId ;
/** 运单号 */
@ApiModelProperty(name = "运单号",notes = "")
private String waybillNo ;
/** 订单总件数 */
@ApiModelProperty(name = "订单总件数",notes = "")
private Integer totalNum ;
/** 计划件数 */
@ApiModelProperty(name = "计划件数",notes = "")
private Integer planNum ;
}

29
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java

@ -0,0 +1,29 @@
package com.logpm.trunkline.vo;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
import lombok.Data;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@Data
public class TrunklineCarsLoadVO extends TrunklineCarsLoadEntity {
private List<TrunklineCarsLoadLineEntity> carsLoadLineList = new ArrayList<>();
private BigDecimal nowTransportCost;
private BigDecimal oilCost;
private BigDecimal backTransportCost;
private BigDecimal reachTransportCost ;
private BigDecimal wholeCarInfoCost ;
private BigDecimal wholeCarInsuranceCost ;
private BigDecimal wholeCarGroundCost ;
private BigDecimal hairWholeCost ;
private BigDecimal hairWholeOtherCost ;
private BigDecimal unloadCost ;
private BigDecimal unloadOtherCost ;
private BigDecimal fuel ;
private BigDecimal tollFee ;
}

22
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java

@ -48,6 +48,13 @@ public class QuestDetailEntity extends TenantEntity {
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
@TableField(exist = false)
private String code;
/**
* 预留2
*/
@ -141,6 +148,21 @@ public class QuestDetailEntity extends TenantEntity {
*/
@ApiModelProperty(value = "货位")
private String positionCode;
/**
* 货位
*/
@ApiModelProperty(value = "一级品")
private String firsts;
/**
* 货位
*/
@ApiModelProperty(value = "二级品")
private String second;
/**
* 货位
*/
@ApiModelProperty(value = "三级品")
private String thirdProduct;
/**
* 托盘码
*/

2
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java

@ -291,7 +291,7 @@ public class WarehouseWaybillEntity extends TenantEntity {
@ApiModelProperty(value = "运单类型")
private Integer waybillType;//运单类型 1订制品 2零担
@ApiModelProperty(value = "金额是否收齐")
@ApiModelProperty(value = "收款状态 0未签收 1已签收")
private Integer receivedStatus;//收款状态 0未签收 1已签收
//--------------2023-11-18 干线新增字段

89
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/QuestContrastVO.java

@ -0,0 +1,89 @@
package com.logpm.warehouse.vo;
import lombok.Data;
/**
* 对比数据实体
*/
@Data
public class QuestContrastVO {
/**
* 订单自编号
*/
private String orderCode;
/**
* 品牌名称
*/
private String brandName;
/**
* 商场 名称
*/
private String mallName;
/***
* 客户名称
*/
private String customerName;
/**
* 三级名称
*/
private String thirdProduct;
/**
* 物料名称
*/
private String materialName;
/**
* 总件数
*/
private String totalNumber;
/**
* 在库数据
*/
private String handQuantity;
/**
* 所在托盘
*/
private String pallet;
/**
* 货物信息
*/
private String goodsAllocation;
/**
* 盘点人
*/
private String updateUser;
/**
* 盘点时间
*/
private String updateTime;
/**
* 盘点数据
*/
private String questNum;
/**
* 差异数
*/
private String differenceNum;
/**
* 托盘码
*/
private String trayCode;
private String trayId;
private String positionCode;
private String allocationId;
/**
* 更新的货物信息
*/
private String groundingPositionCode;
/**
* 货物状态
*/
private String questStatusName;
}

2
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/TaskPackagelistVO.java

@ -26,7 +26,7 @@ public class TaskPackagelistVO {
* 运单号
*/
@ApiModelProperty(value = "运单号")
private String waybillNub;
private String waybillNumber;
/**
* 库位信息

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java

@ -118,7 +118,7 @@ public class AftersalesWorkOrderController extends BladeController {
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入aftersalesWorkOrder")
public R submit(@Valid @RequestBody AftersalesWorkOrderEntity aftersalesWorkOrder) {
return R.status(aftersalesWorkOrderService.saveOrUpdate(aftersalesWorkOrder));
return R.status(aftersalesWorkOrderService.saveOrUpdateOwn(aftersalesWorkOrder));
}
/**

6
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java

@ -49,4 +49,10 @@ public interface IAftersalesWorkOrderService extends BaseService<AftersalesWorkO
*/
List<AftersalesWorkOrderExcel> exportAftersalesWorkOrder(Wrapper<AftersalesWorkOrderEntity> queryWrapper);
/**
* 工单添加和修改
* @param aftersalesWorkOrder
* @return
*/
boolean saveOrUpdateOwn(AftersalesWorkOrderEntity aftersalesWorkOrder);
}

19
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -16,6 +16,7 @@
*/
package com.logpm.aftersales.service.impl;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
import com.logpm.aftersales.vo.AftersalesWorkOrderVO;
import com.logpm.aftersales.excel.AftersalesWorkOrderExcel;
@ -51,4 +52,22 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
return aftersalesWorkOrderList;
}
/**
* 添加或修改
* @param aftersalesWorkOrder
* @return
*/
@Override
public boolean saveOrUpdateOwn(AftersalesWorkOrderEntity aftersalesWorkOrder) {
if(ObjectUtils.isNull(aftersalesWorkOrder.getId())){
//新增
return baseMapper.insert(aftersalesWorkOrder) > 0 ? true : false;
}else{
//修改
return baseMapper.updateById(aftersalesWorkOrder) > 0 ? true : false;
}
}
}

7
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataClientClient.java

@ -18,6 +18,7 @@ package com.logpm.basicdata.feign;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.entity.BasicdataClientEntity;
@ -52,11 +53,13 @@ public class BasicdataClientClient implements IBasicdataClientClient {
@Override
@GetMapping(TOP)
public BladePage<BasicdataClientEntity> top(Integer current, Integer size) {
public BladePage<BasicdataClientEntity> top(Integer current, Integer size, String customerName) {
Query query = new Query();
query.setCurrent(current);
query.setSize(size);
IPage<BasicdataClientEntity> page = basicdataClientService.page(Condition.getPage(query));
QueryWrapper<BasicdataClientEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.like(ObjectUtils.isNotNull(customerName),"client_name",customerName);
IPage<BasicdataClientEntity> page = basicdataClientService.page(Condition.getPage(query),queryWrapper);
return BladePage.of(page);
}

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

@ -73,7 +73,13 @@
reservation_id = #{reservationId} AND parce_list_id = #{packageId}
</delete>
<update id="cancelReservationZeroPackage">
UPDATE logpm_distribution_reservation_zero_package AS ldrzp
SET ldrzp.quantity = ( ldrzp.quantity - #{retentionQuantity}
WHERE
ldrzp.zero_package_status != 2
AND retentionQuantity !=0
AND ldrzp.reservation_id = #{reservationId}
AND parcel_list_id = #{orderPackageId}
</update>
<update id="cancelReservationInventory">
update logpm_dis_stock_list_detail SET stock_package_status = 2 WHERE reservation_id = #{reservationId} AND id=#{orderPackageId} and is_deleted = 0

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

@ -284,4 +284,5 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return
*/
int deductionLoadingInventoryNum(@Param("reservationId")Long reservationId,@Param("deliveryId") Long deliveryId,@Param("nub") Integer loadedNub);
}

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

@ -206,10 +206,10 @@ public interface IDistributionAsyncService {
void checkOrderLoadingStatus(Long packageId);
/**
* 维护包件订单预约状态
* 维护订单预约装车状态
* @param parcelListEntity
*/
void checkReservationStatusByPackage(DistributionParcelListEntity parcelListEntity);
void checkReservationStatusAndLoadingStatusByPackage(DistributionParcelListEntity parcelListEntity);
/**
* 修改零担备货状态
@ -250,4 +250,12 @@ public interface IDistributionAsyncService {
* @param orderPackageId
*/
void checkRetentionInventoryReservationAndDeliveryInfo(Long reservationId, Long deliveryId, Long orderPackageId);
/**
* 维护零担的预约数量
* @param reservationId
* @param deliveryId
* @param orderPackageId
*/
void checkRetentionZeroPackageReservationAndDeliveryInfo(Long reservationId, Long deliveryId, Long orderPackageId, Long orderId);
}

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

@ -886,22 +886,33 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
@Override
public void checkReservationStatusByPackage(DistributionParcelListEntity parcelListEntity) {
public void checkReservationStatusAndLoadingStatusByPackage(DistributionParcelListEntity parcelListEntity) {
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda()
.eq(DistributionParcelListEntity::getStockArticleId, parcelListEntity.getStockArticleId()));
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId());
boolean flag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.yiyueyue.getValue()));
if (flag) {
boolean reservationStatusFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.yiyueyue.getValue()));
if (reservationStatusFlag) {
stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
} else {
flag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.daiyuyue.getValue()));
if (flag) {
reservationStatusFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.daiyuyue.getValue()));
if (reservationStatusFlag) {
stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.daiyuyue.getValue());
} else {
stockArticleEntity.setReservationStatus(OrderReservationStatusConstant.bufenyuyue.getValue());
}
}
boolean loadingStatusFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue()));
if (loadingStatusFlag) {
stockArticleEntity.setOrderStatus(OrderStatusConstant.chuku.getValue());
} else {
loadingStatusFlag = parcelListEntities.stream().allMatch(p -> p.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue()));
if (loadingStatusFlag) {
stockArticleEntity.setOrderStatus(OrderStatusConstant.ruku.getValue());
} else {
stockArticleEntity.setOrderStatus(OrderStatusConstant.bufenchuku.getValue());
}
}
distributionStockArticleService.updateById(stockArticleEntity);
}
@ -1169,6 +1180,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
}
}
}
//维护预约的预约数量
maintenanceReservationPackageNum(reservationId);
maintenanceDeliveryPackageNum(deliveryId);
@ -1178,9 +1190,9 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
@Override
public void checkRetentionInventoryReservationAndDeliveryInfo(Long reservationId, Long deliveryId, Long orderPackageId) {
DisStockListDetailEntity disStockListDetail = disStockListDetailService.getById(orderPackageId);
if (Func.isNotEmpty(disStockListDetail)){
DistributionReservationStocklistEntity reservationStocklistEntity = distributionReservationMapper.selectInventoryInfoByReservationIdAndInventoryId(reservationId,disStockListDetail.getStockListId());
if (Func.isNotEmpty(reservationStocklistEntity)){
if (Func.isNotEmpty(disStockListDetail)) {
DistributionReservationStocklistEntity reservationStocklistEntity = distributionReservationMapper.selectInventoryInfoByReservationIdAndInventoryId(reservationId, disStockListDetail.getStockListId());
if (Func.isNotEmpty(reservationStocklistEntity)) {
//查询该类型的库存品是否进行了全部滞留
List<DisStockListDetailEntity> list = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getReservationId, reservationStocklistEntity.getReservationId())
@ -1188,11 +1200,11 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
.ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
reservationStocklistEntity.setReservationNum(0);
if (Func.isNotEmpty(list)){
if (Func.isNotEmpty(list)) {
int sum = list.stream().mapToInt(DisStockListDetailEntity::getNum).sum();
reservationStocklistEntity.setReservationNum(sum);
}
if (reservationStocklistEntity.getReservationNum()==0){
if (reservationStocklistEntity.getReservationNum() == 0) {
reservationStocklistEntity.setStockListStatus(ReservationOrderStatusConstant.quxiao.getValue());
}
distributionReservationStocklistMapper.updateById(reservationStocklistEntity);
@ -1204,23 +1216,54 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
maintenanceDeliveryPackageNum(deliveryId);
}
@Override
public void checkRetentionZeroPackageReservationAndDeliveryInfo(Long reservationId, Long deliveryId, Long orderPackageId, Long orderId) {
//查询当前存在的对应零担包件信息
DistributionReservationStockarticleEntity distributionReservationStockarticle = distributionReservationStockarticleMapper.selectOne(Wrappers.<DistributionReservationStockarticleEntity>query().lambda()
.eq(DistributionReservationStockarticleEntity::getReservationId, reservationId)
.eq(DistributionReservationStockarticleEntity::getStockArticleId, orderId)
.ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(distributionReservationStockarticle)) {
//查询该订单零担品类数量进行重新设置
List<DistributionReservationZeroPackageEntity> reservationZeroPackageEntities = reservationZeroPackageService.list(Wrappers.<DistributionReservationZeroPackageEntity>query().lambda()
.eq(DistributionReservationZeroPackageEntity::getReservationId, reservationId)
.eq(DistributionReservationZeroPackageEntity::getStockArticleId, orderId)
.ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(reservationZeroPackageEntities)){
int sum = reservationZeroPackageEntities.stream().mapToInt(DistributionReservationZeroPackageEntity::getQuantity).sum();
distributionReservationStockarticle.setReservationNum(sum);
}else {
distributionReservationStockarticle.setReservationNum(0);
distributionReservationStockarticle.setStockArticleStatus(ReservationOrderStatusConstant.quxiao.getValue());
}
distributionReservationStockarticleMapper.updateById(distributionReservationStockarticle);
}
//维护预约的预约数量
maintenanceReservationPackageNum(reservationId);
maintenanceDeliveryPackageNum(deliveryId);
}
/**
* 维护配送数量和状态
*
* @param deliveryId
*/
@Transactional
private void maintenanceDeliveryPackageNum(Long deliveryId) {
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(deliveryId);
if (Func.isNotEmpty(distributionDeliveryListEntity)){
if (Func.isNotEmpty(distributionDeliveryListEntity)) {
List<DistributionReservationEntity> distributionReservationEntities = distributionDeliveryListMapper.selectReservationByDeliveryListId(distributionDeliveryListEntity.getId());
if (Func.isNotEmpty(distributionReservationEntities)){
if (Func.isNotEmpty(distributionReservationEntities)) {
int sum = distributionReservationEntities.stream().mapToInt(DistributionReservationEntity::getReservationNum).sum() + distributionReservationEntities.stream().mapToInt(DistributionReservationEntity::getReservationStockListNum).sum();
distributionDeliveryListEntity.setDeliveryNumber(sum);
}else {
} else {
distributionDeliveryListEntity.setDeliveryNumber(0);
}
distributionDeliveryListMapper.updateById(distributionDeliveryListEntity);
if (distributionDeliveryListEntity.getDeliveryNumber() == 0){
if (distributionDeliveryListEntity.getDeliveryNumber() == 0) {
distributionDeliveryListMapper.deleteById(distributionDeliveryListEntity);
}
}
@ -1228,33 +1271,34 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
/**
* 维护预约数量和状态
*
* @param reservationId
*/
@Transactional
private void maintenanceReservationPackageNum(Long reservationId) {
DistributionReservationEntity distributionReservationEntity = distributionReservationMapper.selectById(reservationId);
if (Func.isNotEmpty(distributionReservationEntity)){
List<DistributionReservationStockarticleEntity> distributionReservationStockarticleEntities = distributionReservationMapper.selectStockArticleByReservationId(distributionReservationEntity.getId());
if (Func.isNotEmpty(distributionReservationStockarticleEntities)){
int sum = distributionReservationStockarticleEntities.stream().mapToInt(DistributionReservationStockarticleEntity::getReservationNum).sum();
distributionReservationEntity.setReservationNum(sum);
}else {
distributionReservationEntity.setReservationNum(0);
}
List<DistributionReservationStocklistEntity> distributionReservationStocklistEntities = distributionReservationMapper.selectStockListByReservationId(distributionReservationEntity.getId());
if (Func.isNotEmpty(distributionReservationStocklistEntities)){
//统计库存品数
int sum = distributionReservationStocklistEntities.stream().mapToInt(DistributionReservationStocklistEntity::getReservationNum).sum();
distributionReservationEntity.setReservationStockListNum(sum);
}else {
distributionReservationEntity.setReservationStockListNum(0);
}
distributionReservationMapper.updateById(distributionReservationEntity);
if (distributionReservationEntity.getReservationNum() ==0 && distributionReservationEntity.getReservationStockListNum() == 0){
distributionReservationMapper.deleteById(distributionReservationEntity);
DistributionReservationEntity distributionReservationEntity = distributionReservationMapper.selectById(reservationId);
if (Func.isNotEmpty(distributionReservationEntity)) {
List<DistributionReservationStockarticleEntity> distributionReservationStockarticleEntities = distributionReservationMapper.selectStockArticleByReservationId(distributionReservationEntity.getId());
if (Func.isNotEmpty(distributionReservationStockarticleEntities)) {
int sum = distributionReservationStockarticleEntities.stream().mapToInt(DistributionReservationStockarticleEntity::getReservationNum).sum();
distributionReservationEntity.setReservationNum(sum);
} else {
distributionReservationEntity.setReservationNum(0);
}
List<DistributionReservationStocklistEntity> distributionReservationStocklistEntities = distributionReservationMapper.selectStockListByReservationId(distributionReservationEntity.getId());
if (Func.isNotEmpty(distributionReservationStocklistEntities)) {
//统计库存品数
int sum = distributionReservationStocklistEntities.stream().mapToInt(DistributionReservationStocklistEntity::getReservationNum).sum();
distributionReservationEntity.setReservationStockListNum(sum);
} else {
distributionReservationEntity.setReservationStockListNum(0);
}
distributionReservationMapper.updateById(distributionReservationEntity);
if (distributionReservationEntity.getReservationNum() == 0 && distributionReservationEntity.getReservationStockListNum() == 0) {
distributionReservationMapper.deleteById(distributionReservationEntity);
}
}
}
}
@Transactional
private void checkReservationAndDeliverySigningStatus(Long reservationId, Long deliveryId) {

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

@ -5137,42 +5137,38 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public R retentionScan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
Integer retentionType = distrilbutionloadingscanDTO.getRetentionType();
DistributionDeliveryListEntity deliveryListEntity = this.getById(distrilbutionloadingscanDTO.getDeliveryId());
List<DistributionRetentionScanVo> retentionScanVos = new ArrayList<>();
switch (retentionType) {
case 1:
//包件--库存品 和包件
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())
.eq(DistributionLoadscanEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
List<DistributionParcelListEntity> parcelListEntities = baseMapper.selectPackageListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
// List<DisStockListDetailEntity> detailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
if (Func.isNotEmpty(parcelListEntities)) {
List<DistributionParcelListEntity> packageInfo = parcelListEntities.stream().filter(p -> Func.equals(p.getOrderPackageCode(), distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList());
if (packageInfo.size() > 1) {
log.error("################包条码重复:{}", distrilbutionloadingscanDTO.getBarcode());
return Resp.scanFail("操作失败", "操作失败");
}
if (packageInfo.size() == 1) {
// DistributionRetentionScanVo distributionRetentionScanVo = new DistributionRetentionScanVo();
//此时才是满足条件的包件,能够进行滞留
if (Func.isNotEmpty(loadscanEntityList)) {
if (loadscanEntityList.size() == 1) {
//包件存在装车才能进行滞留
//通过配送任务和包件确定预约信息
DistributionParcelListEntity parcelListEntity = packageInfo.get(0);
DistributionRetentionScanVo retentionScanVo = baseMapper.selectRetentionPackage(parcelListEntity.getOrderPackageCode(), distrilbutionloadingscanDTO.getDeliveryId());
DistributionLoadscanEntity distributionLoadscanEntity = loadscanEntityList.get(0);
DistributionRetentionScanVo retentionScanVo = baseMapper.selectRetentionPackage(distributionLoadscanEntity.getOrderPackageCode(), distributionLoadscanEntity.getDeliveryId());
retentionScanVos.add(retentionScanVo);
}
} else {
List<DisStockListDetailEntity> detailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
if (Func.isNotEmpty(detailEntities)) {
List<DisStockListDetailEntity> stockListDetailEntities = detailEntities.stream().filter(i -> Func.isNotEmpty(i.getStockPackageCode()) && Func.equals(i.getStockPackageCode(), distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList());
if (stockListDetailEntities.size() > 1) {
log.error("################库存品条码重复:{}", distrilbutionloadingscanDTO.getBarcode());
return Resp.scanFail("操作失败", "操作失败");
}
if (stockListDetailEntities.size() == 1) {
DisStockListDetailEntity disStockListDetailEntity = stockListDetailEntities.get(0);
DistributionRetentionScanVo inventoryPackage = baseMapper.selectRetentionInventoryPackage(disStockListDetailEntity.getStockPackageCode(), distrilbutionloadingscanDTO.getDeliveryId());
List<DistributionLoadscaninvnEntity> loadscaninvnEntityList = distributionLoadscaninvnService.list(Wrappers.<DistributionLoadscaninvnEntity>query().lambda()
.eq(DistributionLoadscaninvnEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())
.eq(DistributionLoadscaninvnEntity::getOrderPackageCode, distrilbutionloadingscanDTO.getBarcode())
.ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(loadscaninvnEntityList)) {
if (loadscaninvnEntityList.size() == 1) {
//库存品存在装车数据才能进行滞留操作
DistributionLoadscaninvnEntity loadscaninvnEntity = loadscaninvnEntityList.get(0);
DistributionRetentionScanVo inventoryPackage = baseMapper.selectRetentionInventoryPackage(loadscaninvnEntity.getOrderPackageCode(), loadscaninvnEntity.getDeliveryId());
retentionScanVos.add(inventoryPackage);
}
} else {
log.error("################查询包件和库存品为空:{}", distrilbutionloadingscanDTO.getDeliveryId());
return Resp.scanFail("操作失败", "不属于该配送任务!!!");
}
}
break;
@ -5181,39 +5177,34 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(distributionRetentionScanVos)) {
retentionScanVos.addAll(distributionRetentionScanVos);
}
// //托盘
// TrayTypeDataVO trayTypeDataVO = warehouseTrayTypeClient.selectListByTrayCode(distrilbutionloadingscanDTO.getBarcode());
// if (Func.isEmpty(trayTypeDataVO)){
// log.error("################查询托盘失败,托盘码为:{}",distrilbutionloadingscanDTO.getBarcode());
// return Resp.scanFail("扫描托盘失败","请扫描托盘码");
// }
// List<WarehouseTrayGoodsEntity> goodsLsit = trayTypeDataVO.getGoodsLsit();
// boolean flag = goodsLsit.stream().allMatch(good -> good.getAssociationType().equals("3"));
// if (!flag){
// log.error("#########托盘货物存在多种类型,:{}", goodsLsit.stream().distinct().map(WarehouseTrayGoodsEntity::getAssociationType).collect(Collectors.toList()));
// return Resp.scanFail("托盘存在多种货物","托盘存在多种货物");
// }
// //查询出配送任务所有包件
//// List<DistributionParcelListEntity> parcelListEntityList = baseMapper.selectPackageListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
// boolean isBelongTo = goodsLsit.stream().map(WarehouseTrayGoodsEntity::getAssociationId).allMatch(good -> parcelListEntities.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()).contains(good));
// if (isBelongTo){
// //判断包件是否都属于该配送计划
// goodsLsit.forEach(g->{
// DistributionRetentionScanVo retentionScanVo = baseMapper.selectRetentionPackage(g.getAssociationValue(), distrilbutionloadingscanDTO.getDeliveryId());
// retentionScanVos.add(retentionScanVo);
// });
// }else {
// log.error("####################托盘包件不完全属于该配送任务,isBelongTo:{}",isBelongTo);
// return Resp.scanFail("存在货物不属于该任务","存在货物不属于该任务");
// }
// break;
// default:
// log.info("################无满足滞留扫描类型");
// break;
}
// warehouseRetentionScanClient.saveRetentionScan();
if (Func.isEmpty(retentionScanVos)) {
return Resp.scanFail("操作失败", "无该信息!!!");
//如果均不存在则就该判断该货物是否属于当前的配送任务,如果属于则是未装车,如果不属于则此码无效
List<DistributionParcelListEntity> distributionParcelListEntities = baseMapper.selectPackageListByDeliveryListId(deliveryListEntity.getId());
boolean flag = false;
if (Func.isNotEmpty(distributionParcelListEntities)){
List<DistributionParcelListEntity> isHave = distributionParcelListEntities.stream().filter(p -> p.getOrderPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList());
if (Func.isNotEmpty(isHave)){
flag = isHave.size() == 1;
}
}else {
List<DisStockListDetailEntity> disStockListDetailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
if (Func.isNotEmpty(disStockListDetailEntities)){
List<DisStockListDetailEntity> isHaveinven = disStockListDetailEntities.stream().filter(inven -> Func.isNotEmpty(inven.getStockPackageCode()) && inven.getStockPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList());
if (Func.isNotEmpty(isHaveinven)){
flag = isHaveinven.size() == 1;
}
}
}
if (flag){
//存在该订制品或者库存品包件信息但是未进行装车操作
return Resp.scanFail("包件未装车","包件未装车");
}else {
//该配送任务查询无该包件信息
return Resp.scanFail("此配送无该包件","此配送无该包件信息");
}
}
return R.data(retentionScanVos);
}
@ -5355,11 +5346,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (row == 1) {
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getDeliveryId, deliveryId).eq(DistributionLoadscanEntity::getReservationId, reservationId).eq(DistributionLoadscanEntity::getPackageId, orderPackageId).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
if (Func.isNotEmpty(loadscanEntity)) {
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(loadscanEntity.getPackageId());
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.weizhuancghe.getValue());
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
distributionParcelListService.updateById(parcelListEntity);
//已经进行装车
loadscanEntity.setScanStatus(LoadingStatusConstant.quxiao.getValue());
distributionLoadscanService.updateById(loadscanEntity);
// 对应签收信息的装车数量要进行扣减
int a = distributionSignforMapper.deductionLoadingPacjageNum(loadscanEntity.getReservationId(), loadscanEntity.getDeliveryId(), loadscanEntity.getLoadedNub());
distributionAsyncService.checkReservationStatusAndLoadingStatusByPackage(parcelListEntity);
}
//进行了一条包件任务的取消,此时就应该对预约、配送任务进行数量的维护
distributionAsyncService.checkRetentionReservationAndDeliveryInfo(reservationId, deliveryId);
@ -5385,6 +5381,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//只进行了一次修改,这里就需要进行是否装车进行判断
DistributionLoadscaninvnEntity loadscaninvnEntity = distributionLoadscaninvnService.getOne(Wrappers.<DistributionLoadscaninvnEntity>query().lambda().eq(DistributionLoadscaninvnEntity::getDeliveryId, deliveryId).eq(DistributionLoadscaninvnEntity::getReservationId, reservationId).eq(DistributionLoadscaninvnEntity::getInventoryPackageId, orderPackageId).ne(DistributionLoadscaninvnEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
if (Func.isNotEmpty(loadscaninvnEntity)) {
//将库存品数量加回库存
DistributionStockListEntity stockListEntity = distributionStockListService.getById(loadscaninvnEntity.getInventoryId());
stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() + loadscaninvnEntity.getLoadedNub());
stockListEntity.setOutboundQuantity(stockListEntity.getOutboundQuantity() - loadscaninvnEntity.getLoadedNub());
// stockListEntity.set(stockListEntity.getOutboundQuantity() - loadscaninvnEntity.getLoadedNub());
distributionStockListService.updateById(stockListEntity);
loadscaninvnEntity.setScanStatus(LoadingStatusConstant.quxiao.getValue());
distributionLoadscaninvnService.updateById(loadscaninvnEntity);
//库存品装车数量扣减
@ -5426,12 +5428,20 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//进行是否装车判断
if (Func.isNotEmpty(zeroLoadscanEntity)) {
//存在装车数据
zeroLoadscanEntity.setLoadedNub(zeroLoadscanEntity.getLoadedNub() - retentionQuantity);
if (zeroLoadscanEntity.getLoadedNub() < retentionQuantity){
zeroLoadscanEntity.setLoadedNub(0);;
int num = zeroLoadscanEntity.getLoadedNub() - retentionQuantity;
if (num < 0){
zeroLoadscanEntity.setLoadedNub(0);
zeroLoadscanEntity.setPackageNub(0);
}else {
zeroLoadscanEntity.setLoadedNub(num);
zeroLoadscanEntity.setLoadedNub(num);
}
distributionLoadscanService.updateById(zeroLoadscanEntity);
//扣减装车数量
int a = distributionSignforMapper.deductionLoadingPacjageNum(zeroLoadscanEntity.getReservationId(), zeroLoadscanEntity.getDeliveryId(), retentionQuantity);
}
distributionAsyncService.checkRetentionZeroPackageReservationAndDeliveryInfo(reservationId, deliveryId, orderPackageId,orderId);
return true;
} else {
return false;
}
@ -5439,8 +5449,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return false;
}
}else {
log.error("#############查询出多条零担包件信息:{}",row);
return false;
}
return false;
}
public Map<String, String> getDriverCar(String kind, Long deliveryListEntityId) {

4
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

@ -824,7 +824,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
warehouseWaybill.setTotalWeight(wayBillEntity.getWeight());
warehouseWaybill.setTotalVolume(wayBillEntity.getVolume());
warehouseWaybill.setDeliveryMethod(wayBillEntity.getSendType());
warehouseWaybill.setUrgency(wayBillEntity.getUrgency());
warehouseWaybill.setUrgency(wayBillEntity.getUrgency()+"");
warehouseWaybill.setReceiptCount(wayBillEntity.getReceiptNum());
warehouseWaybill.setReceiptRequirement(wayBillEntity.getReceiptAsk());
//--------------2023-07-28-------------
@ -1294,7 +1294,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
warehouseWaybill.setTotalWeight(wayBillEntity.getWeight());
warehouseWaybill.setTotalVolume(wayBillEntity.getVolume());
warehouseWaybill.setDeliveryMethod(wayBillEntity.getSendType());
warehouseWaybill.setUrgency(wayBillEntity.getUrgency());
warehouseWaybill.setUrgency(wayBillEntity.getUrgency()+"");
warehouseWaybill.setReceiptCount(wayBillEntity.getReceiptNum());
warehouseWaybill.setReceiptRequirement(wayBillEntity.getReceiptAsk());
//--------------2023-07-28-------------

92
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java

@ -0,0 +1,92 @@
package com.logpm.trunkline.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.service.ITrunklineCarsLoadService;
import com.logpm.trunkline.vo.TrunklineCarsLoadVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import java.util.Objects;
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/carsLoad")
@Api(value = "车辆配载控制类", tags = "车辆配载接口")
public class CarsLoadController {
private final IBasicdataWarehouseClient warehouseClient;
private final ITrunklineCarsLoadService carsLoadService;
@ResponseBody
@PostMapping("/loadCarsPageList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "配载计划分页列表", notes = "传入loadCarsDTO")
public R loadCarsPageList(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############loadCarsPageList: ";
log.info(method+"请求参数{}",loadCarsDTO);
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(!Objects.isNull(myCurrentWarehouse)){
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
}
IPage<TrunklineCarsLoadVO> pages = carsLoadService.loadCarsPageList(loadCarsDTO);
return R.data(pages);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/startCarByLoadId")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "发车", notes = "传入loadCarsDTO")
public R startCarByLoadId(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############startCarByLoadId: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long loadId = loadCarsDTO.getLoadId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(!Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"请选择一条配载计划 loadId={}",loadId);
return R.fail(405,"请选择一条配载计划");
}
carsLoadService.startCarByLoadId(loadCarsDTO);
return R.success("操作成功");
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
}

9
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadLineMapper.java

@ -0,0 +1,9 @@
package com.logpm.trunkline.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TrunklineCarsLoadLineMapper extends BaseMapper<TrunklineCarsLoadLineEntity> {
}

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadLineMapper.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineCarsLoadLineMapper">
</mapper>

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java

@ -0,0 +1,15 @@
package com.logpm.trunkline.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import com.logpm.trunkline.vo.TrunklineCarsLoadVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TrunklineCarsLoadMapper extends BaseMapper<TrunklineCarsLoadEntity> {
IPage<TrunklineCarsLoadVO> loadCarsPageList(IPage<Object> page, @Param("param") LoadCarsDTO loadCarsDTO);
}

58
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineCarsLoadMapper">
<select id="loadCarsPageList" resultType="">
select ltcl.id id,
ltcl.cars_no carsNo,
ltcl.plan_loading_number planLoadingNumber,
ltcl.real_loading_number realLoadingNumber,
ltcl.unload_number unloadNumber,
ltcl.full_load_rate fullLoadRate,
ltcl.is_customer isCustomer,
ltcl.load_status loadStatus,
ltcl.driver_name driverName,
ltcl.driver_mobile driverMobile,
ltcl.car_number carNumber,
ltcl.start_warehouse_name startWarehouseName,
ltcl.end_warehouse_names endWarehouseNames,
ltcl.arrive_time arriveTime,
ltcl.start_time startTime,
ltcl.create_user_name createUserName,
ltcl.create_time createTime,
sum(ltcll.now_transport_cost) nowTransportCost,
sum(ltcll.oil_cost) oilCost,
sum(ltcll.back_transport_cost) backTransportCost,
sum(ltcll.reach_transport_cost) reachTransportCost,
sum(ltcll.whole_car_info_cost) wholeCarInfoCost,
sum(ltcll.whole_car_insurance_cost) wholeCarInsuranceCost,
sum(ltcll.whole_car_ground_cost) wholeCarGroundCost,
sum(ltcll.hair_whole_cost) hairWholeCost,
sum(ltcll.hair_whole_other_cost) hairWholeOtherCost,
sum(ltcll.unload_cost) unloadCost,
sum(ltcll.unload_other_cost) unloadOtherCost,
sum(ltcll.fuel) fuel,
sum(ltcll.toll_fee) tollFee
from logpm_trunkline_cars_load ltcl
left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcl.id
where ltcl.is_deleted = 0
<if test="param.warehouseId != null" >
and (ltcl.start_warehouse_id = #{param.warehouseId} or ltcl.end_warehouse_ids like concat(',',${param.warehouseId},','))
</if>
group by ltcl.id,ltcl.cars_no,
ltcl.plan_loading_number,
ltcl.real_loading_number,
ltcl.unload_number,
ltcl.full_load_rate,
ltcl.is_customer,
ltcl.load_status,
ltcl.driver_name,
ltcl.driver_mobile,
ltcl.car_number,
ltcl.start_warehouse_name,
ltcl.end_warehouse_names,
ltcl.arrive_time,
ltcl.start_time
</select>
</mapper>

9
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java

@ -0,0 +1,9 @@
package com.logpm.trunkline.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.trunkline.entity.TrunklineCarsOrderEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TrunklineCarsOrderMapper extends BaseMapper<TrunklineCarsOrderEntity> {
}

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineCarsOrderMapper">
</mapper>

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadLineService.java

@ -0,0 +1,7 @@
package com.logpm.trunkline.service;
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
import org.springblade.core.mp.base.BaseService;
public interface ITrunklineCarsLoadLineService extends BaseService<TrunklineCarsLoadLineEntity> {
}

14
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java

@ -0,0 +1,14 @@
package com.logpm.trunkline.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import com.logpm.trunkline.vo.TrunklineCarsLoadVO;
import org.springblade.core.mp.base.BaseService;
public interface ITrunklineCarsLoadService extends BaseService<TrunklineCarsLoadEntity> {
IPage<TrunklineCarsLoadVO> loadCarsPageList(LoadCarsDTO loadCarsDTO);
void startCarByLoadId(LoadCarsDTO loadCarsDTO);
}

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java

@ -0,0 +1,7 @@
package com.logpm.trunkline.service;
import com.logpm.trunkline.entity.TrunklineCarsOrderEntity;
import org.springblade.core.mp.base.BaseService;
public interface ITrunklineCarsOrderService extends BaseService<TrunklineCarsOrderEntity> {
}

12
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java

@ -213,18 +213,22 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
List<DistributionParcelListEntity> parcelListEntityList = parcelListClient.findEntityListByOrderCode(orderCode, warehouseId);
int size = parcelListEntityList.size();
Integer totalNumber = stockArticleEntity.getTotalNumber();
Integer totalNumber = stockArticleEntity.getTotalNumber();//总件数
Integer handQuantity = stockArticleEntity.getHandQuantity();//在库件数
Integer incomingNum = stockArticleEntity.getIncomingNum();//入库件数
if(size == 1){
stockArticleEntity.setWarehouseEntryTime(date);
stockArticleEntity.setWarehouseEntryTimeEnd(new Date());
stockArticleEntity.setHandQuantity(size);
stockArticleEntity.setHandQuantity(handQuantity+1);
stockArticleEntity.setIncomingNum(incomingNum+1);
}else{
stockArticleEntity.setWarehouseEntryTimeEnd(new Date());
stockArticleEntity.setHandQuantity(size);
stockArticleEntity.setHandQuantity(handQuantity+1);
stockArticleEntity.setIncomingNum(incomingNum+1);
}
if(size < totalNumber){
if(incomingNum+1 < totalNumber){
stockArticleEntity.setOrderStatus("10");
}else{
stockArticleEntity.setOrderStatus("20");

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLineServiceImpl.java

@ -0,0 +1,15 @@
package com.logpm.trunkline.service.impl;
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
import com.logpm.trunkline.mapper.TrunklineCarsLoadLineMapper;
import com.logpm.trunkline.service.ITrunklineCarsLoadLineService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
@Slf4j
@Service
@AllArgsConstructor
public class TrunklineCarsLoadLineServiceImpl extends BaseServiceImpl<TrunklineCarsLoadLineMapper, TrunklineCarsLoadLineEntity> implements ITrunklineCarsLoadLineService {
}

58
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -0,0 +1,58 @@
package com.logpm.trunkline.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper;
import com.logpm.trunkline.service.ITrunklineCarsLoadLineService;
import com.logpm.trunkline.service.ITrunklineCarsLoadService;
import com.logpm.trunkline.vo.TrunklineCarsLoadVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@Service
@AllArgsConstructor
public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsLoadMapper, TrunklineCarsLoadEntity> implements ITrunklineCarsLoadService {
private final ITrunklineCarsLoadLineService trunklineCarsLoadLineService;
@Override
public IPage<TrunklineCarsLoadVO> loadCarsPageList(LoadCarsDTO loadCarsDTO) {
IPage<Object> page = new Page<>();
page.setCurrent(loadCarsDTO.getPageNum());
page.setSize(loadCarsDTO.getPageSize());
IPage<TrunklineCarsLoadVO> pageList = baseMapper.loadCarsPageList(page,loadCarsDTO);
List<TrunklineCarsLoadVO> records = pageList.getRecords();
for (TrunklineCarsLoadVO trunklineCarsLoadVO:records){
Long loadId = trunklineCarsLoadVO.getId();
QueryWrapper<TrunklineCarsLoadLineEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("id_deleted",0)
.eq("load_id",loadId);
List<TrunklineCarsLoadLineEntity> list = trunklineCarsLoadLineService.list(queryWrapper);
trunklineCarsLoadVO.setCarsLoadLineList(list);
}
pageList.setRecords(records);
return pageList;
}
@Override
public void startCarByLoadId(LoadCarsDTO loadCarsDTO) {
log.info("############startCarByLoadId: 发车");
Long loadId = loadCarsDTO.getLoadId();
Long warehouseId = loadCarsDTO.getWarehouseId();
//先查询该仓库
}
}

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java

@ -0,0 +1,15 @@
package com.logpm.trunkline.service.impl;
import com.logpm.trunkline.entity.TrunklineCarsOrderEntity;
import com.logpm.trunkline.mapper.TrunklineCarsOrderMapper;
import com.logpm.trunkline.service.ITrunklineCarsOrderService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
@Slf4j
@Service
@AllArgsConstructor
public class TrunklineCarsOrderEntityServiceImpl extends BaseServiceImpl<TrunklineCarsOrderMapper, TrunklineCarsOrderEntity> implements ITrunklineCarsOrderService {
}

13
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseTaskApiController.java

@ -128,7 +128,7 @@ public class WarehouseTaskApiController {
* @return
*/
@PostMapping("/addDataInfo")
public R addDataInfo(TaskSearchDTO taskSearchDTO){
public R addDataInfo(@RequestBody TaskSearchDTO taskSearchDTO){
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
@ -140,7 +140,16 @@ public class WarehouseTaskApiController {
}
/**
* 查询商场名称
*/
@GetMapping("/getMaterialName")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询商场名称", notes = "code,type")
public R getMaterialName(Query query,TaskSearchDTO taskSearchDTO) {
R r = taskQuestService.getMaterialName(taskSearchDTO,Condition.getPage(query));
return r;
}

53
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/TaskQuestController.java

@ -16,7 +16,9 @@
*/
package com.logpm.warehouse.controller;
import com.logpm.warehouse.dto.QuestDetailDTO;
import com.logpm.warehouse.dto.TaskQuestDTO;
import com.logpm.warehouse.vo.QuestContrastVO;
import com.logpm.warehouse.vo.QuestDetailVO;
import com.logpm.warehouse.wrapper.TaskQuestVOWrapper;
import io.swagger.annotations.Api;
@ -108,6 +110,47 @@ public class TaskQuestController extends BladeController {
return R.data(list);
}
/**
* 查询盘点数据
* @return
*/
@GetMapping("/getDetailInfo")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "盘点任务 查询盘点数据", notes = "传入id")
public R<IPage<QuestDetailVO>> selectDataInfo(QuestDetailDTO questDetailDTO,Query query){
IPage<QuestDetailVO> page = taskQuestService.selectTaskDataInfo(questDetailDTO,Condition.getPage(query));
return R.data(page);
}
/**
* 查询盘点对比数据
* @return
*/
@GetMapping("/getContrastInfo")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "盘点任务 查询盘点对比数据", notes = "传入id")
public R<List<QuestContrastVO>> getContrastInfo(QuestDetailDTO questDetailDTO, Query query){
List<QuestContrastVO> page = taskQuestService.getContrastInfo(questDetailDTO,Condition.getPage(query));
return R.data(page);
}
/**
* 修改盘点数据
* @return
*/
@PutMapping("/updateDetailInfo")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "盘点任务 修改盘点数据", notes = "传入id")
public R<IPage<QuestDetailVO>> updateDataInfo(@RequestBody List<QuestDetailDTO> questDetailDTO){
Boolean b = taskQuestService.updateDataInfo(questDetailDTO);
return b ? R.success("修改成功!") : R.fail("修改失败!");
}
/**
* 盘点任务 分页
*/
@ -150,6 +193,16 @@ public class TaskQuestController extends BladeController {
return R.status(taskQuestService.updateByIdCustom(taskQuest));
}
/**
* 盘点任务 修改时间
*/
@PutMapping("/updateDate")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改时间", notes = "传入taskQuest")
public R updateDate(@Valid @RequestBody TaskQuestDTO taskQuest) {
return R.status(taskQuestService.updateDate(taskQuest));
}
/**
* 盘点任务 新增或修改
*/

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/QuestDetailDTO.java

@ -31,6 +31,7 @@ import lombok.EqualsAndHashCode;
public class QuestDetailDTO extends QuestDetailEntity {
private static final long serialVersionUID = 1L;
private String questNum;//任务编号
private Integer stockNum;//在库数量

8
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.java

@ -151,4 +151,12 @@ public interface TaskQuestMapper extends BaseMapper<TaskQuestEntity> {
*/
Integer updetaQuestDetailChildList(@Param("questNum")String questNum,@Param("list") List<QuestDetailChildEntity> q);
IPage<QuestDetailEntity> selectTaskInfoIPage(IPage<Object> page,@Param("questNum")String questNum,@Param("param") QuestDetailEntity q);
/**
* 查询盘点对比数据
* @param questNum
* @return
*/
List<QuestContrastVO> selectContrastDataInfo(@Param("questNum")String questNum,@Param("param")QuestDetailEntity questDetail);
}

74
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml

@ -108,6 +108,9 @@
`is_new` int(20) NULL DEFAULT NULL COMMENT '是否是新增数据',
`grounding_position_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上架后的完整库位',
`material_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料编码(库存品)',
`firsts` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '一级品',
`second` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '二级品',
`third_product` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三级品',
`market_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商场名称(库存品)',
`incoming_batch` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次号(库存品)',
`material_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料名称(库存品)',
@ -122,14 +125,15 @@
INSERT INTO ${questNum}(`id`, `tenant_id`, `create_user`, `create_time`, `update_user`, `update_time`, `create_dept`,
`is_deleted`, `status`, `reserve1`, `reserve2`, `reserve3`, `reserve4`, `reserve5`, `order_code`, `quest_id`, `order_id`, `quest_type`, `quest_target`,
`order_package_code`, `order_package_id`, `category_name`, `stock_id`, `quest_status`, `stock_num`, `warehouse_id`, `position_code`, `tray_code`, `tray_id`,
`allocation_id`, `grounding_allocation_id`, `is_new`, `grounding_position_code`, `material_code`, `market_name`, `incoming_batch`, `material_name`,
`waybill_number`) VALUES
`allocation_id`, `grounding_allocation_id`, `is_new`, `grounding_position_code`, `material_code`, `market_name`, `firsts`, `second`,
`third_product`, `incoming_batch`, `material_name`, `waybill_number`) VALUES
<foreach collection="list" item="item" separator=",">
(#{item.id}, #{item.tenantId}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime}, #{item.createDept}, #{item.isDeleted}
, #{item.status}, #{item.reserve1}, #{item.reserve2}, #{item.reserve3}, #{item.reserve4}, #{item.reserve5}, #{item.orderCode}, #{item.questId}, #{item.orderId}
, #{item.questType}, #{item.questTarget}, #{item.orderPackageCode}, #{item.orderPackageId}, #{item.categoryName}, #{item.stockId}, #{item.questStatus},
#{item.stockNum}, #{item.warehouseId} , #{item.positionCode}, #{item.trayCode}, #{item.trayId}, #{item.allocationId}, #{item.groundingAllocationId},
#{item.isNew}, #{item.groundingPositionCode}, #{item.materialCode}, #{item.marketName} , #{item.incomingBatch}, #{item.materialName}, #{item.waybillNumber}
#{item.isNew}, #{item.groundingPositionCode}, #{item.materialCode}, #{item.marketName} , #{item.firsts} , #{item.second} ,
#{item.thirdProduct} , #{item.incomingBatch}, #{item.materialName}, #{item.waybillNumber}
)
</foreach>
@ -147,6 +151,7 @@
<if test="param.trayId != null and param.trayId != ''">and tray_id =#{param.trayId } </if>
<if test="param.orderCode != null and param.orderCode != ''">and order_code =#{param.orderCode } </if>
<if test="param.orderPackageCode != null and param.orderPackageCode != ''">and order_package_code =#{param.orderPackageCode } </if>
<if test="param.code != null and param.code!= '' ">and CONCAT(order_package_code, order_code) like concat('%',#{param.code},'%')</if>
</where>
</select>
<select id="selectOneTaskInfo" resultType="com.logpm.warehouse.entity.QuestDetailEntity">
@ -185,6 +190,46 @@
</if>
</where>
</select>
<select id="selectTaskInfoIPage" resultType="com.logpm.warehouse.entity.QuestDetailEntity">
select *
from ${questNum}
<where>
is_deleted = 0
<if test="param.questId != null and param.questId != ''">and quest_id =#{param.questId } </if>
<if test="param.questType != null and param.questType != ''">and quest_type =#{param.questType } </if>
<if test="param.questTarget != null and param.questTarget != ''">and quest_target =#{param.questTarget } </if>
<if test="param.warehouseId != null and param.warehouseId != ''">and warehouse_id =#{param.warehouseId } </if>
<if test="param.allocationId != null and param.allocationId != ''">and allocation_id =#{param.allocationId } </if>
<if test="param.trayId != null and param.trayId != ''">and tray_id =#{param.trayId } </if>
<if test="param.orderCode != null and param.orderCode != ''">and order_code =#{param.orderCode } </if>
<if test="param.orderPackageCode != null and param.orderPackageCode != ''">and order_package_code =#{param.orderPackageCode } </if>
<if test="param.marketNames != null">
and material_name in
<foreach collection="param.marketNames" item="a" open="(" close=")" separator=",">
#{a}
</foreach>
</if>
</where>
</select>
<select id="selectContrastDataInfo" resultType="com.logpm.warehouse.vo.QuestContrastVO" >
select DISTINCT ldpl.order_code orderCode,GROUP_CONCAT(DISTINCT ldpl.brand_name) brandName,GROUP_CONCAT(DISTINCT ldsa.mall_name) mallName
,GROUP_CONCAT(DISTINCT ldsa.customer_name) customerName, p.quest_status questStatus
,GROUP_CONCAT(DISTINCT ldpl.third_product) thirdProduct,GROUP_CONCAT(DISTINCT ldpl.material_name) materialName,ldsa.total_number totalNumber
,ldsa.hand_quantity handQuantity ,p.tray_code trayCode,p.tray_id trayId,p.position_code positionCode,
p.allocation_id allocationId,p.update_user updateUser,p.update_time updateTime,p.grounding_position_code groundingPositionCode
from ${questNum} p
LEFT JOIN logpm_distribution_parcel_list ldpl on p.order_package_id = ldpl.id
LEFT JOIN logpm_distribution_stock_article ldsa on ldsa.id = ldpl.stock_article_id
<where>
p.order_package_id is not null
<if test="param.questId != null and param.questId != ''">and p.quest_id = #{param.questId}</if>
</where>
GROUP BY ldpl.order_code,ldsa.total_number,ldsa.hand_quantity,p.tray_code,p.tray_id,p.position_code,p.allocation_id,p.update_user,
p.update_time,p.grounding_position_code ,p.quest_status
</select>
<select id="selectTaskTrayInfo" resultType="com.logpm.warehouse.entity.QuestDetailEntity">
select *
from ${questNum}
@ -210,10 +255,19 @@
<if test="item.groundingAllocationId != null"> grounding_allocation_id = #{item.groundingAllocationId},</if>
<if test="item.groundingPositionCode != null and item.groundingPositionCode != ''"> grounding_position_code = #{item.groundingPositionCode },</if>
<if test="item.questStatus != null and item.questStatus != ''"> quest_status = #{item.questStatus },</if>
<!-- <if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>
<if test="item.orderCode != null and item.orderCode != null"> order_code= #{item.orderCode },</if>
<if test="item.orderPackageCode != null and item.orderPackageCode != null"> order_package_code= #{item.orderPackageCode },</if>
<if test="item.categoryName != null and item.categoryName != null">category_name = #{item.categoryName },</if>
<if test="item.positionCode != null and item.positionCode != null">position_code = #{item.positionCode },</if>
<if test="item.trayCode != null and item.trayCode != null">tray_code = #{item.trayCode },</if>
<if test="item.trayId != null and item.trayId != null">tray_id = #{item.trayId },</if>
<if test="item.firsts != null and item.firsts != null">firsts = #{item.firsts },</if>
<if test="item.second != null and item.second != null">second = #{item.second },</if>
<if test="item.thirdProduct != null and item.thirdProduct != null">third_product = #{item.thirdProduct },</if>
<if test="item.allocationId != null and item.allocationId != null">allocation_id = #{item.allocationId },</if>
<if test="item.updateUser != null and item.updateUser != null">update_user = #{item.updateUser },</if>
<if test="item.updateTime != null and item.updateTime != null">update_time = #{item.updateTime },</if>
<!-- <if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>-->
@ -299,8 +353,10 @@
<where>
and lqd.quest_type =2
and lqd.is_deleted =0
and lqd.quest_id = #{param.questId}
and lqd.warehouse_id = #{param.warehouseId}
<if test="param.questId != null and param.questId != ''">and lqd.quest_id = #{param.questId} </if>
<if test="param.warehouseId != null and param.warehouseId != ''"> and lqd.warehouse_id = #{param.warehouseId}</if>
<if test="param.allocationId != null and param.allocationId != ''"> and lqd.allocation_id = #{param.allocationId}</if>
and lqd.allocation_id is not null
</where>
GROUP BY lqd.allocation_id,lqd.position_code
</select>

32
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java

@ -18,6 +18,7 @@ package com.logpm.warehouse.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.warehouse.dto.QuestDetailDTO;
import com.logpm.warehouse.dto.TaskQuestDTO;
import com.logpm.warehouse.dto.TaskSearchDTO;
import com.logpm.warehouse.entity.QuestDetailEntity;
@ -199,4 +200,35 @@ public interface ITaskQuestService extends BaseService<TaskQuestEntity> {
* @return
*/
R addDataInfo(TaskSearchDTO taskSearchDTO);
/**
* 查询盘点数据
* @param questDetailDTO
* @return
*/
IPage<QuestDetailVO> selectTaskDataInfo(QuestDetailDTO questDetailDTO, IPage<Object> page);
/**
* 修改盘点数据
* @param questDetailDTO
* @return
*/
Boolean updateDataInfo(List<QuestDetailDTO> questDetailDTO);
/**
* 延迟盘点时间
* @param taskQuest
* @return
*/
boolean updateDate(TaskQuestDTO taskQuest);
List<QuestContrastVO> getContrastInfo(QuestDetailDTO questDetailDTO, IPage<Object> page);
/**
* 查询商家信息
* @param taskSearchDTO
* @param page
* @return
*/
R getMaterialName(TaskSearchDTO taskSearchDTO, IPage<Object> page);
}

237
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

@ -17,7 +17,6 @@
package com.logpm.warehouse.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.Query;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@ -47,11 +46,11 @@ import com.logpm.warehouse.vo.*;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
@ -98,8 +97,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
private final IBasicdataGoodsAllocationClient basicdataGoodsAllocationClient;
private final IBasicdataGoodsShelfClient basicdataGoodsShelfClient;
private final IBasicdataGoodsAreaClient basicdataGoodsAreaClient;
private final IBasicdataClientClient basicdataClientClient;
private final IWarehouseTrayTypeService trayTypeService;
private final IWarehouseTaryAllocationService taryAllocationService;
private final IWarehouseGoodsAllocationService warehouseGoodsAllocationService;
@Override
@ -190,6 +191,9 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
detailEntity.setWaybillNumber(i.getWaybillNumber());
detailEntity.setOrderPackageId(i.getId());
detailEntity.setCategoryName(i.getFirsts());
detailEntity.setThirdProduct(i.getThirdProduct());
detailEntity.setFirsts(i.getFirsts());
detailEntity.setSecond(i.getSecond());
detailEntity.setStockId(i.getStockId()); //库存品ID
detailEntity.setQuestStatus(0);
detailEntity.setStockNum(ObjectUtils.isNotNull(i.getQuantity()) ? i.getQuantity() : 0);
@ -643,8 +647,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
case 1: //随机
break;
case 2: //库位
if(ObjectUtils.isNull(taskSearchDTO.getInfoId())){
return R.fail("参数数据不完整!!InfoId");
if(ObjectUtils.isNull(taskSearchDTO.getCode())){
return R.fail("参数数据不完整!!Code");
}
return getAllocationInfo(taskSearchDTO);
@ -679,11 +683,14 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
/*if(ObjectUtils.isNull(taskSearchDTO.getQuestDetailIds())){
return R.fail("待处理的包件为空!QuestNum");
}*/
BladeUser user = AuthUtil.getUser();
// 在库包件状态修改
if(ObjectUtils.isNotNull(taskSearchDTO.getQuestDetailIds())){
List<QuestDetailEntity> list = new ArrayList<>();
taskSearchDTO.getQuestDetailIds().forEach( i ->{
QuestDetailEntity questDetail = new QuestDetailEntity();
questDetail.setUpdateUser(user.getUserId());
questDetail.setUpdateTime(new Date());
questDetail.setId(Long.valueOf(i));
questDetail.setQuestStatus(1);
list.add(questDetail);
@ -703,9 +710,21 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
if(i.getIsNew().equals(1)){
//新增数据
QuestDetailEntity questDetail = new QuestDetailEntity();
BeanUtil.copyProperties(i,questDetail);
questDetail.setTenantId(user.getTenantId());
questDetail.setCreateDept(Long.valueOf(user.getDeptId()));
questDetail.setCreateTime(new Date());
questDetail.setIsDeleted(0);
questDetail.setStatus(1);
questDetail.setCreateUser(user.getUserId());
questDetail.setUpdateUser(user.getUserId());
questDetail.setUpdateTime(new Date());
questDetail.setId(taskID);
questDetail.setWarehouseId(warehouseId);
questDetail.setQuestStatus(1);
List<QuestDetailEntity> entityList = new ArrayList<>();
entityList.add(questDetail);
baseMapper.insertQuestDetail( questNum,entityList);
@ -730,6 +749,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
if(b){
//添加
baseMapper.insertQuestDetailChildList(taskSearchDTO.getQuestNum()+"_child",childList);
//修改盘点数据
List<QuestDetailEntity> list = new ArrayList<>();
QuestDetailEntity questDetail = new QuestDetailEntity();
questDetail.setId(i.getId());
questDetail.setQuestStatus(1); //已盘
questDetail.setUpdateUser(user.getUserId());
questDetail.setUpdateTime(new Date());
list.add(questDetail);
baseMapper.updatePositionCodeList(taskSearchDTO.getQuestNum(),list);
}else{
//修改
List<QuestDetailChildEntity> collect = childList.stream().filter( ii -> ObjectUtils.isNotNull(ii.getQuestNum()) && ii.getQuestNum() > 0).collect(Collectors.toList());
@ -754,12 +782,119 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
return R.success("成功");
}
/**
* PC查询盘点数据
* @param questDetailDTO
* @return
*/
@Override
public IPage<QuestDetailVO> selectTaskDataInfo(QuestDetailDTO questDetailDTO,IPage<Object> page) {
QuestDetailEntity questDetail = new QuestDetailEntity();
BeanUtil.copyProperties(questDetailDTO,questDetail);
// List<QuestDetailEntity> questDetailEntities = baseMapper.selectTaskInfo(questDetailDTO.getQuestNum(), questDetail);
IPage<QuestDetailEntity> questDetailEntityIPage = baseMapper.selectTaskInfoIPage(page, questDetailDTO.getQuestNum(), questDetail);
IPage<QuestDetailVO> page1 = new Page<>();
List<QuestDetailVO> questDetailVOS = new ArrayList<>();
questDetailEntityIPage.getRecords().stream().forEach( i ->{
QuestDetailVO questDetailVO = new QuestDetailVO();
BeanUtil.copyProperties(i,questDetailVO);
questDetailVOS.add(questDetailVO);
});
page1.setRecords(questDetailVOS);
page1.setTotal(questDetailEntityIPage.getTotal());
page1.setCurrent(questDetailEntityIPage.getCurrent());
page1.setPages(questDetailEntityIPage.getPages());
page1.setSize(questDetailEntityIPage.getSize());
return page1;
}
/**
* 批量修改盘点数据
* @param questDetailDTO
* @return
*/
@Override
public Boolean updateDataInfo(List<QuestDetailDTO> questDetailDTO) {
if(ObjectUtils.isNotNull(questDetailDTO)){
questDetailDTO.stream().collect(Collectors.groupingBy(QuestDetailDTO::getQuestNum)).forEach((k,v) ->{
List<QuestDetailEntity> list = new ArrayList<>();
v.stream().forEach( i ->{
if(ObjectUtils.isNotNull(i.getQuestId())){
QuestDetailEntity questDetail = new QuestDetailEntity();
BeanUtil.copyProperties(i,questDetail);
if(ObjectUtils.isNotNull(i.getPositionCode())){
i.setGroundingPositionCode(i.getPositionCode());
i.setPositionCode(null);
}
list.add(questDetail);
}
});
if(!list.isEmpty()){
baseMapper.updatePositionCodeList(k,list);
}
});
return true;
}else{
return false;
}
}
/**
* 修改延期时间
* @param taskQuest
* @return
*/
@Override
public boolean updateDate(TaskQuestDTO taskQuest) {
TaskQuestEntity questDetail = new TaskQuestEntity();
BeanUtil.copyProperties(taskQuest,questDetail);
return baseMapper.updateById(questDetail) > 0 ? true : false;
}
/**
* 查询盘点对比数据
* @param questDetailDTO
* @param page
* @return
*/
@Override
public List<QuestContrastVO> getContrastInfo(QuestDetailDTO questDetailDTO, IPage<Object> page) {
List<QuestContrastVO> list = baseMapper.selectContrastDataInfo(questDetailDTO.getQuestNum(),questDetailDTO);
return null;
}
/**
* 查询商场数据
* @param taskSearchDTO
* @param page
* @return
*/
@Override
public R getMaterialName(TaskSearchDTO taskSearchDTO, IPage<Object> page) {
BladePage<BasicdataClientEntity> top = basicdataClientClient.top((int) page.getCurrent(), (int) page.getSize(), taskSearchDTO.getCode());
return R.data(top);
}
/**
* 查询货位上的数据
* @param taskSearchDTO
* @return
*/
public R getAllocationInfo(TaskSearchDTO taskSearchDTO){
// List<TaskDataVO> lists = new ArrayList<>();
TaskDataVO taskDataVO = new TaskDataVO();
String questNum = taskSearchDTO.getQuestNum();
Long questId = taskSearchDTO.getQuestId();
@ -768,7 +903,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
QuestDetailEntity questDetail = new QuestDetailEntity();
questDetail.setQuestId(questId);
questDetail.setWarehouseId(warehouseId);
questDetail.setAllocationId(String.valueOf(taskSearchDTO.getInfoId()));
questDetail.setAllocationId(code);
List<QuestDetailEntity> questDetailEntities = baseMapper.selectTaskInfo(questNum,questDetail);
if(ObjectUtils.isNull(questDetailEntities)){
return R.success("没有数据!!");
@ -777,18 +912,19 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
for (QuestDetailEntity questDetailEntity : questDetailEntities) {
TaskPackagelistVO packagelistVO = new TaskPackagelistVO();
BeanUtil.copyProperties(questDetailEntity, packagelistVO);
packagelistVO.setAllocation(questDetailEntity.getPositionCode());
if(taskSearchDTO.getTypeState().equals(1)){
//有
if(questDetailEntity.getQuestTarget().equals(2) || ObjectUtils.isNull( questDetailEntity.getOrderPackageId())){
continue;
}
//查询包件信息
DistributionParcelListEntity distributionParcelList = new DistributionParcelListEntity();
distributionParcelList.setId(questDetailEntity.getOrderPackageId());
List<DistributionParcelListEntity> parcelList = distributionParcelListClient.getParcelList(distributionParcelList);
if(ObjectUtils.isNull(parcelList)){ //去除没有用包件的数据
continue;
}
// DistributionParcelListEntity distributionParcelList = new DistributionParcelListEntity();
// distributionParcelList.setId(questDetailEntity.getOrderPackageId());
// List<DistributionParcelListEntity> parcelList = distributionParcelListClient.getParcelList(distributionParcelList);
// if(ObjectUtils.isNull(parcelList)){ //去除没有用包件的数据
// continue;
// }
}else{
//没有
@ -797,20 +933,38 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
}
QuestDetailChildEntity questDetailChildEntity = new QuestDetailChildEntity();
questDetailChildEntity.setQuestDetailId(questDetailEntity.getId());
questDetailChildEntity.setWarehouseId(taskSearchDTO.getWarehouseId());
List<QuestDetailChildEntity> questDetailChildEntities = baseMapper.selectQuestDetailChildInfo(questNum+"_child", questDetailChildEntity);
if(ObjectUtils.isNotNull(questDetailChildEntities)){
//有处理的数
packagelistVO.setQuestChildVOList(questDetailChildEntities);
}
list.add(packagelistVO);
}
taskDataVO.setList(list);
return R.data(list);
// lists.add(taskDataVO);
return R.data(taskDataVO);
}
@Override
public List<TaskallocationVO> selectallocationList(TaskSearchDTO taskSearchDTO) {
try {
TaskQuestEntity taskQuestEntity = baseMapper.selectById(taskSearchDTO.getQuestId());
List<TaskallocationVO> list = baseMapper.selectallocationList(taskQuestEntity.getQuestNum(),taskSearchDTO);
List<TaskallocationVO> list = baseMapper.selectallocationList(taskSearchDTO.getQuestNum(),taskSearchDTO);
if(list.isEmpty()){
//查询货物信息
WarehouseGoodsAllocationEntity byId = warehouseGoodsAllocationService.getById(taskSearchDTO.getAllocationId());
if(ObjectUtils.isNotNull(byId)){
TaskallocationVO taskallocationVO = new TaskallocationVO();
taskallocationVO.setAllocationId(taskSearchDTO.getAllocationId());
taskallocationVO.setPositionCode(byId.getGoodsAllocationName());
list.add(taskallocationVO);
}
}
return list;
}catch (Exception e){
log.debug(e.getMessage());
@ -835,16 +989,20 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
// .eq(QuestDetailEntity::getQuestType, 3)
// .eq(QuestDetailEntity::getQuestId, taskSearchDTO.getTaskId());
List<TaskContractVO> list = new ArrayList<>();
TaskQuestEntity taskQuestEntity = baseMapper.selectById(taskSearchDTO.getQuestId());
QuestDetailEntity questDetail = new QuestDetailEntity();
questDetail.setQuestId( taskSearchDTO.getQuestId());
questDetail.setQuestType(3);
if(ObjectUtils.isNotNull(taskSearchDTO.getCode())){
questDetail.setCode(taskSearchDTO.getCode());
}else{
questDetail.setQuestType(3);
}
questDetail.setWarehouseId(taskSearchDTO.getWarehouseId());
IPage<TaskContractVO> taskPageList = new Page<>();
List<QuestDetailEntity> questDetailEntityList = baseMapper.selectTaskInfo( taskQuestEntity.getQuestNum(),questDetail);
List<QuestDetailEntity> questDetailEntityList = baseMapper.selectTaskInfo( taskSearchDTO.getQuestNum(),questDetail);
if (Func.isEmpty(questDetailEntityList)){
return null;
}
Map<Integer, List<QuestDetailEntity>> questDetailMap = questDetailEntityList.stream().collect(Collectors.groupingBy(QuestDetailEntity::getQuestTarget));
/*Map<Integer, List<QuestDetailEntity>> questDetailMap = questDetailEntityList.stream().collect(Collectors.groupingBy(QuestDetailEntity::getQuestTarget));
//订制品
List<QuestDetailEntity> questDetailEntities = questDetailMap.get(1);
List<QuestDetailEntity> zeroQuestDetailEntities = questDetailMap.get(2);
@ -902,7 +1060,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
list.add(taskContractVO);
}
}
}*/
return taskPageList.setRecords(list);
}
@ -1061,7 +1219,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
* 托盘ID信息货物处理
* @return
*/
private TaskDataVO getTaskTrayInfoOwn(List<QuestDetailEntity> list1,String type,Long warehouseId){
private TaskDataVO getTaskTrayInfoOwn(TaskSearchDTO taskSearchDTO,List<QuestDetailEntity> list1,String type,Long warehouseId){
TaskDataVO taskDataVO = new TaskDataVO();
List<TaskPackagelistVO> taskPackagelistVOS = new ArrayList<>();
list1.stream().collect(Collectors.groupingBy(QuestDetailEntity::getTrayId))
@ -1081,10 +1239,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
continue;
}
//查询包件信息
DistributionParcelListEntity byPacketBarCode = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(p.getOrderPackageCode(),warehouseId);
if(ObjectUtils.isNull(byPacketBarCode)){ //去除没有用包件的数据
continue;
}
// DistributionParcelListEntity byPacketBarCode = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(p.getOrderPackageCode(),warehouseId);
// if(ObjectUtils.isNull(byPacketBarCode)){ //去除没有用包件的数据
// continue;
// }
packagelistVO.setQuestDetailId(p.getId());
packagelistVO.setQuantity(p.getStockNum());
packagelistVO.setState(String.valueOf(p.getQuestTarget()));
@ -1098,6 +1256,15 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
packagelistVO.setQuantity(p.getStockNum());
packagelistVO.setState(String.valueOf(p.getQuestTarget()));
}
//查询盘点过后的数据
QuestDetailChildEntity questDetailChildEntity = new QuestDetailChildEntity();
questDetailChildEntity.setQuestDetailId(p.getId());
questDetailChildEntity.setWarehouseId(taskSearchDTO.getWarehouseId());
List<QuestDetailChildEntity> questDetailChildEntities = baseMapper.selectQuestDetailChildInfo(taskSearchDTO.getQuestNum()+"_child", questDetailChildEntity);
if(ObjectUtils.isNotNull(questDetailChildEntities)){
//有处理的数
packagelistVO.setQuestChildVOList(questDetailChildEntities);
}
taskPackagelistVOS.add(packagelistVO);
// TaskQuestEntity taskQuestEntity = baseMapper.selectById(p.getQuestId());
// num.set(num.get() + p.getStockNum());
@ -1165,7 +1332,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
List<QuestDetailEntity> questDetailList = getQuestDetailList( taskSearchDTO, myCurrentWarehouse.getId(), trayByTrayCode.getId());
return R.data(getTaskTrayInfoOwn(questDetailList, String.valueOf(taskSearchDTO.getTypeState()), myCurrentWarehouse.getId()));
return R.data(getTaskTrayInfoOwn(taskSearchDTO,questDetailList, String.valueOf(taskSearchDTO.getTypeState()), myCurrentWarehouse.getId()));
}
@ -1869,6 +2036,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
QuestDetailEntity detailEntity = new QuestDetailEntity();
detailEntity.setQuestId(taskSearchDTO.getQuestId());
detailEntity.setWarehouseId(taskSearchDTO.getWarehouseId());
detailEntity.setCode(taskSearchDTO.getCode());
//查询订单数据
List<QuestDetailEntity> questDetailEntities = baseMapper.selectTaskInfo(questNum,detailEntity);
@ -1886,12 +2054,12 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
continue;
}
//查询包件信息
DistributionParcelListEntity distributionParcelList = new DistributionParcelListEntity();
distributionParcelList.setId(questDetailEntity.getOrderPackageId());
DistributionParcelListEntity parcelList = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(questDetailEntity.getOrderPackageCode(),taskSearchDTO.getWarehouseId());
if(ObjectUtils.isNull(parcelList)){ //去除没有用包件的数据
continue;
}
// DistributionParcelListEntity distributionParcelList = new DistributionParcelListEntity();
// distributionParcelList.setId(questDetailEntity.getOrderPackageId());
// DistributionParcelListEntity parcelList = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(questDetailEntity.getOrderPackageCode(),taskSearchDTO.getWarehouseId());
// if(ObjectUtils.isNull(parcelList)){ //去除没有用包件的数据
// continue;
// }
}else{
//没有
@ -1901,7 +2069,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
QuestDetailChildEntity questDetailChildEntity = new QuestDetailChildEntity();
questDetailChildEntity.setQuestDetailId(questDetailEntity.getId());
List<QuestDetailChildEntity> questDetailChildEntities = baseMapper.selectQuestDetailChildInfo(questNum, questDetailChildEntity);
questDetailChildEntity.setWarehouseId(taskSearchDTO.getWarehouseId());
List<QuestDetailChildEntity> questDetailChildEntities = baseMapper.selectQuestDetailChildInfo(questNum+"_child", questDetailChildEntity);
if(ObjectUtils.isNotNull(questDetailChildEntities)){
//有处理的数
packagelistVO.setQuestChildVOList(questDetailChildEntities);

10
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java

@ -169,12 +169,13 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
//TODO 保存车次数据还需要处理
WarehouseRetentionRecordEntity warehouseRetentionRecordEntity = new WarehouseRetentionRecordEntity();
warehouseRetentionRecordEntity.setTaskId(warehouseRetentionRecordDTO.getDeliveryId());
warehouseRetentionRecordEntity.setRemark(warehouseRetentionRecordDTO.getRemark());
// warehouseRetentionRecordEntity.setRemark(warehouseRetentionRecordDTO.getRemark());
warehouseRetentionRecordEntity.setRetentionCarNo(warehouseRetentionRecordDTO.getTrainNumber());
warehouseRetentionRecordEntity.setRetentionCarId(warehouseRetentionRecordDTO.getLoadingId());
warehouseRetentionRecordEntity.setRetentionWarehouseId(myCurrentWarehouse.getId());
warehouseRetentionRecordEntity.setRetentionWarehouseName(myCurrentWarehouse.getName());
warehouseRetentionRecordEntity.setRetentionType(RetentionTypeConstant.peisongzhiliu.getValue());
warehouseRetentionRecordEntity.setAssembleCarPersonId(warehouseRetentionRecordDTO.getAssembleCarPersonId());
warehouseRetentionRecordEntity.setAssembleCarPersonName(warehouseRetentionRecordDTO.getAssembleCarPersonName());
warehouseRetentionRecordEntity.setRetentionCreateUserId(user.getUserId());
warehouseRetentionRecordEntity.setRetentionCreateUserName(user.getUserName());
this.save(warehouseRetentionRecordEntity);
@ -196,7 +197,6 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
r.setRetentionScanTime(new Date());
r.setRetentionScanUserId(user.getUserId());
r.setRetentionScanUsername(user.getNickName());
r.setRetentionQuantity(r.getRetentionQuantity());
retentionTotal.getAndAdd(r.getRetentionQuantity());
r.setDeliveryId(warehouseRetentionRecordDTO.getDeliveryId());
@ -234,7 +234,6 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
@Override
public List<WarehouseRetentionRecordExcel> exportWarehouseRetentionRecord(Map<String, Object> paramMap) {
// 获取当前登录的仓库信息
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (ObjectUtils.isNull(myCurrentWarehouse)) {
@ -269,7 +268,6 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
log.error("##########缺少滞留包件列表:{}", warehouseRetentionScanDTOList);
return Resp.scanFail("无滞留包件信息", "无滞留包件信息");
}
//如果滞留全部为空,这里执行删除操作
//查询出该滞留任务是否存在
List<WarehouseRetentionScanEntity> retentionScanEntityList = warehouseRetentionScanService.list(Wrappers.<WarehouseRetentionScanEntity>query().lambda()
.eq(WarehouseRetentionScanEntity::getDeliveryId, warehouseRetentionScanDTOS.getDeliveryId())
@ -310,7 +308,7 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
break;
case 3:
//零担
// distributionDeliveryListClient.retentionDeliveryReservationZeroPackage(rs.getDeliveryId(), rs.getReservationId(), rs.getOrderPackageId(),rs.getRetentionQuantity());
distributionDeliveryListClient.retentionDeliveryReservationZeroPackage(rs.getDeliveryId(), rs.getReservationId(), rs.getOrderPackageId(),rs.getRetentionQuantity(),rs.getOrderId());
break;
}
}

Loading…
Cancel
Save