From 0237d1cbb9b9959ef134e29c7e3b4d8d4c9ef32d Mon Sep 17 00:00:00 2001 From: qinyulong Date: Mon, 26 Jan 2026 10:58:32 +0800 Subject: [PATCH] =?UTF-8?q?wms=EF=BC=9A1.=E9=87=8F=E5=85=B7=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=95=B0=E6=8D=AEopenFeign=E8=BF=9C=E7=A8=8B=E8=B0=83?= =?UTF-8?q?=E7=94=A8=EF=BC=9B=202.=E9=87=8F=E5=85=B7=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=AD=97=E6=AE=B5=E5=8F=98=E6=9B=B4=203.wms-?= =?UTF-8?q?api=E9=87=8C=E5=8A=A0=E5=85=A5=E9=87=8F=E5=85=B7=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E8=BF=9C=E7=A8=8B=E8=B0=83=E7=94=A8=E6=89=80=E9=9C=80?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/feign/StRealtimeStockClient.java | 32 ++ .../feign/StRealtimeStockClientFallback.java | 23 ++ .../springblade/wms/pojo/dto/StGoodsDTO.java | 24 ++ .../wms/pojo/dto/StRealtimeStockDTO.java | 25 ++ .../springblade/wms/pojo/entity/StGoods.java | 277 ++++++++++++++++++ .../wms/pojo/entity/StRealtimeStock.java | 194 ++++++++++++ .../wms/pojo/entity/StStockInoutRecord.java | 171 +++++++++++ .../wms/pojo/entity/StStorageLocation.java | 66 +++++ .../wms/pojo/entity/StStoreBill.java | 150 ++++++++++ .../wms/pojo/entity/StStorehouse.java | 91 ++++++ .../wms/pojo/vo/PrintParentWoLabel.java | 21 ++ .../wms/pojo/vo/PrintStoresList.java | 86 ++++++ .../springblade/wms/pojo/vo/PrintWoLabel.java | 41 +++ .../springblade/wms/pojo/vo/StGoodsVO.java | 24 ++ .../wms/pojo/vo/StRealtimeStockVO.java | 52 ++++ .../wms/pojo/vo/StStorageLocationVO.java | 25 ++ .../wms/pojo/vo/StStoreBillVO.java | 25 ++ .../controller/StRealtimeStockController.java | 2 +- .../wms/feign/StRealtimeStockClientImpl.java | 54 ++++ doc/sql/mes/increase-20160124.sql | 5 + 20 files changed, 1387 insertions(+), 1 deletion(-) create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/feign/StRealtimeStockClient.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/feign/StRealtimeStockClientFallback.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/dto/StGoodsDTO.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/dto/StRealtimeStockDTO.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StGoods.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StRealtimeStock.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStockInoutRecord.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStorageLocation.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStoreBill.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStorehouse.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/PrintParentWoLabel.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/PrintStoresList.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/PrintWoLabel.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StGoodsVO.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StRealtimeStockVO.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StStorageLocationVO.java create mode 100644 blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StStoreBillVO.java create mode 100644 blade-service/blade-wms/src/main/java/org/springblade/wms/feign/StRealtimeStockClientImpl.java create mode 100644 doc/sql/mes/increase-20160124.sql diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/feign/StRealtimeStockClient.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/feign/StRealtimeStockClient.java new file mode 100644 index 00000000..7d603d67 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/feign/StRealtimeStockClient.java @@ -0,0 +1,32 @@ +package org.springblade.wms.feign; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.wms.pojo.vo.StRealtimeStockVO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.web.bind.annotation.GetMapping; + +/** + * 仓库实时结余远程调用 + * + * @author qyl + * @since 2026-01-24 + */ +@FeignClient( + value = "blade-wms" +) +public interface StRealtimeStockClient { + String API_PREFIX = "/feign/client/stRealtimeStock"; + + String MEASURING_TOOLS = API_PREFIX + "/pageToolsData"; + + /** + * 量具库存 + */ + @GetMapping(MEASURING_TOOLS) + R> getMeasuringTools(@SpringQueryMap StRealtimeStockVO stRealtimeStock, @SpringQueryMap Query query); + +} diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/feign/StRealtimeStockClientFallback.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/feign/StRealtimeStockClientFallback.java new file mode 100644 index 00000000..220e08bd --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/feign/StRealtimeStockClientFallback.java @@ -0,0 +1,23 @@ +package org.springblade.wms.feign; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.wms.pojo.vo.StRealtimeStockVO; +import org.springframework.stereotype.Component; + +/** + * Feign失败配置 + * + * @author qyl + */ +@Component +public class StRealtimeStockClientFallback implements StRealtimeStockClient { + + @Override + public R> getMeasuringTools(StRealtimeStockVO stRealtimeStock, Query query) { + return R.fail("获取数据失败"); + } + +} diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/dto/StGoodsDTO.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/dto/StGoodsDTO.java new file mode 100644 index 00000000..e8afff71 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/dto/StGoodsDTO.java @@ -0,0 +1,24 @@ +package org.springblade.wms.pojo.dto; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.wms.pojo.entity.StGoods; + +import java.io.Serial; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName StGoodsDTO + * @description: + * @autor: WuSiYu + * @create 2025-12-12 14:14 + **/ + +@Data +@EqualsAndHashCode(callSuper = true) +public class StGoodsDTO extends StGoods { + @Serial + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/dto/StRealtimeStockDTO.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/dto/StRealtimeStockDTO.java new file mode 100644 index 00000000..7692970c --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/dto/StRealtimeStockDTO.java @@ -0,0 +1,25 @@ +package org.springblade.wms.pojo.dto; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.wms.pojo.entity.StRealtimeStock; + +import java.io.Serial; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName StRealtimeStockDTO + * @description: 仓库实时结余表 数据传输对象实体类 + * @autor: WuSiYu + * @create 2025-12-15 14:48 + **/ + +@Data +@EqualsAndHashCode(callSuper = true) +public class StRealtimeStockDTO extends StRealtimeStock { + @Serial + private static final long serialVersionUID = 1L; + +} + diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StGoods.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StGoods.java new file mode 100644 index 00000000..4960c711 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StGoods.java @@ -0,0 +1,277 @@ +package org.springblade.wms.pojo.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.io.Serial; +import java.util.Date; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName StGoods + * @description: + * @autor: WuSiYu + * @create 2025-12-09 18:11 + **/ + +@Data +@TableName("ST_GOODS") +@Schema(description = "StGoods对象") +@EqualsAndHashCode(callSuper = true) +public class StGoods extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 物料编码 + */ + @Schema(description = "物料编码") + private String goodsCode; + /** + * 物料名称 + */ + @Schema(description = "物料名称") + private String goodsName; + /** + * 最高库存 + */ + @Schema(description = "最高库存") + private Double maxNum; + /** + * 最低库存 + */ + @Schema(description = "最低库存") + private Double minNum; + /** + * 采购数量 + */ + @Schema(description = "采购数量") + private Double purchaseQuantity; + /** + * 必检标识 + */ + @Schema(description = "必检标识") + private Short mustCheck; + /** + * 是否停用(默认值:0) + */ + @Schema(description = "是否停用(默认值:0)") + private Boolean used; + /** + * 使用件数核算 + */ + @Schema(description = "使用件数核算") + private Short numAcc; + /** + * 产地 + */ + @Schema(description = "产地") + private String madeIn; + /** + * 单价 + */ + @Schema(description = "单价") + private Double price; + /** + * 等级 + */ + @Schema(description = "等级") + private String grade; + /** + * 来源 1=自制 2=外购 + */ + @Schema(description = "来源 1=自制 2=外购") + private Short source; + /** + * 组件模式 + */ + @Schema(description = "组件模式") + private String prtType; + /** + * 版本 + */ + @Schema(description = "版本") + private String releaseNo; + /** + * 版本时间 + */ + @Schema(description = "版本时间") + private Date releaseNoTime; + /** + * 型号 + */ + @Schema(description = "型号") + private String materialModel; + /** + * 重量 + */ + @Schema(description = "重量") + private Double weight; + /** + * 计量单位 + */ + @Schema(description = "计量单位") + private String unitName; + /** + * 产品类别 + */ + @Schema(description = "产品类别") + private String productCategory; + /** + * 规格型号 + */ + @Schema(description = "规格型号") + private String specifications; + /** + * 技术条件 + */ + @Schema(description = "技术条件") + private String productTechSpec; + /** + * 密度 + */ + @Schema(description = "密度") + private Double density; + /** + * 图号 + */ + @Schema(description = "图号") + private String drawingNo; + /** + * 变更通告编号 + */ + @Schema(description = "变更通告编号") + private String ecnNo; + /** + * 是否成品(默认值:0) + */ + @Schema(description = "是否成品(默认值:0)") + private Short endItem; + /** + * 优选等级 + */ + @Schema(description = "优选等级") + private String priority; + /** + * 超级链接 + */ + @Schema(description = "超级链接") + private String partLink; + /** + * 腔数 + */ + @Schema(description = "腔数") + private String cavityNo; + /** + * 采购部门 + */ + @Schema(description = "采购部门") + private Long deptId; + /** + * 物料类别 + */ + @Schema(description = "物料类别") + private Long gcId; + /** + * 生命周期状态 + */ + @Schema(description = "生命周期状态") + private String partRevisionStatus; + /** + * 牌号 + */ + @Schema(description = "牌号") + private String tradeMark; + /** + * 备注 + */ + @Schema(description = "备注") + private String remark; + /** + * 锁料数量 + */ + @Schema(description = "锁料数量") + private Double lockQuantity; + /** + * 在途数量 + */ + @Schema(description = "在途数量") + private Double onthewayQuantity; + /** + * 当前库存 + */ + @Schema(description = "当前库存") + private Double currentQuantity; + /** + * 物料类型 + */ + @Schema(description = "物料类型") + private Long goodsType; + /** + * 大类 + */ + @Schema(description = "大类") + private String matBigClassify; + /** + * 小类 + */ + @Schema(description = "小类") + private String matSmallClassify; + /** + * 检验编号 + */ + @Schema(description = "检验编号") + private String checkCode; + /** + * 批次号 + */ + @Schema(description = "批次号") + private String batch; + /** + * 表面积 + */ + @Schema(description = "表面积") + private Double sectionArea; + /** + * 物料属性 + */ + @Schema(description = "物料属性") + private Long materialProperty; + /** + * PDM单位 + */ + @Schema(description = "PDM单位") + private String pdmUnit; + /** + * 是否工艺审批 + */ + @Schema(description = "是否工艺审批") + private String processApproval; + /** + * 是否最低库存预警 + */ + @Schema(description = "是否最低库存预警") + private String minWarning; + + /** + * 自制 + */ + public static Short MAKE_PROPERTIES_SELF = 1; + /** + * 外购 + */ + public static Short MAKE_PROPERTIES_OUT = 2; + + public void setSourceByStr(String str) { + if ("自制".equals(str)) { + this.source = MAKE_PROPERTIES_SELF; + } else if ("外购".equals(str)) { + this.source = MAKE_PROPERTIES_OUT; + } + } +} diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StRealtimeStock.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StRealtimeStock.java new file mode 100644 index 00000000..916009a9 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StRealtimeStock.java @@ -0,0 +1,194 @@ +package org.springblade.wms.pojo.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serial; +import java.util.Date; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName StRealtimeStock + * @description: 仓库实时结余表 实体类 + * @autor: WuSiYu + * @create 2025-12-15 14:45 + **/ + +@Data +@TableName("ST_REALTIME_STOCK") +@Schema(description = "StRealtimeStock对象") +@EqualsAndHashCode(callSuper = true) +public class StRealtimeStock extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 库房ID + */ + @Schema(description = "库房ID") + private Long shId; + /** + * 物料ID(关联st_goods表) + */ + @Schema(description = "物料ID(关联st_goods表)") + @TableField("goods_id") + private Long goodsId; + /** + * 库位ID + */ + @Schema(description = "库位ID") + private Long slId; + /** + * 批次号 + */ + @Schema(description = "批次号") + private String piNo; + /** + * 库存数量 + */ + @Schema(description = "库存数量") + private Double quantity; + /** + * 金额-单价 + */ + @Schema(description = "金额-单价") + private Double balanceMoney; + /** + * 质量等级 + */ + @Schema(description = "质量等级") + private String quantityLevel; + /** + * 过期/报废日期 + */ + @Schema(description = "过期/报废日期") + private Date scrapCycle; + /** + * 质量编号 + */ + @Schema(description = "质量编号") + private String checkCode; + /** + * 是否模架物料(1=是/0=否) + */ + @Schema(description = "是否模架物料(1=是/0=否)") + private Boolean moldBaseMaterial; + /** + * 模架物料库存对应模架库存ID + */ + @Schema(description = "模架物料库存对应模架库存ID") + private Long moldRlsId; + /** + * 是否停用(1=是/0=否) + */ + @Schema(description = "是否停用(1=是/0=否)") + private Boolean stopUse; + /** + * 累计次数 + */ + @Schema(description = "累计次数") + private Long sumNum; + /** + * 库存来源(1=采购/2=生产/3=调拨等) + */ + @Schema(description = "库存来源(1=采购/2=生产/3=调拨等)") + private Long stockSource; + /** + * 待保养次数 + */ + @Schema(description = "待保养次数") + private Long stayMaintainNum; + /** + * 物料状态 + */ + @Schema(description = "物料状态") + private Long goodsStatus; + /** + * 分厂类型 + */ + @Schema(description = "分厂类型") + private Long facilityType; + /** + * 分厂ID + */ + @Schema(description = "分厂ID") + private String deptId; + /** + * 条码号 + */ + @Schema(description = "条码号") + private String barCode; + /** + * 占用数量 + */ + @Schema(description = "占用数量") + private Double occupyQuantity; + /** + * 炉批号 + */ + @Schema(description = "炉批号") + private String stovePiNo; + /** + * 到期送检是否申请 + */ + @Schema(description = "到期送检是否申请") + private Boolean applyFor; + /** + * 供方代码 + */ + @Schema(description = "供方代码") + private String splyCode; + /** + * 限用标记 + */ + @Schema(description = "限用标记") + private Long limitUseFlag; + /** + * ERP入库时间 + */ + @Schema(description = "ERP入库时间") + private Date erpStorageTime; + /** + * 是否印字 + */ + @Schema(description = "是否印字") + private Boolean printMark; + /** + * 粉重 + */ + @Schema(description = "粉重") + private String powderWeight; + /** + * 材料号 + */ + @Schema(description = "材料号") + private String materialNo; + /** + * 厚度 + */ + @Schema(description = "厚度") + private String thickness; + /** + * 备注 + */ + @Schema(description = "备注") + private String memo; + + /** + * 保管员 + */ +// @Transient +// private String keeper; + +// @Transient + private Double outQuantity; + + +} + diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStockInoutRecord.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStockInoutRecord.java new file mode 100644 index 00000000..f6ba2759 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStockInoutRecord.java @@ -0,0 +1,171 @@ +package org.springblade.wms.pojo.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serial; +import java.util.Date; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName StStockInoutRecord + * @description: 出入库记录表 实体类 + * @autor: WuSiYu + * @create 2026-01-04 11:08 + **/ + +@Data +@TableName("ST_STOCK_INOUT_RECORD") +@Schema(description = "StStockInoutRecord对象") +@EqualsAndHashCode(callSuper = true) +public class StStockInoutRecord extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 库位ID(关联st_storage_location表主键) + */ + @Schema(description = "库位ID(关联st_storage_location表主键)") + private Long slId; + /** + * 库存ID(关联st_realtime_stock表主键) + */ + @Schema(description = "库存ID(关联st_realtime_stock表主键)") + private Long rlsId; + /** + * 仓库ID(关联st_storehouse表主键) + */ + @Schema(description = "仓库ID(关联st_storehouse表主键)") + private Long shId; + /** + * 批号 + */ + @Schema(description = "批号") + private String piNo; + /** + * 出入库数量 + */ + @Schema(description = "出入库数量") + private Double quantity; + /** + * 金额 + */ + @Schema(description = "金额") + private Double sirMoney; + /** + * 采购单号 + */ + @Schema(description = "采购单号") + private String buyCode; + /** + * 检验单号 + */ + @Schema(description = "检验单号") + private String checkNo; + /** + * 生产标识 + */ + @Schema(description = "生产标识") + private String quantityLevel; + /** + * 是否模架物料 1=是/0=否(默认值:0) + */ + @Schema(description = "是否模架物料 1=是/0=否(默认值:0)") + private Boolean moldBaseMaterial; + /** + * 过期/报废日期 + */ + @Schema(description = "过期/报废日期") + private Date scrapCycle; + /** + * 炉批号 + */ + @Schema(description = "炉批号") + private String stovePiNo; + /** + * 分厂id + */ + @Schema(description = "分厂id") + private String deptId; + /** + * 车间订单号 + */ + @Schema(description = "车间订单号") + private String woCode; + /** + * 出入库类型/出库或入库 + */ + @Schema(description = "出入库类型/出库或入库") + private String inOutType; + /** + * 出入库原因 + */ + @Schema(description = "出入库原因") + private String inOutReason; + /** + * 出入库日期 + */ + @Schema(description = "出入库日期") + private Date inOutDate; + /** + * 出入库来源 + */ + @Schema(description = "出入库来源") + private Short inOutSource; + /** + * 业务人员/领用人ID + */ + @Schema(description = "业务人员/领用人ID") + private Long userId; + /** + * 出入库单号 + */ + @Schema(description = "出入库单号") + private String sirCode; + /** + * 物料ID(关联st_goods表主键) + */ + @Schema(description = "物料ID(关联st_goods表主键)") + private Long goodsId; + /** + * 总金额 + */ + private Double allMoney; + /** + * 保管员 + */ + private String keeper; + /** + * 厚度 + */ + private String thickness; + /** + * 物料需求ID + */ + @Schema(description = "物料需求ID关联PvBomRequest") + private Long brId; + + private Date warehousingDate; + + private String barCode; + + /*1:采购入库,2.生产入库,3:其他入库,4调拨入库,5erp转移入库,7生产退料 + 11:配额出库,12:其他出库,13:领料出库 15刀具出库*/ + public static final Short INOUT_SOURCE_PURCHASE_RECEIPT = 1; + public static final Short INOUT_SOURCE_PRODUCE_PURCHASE_RECEIPT = 2; + public static final Short INOUT_SOURCE_OTHER_PURCHASE_RECEIPT = 3; + public static final Short INOUT_SOURCE_TRANSFER_RECEIPT = 4; + public static final Short INOUT_SOURCE_WAREHOUSE_TRANSFER = 5; + public static final Short INOUT_SOURCE_PRODUCTION_MATERIAL_RETURN = 7; + public static final Short INOUT_SOURCE_QUOTA_OUT = 11; + public static final Short INOUT_SOURCE_OTHER_OUT = 12; + public static final Short INOUT_SOURCE_ASSIGN_OUT = 13; + public static final Short INOUT_SOURCE_TOOl_OUT = 15; + +} + diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStorageLocation.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStorageLocation.java new file mode 100644 index 00000000..ec161cf3 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStorageLocation.java @@ -0,0 +1,66 @@ +package org.springblade.wms.pojo.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serial; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName StStorageLocation + * @description: 库位维护表 实体类 + * @autor: WuSiYu + * @create 2025-12-18 14:33 + **/ + +@Data +@TableName("ST_STORAGE_LOCATION") +@Schema(description = "StStorageLocation对象") +@EqualsAndHashCode(callSuper = true) +public class StStorageLocation extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 库房ID(关联st_storehouse表) + */ + @Schema(description = "库房ID(关联st_storehouse表)") + private Long shId; + /** + * 库位号 + */ + @Schema(description = "库位号") + private String location; + /** + * 物料编号(关联st_goods表goods_code字段) + */ + @Schema(description = "物料编号(关联st_goods表goods_code字段)") + private String goodsCode; + /** + * 物料名称 + */ + @Schema(description = "物料名称") + private String goodsName; + /** + * 物料规格 + */ + @Schema(description = "物料规格") + private String specifications; + /** + * 型号/牌号 + */ + @Schema(description = "型号/牌号") + private String materialModel; + /** + * 部门ID + */ + @Schema(description = "部门ID") + private Long deptId; + +} + diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStoreBill.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStoreBill.java new file mode 100644 index 00000000..f9a2cf3c --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStoreBill.java @@ -0,0 +1,150 @@ +package org.springblade.wms.pojo.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serial; +import java.util.Date; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName StStoreBill + * @description: 仓库凭证 实体类 + * @autor: WuSiYu + * @create 2026-01-15 13:21 + **/ + +@Data +@TableName("ST_STORE_BILL") +@Schema(description = "StStoreBill对象") +@EqualsAndHashCode(callSuper = true) +public class StStoreBill extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 凭证分类;1,物料入库;2,物料出库;3,借用;4,归还;5,调出;6,调入;7,提请 ; + */ + @Schema(description = "凭证分类;1,物料入库;2,物料出库;3,借用;4,归还;5,调出;6,调入;7,提请 ;") + private Short billFlag; + /** + * 收发标志;true:入库,false:出库 + */ + @Schema(description = "收发标志;true:入库,false:出库") + private String reCeOrSend; + /** + * 物料信息 + */ + @Schema(description = "物料信息") + private Long goodsId; + /** + * 数量 + */ + @Schema(description = "数量") + private Double quantity; + /** + * 批号 + */ + @Schema(description = "批号") + private String piNo; + /** + * 金额 + */ + @Schema(description = "金额") + private Double money; + /** + * 使用次数 + */ + @Schema(description = "使用次数") + private Long useNum; + /** + * 检验编码 + */ + @Schema(description = "检验编码") + private String checkCode; + /** + * 凭证单号 + */ + @Schema(description = "凭证单号") + private String billCode; + /** + * 凭证日期 + */ + @Schema(description = "凭证日期") + private Date billDate; + /** + * 部门;外键(部门) + */ + @Schema(description = "部门;外键(部门)") + private String deptId; + /** + * 人员;外键(人员) + */ + @Schema(description = "人员;外键(人员)") + private Long billMan; + /** + * 原因;外键(原因) + */ + @Schema(description = "原因;外键(原因)") + private String bcId; + /** + * 来源;0:正常;1:采购;2:生产; + */ + @Schema(description = "来源;0:正常;1:采购;2:生产;") + private Short billSource; + /** + * 备注 + */ + @Schema(description = "备注") + private String memo; + /** + * 仓库;外键(仓库) + */ + @Schema(description = "仓库;外键(仓库)") + private Long stoId; + /** + * 状态;1:新建,20:完成 + */ + @Schema(description = "状态;1:新建,20:完成") + private Short curStatus; + /** + * 到期日期 + */ + @Schema(description = "到期日期") + private Date expirationDate; + /** + * 库位ID + */ + @Schema(description = "库位ID") + private Long slId; + /** + * 库房ID + */ + @Schema(description = "库房ID") + private Long shId; + + /** + * 借用 + */ + public static Short BILLSOURCE_BORROW = 4; + /** + * 归还 + */ + public static Short BILLSOURCE_RETURN = 5; + + /** + * 新建 + */ + public static Short CURSTATUS_NEW = 1; + /** + * 完成 + */ + public static Short CURSTATUS_COMPLETE = 20; + +} + diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStorehouse.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStorehouse.java new file mode 100644 index 00000000..d13e49fd --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/entity/StStorehouse.java @@ -0,0 +1,91 @@ +package org.springblade.wms.pojo.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serial; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName StStorehouse + * @description: 库房维护表 实体类 + * @autor: WuSiYu + * @create 2025-12-18 14:16 + **/ + +@Data +@TableName("ST_STOREHOUSE") +@Schema(description = "StStorehouse对象") +@EqualsAndHashCode(callSuper = true) +public class StStorehouse extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 库房编号 + */ + @Schema(description = "库房编号") + private String shCode; + /** + * 库房名称 + */ + @Schema(description = "库房名称") + private String shName; + /** + * 所属分类 + */ + @Schema(description = "所属分类") + private Short type; + /** + * 工装分类 + */ + @Schema(description = "工装分类") + private Short toolingType; + /** + * 库房层级 + */ + @Schema(description = "库房层级") + private String shLevel; + /** + * 部门ID + */ + @Schema(description = "部门ID") + private String deptId; + /** + * 保管员ID + */ + @Schema(description = "保管员ID") + private Long saveUser; + /** + * 类别说明 + */ + @Schema(description = "类别说明") + private String memo; + + // 模具库 + public static final Short TYPE_MOLD = 0; + // 材料库 + public static final Short TYPE_PART = 1; + // 刀具库 + public static final Short TYPE_TOOL = 2; + // 工装库 + public static final Short TYPE_WORK = 3; + // 电极库 + public static final Short TYPE_ELECTRODE = 4; + // 量具库 + public static final Short TYPE_RULE = 5; + // 夹具库 + public static final Short TYPE_JIA_JU = 6; + + public static Short TOOLING_TYPE_MOLD = 0;//模具 + public static Short TOOLING_TYPE_TOOL = 1;//工装 + public static Short TOOLING_TYPE_RULE = 2;//量具 + + +} + diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/PrintParentWoLabel.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/PrintParentWoLabel.java new file mode 100644 index 00000000..4425c285 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/PrintParentWoLabel.java @@ -0,0 +1,21 @@ +package org.springblade.wms.pojo.vo; + +import lombok.Data; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName PrintParentWoLabel + * @description: 库存打印标签数据模型(父) + * @autor: WuSiYu + * @create 2025-12-17 09:50 + **/ + +@Data +public class PrintParentWoLabel { + + private PrintWoLabel plOne; + private PrintWoLabel plTwo; + private PrintWoLabel plThree; + private PrintWoLabel plFour; +} diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/PrintStoresList.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/PrintStoresList.java new file mode 100644 index 00000000..c7ca78a4 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/PrintStoresList.java @@ -0,0 +1,86 @@ +package org.springblade.wms.pojo.vo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName PrintStoresList + * @description: + * @autor: WuSiYu + * @create 2025-12-17 18:01 + **/ +@Data +public class PrintStoresList implements Serializable { + /** + * 供货单位 + */ + private String supplier; + /** + * 物料信息 + */ + private String materialMess; + /** + * 物料编码 + */ + private String materialCode; + /** + * 入库日期 + */ + private String inStore; + /** + * 库位号 + */ + private String locator; + /** + * 单位 + */ + private String unit; + /** + * 检验编号 + */ + private String testCode; + /** + * 到期日期 + */ + private String matureDate; + /** + * 批次号 + */ + private String batchNo; + /** + * 生产标识 + */ + private String identification; + /** + * 炉批号 + */ + private String heatNo; + /** + * 日期 + */ + private String date; + /** + * 摘要 + */ + private String memo; + /** + * 收入数 + */ + private String income; + /** + * 发出数 + */ + private String issueNum; + /** + * 结存数 + */ + private String balance; + /** + * 经手人 + */ + private String handledBy; + +} diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/PrintWoLabel.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/PrintWoLabel.java new file mode 100644 index 00000000..6f980648 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/PrintWoLabel.java @@ -0,0 +1,41 @@ +package org.springblade.wms.pojo.vo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName PrintWoLabel + * @description: 库存打印标签数据模型(子) + * @autor: WuSiYu + * @create 2025-12-17 10:00 + **/ + + +@Data +public class PrintWoLabel implements Serializable { + + /** + * 条码号 + */ + private String rsId; + /** + * 编码 + */ + private String code; + /** + * 名称 + */ + private String name; + /** + * 检验编号 + */ + private String checkCode; + /** + * 日期 + */ + private String date; +} + diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StGoodsVO.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StGoodsVO.java new file mode 100644 index 00000000..8cf873a3 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StGoodsVO.java @@ -0,0 +1,24 @@ +package org.springblade.wms.pojo.vo; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.wms.pojo.entity.StGoods; + +import java.io.Serial; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName StGoodsVO + * @description: + * @autor: WuSiYu + * @create 2025-12-12 14:15 + **/ + +@Data +@EqualsAndHashCode(callSuper = true) +public class StGoodsVO extends StGoods { + @Serial + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StRealtimeStockVO.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StRealtimeStockVO.java new file mode 100644 index 00000000..e4d089d0 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StRealtimeStockVO.java @@ -0,0 +1,52 @@ +package org.springblade.wms.pojo.vo; + +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.wms.pojo.entity.StRealtimeStock; + +import java.io.Serial; +import java.util.Date; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName StRealtimeStockVO + * @description: 仓库实时结余表 视图实体类 + * @autor: WuSiYu + * @create 2025-12-15 14:49 + **/ + +@Data +@EqualsAndHashCode(callSuper = true) +public class StRealtimeStockVO extends StRealtimeStock { + @Serial + private static final long serialVersionUID = 1L; + + private Long id; // 主键ID + private Long goodsId; // 物料ID + private Double quantity; // 库存数量 + private Double lockQuantity; + private Double onthewayQuantity; + private Double currentQuantity; + private String piNo; // 批号 + private Long slId; // 库位ID + private String barCode; // 条形码 + private Date scrapCycle; // 报废周期 + private String checkCode; // 检验码 + private String splyCode; // 供应商编码 + private String goodsName; + private String shName; + private Long shId; + private String location; + private String specifications; + @TableField(exist = false) + private String filterValue; + private Boolean special; // 特殊标识 + private Double syQuantity; + + @TableField(exist = false) + private String goodsCodeAndGoodsName; + +} + diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StStorageLocationVO.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StStorageLocationVO.java new file mode 100644 index 00000000..c7207ee7 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StStorageLocationVO.java @@ -0,0 +1,25 @@ +package org.springblade.wms.pojo.vo; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.wms.pojo.entity.StStorageLocation; + +import java.io.Serial; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName StStorageLocationVO + * @description: 库位维护表 视图实体类 + * @autor: WuSiYu + * @create 2025-12-18 14:36 + **/ + +@Data +@EqualsAndHashCode(callSuper = true) +public class StStorageLocationVO extends StStorageLocation { + @Serial + private static final long serialVersionUID = 1L; + +} + diff --git a/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StStoreBillVO.java b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StStoreBillVO.java new file mode 100644 index 00000000..4331bb08 --- /dev/null +++ b/blade-service-api/blade-wms-api/src/main/java/org/springblade/wms/pojo/vo/StStoreBillVO.java @@ -0,0 +1,25 @@ +package org.springblade.wms.pojo.vo; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.wms.pojo.entity.StStoreBill; + +import java.io.Serial; + +/** + * @version 1.0 + * @program: jonhon-mes-svr + * @ClassName StStoreBillVO + * @description: 仓库凭证 视图实体类 + * @autor: WuSiYu + * @create 2026-01-15 13:24 + **/ + +@Data +@EqualsAndHashCode(callSuper = true) +public class StStoreBillVO extends StStoreBill { + @Serial + private static final long serialVersionUID = 1L; + +} + diff --git a/blade-service/blade-wms/src/main/java/org/springblade/wms/controller/StRealtimeStockController.java b/blade-service/blade-wms/src/main/java/org/springblade/wms/controller/StRealtimeStockController.java index 98ca023d..8aac619e 100644 --- a/blade-service/blade-wms/src/main/java/org/springblade/wms/controller/StRealtimeStockController.java +++ b/blade-service/blade-wms/src/main/java/org/springblade/wms/controller/StRealtimeStockController.java @@ -112,7 +112,7 @@ public class StRealtimeStockController extends BladeController { public R> pageToolsData(StRealtimeStockVO stRealtimeStock, Query query) { if (StrUtil.isBlank(query.getAscs()) && StrUtil.isBlank(query.getDescs())) { - query.setDescs("sumNum"); // 默认按sumNum降序排序 + query.setDescs("sum_num"); // 默认按sumNum降序排序 } IPage pages = stRealtimeStockService.selectToolsStockPage(Condition.getPage(query), stRealtimeStock); diff --git a/blade-service/blade-wms/src/main/java/org/springblade/wms/feign/StRealtimeStockClientImpl.java b/blade-service/blade-wms/src/main/java/org/springblade/wms/feign/StRealtimeStockClientImpl.java new file mode 100644 index 00000000..4f7559ea --- /dev/null +++ b/blade-service/blade-wms/src/main/java/org/springblade/wms/feign/StRealtimeStockClientImpl.java @@ -0,0 +1,54 @@ +package org.springblade.wms.feign; + + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Hidden; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +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.api.R; +import org.springblade.wms.pojo.vo.StRealtimeStockVO; +import org.springblade.wms.service.IStRealtimeStockService; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Date; + + +/** + * 字典服务Feign实现类 + * + * @author Chill + */ +@NonDS +@Hidden +@RestController +@AllArgsConstructor +@Slf4j +public class StRealtimeStockClientImpl implements StRealtimeStockClient { + + private final IStRealtimeStockService stRealtimeStockService; + + + @Override + public R> getMeasuringTools(StRealtimeStockVO stRealtimeStock, Query query) { + if (StrUtil.isBlank(query.getAscs()) && StrUtil.isBlank(query.getDescs())) { + query.setDescs("sum_num"); // 默认按sumNum降序排序 + } + IPage iPages = stRealtimeStockService.selectToolsStockPage(Condition.getPage(query), stRealtimeStock); + Page pages = new Page<>(); + + // 复制分页属性 + pages.setRecords(iPages.getRecords()); + pages.setTotal(iPages.getTotal()); + pages.setCurrent(iPages.getCurrent()); + pages.setSize(iPages.getSize()); + pages.setPages(iPages.getPages()); + + return R.data(pages); + } + +} diff --git a/doc/sql/mes/increase-20160124.sql b/doc/sql/mes/increase-20160124.sql new file mode 100644 index 00000000..907d71b5 --- /dev/null +++ b/doc/sql/mes/increase-20160124.sql @@ -0,0 +1,5 @@ +--修改字段类型长度 +ALTER TABLE MES_MEASURING_UPKEEP + MODIFY (MI_ID NUMBER (20,0)) + MODIFY (CREATE_MAN NUMBER (20,0)) + MODIFY (RLS_ID NUMBER (20,0)); \ No newline at end of file