尺寸公差
This commit is contained in:
@@ -0,0 +1,99 @@
|
|||||||
|
package com.klp.pt.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.pt.domain.vo.PtProductSurfaceSpecVo;
|
||||||
|
import com.klp.pt.domain.bo.PtProductSurfaceSpecBo;
|
||||||
|
import com.klp.pt.service.IPtProductSurfaceSpecService;
|
||||||
|
import com.klp.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品面质量明细
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-02
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pt/productSurfaceSpec")
|
||||||
|
public class PtProductSurfaceSpecController extends BaseController {
|
||||||
|
|
||||||
|
private final IPtProductSurfaceSpecService iPtProductSurfaceSpecService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品面质量明细列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<PtProductSurfaceSpecVo> list(PtProductSurfaceSpecBo bo, PageQuery pageQuery) {
|
||||||
|
return iPtProductSurfaceSpecService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出产品面质量明细列表
|
||||||
|
*/
|
||||||
|
@Log(title = "产品面质量明细", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(PtProductSurfaceSpecBo bo, HttpServletResponse response) {
|
||||||
|
List<PtProductSurfaceSpecVo> list = iPtProductSurfaceSpecService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "产品面质量明细", PtProductSurfaceSpecVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取产品面质量明细详细信息
|
||||||
|
*
|
||||||
|
* @param surfaceId 主键
|
||||||
|
*/
|
||||||
|
@GetMapping("/{surfaceId}")
|
||||||
|
public R<PtProductSurfaceSpecVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long surfaceId) {
|
||||||
|
return R.ok(iPtProductSurfaceSpecService.queryById(surfaceId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产品面质量明细
|
||||||
|
*/
|
||||||
|
@Log(title = "产品面质量明细", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody PtProductSurfaceSpecBo bo) {
|
||||||
|
return toAjax(iPtProductSurfaceSpecService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产品面质量明细
|
||||||
|
*/
|
||||||
|
@Log(title = "产品面质量明细", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PtProductSurfaceSpecBo bo) {
|
||||||
|
return toAjax(iPtProductSurfaceSpecService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除产品面质量明细
|
||||||
|
*
|
||||||
|
* @param surfaceIds 主键串
|
||||||
|
*/
|
||||||
|
@Log(title = "产品面质量明细", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{surfaceIds}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] surfaceIds) {
|
||||||
|
return toAjax(iPtProductSurfaceSpecService.deleteWithValidByIds(Arrays.asList(surfaceIds), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
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.PtProductToleranceVo;
|
||||||
|
import com.klp.domain.bo.PtProductToleranceBo;
|
||||||
|
import com.klp.service.IPtProductToleranceService;
|
||||||
|
import com.klp.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品尺寸公差明细
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-02
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/klp/productTolerance")
|
||||||
|
public class PtProductToleranceController extends BaseController {
|
||||||
|
|
||||||
|
private final IPtProductToleranceService iPtProductToleranceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品尺寸公差明细列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<PtProductToleranceVo> list(PtProductToleranceBo bo, PageQuery pageQuery) {
|
||||||
|
return iPtProductToleranceService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出产品尺寸公差明细列表
|
||||||
|
*/
|
||||||
|
@Log(title = "产品尺寸公差明细", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(PtProductToleranceBo bo, HttpServletResponse response) {
|
||||||
|
List<PtProductToleranceVo> list = iPtProductToleranceService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "产品尺寸公差明细", PtProductToleranceVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取产品尺寸公差明细详细信息
|
||||||
|
*
|
||||||
|
* @param toleranceId 主键
|
||||||
|
*/
|
||||||
|
@GetMapping("/{toleranceId}")
|
||||||
|
public R<PtProductToleranceVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long toleranceId) {
|
||||||
|
return R.ok(iPtProductToleranceService.queryById(toleranceId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产品尺寸公差明细
|
||||||
|
*/
|
||||||
|
@Log(title = "产品尺寸公差明细", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody PtProductToleranceBo bo) {
|
||||||
|
return toAjax(iPtProductToleranceService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产品尺寸公差明细
|
||||||
|
*/
|
||||||
|
@Log(title = "产品尺寸公差明细", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PtProductToleranceBo bo) {
|
||||||
|
return toAjax(iPtProductToleranceService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除产品尺寸公差明细
|
||||||
|
*
|
||||||
|
* @param toleranceIds 主键串
|
||||||
|
*/
|
||||||
|
@Log(title = "产品尺寸公差明细", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{toleranceIds}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] toleranceIds) {
|
||||||
|
return toAjax(iPtProductToleranceService.deleteWithValidByIds(Arrays.asList(toleranceIds), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.klp.pt.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.klp.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品面质量明细对象 pt_product_surface_spec
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-02
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("pt_product_surface_spec")
|
||||||
|
public class PtProductSurfaceSpec extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "surface_id")
|
||||||
|
private Long surfaceId;
|
||||||
|
/**
|
||||||
|
* 关联产品标准ID
|
||||||
|
*/
|
||||||
|
private Long standardId;
|
||||||
|
/**
|
||||||
|
* FB/FC/FD
|
||||||
|
*/
|
||||||
|
private String surfaceQualityGrade;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal roughnessRaMin;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal roughnessRaMax;
|
||||||
|
/**
|
||||||
|
* 干/轻油/重油
|
||||||
|
*/
|
||||||
|
private String oilingType;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal oilingWeightMin;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal oilingWeightMax;
|
||||||
|
/**
|
||||||
|
* 允许/禁止缺陷
|
||||||
|
*/
|
||||||
|
private String defectDesc;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableLogic
|
||||||
|
private Long delFlag;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品尺寸公差明细对象 pt_product_tolerance
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-02
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("pt_product_tolerance")
|
||||||
|
public class PtProductTolerance extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "tolerance_id")
|
||||||
|
private Long toleranceId;
|
||||||
|
/**
|
||||||
|
* 关联产品标准ID
|
||||||
|
*/
|
||||||
|
private Long standardId;
|
||||||
|
/**
|
||||||
|
* THICKNESS/WIDTH/FLATNESS
|
||||||
|
*/
|
||||||
|
private String toleranceType;
|
||||||
|
/**
|
||||||
|
* 普通/精密
|
||||||
|
*/
|
||||||
|
private String toleranceGrade;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal applicableThickMin;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal applicableThickMax;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal applicableWidthMin;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal applicableWidthMax;
|
||||||
|
/**
|
||||||
|
* 上偏差
|
||||||
|
*/
|
||||||
|
private BigDecimal toleranceValuePlus;
|
||||||
|
/**
|
||||||
|
* 下偏差
|
||||||
|
*/
|
||||||
|
private BigDecimal toleranceValueMinus;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String toleranceUnit;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String measurementStandard;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long sortOrder;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableLogic
|
||||||
|
private Long delFlag;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.klp.pt.domain.bo;
|
||||||
|
|
||||||
|
import com.klp.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品面质量明细业务对象 pt_product_surface_spec
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-02
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class PtProductSurfaceSpecBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long surfaceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联产品标准ID
|
||||||
|
*/
|
||||||
|
private Long standardId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FB/FC/FD
|
||||||
|
*/
|
||||||
|
private String surfaceQualityGrade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal roughnessRaMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal roughnessRaMax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干/轻油/重油
|
||||||
|
*/
|
||||||
|
private String oilingType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal oilingWeightMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal oilingWeightMax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 允许/禁止缺陷
|
||||||
|
*/
|
||||||
|
private String defectDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品尺寸公差明细业务对象 pt_product_tolerance
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-02
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class PtProductToleranceBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long toleranceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联产品标准ID
|
||||||
|
*/
|
||||||
|
private Long standardId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* THICKNESS/WIDTH/FLATNESS
|
||||||
|
*/
|
||||||
|
private String toleranceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 普通/精密
|
||||||
|
*/
|
||||||
|
private String toleranceGrade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal applicableThickMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal applicableThickMax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal applicableWidthMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private BigDecimal applicableWidthMax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上偏差
|
||||||
|
*/
|
||||||
|
private BigDecimal toleranceValuePlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下偏差
|
||||||
|
*/
|
||||||
|
private BigDecimal toleranceValueMinus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String toleranceUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String measurementStandard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long sortOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
package com.klp.pt.domain.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品面质量明细视图对象 pt_product_surface_spec
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-02
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class PtProductSurfaceSpecVo {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long surfaceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联产品标准ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "关联产品标准ID")
|
||||||
|
private Long standardId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FB/FC/FD
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "FB/FC/FD")
|
||||||
|
private String surfaceQualityGrade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private BigDecimal roughnessRaMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private BigDecimal roughnessRaMax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干/轻油/重油
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "干/轻油/重油")
|
||||||
|
private String oilingType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private BigDecimal oilingWeightMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private BigDecimal oilingWeightMax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 允许/禁止缺陷
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "允许/禁止缺陷")
|
||||||
|
private String defectDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package com.klp.domain.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品尺寸公差明细视图对象 pt_product_tolerance
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-02
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class PtProductToleranceVo {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long toleranceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联产品标准ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "关联产品标准ID")
|
||||||
|
private Long standardId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* THICKNESS/WIDTH/FLATNESS
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "THICKNESS/WIDTH/FLATNESS")
|
||||||
|
private String toleranceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 普通/精密
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "普通/精密")
|
||||||
|
private String toleranceGrade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private BigDecimal applicableThickMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private BigDecimal applicableThickMax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private BigDecimal applicableWidthMin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private BigDecimal applicableWidthMax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上偏差
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "上偏差")
|
||||||
|
private BigDecimal toleranceValuePlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下偏差
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "下偏差")
|
||||||
|
private BigDecimal toleranceValueMinus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private String toleranceUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private String measurementStandard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long sortOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.klp.pt.mapper;
|
||||||
|
|
||||||
|
import com.klp.pt.domain.PtProductSurfaceSpec;
|
||||||
|
import com.klp.pt.domain.vo.PtProductSurfaceSpecVo;
|
||||||
|
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品面质量明细Mapper接口
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-02
|
||||||
|
*/
|
||||||
|
public interface PtProductSurfaceSpecMapper extends BaseMapperPlus<PtProductSurfaceSpecMapper, PtProductSurfaceSpec, PtProductSurfaceSpecVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.klp.mapper;
|
||||||
|
|
||||||
|
import com.klp.domain.PtProductTolerance;
|
||||||
|
import com.klp.domain.vo.PtProductToleranceVo;
|
||||||
|
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品尺寸公差明细Mapper接口
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-02
|
||||||
|
*/
|
||||||
|
public interface PtProductToleranceMapper extends BaseMapperPlus<PtProductToleranceMapper, PtProductTolerance, PtProductToleranceVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.klp.pt.service;
|
||||||
|
|
||||||
|
import com.klp.pt.domain.PtProductSurfaceSpec;
|
||||||
|
import com.klp.pt.domain.vo.PtProductSurfaceSpecVo;
|
||||||
|
import com.klp.pt.domain.bo.PtProductSurfaceSpecBo;
|
||||||
|
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-07-02
|
||||||
|
*/
|
||||||
|
public interface IPtProductSurfaceSpecService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品面质量明细
|
||||||
|
*/
|
||||||
|
PtProductSurfaceSpecVo queryById(Long surfaceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品面质量明细列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<PtProductSurfaceSpecVo> queryPageList(PtProductSurfaceSpecBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品面质量明细列表
|
||||||
|
*/
|
||||||
|
List<PtProductSurfaceSpecVo> queryList(PtProductSurfaceSpecBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产品面质量明细
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(PtProductSurfaceSpecBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产品面质量明细
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(PtProductSurfaceSpecBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除产品面质量明细信息
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.klp.service;
|
||||||
|
|
||||||
|
import com.klp.domain.PtProductTolerance;
|
||||||
|
import com.klp.domain.vo.PtProductToleranceVo;
|
||||||
|
import com.klp.domain.bo.PtProductToleranceBo;
|
||||||
|
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-07-02
|
||||||
|
*/
|
||||||
|
public interface IPtProductToleranceService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品尺寸公差明细
|
||||||
|
*/
|
||||||
|
PtProductToleranceVo queryById(Long toleranceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品尺寸公差明细列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<PtProductToleranceVo> queryPageList(PtProductToleranceBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品尺寸公差明细列表
|
||||||
|
*/
|
||||||
|
List<PtProductToleranceVo> queryList(PtProductToleranceBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产品尺寸公差明细
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(PtProductToleranceBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产品尺寸公差明细
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(PtProductToleranceBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除产品尺寸公差明细信息
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package com.klp.pt.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
|
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 lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.klp.pt.domain.bo.PtProductSurfaceSpecBo;
|
||||||
|
import com.klp.pt.domain.vo.PtProductSurfaceSpecVo;
|
||||||
|
import com.klp.pt.domain.PtProductSurfaceSpec;
|
||||||
|
import com.klp.pt.mapper.PtProductSurfaceSpecMapper;
|
||||||
|
import com.klp.pt.service.IPtProductSurfaceSpecService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品面质量明细Service业务层处理
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-02
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class PtProductSurfaceSpecServiceImpl implements IPtProductSurfaceSpecService {
|
||||||
|
|
||||||
|
private final PtProductSurfaceSpecMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品面质量明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PtProductSurfaceSpecVo queryById(Long surfaceId){
|
||||||
|
return baseMapper.selectVoById(surfaceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品面质量明细列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<PtProductSurfaceSpecVo> queryPageList(PtProductSurfaceSpecBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<PtProductSurfaceSpec> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<PtProductSurfaceSpecVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品面质量明细列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PtProductSurfaceSpecVo> queryList(PtProductSurfaceSpecBo bo) {
|
||||||
|
LambdaQueryWrapper<PtProductSurfaceSpec> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<PtProductSurfaceSpec> buildQueryWrapper(PtProductSurfaceSpecBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<PtProductSurfaceSpec> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(bo.getStandardId() != null, PtProductSurfaceSpec::getStandardId, bo.getStandardId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getSurfaceQualityGrade()), PtProductSurfaceSpec::getSurfaceQualityGrade, bo.getSurfaceQualityGrade());
|
||||||
|
lqw.eq(bo.getRoughnessRaMin() != null, PtProductSurfaceSpec::getRoughnessRaMin, bo.getRoughnessRaMin());
|
||||||
|
lqw.eq(bo.getRoughnessRaMax() != null, PtProductSurfaceSpec::getRoughnessRaMax, bo.getRoughnessRaMax());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getOilingType()), PtProductSurfaceSpec::getOilingType, bo.getOilingType());
|
||||||
|
lqw.eq(bo.getOilingWeightMin() != null, PtProductSurfaceSpec::getOilingWeightMin, bo.getOilingWeightMin());
|
||||||
|
lqw.eq(bo.getOilingWeightMax() != null, PtProductSurfaceSpec::getOilingWeightMax, bo.getOilingWeightMax());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDefectDesc()), PtProductSurfaceSpec::getDefectDesc, bo.getDefectDesc());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产品面质量明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(PtProductSurfaceSpecBo bo) {
|
||||||
|
PtProductSurfaceSpec add = BeanUtil.toBean(bo, PtProductSurfaceSpec.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setSurfaceId(add.getSurfaceId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产品面质量明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(PtProductSurfaceSpecBo bo) {
|
||||||
|
PtProductSurfaceSpec update = BeanUtil.toBean(bo, PtProductSurfaceSpec.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(PtProductSurfaceSpec entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除产品面质量明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteBatchIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
package com.klp.pt.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
|
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 lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.klp.domain.bo.PtProductToleranceBo;
|
||||||
|
import com.klp.domain.vo.PtProductToleranceVo;
|
||||||
|
import com.klp.domain.PtProductTolerance;
|
||||||
|
import com.klp.mapper.PtProductToleranceMapper;
|
||||||
|
import com.klp.service.IPtProductToleranceService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品尺寸公差明细Service业务层处理
|
||||||
|
*
|
||||||
|
* @author klp
|
||||||
|
* @date 2026-07-02
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class PtProductToleranceServiceImpl implements IPtProductToleranceService {
|
||||||
|
|
||||||
|
private final PtProductToleranceMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品尺寸公差明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PtProductToleranceVo queryById(Long toleranceId){
|
||||||
|
return baseMapper.selectVoById(toleranceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品尺寸公差明细列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<PtProductToleranceVo> queryPageList(PtProductToleranceBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<PtProductTolerance> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<PtProductToleranceVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询产品尺寸公差明细列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PtProductToleranceVo> queryList(PtProductToleranceBo bo) {
|
||||||
|
LambdaQueryWrapper<PtProductTolerance> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<PtProductTolerance> buildQueryWrapper(PtProductToleranceBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<PtProductTolerance> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(bo.getStandardId() != null, PtProductTolerance::getStandardId, bo.getStandardId());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getToleranceType()), PtProductTolerance::getToleranceType, bo.getToleranceType());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getToleranceGrade()), PtProductTolerance::getToleranceGrade, bo.getToleranceGrade());
|
||||||
|
lqw.eq(bo.getApplicableThickMin() != null, PtProductTolerance::getApplicableThickMin, bo.getApplicableThickMin());
|
||||||
|
lqw.eq(bo.getApplicableThickMax() != null, PtProductTolerance::getApplicableThickMax, bo.getApplicableThickMax());
|
||||||
|
lqw.eq(bo.getApplicableWidthMin() != null, PtProductTolerance::getApplicableWidthMin, bo.getApplicableWidthMin());
|
||||||
|
lqw.eq(bo.getApplicableWidthMax() != null, PtProductTolerance::getApplicableWidthMax, bo.getApplicableWidthMax());
|
||||||
|
lqw.eq(bo.getToleranceValuePlus() != null, PtProductTolerance::getToleranceValuePlus, bo.getToleranceValuePlus());
|
||||||
|
lqw.eq(bo.getToleranceValueMinus() != null, PtProductTolerance::getToleranceValueMinus, bo.getToleranceValueMinus());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getToleranceUnit()), PtProductTolerance::getToleranceUnit, bo.getToleranceUnit());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getMeasurementStandard()), PtProductTolerance::getMeasurementStandard, bo.getMeasurementStandard());
|
||||||
|
lqw.eq(bo.getSortOrder() != null, PtProductTolerance::getSortOrder, bo.getSortOrder());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产品尺寸公差明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(PtProductToleranceBo bo) {
|
||||||
|
PtProductTolerance add = BeanUtil.toBean(bo, PtProductTolerance.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setToleranceId(add.getToleranceId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产品尺寸公差明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(PtProductToleranceBo bo) {
|
||||||
|
PtProductTolerance update = BeanUtil.toBean(bo, PtProductTolerance.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(PtProductTolerance entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除产品尺寸公差明细
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteBatchIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.klp.pt.mapper.PtProductSurfaceSpecMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.klp.pt.domain.PtProductSurfaceSpec" id="PtProductSurfaceSpecResult">
|
||||||
|
<result property="surfaceId" column="surface_id"/>
|
||||||
|
<result property="standardId" column="standard_id"/>
|
||||||
|
<result property="surfaceQualityGrade" column="surface_quality_grade"/>
|
||||||
|
<result property="roughnessRaMin" column="roughness_ra_min"/>
|
||||||
|
<result property="roughnessRaMax" column="roughness_ra_max"/>
|
||||||
|
<result property="oilingType" column="oiling_type"/>
|
||||||
|
<result property="oilingWeightMin" column="oiling_weight_min"/>
|
||||||
|
<result property="oilingWeightMax" column="oiling_weight_max"/>
|
||||||
|
<result property="defectDesc" column="defect_desc"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="delFlag" column="del_flag"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.klp.mapper.PtProductToleranceMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.klp.domain.PtProductTolerance" id="PtProductToleranceResult">
|
||||||
|
<result property="toleranceId" column="tolerance_id"/>
|
||||||
|
<result property="standardId" column="standard_id"/>
|
||||||
|
<result property="toleranceType" column="tolerance_type"/>
|
||||||
|
<result property="toleranceGrade" column="tolerance_grade"/>
|
||||||
|
<result property="applicableThickMin" column="applicable_thick_min"/>
|
||||||
|
<result property="applicableThickMax" column="applicable_thick_max"/>
|
||||||
|
<result property="applicableWidthMin" column="applicable_width_min"/>
|
||||||
|
<result property="applicableWidthMax" column="applicable_width_max"/>
|
||||||
|
<result property="toleranceValuePlus" column="tolerance_value_plus"/>
|
||||||
|
<result property="toleranceValueMinus" column="tolerance_value_minus"/>
|
||||||
|
<result property="toleranceUnit" column="tolerance_unit"/>
|
||||||
|
<result property="measurementStandard" column="measurement_standard"/>
|
||||||
|
<result property="sortOrder" column="sort_order"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="delFlag" column="del_flag"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user