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 764ee92e..9a5b2bcf 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
@@ -664,6 +664,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where mrw.parent_order = '0'
and mrw.workorder_code = #{workorderCode}
and mrw.del_flag = '0' and po.del_flag = '0'
+ order by mrw.batch
-
+
+ select status,id
+ from pro_order
+ where id in
+
+ #{orderId}
+
+ and status in ('o1','o0') and del_flag = '0'
+
insert into mes_prepare_detail
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDefect.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDefect.java
index 3cf1903f..6be4541a 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDefect.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDefect.java
@@ -74,6 +74,8 @@ public class QcCheckTaskDefect extends BaseEntity {
@Excel(name = "检验任务id")
private String belongTo;
+ private String belongToDetail;
+
/**
* 合格数量
*/
@@ -86,6 +88,14 @@ public class QcCheckTaskDefect extends BaseEntity {
@Excel(name = "不合格数量")
private BigDecimal noOkQuality;
+ public String getBelongToDetail() {
+ return belongToDetail;
+ }
+
+ public void setBelongToDetail(String belongToDetail) {
+ this.belongToDetail = belongToDetail;
+ }
+
public void setRecordId(String recordId) {
this.recordId = recordId;
}
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java
index 1aac1cf1..e2193604 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java
@@ -135,6 +135,33 @@ public class QcCheckTaskDetail extends BaseEntity {
private String fileListStr;
private List files;
private List fileUrls;
+ private String defectCodes;
+ private String defectNames;
+ private String defectQualitys;
+
+ public String getDefectCodes() {
+ return defectCodes;
+ }
+
+ public void setDefectCodes(String defectCodes) {
+ this.defectCodes = defectCodes;
+ }
+
+ public String getDefectNames() {
+ return defectNames;
+ }
+
+ public void setDefectNames(String defectNames) {
+ this.defectNames = defectNames;
+ }
+
+ public String getDefectQualitys() {
+ return defectQualitys;
+ }
+
+ public void setDefectQualitys(String defectQualitys) {
+ this.defectQualitys = defectQualitys;
+ }
public List getFileUrls() {
return fileUrls;
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 be2987fd..f2792672 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
@@ -90,6 +90,8 @@ public interface QcCheckTaskIncomeMapper {
List getUserByMaterial(String materialCode);
+ List getCheckUsers(String orderNo);
+
int addCheckUsers(@Param("list") List users);
int addQcCheckTaskDefects(@Param("list") List defects);
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportProduceServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportProduceServiceImpl.java
index a18e95e8..ce3e22e3 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportProduceServiceImpl.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckReportProduceServiceImpl.java
@@ -19,10 +19,7 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
import java.util.stream.Collectors;
/**
@@ -215,6 +212,7 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer
if(StringUtils.isNotBlank(produce.getIncomeBatchNo())){
List batchNos = Arrays.asList(produce.getIncomeBatchNo().split(";"));
List disBatchNos = batchNos.stream().distinct().collect(Collectors.toList());
+ Collections.sort(disBatchNos);
produce.setIncomeBatchNo(StringUtils.join(disBatchNos, ";"));
}
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 859c39d3..71992ffa 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
@@ -214,7 +214,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckTaskIncome.setCheckManName("");
qcCheckTaskIncome.setCheckManCode("");
/**qc_user_material取默认检查人**/
- List users = qcCheckTaskIncomeMapper.getUserByMaterial(qcCheckTaskIncome.getMaterialCode());
+ List users = qcCheckTaskIncomeMapper.getCheckUsers(qcCheckTaskIncome.getOrderNo());
if(CollectionUtils.isEmpty(users)){
QcUserMaterialDTO dto0 = new QcUserMaterialDTO();
dto0.setId(IdUtils.fastSimpleUUID());
@@ -599,7 +599,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
break;
}
}
-
+ //TODO;today
int n = 0;
QcCheckTaskIncome qcCheckTask = new QcCheckTaskIncome();
qcCheckTask.setUpdateBy(updateBy);
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskInventoryServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskInventoryServiceImpl.java
index c2bd2478..93630137 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskInventoryServiceImpl.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskInventoryServiceImpl.java
@@ -176,23 +176,6 @@ public class QcCheckTaskInventoryServiceImpl implements IQcCheckTaskInventorySer
}
//检验人插入
qcCheckTaskUserService.insertQcCheckTaskUserList(qcCheckTaskUserList);
- } else {//上位机
- qcCheckTaskInventory.setCheckManName("");
- qcCheckTaskInventory.setCheckManCode("");
- /**qc_user_material取默认检查人**/
- List users = qcCheckTaskIncomeMapper.getUserByMaterial(qcCheckTaskInventory.getMaterialCode());
- if (!CollectionUtils.isEmpty(users)) {
- for (QcUserMaterialDTO user : users) {
- user.setId(IdUtils.fastSimpleUUID());
- user.setBelongTo(beLongId);
- user.setCheckNo(qcCheckTaskInventory.getCheckNo());
- user.setCreateBy(createBy);
- user.setFactoryCode(factoryCode);
- user.setCreateTime(nowDate);
- }
- int m = qcCheckTaskIncomeMapper.addCheckUsers(users);
- logger.info("检查人新增" + m + "成功");
- }
}
/** 不良品数据插入 */
BigDecimal noOkQuality = new BigDecimal(0);
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskMarketServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskMarketServiceImpl.java
index d250d743..bad68a89 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskMarketServiceImpl.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskMarketServiceImpl.java
@@ -173,23 +173,6 @@ public class QcCheckTaskMarketServiceImpl implements IQcCheckTaskMarketService {
}
//检验人插入
qcCheckTaskUserService.insertQcCheckTaskUserList(qcCheckTaskUserList);
- } else {//上位机
- qcCheckTaskMarket.setCheckManName("");
- qcCheckTaskMarket.setCheckManCode("");
- /**qc_user_material取默认检查人**/
- List users = qcCheckTaskIncomeMapper.getUserByMaterial(qcCheckTaskMarket.getMaterialCode());
- if (!CollectionUtils.isEmpty(users)) {
- for (QcUserMaterialDTO user : users) {
- user.setId(IdUtils.fastSimpleUUID());
- user.setBelongTo(beLongId);
- user.setCheckNo(qcCheckTaskMarket.getCheckNo());
- user.setCreateBy(createBy);
- user.setFactoryCode(factoryCode);
- user.setCreateTime(nowDate);
- }
- int m = qcCheckTaskIncomeMapper.addCheckUsers(users);
- logger.info("检查人新增" + m + "成功");
- }
}
/** 不良品数据插入 */
if(qcCheckTaskMarket.getNoOkQuality()==null){
diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java
index cb363579..207d4d59 100644
--- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java
+++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java
@@ -204,7 +204,7 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
qcCheckTaskProduce.setCheckManName("");
qcCheckTaskProduce.setCheckManCode("");
/**qc_user_material取默认检查人**/
- List users = qcCheckTaskIncomeMapper.getUserByMaterial(qcCheckTaskProduce.getMaterialCode());
+ List users = qcCheckTaskIncomeMapper.getCheckUsers(qcCheckTaskProduce.getOrderNo());
if(!CollectionUtils.isEmpty(users)){
for(QcUserMaterialDTO user:users){
user.setId(IdUtils.fastSimpleUUID());
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 0d0597c1..c6c1bbfd 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
@@ -338,9 +338,16 @@
- select user_code userCode,
- user_name userName
- from qc_user_material where material_code = #{materialCode}
+ select user_code userCode,
+ user_name userName
+ from qc_user_material where material_code = #{materialCode}
+
+
+ select qum.user_code userCode,
+ qum.user_name userName
+ from qc_user_material qum
+ left join pro_order_workorder pow on pow.workorder_code = qum.material_code
+ where pow.workorder_code = #{orderNo} and pow.del_flag = '0' and qum.del_flag = '0'
select