Merge remote-tracking branch 'origin/master'
commit
c5703689a4
@ -0,0 +1,117 @@
|
||||
package org.dromara.qms.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.qms.domain.vo.QcInspectionItemCategoryVo;
|
||||
import org.dromara.qms.domain.bo.QcInspectionItemCategoryBo;
|
||||
import org.dromara.qms.service.IQcInspectionItemCategoryService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检测项类别
|
||||
* 前端访问路由地址为:/qms/qcInspectionItemCategory
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/qcInspectionItemCategory")
|
||||
public class QcInspectionItemCategoryController extends BaseController {
|
||||
|
||||
private final IQcInspectionItemCategoryService qcInspectionItemCategoryService;
|
||||
|
||||
/**
|
||||
* 查询检测项类别列表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionItemCategory:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<QcInspectionItemCategoryVo> list(QcInspectionItemCategoryBo bo, PageQuery pageQuery) {
|
||||
return qcInspectionItemCategoryService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检测项类别列表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionItemCategory:export")
|
||||
@Log(title = "检测项类别", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(QcInspectionItemCategoryBo bo, HttpServletResponse response) {
|
||||
List<QcInspectionItemCategoryVo> list = qcInspectionItemCategoryService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "检测项类别", QcInspectionItemCategoryVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检测项类别详细信息
|
||||
*
|
||||
* @param categoryId 主键
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionItemCategory:query")
|
||||
@GetMapping("/{categoryId}")
|
||||
public R<QcInspectionItemCategoryVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long categoryId) {
|
||||
return R.ok(qcInspectionItemCategoryService.queryById(categoryId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检测项类别
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionItemCategory:add")
|
||||
@Log(title = "检测项类别", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody QcInspectionItemCategoryBo bo) {
|
||||
return toAjax(qcInspectionItemCategoryService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检测项类别
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionItemCategory:edit")
|
||||
@Log(title = "检测项类别", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QcInspectionItemCategoryBo bo) {
|
||||
return toAjax(qcInspectionItemCategoryService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检测项类别
|
||||
*
|
||||
* @param categoryIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionItemCategory:remove")
|
||||
@Log(title = "检测项类别", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{categoryIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] categoryIds) {
|
||||
return toAjax(qcInspectionItemCategoryService.deleteWithValidByIds(List.of(categoryIds), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询检测项类别列表
|
||||
*/
|
||||
|
||||
@GetMapping("/getQcInspectionItemCategoryList")
|
||||
public R<List<QcInspectionItemCategoryVo>> getQcInspectionItemCategoryList(QcInspectionItemCategoryBo bo) {
|
||||
List<QcInspectionItemCategoryVo> list = qcInspectionItemCategoryService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package org.dromara.qms.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.qms.domain.vo.QcInspectionItemVo;
|
||||
import org.dromara.qms.domain.bo.QcInspectionItemBo;
|
||||
import org.dromara.qms.service.IQcInspectionItemService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检测项定义
|
||||
* 前端访问路由地址为:/qms/qcInspectionItem
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/qcInspectionItem")
|
||||
public class QcInspectionItemController extends BaseController {
|
||||
|
||||
private final IQcInspectionItemService qcInspectionItemService;
|
||||
|
||||
/**
|
||||
* 查询检测项定义列表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionItem:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<QcInspectionItemVo> list(QcInspectionItemBo bo, PageQuery pageQuery) {
|
||||
return qcInspectionItemService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检测项定义列表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionItem:export")
|
||||
@Log(title = "检测项定义", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(QcInspectionItemBo bo, HttpServletResponse response) {
|
||||
List<QcInspectionItemVo> list = qcInspectionItemService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "检测项定义", QcInspectionItemVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检测项定义详细信息
|
||||
*
|
||||
* @param itemId 主键
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionItem:query")
|
||||
@GetMapping("/{itemId}")
|
||||
public R<QcInspectionItemVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long itemId) {
|
||||
return R.ok(qcInspectionItemService.queryById(itemId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检测项定义
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionItem:add")
|
||||
@Log(title = "检测项定义", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody QcInspectionItemBo bo) {
|
||||
return toAjax(qcInspectionItemService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检测项定义
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionItem:edit")
|
||||
@Log(title = "检测项定义", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QcInspectionItemBo bo) {
|
||||
return toAjax(qcInspectionItemService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检测项定义
|
||||
*
|
||||
* @param itemIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionItem:remove")
|
||||
@Log(title = "检测项定义", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{itemIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] itemIds) {
|
||||
return toAjax(qcInspectionItemService.deleteWithValidByIds(List.of(itemIds), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询检测项定义列表
|
||||
*/
|
||||
|
||||
@GetMapping("/getQcInspectionItemList")
|
||||
public R<List<QcInspectionItemVo>> getQcInspectionItemList(QcInspectionItemBo bo) {
|
||||
List<QcInspectionItemVo> list = qcInspectionItemService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package org.dromara.qms.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.qms.domain.vo.QcInspectionMainVo;
|
||||
import org.dromara.qms.domain.bo.QcInspectionMainBo;
|
||||
import org.dromara.qms.service.IQcInspectionMainService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 质检主表
|
||||
* 前端访问路由地址为:/qms/QcInspectionMain
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/QcInspectionMain")
|
||||
public class QcInspectionMainController extends BaseController {
|
||||
|
||||
private final IQcInspectionMainService qcInspectionMainService;
|
||||
|
||||
/**
|
||||
* 查询质检主表列表
|
||||
*/
|
||||
@SaCheckPermission("qms:QcInspectionMain:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<QcInspectionMainVo> list(QcInspectionMainBo bo, PageQuery pageQuery) {
|
||||
return qcInspectionMainService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出质检主表列表
|
||||
*/
|
||||
@SaCheckPermission("qms:QcInspectionMain:export")
|
||||
@Log(title = "质检主表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(QcInspectionMainBo bo, HttpServletResponse response) {
|
||||
List<QcInspectionMainVo> list = qcInspectionMainService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "质检主表", QcInspectionMainVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取质检主表详细信息
|
||||
*
|
||||
* @param inspectionId 主键
|
||||
*/
|
||||
@SaCheckPermission("qms:QcInspectionMain:query")
|
||||
@GetMapping("/{inspectionId}")
|
||||
public R<QcInspectionMainVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long inspectionId) {
|
||||
return R.ok(qcInspectionMainService.queryById(inspectionId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增质检主表
|
||||
*/
|
||||
@SaCheckPermission("qms:QcInspectionMain:add")
|
||||
@Log(title = "质检主表", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody QcInspectionMainBo bo) {
|
||||
return toAjax(qcInspectionMainService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改质检主表
|
||||
*/
|
||||
@SaCheckPermission("qms:QcInspectionMain:edit")
|
||||
@Log(title = "质检主表", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QcInspectionMainBo bo) {
|
||||
return toAjax(qcInspectionMainService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除质检主表
|
||||
*
|
||||
* @param inspectionIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("qms:QcInspectionMain:remove")
|
||||
@Log(title = "质检主表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{inspectionIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] inspectionIds) {
|
||||
return toAjax(qcInspectionMainService.deleteWithValidByIds(List.of(inspectionIds), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询质检主表列表
|
||||
*/
|
||||
|
||||
@GetMapping("/getQcInspectionMainList")
|
||||
public R<List<QcInspectionMainVo>> getQcInspectionMainList(QcInspectionMainBo bo) {
|
||||
List<QcInspectionMainVo> list = qcInspectionMainService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package org.dromara.qms.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.qms.domain.vo.QcInspectionResultVo;
|
||||
import org.dromara.qms.domain.bo.QcInspectionResultBo;
|
||||
import org.dromara.qms.service.IQcInspectionResultService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 质检结果子表
|
||||
* 前端访问路由地址为:/qms/qcInspectionResult
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/qcInspectionResult")
|
||||
public class QcInspectionResultController extends BaseController {
|
||||
|
||||
private final IQcInspectionResultService qcInspectionResultService;
|
||||
|
||||
/**
|
||||
* 查询质检结果子表列表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionResult:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<QcInspectionResultVo> list(QcInspectionResultBo bo, PageQuery pageQuery) {
|
||||
return qcInspectionResultService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出质检结果子表列表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionResult:export")
|
||||
@Log(title = "质检结果子表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(QcInspectionResultBo bo, HttpServletResponse response) {
|
||||
List<QcInspectionResultVo> list = qcInspectionResultService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "质检结果子表", QcInspectionResultVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取质检结果子表详细信息
|
||||
*
|
||||
* @param resultId 主键
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionResult:query")
|
||||
@GetMapping("/{resultId}")
|
||||
public R<QcInspectionResultVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long resultId) {
|
||||
return R.ok(qcInspectionResultService.queryById(resultId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增质检结果子表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionResult:add")
|
||||
@Log(title = "质检结果子表", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody QcInspectionResultBo bo) {
|
||||
return toAjax(qcInspectionResultService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改质检结果子表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionResult:edit")
|
||||
@Log(title = "质检结果子表", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QcInspectionResultBo bo) {
|
||||
return toAjax(qcInspectionResultService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除质检结果子表
|
||||
*
|
||||
* @param resultIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionResult:remove")
|
||||
@Log(title = "质检结果子表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{resultIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] resultIds) {
|
||||
return toAjax(qcInspectionResultService.deleteWithValidByIds(List.of(resultIds), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询质检结果子表列表
|
||||
*/
|
||||
|
||||
@GetMapping("/getQcInspectionResultList")
|
||||
public R<List<QcInspectionResultVo>> getQcInspectionResultList(QcInspectionResultBo bo) {
|
||||
List<QcInspectionResultVo> list = qcInspectionResultService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package org.dromara.qms.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.qms.domain.vo.QcInspectionTemplateVo;
|
||||
import org.dromara.qms.domain.bo.QcInspectionTemplateBo;
|
||||
import org.dromara.qms.service.IQcInspectionTemplateService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检测模板主
|
||||
* 前端访问路由地址为:/qms/qcInspectionTemplate
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/qcInspectionTemplate")
|
||||
public class QcInspectionTemplateController extends BaseController {
|
||||
|
||||
private final IQcInspectionTemplateService qcInspectionTemplateService;
|
||||
|
||||
/**
|
||||
* 查询检测模板主列表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionTemplate:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<QcInspectionTemplateVo> list(QcInspectionTemplateBo bo, PageQuery pageQuery) {
|
||||
return qcInspectionTemplateService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检测模板主列表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionTemplate:export")
|
||||
@Log(title = "检测模板主", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(QcInspectionTemplateBo bo, HttpServletResponse response) {
|
||||
List<QcInspectionTemplateVo> list = qcInspectionTemplateService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "检测模板主", QcInspectionTemplateVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检测模板主详细信息
|
||||
*
|
||||
* @param templateId 主键
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionTemplate:query")
|
||||
@GetMapping("/{templateId}")
|
||||
public R<QcInspectionTemplateVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long templateId) {
|
||||
return R.ok(qcInspectionTemplateService.queryById(templateId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检测模板主
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionTemplate:add")
|
||||
@Log(title = "检测模板主", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody QcInspectionTemplateBo bo) {
|
||||
return toAjax(qcInspectionTemplateService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检测模板主
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionTemplate:edit")
|
||||
@Log(title = "检测模板主", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QcInspectionTemplateBo bo) {
|
||||
return toAjax(qcInspectionTemplateService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检测模板主
|
||||
*
|
||||
* @param templateIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionTemplate:remove")
|
||||
@Log(title = "检测模板主", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{templateIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] templateIds) {
|
||||
return toAjax(qcInspectionTemplateService.deleteWithValidByIds(List.of(templateIds), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询检测模板主列表
|
||||
*/
|
||||
|
||||
@GetMapping("/getQcInspectionTemplateList")
|
||||
public R<List<QcInspectionTemplateVo>> getQcInspectionTemplateList(QcInspectionTemplateBo bo) {
|
||||
List<QcInspectionTemplateVo> list = qcInspectionTemplateService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package org.dromara.qms.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.qms.domain.vo.QcInspectionTypeVo;
|
||||
import org.dromara.qms.domain.bo.QcInspectionTypeBo;
|
||||
import org.dromara.qms.service.IQcInspectionTypeService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检测类型
|
||||
* 前端访问路由地址为:/qms/qcInspectionType
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/qcInspectionType")
|
||||
public class QcInspectionTypeController extends BaseController {
|
||||
|
||||
private final IQcInspectionTypeService qcInspectionTypeService;
|
||||
|
||||
/**
|
||||
* 查询检测类型列表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionType:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<QcInspectionTypeVo> list(QcInspectionTypeBo bo, PageQuery pageQuery) {
|
||||
return qcInspectionTypeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检测类型列表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionType:export")
|
||||
@Log(title = "检测类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(QcInspectionTypeBo bo, HttpServletResponse response) {
|
||||
List<QcInspectionTypeVo> list = qcInspectionTypeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "检测类型", QcInspectionTypeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检测类型详细信息
|
||||
*
|
||||
* @param typeId 主键
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionType:query")
|
||||
@GetMapping("/{typeId}")
|
||||
public R<QcInspectionTypeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long typeId) {
|
||||
return R.ok(qcInspectionTypeService.queryById(typeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检测类型
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionType:add")
|
||||
@Log(title = "检测类型", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody QcInspectionTypeBo bo) {
|
||||
return toAjax(qcInspectionTypeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检测类型
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionType:edit")
|
||||
@Log(title = "检测类型", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QcInspectionTypeBo bo) {
|
||||
return toAjax(qcInspectionTypeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检测类型
|
||||
*
|
||||
* @param typeIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("qms:qcInspectionType:remove")
|
||||
@Log(title = "检测类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{typeIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] typeIds) {
|
||||
return toAjax(qcInspectionTypeService.deleteWithValidByIds(List.of(typeIds), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询检测类型列表
|
||||
*/
|
||||
|
||||
@GetMapping("/getQcInspectionTypeList")
|
||||
public R<List<QcInspectionTypeVo>> getQcInspectionTypeList(QcInspectionTypeBo bo) {
|
||||
List<QcInspectionTypeVo> list = qcInspectionTypeService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package org.dromara.qms.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.qms.domain.vo.QcTemplateItemVo;
|
||||
import org.dromara.qms.domain.bo.QcTemplateItemBo;
|
||||
import org.dromara.qms.service.IQcTemplateItemService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检测模板子表
|
||||
* 前端访问路由地址为:/qms/qcTemplateItem
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/qcTemplateItem")
|
||||
public class QcTemplateItemController extends BaseController {
|
||||
|
||||
private final IQcTemplateItemService qcTemplateItemService;
|
||||
|
||||
/**
|
||||
* 查询检测模板子表列表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcTemplateItem:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<QcTemplateItemVo> list(QcTemplateItemBo bo, PageQuery pageQuery) {
|
||||
return qcTemplateItemService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检测模板子表列表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcTemplateItem:export")
|
||||
@Log(title = "检测模板子表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(QcTemplateItemBo bo, HttpServletResponse response) {
|
||||
List<QcTemplateItemVo> list = qcTemplateItemService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "检测模板子表", QcTemplateItemVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检测模板子表详细信息
|
||||
*
|
||||
* @param templateItemId 主键
|
||||
*/
|
||||
@SaCheckPermission("qms:qcTemplateItem:query")
|
||||
@GetMapping("/{templateItemId}")
|
||||
public R<QcTemplateItemVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long templateItemId) {
|
||||
return R.ok(qcTemplateItemService.queryById(templateItemId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检测模板子表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcTemplateItem:add")
|
||||
@Log(title = "检测模板子表", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody QcTemplateItemBo bo) {
|
||||
return toAjax(qcTemplateItemService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检测模板子表
|
||||
*/
|
||||
@SaCheckPermission("qms:qcTemplateItem:edit")
|
||||
@Log(title = "检测模板子表", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody QcTemplateItemBo bo) {
|
||||
return toAjax(qcTemplateItemService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检测模板子表
|
||||
*
|
||||
* @param templateItemIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("qms:qcTemplateItem:remove")
|
||||
@Log(title = "检测模板子表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{templateItemIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] templateItemIds) {
|
||||
return toAjax(qcTemplateItemService.deleteWithValidByIds(List.of(templateItemIds), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 下拉框查询检测模板子表列表
|
||||
*/
|
||||
|
||||
@GetMapping("/getQcTemplateItemList")
|
||||
public R<List<QcTemplateItemVo>> getQcTemplateItemList(QcTemplateItemBo bo) {
|
||||
List<QcTemplateItemVo> list = qcTemplateItemService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package org.dromara.qms.mapper;
|
||||
|
||||
import org.dromara.qms.domain.bo.QcInspectionItemCategoryBo;
|
||||
import org.dromara.qms.domain.QcInspectionItemCategory;
|
||||
import org.dromara.qms.domain.vo.QcInspectionItemCategoryVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 检测项类别Mapper接口
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface QcInspectionItemCategoryMapper extends BaseMapperPlus<QcInspectionItemCategory, QcInspectionItemCategoryVo> {
|
||||
|
||||
/**
|
||||
* 查询检测项类别列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测项类别列表
|
||||
*/
|
||||
List<QcInspectionItemCategoryVo> selectVoList(QcInspectionItemCategoryBo bo);
|
||||
|
||||
/**
|
||||
* 根据主键查询检测项类别
|
||||
*
|
||||
* @param categoryId 主键
|
||||
* @return 检测项类别
|
||||
*/
|
||||
QcInspectionItemCategoryVo selectVoByCategoryId(Long categoryId);
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package org.dromara.qms.mapper;
|
||||
|
||||
import org.dromara.qms.domain.bo.QcInspectionItemBo;
|
||||
import org.dromara.qms.domain.QcInspectionItem;
|
||||
import org.dromara.qms.domain.vo.QcInspectionItemVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 检测项定义Mapper接口
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface QcInspectionItemMapper extends BaseMapperPlus<QcInspectionItem, QcInspectionItemVo> {
|
||||
|
||||
/**
|
||||
* 查询检测项定义列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测项定义列表
|
||||
*/
|
||||
List<QcInspectionItemVo> selectVoList(QcInspectionItemBo bo);
|
||||
|
||||
/**
|
||||
* 根据主键查询检测项定义
|
||||
*
|
||||
* @param itemId 主键
|
||||
* @return 检测项定义
|
||||
*/
|
||||
QcInspectionItemVo selectVoByItemId(Long itemId);
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package org.dromara.qms.mapper;
|
||||
|
||||
import org.dromara.qms.domain.bo.QcInspectionMainBo;
|
||||
import org.dromara.qms.domain.QcInspectionMain;
|
||||
import org.dromara.qms.domain.vo.QcInspectionMainVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 质检主表Mapper接口
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface QcInspectionMainMapper extends BaseMapperPlus<QcInspectionMain, QcInspectionMainVo> {
|
||||
|
||||
/**
|
||||
* 查询质检主表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 质检主表列表
|
||||
*/
|
||||
List<QcInspectionMainVo> selectVoList(QcInspectionMainBo bo);
|
||||
|
||||
/**
|
||||
* 根据主键查询质检主表
|
||||
*
|
||||
* @param inspectionId 主键
|
||||
* @return 质检主表
|
||||
*/
|
||||
QcInspectionMainVo selectVoByInspectionId(Long inspectionId);
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package org.dromara.qms.mapper;
|
||||
|
||||
import org.dromara.qms.domain.bo.QcInspectionResultBo;
|
||||
import org.dromara.qms.domain.QcInspectionResult;
|
||||
import org.dromara.qms.domain.vo.QcInspectionResultVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 质检结果子表Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface QcInspectionResultMapper extends BaseMapperPlus<QcInspectionResult, QcInspectionResultVo> {
|
||||
|
||||
/**
|
||||
* 查询质检结果子表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 质检结果子表列表
|
||||
*/
|
||||
List<QcInspectionResultVo> selectVoList(QcInspectionResultBo bo);
|
||||
|
||||
/**
|
||||
* 根据主键查询质检结果子表
|
||||
*
|
||||
* @param resultId 主键
|
||||
* @return 质检结果子表
|
||||
*/
|
||||
QcInspectionResultVo selectVoByResultId(Long resultId);
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package org.dromara.qms.mapper;
|
||||
|
||||
import org.dromara.qms.domain.bo.QcInspectionTemplateBo;
|
||||
import org.dromara.qms.domain.QcInspectionTemplate;
|
||||
import org.dromara.qms.domain.vo.QcInspectionTemplateVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 检测模板主Mapper接口
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface QcInspectionTemplateMapper extends BaseMapperPlus<QcInspectionTemplate, QcInspectionTemplateVo> {
|
||||
|
||||
/**
|
||||
* 查询检测模板主列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测模板主列表
|
||||
*/
|
||||
List<QcInspectionTemplateVo> selectVoList(QcInspectionTemplateBo bo);
|
||||
|
||||
/**
|
||||
* 根据主键查询检测模板主
|
||||
*
|
||||
* @param templateId 主键
|
||||
* @return 检测模板主
|
||||
*/
|
||||
QcInspectionTemplateVo selectVoByTemplateId(Long templateId);
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package org.dromara.qms.mapper;
|
||||
|
||||
import org.dromara.qms.domain.bo.QcInspectionTypeBo;
|
||||
import org.dromara.qms.domain.QcInspectionType;
|
||||
import org.dromara.qms.domain.vo.QcInspectionTypeVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 检测类型Mapper接口
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface QcInspectionTypeMapper extends BaseMapperPlus<QcInspectionType, QcInspectionTypeVo> {
|
||||
|
||||
/**
|
||||
* 查询检测类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测类型列表
|
||||
*/
|
||||
List<QcInspectionTypeVo> selectVoList(QcInspectionTypeBo bo);
|
||||
|
||||
/**
|
||||
* 根据主键查询检测类型
|
||||
*
|
||||
* @param typeId 主键
|
||||
* @return 检测类型
|
||||
*/
|
||||
QcInspectionTypeVo selectVoByTypeId(Long typeId);
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package org.dromara.qms.mapper;
|
||||
|
||||
import org.dromara.qms.domain.bo.QcTemplateItemBo;
|
||||
import org.dromara.qms.domain.QcTemplateItem;
|
||||
import org.dromara.qms.domain.vo.QcTemplateItemVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 检测模板子表Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface QcTemplateItemMapper extends BaseMapperPlus<QcTemplateItem, QcTemplateItemVo> {
|
||||
|
||||
/**
|
||||
* 查询检测模板子表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测模板子表列表
|
||||
*/
|
||||
List<QcTemplateItemVo> selectVoList(QcTemplateItemBo bo);
|
||||
|
||||
/**
|
||||
* 根据主键查询检测模板子表
|
||||
*
|
||||
* @param templateItemId 主键
|
||||
* @return 检测模板子表
|
||||
*/
|
||||
QcTemplateItemVo selectVoByTemplateItemId(Long templateItemId);
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.qms.service;
|
||||
|
||||
import org.dromara.qms.domain.QcInspectionItemCategory;
|
||||
import org.dromara.qms.domain.vo.QcInspectionItemCategoryVo;
|
||||
import org.dromara.qms.domain.bo.QcInspectionItemCategoryBo;
|
||||
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 zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface IQcInspectionItemCategoryService {
|
||||
|
||||
/**
|
||||
* 查询检测项类别
|
||||
*
|
||||
* @param categoryId 主键
|
||||
* @return 检测项类别
|
||||
*/
|
||||
QcInspectionItemCategoryVo queryById(Long categoryId);
|
||||
|
||||
/**
|
||||
* 分页查询检测项类别列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 检测项类别分页列表
|
||||
*/
|
||||
TableDataInfo<QcInspectionItemCategoryVo> queryPageList(QcInspectionItemCategoryBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的检测项类别列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测项类别列表
|
||||
*/
|
||||
List<QcInspectionItemCategoryVo> queryList(QcInspectionItemCategoryBo bo);
|
||||
|
||||
/**
|
||||
* 新增检测项类别
|
||||
*
|
||||
* @param bo 检测项类别
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(QcInspectionItemCategoryBo bo);
|
||||
|
||||
/**
|
||||
* 修改检测项类别
|
||||
*
|
||||
* @param bo 检测项类别
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(QcInspectionItemCategoryBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除检测项类别信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.qms.service;
|
||||
|
||||
import org.dromara.qms.domain.QcInspectionItem;
|
||||
import org.dromara.qms.domain.vo.QcInspectionItemVo;
|
||||
import org.dromara.qms.domain.bo.QcInspectionItemBo;
|
||||
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 zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface IQcInspectionItemService {
|
||||
|
||||
/**
|
||||
* 查询检测项定义
|
||||
*
|
||||
* @param itemId 主键
|
||||
* @return 检测项定义
|
||||
*/
|
||||
QcInspectionItemVo queryById(Long itemId);
|
||||
|
||||
/**
|
||||
* 分页查询检测项定义列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 检测项定义分页列表
|
||||
*/
|
||||
TableDataInfo<QcInspectionItemVo> queryPageList(QcInspectionItemBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的检测项定义列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测项定义列表
|
||||
*/
|
||||
List<QcInspectionItemVo> queryList(QcInspectionItemBo bo);
|
||||
|
||||
/**
|
||||
* 新增检测项定义
|
||||
*
|
||||
* @param bo 检测项定义
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(QcInspectionItemBo bo);
|
||||
|
||||
/**
|
||||
* 修改检测项定义
|
||||
*
|
||||
* @param bo 检测项定义
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(QcInspectionItemBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除检测项定义信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.qms.service;
|
||||
|
||||
import org.dromara.qms.domain.QcInspectionMain;
|
||||
import org.dromara.qms.domain.vo.QcInspectionMainVo;
|
||||
import org.dromara.qms.domain.bo.QcInspectionMainBo;
|
||||
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 zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface IQcInspectionMainService {
|
||||
|
||||
/**
|
||||
* 查询质检主表
|
||||
*
|
||||
* @param inspectionId 主键
|
||||
* @return 质检主表
|
||||
*/
|
||||
QcInspectionMainVo queryById(Long inspectionId);
|
||||
|
||||
/**
|
||||
* 分页查询质检主表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 质检主表分页列表
|
||||
*/
|
||||
TableDataInfo<QcInspectionMainVo> queryPageList(QcInspectionMainBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的质检主表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 质检主表列表
|
||||
*/
|
||||
List<QcInspectionMainVo> queryList(QcInspectionMainBo bo);
|
||||
|
||||
/**
|
||||
* 新增质检主表
|
||||
*
|
||||
* @param bo 质检主表
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(QcInspectionMainBo bo);
|
||||
|
||||
/**
|
||||
* 修改质检主表
|
||||
*
|
||||
* @param bo 质检主表
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(QcInspectionMainBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除质检主表信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.qms.service;
|
||||
|
||||
import org.dromara.qms.domain.QcInspectionResult;
|
||||
import org.dromara.qms.domain.vo.QcInspectionResultVo;
|
||||
import org.dromara.qms.domain.bo.QcInspectionResultBo;
|
||||
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-07-14
|
||||
*/
|
||||
public interface IQcInspectionResultService {
|
||||
|
||||
/**
|
||||
* 查询质检结果子表
|
||||
*
|
||||
* @param resultId 主键
|
||||
* @return 质检结果子表
|
||||
*/
|
||||
QcInspectionResultVo queryById(Long resultId);
|
||||
|
||||
/**
|
||||
* 分页查询质检结果子表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 质检结果子表分页列表
|
||||
*/
|
||||
TableDataInfo<QcInspectionResultVo> queryPageList(QcInspectionResultBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的质检结果子表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 质检结果子表列表
|
||||
*/
|
||||
List<QcInspectionResultVo> queryList(QcInspectionResultBo bo);
|
||||
|
||||
/**
|
||||
* 新增质检结果子表
|
||||
*
|
||||
* @param bo 质检结果子表
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(QcInspectionResultBo bo);
|
||||
|
||||
/**
|
||||
* 修改质检结果子表
|
||||
*
|
||||
* @param bo 质检结果子表
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(QcInspectionResultBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除质检结果子表信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.qms.service;
|
||||
|
||||
import org.dromara.qms.domain.QcInspectionTemplate;
|
||||
import org.dromara.qms.domain.vo.QcInspectionTemplateVo;
|
||||
import org.dromara.qms.domain.bo.QcInspectionTemplateBo;
|
||||
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 zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface IQcInspectionTemplateService {
|
||||
|
||||
/**
|
||||
* 查询检测模板主
|
||||
*
|
||||
* @param templateId 主键
|
||||
* @return 检测模板主
|
||||
*/
|
||||
QcInspectionTemplateVo queryById(Long templateId);
|
||||
|
||||
/**
|
||||
* 分页查询检测模板主列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 检测模板主分页列表
|
||||
*/
|
||||
TableDataInfo<QcInspectionTemplateVo> queryPageList(QcInspectionTemplateBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的检测模板主列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测模板主列表
|
||||
*/
|
||||
List<QcInspectionTemplateVo> queryList(QcInspectionTemplateBo bo);
|
||||
|
||||
/**
|
||||
* 新增检测模板主
|
||||
*
|
||||
* @param bo 检测模板主
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(QcInspectionTemplateBo bo);
|
||||
|
||||
/**
|
||||
* 修改检测模板主
|
||||
*
|
||||
* @param bo 检测模板主
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(QcInspectionTemplateBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除检测模板主信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.qms.service;
|
||||
|
||||
import org.dromara.qms.domain.QcInspectionType;
|
||||
import org.dromara.qms.domain.vo.QcInspectionTypeVo;
|
||||
import org.dromara.qms.domain.bo.QcInspectionTypeBo;
|
||||
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 zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface IQcInspectionTypeService {
|
||||
|
||||
/**
|
||||
* 查询检测类型
|
||||
*
|
||||
* @param typeId 主键
|
||||
* @return 检测类型
|
||||
*/
|
||||
QcInspectionTypeVo queryById(Long typeId);
|
||||
|
||||
/**
|
||||
* 分页查询检测类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 检测类型分页列表
|
||||
*/
|
||||
TableDataInfo<QcInspectionTypeVo> queryPageList(QcInspectionTypeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的检测类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测类型列表
|
||||
*/
|
||||
List<QcInspectionTypeVo> queryList(QcInspectionTypeBo bo);
|
||||
|
||||
/**
|
||||
* 新增检测类型
|
||||
*
|
||||
* @param bo 检测类型
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(QcInspectionTypeBo bo);
|
||||
|
||||
/**
|
||||
* 修改检测类型
|
||||
*
|
||||
* @param bo 检测类型
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(QcInspectionTypeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除检测类型信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.qms.service;
|
||||
|
||||
import org.dromara.qms.domain.QcTemplateItem;
|
||||
import org.dromara.qms.domain.vo.QcTemplateItemVo;
|
||||
import org.dromara.qms.domain.bo.QcTemplateItemBo;
|
||||
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-07-14
|
||||
*/
|
||||
public interface IQcTemplateItemService {
|
||||
|
||||
/**
|
||||
* 查询检测模板子表
|
||||
*
|
||||
* @param templateItemId 主键
|
||||
* @return 检测模板子表
|
||||
*/
|
||||
QcTemplateItemVo queryById(Long templateItemId);
|
||||
|
||||
/**
|
||||
* 分页查询检测模板子表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 检测模板子表分页列表
|
||||
*/
|
||||
TableDataInfo<QcTemplateItemVo> queryPageList(QcTemplateItemBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的检测模板子表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测模板子表列表
|
||||
*/
|
||||
List<QcTemplateItemVo> queryList(QcTemplateItemBo bo);
|
||||
|
||||
/**
|
||||
* 新增检测模板子表
|
||||
*
|
||||
* @param bo 检测模板子表
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(QcTemplateItemBo bo);
|
||||
|
||||
/**
|
||||
* 修改检测模板子表
|
||||
*
|
||||
* @param bo 检测模板子表
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(QcTemplateItemBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除检测模板子表信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
package org.dromara.qms.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.qms.domain.QcInspectionType;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.qms.domain.bo.QcInspectionItemCategoryBo;
|
||||
import org.dromara.qms.domain.vo.QcInspectionItemCategoryVo;
|
||||
import org.dromara.qms.domain.QcInspectionItemCategory;
|
||||
import org.dromara.qms.mapper.QcInspectionItemCategoryMapper;
|
||||
import org.dromara.qms.service.IQcInspectionItemCategoryService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 检测项类别Service业务层处理
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class QcInspectionItemCategoryServiceImpl implements IQcInspectionItemCategoryService {
|
||||
|
||||
private final QcInspectionItemCategoryMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询检测项类别
|
||||
*
|
||||
* @param categoryId 主键
|
||||
* @return 检测项类别
|
||||
*/
|
||||
@Override
|
||||
public QcInspectionItemCategoryVo queryById(Long categoryId){
|
||||
return baseMapper.selectVoById(categoryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询检测项类别列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 检测项类别分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QcInspectionItemCategoryVo> queryPageList(QcInspectionItemCategoryBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<QcInspectionItemCategory> lqw = buildQueryWrapper(bo);
|
||||
Page<QcInspectionItemCategoryVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的检测项类别列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测项类别列表
|
||||
*/
|
||||
@Override
|
||||
public List<QcInspectionItemCategoryVo> queryList(QcInspectionItemCategoryBo bo) {
|
||||
MPJLambdaWrapper<QcInspectionItemCategory> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<QcInspectionItemCategory> buildQueryWrapper(QcInspectionItemCategoryBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<QcInspectionItemCategory> lqw = JoinWrappers.lambda(QcInspectionItemCategory.class)
|
||||
.selectAll(QcInspectionItemCategory.class)
|
||||
|
||||
// 查询检测类型列表
|
||||
.select(QcInspectionType::getTypeName)
|
||||
.leftJoin(QcInspectionType.class, QcInspectionType::getTypeId, QcInspectionItemCategory::getTypeId)
|
||||
|
||||
.eq(bo.getCategoryId() != null, QcInspectionItemCategory::getCategoryId, bo.getCategoryId())
|
||||
.eq(StringUtils.isNotBlank(bo.getCategoryCode()), QcInspectionItemCategory::getCategoryCode, bo.getCategoryCode())
|
||||
.like(StringUtils.isNotBlank(bo.getCategoryName()), QcInspectionItemCategory::getCategoryName, bo.getCategoryName())
|
||||
.eq(bo.getTypeId() != null, QcInspectionItemCategory::getTypeId, bo.getTypeId())
|
||||
.eq(StringUtils.isNotBlank(bo.getDescription()), QcInspectionItemCategory::getDescription, bo.getDescription())
|
||||
.orderByDesc(QcInspectionItemCategory::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检测项类别
|
||||
*
|
||||
* @param bo 检测项类别
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QcInspectionItemCategoryBo bo) {
|
||||
QcInspectionItemCategory add = MapstructUtils.convert(bo, QcInspectionItemCategory.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setCategoryId(add.getCategoryId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检测项类别
|
||||
*
|
||||
* @param bo 检测项类别
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QcInspectionItemCategoryBo bo) {
|
||||
QcInspectionItemCategory update = MapstructUtils.convert(bo, QcInspectionItemCategory.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QcInspectionItemCategory entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除检测项类别信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,150 @@
|
||||
package org.dromara.qms.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.qms.domain.bo.QcInspectionItemBo;
|
||||
import org.dromara.qms.domain.vo.QcInspectionItemVo;
|
||||
import org.dromara.qms.domain.QcInspectionItem;
|
||||
import org.dromara.qms.mapper.QcInspectionItemMapper;
|
||||
import org.dromara.qms.service.IQcInspectionItemService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 检测项定义Service业务层处理
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class QcInspectionItemServiceImpl implements IQcInspectionItemService {
|
||||
|
||||
private final QcInspectionItemMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询检测项定义
|
||||
*
|
||||
* @param itemId 主键
|
||||
* @return 检测项定义
|
||||
*/
|
||||
@Override
|
||||
public QcInspectionItemVo queryById(Long itemId){
|
||||
return baseMapper.selectVoById(itemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询检测项定义列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 检测项定义分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QcInspectionItemVo> queryPageList(QcInspectionItemBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<QcInspectionItem> lqw = buildQueryWrapper(bo);
|
||||
Page<QcInspectionItemVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的检测项定义列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测项定义列表
|
||||
*/
|
||||
@Override
|
||||
public List<QcInspectionItemVo> queryList(QcInspectionItemBo bo) {
|
||||
MPJLambdaWrapper<QcInspectionItem> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<QcInspectionItem> buildQueryWrapper(QcInspectionItemBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<QcInspectionItem> lqw = JoinWrappers.lambda(QcInspectionItem.class)
|
||||
.selectAll(QcInspectionItem.class)
|
||||
.eq(bo.getItemId() != null, QcInspectionItem::getItemId, bo.getItemId())
|
||||
.eq(StringUtils.isNotBlank(bo.getItemCode()), QcInspectionItem::getItemCode, bo.getItemCode())
|
||||
.like(StringUtils.isNotBlank(bo.getItemName()), QcInspectionItem::getItemName, bo.getItemName())
|
||||
.eq(StringUtils.isNotBlank(bo.getInspectionPosition()), QcInspectionItem::getInspectionPosition, bo.getInspectionPosition())
|
||||
.eq(bo.getCategoryId() != null, QcInspectionItem::getCategoryId, bo.getCategoryId())
|
||||
.eq(bo.getInspectionType() != null, QcInspectionItem::getInspectionType, bo.getInspectionType())
|
||||
.eq(bo.getMethod() != null, QcInspectionItem::getMethod, bo.getMethod())
|
||||
.eq(bo.getDetectType() != null, QcInspectionItem::getDetectType, bo.getDetectType())
|
||||
.eq(bo.getControlType() != null, QcInspectionItem::getControlType, bo.getControlType())
|
||||
.eq(bo.getStandardValue() != null, QcInspectionItem::getStandardValue, bo.getStandardValue())
|
||||
.eq(bo.getUpperLimit() != null, QcInspectionItem::getUpperLimit, bo.getUpperLimit())
|
||||
.eq(bo.getLowerLimit() != null, QcInspectionItem::getLowerLimit, bo.getLowerLimit())
|
||||
.like(StringUtils.isNotBlank(bo.getSpecName()), QcInspectionItem::getSpecName, bo.getSpecName())
|
||||
.eq(bo.getSpecUpper() != null, QcInspectionItem::getSpecUpper, bo.getSpecUpper())
|
||||
.eq(bo.getSpecLower() != null, QcInspectionItem::getSpecLower, bo.getSpecLower())
|
||||
.eq(StringUtils.isNotBlank(bo.getDescription()), QcInspectionItem::getDescription, bo.getDescription())
|
||||
.eq(StringUtils.isNotBlank(bo.getOptionCode()), QcInspectionItem::getOptionCode, bo.getOptionCode())
|
||||
.like(StringUtils.isNotBlank(bo.getOptionName()), QcInspectionItem::getOptionName, bo.getOptionName())
|
||||
.eq(StringUtils.isNotBlank(bo.getIsDefault()), QcInspectionItem::getIsDefault, bo.getIsDefault())
|
||||
.orderByDesc(QcInspectionItem::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检测项定义
|
||||
*
|
||||
* @param bo 检测项定义
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QcInspectionItemBo bo) {
|
||||
QcInspectionItem add = MapstructUtils.convert(bo, QcInspectionItem.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setItemId(add.getItemId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检测项定义
|
||||
*
|
||||
* @param bo 检测项定义
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QcInspectionItemBo bo) {
|
||||
QcInspectionItem update = MapstructUtils.convert(bo, QcInspectionItem.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QcInspectionItem entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除检测项定义信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,160 @@
|
||||
package org.dromara.qms.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.qms.domain.QcInspectionTemplate;
|
||||
import org.dromara.qms.domain.QcInspectionType;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.qms.domain.bo.QcInspectionMainBo;
|
||||
import org.dromara.qms.domain.vo.QcInspectionMainVo;
|
||||
import org.dromara.qms.domain.QcInspectionMain;
|
||||
import org.dromara.qms.mapper.QcInspectionMainMapper;
|
||||
import org.dromara.qms.service.IQcInspectionMainService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 质检主表Service业务层处理
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class QcInspectionMainServiceImpl implements IQcInspectionMainService {
|
||||
|
||||
private final QcInspectionMainMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询质检主表
|
||||
*
|
||||
* @param inspectionId 主键
|
||||
* @return 质检主表
|
||||
*/
|
||||
@Override
|
||||
public QcInspectionMainVo queryById(Long inspectionId){
|
||||
return baseMapper.selectVoById(inspectionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询质检主表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 质检主表分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QcInspectionMainVo> queryPageList(QcInspectionMainBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<QcInspectionMain> lqw = buildQueryWrapper(bo);
|
||||
Page<QcInspectionMainVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的质检主表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 质检主表列表
|
||||
*/
|
||||
@Override
|
||||
public List<QcInspectionMainVo> queryList(QcInspectionMainBo bo) {
|
||||
MPJLambdaWrapper<QcInspectionMain> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<QcInspectionMain> buildQueryWrapper(QcInspectionMainBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<QcInspectionMain> lqw = JoinWrappers.lambda(QcInspectionMain.class)
|
||||
.selectAll(QcInspectionMain.class)
|
||||
|
||||
//关联检测类型
|
||||
.select(QcInspectionType::getTypeName, QcInspectionType::getQcInspectionType, QcInspectionType::getTypeCode)
|
||||
.leftJoin(QcInspectionType.class, QcInspectionType::getTypeId, QcInspectionMain::getTypeId)
|
||||
|
||||
.eq(bo.getInspectionId() != null, QcInspectionMain::getInspectionId, bo.getInspectionId())
|
||||
.eq(StringUtils.isNotBlank(bo.getInspectionNo()), QcInspectionMain::getInspectionNo, bo.getInspectionNo())
|
||||
.eq(StringUtils.isNotBlank(bo.getMaterialCode()), QcInspectionMain::getMaterialCode, bo.getMaterialCode())
|
||||
.eq(StringUtils.isNotBlank(bo.getMaterialType()), QcInspectionMain::getMaterialType, bo.getMaterialType())
|
||||
.like(StringUtils.isNotBlank(bo.getMaterialName()), QcInspectionMain::getMaterialName, bo.getMaterialName())
|
||||
.like(StringUtils.isNotBlank(bo.getProcessName()), QcInspectionMain::getProcessName, bo.getProcessName())
|
||||
.like(StringUtils.isNotBlank(bo.getStationName()), QcInspectionMain::getStationName, bo.getStationName())
|
||||
.eq(bo.getInspectionQty() != null, QcInspectionMain::getInspectionQty, bo.getInspectionQty())
|
||||
.eq(bo.getQualifiedQty() != null, QcInspectionMain::getQualifiedQty, bo.getQualifiedQty())
|
||||
.eq(bo.getUnqualifiedQty() != null, QcInspectionMain::getUnqualifiedQty, bo.getUnqualifiedQty())
|
||||
.eq(bo.getResult() != null, QcInspectionMain::getResult, bo.getResult())
|
||||
.eq(StringUtils.isNotBlank(bo.getWorkshop()), QcInspectionMain::getWorkshop, bo.getWorkshop())
|
||||
.eq(bo.getTypeId() != null, QcInspectionMain::getTypeId, bo.getTypeId())
|
||||
.eq(bo.getStatus() != null, QcInspectionMain::getStatus, bo.getStatus())
|
||||
.eq(StringUtils.isNotBlank(bo.getInspector()), QcInspectionMain::getInspector, bo.getInspector())
|
||||
.eq(StringUtils.isNotBlank(bo.getShift()), QcInspectionMain::getShift, bo.getShift())
|
||||
.eq(StringUtils.isNotBlank(bo.getTeam()), QcInspectionMain::getTeam, bo.getTeam())
|
||||
.eq(bo.getInspectionTime() != null, QcInspectionMain::getInspectionTime, bo.getInspectionTime())
|
||||
.eq(StringUtils.isNotBlank(bo.getProductionOrder()), QcInspectionMain::getProductionOrder, bo.getProductionOrder())
|
||||
.eq(StringUtils.isNotBlank(bo.getBatchNo()), QcInspectionMain::getBatchNo, bo.getBatchNo())
|
||||
.eq(StringUtils.isNotBlank(bo.getBarcode()), QcInspectionMain::getBarcode, bo.getBarcode())
|
||||
.like(StringUtils.isNotBlank(bo.getSupplierName()), QcInspectionMain::getSupplierName, bo.getSupplierName())
|
||||
.orderByDesc(QcInspectionMain::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增质检主表
|
||||
*
|
||||
* @param bo 质检主表
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QcInspectionMainBo bo) {
|
||||
QcInspectionMain add = MapstructUtils.convert(bo, QcInspectionMain.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setInspectionId(add.getInspectionId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改质检主表
|
||||
*
|
||||
* @param bo 质检主表
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QcInspectionMainBo bo) {
|
||||
QcInspectionMain update = MapstructUtils.convert(bo, QcInspectionMain.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QcInspectionMain entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除质检主表信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
package org.dromara.qms.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.qms.domain.bo.QcInspectionResultBo;
|
||||
import org.dromara.qms.domain.vo.QcInspectionResultVo;
|
||||
import org.dromara.qms.domain.QcInspectionResult;
|
||||
import org.dromara.qms.mapper.QcInspectionResultMapper;
|
||||
import org.dromara.qms.service.IQcInspectionResultService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 质检结果子表Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class QcInspectionResultServiceImpl implements IQcInspectionResultService {
|
||||
|
||||
private final QcInspectionResultMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询质检结果子表
|
||||
*
|
||||
* @param resultId 主键
|
||||
* @return 质检结果子表
|
||||
*/
|
||||
@Override
|
||||
public QcInspectionResultVo queryById(Long resultId){
|
||||
return baseMapper.selectVoById(resultId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询质检结果子表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 质检结果子表分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QcInspectionResultVo> queryPageList(QcInspectionResultBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<QcInspectionResult> lqw = buildQueryWrapper(bo);
|
||||
Page<QcInspectionResultVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的质检结果子表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 质检结果子表列表
|
||||
*/
|
||||
@Override
|
||||
public List<QcInspectionResultVo> queryList(QcInspectionResultBo bo) {
|
||||
MPJLambdaWrapper<QcInspectionResult> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<QcInspectionResult> buildQueryWrapper(QcInspectionResultBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<QcInspectionResult> lqw = JoinWrappers.lambda(QcInspectionResult.class)
|
||||
.selectAll(QcInspectionResult.class)
|
||||
.eq(bo.getResultId() != null, QcInspectionResult::getResultId, bo.getResultId())
|
||||
.eq(bo.getInspectionId() != null, QcInspectionResult::getInspectionId, bo.getInspectionId())
|
||||
.eq(bo.getItemId() != null, QcInspectionResult::getItemId, bo.getItemId())
|
||||
.eq(bo.getDetectResult() != null, QcInspectionResult::getDetectResult, bo.getDetectResult())
|
||||
.eq(bo.getDetectValue() != null, QcInspectionResult::getDetectValue, bo.getDetectValue())
|
||||
.eq(StringUtils.isNotBlank(bo.getSpecInspection()), QcInspectionResult::getSpecInspection, bo.getSpecInspection())
|
||||
.eq(StringUtils.isNotBlank(bo.getProblemDetail()), QcInspectionResult::getProblemDetail, bo.getProblemDetail())
|
||||
.orderByDesc(QcInspectionResult::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增质检结果子表
|
||||
*
|
||||
* @param bo 质检结果子表
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QcInspectionResultBo bo) {
|
||||
QcInspectionResult add = MapstructUtils.convert(bo, QcInspectionResult.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setResultId(add.getResultId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改质检结果子表
|
||||
*
|
||||
* @param bo 质检结果子表
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QcInspectionResultBo bo) {
|
||||
QcInspectionResult update = MapstructUtils.convert(bo, QcInspectionResult.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QcInspectionResult entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除质检结果子表信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,150 @@
|
||||
package org.dromara.qms.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.qms.domain.QcInspectionType;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.qms.domain.bo.QcInspectionTemplateBo;
|
||||
import org.dromara.qms.domain.vo.QcInspectionTemplateVo;
|
||||
import org.dromara.qms.domain.QcInspectionTemplate;
|
||||
import org.dromara.qms.mapper.QcInspectionTemplateMapper;
|
||||
import org.dromara.qms.service.IQcInspectionTemplateService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 检测模板主Service业务层处理
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class QcInspectionTemplateServiceImpl implements IQcInspectionTemplateService {
|
||||
|
||||
private final QcInspectionTemplateMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询检测模板主
|
||||
*
|
||||
* @param templateId 主键
|
||||
* @return 检测模板主
|
||||
*/
|
||||
@Override
|
||||
public QcInspectionTemplateVo queryById(Long templateId){
|
||||
return baseMapper.selectVoById(templateId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询检测模板主列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 检测模板主分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QcInspectionTemplateVo> queryPageList(QcInspectionTemplateBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<QcInspectionTemplate> lqw = buildQueryWrapper(bo);
|
||||
Page<QcInspectionTemplateVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的检测模板主列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测模板主列表
|
||||
*/
|
||||
@Override
|
||||
public List<QcInspectionTemplateVo> queryList(QcInspectionTemplateBo bo) {
|
||||
MPJLambdaWrapper<QcInspectionTemplate> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<QcInspectionTemplate> buildQueryWrapper(QcInspectionTemplateBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<QcInspectionTemplate> lqw = JoinWrappers.lambda(QcInspectionTemplate.class)
|
||||
.selectAll(QcInspectionTemplate.class)
|
||||
|
||||
//关联检测类型
|
||||
.select(QcInspectionType::getTypeName, QcInspectionType::getQcInspectionType, QcInspectionType::getTypeCode)
|
||||
.leftJoin(QcInspectionType.class, QcInspectionType::getTypeId, QcInspectionTemplate::getTypeId)
|
||||
|
||||
.eq(bo.getTemplateId() != null, QcInspectionTemplate::getTemplateId, bo.getTemplateId())
|
||||
.eq(StringUtils.isNotBlank(bo.getTemplateCode()), QcInspectionTemplate::getTemplateCode, bo.getTemplateCode())
|
||||
.like(StringUtils.isNotBlank(bo.getTemplateName()), QcInspectionTemplate::getTemplateName, bo.getTemplateName())
|
||||
.eq(StringUtils.isNotBlank(bo.getMaterialCode()), QcInspectionTemplate::getMaterialCode, bo.getMaterialCode())
|
||||
.like(StringUtils.isNotBlank(bo.getMaterialName()), QcInspectionTemplate::getMaterialName, bo.getMaterialName())
|
||||
.eq(bo.getTypeId() != null, QcInspectionTemplate::getTypeId, bo.getTypeId())
|
||||
.eq(StringUtils.isNotBlank(bo.getStationCode()), QcInspectionTemplate::getStationCode, bo.getStationCode())
|
||||
.like(StringUtils.isNotBlank(bo.getStationName()), QcInspectionTemplate::getStationName, bo.getStationName())
|
||||
.eq(StringUtils.isNotBlank(bo.getProcessCode()), QcInspectionTemplate::getProcessCode, bo.getProcessCode())
|
||||
.like(StringUtils.isNotBlank(bo.getProcessName()), QcInspectionTemplate::getProcessName, bo.getProcessName())
|
||||
.eq(StringUtils.isNotBlank(bo.getSupplierCode()), QcInspectionTemplate::getSupplierCode, bo.getSupplierCode())
|
||||
.like(StringUtils.isNotBlank(bo.getSupplierName()), QcInspectionTemplate::getSupplierName, bo.getSupplierName())
|
||||
.eq(StringUtils.isNotBlank(bo.getDescription()), QcInspectionTemplate::getDescription, bo.getDescription())
|
||||
.orderByDesc(QcInspectionTemplate::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检测模板主
|
||||
*
|
||||
* @param bo 检测模板主
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QcInspectionTemplateBo bo) {
|
||||
QcInspectionTemplate add = MapstructUtils.convert(bo, QcInspectionTemplate.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setTemplateId(add.getTemplateId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检测模板主
|
||||
*
|
||||
* @param bo 检测模板主
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QcInspectionTemplateBo bo) {
|
||||
QcInspectionTemplate update = MapstructUtils.convert(bo, QcInspectionTemplate.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QcInspectionTemplate entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除检测模板主信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,136 @@
|
||||
package org.dromara.qms.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.qms.domain.bo.QcInspectionTypeBo;
|
||||
import org.dromara.qms.domain.vo.QcInspectionTypeVo;
|
||||
import org.dromara.qms.domain.QcInspectionType;
|
||||
import org.dromara.qms.mapper.QcInspectionTypeMapper;
|
||||
import org.dromara.qms.service.IQcInspectionTypeService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 检测类型Service业务层处理
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class QcInspectionTypeServiceImpl implements IQcInspectionTypeService {
|
||||
|
||||
private final QcInspectionTypeMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询检测类型
|
||||
*
|
||||
* @param typeId 主键
|
||||
* @return 检测类型
|
||||
*/
|
||||
@Override
|
||||
public QcInspectionTypeVo queryById(Long typeId){
|
||||
return baseMapper.selectVoById(typeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询检测类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 检测类型分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QcInspectionTypeVo> queryPageList(QcInspectionTypeBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<QcInspectionType> lqw = buildQueryWrapper(bo);
|
||||
Page<QcInspectionTypeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的检测类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测类型列表
|
||||
*/
|
||||
@Override
|
||||
public List<QcInspectionTypeVo> queryList(QcInspectionTypeBo bo) {
|
||||
MPJLambdaWrapper<QcInspectionType> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<QcInspectionType> buildQueryWrapper(QcInspectionTypeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<QcInspectionType> lqw = JoinWrappers.lambda(QcInspectionType.class)
|
||||
.selectAll(QcInspectionType.class)
|
||||
.eq(bo.getTypeId() != null, QcInspectionType::getTypeId, bo.getTypeId())
|
||||
.eq(StringUtils.isNotBlank(bo.getTypeCode()), QcInspectionType::getTypeCode, bo.getTypeCode())
|
||||
.like(StringUtils.isNotBlank(bo.getTypeName()), QcInspectionType::getTypeName, bo.getTypeName())
|
||||
.eq(bo.getQcInspectionType() != null, QcInspectionType::getQcInspectionType, bo.getQcInspectionType())
|
||||
.eq(bo.getCreateMethod() != null, QcInspectionType::getCreateMethod, bo.getCreateMethod())
|
||||
.orderByDesc(QcInspectionType::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检测类型
|
||||
*
|
||||
* @param bo 检测类型
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QcInspectionTypeBo bo) {
|
||||
QcInspectionType add = MapstructUtils.convert(bo, QcInspectionType.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setTypeId(add.getTypeId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检测类型
|
||||
*
|
||||
* @param bo 检测类型
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QcInspectionTypeBo bo) {
|
||||
QcInspectionType update = MapstructUtils.convert(bo, QcInspectionType.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QcInspectionType entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除检测类型信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,162 @@
|
||||
package org.dromara.qms.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.qms.domain.QcInspectionItem;
|
||||
import org.dromara.qms.domain.QcInspectionTemplate;
|
||||
import org.dromara.qms.domain.QcInspectionType;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.qms.domain.bo.QcTemplateItemBo;
|
||||
import org.dromara.qms.domain.vo.QcTemplateItemVo;
|
||||
import org.dromara.qms.domain.QcTemplateItem;
|
||||
import org.dromara.qms.mapper.QcTemplateItemMapper;
|
||||
import org.dromara.qms.service.IQcTemplateItemService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 检测模板子表Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class QcTemplateItemServiceImpl implements IQcTemplateItemService {
|
||||
|
||||
private final QcTemplateItemMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询检测模板子表
|
||||
*
|
||||
* @param templateItemId 主键
|
||||
* @return 检测模板子表
|
||||
*/
|
||||
@Override
|
||||
public QcTemplateItemVo queryById(Long templateItemId){
|
||||
return baseMapper.selectVoById(templateItemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询检测模板子表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 检测模板子表分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<QcTemplateItemVo> queryPageList(QcTemplateItemBo bo, PageQuery pageQuery) {
|
||||
MPJLambdaWrapper<QcTemplateItem> lqw = buildQueryWrapper(bo);
|
||||
Page<QcTemplateItemVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的检测模板子表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 检测模板子表列表
|
||||
*/
|
||||
@Override
|
||||
public List<QcTemplateItemVo> queryList(QcTemplateItemBo bo) {
|
||||
MPJLambdaWrapper<QcTemplateItem> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private MPJLambdaWrapper<QcTemplateItem> buildQueryWrapper(QcTemplateItemBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
MPJLambdaWrapper<QcTemplateItem> lqw = JoinWrappers.lambda(QcTemplateItem.class)
|
||||
.selectAll(QcTemplateItem.class)
|
||||
|
||||
//关联模板主表
|
||||
.select(QcInspectionTemplate::getTemplateName, QcInspectionTemplate::getTemplateCode)
|
||||
.leftJoin(QcInspectionTemplate.class, QcInspectionTemplate::getTemplateId, QcTemplateItem::getTemplateId)
|
||||
|
||||
//关联检测项定义表
|
||||
// .select(QcInspectionItem::getItemName, QcInspectionItem::getItemCode)
|
||||
.selectAs(QcInspectionItem::getItemName, QcTemplateItem::getInspectionItemName)
|
||||
.selectAs(QcInspectionItem::getItemCode, QcTemplateItem::getInspectionItemCode)
|
||||
.leftJoin(QcInspectionItem.class, QcInspectionItem::getItemId, QcTemplateItem::getItemId)
|
||||
|
||||
.eq(bo.getTemplateItemId() != null, QcTemplateItem::getTemplateItemId, bo.getTemplateItemId())
|
||||
.eq(bo.getTemplateId() != null, QcTemplateItem::getTemplateId, bo.getTemplateId())
|
||||
.eq(bo.getItemId() != null, QcTemplateItem::getItemId, bo.getItemId())
|
||||
.eq(StringUtils.isNotBlank(bo.getItemCode()), QcTemplateItem::getItemCode, bo.getItemCode())
|
||||
.like(StringUtils.isNotBlank(bo.getItemName()), QcTemplateItem::getItemName, bo.getItemName())
|
||||
.eq(StringUtils.isNotBlank(bo.getInspectionPosition()), QcTemplateItem::getInspectionPosition, bo.getInspectionPosition())
|
||||
.eq(StringUtils.isNotBlank(bo.getCategoryName()), QcTemplateItem::getCategoryName, bo.getCategoryName())
|
||||
.eq(bo.getInspectionType() != null, QcTemplateItem::getInspectionType, bo.getInspectionType())
|
||||
.eq(bo.getDetectType() != null, QcTemplateItem::getDetectType, bo.getDetectType())
|
||||
.eq(bo.getControlType() != null, QcTemplateItem::getControlType, bo.getControlType())
|
||||
.eq(bo.getStandardValue() != null, QcTemplateItem::getStandardValue, bo.getStandardValue())
|
||||
.eq(bo.getUpperLimit() != null, QcTemplateItem::getUpperLimit, bo.getUpperLimit())
|
||||
.eq(bo.getLowerLimit() != null, QcTemplateItem::getLowerLimit, bo.getLowerLimit())
|
||||
.eq(StringUtils.isNotBlank(bo.getSpecName()), QcTemplateItem::getSpecName, bo.getSpecName())
|
||||
.eq(bo.getSpecUpper() != null, QcTemplateItem::getSpecUpper, bo.getSpecUpper())
|
||||
.eq(bo.getSpecLower() != null, QcTemplateItem::getSpecLower, bo.getSpecLower())
|
||||
.eq(StringUtils.isNotBlank(bo.getDescription()), QcTemplateItem::getDescription, bo.getDescription())
|
||||
.orderByDesc(QcTemplateItem::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检测模板子表
|
||||
*
|
||||
* @param bo 检测模板子表
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(QcTemplateItemBo bo) {
|
||||
QcTemplateItem add = MapstructUtils.convert(bo, QcTemplateItem.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setTemplateItemId(add.getTemplateItemId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检测模板子表
|
||||
*
|
||||
* @param bo 检测模板子表
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(QcTemplateItemBo bo) {
|
||||
QcTemplateItem update = MapstructUtils.convert(bo, QcTemplateItem.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(QcTemplateItem entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除检测模板子表信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
<?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="org.dromara.qms.mapper.QcInspectionItemCategoryMapper">
|
||||
|
||||
<resultMap type="QcInspectionItemCategory" id="QcInspectionItemCategoryResult">
|
||||
<result property="categoryId" column="category_id" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="categoryCode" column="category_code" />
|
||||
<result property="categoryName" column="category_name" />
|
||||
<result property="typeId" column="type_id" />
|
||||
<result property="description" column="description" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createDept" column="create_dept" />
|
||||
<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>
|
||||
|
||||
<sql id="selectQcInspectionItemCategoryVo">
|
||||
select category_id, tenant_id, category_code, category_name, type_id, description, create_by, create_dept, create_time, update_by, update_time, del_flag
|
||||
from qc_inspection_item_category
|
||||
</sql>
|
||||
|
||||
<select id="selectQcInspectionItemCategoryList" parameterType="QcInspectionItemCategory" resultMap="QcInspectionItemCategoryResult">
|
||||
<include refid="selectQcInspectionItemCategoryVo"/>
|
||||
<where>
|
||||
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
<if test="categoryCode != null and categoryCode != ''"> and category_code = #{categoryCode}</if>
|
||||
<if test="categoryName != null and categoryName != ''"> and category_name like concat('%', #{categoryName}, '%')</if>
|
||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQcInspectionItemCategoryByCategoryId" parameterType="Long" resultMap="QcInspectionItemCategoryResult">
|
||||
<include refid="selectQcInspectionItemCategoryVo"/>
|
||||
where category_id = #{categoryId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,71 @@
|
||||
<?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="org.dromara.qms.mapper.QcInspectionItemMapper">
|
||||
|
||||
<resultMap type="QcInspectionItem" id="QcInspectionItemResult">
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="itemCode" column="item_code" />
|
||||
<result property="itemName" column="item_name" />
|
||||
<result property="inspectionPosition" column="inspection_position" />
|
||||
<result property="categoryId" column="category_id" />
|
||||
<result property="inspectionType" column="inspection_type" />
|
||||
<result property="method" column="method" />
|
||||
<result property="detectType" column="detect_type" />
|
||||
<result property="controlType" column="control_type" />
|
||||
<result property="standardValue" column="standard_value" />
|
||||
<result property="upperLimit" column="upper_limit" />
|
||||
<result property="lowerLimit" column="lower_limit" />
|
||||
<result property="specName" column="spec_name" />
|
||||
<result property="specUpper" column="spec_upper" />
|
||||
<result property="specLower" column="spec_lower" />
|
||||
<result property="description" column="description" />
|
||||
<result property="optionCode" column="option_code" />
|
||||
<result property="optionName" column="option_name" />
|
||||
<result property="isDefault" column="is_default" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createDept" column="create_dept" />
|
||||
<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>
|
||||
|
||||
<sql id="selectQcInspectionItemVo">
|
||||
select item_id, tenant_id, item_code, item_name, inspection_position, category_id, inspection_type, method, detect_type, control_type, standard_value, upper_limit, lower_limit, spec_name, spec_upper, spec_lower, description, option_code, option_name, is_default, create_by, create_dept, create_time, update_by, update_time, del_flag
|
||||
from qc_inspection_item
|
||||
</sql>
|
||||
|
||||
<select id="selectQcInspectionItemList" parameterType="QcInspectionItem" resultMap="QcInspectionItemResult">
|
||||
<include refid="selectQcInspectionItemVo"/>
|
||||
<where>
|
||||
<if test="itemId != null "> and item_id = #{itemId}</if>
|
||||
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
|
||||
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
|
||||
<if test="inspectionPosition != null and inspectionPosition != ''"> and inspection_position = #{inspectionPosition}</if>
|
||||
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
<if test="inspectionType != null "> and inspection_type = #{inspectionType}</if>
|
||||
<if test="method != null "> and method = #{method}</if>
|
||||
<if test="detectType != null "> and detect_type = #{detectType}</if>
|
||||
<if test="controlType != null "> and control_type = #{controlType}</if>
|
||||
<if test="standardValue != null "> and standard_value = #{standardValue}</if>
|
||||
<if test="upperLimit != null "> and upper_limit = #{upperLimit}</if>
|
||||
<if test="lowerLimit != null "> and lower_limit = #{lowerLimit}</if>
|
||||
<if test="specName != null and specName != ''"> and spec_name like concat('%', #{specName}, '%')</if>
|
||||
<if test="specUpper != null "> and spec_upper = #{specUpper}</if>
|
||||
<if test="specLower != null "> and spec_lower = #{specLower}</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
<if test="optionCode != null and optionCode != ''"> and option_code = #{optionCode}</if>
|
||||
<if test="optionName != null and optionName != ''"> and option_name like concat('%', #{optionName}, '%')</if>
|
||||
<if test="isDefault != null and isDefault != ''"> and is_default = #{isDefault}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQcInspectionItemByItemId" parameterType="Long" resultMap="QcInspectionItemResult">
|
||||
<include refid="selectQcInspectionItemVo"/>
|
||||
where item_id = #{itemId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,78 @@
|
||||
<?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="org.dromara.qms.mapper.QcInspectionMainMapper">
|
||||
|
||||
<resultMap type="QcInspectionMain" id="QcInspectionMainResult">
|
||||
<result property="inspectionId" column="inspection_id" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="inspectionNo" column="inspection_no" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="materialType" column="material_type" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="stationName" column="station_name" />
|
||||
<result property="inspectionQty" column="inspection_qty" />
|
||||
<result property="qualifiedQty" column="qualified_qty" />
|
||||
<result property="unqualifiedQty" column="unqualified_qty" />
|
||||
<result property="result" column="result" />
|
||||
<result property="workshop" column="workshop" />
|
||||
<result property="typeId" column="type_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="inspector" column="inspector" />
|
||||
<result property="shift" column="shift" />
|
||||
<result property="team" column="team" />
|
||||
<result property="inspectionTime" column="inspection_time" />
|
||||
<result property="productionOrder" column="production_order" />
|
||||
<result property="batchNo" column="batch_no" />
|
||||
<result property="barcode" column="barcode" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createDept" column="create_dept" />
|
||||
<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>
|
||||
|
||||
<sql id="selectQcInspectionMainVo">
|
||||
select inspection_id, tenant_id, inspection_no, material_code, material_type, material_name, process_name, station_name, inspection_qty, qualified_qty, unqualified_qty, result, workshop, type_id, status, inspector, shift, team, inspection_time, production_order, batch_no, barcode, supplier_name, remark, create_dept, create_by, create_time, update_by, update_time, del_flag
|
||||
from qc_inspection_main
|
||||
</sql>
|
||||
|
||||
<select id="selectQcInspectionMainList" parameterType="QcInspectionMain" resultMap="QcInspectionMainResult">
|
||||
<include refid="selectQcInspectionMainVo"/>
|
||||
<where>
|
||||
<if test="inspectionId != null "> and inspection_id = #{inspectionId}</if>
|
||||
<if test="inspectionNo != null and inspectionNo != ''"> and inspection_no = #{inspectionNo}</if>
|
||||
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
||||
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>
|
||||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
||||
<if test="inspectionQty != null "> and inspection_qty = #{inspectionQty}</if>
|
||||
<if test="qualifiedQty != null "> and qualified_qty = #{qualifiedQty}</if>
|
||||
<if test="unqualifiedQty != null "> and unqualified_qty = #{unqualifiedQty}</if>
|
||||
<if test="result != null "> and result = #{result}</if>
|
||||
<if test="workshop != null and workshop != ''"> and workshop = #{workshop}</if>
|
||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="inspector != null and inspector != ''"> and inspector = #{inspector}</if>
|
||||
<if test="shift != null and shift != ''"> and shift = #{shift}</if>
|
||||
<if test="team != null and team != ''"> and team = #{team}</if>
|
||||
<if test="inspectionTime != null "> and inspection_time = #{inspectionTime}</if>
|
||||
<if test="productionOrder != null and productionOrder != ''"> and production_order = #{productionOrder}</if>
|
||||
<if test="batchNo != null and batchNo != ''"> and batch_no = #{batchNo}</if>
|
||||
<if test="barcode != null and barcode != ''"> and barcode = #{barcode}</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQcInspectionMainByInspectionId" parameterType="Long" resultMap="QcInspectionMainResult">
|
||||
<include refid="selectQcInspectionMainVo"/>
|
||||
where inspection_id = #{inspectionId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,47 @@
|
||||
<?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="org.dromara.qms.mapper.QcInspectionResultMapper">
|
||||
|
||||
<resultMap type="QcInspectionResult" id="QcInspectionResultResult">
|
||||
<result property="resultId" column="result_id" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="inspectionId" column="inspection_id" />
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="detectResult" column="detect_result" />
|
||||
<result property="detectValue" column="detect_value" />
|
||||
<result property="specInspection" column="spec_inspection" />
|
||||
<result property="problemDetail" column="problem_detail" />
|
||||
<result property="createDept" column="create_dept" />
|
||||
<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>
|
||||
|
||||
<sql id="selectQcInspectionResultVo">
|
||||
select result_id, tenant_id, inspection_id, item_id, detect_result, detect_value, spec_inspection, problem_detail, create_dept, create_by, create_time, update_by, update_time, del_flag
|
||||
from qc_inspection_result
|
||||
</sql>
|
||||
|
||||
<select id="selectQcInspectionResultList" parameterType="QcInspectionResult" resultMap="QcInspectionResultResult">
|
||||
<include refid="selectQcInspectionResultVo"/>
|
||||
<where>
|
||||
<if test="resultId != null "> and result_id = #{resultId}</if>
|
||||
<if test="inspectionId != null "> and inspection_id = #{inspectionId}</if>
|
||||
<if test="itemId != null "> and item_id = #{itemId}</if>
|
||||
<if test="detectResult != null "> and detect_result = #{detectResult}</if>
|
||||
<if test="detectValue != null "> and detect_value = #{detectValue}</if>
|
||||
<if test="specInspection != null and specInspection != ''"> and spec_inspection = #{specInspection}</if>
|
||||
<if test="problemDetail != null and problemDetail != ''"> and problem_detail = #{problemDetail}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQcInspectionResultByResultId" parameterType="Long" resultMap="QcInspectionResultResult">
|
||||
<include refid="selectQcInspectionResultVo"/>
|
||||
where result_id = #{resultId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,59 @@
|
||||
<?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="org.dromara.qms.mapper.QcInspectionTemplateMapper">
|
||||
|
||||
<resultMap type="QcInspectionTemplate" id="QcInspectionTemplateResult">
|
||||
<result property="templateId" column="template_id" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="templateCode" column="template_code" />
|
||||
<result property="templateName" column="template_name" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="typeId" column="type_id" />
|
||||
<result property="stationCode" column="station_code" />
|
||||
<result property="stationName" column="station_name" />
|
||||
<result property="processCode" column="process_code" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="supplierCode" column="supplier_code" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
<result property="description" column="description" />
|
||||
<result property="createDept" column="create_dept" />
|
||||
<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>
|
||||
|
||||
<sql id="selectQcInspectionTemplateVo">
|
||||
select template_id, tenant_id, template_code, template_name, material_code, material_name, type_id, station_code, station_name, process_code, process_name, supplier_code, supplier_name, description, create_dept, create_by, create_time, update_by, update_time, del_flag
|
||||
from qc_inspection_template
|
||||
</sql>
|
||||
|
||||
<select id="selectQcInspectionTemplateList" parameterType="QcInspectionTemplate" resultMap="QcInspectionTemplateResult">
|
||||
<include refid="selectQcInspectionTemplateVo"/>
|
||||
<where>
|
||||
<if test="templateId != null "> and template_id = #{templateId}</if>
|
||||
<if test="templateCode != null and templateCode != ''"> and template_code = #{templateCode}</if>
|
||||
<if test="templateName != null and templateName != ''"> and template_name like concat('%', #{templateName}, '%')</if>
|
||||
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
||||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
||||
<if test="stationCode != null and stationCode != ''"> and station_code = #{stationCode}</if>
|
||||
<if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
|
||||
<if test="processCode != null and processCode != ''"> and process_code = #{processCode}</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQcInspectionTemplateByTemplateId" parameterType="Long" resultMap="QcInspectionTemplateResult">
|
||||
<include refid="selectQcInspectionTemplateVo"/>
|
||||
where template_id = #{templateId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,43 @@
|
||||
<?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="org.dromara.qms.mapper.QcInspectionTypeMapper">
|
||||
|
||||
<resultMap type="QcInspectionType" id="QcInspectionTypeResult">
|
||||
<result property="typeId" column="type_id" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="typeCode" column="type_code" />
|
||||
<result property="typeName" column="type_name" />
|
||||
<result property="qcInspectionType" column="qc_inspection_type" />
|
||||
<result property="createMethod" column="create_method" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createDept" column="create_dept" />
|
||||
<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>
|
||||
|
||||
<sql id="selectQcInspectionTypeVo">
|
||||
select type_id, tenant_id, type_code, type_name, qc_inspection_type, create_method, create_by, create_dept, create_time, update_by, update_time, del_flag
|
||||
from qc_inspection_type
|
||||
</sql>
|
||||
|
||||
<select id="selectQcInspectionTypeList" parameterType="QcInspectionType" resultMap="QcInspectionTypeResult">
|
||||
<include refid="selectQcInspectionTypeVo"/>
|
||||
<where>
|
||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
||||
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
|
||||
<if test="typeName != null and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
|
||||
<if test="qcInspectionType != null "> and qc_inspection_type = #{qcInspectionType}</if>
|
||||
<if test="createMethod != null "> and create_method = #{createMethod}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQcInspectionTypeByTypeId" parameterType="Long" resultMap="QcInspectionTypeResult">
|
||||
<include refid="selectQcInspectionTypeVo"/>
|
||||
where type_id = #{typeId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,67 @@
|
||||
<?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="org.dromara.qms.mapper.QcTemplateItemMapper">
|
||||
|
||||
<resultMap type="QcTemplateItem" id="QcTemplateItemResult">
|
||||
<result property="templateItemId" column="template_item_id" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="templateId" column="template_id" />
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="itemCode" column="item_code" />
|
||||
<result property="itemName" column="item_name" />
|
||||
<result property="inspectionPosition" column="inspection_position" />
|
||||
<result property="categoryName" column="category_name" />
|
||||
<result property="inspectionType" column="inspection_type" />
|
||||
<result property="detectType" column="detect_type" />
|
||||
<result property="controlType" column="control_type" />
|
||||
<result property="standardValue" column="standard_value" />
|
||||
<result property="upperLimit" column="upper_limit" />
|
||||
<result property="lowerLimit" column="lower_limit" />
|
||||
<result property="specName" column="spec_name" />
|
||||
<result property="specUpper" column="spec_upper" />
|
||||
<result property="specLower" column="spec_lower" />
|
||||
<result property="description" column="description" />
|
||||
<result property="createDept" column="create_dept" />
|
||||
<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>
|
||||
|
||||
<sql id="selectQcTemplateItemVo">
|
||||
select template_item_id, tenant_id, template_id, item_id, item_code, item_name, inspection_position, category_name, inspection_type, detect_type, control_type, standard_value, upper_limit, lower_limit, spec_name, spec_upper, spec_lower, description, create_dept, create_by, create_time, update_by, update_time, del_flag
|
||||
from qc_template_item
|
||||
</sql>
|
||||
|
||||
<select id="selectQcTemplateItemList" parameterType="QcTemplateItem" resultMap="QcTemplateItemResult">
|
||||
<include refid="selectQcTemplateItemVo"/>
|
||||
<where>
|
||||
<if test="templateItemId != null "> and template_item_id = #{templateItemId}</if>
|
||||
<if test="templateId != null "> and template_id = #{templateId}</if>
|
||||
<if test="itemId != null "> and item_id = #{itemId}</if>
|
||||
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
|
||||
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
|
||||
<if test="inspectionPosition != null and inspectionPosition != ''"> and inspection_position = #{inspectionPosition}</if>
|
||||
<if test="categoryName != null and categoryName != ''"> and category_name = #{categoryName}</if>
|
||||
<if test="inspectionType != null "> and inspection_type = #{inspectionType}</if>
|
||||
<if test="detectType != null "> and detect_type = #{detectType}</if>
|
||||
<if test="controlType != null "> and control_type = #{controlType}</if>
|
||||
<if test="standardValue != null "> and standard_value = #{standardValue}</if>
|
||||
<if test="upperLimit != null "> and upper_limit = #{upperLimit}</if>
|
||||
<if test="lowerLimit != null "> and lower_limit = #{lowerLimit}</if>
|
||||
<if test="specName != null and specName != ''"> and spec_name = #{specName}</if>
|
||||
<if test="specUpper != null "> and spec_upper = #{specUpper}</if>
|
||||
<if test="specLower != null "> and spec_lower = #{specLower}</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQcTemplateItemByTemplateItemId" parameterType="Long" resultMap="QcTemplateItemResult">
|
||||
<include refid="selectQcTemplateItemVo"/>
|
||||
where template_item_id = #{templateItemId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue