抽样方案改版

master
zhaoxiaolin 10 months ago
parent 536de3eddb
commit 6b4c8f377b

@ -0,0 +1,98 @@
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.QcSampleRuleAql;
import com.op.quality.service.IQcSampleRuleAqlService;
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 2024-06-05
*/
@RestController
@RequestMapping("/aql")
public class QcSampleRuleAqlController extends BaseController {
@Autowired
private IQcSampleRuleAqlService qcSampleRuleAqlService;
/**
* -
*/
@RequiresPermissions("quality:aql:list")
@GetMapping("/list")
public TableDataInfo list(QcSampleRuleAql qcSampleRuleAql) {
startPage();
List<QcSampleRuleAql> list = qcSampleRuleAqlService.selectQcSampleRuleAqlList(qcSampleRuleAql);
return getDataTable(list);
}
/**
* -
*/
@RequiresPermissions("quality:aql:export")
@Log(title = "抽样规则-接收质量限", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, QcSampleRuleAql qcSampleRuleAql) {
List<QcSampleRuleAql> list = qcSampleRuleAqlService.selectQcSampleRuleAqlList(qcSampleRuleAql);
ExcelUtil<QcSampleRuleAql> util = new ExcelUtil<QcSampleRuleAql>(QcSampleRuleAql. class);
util.exportExcel(response, list, "抽样规则-接收质量限数据");
}
/**
* -
*/
@RequiresPermissions("quality:aql:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) {
return success(qcSampleRuleAqlService.selectQcSampleRuleAqlById(id));
}
/**
* -
*/
@RequiresPermissions("quality:aql:add")
@Log(title = "抽样规则-接收质量限", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody QcSampleRuleAql qcSampleRuleAql) {
return toAjax(qcSampleRuleAqlService.insertQcSampleRuleAql(qcSampleRuleAql));
}
/**
* -
*/
@RequiresPermissions("quality:aql:edit")
@Log(title = "抽样规则-接收质量限", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody QcSampleRuleAql qcSampleRuleAql) {
return toAjax(qcSampleRuleAqlService.updateQcSampleRuleAql(qcSampleRuleAql));
}
/**
* -
*/
@RequiresPermissions("quality:aql:remove")
@Log(title = "抽样规则-接收质量限", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) {
return toAjax(qcSampleRuleAqlService.deleteQcSampleRuleAqlByIds(ids));
}
}

@ -0,0 +1,98 @@
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.QcSampleRuleCode;
import com.op.quality.service.IQcSampleRuleCodeService;
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 2024-06-05
*/
@RestController
@RequestMapping("/code")
public class QcSampleRuleCodeController extends BaseController {
@Autowired
private IQcSampleRuleCodeService qcSampleRuleCodeService;
/**
* -
*/
//@RequiresPermissions("quality:code:list")
@GetMapping("/list")
public TableDataInfo list(QcSampleRuleCode qcSampleRuleCode) {
startPage();
List<QcSampleRuleCode> list = qcSampleRuleCodeService.selectQcSampleRuleCodeList(qcSampleRuleCode);
return getDataTable(list);
}
/**
* -
*/
//@RequiresPermissions("quality:code:export")
@Log(title = "抽样规则-样品量字码", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, QcSampleRuleCode qcSampleRuleCode) {
List<QcSampleRuleCode> list = qcSampleRuleCodeService.selectQcSampleRuleCodeList(qcSampleRuleCode);
ExcelUtil<QcSampleRuleCode> util = new ExcelUtil<QcSampleRuleCode>(QcSampleRuleCode. class);
util.exportExcel(response, list, "抽样规则-样品量字码数据");
}
/**
* -
*/
//@RequiresPermissions("quality:code:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) {
return success(qcSampleRuleCodeService.selectQcSampleRuleCodeById(id));
}
/**
* -
*/
//@RequiresPermissions("quality:code:add")
@Log(title = "抽样规则-样品量字码", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody QcSampleRuleCode qcSampleRuleCode) {
return toAjax(qcSampleRuleCodeService.insertQcSampleRuleCode(qcSampleRuleCode));
}
/**
* -
*/
//@RequiresPermissions("quality:code:edit")
@Log(title = "抽样规则-样品量字码", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody QcSampleRuleCode qcSampleRuleCode) {
return toAjax(qcSampleRuleCodeService.updateQcSampleRuleCode(qcSampleRuleCode));
}
/**
* -
*/
//@RequiresPermissions("quality:code:remove")
@Log(title = "抽样规则-样品量字码", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) {
return toAjax(qcSampleRuleCodeService.deleteQcSampleRuleCodeByIds(ids));
}
}

