|
@@ -291,11 +291,10 @@ public class DonorMaterialService extends CrudService<DonorMaterialMapper, Donor
|
|
|
//通过项目定义号查询该项目是否存在甲供材信息
|
|
|
if (null != byId && byId.size() > 0) {
|
|
|
//通过项目定义号,物料描述更新项目的erp数量
|
|
|
-
|
|
|
for (ErpCreditMaterial material : list) {
|
|
|
- String eqmMaterialDetails2 = material.getEqmMaterialDetails2();
|
|
|
+ String code = material.getEqmMaterialCode();
|
|
|
//通过设备物料描述,项目定义号,查询物料是否存在,存在更新,不存在插入
|
|
|
- int donor = donorMaterialMapper.findDonor(projectId, eqmMaterialDetails2);
|
|
|
+ int donor = donorMaterialMapper.findDonor(projectId, code);
|
|
|
//更新
|
|
|
BigDecimal bigDecimal = new BigDecimal( material.getMtlNumbers());
|
|
|
BigDecimal bigDecimal1 = bigDecimal.setScale(4, BigDecimal.ROUND_HALF_UP);
|
|
@@ -305,8 +304,6 @@ public class DonorMaterialService extends CrudService<DonorMaterialMapper, Donor
|
|
|
material.preInsert();
|
|
|
donorMaterialMapper.insertErpOne(material,projectId,projectName);
|
|
|
} else {
|
|
|
-
|
|
|
-
|
|
|
donorMaterialMapper.updateErpOne(material, projectId);
|
|
|
}
|
|
|
}
|