Browse Source

1.托盘功能

dev-warehouse
0.0 2 years ago
parent
commit
8feeea8c3a
  1. 438
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataStockArticleEntity.java
  2. 8
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataTrayEntity.java
  3. 287
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/WarehouseStockListEntity.java
  4. 167
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataStockArticleVO.java
  5. 6
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataTrayVO.java
  6. 37
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/WarehouseParcelListVO.java
  7. 102
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/WarehouseStockListVO.java
  8. 54
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayGoodsClient.java
  9. 7
      blade-service/logpm-basicdata/pom.xml
  10. 78
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataTrayController.java
  11. 22
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.java
  12. 139
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml
  13. 26
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTrayService.java
  14. 61
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java
  15. 46
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/BasicdataTrayWrapper.java
  16. 43
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/DistributionStockArticWrapper.java
  17. 44
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/WarehouseParcelListWrapper.java
  18. 43
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/WarehouseStockListWrapper.java
  19. 36
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayGoodsClient.java
  20. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.java
  21. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml
  22. 6
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillReceivedRecordMapper.xml
  23. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTrayGoodsService.java
  24. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayGoodsServiceImpl.java

438
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataStockArticleEntity.java

@ -0,0 +1,438 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* 配送在库订单 实体类
*
* @author cyz
* @since 2023-06-13
*/
@Data
@TableName("logpm_distribution_stock_article")
@ApiModel(value = "DistributionStockArticle对象", description = "配送在库订单")
@EqualsAndHashCode(callSuper = true)
public class BasicdataStockArticleEntity extends TenantEntity {
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* 创建用户名称
*/
@ApiModelProperty(value = "创建用户名称 ")
@TableField(exist = false)
private String createUserName;
/**
* 服务号
*/
@ApiModelProperty(value = "服务号")
private String serviceNumber;
/**
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private String orderCode;
/**
* 寄件信息
*/
@ApiModelProperty(value = "寄件信息")
private String sending;
/**
* 门店id
*/
@ApiModelProperty(value = "门店id")
private Long storeId;
/**
* 商场id
*/
@ApiModelProperty(value = "商场id")
private Long mallId;
/**
* 商场名称
*/
@ApiModelProperty(value = "商场名称")
private String mallName;
/**
* 商场编号
*/
@ApiModelProperty(value = "商场编码")
private String mallCode;
/**
* 门店编号
*/
@ApiModelProperty(value = "门店编码")
private String storeCode;
/**
* 门店名称
*/
@ApiModelProperty(value = "门店名称")
private String storeName;
/**
* 货物名称
*/
@ApiModelProperty(value = "货物名称")
private String descriptionGoods;
/**
* 仓库
*/
@ApiModelProperty(value = "仓库")
private String warehouse;
/**
* 车次号
*/
@ApiModelProperty(value = "车次号")
private String trainNumber;
/**
* 仓库ID
*/
@ApiModelProperty(value = "仓库ID")
private Long warehouseId;
/**
* 入库时间
*/
@ApiModelProperty(value = "入库时间")
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
private Date warehouseEntryTime;
/**
* 在库时间
*/
@ApiModelProperty(value = "在库时间")
private String storeTime;
/**
* 订单总件数
*/
@ApiModelProperty(value = "订单总件数")
private Integer totalNumber;
/**
* 在库件数
*/
@ApiModelProperty(value = "在库件数")
private Integer handQuantity;
/**
* 是否齐套
*/
@ApiModelProperty(value = "是否齐套")
private Integer completeSet;
/**
* 品牌
*/
@ApiModelProperty(value = "品牌")
private String brand;
/**
* 服务类型
*/
@ApiModelProperty(value = "服务类型")
private String typeService;
/**
* 顾客名字
*/
@ApiModelProperty(value = "顾客名字")
private String customerName;
/**
* 顾客电话
*/
@ApiModelProperty(value = "顾客电话")
private String customerTelephone;
/**
* 顾客地址
*/
@ApiModelProperty(value = "顾客地址")
private String customerAddress;
/**
* 类型;1 预约单 2库存单
*/
@ApiModelProperty(value = "类型;1 预约单 2库存单")
private Integer genre;
// /**
// * 状态;1 配送 2 待配送 3部分入库 4已入库
// */
// @ApiModelProperty(value = "状态;1 配送 2 待配送 3部分入库 4已入库")
// @TableField(exist = false)
// private String stateName;
/**
* 状态;1 已通知 2 未通知
*/
@ApiModelProperty(value = "状态;1 已通知 2 未通知")
private Integer notification;
/**
* 增值服务总费用
*/
@ApiModelProperty(value = "增值服务总费用")
private BigDecimal fee;
/**
* 协商费用
*/
@ApiModelProperty(value = "协商费用")
private BigDecimal rate;
/**
* 老系统advanceId
*/
@ApiModelProperty(value = "老系统advanceId")
private Integer advanceId;
/**
* 预约数量
*/
@TableField(exist = false)
@ApiModelProperty(value = "预约数量")
private Integer reservationNum;
/**
* 运单号
*/
@ApiModelProperty(value = "运单号")
private String waybillCode;
/**
* 收货单位
*/
@ApiModelProperty(value = "收货单位")
private String consigneeUnit;
/**
* 到付费用
*/
@ApiModelProperty(value = "到付费用")
private BigDecimal collectFee;
/**
* 仓储费
*/
@ApiModelProperty(value = "仓储费")
private BigDecimal storageFee;
//-------------2023-07-16 新增在库订单字段
/**
* 收货人
*/
@ApiModelProperty(value = "收货人")
private String consigneePerson;
/**
* 收货人地址
*/
@ApiModelProperty(value = "收货人地址")
private String consigneeAddress;
/**
* 收货人电话
*/
@ApiModelProperty(value = "收货人电话")
private String consigneeMobile;
// -----------2023-07-18 增加字段
@ApiModelProperty(value = "经销商名称")
private String dealerName;
@ApiModelProperty(value = "经销商编码")
private String dealerCode;
/**
* 可用数量(在库数-已经预约的包件数)
*/
@ApiModelProperty(value = "可用数量")
private Integer availableQuantity;
/**
* 入库时间-
*/
@ApiModelProperty(value = "入库时间-终")
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
private Date warehouseEntryTimeEnd;
/**
* 分拣件数
*/
@ApiModelProperty(value = "分拣件数")
private Integer sortingQuantity;
/**
* 配送件数
*/
@ApiModelProperty(value = "配送件数")
private Integer deliveryQuantity;
/**
* 中转件数
*/
@ApiModelProperty(value = "中转件数")
private Integer transferQuantity;
/**
* 签收件数
*/
@ApiModelProperty(value = "签收件数")
private Integer signinQuantity;
/**
* 货位信息
*/
@ApiModelProperty(value = "货位信息")
private String allocation;
/**
* 订单来源
*/
@ApiModelProperty(value = "订单来源")
private String resource;
/**
* 托盘
*/
@ApiModelProperty(value = "托盘")
private String trays;
/**
* 干仓配
*/
@ApiModelProperty(value = "干仓配")
private Integer isOpai;
/**
* 盘点时间
*/
@ApiModelProperty(value = "盘点时间")
private Date inventoryDate;
/**
* 盘点人
*/
@ApiModelProperty(value = "盘点人")
private String inventoryPerson;
/**
* 盘点人id
*/
@ApiModelProperty(value = "盘点人id")
private Long inventoryPersonId;
@ApiModelProperty(value = "冻结状态")
private String freezeStatus;
/**
* 上架状态
*/
@ApiModelProperty(value = "上架状态")
private String groundingStatus;
@ApiModelProperty(value = "订单状态")
private String orderStatus;
@ApiModelProperty(value = "预约状态")
private String reservationStatus;
@ApiModelProperty(value = "备货状态")
private String stockupStatus;
@ApiModelProperty(value = "收货状态")
private String orderReceiveStatus;
/**
* 有无数据源
*/
@ApiModelProperty(value = "有无数据源;1-否、2-是")
private Integer isHaveData;
/**
* 订单码
*/
@ApiModelProperty(value = "订单码")
private String stockArticleCode;
/**
* 工厂车次
*/
@ApiModelProperty(value = "工厂车次")
private String factoryTrain;
private String isZero;//是否零担 0否 1是
}

