diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml
index 6f1a8645..5c6c1630 100644
--- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml
+++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml
@@ -298,6 +298,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where
CONVERT(varchar(10),feedback_time, 120) >= #{productDateStart}
and #{productDateEnd} >= CONVERT(varchar(10),feedback_time, 120)
+ and parent_order = '0'
)mrw
group by mrw.nameDate,mrw.productCode,mrw.productName,mrw.feedbackTime
@@ -308,6 +309,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where
CONVERT(varchar(10),mrw.feedback_time, 120) >= #{productDateStart}
and #{productDateEnd} >= CONVERT(varchar(10),mrw.feedback_time, 120)
+ and parent_order = '0'
select
@@ -470,7 +472,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select mrw.workorderCode,mrw.productCode,mrw.productName,mrw.machineCode,mrw.machineName,
mrw.shiftCode,mrw.feedbackTime feedbackTimeStr,mrw.quantityFeedback,
- mrw.workTime,mrw.useMan,mrw.uploadStatus,
+ mrw.workTime,mrw.useMan,mrw.uploadStatus,mrw.unit,
pow.order_code orderCode,pow.quantity_split quantity
from (
select workorder_code workorderCode,
@@ -483,10 +485,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sum(quantity_feedback) quantityFeedback,
sum(work_time) workTime,
sum(use_man) useMan,
- upload_status uploadStatus
-
+ upload_status uploadStatus,
+
+ unit
from mes_report_work
where del_flag = '0' and parent_order = '0'
and workorder_code like concat('%', #{workorderCode}, '%')
@@ -498,8 +499,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and #{feedbackTimeEnd} >= CONVERT(varchar(19),feedback_time, 120)
and upload_status = #{uploadStatus}
group by workorder_code, product_code,product_name,CONVERT(varchar(10),feedback_time, 120),machine_code,machine_name,shift_code
- ,upload_status
-
+ ,upload_status,unit
+
) mrw
left join pro_order_workorder pow on mrw.workorderCode = pow.workorder_code
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckProjectController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckProjectController.java
index b9f60e5f..236ea38f 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckProjectController.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckProjectController.java
@@ -23,7 +23,7 @@ import com.op.common.core.web.page.TableDataInfo;
/**
* 检验项目维护Controller
- *
+ *
* @author Open Platform
* @date 2023-10-13
*/
@@ -44,6 +44,12 @@ public class QcCheckProjectController extends BaseController {
return getDataTable(list);
}
+ @GetMapping("/getProjectList")
+ public List getProjectList(QcCheckProject qcCheckProject) {
+ List list = qcCheckProjectService.selectQcCheckProjectList(qcCheckProject);
+ return list;
+ }
+
/**
* 导出检验项目维护列表
*/
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java
index 1af2211e..0131d074 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java
@@ -229,4 +229,15 @@ public class QcCheckTaskIncomeController extends BaseController {
List list = qcCheckTaskIncomeService.getLLWorkOrder(qcCheckTaskIncome);
return getDataTable(list);
}
+ /**获取生产工单列表**/
+ @GetMapping("/getWorkOrder")
+ public TableDataInfo getWorkOrder(QcCheckTaskIncome qcCheckTaskIncome) {
+ startPage();
+ List list = qcCheckTaskIncomeService.getWorkOrder(qcCheckTaskIncome);
+ return getDataTable(list);
+ }
+ @PutMapping("/getBatchList")
+ public List getBatchList(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) {
+ return qcCheckTaskIncomeService.getBatchList(qcCheckTaskIncome);
+ }
}
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java
index 9678b82b..08608f66 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java
@@ -267,4 +267,18 @@ public class QuaController extends BaseController {
List list = qcCheckTaskIncomeService.getLLWorkOrder(qcCheckTaskIncome);
return getDataTable(list);
}
+ /**获取生产工单列表**/
+ @GetMapping("/getWorkOrder")
+ public TableDataInfo getWorkOrder(QcCheckTaskIncome qcCheckTaskIncome) {
+ DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskIncome.getFactoryCode());
+ startPage();
+ List list = qcCheckTaskIncomeService.getWorkOrder(qcCheckTaskIncome);
+ return getDataTable(list);
+ }
+
+ @PutMapping("/getBatchList")
+ public List getBatchList(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) {
+ DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskIncome.getFactoryCode());
+ return qcCheckTaskIncomeService.getBatchList(qcCheckTaskIncome);
+ }
}
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java
index 178d9624..ec66fb6d 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java
@@ -24,6 +24,8 @@ public class QcCheckTaskIncome extends BaseEntity {
@Excel(name = "检验任务编号")
private String checkNo;
+ private String workorderCode;
+
/** 来料批次号 */
@Excel(name = "批次号")
private String incomeBatchNo;
@@ -123,6 +125,32 @@ public class QcCheckTaskIncome extends BaseEntity {
private String typeCode;
private String checkType;
private String qualityStatus;
+ private String batchCode;
+ private String batchId;
+
+ public String getBatchCode() {
+ return batchCode;
+ }
+
+ public void setBatchCode(String batchCode) {
+ this.batchCode = batchCode;
+ }
+
+ public String getBatchId() {
+ return batchId;
+ }
+
+ public void setBatchId(String batchId) {
+ this.batchId = batchId;
+ }
+
+ public String getWorkorderCode() {
+ return workorderCode;
+ }
+
+ public void setWorkorderCode(String workorderCode) {
+ this.workorderCode = workorderCode;
+ }
public String getQualityStatus() {
return qualityStatus;
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java
index bfe82357..317c1cab 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java
@@ -82,4 +82,6 @@ public interface QcCheckTaskIncomeMapper {
int updateQcCheckTaskDetails(@Param("list") List details);
List getQcUnitList(SysDictData sysDictData);
+
+ List getBatchList(QcCheckTaskIncome qcCheckTaskIncome);
}
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckUnqualifiedMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckUnqualifiedMapper.java
index 41f8ca68..f39cdaeb 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckUnqualifiedMapper.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckUnqualifiedMapper.java
@@ -76,4 +76,8 @@ public interface QcCheckUnqualifiedMapper {
public List getLLWorkOrder(QcCheckTaskIncome qcCheckTaskIncome);
void updateQualityStatus(QcCheckTaskIncome qcCheckTaskIncome);
+
+ List getWorkOrder(QcCheckTaskIncome qcCheckTaskIncome);
+
+ int updateWorkOrderStatus(QcCheckTaskIncome qcCheckTaskIncome);
}
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java
index 961900e1..4fa464c6 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java
@@ -81,4 +81,8 @@ public interface IQcCheckTaskIncomeService {
List getDefectList(QcDefectType qcDefectType);
List getLLWorkOrder(QcCheckTaskIncome qcCheckTaskIncome);
+
+ List getWorkOrder(QcCheckTaskIncome qcCheckTaskIncome);
+
+ List getBatchList(QcCheckTaskIncome qcCheckTaskIncome);
}
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java
index 047be0b7..4b21103b 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java
@@ -254,6 +254,10 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckTaskIncome.setCheckResult(result);
qcCheckTaskIncome.setCheckTime(DateUtils.getNowDate());
n = qcCheckTaskIncomeMapper.updateQcCheckTaskIncome(qcCheckTaskIncome);
+
+ /**wms_raw_order_in-->quality_status->**/
+ qcCheckTaskIncome.setCheckResult(result.equals("Y")?"1":"0");
+ qcCheckUnqualifiedMapper.updateQualityStatus(qcCheckTaskIncome);
}else if("produce".equals(qcCheckTaskIncome.getTypeCode())){
QcCheckTaskProduce qcCheckTaskProduce = new QcCheckTaskProduce();
qcCheckTaskProduce.setCheckStatus("2");
@@ -261,6 +265,11 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckTaskProduce.setCheckResult(result);
qcCheckTaskProduce.setCheckTime(DateUtils.getNowDate());
n = qcCheckTaskProduceMapper.updateQcCheckTaskProduce(qcCheckTaskProduce);
+
+
+ /**pro_order_workorder-->status->w5**/
+ qcCheckTaskIncome.setStatus("w5");
+ qcCheckUnqualifiedMapper.updateWorkOrderStatus(qcCheckTaskIncome);
}else if("product".equals(qcCheckTaskIncome.getTypeCode())){
QcCheckTaskWarehousing warehousing = new QcCheckTaskWarehousing();
warehousing.setCheckStatus("2");
@@ -283,10 +292,6 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
}
- /**wms_raw_order_in-->quality_status->**/
- qcCheckTaskIncome.setCheckResult(result.equals("Y")?"1":"0");
- qcCheckUnqualifiedMapper.updateQualityStatus(qcCheckTaskIncome);
-
return n ;
}
@@ -302,6 +307,18 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
return qcCheckUnqualifiedMapper.getLLWorkOrder(qcCheckTaskIncome);
}
+ @Override
+ @DS("#header.poolName")
+ public List getWorkOrder(QcCheckTaskIncome qcCheckTaskIncome) {
+ return qcCheckUnqualifiedMapper.getWorkOrder(qcCheckTaskIncome);
+ }
+
+ @Override
+ @DS("#header.poolName")
+ public List getBatchList(QcCheckTaskIncome qcCheckTaskIncome) {
+ return qcCheckTaskIncomeMapper.getBatchList(qcCheckTaskIncome);
+ }
+
@Override
public int commitCheckResults(List details) {
DynamicDataSourceContextHolder.push("ds_"+details.get(0).getFactoryCode());
diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml
index 01fc9767..25cb8c80 100644
--- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml
+++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml
@@ -146,6 +146,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dict_type = 'unit'
and status = '0'
+
+ select powb.batch_id batchId,
+ powb.batch_code batchCode
+ from pro_order_workorder_batch powb
+ left join pro_order_workorder pow on powb.workorder_id = pow.workorder_id
+ where powb.del_flag = '0' and pow.del_flag = '0'
+ and pow.workorder_code = #{workorderCode}
+
insert into qc_check_task
diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeMapper.xml
index ef7216b6..e234127c 100644
--- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeMapper.xml
+++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeMapper.xml
@@ -32,7 +32,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and type_code = #{typeCode}
and type_name like concat('%', #{typeName}, '%')
and attr1 = #{attr1}
- and factory_code = #{factoryCode}
and del_flag = '0'
order by create_time
diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckUnqualifiedMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckUnqualifiedMapper.xml
index 9f5add88..2d46fce6 100644
--- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckUnqualifiedMapper.xml
+++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckUnqualifiedMapper.xml
@@ -103,6 +103,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where wroi.active_flag = '1' and wroi.quality_status = '0'
and wroi.order_no like contact like ('%',#{orderNo})
+
+ select
+ workorder_code workorderCode,
+ workorder_code_sap orderNo,
+ product_code materialCode,
+ product_name materialName,
+ quantity_split quality,
+ unit,
+ product_date incomeTime
+ from pro_order_workorder
+ where status != 'w5' and parent_order != '0' and workorder_code_sap is not null
+ and workorder_code_sap like contact like ('%',#{orderNo})
+ order by product_date desc
+
insert into qc_check_unqualified
@@ -171,6 +185,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update wms_raw_order_in set quality_status = #{checkResult}
where order_no = #{orderNo}
+
+ update pro_order_workorder set status = #{status} where workorder_code_sap = #{orderNo}
+
delete from qc_check_unqualified where id = #{id}