@ -0,0 +1,445 @@
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_aql
*
* @author Open Platform
* @date 2024-06-05
*/
public class QcSampleRuleAql extends BaseEntity {
private static final long serialVersionUID=1L;
/** id */
private String id;
/** 样品量字码开始 */
@Excel(name = "样品量字码开始")
private String sampleCode;
/** 样品量字码结束 */
@Excel(name = "样品量字码结束")
private String sampleAql;
/** 预留字段1 */
@Excel(name = "预留字段1")
private String attr1;
/** 工厂编码 */
@Excel(name = "工厂编码")
private String factoryCode;
/** 删除标识1删除0正常 */
private String delFlag;
/** 最大坏量 */
@Excel(name = "最大坏量")
private Long maxBadQuality;
/** 小节点 */
@Excel(name = "小节点")
private String checkType;
/** 大节点 */
@Excel(name = "大节点")
private String typeCode;
/** 0.010 */
@Excel(name = "0.010")
private Long aql1;
/** 0.015 */
@Excel(name = "0.015")
private Long aql2;
/** 0.025 */
@Excel(name = "0.025")
private Long aql3;
/** 0.040 */
@Excel(name = "0.040")
private Long aql4;
/** 0.065 */
@Excel(name = "0.065")
private Long aql5;
/** 0.10 */
@Excel(name = "0.10")
private Long aql6;
/** 0.15 */
@Excel(name = "0.15")
private Long aql7;
/** 0.25 */
@Excel(name = "0.25")
private Long aql8;
/** 0.40 */
@Excel(name = "0.40")
private Long aql9;
/** 0.65 */
@Excel(name = "0.65")
private Long aql10;
/** 1.0 */
@Excel(name = "1.0")
private Long aql11;
/** 1.5 */
@Excel(name = "1.5")
private Long aql12;
/** 2.5 */
@Excel(name = "2.5")
private Long aql13;
/** 4.0 */
@Excel(name = "4.0")
private Long aql14;
/** 6.5 */
@Excel(name = "6.5")
private Long aql15;
/** 10 */
@Excel(name = "10")
private Long aql16;
/** 15 */
@Excel(name = "15")
private Long aql17;
/** 25 */
@Excel(name = "25")
private Long aql18;
/** 40 */
@Excel(name = "40")
private Long aql19;
/** 65 */
@Excel(name = "65")
private Long aql20;
/** 100 */
@Excel(name = "100")
private Long aql21;
/** 150 */
@Excel(name = "150")
private Long aql22;
/** 250 */
@Excel(name = "250")
private Long aql23;
/** 400 */
@Excel(name = "400")
private Long aql24;
/** 650 */
@Excel(name = "650")
private Long aql25;
/** 1000 */
@Excel(name = "1000")
private Long aql26;
public void setId(String id){
this.id = id;
}
public String getId(){
return id;
}
public void setSampleCode(String sampleCode){
this.sampleCode = sampleCode;
}
public String getSampleCode(){
return sampleCode;
}
public void setSampleAql(String sampleAql){
this.sampleAql = sampleAql;
}
public String getSampleAql(){
return sampleAql;
}
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 setMaxBadQuality(Long maxBadQuality){
this.maxBadQuality = maxBadQuality;
}
public Long getMaxBadQuality(){
return maxBadQuality;
}
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;
}
public void setAql1(Long aql1){
this.aql1 = aql1;
}
public Long getAql1(){
return aql1;
}
public void setAql2(Long aql2){
this.aql2 = aql2;
}
public Long getAql2(){
return aql2;
}
public void setAql3(Long aql3){
this.aql3 = aql3;
}
public Long getAql3(){
return aql3;
}
public void setAql4(Long aql4){
this.aql4 = aql4;
}
public Long getAql4(){
return aql4;
}
public void setAql5(Long aql5){
this.aql5 = aql5;
}
public Long getAql5(){
return aql5;
}
public void setAql6(Long aql6){
this.aql6 = aql6;
}
public Long getAql6(){
return aql6;
}
public void setAql7(Long aql7){
this.aql7 = aql7;
}
public Long getAql7(){
return aql7;
}
public void setAql8(Long aql8){
this.aql8 = aql8;
}
public Long getAql8(){
return aql8;
}
public void setAql9(Long aql9){
this.aql9 = aql9;
}
public Long getAql9(){
return aql9;
}
public void setAql10(Long aql10){
this.aql10 = aql10;
}
public Long getAql10(){
return aql10;
}
public void setAql11(Long aql11){
this.aql11 = aql11;
}
public Long getAql11(){
return aql11;
}
public void setAql12(Long aql12){
this.aql12 = aql12;
}
public Long getAql12(){
return aql12;
}
public void setAql13(Long aql13){
this.aql13 = aql13;
}
public Long getAql13(){
return aql13;
}
public void setAql14(Long aql14){
this.aql14 = aql14;
}
public Long getAql14(){
return aql14;
}
public void setAql15(Long aql15){
this.aql15 = aql15;
}
public Long getAql15(){
return aql15;
}
public void setAql16(Long aql16){
this.aql16 = aql16;
}
public Long getAql16(){
return aql16;
}
public void setAql17(Long aql17){
this.aql17 = aql17;
}
public Long getAql17(){
return aql17;
}
public void setAql18(Long aql18){
this.aql18 = aql18;
}
public Long getAql18(){
return aql18;
}
public void setAql19(Long aql19){
this.aql19 = aql19;
}
public Long getAql19(){
return aql19;
}
public void setAql20(Long aql20){
this.aql20 = aql20;
}
public Long getAql20(){
return aql20;
}
public void setAql21(Long aql21){
this.aql21 = aql21;
}
public Long getAql21(){
return aql21;
}
public void setAql22(Long aql22){
this.aql22 = aql22;
}
public Long getAql22(){
return aql22;
}
public void setAql23(Long aql23){
this.aql23 = aql23;
}
public Long getAql23(){
return aql23;
}
public void setAql24(Long aql24){
this.aql24 = aql24;
}
public Long getAql24(){
return aql24;
}
public void setAql25(Long aql25){
this.aql25 = aql25;
}
public Long getAql25(){
return aql25;
}
public void setAql26(Long aql26){
this.aql26 = aql26;
}
public Long getAql26(){
return aql26;
}
@Override
public String toString(){
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id",getId())
.append("sampleCode",getSampleCode())
.append("sampleAql",getSampleAql())
.append("attr1",getAttr1())
.append("createBy",getCreateBy())
.append("createTime",getCreateTime())
.append("updateBy",getUpdateBy())
.append("updateTime",getUpdateTime())
.append("factoryCode",getFactoryCode())
.append("delFlag",getDelFlag())
.append("maxBadQuality",getMaxBadQuality())
.append("checkType",getCheckType())
.append("typeCode",getTypeCode())
.append("aql1",getAql1())
.append("aql2",getAql2())
.append("aql3",getAql3())
.append("aql4",getAql4())
.append("aql5",getAql5())
.append("aql6",getAql6())
.append("aql7",getAql7())
.append("aql8",getAql8())
.append("aql9",getAql9())
.append("aql10",getAql10())
.append("aql11",getAql11())
.append("aql12",getAql12())
.append("aql13",getAql13())
.append("aql14",getAql14())
.append("aql15",getAql15())
.append("aql16",getAql16())
.append("aql17",getAql17())
.append("aql18",getAql18())
.append("aql19",getAql19())
.append("aql20",getAql20())
.append("aql21",getAql21())
.append("aql22",getAql22())
.append("aql23",getAql23())
.append("aql24",getAql24())
.append("aql25",getAql25())
.append("aql26",getAql26())
.toString();
}
}

