MaterialPfxxPlugin-代码同步

This commit is contained in:
mzr 2025-09-30 11:12:27 +08:00
parent 9f42e13d92
commit 0a0e43ed05
1 changed files with 13 additions and 11 deletions

View File

@ -1,18 +1,11 @@
package nc.bs.bd.pfxx.plugin; package nc.bs.bd.pfxx.plugin;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.yonyou.cloud.utils.CollectionUtils;
import nc.bs.dao.BaseDAO; import nc.bs.dao.BaseDAO;
import nc.bs.dao.DAOException; import nc.bs.dao.DAOException;
import nc.bs.framework.common.NCLocator; import nc.bs.framework.common.NCLocator;
import nc.bs.logging.Logger; import nc.bs.logging.Logger;
import nc.bs.pfxx.ISwapContext; import nc.bs.pfxx.ISwapContext;
import nc.itf.bd.material.baseinfo.IMaterialBaseInfoService; import nc.itf.bd.material.baseinfo.IMaterialBaseInfoService;
import nc.jdbc.framework.processor.ColumnListProcessor;
import nc.itf.bd.material.plan.IMaterialPlanQueryService; import nc.itf.bd.material.plan.IMaterialPlanQueryService;
import nc.itf.bd.material.plan.IMaterialPlanService; import nc.itf.bd.material.plan.IMaterialPlanService;
import nc.itf.bd.material.stock.IMaterialStockQueryService; import nc.itf.bd.material.stock.IMaterialStockQueryService;
@ -31,9 +24,12 @@ import nc.vo.pfxx.util.PfxxPluginUtils;
import nc.vo.pub.BusinessException; import nc.vo.pub.BusinessException;
import nc.vo.pub.VOStatus; import nc.vo.pub.VOStatus;
import nc.vo.pub.lang.UFBoolean; import nc.vo.pub.lang.UFBoolean;
import nccloud.commons.lang.StringUtils; import nccloud.commons.lang.StringUtils;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/** /**
* 物料基本信息外部交互平台导入 * 物料基本信息外部交互平台导入
* *
@ -214,8 +210,7 @@ public class MaterialPfxxPlugin extends nc.bs.pfxx.plugin.AbstractPfxxPlugin {
} }
private MaterialVO getUpdateVO(MaterialVO materialVO, String pk) throws BusinessException { private MaterialVO getUpdateVO(MaterialVO materialVO, String pk) throws BusinessException {
MaterialVO oldVO = (MaterialVO) this.getBaseDAO().retrieveByPK(MaterialVO.class, pk, MaterialVO oldVO = (MaterialVO) this.getBaseDAO().retrieveByPK(MaterialVO.class, pk);
new String[] { MaterialVO.CREATOR, MaterialVO.CREATIONTIME, MaterialVO.PK_SOURCE, MaterialVO.VERSION, MaterialVO.LATEST, MaterialVO.ENABLESTATE });
if (oldVO == null) { if (oldVO == null) {
throw new BusinessException(nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("bdpub", "0bdpub0057") throw new BusinessException(nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("bdpub", "0bdpub0057")
/* @res "该数据已被删除" */); /* @res "该数据已被删除" */);
@ -232,7 +227,14 @@ public class MaterialPfxxPlugin extends nc.bs.pfxx.plugin.AbstractPfxxPlugin {
materialVO.setMaterialconvert(this.getMaterialConvertVOs(materialVO)); materialVO.setMaterialconvert(this.getMaterialConvertVOs(materialVO));
materialVO.setMaterialtaxtype(this.getMaterialTaxTypeVOs(materialVO)); materialVO.setMaterialtaxtype(this.getMaterialTaxTypeVOs(materialVO));
materialVO.setIsfeature(UFBoolean.FALSE); materialVO.setIsfeature(UFBoolean.FALSE);
// 泰开专项修改时不清空自定义项的值
for (int i = 1; i <= 50; i++) {
String defKey = "def" + i;
//如果没传自定义项拿原来的自定义项的值
if (materialVO.getAttributeValue(defKey) == null) {
materialVO.setAttributeValue(defKey,oldVO.getAttributeValue(defKey));;
}
}
return materialVO; return materialVO;
} }