箱变-质检报告推启源MES

This commit is contained in:
mzr 2025-10-03 11:52:42 +08:00
parent 7559d99918
commit 33a73ecbac
2 changed files with 23 additions and 5 deletions

View File

@ -48,7 +48,7 @@ public class ReportInsertBP {
this.addAfterFinalRule(processer); this.addAfterFinalRule(processer);
processer.before(aggVO); processer.before(aggVO);
BillInsert<ReportVO> bo = new BillInsert(); BillInsert<ReportVO> bo = new BillInsert();
ReportVO[] vos = (ReportVO[])bo.insert(aggVO); ReportVO[] vos = (ReportVO[]) bo.insert(aggVO);
processer.after(aggVO); processer.after(aggVO);
return vos; return vos;
} }

View File

@ -107,10 +107,8 @@ public class SyncQcQmsRule implements IRule<ReportVO> {
String creatorName = MyHelper.getStrValByCondition("sm_user", UserVO.USER_NAME, String creatorName = MyHelper.getStrValByCondition("sm_user", UserVO.USER_NAME,
UserVO.CUSERID + " = '" + hvo.getBillmaker() + "'"); UserVO.CUSERID + " = '" + hvo.getBillmaker() + "'");
JSONObject singleObj = new JSONObject(); JSONObject singleObj = new JSONObject();
String cghth = ""; // ²É¹ººÏͬºÅ
if (bvo != null && bvo.length > 0) { String cghth = getCghthVal(bvo);
cghth = bvo[0].getVsourcecode();
}
// ÆôÔ´Ëͼ쵥Ö÷±í // ÆôÔ´Ëͼ쵥Ö÷±í
long cts = System.currentTimeMillis(); long cts = System.currentTimeMillis();
singleObj.put("batchid", cts); singleObj.put("batchid", cts);
@ -150,6 +148,26 @@ public class SyncQcQmsRule implements IRule<ReportVO> {
} }
} }
private String getCghthVal(ArriveItemVO[] bvo) {
String cghth = "";
if (bvo != null && bvo.length > 0) {
StringBuilder cghthBuilder = new StringBuilder();
for (int i = 0; i < bvo.length; i++) {
String vsourcecode = bvo[i].getVsourcecode();
if (vsourcecode == null || vsourcecode.isEmpty() || "~".equals(vsourcecode)) {
continue;
}
if (i > 0) {
cghthBuilder.append(",");
}
cghthBuilder.append(vsourcecode);
// ²éѯ²É¹ºÔ±Ãû³Æ
}
cghth = cghthBuilder.toString();
}
return cghth;
}
private void buildSyncData1(ReportVO[] useVOs) throws BusinessException { private void buildSyncData1(ReportVO[] useVOs) throws BusinessException {
for (ReportVO vo : useVOs) { for (ReportVO vo : useVOs) {
ReportHeaderVO hvo = vo.getHVO(); ReportHeaderVO hvo = vo.getHVO();