refactor(qy):优化箱变物料同步到QMS逻辑

This commit is contained in:
mzr 2025-11-11 21:05:08 +08:00
parent 677b785f96
commit 509fdd3098
1 changed files with 5 additions and 4 deletions

View File

@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import nc.bs.arap.util.SqlUtils;
import nc.bs.dao.BaseDAO;
import nc.bs.dao.DAOException;
import nc.bs.logging.Log;
@ -20,10 +19,10 @@ import nc.jdbc.framework.processor.MapProcessor;
import nc.util.mmf.framework.base.MMValueCheck;
import nc.vo.bd.material.MaterialVO;
import nc.vo.bd.material.marbasclass.MarBasClassVO;
import nc.vo.fi.pub.SqlUtils;
import nc.vo.pub.BusinessException;
import nc.vo.pubapp.pattern.data.ValueUtils;
import java.sql.SQLException;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
@ -68,7 +67,9 @@ public class MaterialToQmsPlugin implements IBackgroundWorkPlugin {
for (Map<String, String> map : pkList) {
String pkMaterial = map.get("pk_material");
MaterialVO materialVO = (MaterialVO) hyPub.queryByPrimaryKey(MaterialVO.class, pkMaterial);
voList.add(materialVO);
if (materialVO != null) {
voList.add(materialVO);
}
}
if (!voList.isEmpty()) {
buildSyncData(voList);
@ -79,7 +80,7 @@ public class MaterialToQmsPlugin implements IBackgroundWorkPlugin {
return null;
}
private List<Map<String, String>> getPkList() throws BusinessException, SQLException {
private List<Map<String, String>> getPkList() throws BusinessException {
String targetCode = configParams.get("xbOrg");
if (targetCode == null || MMValueCheck.isEmpty(targetCode)) {
throw new BusinessException("δÅäÖÃ×éÖ¯²ÎÊý");