8
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataTrayEntity.java

@ -113,7 +113,15 @@ public class BasicdataTrayEntity extends TenantEntity {
@ApiModelProperty(value = "破损备注")
private String damagedNote;
@ApiModelProperty(value = "目前所在仓库")
private Long nowWarehouseId;
/**
* 禁用状态1-,2-
*/
@ApiModelProperty(value = "禁用状态(1-否,2-是)")
private Integer disableType;
}

287
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/WarehouseStockListEntity.java

@ -0,0 +1,287 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.entity;
import com.baomidou.mybatisplus.annotation.TableField;
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.util.Date;
import java.util.List;
/**
* 库存品管理 实体类
*
* @author cyz
* @since 2023-06-15
*/
@Data
@TableName("logpm_distribution_stock_list")
@ApiModel(value = "DistributionStockList对象", description = "库存品管理")
@EqualsAndHashCode(callSuper = true)
public class WarehouseStockListEntity extends TenantEntity {
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* sku
*/
@ApiModelProperty(value = "sku")
private String sku;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* 服务类型
*/
@ApiModelProperty(value = "服务类型")
private String serviceType;
/**
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private String orderCode;
/**
* 在库订单ID
*/
@ApiModelProperty(value = "在库订单ID")
private Long stockArticleId;
/**
* 在库订单ID
*/
@ApiModelProperty(value = "在库订单ID")
private Long parcelListId;
/**
* 入库批次号
*/
@ApiModelProperty(value = "入库批次号")
private String incomingBatch;
/**
* 货物名称
*/
@ApiModelProperty(value = "货物名称")
private String descriptionGoods;
/**
* 货物规则
*/
@ApiModelProperty(value = "货物规则")
private String cargoNorms;
/**
* 车牌
*/
@ApiModelProperty(value = "车牌")
private String licensePlate;
/**
* 品牌名称
*/
@ApiModelProperty(value = "品牌名称")
private String brandName;
/**
* 品牌Id
*/
@ApiModelProperty(value = "品牌ID")
private Long brandId;
/**
* 入库时间
*/
@ApiModelProperty(value = "入库时间")
private Date warehousingTime;
/**
* 上架时间
*/
@ApiModelProperty(value = "上架时间")
private Date groundingTime;
/**
* 拆包数
*/
@ApiModelProperty(value = "拆包数")
private Integer unpackingQuantity;
/**
* 货物编号
*/
@ApiModelProperty(value = "货物编号")
private String cargoNumber;
/**
* 货物ID
*/
@ApiModelProperty(value = "货物id")
private Long materialId;
@ApiModelProperty(value = "仓库Id")
private Long warehouseId;
// /**
// * 拆分包件
// */
// @ApiModelProperty(value = "拆分包件")
// @TableField(exist = false)
// private List<DistributionStockEntity> parcels;
/**
* 工厂车次
*/
@ApiModelProperty(value = "工厂车次")
private String factory;
/**
* 品分类
*/
@ApiModelProperty(value = "品分类")
private String category;
/**
* 商场ID
*/
@ApiModelProperty(value = "商场ID")
private Long marketId;
/**
* 货物单位
*/
@ApiModelProperty(value = "货物单位")
private String cargoUnit;
// /**
// * 门店
// */
// @ApiModelProperty(value = "门店")
// private String shop;
/**
* 库位信息
*/
@ApiModelProperty(value = "库位信息")
private String storageLocation;
/**
* 商城名称
*/
@ApiModelProperty(value = "商城名称")
private String mallName;
/**
* 拆包状态
*/
@ApiModelProperty(value = "拆包")
private Boolean unpack;
/**
* 库存数量
*/
@ApiModelProperty(value = "库存数量")
private Integer quantityStock;
/**
* 出库数量
*/
@ApiModelProperty(value = "出库数量")
private Integer outboundQuantity;
/**
* 发运车次
*/
@ApiModelProperty(value = "发运车次")
private String despatch;
/**
* 服务号
*/
@ApiModelProperty(value = "服务号")
private String serviceNumber;
/**
* 预约数量
*/
@ApiModelProperty(value = "预约数量")
@TableField(exist = false)
private Integer reservationNum;
/**
* 仓库名称
*/
@ApiModelProperty(value = "仓库名称")
private String warehouseName;
/**
* 门店ID
*/
@ApiModelProperty(value = "门店ID")
private Long storeId;
/**
* 所属商场
*/
@ApiModelProperty(value = "所属商场")
private Long shoppingMall;
/**
* 商场编码
*/
@ApiModelProperty(value = "商场编码")
private String marketCode;
/**
* 商场名称
*/
@ApiModelProperty(value = "商场名称")
private String marketName;
/**
* 门店编码
*/
@ApiModelProperty(value = "门店编码")
private String storeCode;
/**
* 门店名称
*/
@ApiModelProperty(value = "门店名称")
private String storeName;
/**
* 冻结数量
*/
@ApiModelProperty(value = "冻结数量")
private Integer quantityOccupied;
/**
* 拆包ID
*/
@ApiModelProperty(value = "拆包ID")
private Long pid;
/**
* 托盘ID
*/
@ApiModelProperty(value = "托盘ID")
private Long trayId;
/**
* 托盘名称
*/
@ApiModelProperty(value = "托盘名称")
private String trayName;
}

