物料携带二开属性优化

This commit is contained in:
李贵强 2025-05-22 17:45:57 +08:00
parent 899dee9d1f
commit da4684ccdb
1 changed files with 18 additions and 4 deletions

View File

@ -84,13 +84,13 @@ public class MaterialSaveCarryNumberPlugin extends AbstractBillPlugIn implements
for (int i = 0; i < entryEntity.size(); i++) {
DynamicObject material = entryEntity.get(i).getDynamicObject(materialIdLogotype);//物料-基础资料
String type = entryEntity.get(i).getString("qeug_materialtypeid.name");//物料分类
if (type==null||"".equals(type)){
if ((type==null||"".equals(type))&&"qeug_orderformentry".equals(entryLogotype)){
type=this.getMapBillMaterialTypeName();
}
String model = entryEntity.get(i).getString("qeug_importmodel");//规格型号
String unit = entryEntity.get(i).getString("qeug_importunit");//规格型号
String brand = entryEntity.get(i).getString("qeug_brand");//规格型号
String extModel = entryEntity.get(i).getString("qeug_model");//规格型号
String unit = entryEntity.get(i).getString("qeug_importunit");//单位
String brand = entryEntity.get(i).getString("qeug_brand");//品牌
String extModel = entryEntity.get(i).getString("qeug_model");//型号
Long id;
if (material==null){
String name = entryEntity.get(i).getString(materialNameLogotype);
@ -223,6 +223,8 @@ public class MaterialSaveCarryNumberPlugin extends AbstractBillPlugIn implements
this.carryMaterialAttribute(pkValue,name,"qeug_orderformentry","qeug_material","qeug_materialnames");
}else if ("repe_orderform".equals(name)){
this.carryMaterialAttribute(pkValue,name,"orderformentry","material","qeug_materialnames");
}else if ("recon_settleplanbill".equals(name)){
this.carryMaterialAttribute(pkValue,name,"qeug_cgxqentry","qeug_materialmasterid","qeug_materialname");
}
}
@ -281,6 +283,18 @@ public class MaterialSaveCarryNumberPlugin extends AbstractBillPlugIn implements
if (StringUtils.isNotEmpty(queryExtModel)){
entry.set("qeug_model",queryExtModel); }
}
//物料分类-基础资料
DynamicObject materialTypeId = entry.getDynamicObject("qeug_materialtypeid");
if (materialTypeId==null){
DynamicObject groupStandard = BusinessDataServiceHelper.loadSingle("bd_materialgroupdetail", new QFilter("material.id", QCP.equals, queryMaterial.getPkValue()).toArray());
if (groupStandard != null) {
DynamicObject group = groupStandard.getDynamicObject("group");
if (group != null) {
entry.set("qeug_materialtypeid",group);
}
}
}
}
}
}