feat(wms): 添加钢卷通用告警功能
- 创建 WmsMaterialWarning 实体类定义告警数据结构 - 实现 IWmsMaterialWarningService 接口提供告警业务方法 - 开发 WmsMaterialWarningController 控制器支持增删改查操作 - 设计 WmsMaterialWarningBo 和 WmsMaterialWarningVo 数据传输对象 - 配置 WmsMaterialWarningMapper 数据访问层和 XML 映射文件 - 实现 WmsMaterialWarningServiceImpl 业务逻辑处理类 - 添加告警类型、级别、状态等字段支持长度/厚度/宽度维度监控 - 集成 Excel 导出功能便于告警数据统计分析
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
package com.klp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.domain.vo.WmsMaterialWarningVo;
|
||||
import com.klp.domain.bo.WmsMaterialWarningBo;
|
||||
import com.klp.service.IWmsMaterialWarningService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 钢卷通用维度告警(长度/厚度/宽度)
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-06
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/wms/materialWarning")
|
||||
public class WmsMaterialWarningController extends BaseController {
|
||||
|
||||
private final IWmsMaterialWarningService iWmsMaterialWarningService;
|
||||
|
||||
/**
|
||||
* 查询钢卷通用维度告警(长度/厚度/宽度)列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsMaterialWarningVo> list(WmsMaterialWarningBo bo, PageQuery pageQuery) {
|
||||
return iWmsMaterialWarningService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出钢卷通用维度告警(长度/厚度/宽度)列表
|
||||
*/
|
||||
@Log(title = "钢卷通用维度告警(长度/厚度/宽度)", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsMaterialWarningBo bo, HttpServletResponse response) {
|
||||
List<WmsMaterialWarningVo> list = iWmsMaterialWarningService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "钢卷通用维度告警(长度/厚度/宽度)", WmsMaterialWarningVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取钢卷通用维度告警(长度/厚度/宽度)详细信息
|
||||
*
|
||||
* @param warningId 主键
|
||||
*/
|
||||
@GetMapping("/{warningId}")
|
||||
public R<WmsMaterialWarningVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long warningId) {
|
||||
return R.ok(iWmsMaterialWarningService.queryById(warningId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增钢卷通用维度告警(长度/厚度/宽度)
|
||||
*/
|
||||
@Log(title = "钢卷通用维度告警(长度/厚度/宽度)", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsMaterialWarningBo bo) {
|
||||
return toAjax(iWmsMaterialWarningService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改钢卷通用维度告警(长度/厚度/宽度)
|
||||
*/
|
||||
@Log(title = "钢卷通用维度告警(长度/厚度/宽度)", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsMaterialWarningBo bo) {
|
||||
return toAjax(iWmsMaterialWarningService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除钢卷通用维度告警(长度/厚度/宽度)
|
||||
*
|
||||
* @param warningIds 主键串
|
||||
*/
|
||||
@Log(title = "钢卷通用维度告警(长度/厚度/宽度)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{warningIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] warningIds) {
|
||||
return toAjax(iWmsMaterialWarningService.deleteWithValidByIds(Arrays.asList(warningIds), true));
|
||||
}
|
||||
}
|
||||
92
klp-wms/src/main/java/com/klp/domain/WmsMaterialWarning.java
Normal file
92
klp-wms/src/main/java/com/klp/domain/WmsMaterialWarning.java
Normal file
@@ -0,0 +1,92 @@
|
||||
package com.klp.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 钢卷通用维度告警(长度/厚度/宽度)对象 wms_material_warning
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-06
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("wms_material_warning")
|
||||
public class WmsMaterialWarning extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 告警ID
|
||||
*/
|
||||
@TableId(value = "warning_id")
|
||||
private Long warningId;
|
||||
/**
|
||||
* 钢卷ID
|
||||
*/
|
||||
private Long coilId;
|
||||
/**
|
||||
* 告警类型(LENGTH=长度, THICKNESS=厚度, WIDTH=宽度)
|
||||
*/
|
||||
private String warningType;
|
||||
/**
|
||||
* 理论值
|
||||
*/
|
||||
private BigDecimal theoreticalVal;
|
||||
/**
|
||||
* 实测值
|
||||
*/
|
||||
private BigDecimal actualVal;
|
||||
/**
|
||||
* 允许偏差(数值/百分比)
|
||||
*/
|
||||
private BigDecimal allowDeviation;
|
||||
/**
|
||||
* 实际偏差值
|
||||
*/
|
||||
private BigDecimal deviationValue;
|
||||
/**
|
||||
* 偏差率(%)
|
||||
*/
|
||||
private BigDecimal deviationRate;
|
||||
/**
|
||||
* 告警级别(WARNING/ERROR/CRITICAL)
|
||||
*/
|
||||
private String warningLevel;
|
||||
/**
|
||||
* 告警说明
|
||||
*/
|
||||
private String warningMsg;
|
||||
/**
|
||||
* 告警状态(0=未处理,1=已处理,2=已忽略)
|
||||
*/
|
||||
private Integer warningStatus;
|
||||
/**
|
||||
* 处理人
|
||||
*/
|
||||
private String handleBy;
|
||||
/**
|
||||
* 处理时间
|
||||
*/
|
||||
private Date handleTime;
|
||||
/**
|
||||
* 处理备注
|
||||
*/
|
||||
private String handleRemark;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 钢卷通用维度告警(长度/厚度/宽度)业务对象 wms_material_warning
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-06
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WmsMaterialWarningBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 告警ID
|
||||
*/
|
||||
private Long warningId;
|
||||
|
||||
/**
|
||||
* 钢卷ID
|
||||
*/
|
||||
private Long coilId;
|
||||
|
||||
/**
|
||||
* 告警类型(LENGTH=长度, THICKNESS=厚度, WIDTH=宽度)
|
||||
*/
|
||||
private String warningType;
|
||||
|
||||
/**
|
||||
* 理论值
|
||||
*/
|
||||
private BigDecimal theoreticalVal;
|
||||
|
||||
/**
|
||||
* 实测值
|
||||
*/
|
||||
private BigDecimal actualVal;
|
||||
|
||||
/**
|
||||
* 允许偏差(数值/百分比)
|
||||
*/
|
||||
private BigDecimal allowDeviation;
|
||||
|
||||
/**
|
||||
* 实际偏差值
|
||||
*/
|
||||
private BigDecimal deviationValue;
|
||||
|
||||
/**
|
||||
* 偏差率(%)
|
||||
*/
|
||||
private BigDecimal deviationRate;
|
||||
|
||||
/**
|
||||
* 告警级别(WARNING/ERROR/CRITICAL)
|
||||
*/
|
||||
private String warningLevel;
|
||||
|
||||
/**
|
||||
* 告警说明
|
||||
*/
|
||||
private String warningMsg;
|
||||
|
||||
/**
|
||||
* 告警状态(0=未处理,1=已处理,2=已忽略)
|
||||
*/
|
||||
private Integer warningStatus;
|
||||
|
||||
/**
|
||||
* 处理人
|
||||
*/
|
||||
private String handleBy;
|
||||
|
||||
/**
|
||||
* 处理时间
|
||||
*/
|
||||
private Date handleTime;
|
||||
|
||||
/**
|
||||
* 处理备注
|
||||
*/
|
||||
private String handleRemark;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.klp.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 钢卷通用维度告警(长度/厚度/宽度)视图对象 wms_material_warning
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-06
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WmsMaterialWarningVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 告警ID
|
||||
*/
|
||||
@ExcelProperty(value = "告警ID")
|
||||
private Long warningId;
|
||||
|
||||
/**
|
||||
* 钢卷ID
|
||||
*/
|
||||
@ExcelProperty(value = "钢卷ID")
|
||||
private Long coilId;
|
||||
|
||||
/**
|
||||
* 告警类型(LENGTH=长度, THICKNESS=厚度, WIDTH=宽度)
|
||||
*/
|
||||
@ExcelProperty(value = "告警类型(LENGTH=长度, THICKNESS=厚度, WIDTH=宽度)")
|
||||
private String warningType;
|
||||
|
||||
/**
|
||||
* 理论值
|
||||
*/
|
||||
@ExcelProperty(value = "理论值")
|
||||
private BigDecimal theoreticalVal;
|
||||
|
||||
/**
|
||||
* 实测值
|
||||
*/
|
||||
@ExcelProperty(value = "实测值")
|
||||
private BigDecimal actualVal;
|
||||
|
||||
/**
|
||||
* 允许偏差(数值/百分比)
|
||||
*/
|
||||
@ExcelProperty(value = "允许偏差(数值/百分比)")
|
||||
private BigDecimal allowDeviation;
|
||||
|
||||
/**
|
||||
* 实际偏差值
|
||||
*/
|
||||
@ExcelProperty(value = "实际偏差值")
|
||||
private BigDecimal deviationValue;
|
||||
|
||||
/**
|
||||
* 偏差率(%)
|
||||
*/
|
||||
@ExcelProperty(value = "偏差率(%)")
|
||||
private BigDecimal deviationRate;
|
||||
|
||||
/**
|
||||
* 告警级别(WARNING/ERROR/CRITICAL)
|
||||
*/
|
||||
@ExcelProperty(value = "告警级别(WARNING/ERROR/CRITICAL)")
|
||||
private String warningLevel;
|
||||
|
||||
/**
|
||||
* 告警说明
|
||||
*/
|
||||
@ExcelProperty(value = "告警说明")
|
||||
private String warningMsg;
|
||||
|
||||
/**
|
||||
* 告警状态(0=未处理,1=已处理,2=已忽略)
|
||||
*/
|
||||
@ExcelProperty(value = "告警状态(0=未处理,1=已处理,2=已忽略)")
|
||||
private Integer warningStatus;
|
||||
|
||||
/**
|
||||
* 处理人
|
||||
*/
|
||||
@ExcelProperty(value = "处理人")
|
||||
private String handleBy;
|
||||
|
||||
/**
|
||||
* 处理时间
|
||||
*/
|
||||
@ExcelProperty(value = "处理时间")
|
||||
private Date handleTime;
|
||||
|
||||
/**
|
||||
* 处理备注
|
||||
*/
|
||||
@ExcelProperty(value = "处理备注")
|
||||
private String handleRemark;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mapper;
|
||||
|
||||
import com.klp.domain.WmsMaterialWarning;
|
||||
import com.klp.domain.vo.WmsMaterialWarningVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 钢卷通用维度告警(长度/厚度/宽度)Mapper接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-06
|
||||
*/
|
||||
public interface WmsMaterialWarningMapper extends BaseMapperPlus<WmsMaterialWarningMapper, WmsMaterialWarning, WmsMaterialWarningVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.service;
|
||||
|
||||
import com.klp.domain.WmsMaterialWarning;
|
||||
import com.klp.domain.vo.WmsMaterialWarningVo;
|
||||
import com.klp.domain.bo.WmsMaterialWarningBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 钢卷通用维度告警(长度/厚度/宽度)Service接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-06
|
||||
*/
|
||||
public interface IWmsMaterialWarningService {
|
||||
|
||||
/**
|
||||
* 查询钢卷通用维度告警(长度/厚度/宽度)
|
||||
*/
|
||||
WmsMaterialWarningVo queryById(Long warningId);
|
||||
|
||||
/**
|
||||
* 查询钢卷通用维度告警(长度/厚度/宽度)列表
|
||||
*/
|
||||
TableDataInfo<WmsMaterialWarningVo> queryPageList(WmsMaterialWarningBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询钢卷通用维度告警(长度/厚度/宽度)列表
|
||||
*/
|
||||
List<WmsMaterialWarningVo> queryList(WmsMaterialWarningBo bo);
|
||||
|
||||
/**
|
||||
* 新增钢卷通用维度告警(长度/厚度/宽度)
|
||||
*/
|
||||
Boolean insertByBo(WmsMaterialWarningBo bo);
|
||||
|
||||
/**
|
||||
* 修改钢卷通用维度告警(长度/厚度/宽度)
|
||||
*/
|
||||
Boolean updateByBo(WmsMaterialWarningBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除钢卷通用维度告警(长度/厚度/宽度)信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.klp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.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 com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.domain.bo.WmsMaterialWarningBo;
|
||||
import com.klp.domain.vo.WmsMaterialWarningVo;
|
||||
import com.klp.domain.WmsMaterialWarning;
|
||||
import com.klp.mapper.WmsMaterialWarningMapper;
|
||||
import com.klp.service.IWmsMaterialWarningService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 钢卷通用维度告警(长度/厚度/宽度)Service业务层处理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-06-06
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class WmsMaterialWarningServiceImpl implements IWmsMaterialWarningService {
|
||||
|
||||
private final WmsMaterialWarningMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询钢卷通用维度告警(长度/厚度/宽度)
|
||||
*/
|
||||
@Override
|
||||
public WmsMaterialWarningVo queryById(Long warningId){
|
||||
return baseMapper.selectVoById(warningId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询钢卷通用维度告警(长度/厚度/宽度)列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<WmsMaterialWarningVo> queryPageList(WmsMaterialWarningBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsMaterialWarning> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsMaterialWarningVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询钢卷通用维度告警(长度/厚度/宽度)列表
|
||||
*/
|
||||
@Override
|
||||
public List<WmsMaterialWarningVo> queryList(WmsMaterialWarningBo bo) {
|
||||
LambdaQueryWrapper<WmsMaterialWarning> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<WmsMaterialWarning> buildQueryWrapper(WmsMaterialWarningBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<WmsMaterialWarning> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getCoilId() != null, WmsMaterialWarning::getCoilId, bo.getCoilId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWarningType()), WmsMaterialWarning::getWarningType, bo.getWarningType());
|
||||
lqw.eq(bo.getTheoreticalVal() != null, WmsMaterialWarning::getTheoreticalVal, bo.getTheoreticalVal());
|
||||
lqw.eq(bo.getActualVal() != null, WmsMaterialWarning::getActualVal, bo.getActualVal());
|
||||
lqw.eq(bo.getAllowDeviation() != null, WmsMaterialWarning::getAllowDeviation, bo.getAllowDeviation());
|
||||
lqw.eq(bo.getDeviationValue() != null, WmsMaterialWarning::getDeviationValue, bo.getDeviationValue());
|
||||
lqw.eq(bo.getDeviationRate() != null, WmsMaterialWarning::getDeviationRate, bo.getDeviationRate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWarningLevel()), WmsMaterialWarning::getWarningLevel, bo.getWarningLevel());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWarningMsg()), WmsMaterialWarning::getWarningMsg, bo.getWarningMsg());
|
||||
lqw.eq(bo.getWarningStatus() != null, WmsMaterialWarning::getWarningStatus, bo.getWarningStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getHandleBy()), WmsMaterialWarning::getHandleBy, bo.getHandleBy());
|
||||
lqw.eq(bo.getHandleTime() != null, WmsMaterialWarning::getHandleTime, bo.getHandleTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getHandleRemark()), WmsMaterialWarning::getHandleRemark, bo.getHandleRemark());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增钢卷通用维度告警(长度/厚度/宽度)
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(WmsMaterialWarningBo bo) {
|
||||
WmsMaterialWarning add = BeanUtil.toBean(bo, WmsMaterialWarning.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setWarningId(add.getWarningId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改钢卷通用维度告警(长度/厚度/宽度)
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(WmsMaterialWarningBo bo) {
|
||||
WmsMaterialWarning update = BeanUtil.toBean(bo, WmsMaterialWarning.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(WmsMaterialWarning entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除钢卷通用维度告警(长度/厚度/宽度)
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user