167
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataStockArticleVO.java

@ -0,0 +1,167 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.vo;
import com.logpm.basicdata.entity.BasicdataStockArticleEntity;
import com.logpm.basicdata.entity.WarehouseParcelListEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 配送在库订单 视图实体类
*
* @author cyz
* @since 2023-06-13
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class BasicdataStockArticleVO extends BasicdataStockArticleEntity {
private static final long serialVersionUID = 1L;
/**
* 物料名称
*/
@ApiModelProperty(value = "物料名称")
private String materialName;
/**
* 已备货数量
*/
@ApiModelProperty(value = "已备货数量")
private String readyStock;
/**
* 备货数量
*/
@ApiModelProperty(value = "备货数量")
private String deliveryNumber;
/**
* 托盘
*/
@ApiModelProperty(value = "托盘")
private String pallet;
/**
* 货位信息
*/
@ApiModelProperty(value = "货位信息")
private String goodsAllocation;
/**
* 订单状态
*/
@ApiModelProperty(value = "订单状态")
private String stockArticleState;
@ApiModelProperty(value = "服务类型 商 市 自")
private String typeServerName;
@ApiModelProperty(value = "上架状态名称")
private String groundingStatusName;
@ApiModelProperty(value = "冻结状态名称")
private String freezeStatusName;
@ApiModelProperty(value = "订单状态名称")
private String orderStatusName;
@ApiModelProperty(value = "预约状态名称")
private String reservationStatusName;
@ApiModelProperty(value = "备货状态名称")
private String stockupStatusName;
@ApiModelProperty(value = "收货状态名称")
private String orderReceiveStatusName;
/**
* 是否齐套名称
*/
@ApiModelProperty(value = "是否齐套名称")
private String completeSetName;
//8.10
/**
* 货位信息
*/
@ApiModelProperty(value = "货位信息")
private String goodsAllocationName;
/**
*
*/
@ApiModelProperty(value = "列")
private String columnNum;
/**
*
*/
@ApiModelProperty(value = "行")
private String layerNum;
/**
* 关系类型
*/
@ApiModelProperty(value = "关系类型")
private String bindingType;
/**
* 操作时间
*/
@ApiModelProperty(value = "操作时间")
private String operateTime;
/**
* 操作人k
*/
@ApiModelProperty(value = "操作人(k)")
private Long operateUser;
/**
* 操作人v
*/
@ApiModelProperty(value = "操作人(v)")
private String operateUserName;
/**
* 是否齐套名称
*/
@ApiModelProperty(value = "是否齐套名称")
private List<WarehouseParcelListEntity> parcelListVOS;
public Map<String, Object> toMap() throws IllegalAccessException {
Map<String, Object> map = new HashMap<>();
// 使用反射获取所有字段
Field[] fields = this.getClass().getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true); // 设置可以访问私有字段
String fieldName = field.getName();
Object value = field.get(this);
map.put(fieldName, value);
}
return map;
}
}

6
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataTrayVO.java

@ -39,4 +39,10 @@ public class BasicdataTrayVO extends BasicdataTrayEntity {
@ApiModelProperty(value = "仓库名称")
private String warehouseName;
/**
* 禁用状态
*/
@ApiModelProperty(value = "禁用状态(值)")
private String disableTypeName;
}

37
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/WarehouseParcelListVO.java

@ -60,4 +60,41 @@ public class WarehouseParcelListVO extends WarehouseParcelListEntity {
private String orderPackageReservationStatusName;
/*2023 8.10 */
/**
* 货位信息
*/
private String goodsAllocationName;
/**
* 所在层
*/
private String columnNum;
/**
* 所在列
*/
private String layerNum;
/**
* 绑定类型
*/
private String bindingType;
/**
* 操作时间
*/
private String operateTime;
/**
* 操作人k
*/
private Long operateUser;
/**
* 操作人v
*/
private String operateUserName;
/**
* 操作数量
*/
private String num;
}

102
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/WarehouseStockListVO.java

