From 01fd608843e301341f317b66e24c9fd9eef3ac8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?yinjinlu-pc=5C=E5=B0=B9=E9=87=91=E8=B7=AF?= <411641505@qq.com> Date: Wed, 18 Oct 2023 22:02:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A8=E9=87=8F=E5=BE=85=E6=A3=80=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/QcDefectRecordController.java | 4 +- .../mes/qc/controller/QcIpqcController.java | 19 + .../mes/qc/controller/QcIqcController.java | 5 + .../QcPendingInspectController.java | 34 ++ .../java/com/ktg/mes/qc/domain/QcIpqc.java | 45 +- .../java/com/ktg/mes/qc/domain/QcIqc.java | 46 +- .../java/com/ktg/mes/qc/domain/QcOqc.java | 45 +- .../ktg/mes/qc/domain/QcPendingInspect.java | 399 ++++++++++++++++++ .../mes/qc/mapper/QcPendingInspectMapper.java | 15 + .../qc/service/IQcPendingInspectService.java | 15 + .../impl/QcPendingInspectServiceImpl.java | 21 + .../main/resources/mapper/qc/QcIpqcMapper.xml | 22 +- .../main/resources/mapper/qc/QcIqcMapper.xml | 22 +- .../main/resources/mapper/qc/QcOqcMapper.xml | 22 +- .../mapper/qc/QcPendingInspectMapper.xml | 180 ++++++++ .../mapper/system/SysAutoCodeRuleMapper.xml | 2 +- 16 files changed, 887 insertions(+), 9 deletions(-) create mode 100644 ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcPendingInspectController.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcPendingInspect.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcPendingInspectMapper.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcPendingInspectService.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcPendingInspectServiceImpl.java create mode 100644 ktg-mes/src/main/resources/mapper/qc/QcPendingInspectMapper.xml diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcDefectRecordController.java b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcDefectRecordController.java index bc6dc48..8269e27 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcDefectRecordController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcDefectRecordController.java @@ -107,7 +107,7 @@ public class QcDefectRecordController extends BaseController return AjaxResult.error("请填写缺陷内容"); } - if(StringUtils.isNotNull(qcDefectRecord.getDefectLevel())){ + if(!StringUtils.isNotNull(qcDefectRecord.getDefectLevel())){ return AjaxResult.error("请选择缺陷级别"); } @@ -132,7 +132,7 @@ public class QcDefectRecordController extends BaseController return AjaxResult.error("请填写缺陷内容"); } - if(StringUtils.isNotNull(defect.getDefectLevel())){ + if(!StringUtils.isNotNull(defect.getDefectLevel())){ return AjaxResult.error("请选择缺陷级别"); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcIpqcController.java b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcIpqcController.java index 979cb9a..da8f733 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcIpqcController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcIpqcController.java @@ -7,7 +7,9 @@ import javax.servlet.http.HttpServletResponse; import cn.hutool.core.collection.CollUtil; import com.ktg.common.constant.UserConstants; import com.ktg.common.utils.StringUtils; +import com.ktg.mes.pro.domain.ProFeedback; import com.ktg.mes.pro.domain.ProWorkorder; +import com.ktg.mes.pro.service.IProFeedbackService; import com.ktg.mes.pro.service.IProWorkorderService; import com.ktg.mes.qc.domain.*; import com.ktg.mes.qc.service.*; @@ -58,6 +60,9 @@ public class QcIpqcController extends BaseController @Autowired private IQcDefectRecordService qcDefectRecordService; + @Autowired + private IProFeedbackService proFeedbackService; + /** * 查询过程检验单列表 */ @@ -193,6 +198,20 @@ public class QcIpqcController extends BaseController return AjaxResult.error("当前工单生产的产品未配置此类型的检验模板!"); } + //如果是完成单据则根据单据上的来源单据,更新对应的关联检验单信息 + if(UserConstants.ORDER_STATUS_FINISHED.equals(qcIpqc.getStatus())){ + if(StringUtils.isNotNull(qcIpqc.getSourceDocCode())){ + //这里默认更新生产报工单的数据 + ProFeedback feedback = proFeedbackService.selectProFeedbackByRecordId(qcIpqc.getSourceDocId()); + if(StringUtils.isNotNull(feedback)){ + feedback.setQuantityQualified(qcIpqc.getQuantityQualified()); + feedback.setQuantityUnquanlified(qcIpqc.getQuantityUnqualified()); + feedback.setQuantityUncheck(BigDecimal.ZERO); + proFeedbackService.updateProFeedback(feedback); + } + } + } + return toAjax(qcIpqcService.updateQcIpqc(qcIpqc)); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcIqcController.java b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcIqcController.java index 28f887c..c1a0560 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcIqcController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcIqcController.java @@ -5,6 +5,9 @@ import javax.servlet.http.HttpServletResponse; import cn.hutool.core.collection.CollUtil; import com.ktg.common.constant.UserConstants; +import com.ktg.common.utils.StringUtils; +import com.ktg.mes.pro.domain.ProFeedback; +import com.ktg.mes.pro.service.IProFeedbackService; import com.ktg.mes.qc.domain.*; import com.ktg.mes.qc.service.*; import org.springframework.security.access.prepost.PreAuthorize; @@ -50,6 +53,8 @@ public class QcIqcController extends BaseController @Autowired private IQcDefectRecordService qcDefectRecordService; + + /** * 查询来料检验单列表 */ diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcPendingInspectController.java b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcPendingInspectController.java new file mode 100644 index 0000000..700b5b5 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcPendingInspectController.java @@ -0,0 +1,34 @@ +package com.ktg.mes.qc.controller; + +import com.ktg.common.core.controller.BaseController; +import com.ktg.common.core.page.TableDataInfo; +import com.ktg.mes.qc.domain.QcPendingInspect; +import com.ktg.mes.qc.service.IQcPendingInspectService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController +@RequestMapping("/mes/qc/pending") +public class QcPendingInspectController extends BaseController { + + @Autowired + private IQcPendingInspectService qcPendingInspectService; + + + /** + * 获取待检验任务 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:oqcline:list')") + @GetMapping("/list") + public TableDataInfo list(QcPendingInspect qcPendingInspect) + { + startPage(); + List list = qcPendingInspectService.selectQcPendingList(qcPendingInspect); + return getDataTable(list); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcIpqc.java b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcIpqc.java index 92a98f5..79108ae 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcIpqc.java +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcIpqc.java @@ -37,6 +37,16 @@ public class QcIpqc extends BaseEntity @Excel(name = "检验模板ID") private Long templateId; + private Long sourceDocId; + + @Excel(name = "来源单据类型") + private String sourceDocType; + + @Excel(name = "来源单据编号") + private String sourceDocCode; + + private Long sourceLineId; + /** 工单ID */ @Excel(name = "工单ID") private Long workorderId; @@ -215,7 +225,40 @@ public class QcIpqc extends BaseEntity { return templateId; } - public void setWorkorderId(Long workorderId) + + public Long getSourceDocId() { + return sourceDocId; + } + + public void setSourceDocId(Long sourceDocId) { + this.sourceDocId = sourceDocId; + } + + public String getSourceDocType() { + return sourceDocType; + } + + public void setSourceDocType(String sourceDocType) { + this.sourceDocType = sourceDocType; + } + + public String getSourceDocCode() { + return sourceDocCode; + } + + public void setSourceDocCode(String sourceDocCode) { + this.sourceDocCode = sourceDocCode; + } + + public Long getSourceLineId() { + return sourceLineId; + } + + public void setSourceLineId(Long sourceLineId) { + this.sourceLineId = sourceLineId; + } + + public void setWorkorderId(Long workorderId) { this.workorderId = workorderId; } diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcIqc.java b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcIqc.java index 54c6952..1098d3d 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcIqc.java +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcIqc.java @@ -33,6 +33,17 @@ public class QcIqc extends BaseEntity @Excel(name = "检验模板ID") private Long templateId; + private Long sourceDocId; + + @Excel(name = "来源单据类型") + private String sourceDocType; + + @Excel(name = "来源单据编号") + private String sourceDocCode; + + private Long sourceLineId; + + /** 供应商ID */ @Excel(name = "供应商ID") private Long vendorId; @@ -189,7 +200,40 @@ public class QcIqc extends BaseEntity { return templateId; } - public void setVendorId(Long vendorId) + + public Long getSourceDocId() { + return sourceDocId; + } + + public void setSourceDocId(Long sourceDocId) { + this.sourceDocId = sourceDocId; + } + + public String getSourceDocType() { + return sourceDocType; + } + + public void setSourceDocType(String sourceDocType) { + this.sourceDocType = sourceDocType; + } + + public String getSourceDocCode() { + return sourceDocCode; + } + + public void setSourceDocCode(String sourceDocCode) { + this.sourceDocCode = sourceDocCode; + } + + public Long getSourceLineId() { + return sourceLineId; + } + + public void setSourceLineId(Long sourceLineId) { + this.sourceLineId = sourceLineId; + } + + public void setVendorId(Long vendorId) { this.vendorId = vendorId; } diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcOqc.java b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcOqc.java index 5a6d238..2f21f77 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcOqc.java +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcOqc.java @@ -33,6 +33,16 @@ public class QcOqc extends BaseEntity @Excel(name = "检验模板ID") private Long templateId; + private Long sourceDocId; + + @Excel(name = "来源单据类型") + private String sourceDocType; + + @Excel(name = "来源单据编号") + private String sourceDocCode; + + private Long sourceLineId; + /** 客户ID */ @Excel(name = "客户ID") private Long clientId; @@ -187,7 +197,40 @@ public class QcOqc extends BaseEntity { return templateId; } - public void setClientId(Long clientId) + + public Long getSourceDocId() { + return sourceDocId; + } + + public void setSourceDocId(Long sourceDocId) { + this.sourceDocId = sourceDocId; + } + + public String getSourceDocType() { + return sourceDocType; + } + + public void setSourceDocType(String sourceDocType) { + this.sourceDocType = sourceDocType; + } + + public String getSourceDocCode() { + return sourceDocCode; + } + + public void setSourceDocCode(String sourceDocCode) { + this.sourceDocCode = sourceDocCode; + } + + public Long getSourceLineId() { + return sourceLineId; + } + + public void setSourceLineId(Long sourceLineId) { + this.sourceLineId = sourceLineId; + } + + public void setClientId(Long clientId) { this.clientId = clientId; } diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcPendingInspect.java b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcPendingInspect.java new file mode 100644 index 0000000..0c7be04 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcPendingInspect.java @@ -0,0 +1,399 @@ +package com.ktg.mes.qc.domain; + +import com.ktg.common.core.domain.BaseEntity; + +public class QcPendingInspect extends BaseEntity { + + private static final long serialVersionUID = 1L; + + private Long sourceDocId; + + private String sourceDocCode; + + private Long sourceLineId; + + private String recordTime; + + private String qcType; + + private Long itemId; + + private String itemCode; + + private String itemName; + + private String specification; + + private String unitOfMeasure; + + private String quantityUncheck; + + private Long workOrderId; + + private String workOrderCode; + + private String workOrderName; + + private Long workstationId; + + private String workstationCode; + + private String workstationName; + + private Long vendorClientId; + + private String vendorClientCode; + + private String vendorClientName; + + private String vendorClientNick; + + private String batchCode; + + private Long taskId; + + private String taskCode; + + private String taskName; + + private Long warehouseId; + + private String warehouseCode; + + private String warehouseName; + + private Long locationId; + + private String locationCode; + + private String locationName; + + private Long areaId; + + private String areaCode; + + private String areaName; + + private String address; + + public Long getSourceDocId() { + return sourceDocId; + } + + public void setSourceDocId(Long sourceDocId) { + this.sourceDocId = sourceDocId; + } + + public String getSourceDocCode() { + return sourceDocCode; + } + + public void setSourceDocCode(String sourceDocCode) { + this.sourceDocCode = sourceDocCode; + } + + public Long getSourceLineId() { + return sourceLineId; + } + + public void setSourceLineId(Long sourceLineId) { + this.sourceLineId = sourceLineId; + } + + public String getRecordTime() { + return recordTime; + } + + public void setRecordTime(String recordTime) { + this.recordTime = recordTime; + } + + public String getQcType() { + return qcType; + } + + public void setQcType(String qcType) { + this.qcType = qcType; + } + + public Long getItemId() { + return itemId; + } + + public void setItemId(Long itemId) { + this.itemId = itemId; + } + + public String getItemCode() { + return itemCode; + } + + public void setItemCode(String itemCode) { + this.itemCode = itemCode; + } + + public String getItemName() { + return itemName; + } + + public void setItemName(String itemName) { + this.itemName = itemName; + } + + public String getSpecification() { + return specification; + } + + public void setSpecification(String specification) { + this.specification = specification; + } + + public String getUnitOfMeasure() { + return unitOfMeasure; + } + + public void setUnitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + } + + public String getQuantityUncheck() { + return quantityUncheck; + } + + public void setQuantityUncheck(String quantityUncheck) { + this.quantityUncheck = quantityUncheck; + } + + public Long getWorkOrderId() { + return workOrderId; + } + + public void setWorkOrderId(Long workOrderId) { + this.workOrderId = workOrderId; + } + + public String getWorkOrderCode() { + return workOrderCode; + } + + public void setWorkOrderCode(String workOrderCode) { + this.workOrderCode = workOrderCode; + } + + public String getWorkOrderName() { + return workOrderName; + } + + public void setWorkOrderName(String workOrderName) { + this.workOrderName = workOrderName; + } + + public Long getWorkstationId() { + return workstationId; + } + + public void setWorkstationId(Long workstationId) { + this.workstationId = workstationId; + } + + public String getWorkstationCode() { + return workstationCode; + } + + public void setWorkstationCode(String workstationCode) { + this.workstationCode = workstationCode; + } + + public String getWorkstationName() { + return workstationName; + } + + public void setWorkstationName(String workstationName) { + this.workstationName = workstationName; + } + + public Long getVendorClientId() { + return vendorClientId; + } + + public void setVendorClientId(Long vendorClientId) { + this.vendorClientId = vendorClientId; + } + + public String getVendorClientCode() { + return vendorClientCode; + } + + public void setVendorClientCode(String vendorClientCode) { + this.vendorClientCode = vendorClientCode; + } + + public String getVendorClientName() { + return vendorClientName; + } + + public void setVendorClientName(String vendorClientName) { + this.vendorClientName = vendorClientName; + } + + public String getVendorClientNick() { + return vendorClientNick; + } + + public void setVendorClientNick(String vendorClientNick) { + this.vendorClientNick = vendorClientNick; + } + + public String getBatchCode() { + return batchCode; + } + + public void setBatchCode(String batchCode) { + this.batchCode = batchCode; + } + + public Long getTaskId() { + return taskId; + } + + public void setTaskId(Long taskId) { + this.taskId = taskId; + } + + public String getTaskCode() { + return taskCode; + } + + public void setTaskCode(String taskCode) { + this.taskCode = taskCode; + } + + public String getTaskName() { + return taskName; + } + + public void setTaskName(String taskName) { + this.taskName = taskName; + } + + public Long getWarehouseId() { + return warehouseId; + } + + public void setWarehouseId(Long warehouseId) { + this.warehouseId = warehouseId; + } + + public String getWarehouseCode() { + return warehouseCode; + } + + public void setWarehouseCode(String warehouseCode) { + this.warehouseCode = warehouseCode; + } + + public String getWarehouseName() { + return warehouseName; + } + + public void setWarehouseName(String warehouseName) { + this.warehouseName = warehouseName; + } + + public Long getLocationId() { + return locationId; + } + + public void setLocationId(Long locationId) { + this.locationId = locationId; + } + + public String getLocationCode() { + return locationCode; + } + + public void setLocationCode(String locationCode) { + this.locationCode = locationCode; + } + + public String getLocationName() { + return locationName; + } + + public void setLocationName(String locationName) { + this.locationName = locationName; + } + + public Long getAreaId() { + return areaId; + } + + public void setAreaId(Long areaId) { + this.areaId = areaId; + } + + public String getAreaCode() { + return areaCode; + } + + public void setAreaCode(String areaCode) { + this.areaCode = areaCode; + } + + public String getAreaName() { + return areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + @Override + public String toString() { + return "QcPendingInspect{" + + "sourceDocId=" + sourceDocId + + ", sourceDocCode='" + sourceDocCode + '\'' + + ", sourceLineId=" + sourceLineId + + ", recordTime='" + recordTime + '\'' + + ", qcType='" + qcType + '\'' + + ", itemId=" + itemId + + ", itemCode='" + itemCode + '\'' + + ", itemName='" + itemName + '\'' + + ", specification='" + specification + '\'' + + ", unitOfMeasure='" + unitOfMeasure + '\'' + + ", quantityUncheck='" + quantityUncheck + '\'' + + ", workOrderId=" + workOrderId + + ", workOrderCode='" + workOrderCode + '\'' + + ", workOrderName='" + workOrderName + '\'' + + ", workstationId=" + workstationId + + ", workstationCode='" + workstationCode + '\'' + + ", workstationName='" + workstationName + '\'' + + ", vendorClientId=" + vendorClientId + + ", vendorClientCode='" + vendorClientCode + '\'' + + ", vendorClientName='" + vendorClientName + '\'' + + ", vendorClientNick='" + vendorClientNick + '\'' + + ", batchCode='" + batchCode + '\'' + + ", taskId=" + taskId + + ", taskCode='" + taskCode + '\'' + + ", taskName='" + taskName + '\'' + + ", warehouseId=" + warehouseId + + ", warehouseCode='" + warehouseCode + '\'' + + ", warehouseName='" + warehouseName + '\'' + + ", locationId=" + locationId + + ", locationCode='" + locationCode + '\'' + + ", locationName='" + locationName + '\'' + + ", areaId=" + areaId + + ", areaCode='" + areaCode + '\'' + + ", areaName='" + areaName + '\'' + + ", address='" + address + '\'' + + '}'; + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcPendingInspectMapper.java b/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcPendingInspectMapper.java new file mode 100644 index 0000000..d02f735 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcPendingInspectMapper.java @@ -0,0 +1,15 @@ +package com.ktg.mes.qc.mapper; + +import com.ktg.mes.qc.domain.QcPendingInspect; + +import java.util.List; + +public interface QcPendingInspectMapper { + /** + * 查询待检任务列表 + * + * @param qcPendingInspect 待检任务 + * @return 待检任务集合 + */ + public List selectQcPendingList(QcPendingInspect qcPendingInspect); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcPendingInspectService.java b/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcPendingInspectService.java new file mode 100644 index 0000000..e714473 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcPendingInspectService.java @@ -0,0 +1,15 @@ +package com.ktg.mes.qc.service; + +import com.ktg.mes.qc.domain.QcPendingInspect; + +import java.util.List; + +public interface IQcPendingInspectService { + /** + * 查询待检任务列表 + * + * @param qcPendingInspect 待检任务 + * @return 待检任务集合 + */ + public List selectQcPendingList(QcPendingInspect qcPendingInspect); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcPendingInspectServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcPendingInspectServiceImpl.java new file mode 100644 index 0000000..cb27507 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcPendingInspectServiceImpl.java @@ -0,0 +1,21 @@ +package com.ktg.mes.qc.service.impl; + +import com.ktg.mes.qc.domain.QcPendingInspect; +import com.ktg.mes.qc.mapper.QcPendingInspectMapper; +import com.ktg.mes.qc.service.IQcPendingInspectService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class QcPendingInspectServiceImpl implements IQcPendingInspectService { + + @Autowired + private QcPendingInspectMapper qcPendingInspectMapper; + + @Override + public List selectQcPendingList(QcPendingInspect qcPendingInspect) { + return qcPendingInspectMapper.selectQcPendingList(qcPendingInspect); + } +} diff --git a/ktg-mes/src/main/resources/mapper/qc/QcIpqcMapper.xml b/ktg-mes/src/main/resources/mapper/qc/QcIpqcMapper.xml index 9264092..ee0b5aa 100644 --- a/ktg-mes/src/main/resources/mapper/qc/QcIpqcMapper.xml +++ b/ktg-mes/src/main/resources/mapper/qc/QcIpqcMapper.xml @@ -10,6 +10,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + @@ -52,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select ipqc_id, ipqc_code, ipqc_name, ipqc_type, template_id, workorder_id, workorder_code, workorder_name, task_id, task_code, task_name, workstation_id, workstation_code, workstation_name, process_id, process_code, process_name, item_id, item_code, item_name, specification, unit_of_measure, quantity_check, quantity_unqualified, quantity_qualified, cr_rate, maj_rate, min_rate, cr_quantity, maj_quantity, min_quantity, check_result, inspect_date, inspector, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from qc_ipqc + select ipqc_id, ipqc_code, ipqc_name, ipqc_type, template_id, source_doc_id,source_doc_type, source_doc_code, source_line_id, workorder_id, workorder_code, workorder_name, task_id, task_code, task_name, workstation_id, workstation_code, workstation_name, process_id, process_code, process_name, item_id, item_code, item_name, specification, unit_of_measure, quantity_check, quantity_unqualified, quantity_qualified, cr_rate, maj_rate, min_rate, cr_quantity, maj_quantity, min_quantity, check_result, inspect_date, inspector, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from qc_ipqc @@ -57,6 +61,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and iqc_code = #{iqcCode} and iqc_name like concat('%', #{iqcName}, '%') and template_id = #{templateId} + and source_doc_id = #{sourceDocId} + and source_doc_type = #{sourceDocType} + and source_doc_code = #{sourceDocCode} + and source_line_id = #{sourceLineId} and vendor_id = #{vendorId} and vendor_code = #{vendorCode} and vendor_name like concat('%', #{vendorName}, '%') @@ -103,6 +111,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" iqc_code, iqc_name, template_id, + source_doc_id, + source_doc_type, + source_doc_code, + source_line_id, vendor_id, vendor_code, vendor_name, @@ -143,6 +155,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{iqcCode}, #{iqcName}, #{templateId}, + #{sourceDocId}, + #{sourceDocType}, + #{sourceDocCode}, + #{sourceLineId}, #{vendorId}, #{vendorCode}, #{vendorName}, @@ -208,6 +224,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" iqc_code = #{iqcCode}, iqc_name = #{iqcName}, template_id = #{templateId}, + source_doc_id = #{sourceDocId}, + source_doc_type = #{sourceDocType}, + source_doc_code = #{sourceDocCode}, + source_line_id = #{sourceLineId}, vendor_id = #{vendorId}, vendor_code = #{vendorCode}, vendor_name = #{vendorName}, diff --git a/ktg-mes/src/main/resources/mapper/qc/QcOqcMapper.xml b/ktg-mes/src/main/resources/mapper/qc/QcOqcMapper.xml index ec67f68..4493653 100644 --- a/ktg-mes/src/main/resources/mapper/qc/QcOqcMapper.xml +++ b/ktg-mes/src/main/resources/mapper/qc/QcOqcMapper.xml @@ -9,6 +9,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + @@ -47,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select oqc_id, oqc_code, oqc_name, template_id, client_id, client_code, client_name, batch_code, item_id, item_code, item_name, specification, unit_of_measure, quantity_min_check, quantity_max_unqualified, quantity_out, quantity_check, quantity_unqualified, quantity_quanlified, cr_rate, maj_rate, min_rate, cr_quantity, maj_quantity, min_quantity, check_result, out_date, inspect_date, inspector, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from qc_oqc + select oqc_id, oqc_code, oqc_name, template_id, source_doc_id,source_doc_type, source_doc_code, source_line_id, client_id, client_code, client_name, batch_code, item_id, item_code, item_name, specification, unit_of_measure, quantity_min_check, quantity_max_unqualified, quantity_out, quantity_check, quantity_unqualified, quantity_quanlified, cr_rate, maj_rate, min_rate, cr_quantity, maj_quantity, min_quantity, check_result, out_date, inspect_date, inspector, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from qc_oqc + SELECT * + FROM + ( + SELECT + wi.recpt_id as source_doc_id, + wi.recpt_code AS source_doc_code, + wil.line_id AS source_line_id, + wi.create_time AS record_time, + 'IQC' AS qc_type, + wil.item_id, + wil.item_code, + wil.item_name, + wil.specification, + wil.unit_of_measure, + wil.quantity_recived AS quantity_uncheck, + NULL AS workorder_id, + NULL AS workorder_code, + NULL AS workorder_name, + NULL AS task_id, + NULL AS task_code, + NULL AS task_name, + NULL AS workstation_id, + NULL AS workstation_code, + NULL AS workstation_name, + wi.vendor_id as vendor_client_id, + wi.vendor_code as vendor_client_code, + wi.vendor_name as vendor_client_name, + wi.vendor_nick as vendor_client_nick, + wil.batch_code, + wil.warehouse_id, + wil.warehouse_code, + wil.warehouse_name, + wil.location_id, + wil.location_code, + wil.location_name, + wil.area_id, + wil.area_code, + wil.area_name, + concat( wil.warehouse_name, wil.location_name, wil.area_name ) AS address + FROM + wm_item_recpt wi + LEFT JOIN wm_item_recpt_line wil ON wi.recpt_id = wil.recpt_id + WHERE + wil.iqc_check = 'Y' + AND wil.iqc_id IS NULL UNION ALL + SELECT + pf.record_id as source_doc_id, + pf.feedback_code AS source_doc_code, + pf.record_id as source_line_id, + pf.feedback_time AS record_time, + 'PQC' AS qc_type, + pf.item_id, + pf.item_code, + pf.item_name, + pf.specification, + pf.unit_of_measure, + pf.quantity_uncheck, + pf.workorder_id, + pf.workorder_code, + pf.workorder_name, + pf.task_id, + pf.task_code, + NULL AS task_name, + pf.workstation_id, + pf.workstation_code, + pf.workstation_name, + NULL as vendor_client_id, + NULL as vendor_client_code, + NULL as vendor_client_name, + NULL as vendor_client_nick, + NULL AS batch_code, + NULL AS warehouse_id, + NULL AS warehouse_code, + NULL AS warehouse_name, + NULL AS location_id, + NULL AS location_code, + NULL AS location_name, + NULL AS area_id, + NULL AS area_code, + NULL AS area_name, + pf.workstation_name AS address + FROM + pro_feedback pf + WHERE + pf.quantity_uncheck > 0 UNION ALL + SELECT + ps.salse_id AS source_doc_id, + ps.salse_code AS source_doc_code, + psl.line_id AS source_line_id, + ps.create_time AS record_time, + 'OQC' AS qc_type, + psl.item_id, + psl.item_code, + psl.item_name, + psl.specification, + psl.unit_of_measure, + psl.quantity_salse AS quantity_uncheck, + NULL AS workorder_id, + NULL AS workorder_code, + NULL AS workorder_name, + NULL AS task_id, + NULL AS task_code, + NULL AS task_name, + NULL AS workstation_id, + NULL AS workstation_code, + NULL AS workstation_name, + ps.client_id as vendor_client_id, + ps.client_code as vendor_client_code, + ps.client_name as vendor_client_name, + ps.client_nick as vendor_client_nick, + psl.batch_code, + psl.warehouse_id, + psl.warehouse_code, + psl.warehouse_name, + psl.location_id, + psl.location_code, + psl.location_name, + psl.area_id, + psl.area_code, + psl.area_name, + concat( psl.warehouse_name, psl.location_name, psl.area_name ) AS address + FROM + wm_product_salse ps + LEFT JOIN wm_product_salse_line psl ON ps.salse_id = psl.salse_id + WHERE + psl.oqc_check = 'Y' + AND psl.oqc_id IS NULL + ) t + ORDER BY record_time DESC + + + \ No newline at end of file diff --git a/ktg-system/src/main/resources/mapper/system/SysAutoCodeRuleMapper.xml b/ktg-system/src/main/resources/mapper/system/SysAutoCodeRuleMapper.xml index 2528a17..7d6e8d6 100644 --- a/ktg-system/src/main/resources/mapper/system/SysAutoCodeRuleMapper.xml +++ b/ktg-system/src/main/resources/mapper/system/SysAutoCodeRuleMapper.xml @@ -34,7 +34,7 @@ AND rule_id = #{ruleId} - AND rule_code = #{ruleCode} + AND rule_code like concat('%', #{ruleCode}, '%')