@ -0,0 +1,145 @@
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_code
*
* @author Open Platform
* @date 2024-06-05
*/
public class QcSampleRuleCode 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 String sampleCode;
/** 小节点 */
@Excel(name = "小节点")
private String checkType;
/** 大节点 */
@Excel(name = "大节点")
private String typeCode;
/** 检测水平 */
@Excel(name = "检测水平")
private String checkLevel;
public void setId(String id){
this.id = id;
}
public String getId(){
return id;
}
public void setStartValue(Long startValue){
this.startValue = startValue;
}
public Long getStartValue(){
return startValue;
}
public void setEndValue(Long endValue){
this.endValue = endValue;
}
public Long getEndValue(){
return 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 setSampleCode(String sampleCode){
this.sampleCode = sampleCode;
}
public String getSampleCode(){
return sampleCode;
}
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;
}
public void setCheckLevel(String checkLevel){
this.checkLevel = checkLevel;
}
public String getCheckLevel(){
return checkLevel;
}
@Override
public String toString(){
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id",getId())
.append("startValue",getStartValue())
.append("endValue",getEndValue())
.append("attr1",getAttr1())
.append("createBy",getCreateBy())
.append("createTime",getCreateTime())
.append("updateBy",getUpdateBy())
.append("updateTime",getUpdateTime())
.append("factoryCode",getFactoryCode())
.append("delFlag",getDelFlag())
.append("sampleCode",getSampleCode())
.append("checkType",getCheckType())
.append("typeCode",getTypeCode())
.append("checkLevel",getCheckLevel())
.toString();
}
}

