From dcf6c749dd04ed86ab5be0f790506123fd4e8dbe Mon Sep 17 00:00:00 2001 From: "maxw@mesnac.com" Date: Thu, 9 Jan 2025 13:43:56 +0800 Subject: [PATCH] =?UTF-8?q?wms=E6=96=B0=E5=A2=9E=E7=89=A9=E6=96=99wms=5Fin?= =?UTF-8?q?stock=5Fprint=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WmsInstockPrintController.java | 112 +++++++++++++ .../dromara/wms/domain/WmsInstockPrint.java | 112 +++++++++++++ .../wms/domain/bo/WmsInstockPrintBo.java | 101 ++++++++++++ .../wms/domain/vo/WmsInstockPrintVo.java | 110 +++++++++++++ .../wms/mapper/WmsInstockPrintMapper.java | 15 ++ .../wms/service/IWmsInstockPrintService.java | 73 +++++++++ .../impl/WmsInstockPrintServiceImpl.java | 154 ++++++++++++++++++ .../mapper/wms/WmsInstockPrintMapper.xml | 7 + 8 files changed, 684 insertions(+) create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsInstockPrintController.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsInstockPrint.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsInstockPrintBo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsInstockPrintVo.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsInstockPrintMapper.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsInstockPrintService.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsInstockPrintServiceImpl.java create mode 100644 ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsInstockPrintMapper.xml diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsInstockPrintController.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsInstockPrintController.java new file mode 100644 index 00000000..24526c50 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/controller/WmsInstockPrintController.java @@ -0,0 +1,112 @@ +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.WmsInstockPrintBo; +import org.dromara.wms.domain.vo.WmsInstockPrintVo; +import org.dromara.wms.service.IWmsInstockPrintService; +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/instockPrint + * + * @author LionLi + * @date 2025-01-07 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/instockPrint") +public class WmsInstockPrintController extends BaseController { + + private final IWmsInstockPrintService wmsInstockPrintService; + + /** + * 查询入库单-物料打印条码列表 + */ + @SaCheckPermission("system:instockPrint:list") + @GetMapping("/list") + public TableDataInfo list(WmsInstockPrintBo bo, PageQuery pageQuery) { + return wmsInstockPrintService.queryPageList(bo, pageQuery); + } + + /** + * 导出入库单-物料打印条码列表 + */ + @SaCheckPermission("system:instockPrint:export") + @Log(title = "入库单-物料打印条码", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(WmsInstockPrintBo bo, HttpServletResponse response) { + List list = wmsInstockPrintService.queryList(bo); + ExcelUtil.exportExcel(list, "入库单-物料打印条码", WmsInstockPrintVo.class, response); + } + + /** + * 获取入库单-物料打印条码详细信息 + * + * @param instockPrintId 主键 + */ + @SaCheckPermission("system:instockPrint:query") + @GetMapping("/{instockPrintId}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long instockPrintId) { + return R.ok(wmsInstockPrintService.queryById(instockPrintId)); + } + + /** + * 新增入库单-物料打印条码 + */ + @SaCheckPermission("system:instockPrint:add") + @Log(title = "入库单-物料打印条码", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody WmsInstockPrintBo bo) { + return toAjax(wmsInstockPrintService.insertByBo(bo)); + } + + /** + * 修改入库单-物料打印条码 + */ + @SaCheckPermission("system:instockPrint:edit") + @Log(title = "入库单-物料打印条码", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody WmsInstockPrintBo bo) { + return toAjax(wmsInstockPrintService.updateByBo(bo)); + } + + /** + * 删除入库单-物料打印条码 + * + * @param instockPrintIds 主键串 + */ + @SaCheckPermission("system:instockPrint:remove") + @Log(title = "入库单-物料打印条码", businessType = BusinessType.DELETE) + @DeleteMapping("/{instockPrintIds}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] instockPrintIds) { + return toAjax(wmsInstockPrintService.deleteWithValidByIds(List.of(instockPrintIds), true)); + } + @PostMapping("/print") + public R print(@RequestBody WmsInstockPrintBo bo){ + List vos = bo.getVos(); + return null; + } +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsInstockPrint.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsInstockPrint.java new file mode 100644 index 00000000..d5c5226b --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/WmsInstockPrint.java @@ -0,0 +1,112 @@ +package org.dromara.wms.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serial; +import java.util.Date; + +/** + * 入库单-物料打印条码对象 wms_instock_print + * + * @author LionLi + * @date 2025-01-07 + */ +@Data +//@EqualsAndHashCode(callSuper = true) +@TableName("wms_instock_print") +public class WmsInstockPrint{ + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 入库单子表主键 + */ + @TableId(type = IdType.AUTO) + private Long instockPrintId; + + /** + * 入库单号 + */ + private String instockCode; + + /** + * 批次码 + */ + private String batchCode; + + /** + * 条码数量 + */ + private Long materialQty; + + /** + * 分包数量 + */ + private Long apportionQty; + + /** + * 物料id + */ + private Long materialId; + + /** + * 物料编码 + */ + private String materialCode; + + /** + * 物料名称 + */ + private String materialName; + + /** + * 物料规格 + */ + private String materialSpe; + + /** + * 计量单位名称 + */ + private String unitName; + + /** + * 是否有条码 + */ + private String codeYesNo; + + /** + * 物料大类 + */ + private String materialCategories; + @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; + + /** + * 租户id + */ + private String tenantId; + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsInstockPrintBo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsInstockPrintBo.java new file mode 100644 index 00000000..6e6ba124 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/bo/WmsInstockPrintBo.java @@ -0,0 +1,101 @@ +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.WmsInstockPrint; +import org.dromara.wms.domain.vo.WmsInstockPrintVo; + +import java.util.List; + +/** + * 入库单-物料打印条码业务对象 wms_instock_print + * + * @author LionLi + * @date 2025-01-07 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = WmsInstockPrint.class, reverseConvertGenerate = false) +public class WmsInstockPrintBo extends BaseEntity { + + /** + * 入库单子表主键 + */ +// @NotNull(message = "入库单子表主键不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long instockPrintId; + + /** + * 入库单号 + */ +// @NotBlank(message = "入库单号不能为空", groups = { AddGroup.class, EditGroup.class }) + private String instockCode; + + /** + * 批次码 + */ +// @NotBlank(message = "批次码不能为空", groups = { AddGroup.class, EditGroup.class }) + private String batchCode; + + /** + * 条码数量 + */ +// @NotNull(message = "条码数量不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long materialQty; + + /** + * 分包数量 + */ +// @NotNull(message = "分包数量不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long apportionQty; + + /** + * 物料id + */ +// @NotNull(message = "物料id不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long materialId; + + /** + * 物料编码 + */ +// @NotBlank(message = "物料编码不能为空", groups = { AddGroup.class, EditGroup.class }) + private String materialCode; + + /** + * 物料名称 + */ +// @NotBlank(message = "物料名称不能为空", groups = { AddGroup.class, EditGroup.class }) + private String materialName; + + /** + * 物料规格 + */ +// @NotBlank(message = "物料规格不能为空", groups = { AddGroup.class, EditGroup.class }) + private String materialSpe; + + /** + * 计量单位名称 + */ +// @NotBlank(message = "计量单位名称不能为空", groups = { AddGroup.class, EditGroup.class }) + private String unitName; + + /** + * 是否有条码 + */ +// @NotBlank(message = "是否有条码不能为空", groups = { AddGroup.class, EditGroup.class }) + private String codeYesNo; + + /** + * 物料大类 + */ +// @NotBlank(message = "物料大类不能为空", groups = { AddGroup.class, EditGroup.class }) + private String materialCategories; + private String tenantId; + private List vos; + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsInstockPrintVo.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsInstockPrintVo.java new file mode 100644 index 00000000..bfe1e261 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/domain/vo/WmsInstockPrintVo.java @@ -0,0 +1,110 @@ +package org.dromara.wms.domain.vo; + + +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 org.dromara.wms.domain.WmsInstockPrint; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 入库单-物料打印条码视图对象 wms_instock_print + * + * @author LionLi + * @date 2025-01-07 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = WmsInstockPrint.class) +public class WmsInstockPrintVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 入库单子表主键 + */ + @ExcelProperty(value = "入库单子表主键") + private Long instockPrintId; + + /** + * 入库单号 + */ + @ExcelProperty(value = "入库单号") + private String instockCode; + + /** + * 批次码 + */ + @ExcelProperty(value = "批次码") + private String batchCode; + + /** + * 条码数量 + */ + @ExcelProperty(value = "条码数量") + private Long materialQty; + + /** + * 分包数量 + */ + @ExcelProperty(value = "分包数量") + private Long apportionQty; + + /** + * 物料id + */ + @ExcelProperty(value = "物料id") + private Long materialId; + + /** + * 物料编码 + */ + @ExcelProperty(value = "物料编码") + private String materialCode; + + /** + * 物料名称 + */ + @ExcelProperty(value = "物料名称") + private String materialName; + + /** + * 物料规格 + */ + @ExcelProperty(value = "物料规格") + private String materialSpe; + + /** + * 计量单位名称 + */ + @ExcelProperty(value = "计量单位名称") + private String unitName; + + /** + * 是否有条码 + */ + @ExcelProperty(value = "是否有条码") + private String codeYesNo; + + /** + * 物料大类 + */ + @ExcelProperty(value = "物料大类") + private String materialCategories; + /** + * 租户id + */ + private String tenantId; + + + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsInstockPrintMapper.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsInstockPrintMapper.java new file mode 100644 index 00000000..6eb5f1b7 --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/mapper/WmsInstockPrintMapper.java @@ -0,0 +1,15 @@ +package org.dromara.wms.mapper; + +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; +import org.dromara.wms.domain.WmsInstockPrint; +import org.dromara.wms.domain.vo.WmsInstockPrintVo; + +/** + * 入库单-物料打印条码Mapper接口 + * + * @author LionLi + * @date 2025-01-07 + */ +public interface WmsInstockPrintMapper extends BaseMapperPlus { + +} diff --git a/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsInstockPrintService.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsInstockPrintService.java new file mode 100644 index 00000000..f89160ee --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/IWmsInstockPrintService.java @@ -0,0 +1,73 @@ +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.WmsInstockPrint; +import org.dromara.wms.domain.bo.WmsInstockDetailBo; +import org.dromara.wms.domain.bo.WmsInstockPrintBo; +import org.dromara.wms.domain.vo.WmsInstockPrintVo; + +import java.util.Collection; +import java.util.List; + +/** + * 入库单-物料打印条码Service接口 + * + * @author LionLi + * @date 2025-01-07 + */ +public interface IWmsInstockPrintService { + + /** + * 查询入库单-物料打印条码 + * + * @param instockPrintId 主键 + * @return 入库单-物料打印条码 + */ + WmsInstockPrintVo queryById(Long instockPrintId); + + /** + * 分页查询入库单-物料打印条码列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 入库单-物料打印条码分页列表 + */ + TableDataInfo queryPageList(WmsInstockPrintBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的入库单-物料打印条码列表 + * + * @param bo 查询条件 + * @return 入库单-物料打印条码列表 + */ + List queryList(WmsInstockPrintBo bo); + + long queryPrintNum(WmsInstockDetailBo bo); + + /** + * 新增入库单-物料打印条码 + * + * @param bo 入库单-物料打印条码 + * @return 是否新增成功 + */ + Boolean insertByBo(WmsInstockPrintBo bo); + int insertWmsInstockPrint(WmsInstockPrint wmsInstockPrint); + + /** + * 修改入库单-物料打印条码 + * + * @param bo 入库单-物料打印条码 + * @return 是否修改成功 + */ + Boolean updateByBo(WmsInstockPrintBo 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/WmsInstockPrintServiceImpl.java b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsInstockPrintServiceImpl.java new file mode 100644 index 00000000..3c3bc18c --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/java/org/dromara/wms/service/impl/WmsInstockPrintServiceImpl.java @@ -0,0 +1,154 @@ +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.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.dromara.wms.domain.WmsInstockDetail; +import org.dromara.wms.domain.WmsInstockPrint; +import org.dromara.wms.domain.bo.WmsInstockDetailBo; +import org.dromara.wms.domain.bo.WmsInstockPrintBo; +import org.dromara.wms.domain.vo.WmsInstockPrintVo; +import org.dromara.wms.mapper.WmsInstockPrintMapper; +import org.dromara.wms.service.IWmsInstockPrintService; +import org.springframework.stereotype.Service; + + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 入库单-物料打印条码Service业务层处理 + * + * @author LionLi + * @date 2025-01-07 + */ +@RequiredArgsConstructor +@Service +public class WmsInstockPrintServiceImpl implements IWmsInstockPrintService { + + private final WmsInstockPrintMapper baseMapper; + + /** + * 查询入库单-物料打印条码 + * + * @param instockPrintId 主键 + * @return 入库单-物料打印条码 + */ + @Override + public WmsInstockPrintVo queryById(Long instockPrintId){ + return baseMapper.selectVoById(instockPrintId); + } + + /** + * 分页查询入库单-物料打印条码列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 入库单-物料打印条码分页列表 + */ + @Override + public TableDataInfo queryPageList(WmsInstockPrintBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + lqw.orderByDesc(WmsInstockPrint::getCreateTime); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的入库单-物料打印条码列表 + * + * @param bo 查询条件 + * @return 入库单-物料打印条码列表 + */ + @Override + public List queryList(WmsInstockPrintBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + public long queryPrintNum(WmsInstockDetailBo bo){ + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(WmsInstockPrint::getInstockCode,bo.getInstockCode()); + wrapper.eq(WmsInstockPrint::getMaterialCode,bo.getMaterialCode()); + return baseMapper.selectCount(wrapper); + } + + private LambdaQueryWrapper buildQueryWrapper(WmsInstockPrintBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.eq(bo.getInstockPrintId() != null, WmsInstockPrint::getInstockPrintId, bo.getInstockPrintId()); + lqw.eq(StringUtils.isNotBlank(bo.getInstockCode()), WmsInstockPrint::getInstockCode, bo.getInstockCode()); + lqw.eq(StringUtils.isNotBlank(bo.getBatchCode()), WmsInstockPrint::getBatchCode, bo.getBatchCode()); + lqw.eq(bo.getMaterialQty() != null, WmsInstockPrint::getMaterialQty, bo.getMaterialQty()); + lqw.eq(bo.getApportionQty() != null, WmsInstockPrint::getApportionQty, bo.getApportionQty()); + lqw.eq(bo.getMaterialId() != null, WmsInstockPrint::getMaterialId, bo.getMaterialId()); + lqw.eq(StringUtils.isNotBlank(bo.getMaterialCode()), WmsInstockPrint::getMaterialCode, bo.getMaterialCode()); + lqw.like(StringUtils.isNotBlank(bo.getMaterialName()), WmsInstockPrint::getMaterialName, bo.getMaterialName()); + lqw.eq(StringUtils.isNotBlank(bo.getMaterialSpe()), WmsInstockPrint::getMaterialSpe, bo.getMaterialSpe()); + lqw.like(StringUtils.isNotBlank(bo.getUnitName()), WmsInstockPrint::getUnitName, bo.getUnitName()); + lqw.eq(StringUtils.isNotBlank(bo.getCodeYesNo()), WmsInstockPrint::getCodeYesNo, bo.getCodeYesNo()); + lqw.eq(StringUtils.isNotBlank(bo.getMaterialCategories()), WmsInstockPrint::getMaterialCategories, bo.getMaterialCategories()); + return lqw; + } + + /** + * 新增入库单-物料打印条码 + * + * @param bo 入库单-物料打印条码 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(WmsInstockPrintBo bo) { + WmsInstockPrint add = MapstructUtils.convert(bo, WmsInstockPrint.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setInstockPrintId(add.getInstockPrintId()); + } + return flag; + } + public int insertWmsInstockPrint(WmsInstockPrint wmsInstockPrint){ + return baseMapper.insert(wmsInstockPrint); + } + + /** + * 修改入库单-物料打印条码 + * + * @param bo 入库单-物料打印条码 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(WmsInstockPrintBo bo) { + WmsInstockPrint update = MapstructUtils.convert(bo, WmsInstockPrint.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(WmsInstockPrint 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/WmsInstockPrintMapper.xml b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsInstockPrintMapper.xml new file mode 100644 index 00000000..3e11fedc --- /dev/null +++ b/ruoyi-modules/hwmom-wms/src/main/resources/mapper/wms/WmsInstockPrintMapper.xml @@ -0,0 +1,7 @@ + + + + +