@ -0,0 +1,102 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.vo;
import com.logpm.basicdata.entity.WarehouseStockListEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 库存品管理 视图实体类
*
* @author cyz
* @since 2023-06-15
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class WarehouseStockListVO extends WarehouseStockListEntity {
private static final long serialVersionUID = 1L;
/**
* 备货数
*/
@ApiModelProperty(value = "备货数")
private String deliveryNumber;
/**
* 添加数量
*/
private Integer inventoryQuantity;
/**
* 物料名称
*/
@ApiModelProperty(value = "物料名称")
private String descriptionGoods;
/**
* 货位名称
*/
@ApiModelProperty(value = "货位名称")
private String goodsAllocation;
//8.10
/**
* 货位名称
*/
@ApiModelProperty(value = "货位名称")
private String goodsAllocationName;
/**
* 所在列
*/
@ApiModelProperty(value = "所在列")
private String columnNum;
/**
* 所在行
*/
@ApiModelProperty(value = "所在行")
private String layerNum;
/**
* 关系类型
*/
@ApiModelProperty(value = "关系类型")
private String bindingType;
/**
* 操作时间
*/
@ApiModelProperty(value = "操作时间")
private String operateTime;
/**
* 操作人k
*/
@ApiModelProperty(value = "作人(k)")
private Long operateUser;
/**
* 操作人(v)
*/
@ApiModelProperty(value = "操作人(v)")
private String operateUserName;
/**
* 操作数量
*/
@ApiModelProperty(value = "操作数量")
private String num;
}

54
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseTrayGoodsClient.java

@ -0,0 +1,54 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.warehouse.feign;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* 托盘 货物 绑定 Feign接口类
*
* @author zhy
* @since 2023-07-10
*/
@FeignClient(
value = ModuleNameConstant.APPLICATION_WAREHOUSE_NAME
)
public interface IWarehouseTrayGoodsClient {
String API_PREFIX = "warehousetraygoods/client";
String TOP = API_PREFIX + "/top10";
/**
* 通过主键删除
*/
@PostMapping(TOP+"/delEntity")
Boolean remove(@RequestParam String ids);
/**
* 通过关联主表Id删除
*/
@PostMapping(TOP+"/delEntityByMasterId")
Boolean removeByMasterId(@RequestParam Long id);
}

7
blade-service/logpm-basicdata/pom.xml

