|
|
@@ -186,21 +186,27 @@ public class StorageDeviceInputController {
|
|
186
|
186
|
//入库数量
|
|
187
|
187
|
List<Map<String, Object>> queryCountByType = deviceInputService.queryCountByType();
|
|
188
|
188
|
String sumCount = "";
|
|
189
|
|
- for (Map<String, Object> map : queryCountByType) {
|
|
190
|
|
- int useCount = Integer.parseInt(map.get("userCounts").toString());
|
|
191
|
|
- sumCount = sumCount + useCount+",";
|
|
192
|
|
- }
|
|
193
|
|
- sumCount = sumCount.substring(0, sumCount.length()-1);
|
|
|
189
|
+ if(queryCountByType.size()>0 && queryCountByType!=null){
|
|
|
190
|
+ for (Map<String, Object> map : queryCountByType) {
|
|
|
191
|
+ int useCount = Integer.parseInt(map.get("userCounts").toString());
|
|
|
192
|
+ sumCount = sumCount + useCount+",";
|
|
|
193
|
+ }
|
|
|
194
|
+ sumCount = sumCount.substring(0, sumCount.length()-1);
|
|
|
195
|
+ }
|
|
|
196
|
+
|
|
194
|
197
|
returnMap.put("sumCount", sumCount);
|
|
195
|
198
|
|
|
196
|
199
|
//使用数量
|
|
197
|
200
|
List<Map<String, Object>> queryUseCountByType = deviceGetService.queryCountByType();
|
|
198
|
201
|
String useCount = "";
|
|
199
|
|
- for (Map<String, Object> map : queryUseCountByType) {
|
|
200
|
|
- int getCount = Integer.parseInt(map.get("getCounts").toString());
|
|
201
|
|
- useCount = useCount + getCount+",";
|
|
202
|
|
- }
|
|
203
|
|
- useCount = useCount.substring(0, useCount.length()-1);
|
|
|
202
|
+ if(queryUseCountByType.size()>0 && queryUseCountByType!=null){
|
|
|
203
|
+ for (Map<String, Object> map : queryUseCountByType) {
|
|
|
204
|
+ int getCount = Integer.parseInt(map.get("getCounts").toString());
|
|
|
205
|
+ useCount = useCount + getCount+",";
|
|
|
206
|
+ }
|
|
|
207
|
+ useCount = useCount.substring(0, useCount.length()-1);
|
|
|
208
|
+ }
|
|
|
209
|
+
|
|
204
|
210
|
returnMap.put("useCount", useCount);
|
|
205
|
211
|
return returnMap;
|
|
206
|
212
|
}
|