出货检验单行后台代码
This commit is contained in:
parent
cfa2cba2ba
commit
975ea3aba8
@ -4,8 +4,10 @@ import java.util.List;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.ktg.common.constant.UserConstants;
|
import com.ktg.common.constant.UserConstants;
|
||||||
|
import com.ktg.mes.qc.service.IQcOqcLineService;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
@ -36,6 +38,9 @@ public class QcOqcController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IQcOqcService qcOqcService;
|
private IQcOqcService qcOqcService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IQcOqcLineService qcOqcLineService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询出货检验单列表
|
* 查询出货检验单列表
|
||||||
*/
|
*/
|
||||||
@ -104,9 +109,19 @@ public class QcOqcController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('mes:qc:oqc:remove')")
|
@PreAuthorize("@ss.hasPermi('mes:qc:oqc:remove')")
|
||||||
@Log(title = "出货检验单", businessType = BusinessType.DELETE)
|
@Log(title = "出货检验单", businessType = BusinessType.DELETE)
|
||||||
|
@Transactional
|
||||||
@DeleteMapping("/{oqcIds}")
|
@DeleteMapping("/{oqcIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] oqcIds)
|
public AjaxResult remove(@PathVariable Long[] oqcIds)
|
||||||
{
|
{
|
||||||
|
for (Long oqcId: oqcIds
|
||||||
|
) {
|
||||||
|
QcOqc oqc = qcOqcService.selectQcOqcByOqcId(oqcId);
|
||||||
|
if(!UserConstants.ORDER_STATUS_PREPARE.equals(oqc.getStatus())){
|
||||||
|
return AjaxResult.error("只能删除状态为草稿的单据!");
|
||||||
|
}
|
||||||
|
qcOqcLineService.deleteByOqcId(oqcId);
|
||||||
|
}
|
||||||
|
|
||||||
return toAjax(qcOqcService.deleteQcOqcByOqcIds(oqcIds));
|
return toAjax(qcOqcService.deleteQcOqcByOqcIds(oqcIds));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,104 @@
|
|||||||
|
package com.ktg.mes.qc.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
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.ktg.common.annotation.Log;
|
||||||
|
import com.ktg.common.core.controller.BaseController;
|
||||||
|
import com.ktg.common.core.domain.AjaxResult;
|
||||||
|
import com.ktg.common.enums.BusinessType;
|
||||||
|
import com.ktg.mes.qc.domain.QcOqcLine;
|
||||||
|
import com.ktg.mes.qc.service.IQcOqcLineService;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出货检验单行Controller
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-09-01
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mes/qc/oqcline")
|
||||||
|
public class QcOqcLineController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IQcOqcLineService qcOqcLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询出货检验单行列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:qc:oqcline:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(QcOqcLine qcOqcLine)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<QcOqcLine> list = qcOqcLineService.selectQcOqcLineList(qcOqcLine);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出出货检验单行列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:qc:oqcline:export')")
|
||||||
|
@Log(title = "出货检验单行", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, QcOqcLine qcOqcLine)
|
||||||
|
{
|
||||||
|
List<QcOqcLine> list = qcOqcLineService.selectQcOqcLineList(qcOqcLine);
|
||||||
|
ExcelUtil<QcOqcLine> util = new ExcelUtil<QcOqcLine>(QcOqcLine.class);
|
||||||
|
util.exportExcel(response, list, "出货检验单行数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取出货检验单行详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:qc:oqcline:query')")
|
||||||
|
@GetMapping(value = "/{lineId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(qcOqcLineService.selectQcOqcLineByLineId(lineId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增出货检验单行
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:qc:oqcline:add')")
|
||||||
|
@Log(title = "出货检验单行", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody QcOqcLine qcOqcLine)
|
||||||
|
{
|
||||||
|
return toAjax(qcOqcLineService.insertQcOqcLine(qcOqcLine));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改出货检验单行
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:qc:oqcline:edit')")
|
||||||
|
@Log(title = "出货检验单行", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody QcOqcLine qcOqcLine)
|
||||||
|
{
|
||||||
|
return toAjax(qcOqcLineService.updateQcOqcLine(qcOqcLine));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除出货检验单行
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:qc:oqcline:remove')")
|
||||||
|
@Log(title = "出货检验单行", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{lineIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] lineIds)
|
||||||
|
{
|
||||||
|
return toAjax(qcOqcLineService.deleteQcOqcLineByLineIds(lineIds));
|
||||||
|
}
|
||||||
|
}
|
291
ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcOqcLine.java
Normal file
291
ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcOqcLine.java
Normal file
@ -0,0 +1,291 @@
|
|||||||
|
package com.ktg.mes.qc.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ktg.common.annotation.Excel;
|
||||||
|
import com.ktg.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出货检验单行对象 qc_oqc_line
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-09-01
|
||||||
|
*/
|
||||||
|
public class QcOqcLine extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 记录ID */
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
|
/** 检验单ID */
|
||||||
|
@Excel(name = "检验单ID")
|
||||||
|
private Long oqcId;
|
||||||
|
|
||||||
|
/** 检测项ID */
|
||||||
|
@Excel(name = "检测项ID")
|
||||||
|
private Long indexId;
|
||||||
|
|
||||||
|
/** 检测项编码 */
|
||||||
|
@Excel(name = "检测项编码")
|
||||||
|
private String indexCode;
|
||||||
|
|
||||||
|
/** 检测项名称 */
|
||||||
|
@Excel(name = "检测项名称")
|
||||||
|
private String indexName;
|
||||||
|
|
||||||
|
/** 检测项类型 */
|
||||||
|
@Excel(name = "检测项类型")
|
||||||
|
private String indexType;
|
||||||
|
|
||||||
|
/** 检测工具 */
|
||||||
|
@Excel(name = "检测工具")
|
||||||
|
private String qcTool;
|
||||||
|
|
||||||
|
/** 检测要求 */
|
||||||
|
@Excel(name = "检测要求")
|
||||||
|
private String checkMethod;
|
||||||
|
|
||||||
|
/** 标准值 */
|
||||||
|
@Excel(name = "标准值")
|
||||||
|
private BigDecimal standerVal;
|
||||||
|
|
||||||
|
/** 单位 */
|
||||||
|
@Excel(name = "单位")
|
||||||
|
private String unitOfMeasure;
|
||||||
|
|
||||||
|
/** 误差上限 */
|
||||||
|
@Excel(name = "误差上限")
|
||||||
|
private BigDecimal thresholdMax;
|
||||||
|
|
||||||
|
/** 误差下限 */
|
||||||
|
@Excel(name = "误差下限")
|
||||||
|
private BigDecimal thresholdMin;
|
||||||
|
|
||||||
|
/** 致命缺陷数量 */
|
||||||
|
@Excel(name = "致命缺陷数量")
|
||||||
|
private BigDecimal crQuantity;
|
||||||
|
|
||||||
|
/** 严重缺陷数量 */
|
||||||
|
@Excel(name = "严重缺陷数量")
|
||||||
|
private BigDecimal majQuantity;
|
||||||
|
|
||||||
|
/** 轻微缺陷数量 */
|
||||||
|
@Excel(name = "轻微缺陷数量")
|
||||||
|
private BigDecimal minQuantity;
|
||||||
|
|
||||||
|
/** 预留字段1 */
|
||||||
|
private String attr1;
|
||||||
|
|
||||||
|
/** 预留字段2 */
|
||||||
|
private String attr2;
|
||||||
|
|
||||||
|
/** 预留字段3 */
|
||||||
|
private Long attr3;
|
||||||
|
|
||||||
|
/** 预留字段4 */
|
||||||
|
private Long attr4;
|
||||||
|
|
||||||
|
public void setLineId(Long lineId)
|
||||||
|
{
|
||||||
|
this.lineId = lineId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLineId()
|
||||||
|
{
|
||||||
|
return lineId;
|
||||||
|
}
|
||||||
|
public void setOqcId(Long oqcId)
|
||||||
|
{
|
||||||
|
this.oqcId = oqcId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOqcId()
|
||||||
|
{
|
||||||
|
return oqcId;
|
||||||
|
}
|
||||||
|
public void setIndexId(Long indexId)
|
||||||
|
{
|
||||||
|
this.indexId = indexId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getIndexId()
|
||||||
|
{
|
||||||
|
return indexId;
|
||||||
|
}
|
||||||
|
public void setIndexCode(String indexCode)
|
||||||
|
{
|
||||||
|
this.indexCode = indexCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIndexCode()
|
||||||
|
{
|
||||||
|
return indexCode;
|
||||||
|
}
|
||||||
|
public void setIndexName(String indexName)
|
||||||
|
{
|
||||||
|
this.indexName = indexName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIndexName()
|
||||||
|
{
|
||||||
|
return indexName;
|
||||||
|
}
|
||||||
|
public void setIndexType(String indexType)
|
||||||
|
{
|
||||||
|
this.indexType = indexType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIndexType()
|
||||||
|
{
|
||||||
|
return indexType;
|
||||||
|
}
|
||||||
|
public void setQcTool(String qcTool)
|
||||||
|
{
|
||||||
|
this.qcTool = qcTool;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQcTool()
|
||||||
|
{
|
||||||
|
return qcTool;
|
||||||
|
}
|
||||||
|
public void setCheckMethod(String checkMethod)
|
||||||
|
{
|
||||||
|
this.checkMethod = checkMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckMethod()
|
||||||
|
{
|
||||||
|
return checkMethod;
|
||||||
|
}
|
||||||
|
public void setStanderVal(BigDecimal standerVal)
|
||||||
|
{
|
||||||
|
this.standerVal = standerVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getStanderVal()
|
||||||
|
{
|
||||||
|
return standerVal;
|
||||||
|
}
|
||||||
|
public void setUnitOfMeasure(String unitOfMeasure)
|
||||||
|
{
|
||||||
|
this.unitOfMeasure = unitOfMeasure;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnitOfMeasure()
|
||||||
|
{
|
||||||
|
return unitOfMeasure;
|
||||||
|
}
|
||||||
|
public void setThresholdMax(BigDecimal thresholdMax)
|
||||||
|
{
|
||||||
|
this.thresholdMax = thresholdMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getThresholdMax()
|
||||||
|
{
|
||||||
|
return thresholdMax;
|
||||||
|
}
|
||||||
|
public void setThresholdMin(BigDecimal thresholdMin)
|
||||||
|
{
|
||||||
|
this.thresholdMin = thresholdMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getThresholdMin()
|
||||||
|
{
|
||||||
|
return thresholdMin;
|
||||||
|
}
|
||||||
|
public void setCrQuantity(BigDecimal crQuantity)
|
||||||
|
{
|
||||||
|
this.crQuantity = crQuantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getCrQuantity()
|
||||||
|
{
|
||||||
|
return crQuantity;
|
||||||
|
}
|
||||||
|
public void setMajQuantity(BigDecimal majQuantity)
|
||||||
|
{
|
||||||
|
this.majQuantity = majQuantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getMajQuantity()
|
||||||
|
{
|
||||||
|
return majQuantity;
|
||||||
|
}
|
||||||
|
public void setMinQuantity(BigDecimal minQuantity)
|
||||||
|
{
|
||||||
|
this.minQuantity = minQuantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getMinQuantity()
|
||||||
|
{
|
||||||
|
return minQuantity;
|
||||||
|
}
|
||||||
|
public void setAttr1(String attr1)
|
||||||
|
{
|
||||||
|
this.attr1 = attr1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttr1()
|
||||||
|
{
|
||||||
|
return attr1;
|
||||||
|
}
|
||||||
|
public void setAttr2(String attr2)
|
||||||
|
{
|
||||||
|
this.attr2 = attr2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttr2()
|
||||||
|
{
|
||||||
|
return attr2;
|
||||||
|
}
|
||||||
|
public void setAttr3(Long attr3)
|
||||||
|
{
|
||||||
|
this.attr3 = attr3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAttr3()
|
||||||
|
{
|
||||||
|
return attr3;
|
||||||
|
}
|
||||||
|
public void setAttr4(Long attr4)
|
||||||
|
{
|
||||||
|
this.attr4 = attr4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAttr4()
|
||||||
|
{
|
||||||
|
return attr4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("lineId", getLineId())
|
||||||
|
.append("oqcId", getOqcId())
|
||||||
|
.append("indexId", getIndexId())
|
||||||
|
.append("indexCode", getIndexCode())
|
||||||
|
.append("indexName", getIndexName())
|
||||||
|
.append("indexType", getIndexType())
|
||||||
|
.append("qcTool", getQcTool())
|
||||||
|
.append("checkMethod", getCheckMethod())
|
||||||
|
.append("standerVal", getStanderVal())
|
||||||
|
.append("unitOfMeasure", getUnitOfMeasure())
|
||||||
|
.append("thresholdMax", getThresholdMax())
|
||||||
|
.append("thresholdMin", getThresholdMin())
|
||||||
|
.append("crQuantity", getCrQuantity())
|
||||||
|
.append("majQuantity", getMajQuantity())
|
||||||
|
.append("minQuantity", getMinQuantity())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("attr1", getAttr1())
|
||||||
|
.append("attr2", getAttr2())
|
||||||
|
.append("attr3", getAttr3())
|
||||||
|
.append("attr4", getAttr4())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.ktg.mes.qc.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.qc.domain.QcOqcLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出货检验单行Mapper接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-09-01
|
||||||
|
*/
|
||||||
|
public interface QcOqcLineMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询出货检验单行
|
||||||
|
*
|
||||||
|
* @param lineId 出货检验单行主键
|
||||||
|
* @return 出货检验单行
|
||||||
|
*/
|
||||||
|
public QcOqcLine selectQcOqcLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询出货检验单行列表
|
||||||
|
*
|
||||||
|
* @param qcOqcLine 出货检验单行
|
||||||
|
* @return 出货检验单行集合
|
||||||
|
*/
|
||||||
|
public List<QcOqcLine> selectQcOqcLineList(QcOqcLine qcOqcLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增出货检验单行
|
||||||
|
*
|
||||||
|
* @param qcOqcLine 出货检验单行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertQcOqcLine(QcOqcLine qcOqcLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改出货检验单行
|
||||||
|
*
|
||||||
|
* @param qcOqcLine 出货检验单行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateQcOqcLine(QcOqcLine qcOqcLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除出货检验单行
|
||||||
|
*
|
||||||
|
* @param lineId 出货检验单行主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteQcOqcLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除出货检验单行
|
||||||
|
*
|
||||||
|
* @param lineIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteQcOqcLineByLineIds(Long[] lineIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据出货检验单头删除相应的行信息
|
||||||
|
* @param oqcId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int deleteByOqcId(Long oqcId);
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.ktg.mes.qc.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.qc.domain.QcOqcLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出货检验单行Service接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-09-01
|
||||||
|
*/
|
||||||
|
public interface IQcOqcLineService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询出货检验单行
|
||||||
|
*
|
||||||
|
* @param lineId 出货检验单行主键
|
||||||
|
* @return 出货检验单行
|
||||||
|
*/
|
||||||
|
public QcOqcLine selectQcOqcLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询出货检验单行列表
|
||||||
|
*
|
||||||
|
* @param qcOqcLine 出货检验单行
|
||||||
|
* @return 出货检验单行集合
|
||||||
|
*/
|
||||||
|
public List<QcOqcLine> selectQcOqcLineList(QcOqcLine qcOqcLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增出货检验单行
|
||||||
|
*
|
||||||
|
* @param qcOqcLine 出货检验单行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertQcOqcLine(QcOqcLine qcOqcLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改出货检验单行
|
||||||
|
*
|
||||||
|
* @param qcOqcLine 出货检验单行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateQcOqcLine(QcOqcLine qcOqcLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除出货检验单行
|
||||||
|
*
|
||||||
|
* @param lineIds 需要删除的出货检验单行主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteQcOqcLineByLineIds(Long[] lineIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除出货检验单行信息
|
||||||
|
*
|
||||||
|
* @param lineId 出货检验单行主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteQcOqcLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据出货检验单头删除相应的行信息
|
||||||
|
* @param oqcId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int deleteByOqcId(Long oqcId);
|
||||||
|
}
|
@ -0,0 +1,101 @@
|
|||||||
|
package com.ktg.mes.qc.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ktg.mes.qc.mapper.QcOqcLineMapper;
|
||||||
|
import com.ktg.mes.qc.domain.QcOqcLine;
|
||||||
|
import com.ktg.mes.qc.service.IQcOqcLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出货检验单行Service业务层处理
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-09-01
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class QcOqcLineServiceImpl implements IQcOqcLineService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private QcOqcLineMapper qcOqcLineMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询出货检验单行
|
||||||
|
*
|
||||||
|
* @param lineId 出货检验单行主键
|
||||||
|
* @return 出货检验单行
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public QcOqcLine selectQcOqcLineByLineId(Long lineId)
|
||||||
|
{
|
||||||
|
return qcOqcLineMapper.selectQcOqcLineByLineId(lineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询出货检验单行列表
|
||||||
|
*
|
||||||
|
* @param qcOqcLine 出货检验单行
|
||||||
|
* @return 出货检验单行
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<QcOqcLine> selectQcOqcLineList(QcOqcLine qcOqcLine)
|
||||||
|
{
|
||||||
|
return qcOqcLineMapper.selectQcOqcLineList(qcOqcLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增出货检验单行
|
||||||
|
*
|
||||||
|
* @param qcOqcLine 出货检验单行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertQcOqcLine(QcOqcLine qcOqcLine)
|
||||||
|
{
|
||||||
|
qcOqcLine.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return qcOqcLineMapper.insertQcOqcLine(qcOqcLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改出货检验单行
|
||||||
|
*
|
||||||
|
* @param qcOqcLine 出货检验单行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateQcOqcLine(QcOqcLine qcOqcLine)
|
||||||
|
{
|
||||||
|
qcOqcLine.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return qcOqcLineMapper.updateQcOqcLine(qcOqcLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除出货检验单行
|
||||||
|
*
|
||||||
|
* @param lineIds 需要删除的出货检验单行主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteQcOqcLineByLineIds(Long[] lineIds)
|
||||||
|
{
|
||||||
|
return qcOqcLineMapper.deleteQcOqcLineByLineIds(lineIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除出货检验单行信息
|
||||||
|
*
|
||||||
|
* @param lineId 出货检验单行主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteQcOqcLineByLineId(Long lineId)
|
||||||
|
{
|
||||||
|
return qcOqcLineMapper.deleteQcOqcLineByLineId(lineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteByOqcId(Long oqcId) {
|
||||||
|
return qcOqcLineMapper.deleteByOqcId(oqcId);
|
||||||
|
}
|
||||||
|
}
|
161
ktg-mes/src/main/resources/mapper/qc/QcOqcLineMapper.xml
Normal file
161
ktg-mes/src/main/resources/mapper/qc/QcOqcLineMapper.xml
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
<?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.ktg.mes.qc.mapper.QcOqcLineMapper">
|
||||||
|
|
||||||
|
<resultMap type="QcOqcLine" id="QcOqcLineResult">
|
||||||
|
<result property="lineId" column="line_id" />
|
||||||
|
<result property="oqcId" column="oqc_id" />
|
||||||
|
<result property="indexId" column="index_id" />
|
||||||
|
<result property="indexCode" column="index_code" />
|
||||||
|
<result property="indexName" column="index_name" />
|
||||||
|
<result property="indexType" column="index_type" />
|
||||||
|
<result property="qcTool" column="qc_tool" />
|
||||||
|
<result property="checkMethod" column="check_method" />
|
||||||
|
<result property="standerVal" column="stander_val" />
|
||||||
|
<result property="unitOfMeasure" column="unit_of_measure" />
|
||||||
|
<result property="thresholdMax" column="threshold_max" />
|
||||||
|
<result property="thresholdMin" column="threshold_min" />
|
||||||
|
<result property="crQuantity" column="cr_quantity" />
|
||||||
|
<result property="majQuantity" column="maj_quantity" />
|
||||||
|
<result property="minQuantity" column="min_quantity" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="attr1" column="attr1" />
|
||||||
|
<result property="attr2" column="attr2" />
|
||||||
|
<result property="attr3" column="attr3" />
|
||||||
|
<result property="attr4" column="attr4" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectQcOqcLineVo">
|
||||||
|
select line_id, oqc_id, index_id, index_code, index_name, index_type, qc_tool, check_method, stander_val, unit_of_measure, threshold_max, threshold_min, cr_quantity, maj_quantity, min_quantity, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from qc_oqc_line
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectQcOqcLineList" parameterType="QcOqcLine" resultMap="QcOqcLineResult">
|
||||||
|
<include refid="selectQcOqcLineVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="oqcId != null "> and oqc_id = #{oqcId}</if>
|
||||||
|
<if test="indexId != null "> and index_id = #{indexId}</if>
|
||||||
|
<if test="indexCode != null and indexCode != ''"> and index_code = #{indexCode}</if>
|
||||||
|
<if test="indexName != null and indexName != ''"> and index_name like concat('%', #{indexName}, '%')</if>
|
||||||
|
<if test="indexType != null and indexType != ''"> and index_type = #{indexType}</if>
|
||||||
|
<if test="qcTool != null and qcTool != ''"> and qc_tool = #{qcTool}</if>
|
||||||
|
<if test="checkMethod != null and checkMethod != ''"> and check_method = #{checkMethod}</if>
|
||||||
|
<if test="standerVal != null "> and stander_val = #{standerVal}</if>
|
||||||
|
<if test="unitOfMeasure != null and unitOfMeasure != ''"> and unit_of_measure = #{unitOfMeasure}</if>
|
||||||
|
<if test="thresholdMax != null "> and threshold_max = #{thresholdMax}</if>
|
||||||
|
<if test="thresholdMin != null "> and threshold_min = #{thresholdMin}</if>
|
||||||
|
<if test="crQuantity != null "> and cr_quantity = #{crQuantity}</if>
|
||||||
|
<if test="majQuantity != null "> and maj_quantity = #{majQuantity}</if>
|
||||||
|
<if test="minQuantity != null "> and min_quantity = #{minQuantity}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectQcOqcLineByLineId" parameterType="Long" resultMap="QcOqcLineResult">
|
||||||
|
<include refid="selectQcOqcLineVo"/>
|
||||||
|
where line_id = #{lineId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertQcOqcLine" parameterType="QcOqcLine" useGeneratedKeys="true" keyProperty="lineId">
|
||||||
|
insert into qc_oqc_line
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="oqcId != null">oqc_id,</if>
|
||||||
|
<if test="indexId != null">index_id,</if>
|
||||||
|
<if test="indexCode != null">index_code,</if>
|
||||||
|
<if test="indexName != null">index_name,</if>
|
||||||
|
<if test="indexType != null">index_type,</if>
|
||||||
|
<if test="qcTool != null">qc_tool,</if>
|
||||||
|
<if test="checkMethod != null">check_method,</if>
|
||||||
|
<if test="standerVal != null">stander_val,</if>
|
||||||
|
<if test="unitOfMeasure != null">unit_of_measure,</if>
|
||||||
|
<if test="thresholdMax != null">threshold_max,</if>
|
||||||
|
<if test="thresholdMin != null">threshold_min,</if>
|
||||||
|
<if test="crQuantity != null">cr_quantity,</if>
|
||||||
|
<if test="majQuantity != null">maj_quantity,</if>
|
||||||
|
<if test="minQuantity != null">min_quantity,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="attr1 != null">attr1,</if>
|
||||||
|
<if test="attr2 != null">attr2,</if>
|
||||||
|
<if test="attr3 != null">attr3,</if>
|
||||||
|
<if test="attr4 != null">attr4,</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>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="oqcId != null">#{oqcId},</if>
|
||||||
|
<if test="indexId != null">#{indexId},</if>
|
||||||
|
<if test="indexCode != null">#{indexCode},</if>
|
||||||
|
<if test="indexName != null">#{indexName},</if>
|
||||||
|
<if test="indexType != null">#{indexType},</if>
|
||||||
|
<if test="qcTool != null">#{qcTool},</if>
|
||||||
|
<if test="checkMethod != null">#{checkMethod},</if>
|
||||||
|
<if test="standerVal != null">#{standerVal},</if>
|
||||||
|
<if test="unitOfMeasure != null">#{unitOfMeasure},</if>
|
||||||
|
<if test="thresholdMax != null">#{thresholdMax},</if>
|
||||||
|
<if test="thresholdMin != null">#{thresholdMin},</if>
|
||||||
|
<if test="crQuantity != null">#{crQuantity},</if>
|
||||||
|
<if test="majQuantity != null">#{majQuantity},</if>
|
||||||
|
<if test="minQuantity != null">#{minQuantity},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="attr1 != null">#{attr1},</if>
|
||||||
|
<if test="attr2 != null">#{attr2},</if>
|
||||||
|
<if test="attr3 != null">#{attr3},</if>
|
||||||
|
<if test="attr4 != null">#{attr4},</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>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateQcOqcLine" parameterType="QcOqcLine">
|
||||||
|
update qc_oqc_line
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="oqcId != null">oqc_id = #{oqcId},</if>
|
||||||
|
<if test="indexId != null">index_id = #{indexId},</if>
|
||||||
|
<if test="indexCode != null">index_code = #{indexCode},</if>
|
||||||
|
<if test="indexName != null">index_name = #{indexName},</if>
|
||||||
|
<if test="indexType != null">index_type = #{indexType},</if>
|
||||||
|
<if test="qcTool != null">qc_tool = #{qcTool},</if>
|
||||||
|
<if test="checkMethod != null">check_method = #{checkMethod},</if>
|
||||||
|
<if test="standerVal != null">stander_val = #{standerVal},</if>
|
||||||
|
<if test="unitOfMeasure != null">unit_of_measure = #{unitOfMeasure},</if>
|
||||||
|
<if test="thresholdMax != null">threshold_max = #{thresholdMax},</if>
|
||||||
|
<if test="thresholdMin != null">threshold_min = #{thresholdMin},</if>
|
||||||
|
<if test="crQuantity != null">cr_quantity = #{crQuantity},</if>
|
||||||
|
<if test="majQuantity != null">maj_quantity = #{majQuantity},</if>
|
||||||
|
<if test="minQuantity != null">min_quantity = #{minQuantity},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||||
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||||
|
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||||
|
<if test="attr4 != null">attr4 = #{attr4},</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>
|
||||||
|
</trim>
|
||||||
|
where line_id = #{lineId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteQcOqcLineByLineId" parameterType="Long">
|
||||||
|
delete from qc_oqc_line where line_id = #{lineId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteQcOqcLineByLineIds" parameterType="String">
|
||||||
|
delete from qc_oqc_line where line_id in
|
||||||
|
<foreach item="lineId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{lineId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteByOqcId" parameterType="Long">
|
||||||
|
delete from qc_oqc_line where oqc_id = #{oqcId}
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue
Block a user