@ -61,6 +61,13 @@
<version>${bladex.project.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-warehouse-api</artifactId>
<version>3.1.0.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>

78
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataTrayController.java

@ -21,7 +21,12 @@ import com.logpm.basicdata.entity.BasicdataTrayEntity;
import com.logpm.basicdata.excel.BasicdataTrayExcel;
import com.logpm.basicdata.service.IBasicdataTrayService;
import com.logpm.basicdata.vo.BasicdataTrayVO;
import com.logpm.basicdata.vo.BasicdataStockArticleVO;
import com.logpm.basicdata.vo.WarehouseParcelListVO;
import com.logpm.basicdata.vo.WarehouseStockListVO;
import com.logpm.basicdata.wrapper.BasicdataTrayWrapper;
import com.logpm.basicdata.wrapper.WarehouseParcelListWrapper;
import com.logpm.basicdata.wrapper.WarehouseStockListWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -80,6 +85,77 @@ public class BasicdataTrayController extends BladeController {
IPage<WarehouseParcelListVO> list = trayService.getpackageList(Condition.getPage(query), BasicdataTray);
return R.data(list);
}
/**
* 托盘 历史包条详情
*/
@GetMapping("/packageListhistory")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入BasicdataTray")
public R<IPage<WarehouseParcelListVO>> packageListhistory(BasicdataTrayVO BasicdataTray, Query query) {
IPage<WarehouseParcelListVO> list = trayService.getpackageListhistory(Condition.getPage(query), BasicdataTray);
//转换操作人
return R.data(WarehouseParcelListWrapper.build().pageVO(list));
}
/**
* 托盘 库存品
*/
@GetMapping("/inventoryList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "库存品列表", notes = "传入BasicdataTray")
public R<IPage<WarehouseStockListVO>> inventoryList(BasicdataTrayVO BasicdataTray, Query query) {
IPage<WarehouseStockListVO> list = trayService.getinventoryList(Condition.getPage(query), BasicdataTray);
return R.data(list);
}
/**
* 托盘 历史库存品
*/
@GetMapping("/inventoryListhistory")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "历史库存品列表", notes = "传入BasicdataTray")
public R<IPage<WarehouseStockListVO>> inventoryListhistory(BasicdataTrayVO BasicdataTray, Query query) {
IPage<WarehouseStockListVO> list = trayService.getinventoryListhistory(Condition.getPage(query), BasicdataTray);
return R.data(WarehouseStockListWrapper.build().pageVO(list));
}
/**
* 托盘 零担列表历史记录
*/
@GetMapping("/lclListhistory")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "零担列表历史记录", notes = "传入BasicdataTray")
public R<IPage<BasicdataStockArticleVO>> lclListhistory(BasicdataTrayVO BasicdataTray, Query query) {
IPage<BasicdataStockArticleVO> list = trayService.getlclListhistory(Condition.getPage(query), BasicdataTray);
return R.data(list);
}
/**
* 托盘 零担列表
*/
@GetMapping("/lclList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "零担列表", notes = "传入BasicdataTray")
public R<IPage<BasicdataStockArticleVO>> lclList(BasicdataTrayVO BasicdataTray, Query query) {
IPage<BasicdataStockArticleVO> list = trayService.getlclList(Condition.getPage(query), BasicdataTray);
return R.data(list);
}
/**
* 托盘 空置
*/
@PostMapping("/vacant")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入BasicdataTray")
public R vacant(@Valid @RequestBody BasicdataTrayEntity BasicdataTray) {
return R.status(trayService.vacantById(BasicdataTray));
}
/**
* 托盘 分页
*/
@ -89,7 +165,7 @@ public class BasicdataTrayController extends BladeController {
public R<IPage<BasicdataTrayVO>> list(@ApiIgnore @RequestParam Map<String, Object> BasicdataTray, Query query) {
IPage<Object> page = Condition.getPage(query);
IPage<BasicdataTrayVO> list = trayService.selectTrayList(page,BasicdataTray);
return R.data(list);
return R.data(BasicdataTrayWrapper.build().pageVO(list));
}
/**

22
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.java

@ -22,7 +22,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataTrayEntity;
import com.logpm.basicdata.excel.BasicdataTrayExcel;
import com.logpm.basicdata.vo.BasicdataTrayVO;
import com.logpm.basicdata.vo.BasicdataStockArticleVO;
import com.logpm.basicdata.vo.WarehouseParcelListVO;
import com.logpm.basicdata.vo.WarehouseStockListVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@ -58,4 +60,24 @@ public interface BasicdataTrayMapper extends BaseMapper<BasicdataTrayEntity> {
* 托盘 查看包件
*/
List<WarehouseParcelListVO> selectPackageList(IPage<WarehouseParcelListVO> page,@Param("param") BasicdataTrayVO basicdataTray);
/**
* 托盘 查看库存品
*/
List<WarehouseStockListVO> selectInventoryList(IPage<WarehouseStockListVO> page,@Param("param") BasicdataTrayVO basicdataTray);
/**
* 托盘 查看零担列表
*/
List<BasicdataStockArticleVO> selectlclList(IPage<BasicdataStockArticleVO> page, @Param("param") BasicdataTrayVO basicdataTray);
/**
* 托盘 历史包条详情
*/
List<WarehouseParcelListVO> selectPackageListhistory(IPage<WarehouseParcelListVO> page,@Param("param") BasicdataTrayVO basicdataTray);
/**
* 托盘 库存品历史记录
*/
List<WarehouseStockListVO> selectinventoryListhistory(IPage<WarehouseStockListVO> page,@Param("param") BasicdataTrayVO basicdataTray);
/**
* 托盘 零担历史记录
*/
List<BasicdataStockArticleVO> selectlclListhistory(IPage<BasicdataStockArticleVO> page, @Param("param") BasicdataTrayVO basicdataTray);
}

139
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTrayMapper.xml

@ -25,6 +25,7 @@
<result column="tray_status" property="trayStatus"/>
<result column="pallet_name" property="palletName"/>
<result column="type" property="type"/>
<result column="disable_type" property="disableType"/>
</resultMap>
@ -56,6 +57,7 @@
tray.pallet_name,
tray.pallet_code,
tray.warehouse_id,
tray.disable_type,
tray.tray_status,
warehouse.name AS warehouseName,
tray.`type`
@ -76,7 +78,142 @@
</where>
</select>
<select id="selectPackageList" resultType="com.logpm.basicdata.vo.WarehouseParcelListVO">
SELECT
ldpl.order_package_code orderPackageCode,
ldpl.warehouse warehouse,
ldpl.firsts firsts,
ldpl.SECOND SECOND,
ldpl.third_product thirdProduct,
ldpl.material_name materialName,
ldpl.material_code materialCode,
ldpl.brand_name brandName,
ldpl.waybill_number waybillNumber,
lwga.goods_allocation_name goodsAllocationName,
lwga.column_num columnNum,
lwga.layer_num
FROM
logpm_warehouse_tray_goods lwtg
JOIN logpm_distribution_parcel_list ldpl ON lwtg.association_id = ldpl.id
left join (logpm_warehouse_updown_goods lwug join logpm_warehouse_goods_allocation lwga on lwug.allocation_id =lwga.id) on lwug.association_id = ldpl.id
WHERE
ldpl.is_deleted = 0 and lwtg.is_deleted = 0 and lwtg.association_type = 3 and lwtg.tray_id = #{param.id}
</select>
<select id="selectInventoryList" resultType="com.logpm.basicdata.vo.WarehouseStockListVO">
SELECT
ldsl.sku sku,
ldsl.description_goods descriptionGoods,
ldsl.cargo_number cargoNumber,
ldsl.cargo_unit cargoUnit,
ldsl.cargo_norms cargoNorms,
ldsl.shopping_mall shoppingMall,
ldsl.warehouse_name warehouseName,
lwga.goods_allocation_name goodsAllocationName,
lwga.column_num columnNum,
lwga.layer_num layerNum
FROM
logpm_warehouse_tray_goods lwtg
JOIN logpm_distribution_stock_list ldsl ON lwtg.association_id = ldsl.id
left join (logpm_warehouse_updown_goods lwug join logpm_warehouse_goods_allocation lwga on lwug.allocation_id =lwga.id) on lwug.association_id = ldsl.id
WHERE
ldsl.is_deleted = 0 and lwtg.is_deleted = 0 and lwtg.association_type = 4 and lwtg.tray_id = #{param.id}
</select>
<select id="selectlclList" resultType="com.logpm.basicdata.vo.BasicdataStockArticleVO">
SELECT
ldsa.dealer_name dealerName,
ldsa.waybill_number waybillNumber,
ldsa.dealer_code dealerCode,
ldsa.consignee_person consigneePerson,
ldsa.consignee_address consigneeAddress,
lwga.goods_allocation_name goodsAllocationName,
lwga.column_num columnNum,
lwga.layer_num layerNum
FROM
logpm_warehouse_tray_goods lwtg
JOIN logpm_distribution_stock_article ldsa ON lwtg.association_id = ldsa.id
left join (logpm_warehouse_updown_goods lwug join logpm_warehouse_goods_allocation lwga on lwug.allocation_id =lwga.id) on lwug.association_id = ldsa.id
WHERE
ldsa.is_deleted = 0 and lwtg.is_deleted = 0 and lwtg.association_type = 1 and lwtg.tray_id = #{param.id}
</select>
<select id="selectPackageListhistory" resultType="com.logpm.basicdata.vo.WarehouseParcelListVO">
SELECT
ldpl.order_package_code orderPackageCode,
ldpl.warehouse warehouse,
ldpl.firsts firsts,
ldpl.SECOND SECOND,
ldpl.third_product thirdProduct,
ldpl.material_name materialName,
ldpl.material_code materialCode,
ldpl.brand_name brandName,
ldpl.waybill_number waybillNumber,
lwga.goods_allocation_name goodsAllocationName,
lwga.column_num columnNum,
lwga.layer_num layerNum,
(CASE
WHEN lwtgl.binding_type ='1' THEN '绑定'
WHEN lwtgl.binding_type ='0' THEN '解绑'
end )
bindingType,
lwtgl.create_time operateTime,
lwtgl.create_user operateUser,
lwtgl.num num
FROM
logpm_warehouse_tray_goods_log lwtgl
JOIN logpm_distribution_parcel_list ldpl ON lwtgl.association_id = ldpl.id
left join (logpm_warehouse_updown_goods lwug join logpm_warehouse_goods_allocation lwga on lwug.allocation_id =lwga.id) on lwug.association_id = ldpl.id
WHERE
ldpl.is_deleted = 0 and lwtgl.is_deleted = 0 and lwtgl.association_type = 3 and lwtgl.tray_id = #{param.id}
</select>
<select id="selectinventoryListhistory" resultType="com.logpm.basicdata.vo.WarehouseStockListVO">
SELECT
ldsl.sku sku,
ldsl.description_goods descriptionGoods,
ldsl.cargo_number cargoNumber,
ldsl.cargo_unit cargoUnit,
ldsl.cargo_norms cargoNorms,
ldsl.shopping_mall shoppingMall,
ldsl.warehouse_name warehouseName,
lwga.goods_allocation_name goodsAllocationName,
lwga.column_num columnNum,
lwga.layer_num layerNum,
(CASE
WHEN lwtgl.binding_type ='1' THEN '绑定'
WHEN lwtgl.binding_type ='0' THEN '解绑'
end )
bindingType,
lwtgl.create_time operateTime,
lwtgl.create_user operateUser,
lwtgl.num num
FROM
logpm_warehouse_tray_goods_log lwtgl
JOIN logpm_distribution_stock_list ldsl ON lwtgl.association_id = ldsl.id
left join (logpm_warehouse_updown_goods lwug join logpm_warehouse_goods_allocation lwga on lwug.allocation_id =lwga.id) on lwug.association_id = ldsl.id
WHERE
ldsl.is_deleted = 0 and lwtgl.is_deleted = 0 = 0 and lwtgl.association_type = 4 and lwtgl.tray_id = #{param.id}
</select>
<select id="selectlclListhistory" resultType="com.logpm.basicdata.vo.BasicdataStockArticleVO">
SELECT
ldsa.dealer_name dealerName,
ldsa.waybill_number waybillNumber,
ldsa.dealer_code dealerCode,
ldsa.consignee_person consigneePerson,
ldsa.consignee_address consigneeAddress,
lwga.goods_allocation_name goodsAllocationName,
lwga.column_num columnNum,
lwga.layer_num layerNum,
(CASE
WHEN lwtgl.binding_type ='1' THEN '绑定'
WHEN lwtgl.binding_type ='0' THEN '解绑'
end )
bindingType,
lwtgl.create_time operateTime,
lwtgl.create_user operateUser,
lwtgl.num num
FROM
logpm_warehouse_tray_goods_log lwtgl
JOIN logpm_distribution_stock_article ldsa ON lwtgl.association_id = ldsa.id
left join (logpm_warehouse_updown_goods lwug join logpm_warehouse_goods_allocation lwga on lwug.allocation_id =lwga.id) on lwug.association_id = ldsa.id
WHERE
ldsa.is_deleted = 0 and lwtgl.is_deleted = 0 and lwtgl.association_type = 1 and lwtgl.tray_id = #{param.id}
</select>

26
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTrayService.java

@ -22,7 +22,9 @@ import com.logpm.basicdata.dto.BasicdataTrayDTO;
import com.logpm.basicdata.entity.BasicdataTrayEntity;
import com.logpm.basicdata.excel.BasicdataTrayExcel;
import com.logpm.basicdata.vo.BasicdataTrayVO;
import com.logpm.basicdata.vo.BasicdataStockArticleVO;
import com.logpm.basicdata.vo.WarehouseParcelListVO;
import com.logpm.basicdata.vo.WarehouseStockListVO;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
import java.util.Map;
@ -71,4 +73,28 @@ public interface IBasicdataTrayService extends BaseService<BasicdataTrayEntity>
* 托盘 包条详情
*/
IPage<WarehouseParcelListVO> getpackageList(IPage<WarehouseParcelListVO> page, BasicdataTrayVO basicdataTray);
/**
* 托盘 库存品列表
*/
IPage<WarehouseStockListVO> getinventoryList(IPage<WarehouseStockListVO> page, BasicdataTrayVO basicdataTray);
/**
* 托盘 零担列表
*/
IPage<BasicdataStockArticleVO> getlclList(IPage<BasicdataStockArticleVO> page, BasicdataTrayVO basicdataTray);
/**
* 托盘 历史包条详情
*/
IPage<WarehouseParcelListVO> getpackageListhistory(IPage<WarehouseParcelListVO> page, BasicdataTrayVO basicdataTray);
/**
* 托盘 库存品
*/
IPage<WarehouseStockListVO> getinventoryListhistory(IPage<WarehouseStockListVO> page, BasicdataTrayVO basicdataTray);
/**
* 托盘 零担列表历史记录
*/
IPage<BasicdataStockArticleVO> getlclListhistory(IPage<BasicdataStockArticleVO> page, BasicdataTrayVO basicdataTray);
/**
* 托盘 一键空闲
*/
Boolean vacantById(BasicdataTrayEntity basicdataTray);
}