@ -0,0 +1,61 @@
package com.op.quality.mapper;
import java.util.List;
import com.op.quality.domain.QcSampleRuleAql;
/**
* -Mapper
*
* @author Open Platform
* @date 2024-06-05
*/
public interface QcSampleRuleAqlMapper {
/**
* -
*
* @param id -
* @return -
*/
public QcSampleRuleAql selectQcSampleRuleAqlById(String id);
/**
* -
*
* @param qcSampleRuleAql -
* @return -
*/
public List<QcSampleRuleAql> selectQcSampleRuleAqlList(QcSampleRuleAql qcSampleRuleAql);
/**
* -
*
* @param qcSampleRuleAql -
* @return
*/
public int insertQcSampleRuleAql(QcSampleRuleAql qcSampleRuleAql);
/**
* -
*
* @param qcSampleRuleAql -
* @return
*/
public int updateQcSampleRuleAql(QcSampleRuleAql qcSampleRuleAql);
/**
* -
*
* @param id -
* @return
*/
public int deleteQcSampleRuleAqlById(String id);
/**
* -
*
* @param ids
* @return
*/
public int deleteQcSampleRuleAqlByIds(String[] ids);
}

@ -0,0 +1,61 @@
package com.op.quality.mapper;
import java.util.List;
import com.op.quality.domain.QcSampleRuleCode;
/**
* -Mapper
*
* @author Open Platform
* @date 2024-06-05
*/
public interface QcSampleRuleCodeMapper {
/**
* -
*
* @param id -
* @return -
*/
public QcSampleRuleCode selectQcSampleRuleCodeById(String id);
/**
* -
*
* @param qcSampleRuleCode -
* @return -
*/
public List<QcSampleRuleCode> selectQcSampleRuleCodeList(QcSampleRuleCode qcSampleRuleCode);
/**
* -
*
* @param qcSampleRuleCode -
* @return
*/
public int insertQcSampleRuleCode(QcSampleRuleCode qcSampleRuleCode);
/**
* -
*
* @param qcSampleRuleCode -
* @return
*/
public int updateQcSampleRuleCode(QcSampleRuleCode qcSampleRuleCode);
/**
* -
*
* @param id -
* @return
*/
public int deleteQcSampleRuleCodeById(String id);
/**
* -
*
* @param ids
* @return
*/
public int deleteQcSampleRuleCodeByIds(String[] ids);
}

@ -0,0 +1,61 @@
package com.op.quality.service;
import java.util.List;
import com.op.quality.domain.QcSampleRuleAql;
/**
* -Service
*
* @author Open Platform
* @date 2024-06-05
*/
public interface IQcSampleRuleAqlService {
/**
* -
*
* @param id -
* @return -
*/
public QcSampleRuleAql selectQcSampleRuleAqlById(String id);
/**
* -
*
* @param qcSampleRuleAql -
* @return -
*/
public List<QcSampleRuleAql> selectQcSampleRuleAqlList(QcSampleRuleAql qcSampleRuleAql);
/**
* -
*
* @param qcSampleRuleAql -
* @return
*/
public int insertQcSampleRuleAql(QcSampleRuleAql qcSampleRuleAql);
/**
* -
*
* @param qcSampleRuleAql -
* @return
*/
public int updateQcSampleRuleAql(QcSampleRuleAql qcSampleRuleAql);
/**
* -
*
* @param ids -
* @return
*/
public int deleteQcSampleRuleAqlByIds(String[] ids);
/**
* -
*
* @param id -
* @return
*/
public int deleteQcSampleRuleAqlById(String id);
}

@ -0,0 +1,61 @@
package com.op.quality.service;
import java.util.List;
import com.op.quality.domain.QcSampleRuleCode;
/**
* -Service
*
* @author Open Platform
* @date 2024-06-05
*/
public interface IQcSampleRuleCodeService {
/**
* -
*
* @param id -
* @return -
*/
public QcSampleRuleCode selectQcSampleRuleCodeById(String id);
/**
* -
*
* @param qcSampleRuleCode -
* @return -
*/
public List<QcSampleRuleCode> selectQcSampleRuleCodeList(QcSampleRuleCode qcSampleRuleCode);
/**
* -
*
* @param qcSampleRuleCode -
* @return
*/
public int insertQcSampleRuleCode(QcSampleRuleCode qcSampleRuleCode);
/**
* -
*
* @param qcSampleRuleCode -
* @return
*/
public int updateQcSampleRuleCode(QcSampleRuleCode qcSampleRuleCode);
/**
* -
*
* @param ids -
* @return
*/
public int deleteQcSampleRuleCodeByIds(String[] ids);
/**
* -
*
* @param id -
* @return
*/
public int deleteQcSampleRuleCodeById(String id);
}

