From 6de83a8c98fd7f0e787b7a858a7520655a37ceea Mon Sep 17 00:00:00 2001 From: wanghao Date: Wed, 8 Jan 2025 20:36:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WmsBaseLocationController.java | 117 +++++++++++++++ .../WmsBaseWarehouseController.java | 118 +++++++++++++++ .../WmsInstockRecordController.java | 106 +++++++++++++ .../wms/domain/ProdBaseWorkshopInfo1.java | 61 ++++++++ .../dromara/wms/domain/WmsBaseLocation.java | 61 ++++++++ .../dromara/wms/domain/WmsBaseWarehouse.java | 62 ++++++++ .../dromara/wms/domain/WmsDeliveryNote.java | 1 + .../dromara/wms/domain/WmsInstockRecord.java | 91 +++++++++++ .../wms/domain/bo/WmsBaseLocationBo.java | 49 ++++++ .../wms/domain/bo/WmsBaseWarehouseBo.java | 66 ++++++++ .../wms/domain/bo/WmsDeliveryNoteBo.java | 12 +- .../wms/domain/bo/WmsInstockRecordBo.java | 81 ++++++++++ .../wms/domain/vo/ProdBaseWorkshopInfoVo.java | 107 +++++++++++++ .../wms/domain/vo/WmsBaseLocationVo.java | 85 +++++++++++ .../wms/domain/vo/WmsBaseWarehouseVo.java | 100 ++++++++++++ .../wms/domain/vo/WmsInstockRecordVo.java | 117 +++++++++++++++ .../mapper/ProdBaseWorkshopInfoMapper.java | 17 +++ .../wms/mapper/WmsBaseLocationMapper.java | 15 ++ .../wms/mapper/WmsBaseWarehouseMapper.java | 15 ++ .../wms/mapper/WmsInstockRecordMapper.java | 16 ++ .../wms/service/IWmsBaseLocationService.java | 69 +++++++++ .../wms/service/IWmsBaseWarehouseService.java | 69 +++++++++ .../wms/service/IWmsInstockRecordService.java | 69 +++++++++ .../impl/WmsBaseLocationServiceImpl.java | 139 +++++++++++++++++ .../impl/WmsBaseWarehouseServiceImpl.java | 142 ++++++++++++++++++ .../impl/WmsDeliveryNoteServiceImpl.java | 9 +- .../impl/WmsInstockRecordServiceImpl.java | 142 ++++++++++++++++++ .../mapper/wms/ProdBaseWorkshopInfoMapper.xml | 7 + .../mapper/wms/WmsBaseLocationMapper.xml | 7 + .../mapper/wms/WmsBaseWarehouseMapper.xml | 7 + .../mapper/wms/WmsInstockRecordMapper.xml | 7 + 31 files changed, 1959 insertions(+), 5 deletions(-) create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsBaseLocationController.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsBaseWarehouseController.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsInstockRecordController.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/ProdBaseWorkshopInfo1.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsBaseLocation.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsBaseWarehouse.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsInstockRecord.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsBaseLocationBo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsBaseWarehouseBo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsInstockRecordBo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/ProdBaseWorkshopInfoVo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsBaseLocationVo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsBaseWarehouseVo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsInstockRecordVo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/ProdBaseWorkshopInfoMapper.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsBaseLocationMapper.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsBaseWarehouseMapper.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsInstockRecordMapper.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsBaseLocationService.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsBaseWarehouseService.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsInstockRecordService.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsBaseLocationServiceImpl.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsBaseWarehouseServiceImpl.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsInstockRecordServiceImpl.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/ProdBaseWorkshopInfoMapper.xml create mode 100644 ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsBaseLocationMapper.xml create mode 100644 ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsBaseWarehouseMapper.xml create mode 100644 ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsInstockRecordMapper.xml diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsBaseLocationController.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsBaseLocationController.java new file mode 100644 index 00000000..62412e40 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsBaseLocationController.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.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.wms.domain.vo.WmsBaseLocationVo; +import org.dromara.wms.domain.bo.WmsBaseLocationBo; +import org.dromara.wms.service.IWmsBaseLocationService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 库位基础信息 + * 前端访问路由地址为:/wms/baseLocation + * + * @author Yinq + * @date 2025-01-08 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/baseLocation") +public class WmsBaseLocationController extends BaseController { + + private final IWmsBaseLocationService wmsBaseLocationService; + + /** + * 查询库位基础信息列表 + */ + @SaCheckPermission("wms:baseLocation:list") + @GetMapping("/list") + public TableDataInfo list(WmsBaseLocationBo bo, PageQuery pageQuery) { + return wmsBaseLocationService.queryPageList(bo, pageQuery); + } + + /** + * 导出库位基础信息列表 + */ + @SaCheckPermission("wms:baseLocation:export") + @Log(title = "库位基础信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(WmsBaseLocationBo bo, HttpServletResponse response) { + List list = wmsBaseLocationService.queryList(bo); + ExcelUtil.exportExcel(list, "库位基础信息", WmsBaseLocationVo.class, response); + } + + /** + * 获取库位基础信息详细信息 + * + * @param locationId 主键 + */ + @SaCheckPermission("wms:baseLocation:query") + @GetMapping("/{locationId}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long locationId) { + return R.ok(wmsBaseLocationService.queryById(locationId)); + } + + /** + * 新增库位基础信息 + */ + @SaCheckPermission("wms:baseLocation:add") + @Log(title = "库位基础信息", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody WmsBaseLocationBo bo) { + return toAjax(wmsBaseLocationService.insertByBo(bo)); + } + + /** + * 修改库位基础信息 + */ + @SaCheckPermission("wms:baseLocation:edit") + @Log(title = "库位基础信息", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody WmsBaseLocationBo bo) { + return toAjax(wmsBaseLocationService.updateByBo(bo)); + } + + /** + * 删除库位基础信息 + * + * @param locationIds 主键串 + */ + @SaCheckPermission("wms:baseLocation:remove") + @Log(title = "库位基础信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{locationIds}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] locationIds) { + return toAjax(wmsBaseLocationService.deleteWithValidByIds(List.of(locationIds), true)); + } + + + /** + * 下拉框查询库位基础信息列表 + */ + + @GetMapping("getWmsBaseLocationList") + public R> getWmsBaseLocationlist(WmsBaseLocationBo bo) { + List list = wmsBaseLocationService.queryList(bo); + return R.ok(list); + } +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsBaseWarehouseController.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsBaseWarehouseController.java new file mode 100644 index 00000000..25d65987 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsBaseWarehouseController.java @@ -0,0 +1,118 @@ +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.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.wms.domain.vo.WmsBaseWarehouseVo; +import org.dromara.wms.domain.bo.WmsBaseWarehouseBo; +import org.dromara.wms.service.IWmsBaseWarehouseService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 仓库基础信息 + * 前端访问路由地址为:/wms/baseWarehouse + * + * @author Yinq + * @date 2025-01-07 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/baseWarehouse") +public class WmsBaseWarehouseController extends BaseController { + + private final IWmsBaseWarehouseService wmsBaseWarehouseService; + + /** + * 查询仓库基础信息列表 + */ + @SaCheckPermission("wms:baseWarehouse:list") + @GetMapping("/list") + public TableDataInfo list(WmsBaseWarehouseBo bo, PageQuery pageQuery) { + return wmsBaseWarehouseService.queryPageList(bo, pageQuery); + } + + /** + * 导出仓库基础信息列表 + */ + @SaCheckPermission("wms:baseWarehouse:export") + @Log(title = "仓库基础信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(WmsBaseWarehouseBo bo, HttpServletResponse response) { + List list = wmsBaseWarehouseService.queryList(bo); + // System.out.println(list.get(0).getWorkshopName()); + ExcelUtil.exportExcel(list, "仓库基础信息", WmsBaseWarehouseVo.class, response); + } + + /** + * 获取仓库基础信息详细信息 + * + * @param warehouseId 主键 + */ + @SaCheckPermission("wms:baseWarehouse:query") + @GetMapping("/{warehouseId}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long warehouseId) { + return R.ok(wmsBaseWarehouseService.queryById(warehouseId)); + } + + /** + * 新增仓库基础信息 + */ + @SaCheckPermission("wms:baseWarehouse:add") + @Log(title = "仓库基础信息", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody WmsBaseWarehouseBo bo) { + return toAjax(wmsBaseWarehouseService.insertByBo(bo)); + } + + /** + * 修改仓库基础信息 + */ + @SaCheckPermission("wms:baseWarehouse:edit") + @Log(title = "仓库基础信息", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody WmsBaseWarehouseBo bo) { + return toAjax(wmsBaseWarehouseService.updateByBo(bo)); + } + + /** + * 删除仓库基础信息 + * + * @param warehouseIds 主键串 + */ + @SaCheckPermission("wms:baseWarehouse:remove") + @Log(title = "仓库基础信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{warehouseIds}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] warehouseIds) { + return toAjax(wmsBaseWarehouseService.deleteWithValidByIds(List.of(warehouseIds), true)); + } + + + /** + * 下拉框查询仓库基础信息列表 + */ + + @GetMapping("getWmsBaseWarehouseList") + public R> getWmsBaseWarehouselist(WmsBaseWarehouseBo bo) { + List list = wmsBaseWarehouseService.queryList(bo); + return R.ok(list); + } +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsInstockRecordController.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsInstockRecordController.java new file mode 100644 index 00000000..5ad5b3a4 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsInstockRecordController.java @@ -0,0 +1,106 @@ +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.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.wms.domain.vo.WmsInstockRecordVo; +import org.dromara.wms.domain.bo.WmsInstockRecordBo; +import org.dromara.wms.service.IWmsInstockRecordService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 入库记录 + * 前端访问路由地址为:/wms/instockRecord + * + * @author Yinq + * @date 2025-01-07 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/instockRecord") +public class WmsInstockRecordController extends BaseController { + + private final IWmsInstockRecordService wmsInstockRecordService; + + /** + * 查询入库记录列表 + */ + @SaCheckPermission("wms:instockRecord:list") + @GetMapping("/list") + public TableDataInfo list(WmsInstockRecordBo bo, PageQuery pageQuery) { + return wmsInstockRecordService.queryPageList(bo, pageQuery); + } + + /** + * 导出入库记录列表 + */ + @SaCheckPermission("wms:instockRecord:export") + @Log(title = "入库记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(WmsInstockRecordBo bo, HttpServletResponse response) { + List list = wmsInstockRecordService.queryList(bo); + ExcelUtil.exportExcel(list, "入库记录", WmsInstockRecordVo.class, response); + } + + /** + * 获取入库记录详细信息 + * + * @param instockRecordId 主键 + */ + @SaCheckPermission("wms:instockRecord:query") + @GetMapping("/{instockRecordId}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long instockRecordId) { + return R.ok(wmsInstockRecordService.queryById(instockRecordId)); + } + + /** + * 新增入库记录 + */ + @SaCheckPermission("wms:instockRecord:add") + @Log(title = "入库记录", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody WmsInstockRecordBo bo) { + return toAjax(wmsInstockRecordService.insertByBo(bo)); + } + + /** + * 修改入库记录 + */ + @SaCheckPermission("wms:instockRecord:edit") + @Log(title = "入库记录", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody WmsInstockRecordBo bo) { + return toAjax(wmsInstockRecordService.updateByBo(bo)); + } + + /** + * 删除入库记录 + * + * @param instockRecordIds 主键串 + */ + @SaCheckPermission("wms:instockRecord:remove") + @Log(title = "入库记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{instockRecordIds}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] instockRecordIds) { + return toAjax(wmsInstockRecordService.deleteWithValidByIds(List.of(instockRecordIds), true)); + } +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/ProdBaseWorkshopInfo1.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/ProdBaseWorkshopInfo1.java new file mode 100644 index 00000000..ba11fb4a --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/ProdBaseWorkshopInfo1.java @@ -0,0 +1,61 @@ +package org.dromara.wms.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.common.tenant.core.TenantEntity; + +import java.io.Serial; + +/** + * 车间信息对象 prod_base_workshop_info + * + * @author Yinq + * @date 2025-01-02 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("prod_base_workshop_info") +public class ProdBaseWorkshopInfo1 extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 车间ID + */ + @TableId(value = "workshop_id", type = IdType.AUTO) + private Long workshopId; + + /** + * 车间编号 + */ + private String workshopCode; + + /** + * 车间名称 + */ + private String workshopName; + + /** + * 所属工厂 + */ + private Long factoryId; + + /** + * 激活标识(1是 0否) + */ + private String activeFlag; + + /** + * 备注 + */ + private String remark; + + @TableField(exist = false) + private String factoryName;//字段映射 + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsBaseLocation.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsBaseLocation.java new file mode 100644 index 00000000..e977df40 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsBaseLocation.java @@ -0,0 +1,61 @@ +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; + +/** + * 库位基础信息对象 wms_base_location + * + * @author Yinq + * @date 2025-01-08 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("wms_base_location") +public class WmsBaseLocation extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 表主键 + */ + @TableId(type = IdType.AUTO,value = "location_id") + private Long locationId; + + /** + * 所属仓库 + */ + private Long warehouseId; + + /** + * 库位编码 + */ + private String locationCode; + + /** + * 排 + */ + private Long lineNum; + + /** + * 层 + */ + private Long layerNum; + + /** + * 位 + */ + private Long locationNum; + @TableField(exist = false) + private String warehouseCode; + /** + * 仓库名称 + */ + @TableField(exist = false) + private String warehouseName; +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsBaseWarehouse.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsBaseWarehouse.java new file mode 100644 index 00000000..11594cea --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsBaseWarehouse.java @@ -0,0 +1,62 @@ +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; + +/** + * 仓库基础信息对象 wms_base_warehouse + * + * @author Yinq + * @date 2025-01-07 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("wms_base_warehouse") +public class WmsBaseWarehouse extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 表主键 + */ + @TableId(value = "warehouse_id", type = IdType.AUTO) + private Long warehouseId; + + /** + * 仓库编码 + */ + private String warehouseCode; + + /** + * 仓库名称 + */ + private String warehouseName; + + /** + * 物料大类 + */ + private String materialCategories; + + /** + * 仓库位置 + */ + private String warehouseLocation; + + /** + * 关联车间 + */ + private Long workshopId; + + /** + * 仓库类型 + */ + private String warehouseType; + @TableField(exist = false) + private String workshopName;//字段映射 + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsDeliveryNote.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsDeliveryNote.java index 6da72d30..d312e803 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsDeliveryNote.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsDeliveryNote.java @@ -24,6 +24,7 @@ public class WmsDeliveryNote extends TenantEntity { /** * 送货单表主键 */ + @TableId(value = "delivery_note_id", type = IdType.AUTO) private Long deliveryNoteId; /** diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsInstockRecord.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsInstockRecord.java new file mode 100644 index 00000000..d845791f --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsInstockRecord.java @@ -0,0 +1,91 @@ +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; + +/** + * 入库记录对象 wms_instock_record + * + * @author Yinq + * @date 2025-01-07 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("wms_instock_record") +public class WmsInstockRecord extends TenantEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 入库记录主键 + */ + @TableId(value = "instock_record_id", type = IdType.AUTO) + private Long instockRecordId; + + /** + * 入库单 主键 + */ + // private Long instockId; + + /** + * 入库单号 + */ + private String instockCode; + + /** + * 批次码 + */ + private String batchCode; + + /** + * 物料id + */ + private Long materialId; + + /** + * 仓库ID + */ + private Long warehouseId; + + /** + * 库位编码 + */ + private String locationCode; + + /** + * 物料编码 + */ + private String materialCode; + + /** + * 物料名称 + */ + private String materialName; + + /** + * 入库数量 + */ + private Double instockQty; + + /** + * 物料大类 + */ + private String materialCategories; + + /** + * erp同步状态 + */ + private String erpSynchronousStatus; + + /** + * erp同步数量 + */ + private Double erpSynchronousQty; + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsBaseLocationBo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsBaseLocationBo.java new file mode 100644 index 00000000..8f111694 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsBaseLocationBo.java @@ -0,0 +1,49 @@ +package org.dromara.wms.domain.bo; + +import org.dromara.wms.domain.WmsBaseLocation; +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.*; + +/** + * 库位基础信息业务对象 wms_base_location + * + * @author Yinq + * @date 2025-01-08 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = WmsBaseLocation.class, reverseConvertGenerate = false) +public class WmsBaseLocationBo extends BaseEntity { + private Long locationId; + /** + * 所属仓库 + */ + private Long warehouseId; + + /** + * 库位编码 + */ + private String locationCode; + + /** + * 排 + */ + private Long lineNum; + + /** + * 层 + */ + private Long layerNum; + + /** + * 位 + */ + private Long locationNum; + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsBaseWarehouseBo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsBaseWarehouseBo.java new file mode 100644 index 00000000..4ac3b029 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsBaseWarehouseBo.java @@ -0,0 +1,66 @@ +package org.dromara.wms.domain.bo; + +import org.dromara.wms.domain.WmsBaseWarehouse; +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.*; + +/** + * 仓库基础信息业务对象 wms_base_warehouse + * + * @author Yinq + * @date 2025-01-07 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = WmsBaseWarehouse.class, reverseConvertGenerate = false) +public class WmsBaseWarehouseBo extends BaseEntity { + + /** + * 表主键 + */ + // @NotNull(message = "表主键不能为空", groups = { AddGroup.class }) + private Long warehouseId; + + /** + * 仓库编码 + */ + @NotBlank(message = "仓库编码不能为空", groups = { AddGroup.class, EditGroup.class }) + private String warehouseCode; + + /** + * 仓库名称 + */ + @NotBlank(message = "仓库名称不能为空", groups = { AddGroup.class, EditGroup.class }) + private String warehouseName; + + /** + * 物料大类 + */ + @NotBlank(message = "物料大类不能为空", groups = { AddGroup.class, EditGroup.class }) + private String materialCategories; + + /** + * 仓库位置 + */ + // @NotBlank(message = "仓库位置不能为空", groups = { AddGroup.class, EditGroup.class }) + private String warehouseLocation; + + /** + * 关联车间 + */ + @NotNull(message = "关联车间不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long workshopId; + + /** + * 仓库类型 + */ + @NotBlank(message = "仓库类型不能为空", groups = { AddGroup.class, EditGroup.class }) + private String warehouseType; + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsDeliveryNoteBo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsDeliveryNoteBo.java index 3aba07f3..d58de720 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsDeliveryNoteBo.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsDeliveryNoteBo.java @@ -1,5 +1,7 @@ package org.dromara.wms.domain.bo; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; import org.dromara.wms.domain.WmsDeliveryNote; import org.dromara.common.mybatis.core.domain.BaseEntity; import org.dromara.common.core.validate.AddGroup; @@ -24,6 +26,8 @@ public class WmsDeliveryNoteBo extends BaseEntity { * 送货单表主键 */ // @NotNull(message = "送货单表主键不能为空", groups = { AddGroup.class, EditGroup.class }) + + private Long deliveryNoteId; /** @@ -41,19 +45,19 @@ public class WmsDeliveryNoteBo extends BaseEntity { /** * 客户名称(默认值) */ - @NotBlank(message = "客户名称(默认值)不能为空", groups = { AddGroup.class, EditGroup.class }) + @NotBlank(message = "客户名称(默认值)不能为空", groups = {AddGroup.class, EditGroup.class}) private String customerName; /** * 联系人 */ - @NotBlank(message = "联系人不能为空", groups = { AddGroup.class, EditGroup.class }) + @NotBlank(message = "联系人不能为空", groups = {AddGroup.class, EditGroup.class}) private String contacts; /** * 联系电话 */ - @NotBlank(message = "联系电话不能为空", groups = { AddGroup.class, EditGroup.class }) + @NotBlank(message = "联系电话不能为空", groups = {AddGroup.class, EditGroup.class}) private String contactsIpone; /** @@ -71,7 +75,7 @@ public class WmsDeliveryNoteBo extends BaseEntity { /** * 车牌号 */ - @NotBlank(message = "车牌号不能为空", groups = { AddGroup.class, EditGroup.class }) + @NotBlank(message = "车牌号不能为空", groups = {AddGroup.class, EditGroup.class}) private String licensePlate; private String tenantId; diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsInstockRecordBo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsInstockRecordBo.java new file mode 100644 index 00000000..1a090fa4 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsInstockRecordBo.java @@ -0,0 +1,81 @@ +package org.dromara.wms.domain.bo; + +import org.dromara.wms.domain.WmsInstockRecord; +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.*; + +/** + * 入库记录业务对象 wms_instock_record + * + * @author Yinq + * @date 2025-01-07 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = WmsInstockRecord.class, reverseConvertGenerate = false) +public class WmsInstockRecordBo extends BaseEntity { + + /** + * 入库单号 + */ + private String instockCode; + + /** + * 批次码 + */ + private String batchCode; + + /** + * 物料id + */ + private Long materialId; + + /** + * 仓库ID + */ + private Long warehouseId; + + /** + * 库位编码 + */ + private String locationCode; + + /** + * 物料编码 + */ + private String materialCode; + + /** + * 物料名称 + */ + private String materialName; + + /** + * 入库数量 + */ + private Double instockQty; + + /** + * 物料大类 + */ + private String materialCategories; + + /** + * erp同步状态 + */ + @NotBlank(message = "erp同步状态不能为空", groups = { AddGroup.class, EditGroup.class }) + private String erpSynchronousStatus; + + /** + * erp同步数量 + */ + @NotNull(message = "erp同步数量不能为空", groups = { AddGroup.class, EditGroup.class }) + private Double erpSynchronousQty; + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/ProdBaseWorkshopInfoVo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/ProdBaseWorkshopInfoVo.java new file mode 100644 index 00000000..32d00e0c --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/ProdBaseWorkshopInfoVo.java @@ -0,0 +1,107 @@ +package org.dromara.wms.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import org.dromara.wms.domain.ProdBaseWorkshopInfo1; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + +/** + * 车间信息视图对象 prod_base_workshop_info + * + * @author Yinq + * @date 2025-01-02 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = ProdBaseWorkshopInfo1.class) +public class ProdBaseWorkshopInfoVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 车间ID + */ + @ExcelProperty(value = "车间ID") + private Long workshopId; + + /** + * 租户编号 + */ + @ExcelProperty(value = "租户编号") + private String tenantId; + + /** + * 车间编号 + */ + @ExcelProperty(value = "车间编号") + private String workshopCode; + + /** + * 车间名称 + */ + @ExcelProperty(value = "车间名称") + private String workshopName; + + /** + * 所属工厂ID + */ + @ExcelProperty(value = "所属工厂ID") + private Long factoryId; + + /** + * 所属工厂名称 + */ + @ExcelProperty(value = "所属工厂名称") + private String factoryName; + + /** + * 激活标识(1是 0否) + */ + @ExcelProperty(value = "激活标识") + private String activeFlag; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + /** + * 创建部门 + */ + @ExcelProperty(value = "创建部门") + private Long createDept; + + /** + * 创建人 + */ + @ExcelProperty(value = "创建人") + private Long createBy; + + /** + * 创建时间 + */ + @ExcelProperty(value = "创建时间") + private Date createTime; + + /** + * 更新人 + */ + @ExcelProperty(value = "更新人") + private Long updateBy; + + /** + * 更新时间 + */ + @ExcelProperty(value = "更新时间") + private Date updateTime; + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsBaseLocationVo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsBaseLocationVo.java new file mode 100644 index 00000000..7af67936 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsBaseLocationVo.java @@ -0,0 +1,85 @@ +package org.dromara.wms.domain.vo; + +import org.dromara.wms.domain.WmsBaseLocation; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 库位基础信息视图对象 wms_base_location + * + * @author Yinq + * @date 2025-01-08 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = WmsBaseLocation.class) +public class WmsBaseLocationVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 表主键 + */ + @ExcelProperty(value = "表主键") + private Long locationId; + + /** + * 所属仓库 + */ + @ExcelProperty(value = "所属仓库") + private Long warehouseId; + + /** + * 库位编码 + */ + @ExcelProperty(value = "库位编码") + private String locationCode; + + /** + * 排 + */ + @ExcelProperty(value = "排") + private Long lineNum; + + /** + * 层 + */ + @ExcelProperty(value = "层") + private Long layerNum; + + /** + * 位 + */ + @ExcelProperty(value = "位") + private Long locationNum; + + /** + * 创建时间 + */ + @ExcelProperty(value = "创建时间") + private Date createTime; + + /** + * 更新时间 + */ + @ExcelProperty(value = "更新时间") + private Date updateTime; + private String warehouseCode; + + /** + * 仓库名称 + */ + private String warehouseName; + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsBaseWarehouseVo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsBaseWarehouseVo.java new file mode 100644 index 00000000..81fd3fae --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsBaseWarehouseVo.java @@ -0,0 +1,100 @@ +package org.dromara.wms.domain.vo; + +import org.dromara.wms.domain.WmsBaseWarehouse; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 仓库基础信息视图对象 wms_base_warehouse + * + * @author Yinq + * @date 2025-01-07 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = WmsBaseWarehouse.class) +public class WmsBaseWarehouseVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 表主键 + */ + @ExcelProperty(value = "表主键") + private Long warehouseId; + + /** + * 仓库编码 + */ + @ExcelProperty(value = "仓库编码") + private String warehouseCode; + + /** + * 仓库名称 + */ + @ExcelProperty(value = "仓库名称") + private String warehouseName; + + /** + * 物料大类 + */ + @ExcelProperty(value = "物料大类", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "material_mategories") + private String materialCategories; + + /** + * 仓库位置 + */ + @ExcelProperty(value = "仓库位置") + private String warehouseLocation; + + /** + * 关联车间 + */ + @ExcelProperty(value = "关联车间") + private Long workshopId; + + /** + * 仓库类型 + */ + @ExcelProperty(value = "仓库类型", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "wms_wharehouse_type") + private String warehouseType; + + /** + * 创建人 + */ + @ExcelProperty(value = "创建人") + private Long createBy; + + /** + * 创建时间 + */ + @ExcelProperty(value = "创建时间") + private Date createTime; + + /** + * 更新人 + */ + @ExcelProperty(value = "更新人") + private Long updateBy; + + /** + * 更新时间 + */ + @ExcelProperty(value = "更新时间") + private Date updateTime; + private String workshopName;//字段映射 + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsInstockRecordVo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsInstockRecordVo.java new file mode 100644 index 00000000..7d719f29 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsInstockRecordVo.java @@ -0,0 +1,117 @@ +package org.dromara.wms.domain.vo; + +import org.dromara.wms.domain.WmsInstockRecord; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 入库记录视图对象 wms_instock_record + * + * @author Yinq + * @date 2025-01-07 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = WmsInstockRecord.class) +public class WmsInstockRecordVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 入库单号 + */ + @ExcelProperty(value = "入库单号") + private String instockCode; + + /** + * 批次码 + */ + @ExcelProperty(value = "批次码") + private String batchCode; + + /** + * 物料id + */ + @ExcelProperty(value = "物料id") + private Long materialId; + + /** + * 仓库ID + */ + @ExcelProperty(value = "仓库ID") + private Long warehouseId; + + /** + * 库位编码 + */ + @ExcelProperty(value = "库位编码") + private String locationCode; + + /** + * 物料编码 + */ + @ExcelProperty(value = "物料编码") + private String materialCode; + + /** + * 物料名称 + */ + @ExcelProperty(value = "物料名称") + private String materialName; + + /** + * 入库数量 + */ + @ExcelProperty(value = "入库数量") + private Double instockQty; + + /** + * 物料大类 + */ + @ExcelProperty(value = "物料大类") + private String materialCategories; + + /** + * 入库人 + */ + @ExcelProperty(value = "入库人") + private Long createBy; + + /** + * 入库时间 + */ + @ExcelProperty(value = "入库时间") + private Date createTime; + + /** + * erp同步状态 + */ + @ExcelProperty(value = "erp同步状态", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "sys_common_status") + private String erpSynchronousStatus; + + /** + * erp同步数量 + */ + @ExcelProperty(value = "erp同步数量") + private Double erpSynchronousQty; + + /** + * 同步时间 + */ + @ExcelProperty(value = "同步时间") + private Date updateTime; + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/ProdBaseWorkshopInfoMapper.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/ProdBaseWorkshopInfoMapper.java new file mode 100644 index 00000000..17c76378 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/ProdBaseWorkshopInfoMapper.java @@ -0,0 +1,17 @@ +package org.dromara.wms.mapper; + +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; +import org.dromara.wms.domain.ProdBaseWorkshopInfo1; +import org.dromara.wms.domain.vo.ProdBaseWorkshopInfoVo; + +/** + * 车间信息Mapper接口 + * + * @author Yinq + * @date 2025-01-02 + */ +public interface ProdBaseWorkshopInfoMapper extends BaseMapperPlus { + + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsBaseLocationMapper.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsBaseLocationMapper.java new file mode 100644 index 00000000..8e5ea990 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsBaseLocationMapper.java @@ -0,0 +1,15 @@ +package org.dromara.wms.mapper; + +import org.dromara.wms.domain.WmsBaseLocation; +import org.dromara.wms.domain.vo.WmsBaseLocationVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 库位基础信息Mapper接口 + * + * @author Yinq + * @date 2025-01-08 + */ +public interface WmsBaseLocationMapper extends BaseMapperPlus { + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsBaseWarehouseMapper.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsBaseWarehouseMapper.java new file mode 100644 index 00000000..e319fc37 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsBaseWarehouseMapper.java @@ -0,0 +1,15 @@ +package org.dromara.wms.mapper; + +import org.dromara.wms.domain.WmsBaseWarehouse; +import org.dromara.wms.domain.vo.WmsBaseWarehouseVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 仓库基础信息Mapper接口 + * + * @author Yinq + * @date 2025-01-07 + */ +public interface WmsBaseWarehouseMapper extends BaseMapperPlus { + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsInstockRecordMapper.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsInstockRecordMapper.java new file mode 100644 index 00000000..70ff47ed --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsInstockRecordMapper.java @@ -0,0 +1,16 @@ +package org.dromara.wms.mapper; + +import org.dromara.wms.domain.WmsInstockRecord; +import org.dromara.wms.domain.vo.WmsInstockRecordVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * 入库记录Mapper接口 + * + * @author Yinq + * @date 2025-01-07 + */ +public interface WmsInstockRecordMapper extends BaseMapperPlus { + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsBaseLocationService.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsBaseLocationService.java new file mode 100644 index 00000000..57d9218f --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsBaseLocationService.java @@ -0,0 +1,69 @@ +package org.dromara.wms.service; + +import org.dromara.wms.domain.WmsBaseLocation; +import org.dromara.wms.domain.vo.WmsBaseLocationVo; +import org.dromara.wms.domain.bo.WmsBaseLocationBo; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import java.util.Collection; +import java.util.List; + +/** + * 库位基础信息Service接口 + * + * @author Yinq + * @date 2025-01-08 + */ +public interface IWmsBaseLocationService { + + /** + * 查询库位基础信息 + * + * @param locationId 主键 + * @return 库位基础信息 + */ + WmsBaseLocationVo queryById(Long locationId); + + /** + * 分页查询库位基础信息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 库位基础信息分页列表 + */ + TableDataInfo queryPageList(WmsBaseLocationBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的库位基础信息列表 + * + * @param bo 查询条件 + * @return 库位基础信息列表 + */ + List queryList(WmsBaseLocationBo bo); + + /** + * 新增库位基础信息 + * + * @param bo 库位基础信息 + * @return 是否新增成功 + */ + Boolean insertByBo(WmsBaseLocationBo bo); + + /** + * 修改库位基础信息 + * + * @param bo 库位基础信息 + * @return 是否修改成功 + */ + Boolean updateByBo(WmsBaseLocationBo 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/IWmsBaseWarehouseService.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsBaseWarehouseService.java new file mode 100644 index 00000000..6b351483 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsBaseWarehouseService.java @@ -0,0 +1,69 @@ +package org.dromara.wms.service; + +import org.dromara.wms.domain.WmsBaseWarehouse; +import org.dromara.wms.domain.vo.WmsBaseWarehouseVo; +import org.dromara.wms.domain.bo.WmsBaseWarehouseBo; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import java.util.Collection; +import java.util.List; + +/** + * 仓库基础信息Service接口 + * + * @author Yinq + * @date 2025-01-07 + */ +public interface IWmsBaseWarehouseService { + + /** + * 查询仓库基础信息 + * + * @param warehouseId 主键 + * @return 仓库基础信息 + */ + WmsBaseWarehouseVo queryById(Long warehouseId); + + /** + * 分页查询仓库基础信息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 仓库基础信息分页列表 + */ + TableDataInfo queryPageList(WmsBaseWarehouseBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的仓库基础信息列表 + * + * @param bo 查询条件 + * @return 仓库基础信息列表 + */ + List queryList(WmsBaseWarehouseBo bo); + + /** + * 新增仓库基础信息 + * + * @param bo 仓库基础信息 + * @return 是否新增成功 + */ + Boolean insertByBo(WmsBaseWarehouseBo bo); + + /** + * 修改仓库基础信息 + * + * @param bo 仓库基础信息 + * @return 是否修改成功 + */ + Boolean updateByBo(WmsBaseWarehouseBo 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/IWmsInstockRecordService.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsInstockRecordService.java new file mode 100644 index 00000000..38d6fe61 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsInstockRecordService.java @@ -0,0 +1,69 @@ +package org.dromara.wms.service; + +import org.dromara.wms.domain.WmsInstockRecord; +import org.dromara.wms.domain.vo.WmsInstockRecordVo; +import org.dromara.wms.domain.bo.WmsInstockRecordBo; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import java.util.Collection; +import java.util.List; + +/** + * 入库记录Service接口 + * + * @author Yinq + * @date 2025-01-07 + */ +public interface IWmsInstockRecordService { + + /** + * 查询入库记录 + * + * @param instockRecordId 主键 + * @return 入库记录 + */ + WmsInstockRecordVo queryById(Long instockRecordId); + + /** + * 分页查询入库记录列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 入库记录分页列表 + */ + TableDataInfo queryPageList(WmsInstockRecordBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的入库记录列表 + * + * @param bo 查询条件 + * @return 入库记录列表 + */ + List queryList(WmsInstockRecordBo bo); + + /** + * 新增入库记录 + * + * @param bo 入库记录 + * @return 是否新增成功 + */ + Boolean insertByBo(WmsInstockRecordBo bo); + + /** + * 修改入库记录 + * + * @param bo 入库记录 + * @return 是否修改成功 + */ + Boolean updateByBo(WmsInstockRecordBo 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/WmsBaseLocationServiceImpl.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsBaseLocationServiceImpl.java new file mode 100644 index 00000000..0cfbaa95 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsBaseLocationServiceImpl.java @@ -0,0 +1,139 @@ +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.WmsBaseWarehouse; +import org.springframework.stereotype.Service; +import org.dromara.wms.domain.bo.WmsBaseLocationBo; +import org.dromara.wms.domain.vo.WmsBaseLocationVo; +import org.dromara.wms.domain.WmsBaseLocation; +import org.dromara.wms.mapper.WmsBaseLocationMapper; +import org.dromara.wms.service.IWmsBaseLocationService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 库位基础信息Service业务层处理 + * + * @author Yinq + * @date 2025-01-08 + */ +@RequiredArgsConstructor +@Service +public class WmsBaseLocationServiceImpl implements IWmsBaseLocationService { + + private final WmsBaseLocationMapper baseMapper; + + /** + * 查询库位基础信息 + * + * @param locationId 主键 + * @return 库位基础信息 + */ + @Override + public WmsBaseLocationVo queryById(Long locationId){ + return baseMapper.selectVoById(locationId); + } + + /** + * 分页查询库位基础信息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 库位基础信息分页列表 + */ + @Override + public TableDataInfo queryPageList(WmsBaseLocationBo 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(WmsBaseLocationBo bo) { + MPJLambdaWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private MPJLambdaWrapper buildQueryWrapper(WmsBaseLocationBo bo) { + Map params = bo.getParams(); + MPJLambdaWrapper lqw = JoinWrappers.lambda(WmsBaseLocation.class) + .selectAll(WmsBaseLocation.class) + .select(WmsBaseWarehouse::getWarehouseName,WmsBaseWarehouse::getWarehouseCode) + + .leftJoin(WmsBaseWarehouse.class,WmsBaseWarehouse::getWarehouseId,WmsBaseLocation::getWarehouseId) + .eq(bo.getWarehouseId() != null, WmsBaseLocation::getWarehouseId, bo.getWarehouseId()) + .like(StringUtils.isNotBlank(bo.getLocationCode()), WmsBaseLocation::getLocationCode, bo.getLocationCode()) + .eq(bo.getLineNum() != null, WmsBaseLocation::getLineNum, bo.getLineNum()) + .eq(bo.getLayerNum() != null, WmsBaseLocation::getLayerNum, bo.getLayerNum()) + .orderByDesc(WmsBaseLocation::getCreateTime); + return lqw; + } + + /** + * 新增库位基础信息 + * + * @param bo 库位基础信息 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(WmsBaseLocationBo bo) { + WmsBaseLocation add = MapstructUtils.convert(bo, WmsBaseLocation.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setLocationId(add.getLocationId()); + } + return flag; + } + + /** + * 修改库位基础信息 + * + * @param bo 库位基础信息 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(WmsBaseLocationBo bo) { + WmsBaseLocation update = MapstructUtils.convert(bo, WmsBaseLocation.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(WmsBaseLocation 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/WmsBaseWarehouseServiceImpl.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsBaseWarehouseServiceImpl.java new file mode 100644 index 00000000..63230559 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsBaseWarehouseServiceImpl.java @@ -0,0 +1,142 @@ +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.ProdBaseWorkshopInfo1; +import org.springframework.stereotype.Service; +import org.dromara.wms.domain.bo.WmsBaseWarehouseBo; +import org.dromara.wms.domain.vo.WmsBaseWarehouseVo; +import org.dromara.wms.domain.WmsBaseWarehouse; +import org.dromara.wms.mapper.WmsBaseWarehouseMapper; +import org.dromara.wms.service.IWmsBaseWarehouseService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 仓库基础信息Service业务层处理 + * + * @author Yinq + * @date 2025-01-07 + */ +@RequiredArgsConstructor +@Service +public class WmsBaseWarehouseServiceImpl implements IWmsBaseWarehouseService { + + private final WmsBaseWarehouseMapper baseMapper; + + /** + * 查询仓库基础信息 + * + * @param warehouseId 主键 + * @return 仓库基础信息 + */ + @Override + public WmsBaseWarehouseVo queryById(Long warehouseId) { + return baseMapper.selectVoById(warehouseId); + } + + /** + * 分页查询仓库基础信息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 仓库基础信息分页列表 + */ + @Override + public TableDataInfo queryPageList(WmsBaseWarehouseBo 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(WmsBaseWarehouseBo bo) { + MPJLambdaWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private MPJLambdaWrapper buildQueryWrapper(WmsBaseWarehouseBo bo) { + Map params = bo.getParams(); + MPJLambdaWrapper lqw = JoinWrappers.lambda(WmsBaseWarehouse.class) + + .selectAll(WmsBaseWarehouse.class) + .select(ProdBaseWorkshopInfo1::getWorkshopName) + .leftJoin(ProdBaseWorkshopInfo1.class, ProdBaseWorkshopInfo1::getWorkshopId, WmsBaseWarehouse::getWorkshopId) + + .eq(StringUtils.isNotBlank(bo.getWarehouseCode()), WmsBaseWarehouse::getWarehouseCode, bo.getWarehouseCode()) + .like(StringUtils.isNotBlank(bo.getWarehouseName()), WmsBaseWarehouse::getWarehouseName, bo.getWarehouseName()) + .eq(StringUtils.isNotBlank(bo.getMaterialCategories()), WmsBaseWarehouse::getMaterialCategories, bo.getMaterialCategories()) + .eq(bo.getWorkshopId() != null, WmsBaseWarehouse::getWorkshopId, bo.getWorkshopId()) + .eq(StringUtils.isNotBlank(bo.getWarehouseType()), WmsBaseWarehouse::getWarehouseType, bo.getWarehouseType()) + .orderByDesc(WmsBaseWarehouse::getCreateTime); + return lqw; + } + + /** + * 新增仓库基础信息 + * + * @param bo 仓库基础信息 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(WmsBaseWarehouseBo bo) { + WmsBaseWarehouse add = MapstructUtils.convert(bo, WmsBaseWarehouse.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setWarehouseId(add.getWarehouseId()); + } + return flag; + } + + /** + * 修改仓库基础信息 + * + * @param bo 仓库基础信息 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(WmsBaseWarehouseBo bo) { + WmsBaseWarehouse update = MapstructUtils.convert(bo, WmsBaseWarehouse.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(WmsBaseWarehouse 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/WmsDeliveryNoteServiceImpl.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsDeliveryNoteServiceImpl.java index 7e204cd3..5e90cc58 100644 --- a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsDeliveryNoteServiceImpl.java +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsDeliveryNoteServiceImpl.java @@ -2,6 +2,7 @@ package org.dromara.wms.service.impl; import com.alibaba.nacos.shaded.com.google.common.collect.Maps; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import org.dromara.common.core.utils.DateUtils; import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -10,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.RequiredArgsConstructor; +import org.dromara.common.satoken.utils.LoginHelper; import org.springframework.stereotype.Service; import org.dromara.wms.domain.bo.WmsDeliveryNoteBo; import org.dromara.wms.domain.vo.WmsDeliveryNoteVo; @@ -42,7 +44,8 @@ public class WmsDeliveryNoteServiceImpl implements IWmsDeliveryNoteService { @Override public WmsDeliveryNoteVo queryById(Long deliveryNoteId){ - return baseMapper.selectVoOne(new LambdaQueryWrapper().eq(WmsDeliveryNote::getDeliveryNoteId, deliveryNoteId)); + // return baseMapper.selectVoOne(new LambdaQueryWrapper().eq(WmsDeliveryNote::getDeliveryNoteId, deliveryNoteId)); + return baseMapper.selectVoById(deliveryNoteId); } /** @@ -93,8 +96,12 @@ public class WmsDeliveryNoteServiceImpl implements IWmsDeliveryNoteService { */ @Override public Boolean insertByBo(WmsDeliveryNoteBo bo) { + bo.setDeliveryNoteCode("SH"+DateUtils.dateTimeNow()); + // bo.setCreateBy(LoginHelper.getUsername()); WmsDeliveryNote add = MapstructUtils.convert(bo, WmsDeliveryNote.class); // add.setCreateBy("12312"); + + validEntityBeforeSave(add); boolean flag = baseMapper.insert(add) > 0; if (flag) { diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsInstockRecordServiceImpl.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsInstockRecordServiceImpl.java new file mode 100644 index 00000000..dfa06b3d --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsInstockRecordServiceImpl.java @@ -0,0 +1,142 @@ +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.springframework.stereotype.Service; +import org.dromara.wms.domain.bo.WmsInstockRecordBo; +import org.dromara.wms.domain.vo.WmsInstockRecordVo; +import org.dromara.wms.domain.WmsInstockRecord; +import org.dromara.wms.mapper.WmsInstockRecordMapper; +import org.dromara.wms.service.IWmsInstockRecordService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 入库记录Service业务层处理 + * + * @author Yinq + * @date 2025-01-07 + */ +@RequiredArgsConstructor +@Service +public class WmsInstockRecordServiceImpl implements IWmsInstockRecordService { + + private final WmsInstockRecordMapper baseMapper; + + /** + * 查询入库记录 + * + * @param instockRecordId 主键 + * @return 入库记录 + */ + @Override + public WmsInstockRecordVo queryById(Long instockRecordId){ + return baseMapper.selectVoById(instockRecordId); + } + + /** + * 分页查询入库记录列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 入库记录分页列表 + */ + @Override + public TableDataInfo queryPageList(WmsInstockRecordBo 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(WmsInstockRecordBo bo) { + MPJLambdaWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private MPJLambdaWrapper buildQueryWrapper(WmsInstockRecordBo bo) { + Map params = bo.getParams(); + MPJLambdaWrapper lqw = JoinWrappers.lambda(WmsInstockRecord.class) + .selectAll(WmsInstockRecord.class) + .eq(StringUtils.isNotBlank(bo.getInstockCode()), WmsInstockRecord::getInstockCode, bo.getInstockCode()) + .eq(StringUtils.isNotBlank(bo.getBatchCode()), WmsInstockRecord::getBatchCode, bo.getBatchCode()) + .eq(bo.getWarehouseId() != null, WmsInstockRecord::getWarehouseId, bo.getWarehouseId()) + .like(StringUtils.isNotBlank(bo.getLocationCode()), WmsInstockRecord::getLocationCode, bo.getLocationCode()) + .like(StringUtils.isNotBlank(bo.getMaterialCode()), WmsInstockRecord::getMaterialCode, bo.getMaterialCode()) + .like(StringUtils.isNotBlank(bo.getMaterialName()), WmsInstockRecord::getMaterialName, bo.getMaterialName()) + .eq(StringUtils.isNotBlank(bo.getMaterialCategories()), WmsInstockRecord::getMaterialCategories, bo.getMaterialCategories()) + .between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null, + WmsInstockRecord::getCreateTime ,params.get("beginCreateTime"), params.get("endCreateTime")) + .eq(StringUtils.isNotBlank(bo.getErpSynchronousStatus()), WmsInstockRecord::getErpSynchronousStatus, bo.getErpSynchronousStatus()) + .eq(bo.getErpSynchronousQty() != null, WmsInstockRecord::getErpSynchronousQty, bo.getErpSynchronousQty()) + .orderByDesc(WmsInstockRecord::getCreateTime); + return lqw; + } + + /** + * 新增入库记录 + * + * @param bo 入库记录 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(WmsInstockRecordBo bo) { + WmsInstockRecord add = MapstructUtils.convert(bo, WmsInstockRecord.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + // if (flag) { + // bo.setInstockRecordId(add.getInstockRecordId()); + // } + return flag; + } + + /** + * 修改入库记录 + * + * @param bo 入库记录 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(WmsInstockRecordBo bo) { + WmsInstockRecord update = MapstructUtils.convert(bo, WmsInstockRecord.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(WmsInstockRecord 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/ProdBaseWorkshopInfoMapper.xml b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/ProdBaseWorkshopInfoMapper.xml new file mode 100644 index 00000000..2e354485 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/ProdBaseWorkshopInfoMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsBaseLocationMapper.xml b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsBaseLocationMapper.xml new file mode 100644 index 00000000..60b80d74 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsBaseLocationMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsBaseWarehouseMapper.xml b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsBaseWarehouseMapper.xml new file mode 100644 index 00000000..c657c82d --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsBaseWarehouseMapper.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsInstockRecordMapper.xml b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsInstockRecordMapper.xml new file mode 100644 index 00000000..3822aa5f --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsInstockRecordMapper.xml @@ -0,0 +1,7 @@ + + + + +