Merge remote-tracking branch 'origin/master'
commit
ed23db844a
@ -0,0 +1,31 @@
|
||||
package com.op.system.api.domain.quality;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*echart 图标实体
|
||||
* @author zxl
|
||||
* @date 2023-07-18
|
||||
*/
|
||||
public class ChartSeriesDTO {
|
||||
|
||||
private List<String> yAxisData;
|
||||
private List<ChartDTO> series;
|
||||
|
||||
public List<String> getyAxisData() {
|
||||
return yAxisData;
|
||||
}
|
||||
|
||||
public void setyAxisData(List<String> yAxisData) {
|
||||
this.yAxisData = yAxisData;
|
||||
}
|
||||
|
||||
public List<ChartDTO> getSeries() {
|
||||
return series;
|
||||
}
|
||||
|
||||
public void setSeries(List<ChartDTO> series) {
|
||||
this.series = series;
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.op.quality.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.op.common.log.annotation.Log;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.common.security.annotation.RequiresPermissions;
|
||||
import com.op.quality.domain.QcProjectType;
|
||||
import com.op.quality.service.IQcProjectTypeService;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检验方案维护Controller
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/qcProjectType")
|
||||
public class QcProjectTypeController extends BaseController {
|
||||
@Autowired
|
||||
private IQcProjectTypeService qcProjectTypeService;
|
||||
|
||||
/**
|
||||
* 查询检验方案维护列表
|
||||
*/
|
||||
@RequiresPermissions("quality:qcProjectType:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(QcProjectType qcProjectType) {
|
||||
startPage();
|
||||
List<QcProjectType> list = qcProjectTypeService.selectQcProjectTypeList(qcProjectType);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检验方案维护列表
|
||||
*/
|
||||
@RequiresPermissions("quality:qcProjectType:export")
|
||||
@Log(title = "检验方案维护", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, QcProjectType qcProjectType) {
|
||||
List<QcProjectType> list = qcProjectTypeService.selectQcProjectTypeList(qcProjectType);
|
||||
ExcelUtil<QcProjectType> util = new ExcelUtil<QcProjectType>(QcProjectType.class);
|
||||
util.exportExcel(response, list, "检验方案维护数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检验方案维护详细信息
|
||||
*/
|
||||
@RequiresPermissions("quality:qcProjectType:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return success(qcProjectTypeService.selectQcProjectTypeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检验方案维护
|
||||
*/
|
||||
@RequiresPermissions("quality:qcProjectType:add")
|
||||
@Log(title = "检验方案维护", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody QcProjectType qcProjectType) {
|
||||
return toAjax(qcProjectTypeService.insertQcProjectType(qcProjectType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检验方案维护
|
||||
*/
|
||||
@RequiresPermissions("quality:qcProjectType:edit")
|
||||
@Log(title = "检验方案维护", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody QcProjectType qcProjectType) {
|
||||
return toAjax(qcProjectTypeService.updateQcProjectType(qcProjectType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检验方案维护
|
||||
*/
|
||||
@RequiresPermissions("quality:qcProjectType:remove")
|
||||
@Log(title = "检验方案维护", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
return toAjax(qcProjectTypeService.deleteQcProjectTypeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.op.quality.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.op.common.log.annotation.Log;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.common.security.annotation.RequiresPermissions;
|
||||
import com.op.quality.domain.QcSampleRule;
|
||||
import com.op.quality.service.IQcSampleRuleService;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 来料抽样规则Controller
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/qcSampleRule")
|
||||
public class QcSampleRuleController extends BaseController {
|
||||
@Autowired
|
||||
private IQcSampleRuleService qcSampleRuleService;
|
||||
|
||||
/**
|
||||
* 查询来料抽样规则列表
|
||||
*/
|
||||
@RequiresPermissions("quality:qcSampleRule:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(QcSampleRule qcSampleRule) {
|
||||
startPage();
|
||||
List<QcSampleRule> list = qcSampleRuleService.selectQcSampleRuleList(qcSampleRule);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出来料抽样规则列表
|
||||
*/
|
||||
@RequiresPermissions("quality:qcSampleRule:export")
|
||||
@Log(title = "来料抽样规则", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, QcSampleRule qcSampleRule) {
|
||||
List<QcSampleRule> list = qcSampleRuleService.selectQcSampleRuleList(qcSampleRule);
|
||||
ExcelUtil<QcSampleRule> util = new ExcelUtil<QcSampleRule>(QcSampleRule.class);
|
||||
util.exportExcel(response, list, "来料抽样规则数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取来料抽样规则详细信息
|
||||
*/
|
||||
@RequiresPermissions("quality:qcSampleRule:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return success(qcSampleRuleService.selectQcSampleRuleById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增来料抽样规则
|
||||
*/
|
||||
@RequiresPermissions("quality:qcSampleRule:add")
|
||||
@Log(title = "来料抽样规则", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody QcSampleRule qcSampleRule) {
|
||||
return toAjax(qcSampleRuleService.insertQcSampleRule(qcSampleRule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改来料抽样规则
|
||||
*/
|
||||
@RequiresPermissions("quality:qcSampleRule:edit")
|
||||
@Log(title = "来料抽样规则", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody QcSampleRule qcSampleRule) {
|
||||
return toAjax(qcSampleRuleService.updateQcSampleRule(qcSampleRule));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除来料抽样规则
|
||||
*/
|
||||
@RequiresPermissions("quality:qcSampleRule:remove")
|
||||
@Log(title = "来料抽样规则", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
return toAjax(qcSampleRuleService.deleteQcSampleRuleByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.op.quality.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 检验方案维护对象 qc_project_type
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-27
|
||||
*/
|
||||
public class QcProjectType extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private String id;
|
||||
|
||||
/** 检测项方案编号 */
|
||||
@Excel(name = "检测项方案编号")
|
||||
private String projectTypeCode;
|
||||
|
||||
/** 检测项方案名称 */
|
||||
@Excel(name = "检测项方案名称")
|
||||
private String projectTypeName;
|
||||
|
||||
/** 预留字段1 */
|
||||
@Excel(name = "预留字段1")
|
||||
private String attr1;
|
||||
|
||||
/** 工厂编码 */
|
||||
@Excel(name = "工厂编码")
|
||||
private String factoryCode;
|
||||
|
||||
/** 删除标识1删除0正常 */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public void setProjectTypeCode(String projectTypeCode) {
|
||||
this.projectTypeCode = projectTypeCode;
|
||||
}
|
||||
|
||||
public String getProjectTypeCode() {
|
||||
return projectTypeCode;
|
||||
}
|
||||
public void setProjectTypeName(String projectTypeName) {
|
||||
this.projectTypeName = projectTypeName;
|
||||
}
|
||||
|
||||
public String getProjectTypeName() {
|
||||
return projectTypeName;
|
||||
}
|
||||
public void setAttr1(String attr1) {
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1() {
|
||||
return attr1;
|
||||
}
|
||||
public void setFactoryCode(String factoryCode) {
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getFactoryCode() {
|
||||
return factoryCode;
|
||||
}
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("projectTypeCode", getProjectTypeCode())
|
||||
.append("projectTypeName", getProjectTypeName())
|
||||
.append("attr1", getAttr1())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("factoryCode", getFactoryCode())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
package com.op.quality.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 来料抽样规则对象 qc_sample_rule
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-28
|
||||
*/
|
||||
public class QcSampleRule extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private String id;
|
||||
|
||||
/** 开始值 */
|
||||
@Excel(name = "开始值")
|
||||
private Long startValue;
|
||||
|
||||
/** 检测项方案名称 */
|
||||
@Excel(name = "结束值")
|
||||
private Long endValue;
|
||||
|
||||
/** 预留字段1 */
|
||||
@Excel(name = "预留字段1")
|
||||
private String attr1;
|
||||
|
||||
/** 工厂编码 */
|
||||
@Excel(name = "工厂编码")
|
||||
private String factoryCode;
|
||||
|
||||
/** 删除标识1删除0正常 */
|
||||
private String delFlag;
|
||||
|
||||
/** 抽样数量 */
|
||||
@Excel(name = "抽样数量")
|
||||
private Long sampleQuality;
|
||||
|
||||
/** 小节点 */
|
||||
@Excel(name = "小节点")
|
||||
private String checkType;
|
||||
|
||||
/** 大节点 */
|
||||
@Excel(name = "大节点")
|
||||
private String typeCode;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Long getStartValue() {
|
||||
return startValue;
|
||||
}
|
||||
|
||||
public void setStartValue(Long startValue) {
|
||||
this.startValue = startValue;
|
||||
}
|
||||
|
||||
public Long getEndValue() {
|
||||
return endValue;
|
||||
}
|
||||
|
||||
public void setEndValue(Long endValue) {
|
||||
this.endValue = endValue;
|
||||
}
|
||||
|
||||
public void setAttr1(String attr1) {
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1() {
|
||||
return attr1;
|
||||
}
|
||||
public void setFactoryCode(String factoryCode) {
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getFactoryCode() {
|
||||
return factoryCode;
|
||||
}
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
public void setSampleQuality(Long sampleQuality) {
|
||||
this.sampleQuality = sampleQuality;
|
||||
}
|
||||
|
||||
public Long getSampleQuality() {
|
||||
return sampleQuality;
|
||||
}
|
||||
public void setCheckType(String checkType) {
|
||||
this.checkType = checkType;
|
||||
}
|
||||
|
||||
public String getCheckType() {
|
||||
return checkType;
|
||||
}
|
||||
|
||||
public void setTypeCode(String typeCode) {
|
||||
this.typeCode = typeCode;
|
||||
}
|
||||
|
||||
public String getTypeCode() {
|
||||
return typeCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("start", getStartValue())
|
||||
.append("end", getEndValue())
|
||||
.append("attr1", getAttr1())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("factoryCode", getFactoryCode())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("sampleQuality", getSampleQuality())
|
||||
.append("checkType", getCheckType())
|
||||
.append("typeCode", getTypeCode())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.op.quality.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.quality.domain.QcProjectType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 检验方案维护Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-27
|
||||
*/
|
||||
@Mapper
|
||||
public interface QcProjectTypeMapper {
|
||||
/**
|
||||
* 查询检验方案维护
|
||||
*
|
||||
* @param id 检验方案维护主键
|
||||
* @return 检验方案维护
|
||||
*/
|
||||
public QcProjectType selectQcProjectTypeById(String id);
|
||||
|
||||
/**
|
||||
* 查询检验方案维护列表
|
||||
*
|
||||
* @param qcProjectType 检验方案维护
|
||||
* @return 检验方案维护集合
|
||||
*/
|
||||
public List<QcProjectType> selectQcProjectTypeList(QcProjectType qcProjectType);
|
||||
|
||||
/**
|
||||
* 新增检验方案维护
|
||||
*
|
||||
* @param qcProjectType 检验方案维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQcProjectType(QcProjectType qcProjectType);
|
||||
|
||||
/**
|
||||
* 修改检验方案维护
|
||||
*
|
||||
* @param qcProjectType 检验方案维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQcProjectType(QcProjectType qcProjectType);
|
||||
|
||||
/**
|
||||
* 删除检验方案维护
|
||||
*
|
||||
* @param id 检验方案维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcProjectTypeById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除检验方案维护
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcProjectTypeByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.op.quality.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.quality.domain.QcSampleRule;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 来料抽样规则Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-28
|
||||
*/
|
||||
@Mapper
|
||||
public interface QcSampleRuleMapper {
|
||||
/**
|
||||
* 查询来料抽样规则
|
||||
*
|
||||
* @param id 来料抽样规则主键
|
||||
* @return 来料抽样规则
|
||||
*/
|
||||
public QcSampleRule selectQcSampleRuleById(String id);
|
||||
|
||||
/**
|
||||
* 查询来料抽样规则列表
|
||||
*
|
||||
* @param qcSampleRule 来料抽样规则
|
||||
* @return 来料抽样规则集合
|
||||
*/
|
||||
public List<QcSampleRule> selectQcSampleRuleList(QcSampleRule qcSampleRule);
|
||||
|
||||
/**
|
||||
* 新增来料抽样规则
|
||||
*
|
||||
* @param qcSampleRule 来料抽样规则
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQcSampleRule(QcSampleRule qcSampleRule);
|
||||
|
||||
/**
|
||||
* 修改来料抽样规则
|
||||
*
|
||||
* @param qcSampleRule 来料抽样规则
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQcSampleRule(QcSampleRule qcSampleRule);
|
||||
|
||||
/**
|
||||
* 删除来料抽样规则
|
||||
*
|
||||
* @param id 来料抽样规则主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcSampleRuleById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除来料抽样规则
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcSampleRuleByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.op.quality.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.quality.domain.QcProjectType;
|
||||
|
||||
/**
|
||||
* 检验方案维护Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-27
|
||||
*/
|
||||
public interface IQcProjectTypeService {
|
||||
/**
|
||||
* 查询检验方案维护
|
||||
*
|
||||
* @param id 检验方案维护主键
|
||||
* @return 检验方案维护
|
||||
*/
|
||||
public QcProjectType selectQcProjectTypeById(String id);
|
||||
|
||||
/**
|
||||
* 查询检验方案维护列表
|
||||
*
|
||||
* @param qcProjectType 检验方案维护
|
||||
* @return 检验方案维护集合
|
||||
*/
|
||||
public List<QcProjectType> selectQcProjectTypeList(QcProjectType qcProjectType);
|
||||
|
||||
/**
|
||||
* 新增检验方案维护
|
||||
*
|
||||
* @param qcProjectType 检验方案维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQcProjectType(QcProjectType qcProjectType);
|
||||
|
||||
/**
|
||||
* 修改检验方案维护
|
||||
*
|
||||
* @param qcProjectType 检验方案维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQcProjectType(QcProjectType qcProjectType);
|
||||
|
||||
/**
|
||||
* 批量删除检验方案维护
|
||||
*
|
||||
* @param ids 需要删除的检验方案维护主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcProjectTypeByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除检验方案维护信息
|
||||
*
|
||||
* @param id 检验方案维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcProjectTypeById(String id);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.op.quality.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.quality.domain.QcSampleRule;
|
||||
|
||||
/**
|
||||
* 来料抽样规则Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-28
|
||||
*/
|
||||
public interface IQcSampleRuleService {
|
||||
/**
|
||||
* 查询来料抽样规则
|
||||
*
|
||||
* @param id 来料抽样规则主键
|
||||
* @return 来料抽样规则
|
||||
*/
|
||||
public QcSampleRule selectQcSampleRuleById(String id);
|
||||
|
||||
/**
|
||||
* 查询来料抽样规则列表
|
||||
*
|
||||
* @param qcSampleRule 来料抽样规则
|
||||
* @return 来料抽样规则集合
|
||||
*/
|
||||
public List<QcSampleRule> selectQcSampleRuleList(QcSampleRule qcSampleRule);
|
||||
|
||||
/**
|
||||
* 新增来料抽样规则
|
||||
*
|
||||
* @param qcSampleRule 来料抽样规则
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQcSampleRule(QcSampleRule qcSampleRule);
|
||||
|
||||
/**
|
||||
* 修改来料抽样规则
|
||||
*
|
||||
* @param qcSampleRule 来料抽样规则
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQcSampleRule(QcSampleRule qcSampleRule);
|
||||
|
||||
/**
|
||||
* 批量删除来料抽样规则
|
||||
*
|
||||
* @param ids 需要删除的来料抽样规则主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcSampleRuleByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除来料抽样规则信息
|
||||
*
|
||||
* @param id 来料抽样规则主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcSampleRuleById(String id);
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package com.op.quality.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import com.op.common.core.utils.uuid.IdUtils;
|
||||
import com.op.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.op.quality.mapper.QcProjectTypeMapper;
|
||||
import com.op.quality.domain.QcProjectType;
|
||||
import com.op.quality.service.IQcProjectTypeService;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 检验方案维护Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-27
|
||||
*/
|
||||
@Service
|
||||
public class QcProjectTypeServiceImpl implements IQcProjectTypeService {
|
||||
@Autowired
|
||||
private QcProjectTypeMapper qcProjectTypeMapper;
|
||||
|
||||
/**
|
||||
* 查询检验方案维护
|
||||
*
|
||||
* @param id 检验方案维护主键
|
||||
* @return 检验方案维护
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public QcProjectType selectQcProjectTypeById(String id) {
|
||||
return qcProjectTypeMapper.selectQcProjectTypeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检验方案维护列表
|
||||
*
|
||||
* @param qcProjectType 检验方案维护
|
||||
* @return 检验方案维护
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<QcProjectType> selectQcProjectTypeList(QcProjectType qcProjectType) {
|
||||
return qcProjectTypeMapper.selectQcProjectTypeList(qcProjectType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检验方案维护
|
||||
*
|
||||
* @param qcProjectType 检验方案维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertQcProjectType(QcProjectType qcProjectType) {
|
||||
qcProjectType.setId(IdUtils.fastSimpleUUID());
|
||||
qcProjectType.setCreateBy(SecurityUtils.getUsername());
|
||||
qcProjectType.setCreateTime(DateUtils.getNowDate());
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
String key = "#header.poolName";
|
||||
qcProjectType.setFactoryCode(request.getHeader(key.substring(8)).replace("ds_",""));
|
||||
return qcProjectTypeMapper.insertQcProjectType(qcProjectType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检验方案维护
|
||||
*
|
||||
* @param qcProjectType 检验方案维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateQcProjectType(QcProjectType qcProjectType) {
|
||||
qcProjectType.setUpdateTime(DateUtils.getNowDate());
|
||||
qcProjectType.setUpdateBy(SecurityUtils.getUsername());
|
||||
return qcProjectTypeMapper.updateQcProjectType(qcProjectType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除检验方案维护
|
||||
*
|
||||
* @param ids 需要删除的检验方案维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteQcProjectTypeByIds(String[] ids) {
|
||||
return qcProjectTypeMapper.deleteQcProjectTypeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检验方案维护信息
|
||||
*
|
||||
* @param id 检验方案维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteQcProjectTypeById(String id) {
|
||||
return qcProjectTypeMapper.deleteQcProjectTypeById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package com.op.quality.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import com.op.common.core.utils.uuid.IdUtils;
|
||||
import com.op.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.op.quality.mapper.QcSampleRuleMapper;
|
||||
import com.op.quality.domain.QcSampleRule;
|
||||
import com.op.quality.service.IQcSampleRuleService;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 来料抽样规则Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-12-28
|
||||
*/
|
||||
@Service
|
||||
public class QcSampleRuleServiceImpl implements IQcSampleRuleService {
|
||||
@Autowired
|
||||
private QcSampleRuleMapper qcSampleRuleMapper;
|
||||
|
||||
/**
|
||||
* 查询来料抽样规则
|
||||
*
|
||||
* @param id 来料抽样规则主键
|
||||
* @return 来料抽样规则
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public QcSampleRule selectQcSampleRuleById(String id) {
|
||||
return qcSampleRuleMapper.selectQcSampleRuleById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询来料抽样规则列表
|
||||
*
|
||||
* @param qcSampleRule 来料抽样规则
|
||||
* @return 来料抽样规则
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<QcSampleRule> selectQcSampleRuleList(QcSampleRule qcSampleRule) {
|
||||
return qcSampleRuleMapper.selectQcSampleRuleList(qcSampleRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增来料抽样规则
|
||||
*
|
||||
* @param qcSampleRule 来料抽样规则
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertQcSampleRule(QcSampleRule qcSampleRule) {
|
||||
qcSampleRule.setCreateTime(DateUtils.getNowDate());
|
||||
qcSampleRule.setId(IdUtils.fastSimpleUUID());
|
||||
qcSampleRule.setCreateBy(SecurityUtils.getUsername());
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
String key = "#header.poolName";
|
||||
qcSampleRule.setFactoryCode(request.getHeader(key.substring(8)).replace("ds_",""));
|
||||
return qcSampleRuleMapper.insertQcSampleRule(qcSampleRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改来料抽样规则
|
||||
*
|
||||
* @param qcSampleRule 来料抽样规则
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateQcSampleRule(QcSampleRule qcSampleRule) {
|
||||
qcSampleRule.setUpdateTime(DateUtils.getNowDate());
|
||||
qcSampleRule.setUpdateBy(SecurityUtils.getUsername());
|
||||
return qcSampleRuleMapper.updateQcSampleRule(qcSampleRule);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除来料抽样规则
|
||||
*
|
||||
* @param ids 需要删除的来料抽样规则主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteQcSampleRuleByIds(String[] ids) {
|
||||
return qcSampleRuleMapper.deleteQcSampleRuleByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除来料抽样规则信息
|
||||
*
|
||||
* @param id 来料抽样规则主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteQcSampleRuleById(String id) {
|
||||
return qcSampleRuleMapper.deleteQcSampleRuleById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.op.quality.mapper.QcProjectTypeMapper">
|
||||
|
||||
<resultMap type="QcProjectType" id="QcProjectTypeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="projectTypeCode" column="project_type_code" />
|
||||
<result property="projectTypeName" column="project_type_name" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<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="factoryCode" column="factory_code" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectQcProjectTypeVo">
|
||||
select id, project_type_code, project_type_name, attr1, create_by, create_time, update_by, update_time, factory_code, del_flag from qc_project_type
|
||||
</sql>
|
||||
|
||||
<select id="selectQcProjectTypeList" parameterType="QcProjectType" resultMap="QcProjectTypeResult">
|
||||
<include refid="selectQcProjectTypeVo"/>
|
||||
<where>
|
||||
<if test="projectTypeCode != null and projectTypeCode != ''"> and project_type_code = #{projectTypeCode}</if>
|
||||
<if test="projectTypeName != null and projectTypeName != ''"> and project_type_name like concat('%', #{projectTypeName}, '%')</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQcProjectTypeById" parameterType="String" resultMap="QcProjectTypeResult">
|
||||
<include refid="selectQcProjectTypeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertQcProjectType" parameterType="QcProjectType">
|
||||
insert into qc_project_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="projectTypeCode != null">project_type_code,</if>
|
||||
<if test="projectTypeName != null">project_type_name,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="projectTypeCode != null">#{projectTypeCode},</if>
|
||||
<if test="projectTypeName != null">#{projectTypeName},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateQcProjectType" parameterType="QcProjectType">
|
||||
update qc_project_type
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="projectTypeCode != null">project_type_code = #{projectTypeCode},</if>
|
||||
<if test="projectTypeName != null">project_type_name = #{projectTypeName},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteQcProjectTypeById" parameterType="String">
|
||||
delete from qc_project_type where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQcProjectTypeByIds" parameterType="String">
|
||||
delete from qc_project_type where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.op.quality.mapper.QcSampleRuleMapper">
|
||||
|
||||
<resultMap type="QcSampleRule" id="QcSampleRuleResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="startValue" column="start_value" />
|
||||
<result property="endValue" column="end_value" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<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="factoryCode" column="factory_code" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="sampleQuality" column="sample_quality" />
|
||||
<result property="checkType" column="check_type" />
|
||||
<result property="typeCode" column="type_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectQcSampleRuleVo">
|
||||
select id, start_value, end_value, attr1, create_by, create_time, update_by, update_time, factory_code, del_flag, sample_quality, check_type, type_code from qc_sample_rule
|
||||
</sql>
|
||||
|
||||
<select id="selectQcSampleRuleList" parameterType="QcSampleRule" resultMap="QcSampleRuleResult">
|
||||
<include refid="selectQcSampleRuleVo"/>
|
||||
<where>
|
||||
<if test="startValue != null "> and start_value = #{startValue}</if>
|
||||
<if test="endValue != null "> and end_value = #{endValue}</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
||||
<if test="sampleQuality != null "> and sample_quality = #{sampleQuality}</if>
|
||||
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if>
|
||||
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQcSampleRuleById" parameterType="String" resultMap="QcSampleRuleResult">
|
||||
<include refid="selectQcSampleRuleVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertQcSampleRule" parameterType="QcSampleRule">
|
||||
insert into qc_sample_rule
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="startValue != null">start_value,</if>
|
||||
<if test="endValue != null">end_value,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="sampleQuality != null">sample_quality,</if>
|
||||
<if test="checkType != null">check_type,</if>
|
||||
<if test="typeCode != null">type_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="startValue != null">#{startValue},</if>
|
||||
<if test="endValue != null">#{endValue},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="sampleQuality != null">#{sampleQuality},</if>
|
||||
<if test="checkType != null">#{checkType},</if>
|
||||
<if test="typeCode != null">#{typeCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateQcSampleRule" parameterType="QcSampleRule">
|
||||
update qc_sample_rule
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="startValue != null">start_value = #{startValue},</if>
|
||||
<if test="endValue != null">end_value = #{endValue},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="sampleQuality != null">sample_quality = #{sampleQuality},</if>
|
||||
<if test="checkType != null">check_type = #{checkType},</if>
|
||||
<if test="typeCode != null">type_code = #{typeCode},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteQcSampleRuleById" parameterType="String">
|
||||
delete from qc_sample_rule where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQcSampleRuleByIds" parameterType="String">
|
||||
delete from qc_sample_rule where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue