|
@@ -341,7 +341,8 @@ public class DonorMaterialService extends CrudService<DonorMaterialMapper, Donor
|
|
|
material.preInsert();
|
|
|
donorMaterialMapper.insertErpOne(material,projectId,projectName);
|
|
|
} else {
|
|
|
- donorMaterialMapper.updateErpOne(material, projectId);
|
|
|
+// donorMaterialMapper.updateErpOne(material, projectId);
|
|
|
+ donorMaterialMapper.updateErpOne(material, projectId, code);
|
|
|
}
|
|
|
}
|
|
|
//查找所有的
|
|
@@ -362,13 +363,16 @@ public class DonorMaterialService extends CrudService<DonorMaterialMapper, Donor
|
|
|
String materialCode1 = corr.getMaterialCode();
|
|
|
String materialType1 = corr.getMaterialType();
|
|
|
String materialDescription = corr.getMaterialDescription();
|
|
|
- if (null == materialType) {
|
|
|
- materialType = "";
|
|
|
- }
|
|
|
- if (null == materialType1) {
|
|
|
- materialType1 = "";
|
|
|
- }
|
|
|
- if (materialCode.equals(materialCode1) && materialType.equals(materialType1) && materialDescribe.equals(materialDescription)) {
|
|
|
+// if (null == materialType) {
|
|
|
+// materialType = "";
|
|
|
+// }
|
|
|
+// if (null == materialType1) {
|
|
|
+// materialType1 = "";
|
|
|
+// }
|
|
|
+// if (materialCode.equals(materialCode1) && materialType.equals(materialType1) && materialDescribe.equals(materialDescription)) {
|
|
|
+// useList.add(don);
|
|
|
+// }
|
|
|
+ if (materialCode.equals(materialCode1) && materialDescribe.equals(materialDescription)) {
|
|
|
useList.add(don);
|
|
|
}
|
|
|
}
|
|
@@ -378,8 +382,8 @@ public class DonorMaterialService extends CrudService<DonorMaterialMapper, Donor
|
|
|
useList) {
|
|
|
BigDecimal bigDecimal = BigDecimal.valueOf(use.getErpNum());
|
|
|
BigDecimal bigDecimal1 = BigDecimal.valueOf(use.getExaminedNum());
|
|
|
- erp.multiply(bigDecimal);
|
|
|
- exa.multiply(bigDecimal1);
|
|
|
+ erp = erp.add(bigDecimal);
|
|
|
+ exa = exa.add(bigDecimal1);
|
|
|
}
|
|
|
//将相加的erp数量与审定数量比对,如果相等,将对应的物料
|
|
|
int i = erp.compareTo(exa);
|