From 693029ad41c10f781f2a020d49f14a1b90bc7c5c Mon Sep 17 00:00:00 2001 From: "maxw@mesnac.com" Date: Fri, 17 Jan 2025 19:51:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=88=90=E5=93=81=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E9=A1=B5=E9=9D=A2=E5=8F=8A=E4=B8=8B=E9=92=BB=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WmsPsmInStockController.java | 117 +++++++++++++++ .../WmsPsmInStockDetailController.java | 117 +++++++++++++++ .../org/dromara/wms/domain/WmsPsmInStock.java | 100 +++++++++++++ .../wms/domain/WmsPsmInStockDetail.java | 79 ++++++++++ .../wms/domain/bo/WmsPsmInStockBo.java | 87 +++++++++++ .../wms/domain/bo/WmsPsmInStockDetailBo.java | 65 ++++++++ .../wms/domain/vo/WmsPsmInStockDetailVo.java | 95 ++++++++++++ .../wms/domain/vo/WmsPsmInStockVo.java | 119 +++++++++++++++ .../wms/mapper/WmsPsmInStockDetailMapper.java | 15 ++ .../wms/mapper/WmsPsmInStockMapper.java | 15 ++ .../service/IWmsPsmInStockDetailService.java | 68 +++++++++ .../wms/service/IWmsPsmInStockService.java | 68 +++++++++ .../impl/WmsPsmInStockDetailServiceImpl.java | 137 +++++++++++++++++ .../impl/WmsPsmInStockServiceImpl.java | 141 ++++++++++++++++++ .../mapper/wms/WmsPsmInStockMapper.xml | 7 + 15 files changed, 1230 insertions(+) create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsPsmInStockController.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsPsmInStockDetailController.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsPsmInStock.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsPsmInStockDetail.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsPsmInStockBo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsPsmInStockDetailBo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsPsmInStockDetailVo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsPsmInStockVo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsPsmInStockDetailMapper.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsPsmInStockMapper.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsPsmInStockDetailService.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsPsmInStockService.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsPsmInStockDetailServiceImpl.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsPsmInStockServiceImpl.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsPsmInStockMapper.xml diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsPsmInStockController.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsPsmInStockController.java new file mode 100644 index 00000000..cfc935aa --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsPsmInStockController.java @@ -0,0 +1,117 @@ +package org.dromara.wms.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.dromara.wms.domain.bo.WmsPsmInStockBo; +import org.dromara.wms.domain.vo.WmsPsmInStockVo; +import org.dromara.wms.service.IWmsPsmInStockService; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 成品入库记录 + * 前端访问路由地址为:/system/psmInStock + * + * @author LionLi + * @date 2025-01-15 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/psmInStock") +public class WmsPsmInStockController extends BaseController { + + private final IWmsPsmInStockService wmsPsmInStockService; + + /** + * 查询成品入库记录列表 + */ + @SaCheckPermission("system:psmInStock:list") + @GetMapping("/list") + public TableDataInfo list(WmsPsmInStockBo bo, PageQuery pageQuery) { + return wmsPsmInStockService.queryPageList(bo, pageQuery); + } + + /** + * 导出成品入库记录列表 + */ + @SaCheckPermission("system:psmInStock:export") + @Log(title = "成品入库记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(WmsPsmInStockBo bo, HttpServletResponse response) { + List list = wmsPsmInStockService.queryList(bo); + ExcelUtil.exportExcel(list, "成品入库记录", WmsPsmInStockVo.class, response); + } + + /** + * 获取成品入库记录详细信息 + * + * @param inStockId 主键 + */ + @SaCheckPermission("system:psmInStock:query") + @GetMapping("/{inStockId}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long inStockId) { + return R.ok(wmsPsmInStockService.queryById(inStockId)); + } + + /** + * 新增成品入库记录 + */ + @SaCheckPermission("system:psmInStock:add") + @Log(title = "成品入库记录", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody WmsPsmInStockBo bo) { + return toAjax(wmsPsmInStockService.insertByBo(bo)); + } + + /** + * 修改成品入库记录 + */ + @SaCheckPermission("system:psmInStock:edit") + @Log(title = "成品入库记录", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody WmsPsmInStockBo bo) { + return toAjax(wmsPsmInStockService.updateByBo(bo)); + } + + /** + * 删除成品入库记录 + * + * @param inStockIds 主键串 + */ + @SaCheckPermission("system:psmInStock:remove") + @Log(title = "成品入库记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{inStockIds}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] inStockIds) { + return toAjax(wmsPsmInStockService.deleteWithValidByIds(List.of(inStockIds), true)); + } + + + /** + * 下拉框查询成品入库记录列表 + */ + + @GetMapping("getWmsPsmInStockList") + public R> getWmsPsmInStocklist(WmsPsmInStockBo bo) { + List list = wmsPsmInStockService.queryList(bo); + return R.ok(list); + } +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsPsmInStockDetailController.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsPsmInStockDetailController.java new file mode 100644 index 00000000..cbefd8ea --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsPsmInStockDetailController.java @@ -0,0 +1,117 @@ +package org.dromara.wms.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.dromara.wms.domain.bo.WmsPsmInStockDetailBo; +import org.dromara.wms.domain.vo.WmsPsmInStockDetailVo; +import org.dromara.wms.service.IWmsPsmInStockDetailService; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 成品入库 + * 前端访问路由地址为:/system/psmInStockDetail + * + * @author LionLi + * @date 2025-01-15 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/psmInStockDetail") +public class WmsPsmInStockDetailController extends BaseController { + + private final IWmsPsmInStockDetailService wmsPsmInStockDetailService; + + /** + * 查询成品入库列表 + */ + @SaCheckPermission("system:psmInStockDetail:list") + @GetMapping("/list") + public TableDataInfo list(WmsPsmInStockDetailBo bo, PageQuery pageQuery) { + return wmsPsmInStockDetailService.queryPageList(bo, pageQuery); + } + + /** + * 导出成品入库列表 + */ + @SaCheckPermission("system:psmInStockDetail:export") + @Log(title = "成品入库", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(WmsPsmInStockDetailBo bo, HttpServletResponse response) { + List list = wmsPsmInStockDetailService.queryList(bo); + ExcelUtil.exportExcel(list, "成品入库", WmsPsmInStockDetailVo.class, response); + } + + /** + * 获取成品入库详细信息 + * + * @param objid 主键 + */ + @SaCheckPermission("system:psmInStockDetail:query") + @GetMapping("/{objid}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long objid) { + return R.ok(wmsPsmInStockDetailService.queryById(objid)); + } + + /** + * 新增成品入库 + */ + @SaCheckPermission("system:psmInStockDetail:add") + @Log(title = "成品入库", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@RequestBody WmsPsmInStockDetailBo bo) { + return toAjax(wmsPsmInStockDetailService.insertByBo(bo)); + } + + /** + * 修改成品入库 + */ + @SaCheckPermission("system:psmInStockDetail:edit") + @Log(title = "成品入库", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@RequestBody WmsPsmInStockDetailBo bo) { + return toAjax(wmsPsmInStockDetailService.updateByBo(bo)); + } + + /** + * 删除成品入库 + * + * @param objids 主键串 + */ + @SaCheckPermission("system:psmInStockDetail:remove") + @Log(title = "成品入库", businessType = BusinessType.DELETE) + @DeleteMapping("/{objids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] objids) { + return toAjax(wmsPsmInStockDetailService.deleteWithValidByIds(List.of(objids), true)); + } + + + /** + * 下拉框查询成品入库列表 + */ + + @GetMapping("getWmsPsmInStockDetailList") + public R> getWmsPsmInStockDetaillist(WmsPsmInStockDetailBo bo) { + List list = wmsPsmInStockDetailService.queryList(bo); + return R.ok(list); + } +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsPsmInStock.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsPsmInStock.java new file mode 100644 index 00000000..0906a234 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsPsmInStock.java @@ -0,0 +1,100 @@ +package org.dromara.wms.domain; + +import org.dromara.common.tenant.core.TenantEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serial; +import java.util.Date; + +/** + * 成品入库记录对象 wms_psm_in_stock + * + * @author LionLi + * @date 2025-01-15 + */ +@Data +@TableName("wms_psm_in_stock") +public class WmsPsmInStock{ + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 表主键 + */ + private Long inStockId; + + /** + * 入库班组 + */ + private String inClass; + + /** + * 入库班次 + */ + private String inShift; + + /** + * 入库数量 + */ + private Long inAmount; + + /** + * 仓库名称 + */ + private String storeName; + + /** + * 库位条码 + */ + private String storePlaceCode; + + /** + * 工装条码 + */ + private String toolingBarcode; + + /** + * 物料ID + */ + private Long materialId; + + /** + * 轮胎规格 + */ + private String materialSpe; + + /** + * 品级编号 + */ + private String checkGradeCode; + /** + * 租户id + */ + private String tenantId; + @TableField(fill = FieldFill.INSERT) + private String createBy; + + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + private Date createTime; + + /** + * 更新者 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private String updateBy; + + /** + * 更新时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date updateTime; + + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsPsmInStockDetail.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsPsmInStockDetail.java new file mode 100644 index 00000000..e41f4ac7 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsPsmInStockDetail.java @@ -0,0 +1,79 @@ +package org.dromara.wms.domain; + +import org.dromara.common.tenant.core.TenantEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serial; +import java.util.Date; + +/** + * 成品入库对象 wms_psm_in_stock_detail + * + * @author LionLi + * @date 2025-01-15 + */ +@Data +@TableName("wms_psm_in_stock_detail") +public class WmsPsmInStockDetail{ + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private Long objid; + + /** + * 外键关联in_load表主键id + */ + private Long inStockId; + + /** + * 物料id + */ + private Long materialId; + + /** + * 物料规格 + */ + private String materialSpe; + + /** + * 硫化条码 + */ + private String tyreNo; + + /** + * 品级编号 + */ + private String checkGradeCode; + /** + * 租户id + */ + private String tenantId; + @TableField(fill = FieldFill.INSERT) + private String createBy; + + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + private Date createTime; + + /** + * 更新者 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private String updateBy; + + /** + * 更新时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date updateTime; + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsPsmInStockBo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsPsmInStockBo.java new file mode 100644 index 00000000..000bdedf --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsPsmInStockBo.java @@ -0,0 +1,87 @@ +package org.dromara.wms.domain.bo; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import org.dromara.wms.domain.WmsPsmInStock; + +/** + * 成品入库记录业务对象 wms_psm_in_stock + * + * @author LionLi + * @date 2025-01-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = WmsPsmInStock.class, reverseConvertGenerate = false) +public class WmsPsmInStockBo extends BaseEntity { + + /** + * 表主键 + */ + @NotNull(message = "表主键不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long inStockId; + + /** + * 入库班组 + */ + @NotBlank(message = "入库班组不能为空", groups = { AddGroup.class, EditGroup.class }) + private String inClass; + + /** + * 入库班次 + */ + @NotBlank(message = "入库班次不能为空", groups = { AddGroup.class, EditGroup.class }) + private String inShift; + + /** + * 入库数量 + */ + @NotNull(message = "入库数量不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long inAmount; + + /** + * 仓库名称 + */ + @NotBlank(message = "仓库名称不能为空", groups = { AddGroup.class, EditGroup.class }) + private String storeName; + + /** + * 库位条码 + */ + @NotBlank(message = "库位条码不能为空", groups = { AddGroup.class, EditGroup.class }) + private String storePlaceCode; + + /** + * 工装条码 + */ + @NotBlank(message = "工装条码不能为空", groups = { AddGroup.class, EditGroup.class }) + private String toolingBarcode; + + /** + * 物料ID + */ + @NotNull(message = "物料ID不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long materialId; + + /** + * 轮胎规格 + */ + @NotBlank(message = "轮胎规格不能为空", groups = { AddGroup.class, EditGroup.class }) + private String materialSpe; + + /** + * 品级编号 + */ + @NotBlank(message = "品级编号不能为空", groups = { AddGroup.class, EditGroup.class }) + private String checkGradeCode; + /** + * 租户id + */ + private String tenantId; + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsPsmInStockDetailBo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsPsmInStockDetailBo.java new file mode 100644 index 00000000..d7a43467 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsPsmInStockDetailBo.java @@ -0,0 +1,65 @@ +package org.dromara.wms.domain.bo; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import org.dromara.wms.domain.WmsPsmInStockDetail; + +/** + * 成品入库业务对象 wms_psm_in_stock_detail + * + * @author LionLi + * @date 2025-01-15 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = WmsPsmInStockDetail.class, reverseConvertGenerate = false) +public class WmsPsmInStockDetailBo extends BaseEntity { + + /** + * 主键 + */ + @NotNull(message = "主键不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long objid; + + /** + * 外键关联in_load表主键id + */ + @NotNull(message = "外键关联in_load表主键id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long inStockId; + + /** + * 物料id + */ + @NotNull(message = "物料id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long materialId; + + /** + * 物料规格 + */ + @NotBlank(message = "物料规格不能为空", groups = { AddGroup.class, EditGroup.class }) + private String materialSpe; + + /** + * 硫化条码 + */ + @NotBlank(message = "硫化条码不能为空", groups = { AddGroup.class, EditGroup.class }) + private String tyreNo; + + /** + * 品级编号 + */ + @NotBlank(message = "品级编号不能为空", groups = { AddGroup.class, EditGroup.class }) + private String checkGradeCode; + + /** + * 租户id + */ + private String tenantId; + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsPsmInStockDetailVo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsPsmInStockDetailVo.java new file mode 100644 index 00000000..c9c61110 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsPsmInStockDetailVo.java @@ -0,0 +1,95 @@ +package org.dromara.wms.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.wms.domain.WmsPsmInStockDetail; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 成品入库视图对象 wms_psm_in_stock_detail + * + * @author LionLi + * @date 2025-01-15 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = WmsPsmInStockDetail.class) +public class WmsPsmInStockDetailVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @ExcelProperty(value = "主键") + private Long objid; + + /** + * 外键关联in_load表主键id + */ + @ExcelProperty(value = "外键关联in_load表主键id") + private Long inStockId; + + /** + * 物料id + */ + @ExcelProperty(value = "物料id") + private Long materialId; + + /** + * 物料规格 + */ + @ExcelProperty(value = "物料规格") + private String materialSpe; + + /** + * 硫化条码 + */ + @ExcelProperty(value = "硫化条码") + private String tyreNo; + + /** + * 品级编号 + */ + @ExcelProperty(value = "品级编号") + private String checkGradeCode; + + /** + * 租户id + */ + private String tenantId; + @TableField(fill = FieldFill.INSERT) + private String createBy; + + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + private Date createTime; + + /** + * 更新者 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private String updateBy; + + /** + * 更新时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date updateTime; + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsPsmInStockVo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsPsmInStockVo.java new file mode 100644 index 00000000..f26aba65 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsPsmInStockVo.java @@ -0,0 +1,119 @@ +package org.dromara.wms.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.dromara.wms.domain.WmsPsmInStock; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 成品入库记录视图对象 wms_psm_in_stock + * + * @author LionLi + * @date 2025-01-15 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = WmsPsmInStock.class) +public class WmsPsmInStockVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 表主键 + */ + @ExcelProperty(value = "表主键") + private Long inStockId; + + /** + * 入库班组 + */ + @ExcelProperty(value = "入库班组") + private String inClass; + + /** + * 入库班次 + */ + @ExcelProperty(value = "入库班次") + private String inShift; + + /** + * 入库数量 + */ + @ExcelProperty(value = "入库数量") + private Long inAmount; + + /** + * 仓库名称 + */ + @ExcelProperty(value = "仓库名称") + private String storeName; + + /** + * 库位条码 + */ + @ExcelProperty(value = "库位条码") + private String storePlaceCode; + + /** + * 工装条码 + */ + @ExcelProperty(value = "工装条码") + private String toolingBarcode; + + /** + * 物料ID + */ + @ExcelProperty(value = "物料ID") + private Long materialId; + + /** + * 轮胎规格 + */ + @ExcelProperty(value = "轮胎规格") + private String materialSpe; + + /** + * 品级编号 + */ + @ExcelProperty(value = "品级编号") + private String checkGradeCode; + /** + * 租户id + */ + private String tenantId; + @TableField(fill = FieldFill.INSERT) + private String createBy; + + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + private Date createTime; + + /** + * 更新者 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private String updateBy; + + /** + * 更新时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date updateTime; + + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsPsmInStockDetailMapper.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsPsmInStockDetailMapper.java new file mode 100644 index 00000000..eba058c9 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsPsmInStockDetailMapper.java @@ -0,0 +1,15 @@ +package org.dromara.wms.mapper; + +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; +import org.dromara.wms.domain.WmsPsmInStockDetail; +import org.dromara.wms.domain.vo.WmsPsmInStockDetailVo; + +/** + * 成品入库Mapper接口 + * + * @author LionLi + * @date 2025-01-15 + */ +public interface WmsPsmInStockDetailMapper extends BaseMapperPlus { + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsPsmInStockMapper.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsPsmInStockMapper.java new file mode 100644 index 00000000..09ed0c5d --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsPsmInStockMapper.java @@ -0,0 +1,15 @@ +package org.dromara.wms.mapper; + +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; +import org.dromara.wms.domain.WmsPsmInStock; +import org.dromara.wms.domain.vo.WmsPsmInStockVo; + +/** + * 成品入库记录Mapper接口 + * + * @author LionLi + * @date 2025-01-15 + */ +public interface WmsPsmInStockMapper extends BaseMapperPlus { + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsPsmInStockDetailService.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsPsmInStockDetailService.java new file mode 100644 index 00000000..4ac903a2 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsPsmInStockDetailService.java @@ -0,0 +1,68 @@ +package org.dromara.wms.service; + +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.wms.domain.bo.WmsPsmInStockDetailBo; +import org.dromara.wms.domain.vo.WmsPsmInStockDetailVo; + +import java.util.Collection; +import java.util.List; + +/** + * 成品入库Service接口 + * + * @author LionLi + * @date 2025-01-15 + */ +public interface IWmsPsmInStockDetailService { + + /** + * 查询成品入库 + * + * @param objid 主键 + * @return 成品入库 + */ + WmsPsmInStockDetailVo queryById(Long objid); + + /** + * 分页查询成品入库列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 成品入库分页列表 + */ + TableDataInfo queryPageList(WmsPsmInStockDetailBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的成品入库列表 + * + * @param bo 查询条件 + * @return 成品入库列表 + */ + List queryList(WmsPsmInStockDetailBo bo); + + /** + * 新增成品入库 + * + * @param bo 成品入库 + * @return 是否新增成功 + */ + Boolean insertByBo(WmsPsmInStockDetailBo bo); + + /** + * 修改成品入库 + * + * @param bo 成品入库 + * @return 是否修改成功 + */ + Boolean updateByBo(WmsPsmInStockDetailBo bo); + + /** + * 校验并批量删除成品入库信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsPsmInStockService.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsPsmInStockService.java new file mode 100644 index 00000000..70743db2 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsPsmInStockService.java @@ -0,0 +1,68 @@ +package org.dromara.wms.service; + +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.wms.domain.bo.WmsPsmInStockBo; +import org.dromara.wms.domain.vo.WmsPsmInStockVo; + +import java.util.Collection; +import java.util.List; + +/** + * 成品入库记录Service接口 + * + * @author LionLi + * @date 2025-01-15 + */ +public interface IWmsPsmInStockService { + + /** + * 查询成品入库记录 + * + * @param inStockId 主键 + * @return 成品入库记录 + */ + WmsPsmInStockVo queryById(Long inStockId); + + /** + * 分页查询成品入库记录列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 成品入库记录分页列表 + */ + TableDataInfo queryPageList(WmsPsmInStockBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的成品入库记录列表 + * + * @param bo 查询条件 + * @return 成品入库记录列表 + */ + List queryList(WmsPsmInStockBo bo); + + /** + * 新增成品入库记录 + * + * @param bo 成品入库记录 + * @return 是否新增成功 + */ + Boolean insertByBo(WmsPsmInStockBo bo); + + /** + * 修改成品入库记录 + * + * @param bo 成品入库记录 + * @return 是否修改成功 + */ + Boolean updateByBo(WmsPsmInStockBo bo); + + /** + * 校验并批量删除成品入库记录信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsPsmInStockDetailServiceImpl.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsPsmInStockDetailServiceImpl.java new file mode 100644 index 00000000..1d7a1050 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsPsmInStockDetailServiceImpl.java @@ -0,0 +1,137 @@ +package org.dromara.wms.service.impl; + +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.yulichang.toolkit.JoinWrappers; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.dromara.wms.domain.WmsPsmInStockDetail; +import org.dromara.wms.domain.bo.WmsPsmInStockDetailBo; +import org.dromara.wms.domain.vo.WmsPsmInStockDetailVo; +import org.dromara.wms.mapper.WmsPsmInStockDetailMapper; +import org.dromara.wms.service.IWmsPsmInStockDetailService; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 成品入库Service业务层处理 + * + * @author LionLi + * @date 2025-01-15 + */ +@RequiredArgsConstructor +@Service +public class WmsPsmInStockDetailServiceImpl implements IWmsPsmInStockDetailService { + + private final WmsPsmInStockDetailMapper baseMapper; + + /** + * 查询成品入库 + * + * @param objid 主键 + * @return 成品入库 + */ + @Override + public WmsPsmInStockDetailVo queryById(Long objid){ + return baseMapper.selectVoById(objid); + } + + /** + * 分页查询成品入库列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 成品入库分页列表 + */ + @Override + public TableDataInfo queryPageList(WmsPsmInStockDetailBo bo, PageQuery pageQuery) { + MPJLambdaWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的成品入库列表 + * + * @param bo 查询条件 + * @return 成品入库列表 + */ + @Override + public List queryList(WmsPsmInStockDetailBo bo) { + MPJLambdaWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private MPJLambdaWrapper buildQueryWrapper(WmsPsmInStockDetailBo bo) { + Map params = bo.getParams(); + MPJLambdaWrapper lqw = JoinWrappers.lambda(WmsPsmInStockDetail.class) + .selectAll(WmsPsmInStockDetail.class) + .eq(bo.getObjid() != null, WmsPsmInStockDetail::getObjid, bo.getObjid()) + .eq(bo.getInStockId() != null, WmsPsmInStockDetail::getInStockId, bo.getInStockId()) + .eq(bo.getMaterialId() != null, WmsPsmInStockDetail::getMaterialId, bo.getMaterialId()) + .eq(StringUtils.isNotBlank(bo.getMaterialSpe()), WmsPsmInStockDetail::getMaterialSpe, bo.getMaterialSpe()) + .eq(StringUtils.isNotBlank(bo.getTyreNo()), WmsPsmInStockDetail::getTyreNo, bo.getTyreNo()) + .eq(StringUtils.isNotBlank(bo.getCheckGradeCode()), WmsPsmInStockDetail::getCheckGradeCode, bo.getCheckGradeCode()) + .orderByDesc(WmsPsmInStockDetail::getCreateTime); + return lqw; + } + + /** + * 新增成品入库 + * + * @param bo 成品入库 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(WmsPsmInStockDetailBo bo) { + WmsPsmInStockDetail add = MapstructUtils.convert(bo, WmsPsmInStockDetail.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setObjid(add.getObjid()); + } + return flag; + } + + /** + * 修改成品入库 + * + * @param bo 成品入库 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(WmsPsmInStockDetailBo bo) { + WmsPsmInStockDetail update = MapstructUtils.convert(bo, WmsPsmInStockDetail.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(WmsPsmInStockDetail entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除成品入库信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsPsmInStockServiceImpl.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsPsmInStockServiceImpl.java new file mode 100644 index 00000000..ca64c323 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsPsmInStockServiceImpl.java @@ -0,0 +1,141 @@ +package org.dromara.wms.service.impl; + +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.yulichang.toolkit.JoinWrappers; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.dromara.wms.domain.WmsPsmInStock; +import org.dromara.wms.domain.bo.WmsPsmInStockBo; +import org.dromara.wms.domain.vo.WmsPsmInStockVo; +import org.dromara.wms.mapper.WmsPsmInStockMapper; +import org.dromara.wms.service.IWmsPsmInStockService; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 成品入库记录Service业务层处理 + * + * @author LionLi + * @date 2025-01-15 + */ +@RequiredArgsConstructor +@Service +public class WmsPsmInStockServiceImpl implements IWmsPsmInStockService { + + private final WmsPsmInStockMapper baseMapper; + + /** + * 查询成品入库记录 + * + * @param inStockId 主键 + * @return 成品入库记录 + */ + @Override + public WmsPsmInStockVo queryById(Long inStockId){ + return baseMapper.selectVoById(inStockId); + } + + /** + * 分页查询成品入库记录列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 成品入库记录分页列表 + */ + @Override + public TableDataInfo queryPageList(WmsPsmInStockBo bo, PageQuery pageQuery) { + MPJLambdaWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的成品入库记录列表 + * + * @param bo 查询条件 + * @return 成品入库记录列表 + */ + @Override + public List queryList(WmsPsmInStockBo bo) { + MPJLambdaWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private MPJLambdaWrapper buildQueryWrapper(WmsPsmInStockBo bo) { + Map params = bo.getParams(); + MPJLambdaWrapper lqw = JoinWrappers.lambda(WmsPsmInStock.class) + .selectAll(WmsPsmInStock.class) + .eq(bo.getInStockId() != null, WmsPsmInStock::getInStockId, bo.getInStockId()) + .eq(StringUtils.isNotBlank(bo.getInClass()), WmsPsmInStock::getInClass, bo.getInClass()) + .eq(StringUtils.isNotBlank(bo.getInShift()), WmsPsmInStock::getInShift, bo.getInShift()) + .eq(bo.getInAmount() != null, WmsPsmInStock::getInAmount, bo.getInAmount()) + .like(StringUtils.isNotBlank(bo.getStoreName()), WmsPsmInStock::getStoreName, bo.getStoreName()) + .eq(StringUtils.isNotBlank(bo.getStorePlaceCode()), WmsPsmInStock::getStorePlaceCode, bo.getStorePlaceCode()) + .eq(StringUtils.isNotBlank(bo.getToolingBarcode()), WmsPsmInStock::getToolingBarcode, bo.getToolingBarcode()) + .eq(bo.getMaterialId() != null, WmsPsmInStock::getMaterialId, bo.getMaterialId()) + .eq(StringUtils.isNotBlank(bo.getMaterialSpe()), WmsPsmInStock::getMaterialSpe, bo.getMaterialSpe()) + .eq(StringUtils.isNotBlank(bo.getCheckGradeCode()), WmsPsmInStock::getCheckGradeCode, bo.getCheckGradeCode()) + .orderByDesc(WmsPsmInStock::getCreateTime); + return lqw; + } + + /** + * 新增成品入库记录 + * + * @param bo 成品入库记录 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(WmsPsmInStockBo bo) { + WmsPsmInStock add = MapstructUtils.convert(bo, WmsPsmInStock.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setInStockId(add.getInStockId()); + } + return flag; + } + + /** + * 修改成品入库记录 + * + * @param bo 成品入库记录 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(WmsPsmInStockBo bo) { + WmsPsmInStock update = MapstructUtils.convert(bo, WmsPsmInStock.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(WmsPsmInStock entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除成品入库记录信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsPsmInStockMapper.xml b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsPsmInStockMapper.xml new file mode 100644 index 00000000..1afb5e30 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsPsmInStockMapper.xml @@ -0,0 +1,7 @@ + + + + +