@ -0,0 +1,99 @@
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.quality.mapper.QcSampleRuleAqlMapper;
import com.op.quality.domain.QcSampleRuleAql;
import com.op.quality.service.IQcSampleRuleAqlService;
/**
* -Service
*
* @author Open Platform
* @date 2024-06-05
*/
@Service
public class QcSampleRuleAqlServiceImpl implements IQcSampleRuleAqlService {
@Autowired
private QcSampleRuleAqlMapper qcSampleRuleAqlMapper;
/**
* -
*
* @param id -
* @return -
*/
@Override
@DS("#header.poolName")
public QcSampleRuleAql selectQcSampleRuleAqlById(String id) {
return qcSampleRuleAqlMapper.selectQcSampleRuleAqlById(id);
}
/**
* -
*
* @param qcSampleRuleAql -
* @return -
*/
@Override
@DS("#header.poolName")
public List<QcSampleRuleAql> selectQcSampleRuleAqlList(QcSampleRuleAql qcSampleRuleAql) {
return qcSampleRuleAqlMapper.selectQcSampleRuleAqlList(qcSampleRuleAql);
}
/**
* -
*
* @param qcSampleRuleAql -
* @return
*/
@Override
@DS("#header.poolName")
public int insertQcSampleRuleAql(QcSampleRuleAql qcSampleRuleAql) {
qcSampleRuleAql.setCreateTime(DateUtils.getNowDate());
qcSampleRuleAql.setId(IdUtils.fastSimpleUUID());
return qcSampleRuleAqlMapper.insertQcSampleRuleAql(qcSampleRuleAql);
}
/**
* -
*
* @param qcSampleRuleAql -
* @return
*/
@Override
@DS("#header.poolName")
public int updateQcSampleRuleAql(QcSampleRuleAql qcSampleRuleAql) {
qcSampleRuleAql.setUpdateTime(DateUtils.getNowDate());
return qcSampleRuleAqlMapper.updateQcSampleRuleAql(qcSampleRuleAql);
}
/**
* -
*
* @param ids -
* @return
*/
@Override
@DS("#header.poolName")
public int deleteQcSampleRuleAqlByIds(String[] ids) {
return qcSampleRuleAqlMapper.deleteQcSampleRuleAqlByIds(ids);
}
/**
* -
*
* @param id -
* @return
*/
@Override
@DS("#header.poolName")
public int deleteQcSampleRuleAqlById(String id) {
return qcSampleRuleAqlMapper.deleteQcSampleRuleAqlById(id);
}
}

@ -0,0 +1,99 @@
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.quality.mapper.QcSampleRuleCodeMapper;
import com.op.quality.domain.QcSampleRuleCode;
import com.op.quality.service.IQcSampleRuleCodeService;
/**
* -Service
*
* @author Open Platform
* @date 2024-06-05
*/
@Service
public class QcSampleRuleCodeServiceImpl implements IQcSampleRuleCodeService {
@Autowired
private QcSampleRuleCodeMapper qcSampleRuleCodeMapper;
/**
* -
*
* @param id -
* @return -
*/
@Override
@DS("#header.poolName")
public QcSampleRuleCode selectQcSampleRuleCodeById(String id) {
return qcSampleRuleCodeMapper.selectQcSampleRuleCodeById(id);
}
/**
* -
*
* @param qcSampleRuleCode -
* @return -
*/
@Override
@DS("#header.poolName")
public List<QcSampleRuleCode> selectQcSampleRuleCodeList(QcSampleRuleCode qcSampleRuleCode) {
return qcSampleRuleCodeMapper.selectQcSampleRuleCodeList(qcSampleRuleCode);
}
/**
* -
*
* @param qcSampleRuleCode -
* @return
*/
@Override
@DS("#header.poolName")
public int insertQcSampleRuleCode(QcSampleRuleCode qcSampleRuleCode) {
qcSampleRuleCode.setId(IdUtils.fastSimpleUUID());
qcSampleRuleCode.setCreateTime(DateUtils.getNowDate());
return qcSampleRuleCodeMapper.insertQcSampleRuleCode(qcSampleRuleCode);
}
/**
* -
*
* @param qcSampleRuleCode -
* @return
*/
@Override
@DS("#header.poolName")
public int updateQcSampleRuleCode(QcSampleRuleCode qcSampleRuleCode) {
qcSampleRuleCode.setUpdateTime(DateUtils.getNowDate());
return qcSampleRuleCodeMapper.updateQcSampleRuleCode(qcSampleRuleCode);
}
/**
* -
*
* @param ids -
* @return
*/
@Override
@DS("#header.poolName")
public int deleteQcSampleRuleCodeByIds(String[] ids) {
return qcSampleRuleCodeMapper.deleteQcSampleRuleCodeByIds(ids);
}
/**
* -
*
* @param id -
* @return
*/
@Override
@DS("#header.poolName")
public int deleteQcSampleRuleCodeById(String id) {
return qcSampleRuleCodeMapper.deleteQcSampleRuleCodeById(id);
}
}