61
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java

@ -16,33 +16,36 @@
*/
package com.logpm.basicdata.service.impl;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.logpm.basic.feign.IBasicTenantCodeClient;
import com.logpm.basicdata.dto.BasicdataTrayDTO;
import com.logpm.basicdata.entity.BasicdataTrayEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.excel.BasicdataTrayExcel;
import com.logpm.basicdata.feign.BasicdataCodeClient;
import com.logpm.basicdata.feign.IBasicdataCodeClient;
import com.logpm.basicdata.mapper.BasicdataTrayMapper;
import com.logpm.basicdata.mapper.BasicdataWarehouseMapper;
import com.logpm.basicdata.service.IBasicdataTrayService;
import com.logpm.basicdata.vo.BasicdataTrayVO;
import com.logpm.basicdata.vo.BasicdataStockArticleVO;
import com.logpm.basicdata.vo.WarehouseParcelListVO;
import com.logpm.basicdata.vo.WarehouseStockListVO;
import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.CodeNumConstant;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.RandomType;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigInteger;
import java.util.*;
/**
@ -53,6 +56,7 @@ import java.util.*;
*/
@Service
@AllArgsConstructor
@Log4j2
public class BasicdataTrayServiceImpl extends BaseServiceImpl<BasicdataTrayMapper, BasicdataTrayEntity> implements IBasicdataTrayService {
private BasicdataTrayMapper trayMapper;
@ -64,6 +68,8 @@ public class BasicdataTrayServiceImpl extends BaseServiceImpl<BasicdataTrayMappe
private BasicdataWarehouseMapper basicdataWarehouseMapper;
private IWarehouseTrayGoodsClient warehouseTrayGoodsClient;
@Override
public IPage<BasicdataTrayVO> selectBasicdataTrayPage(IPage<BasicdataTrayVO> page, BasicdataTrayVO BasicdataTray) {
return page.setRecords(baseMapper.selectBasicdataTrayPage(page, BasicdataTray));
@ -129,5 +135,48 @@ public class BasicdataTrayServiceImpl extends BaseServiceImpl<BasicdataTrayMappe
return page.setRecords(list);
}
@Override
public IPage<WarehouseStockListVO> getinventoryList(IPage<WarehouseStockListVO> page, BasicdataTrayVO basicdataTray) {
List<WarehouseStockListVO> list =trayMapper.selectInventoryList(page,basicdataTray);
return page.setRecords(list);
}
@Override
public IPage<BasicdataStockArticleVO> getlclList(IPage<BasicdataStockArticleVO> page, BasicdataTrayVO basicdataTray) {
List<BasicdataStockArticleVO> list = trayMapper.selectlclList(page,basicdataTray);
return page.setRecords(list);
}
@Override
public IPage<WarehouseParcelListVO> getpackageListhistory(IPage<WarehouseParcelListVO> page, BasicdataTrayVO basicdataTray) {
List<WarehouseParcelListVO> list = trayMapper.selectPackageListhistory(page,basicdataTray);
return page.setRecords(list);
}
@Override
public IPage<WarehouseStockListVO> getinventoryListhistory(IPage<WarehouseStockListVO> page, BasicdataTrayVO basicdataTray) {
List<WarehouseStockListVO> list = trayMapper.selectinventoryListhistory(page,basicdataTray);
return page.setRecords(list);
}
@Override
public IPage<BasicdataStockArticleVO> getlclListhistory(IPage<BasicdataStockArticleVO> page, BasicdataTrayVO basicdataTray) {
List<BasicdataStockArticleVO> list = trayMapper.selectlclListhistory(page,basicdataTray);
return page.setRecords(list);
}
@Override
public Boolean vacantById(BasicdataTrayEntity basicdataTray) {
//删除托盘货物绑定表
Boolean aBoolean = warehouseTrayGoodsClient.removeByMasterId(basicdataTray.getId());
log.info("子表删除>>>>>>>>>>>>>>>>{}",aBoolean);
//修改托盘表状态
boolean update = this.update(new UpdateWrapper<BasicdataTrayEntity>().lambda()
.eq(BasicdataTrayEntity::getId, basicdataTray.getId())
.set(BasicdataTrayEntity::getTrayStatus, 1)
);
return update;
}
}

