|
@@ -54,11 +54,13 @@ public class OnPassageMaterialsService extends CrudService<OnPassageMaterialsMap
|
|
|
//根据提报人 找到对应部门
|
|
|
String reportPersonOfDepartment = reportPersonMap.get(opm.getPlanner());
|
|
|
//如果没有部门 表示空部门 物料编码-部门
|
|
|
- String key = opm.getMaterialCode() + "-" + reportPersonOfDepartment;
|
|
|
+ String key = opm.getMaterialCode() + "-" + (reportPersonOfDepartment==null?"":reportPersonOfDepartment);
|
|
|
+ System.out.println("----------->" + key);
|
|
|
if (onPassageMaterialsMap.containsKey(key)) {
|
|
|
onPassageMaterialsMap.put(key, new BigDecimal(opm.getContractCount()).add(onPassageMaterialsMap.get(key)));
|
|
|
} else {
|
|
|
- onPassageMaterialsMap.put(key, new BigDecimal(opm.getContractCount()));
|
|
|
+ if(!opm.getMaterialCode().isEmpty()&& !opm.getContractCount().isEmpty())
|
|
|
+ onPassageMaterialsMap.put(key, new BigDecimal(opm.getContractCount()));
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -69,9 +71,9 @@ public class OnPassageMaterialsService extends CrudService<OnPassageMaterialsMap
|
|
|
if (materialInformationMap.containsKey(key)) {
|
|
|
materialInformationMap.put(key, new BigDecimal(m.getTotal()).add(materialInformationMap.get(key)));
|
|
|
} else {
|
|
|
- if(!m.getMaterialCode().isEmpty()&&!m.getTotal().isEmpty()){
|
|
|
+ if(!m.getMaterialCode().isEmpty()&&!m.getTotal().isEmpty())
|
|
|
materialInformationMap.put(key, new BigDecimal(m.getTotal()));
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -106,7 +108,4 @@ public class OnPassageMaterialsService extends CrudService<OnPassageMaterialsMap
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|