推送箱变qms质检报告优化字段

This commit is contained in:
lihao 2025-11-05 08:49:13 +08:00
parent 524afaeceb
commit d1431ad379
6 changed files with 58 additions and 27 deletions

View File

@ -5,10 +5,7 @@
package nccloud.web.pu.arrival.action;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
@ -263,7 +260,6 @@ public class QCAction implements ICommonAction {
private String getCghthVal(ArriveHeaderVO hvo, ArriveItemVO[] bvo) throws BusinessException {
String cghth = "";
String pkPupsndoc = hvo.getPk_pupsndoc();
// ²éѯ²É¹ºÔ±Ãû³Æ
String name = "";
if (pkPupsndoc != null && !pkPupsndoc.isEmpty() && !"~".equals(pkPupsndoc)) {
name = MyHelper.getStrValByCondition(PsndocVO.getDefaultTableName(), PsndocVO.NAME,
@ -271,11 +267,19 @@ public class QCAction implements ICommonAction {
}
if (bvo != null && bvo.length > 0) {
StringBuilder cghthBuilder = new StringBuilder();
// 添加Set用于去重
Set<String> processedCodes = new HashSet<>();
for (int i = 0; i < bvo.length; i++) {
String vsourcecode = bvo[i].getVsourcecode();
if (vsourcecode == null || vsourcecode.isEmpty() || "~".equals(vsourcecode)) {
continue;
}
// 检查是否已处理过避免重复
if (processedCodes.contains(vsourcecode)) {
continue;
}
processedCodes.add(vsourcecode);
if (i > 0) {
cghthBuilder.append(",");
}
@ -289,6 +293,7 @@ public class QCAction implements ICommonAction {
return cghth;
}
/**
* ÍÆËÍͬ²½Êý¾Ý
*/

View File

@ -39,9 +39,7 @@ import nccloud.framework.web.action.itf.ICommonAction;
import nccloud.framework.web.container.IRequest;
import nccloud.framework.web.json.JsonFactory;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.*;
public class QCRptDataPushtoQmsAction implements ICommonAction {
@ -205,7 +203,6 @@ public class QCRptDataPushtoQmsAction implements ICommonAction {
private String getCghthVal(ArriveHeaderVO hvo, ArriveItemVO[] bvo) throws BusinessException {
String cghth = "";
String pkPupsndoc = hvo.getPk_pupsndoc();
// ²éѯ²É¹ºÔ±Ãû³Æ
String name = "";
if (pkPupsndoc != null && !pkPupsndoc.isEmpty() && !"~".equals(pkPupsndoc)) {
name = MyHelper.getStrValByCondition(PsndocVO.getDefaultTableName(), PsndocVO.NAME,
@ -213,11 +210,19 @@ public class QCRptDataPushtoQmsAction implements ICommonAction {
}
if (bvo != null && bvo.length > 0) {
StringBuilder cghthBuilder = new StringBuilder();
// 添加Set用于去重
Set<String> processedCodes = new HashSet<>();
for (int i = 0; i < bvo.length; i++) {
String vsourcecode = bvo[i].getVsourcecode();
if (vsourcecode == null || vsourcecode.isEmpty() || "~".equals(vsourcecode)) {
continue;
}
// 检查是否已处理过避免重复
if (processedCodes.contains(vsourcecode)) {
continue;
}
processedCodes.add(vsourcecode);
if (i > 0) {
cghthBuilder.append(",");
}

View File

@ -47,12 +47,7 @@ import nccloud.framework.web.processor.template.GridConvertProcessor;
import nccloud.pubitf.pu.arrival.service.IArrivalQueryService;
import nccloud.web.pu.arrivalqc.entity.QualityCheckInfo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
/**
@ -399,7 +394,6 @@ public class QualityCheckAction implements ICommonAction {
private String getCghthVal(ArriveHeaderVO hvo, ArriveItemVO[] bvo) throws BusinessException {
String cghth = "";
String pkPupsndoc = hvo.getPk_pupsndoc();
// ²éѯ²É¹ºÔ±Ãû³Æ
String name = "";
if (pkPupsndoc != null && !pkPupsndoc.isEmpty() && !"~".equals(pkPupsndoc)) {
name = MyHelper.getStrValByCondition(PsndocVO.getDefaultTableName(), PsndocVO.NAME,
@ -407,11 +401,19 @@ public class QualityCheckAction implements ICommonAction {
}
if (bvo != null && bvo.length > 0) {
StringBuilder cghthBuilder = new StringBuilder();
// 添加Set用于去重
Set<String> processedCodes = new HashSet<>();
for (int i = 0; i < bvo.length; i++) {
String vsourcecode = bvo[i].getVsourcecode();
if (vsourcecode == null || vsourcecode.isEmpty() || "~".equals(vsourcecode)) {
continue;
}
// 检查是否已处理过避免重复
if (processedCodes.contains(vsourcecode)) {
continue;
}
processedCodes.add(vsourcecode);
if (i > 0) {
cghthBuilder.append(",");
}

View File

@ -47,12 +47,7 @@ import nccloud.framework.web.processor.template.GridConvertProcessor;
import nccloud.pubitf.pu.arrival.service.IArrivalQueryService;
import nccloud.web.pu.arrivalqc.entity.QualityCheckInfo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
/**
@ -411,7 +406,6 @@ public class QualityCheckAction implements ICommonAction {
private String getCghthVal(ArriveHeaderVO hvo, ArriveItemVO[] bvo) throws BusinessException {
String cghth = "";
String pkPupsndoc = hvo.getPk_pupsndoc();
// 查询采购员名称
String name = "";
if (pkPupsndoc != null && !pkPupsndoc.isEmpty() && !"~".equals(pkPupsndoc)) {
name = MyHelper.getStrValByCondition(PsndocVO.getDefaultTableName(), PsndocVO.NAME,
@ -419,11 +413,19 @@ public class QualityCheckAction implements ICommonAction {
}
if (bvo != null && bvo.length > 0) {
StringBuilder cghthBuilder = new StringBuilder();
// 添加Set用于去重
Set<String> processedCodes = new HashSet<>();
for (int i = 0; i < bvo.length; i++) {
String vsourcecode = bvo[i].getVsourcecode();
if (vsourcecode == null || vsourcecode.isEmpty() || "~".equals(vsourcecode)) {
continue;
}
// 检查是否已处理过避免重复
if (processedCodes.contains(vsourcecode)) {
continue;
}
processedCodes.add(vsourcecode);
if (i > 0) {
cghthBuilder.append(",");
}
@ -437,9 +439,10 @@ public class QualityCheckAction implements ICommonAction {
return cghth;
}
/**
* 推送同步数据
*/
/**
* 推送同步数据
*/
private void pushData(JSONObject param) throws BusinessException {
// String jsonString = param.toJSONString();
// תjson×Ö·û´®µÄʱºò±£ÁônullÖµ

View File

@ -209,11 +209,19 @@ public class SyncDeleteQcQmsRule implements IRule<ReportVO> {
}
if (bvo != null && bvo.length > 0) {
StringBuilder cghthBuilder = new StringBuilder();
// 添加Set用于去重
Set<String> processedCodes = new HashSet<>();
for (int i = 0; i < bvo.length; i++) {
String vsourcecode = bvo[i].getVsourcecode();
if (vsourcecode == null || vsourcecode.isEmpty() || "~".equals(vsourcecode)) {
continue;
}
// 检查是否已处理过避免重复
if (processedCodes.contains(vsourcecode)) {
continue;
}
processedCodes.add(vsourcecode);
if (i > 0) {
cghthBuilder.append(",");
}

View File

@ -171,7 +171,6 @@ public class SyncQcQmsRule implements IRule<ReportVO> {
private String getCghthVal(ArriveHeaderVO hvo, ArriveItemVO[] bvo) throws BusinessException {
String cghth = "";
String pkPupsndoc = hvo.getPk_pupsndoc();
// ИяитцШЁф
String name = "";
if (pkPupsndoc != null && !pkPupsndoc.isEmpty() && !"~".equals(pkPupsndoc)) {
name = MyHelper.getStrValByCondition(PsndocVO.getDefaultTableName(), PsndocVO.NAME,
@ -179,11 +178,19 @@ public class SyncQcQmsRule implements IRule<ReportVO> {
}
if (bvo != null && bvo.length > 0) {
StringBuilder cghthBuilder = new StringBuilder();
// 添加Set用于去重
Set<String> processedCodes = new HashSet<>();
for (int i = 0; i < bvo.length; i++) {
String vsourcecode = bvo[i].getVsourcecode();
if (vsourcecode == null || vsourcecode.isEmpty() || "~".equals(vsourcecode)) {
continue;
}
// 检查是否已处理过避免重复
if (processedCodes.contains(vsourcecode)) {
continue;
}
processedCodes.add(vsourcecode);
if (i > 0) {
cghthBuilder.append(",");
}
@ -198,6 +205,7 @@ public class SyncQcQmsRule implements IRule<ReportVO> {
}
/**
* ÍÆËÍͬ²½Êý¾Ý
*/