@ -0,0 +1,459 @@
<?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.QcSampleRuleAqlMapper">
<resultMap type="QcSampleRuleAql" id="QcSampleRuleAqlResult">
<result property="id" column="id"/>
<result property="sampleCode" column="sample_code"/>
<result property="sampleAql" column="sample_aql"/>
<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="maxBadQuality" column="max_bad_quality"/>
<result property="checkType" column="check_type"/>
<result property="typeCode" column="type_code"/>
<result property="aql1" column="aql1"/>
<result property="aql2" column="aql2"/>
<result property="aql3" column="aql3"/>
<result property="aql4" column="aql4"/>
<result property="aql5" column="aql5"/>
<result property="aql6" column="aql6"/>
<result property="aql7" column="aql7"/>
<result property="aql8" column="aql8"/>
<result property="aql9" column="aql9"/>
<result property="aql10" column="aql10"/>
<result property="aql11" column="aql11"/>
<result property="aql12" column="aql12"/>
<result property="aql13" column="aql13"/>
<result property="aql14" column="aql14"/>
<result property="aql15" column="aql15"/>
<result property="aql16" column="aql16"/>
<result property="aql17" column="aql17"/>
<result property="aql18" column="aql18"/>
<result property="aql19" column="aql19"/>
<result property="aql20" column="aql20"/>
<result property="aql21" column="aql21"/>
<result property="aql22" column="aql22"/>
<result property="aql23" column="aql23"/>
<result property="aql24" column="aql24"/>
<result property="aql25" column="aql25"/>
<result property="aql26" column="aql26"/>
</resultMap>
<sql id="selectQcSampleRuleAqlVo">
select id, sample_code, sample_aql, attr1, create_by, create_time, update_by, update_time, factory_code, del_flag, max_bad_quality, check_type, type_code, aql1, aql2, aql3, aql4, aql5, aql6, aql7, aql8, aql9, aql10, aql11, aql12, aql13, aql14, aql15, aql16, aql17, aql18, aql19, aql20, aql21, aql22, aql23, aql24, aql25, aql26 from qc_sample_rule_aql
</sql>
<select id="selectQcSampleRuleAqlList" parameterType="QcSampleRuleAql" resultMap="QcSampleRuleAqlResult">
<include refid="selectQcSampleRuleAqlVo"/>
<where>
<if test="sampleCode != null and sampleCode != ''">
and sample_code = #{sampleCode}
</if>
<if test="sampleAql != null and sampleAql != ''">
and sample_aql = #{sampleAql}
</if>
<if test="attr1 != null and attr1 != ''">
and attr1 = #{attr1}
</if>
<if test="factoryCode != null and factoryCode != ''">
and factory_code = #{factoryCode}
</if>
<if test="maxBadQuality != null ">
and max_bad_quality = #{maxBadQuality}
</if>
<if test="checkType != null and checkType != ''">
and check_type = #{checkType}
</if>
<if test="typeCode != null and typeCode != ''">
and type_code = #{typeCode}
</if>
<if test="aql1 != null ">
and aql1 = #{aql1}
</if>
<if test="aql2 != null ">
and aql2 = #{aql2}
</if>
<if test="aql3 != null ">
and aql3 = #{aql3}
</if>
<if test="aql4 != null ">
and aql4 = #{aql4}
</if>
<if test="aql5 != null ">
and aql5 = #{aql5}
</if>
<if test="aql6 != null ">
and aql6 = #{aql6}
</if>
<if test="aql7 != null ">
and aql7 = #{aql7}
</if>
<if test="aql8 != null ">
and aql8 = #{aql8}
</if>
<if test="aql9 != null ">
and aql9 = #{aql9}
</if>
<if test="aql10 != null ">
and aql10 = #{aql10}
</if>
<if test="aql11 != null ">
and aql11 = #{aql11}
</if>
<if test="aql12 != null ">
and aql12 = #{aql12}
</if>
<if test="aql13 != null ">
and aql13 = #{aql13}
</if>
<if test="aql14 != null ">
and aql14 = #{aql14}
</if>
<if test="aql15 != null ">
and aql15 = #{aql15}
</if>
<if test="aql16 != null ">
and aql16 = #{aql16}
</if>
<if test="aql17 != null ">
and aql17 = #{aql17}
</if>
<if test="aql18 != null ">
and aql18 = #{aql18}
</if>
<if test="aql19 != null ">
and aql19 = #{aql19}
</if>
<if test="aql20 != null ">
and aql20 = #{aql20}
</if>
<if test="aql21 != null ">
and aql21 = #{aql21}
</if>
<if test="aql22 != null ">
and aql22 = #{aql22}
</if>
<if test="aql23 != null ">
and aql23 = #{aql23}
</if>
<if test="aql24 != null ">
and aql24 = #{aql24}
</if>
<if test="aql25 != null ">
and aql25 = #{aql25}
</if>
<if test="aql26 != null ">
and aql26 = #{aql26}
</if>
</where>
</select>
<select id="selectQcSampleRuleAqlById" parameterType="String"
resultMap="QcSampleRuleAqlResult">
<include refid="selectQcSampleRuleAqlVo"/>
where id = #{id}
</select>
<insert id="insertQcSampleRuleAql" parameterType="QcSampleRuleAql">
insert into qc_sample_rule_aql
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,
</if>
<if test="sampleCode != null">sample_code,
</if>
<if test="sampleAql != null">sample_aql,
</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">factory_code,
</if>
<if test="delFlag != null">del_flag,
</if>
<if test="maxBadQuality != null">max_bad_quality,
</if>
<if test="checkType != null">check_type,
</if>
<if test="typeCode != null">type_code,
</if>
<if test="aql1 != null">aql1,
</if>
<if test="aql2 != null">aql2,
</if>
<if test="aql3 != null">aql3,
</if>
<if test="aql4 != null">aql4,
</if>
<if test="aql5 != null">aql5,
</if>
<if test="aql6 != null">aql6,
</if>
<if test="aql7 != null">aql7,
</if>
<if test="aql8 != null">aql8,
</if>
<if test="aql9 != null">aql9,
</if>
<if test="aql10 != null">aql10,
</if>
<if test="aql11 != null">aql11,
</if>
<if test="aql12 != null">aql12,
</if>
<if test="aql13 != null">aql13,
</if>
<if test="aql14 != null">aql14,
</if>
<if test="aql15 != null">aql15,
</if>
<if test="aql16 != null">aql16,
</if>
<if test="aql17 != null">aql17,
</if>
<if test="aql18 != null">aql18,
</if>
<if test="aql19 != null">aql19,
</if>
<if test="aql20 != null">aql20,
</if>
<if test="aql21 != null">aql21,
</if>
<if test="aql22 != null">aql22,
</if>
<if test="aql23 != null">aql23,
</if>
<if test="aql24 != null">aql24,
</if>
<if test="aql25 != null">aql25,
</if>
<if test="aql26 != null">aql26,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},
</if>
<if test="sampleCode != null">#{sampleCode},
</if>
<if test="sampleAql != null">#{sampleAql},
</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">#{factoryCode},
</if>
<if test="delFlag != null">#{delFlag},
</if>
<if test="maxBadQuality != null">#{maxBadQuality},
</if>
<if test="checkType != null">#{checkType},
</if>
<if test="typeCode != null">#{typeCode},
</if>
<if test="aql1 != null">#{aql1},
</if>
<if test="aql2 != null">#{aql2},
</if>
<if test="aql3 != null">#{aql3},
</if>
<if test="aql4 != null">#{aql4},
</if>
<if test="aql5 != null">#{aql5},
</if>
<if test="aql6 != null">#{aql6},
</if>
<if test="aql7 != null">#{aql7},
</if>
<if test="aql8 != null">#{aql8},
</if>
<if test="aql9 != null">#{aql9},
</if>
<if test="aql10 != null">#{aql10},
</if>
<if test="aql11 != null">#{aql11},
</if>
<if test="aql12 != null">#{aql12},
</if>
<if test="aql13 != null">#{aql13},
</if>
<if test="aql14 != null">#{aql14},
</if>
<if test="aql15 != null">#{aql15},
</if>
<if test="aql16 != null">#{aql16},
</if>
<if test="aql17 != null">#{aql17},
</if>
<if test="aql18 != null">#{aql18},
</if>
<if test="aql19 != null">#{aql19},
</if>
<if test="aql20 != null">#{aql20},
</if>
<if test="aql21 != null">#{aql21},
</if>
<if test="aql22 != null">#{aql22},
</if>
<if test="aql23 != null">#{aql23},
</if>
<if test="aql24 != null">#{aql24},
</if>
<if test="aql25 != null">#{aql25},
</if>
<if test="aql26 != null">#{aql26},
</if>
</trim>
</insert>
<update id="updateQcSampleRuleAql" parameterType="QcSampleRuleAql">
update qc_sample_rule_aql
<trim prefix="SET" suffixOverrides=",">
<if test="sampleCode != null">sample_code =
#{sampleCode},
</if>
<if test="sampleAql != null">sample_aql =
#{sampleAql},
</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">factory_code =
#{factoryCode},
</if>
<if test="delFlag != null">del_flag =
#{delFlag},
</if>
<if test="maxBadQuality != null">max_bad_quality =
#{maxBadQuality},
</if>
<if test="checkType != null">check_type =
#{checkType},
</if>
<if test="typeCode != null">type_code =
#{typeCode},
</if>
<if test="aql1 != null">aql1 =
#{aql1},
</if>
<if test="aql2 != null">aql2 =
#{aql2},
</if>
<if test="aql3 != null">aql3 =
#{aql3},
</if>
<if test="aql4 != null">aql4 =
#{aql4},
</if>
<if test="aql5 != null">aql5 =
#{aql5},
</if>
<if test="aql6 != null">aql6 =
#{aql6},
</if>
<if test="aql7 != null">aql7 =
#{aql7},
</if>
<if test="aql8 != null">aql8 =
#{aql8},
</if>
<if test="aql9 != null">aql9 =
#{aql9},
</if>
<if test="aql10 != null">aql10 =
#{aql10},
</if>
<if test="aql11 != null">aql11 =
#{aql11},
</if>
<if test="aql12 != null">aql12 =
#{aql12},
</if>
<if test="aql13 != null">aql13 =
#{aql13},
</if>
<if test="aql14 != null">aql14 =
#{aql14},
</if>
<if test="aql15 != null">aql15 =
#{aql15},
</if>
<if test="aql16 != null">aql16 =
#{aql16},
</if>
<if test="aql17 != null">aql17 =
#{aql17},
</if>
<if test="aql18 != null">aql18 =
#{aql18},
</if>
<if test="aql19 != null">aql19 =
#{aql19},
</if>
<if test="aql20 != null">aql20 =
#{aql20},
</if>
<if test="aql21 != null">aql21 =
#{aql21},
</if>
<if test="aql22 != null">aql22 =
#{aql22},
</if>
<if test="aql23 != null">aql23 =
#{aql23},
</if>
<if test="aql24 != null">aql24 =
#{aql24},
</if>
<if test="aql25 != null">aql25 =
#{aql25},
</if>
<if test="aql26 != null">aql26 =
#{aql26},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteQcSampleRuleAqlById" parameterType="String">
delete from qc_sample_rule_aql where id = #{id}
</delete>
<delete id="deleteQcSampleRuleAqlByIds" parameterType="String">
delete from qc_sample_rule_aql where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -0,0 +1,185 @@
<?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.QcSampleRuleCodeMapper">
<resultMap type="QcSampleRuleCode" id="QcSampleRuleCodeResult">
<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="sampleCode" column="sample_code"/>
<result property="checkType" column="check_type"/>
<result property="typeCode" column="type_code"/>
<result property="checkLevel" column="check_level"/>
</resultMap>
<sql id="selectQcSampleRuleCodeVo">
select id, start_value, end_value, attr1, create_by, create_time, update_by, update_time, factory_code, del_flag, sample_code, check_type, type_code, check_level from qc_sample_rule_code
</sql>
<select id="selectQcSampleRuleCodeList" parameterType="QcSampleRuleCode" resultMap="QcSampleRuleCodeResult">
<include refid="selectQcSampleRuleCodeVo"/>
<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="sampleCode != null and sampleCode != ''">
and sample_code = #{sampleCode}
</if>
<if test="checkType != null and checkType != ''">
and check_type = #{checkType}
</if>
<if test="typeCode != null and typeCode != ''">
and type_code = #{typeCode}
</if>
<if test="checkLevel != null and checkLevel != ''">
and check_level = #{checkLevel}
</if>
</where>
order by check_level
</select>
<select id="selectQcSampleRuleCodeById" parameterType="String"
resultMap="QcSampleRuleCodeResult">
<include refid="selectQcSampleRuleCodeVo"/>
where id = #{id}
</select>
<insert id="insertQcSampleRuleCode" parameterType="QcSampleRuleCode">
insert into qc_sample_rule_code
<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">factory_code,
</if>
<if test="delFlag != null">del_flag,
</if>
<if test="sampleCode != null">sample_code,
</if>
<if test="checkType != null">check_type,
</if>
<if test="typeCode != null">type_code,
</if>
<if test="checkLevel != null">check_level,
</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">#{factoryCode},
</if>
<if test="delFlag != null">#{delFlag},
</if>
<if test="sampleCode != null">#{sampleCode},
</if>
<if test="checkType != null">#{checkType},
</if>
<if test="typeCode != null">#{typeCode},
</if>
<if test="checkLevel != null">#{checkLevel},
</if>
</trim>
</insert>
<update id="updateQcSampleRuleCode" parameterType="QcSampleRuleCode">
update qc_sample_rule_code
<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">factory_code =
#{factoryCode},
</if>
<if test="delFlag != null">del_flag =
#{delFlag},
</if>
<if test="sampleCode != null">sample_code =
#{sampleCode},
</if>
<if test="checkType != null">check_type =
#{checkType},
</if>
<if test="typeCode != null">type_code =
#{typeCode},
</if>
<if test="checkLevel != null">check_level =
#{checkLevel},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteQcSampleRuleCodeById" parameterType="String">
delete from qc_sample_rule_code where id = #{id}
</delete>
<delete id="deleteQcSampleRuleCodeByIds" parameterType="String">
delete from qc_sample_rule_code where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save