46
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/BasicdataTrayWrapper.java

@ -0,0 +1,46 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.wrapper;
import com.logpm.basicdata.vo.BasicdataTrayVO;
import com.logpm.basicdata.vo.WarehouseParcelListVO;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.system.feign.IUserClient;
/**
* 托盘 包装类,返回视图层所需的字段
*
* @author lmy
* @since 2023-08-08
*/
public class BasicdataTrayWrapper extends BaseEntityWrapper<BasicdataTrayVO, BasicdataTrayVO> {
public static BasicdataTrayWrapper build() {
return new BasicdataTrayWrapper();
}
@Override
public BasicdataTrayVO entityVO(BasicdataTrayVO basicdataTrayVO) {
basicdataTrayVO.setDisableTypeName("正常");
if (basicdataTrayVO.getDisableType()==2){basicdataTrayVO.setDisableTypeName("禁用");}
return basicdataTrayVO;
}
}

43
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/DistributionStockArticWrapper.java

@ -0,0 +1,43 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.wrapper;
import com.logpm.basicdata.vo.BasicdataStockArticleVO;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.system.feign.IUserClient;
/**
* 托盘 包装类,返回视图层所需的字段
*
* @author lmy
* @since 2023-08-08
*/
public class DistributionStockArticWrapper extends BaseEntityWrapper<BasicdataStockArticleVO, BasicdataStockArticleVO> {
IUserClient userCliient = SpringUtil.getBean(IUserClient.class);
public static DistributionStockArticWrapper build() {
return new DistributionStockArticWrapper();
}
@Override
public BasicdataStockArticleVO entityVO(BasicdataStockArticleVO distributionStockArticleVO) {
distributionStockArticleVO.setOperateUserName(userCliient.userInfoById(distributionStockArticleVO.getOperateUser()).getData().getName());
return distributionStockArticleVO;
}
}

44
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/WarehouseParcelListWrapper.java

@ -0,0 +1,44 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.wrapper;
import com.logpm.basicdata.vo.WarehouseParcelListVO;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.system.feign.IUserClient;
/**
* 托盘 包装类,返回视图层所需的字段
*
* @author lmy
* @since 2023-08-08
*/
public class WarehouseParcelListWrapper extends BaseEntityWrapper<WarehouseParcelListVO, WarehouseParcelListVO> {
IUserClient userCliient = SpringUtil.getBean(IUserClient.class);
public static WarehouseParcelListWrapper build() {
return new WarehouseParcelListWrapper();
}
@Override
public WarehouseParcelListVO entityVO(WarehouseParcelListVO warehouseParcelListVO) {
warehouseParcelListVO.setOperateUserName(userCliient.userInfoById(warehouseParcelListVO.getOperateUser()).getData().getName());
return warehouseParcelListVO;
}
}

43
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/wrapper/WarehouseStockListWrapper.java

@ -0,0 +1,43 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.basicdata.wrapper;
import com.logpm.basicdata.vo.WarehouseStockListVO;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.SpringUtil;
import org.springblade.system.feign.IUserClient;
/**
* 托盘 包装类,返回视图层所需的字段
*
* @author lmy
* @since 2023-08-08
*/
public class WarehouseStockListWrapper extends BaseEntityWrapper<WarehouseStockListVO, WarehouseStockListVO> {
IUserClient userCliient = SpringUtil.getBean(IUserClient.class);
public static WarehouseStockListWrapper build() {
return new WarehouseStockListWrapper();
}
@Override
public WarehouseStockListVO entityVO(WarehouseStockListVO warehouseParcelListVO) {
warehouseParcelListVO.setOperateUserName(userCliient.userInfoById(warehouseParcelListVO.getOperateUser()).getData().getName());
return warehouseParcelListVO;
}
}

36
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseTrayGoodsClient.java

@ -0,0 +1,36 @@
package com.logpm.warehouse.feign;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.service.IWarehouseTrayGoodsService;
import com.logpm.warehouse.service.IWarehouseWaybillService;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
@ApiIgnore()
@RestController
@AllArgsConstructor
public class WarehouseTrayGoodsClient implements IWarehouseTrayGoodsClient {
private final IWarehouseTrayGoodsService warehouseTrayGoodsService;
@Override
@PostMapping(TOP+"/delEntity")
public Boolean remove(String ids) {
return warehouseTrayGoodsService.deleteLogic(Func.toLongList(ids));
}
@Override
@PostMapping(TOP+"/delEntityByMasterId")
public Boolean removeByMasterId(Long id) {
return warehouseTrayGoodsService.deleteByMasterId(id);
}
}

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.java

@ -13,7 +13,7 @@ import java.util.List;
@Mapper
public interface WarehouseTrayTypeMapper extends BaseMapper<WarehouseTrayTypeEntity> {
IPage<WarehouseTrayTypeEntity> pageList(IPage<Object> page, @Param("param") TrayTypeDTO trayTypeDTO);
// IPage<WarehouseTrayTypeEntity> pageList(IPage<Object> page, @Param("param") TrayTypeDTO trayTypeDTO);
IPage<WarehouseTrayTypeEntity> orderPageList(IPage<Object> page, @Param("param") TrayTypeDTO trayTypeDTO);

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -7,8 +7,8 @@
<result column="id" property="id"/>
<result column="waybill_no" property="waybillNo"/>
<result column="order_no" property="orderNo"/>
<result column="destination_warehouse" property="destinationWarehouse"/>
<result column="departure_warehouse" property="departureWarehouse"/>
<!-- <result column="destination_warehouse" property="destinationWarehouse"/>-->
<!-- <result column="departure_warehouse" property="departureWarehouse"/>-->
<result column="customer_train" property="customerTrain"/>
<result column="brand" property="brand"/>
<result column="shipper" property="shipper"/>

6
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillReceivedRecordMapper.xml

@ -3,7 +3,7 @@
<mapper namespace="com.logpm.warehouse.mapper.WarehouseWaybillReceivedRecordMapper">
<select id="getCollectPayByWaybillNos" parameterType="java.util.List">
<select id="getCollectPayByWaybillNos" resultType="java.math.BigDecimal">
select sum(lww.collect_pay)
from logpm_warehouse_waybill lww
where lww.waybill_no in
@ -11,9 +11,7 @@
${item}
</foreach>
</select>
<select id="getReplacePriceByWaybillNos" parameterType="java.util.List">
<select id="getReplacePriceByWaybillNos" resultType="java.math.BigDecimal">
select sum(lww.replace_price)
from logpm_warehouse_waybill lww
where lww.waybill_no in

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

@ -22,6 +22,10 @@ public interface IWarehouseTrayGoodsService extends BaseService<WarehouseTrayGoo
Integer deleteByTrayGoodsId(Long trayGoodsId);
List<TrayTypeDataListVO> getZeroListByTrayTypeId(Long trayTypeId);
/**
* 通过主Id删除子表
* */
Boolean deleteByMasterId(Long masterId);
void saveEntityZero(DistributionStockArticleEntity stockArticleEntity, WarehouseTrayTypeEntity trayTypeEntity,Integer num, String isException);

8
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayGoodsServiceImpl.java

@ -96,4 +96,12 @@ public class WarehouseTrayGoodsServiceImpl extends BaseServiceImpl<WarehouseTray
public List<TrayTypeDataListVO> getStockListByTrayTypeId(Long trayTypeId) {
return baseMapper.getStockListByTrayTypeId(trayTypeId);
}
@Override
public Boolean deleteByMasterId(Long masterId) {
int delete = baseMapper.delete(new QueryWrapper<WarehouseTrayGoodsEntity>().lambda()
.eq(WarehouseTrayGoodsEntity::getTrayId, masterId)
);
return delete>0?true:false;
}
}

Loading…
Cancel
Save