|
|
@@ -188,17 +188,33 @@ public class StorageDeviceInputController {
|
|
188
|
188
|
//入库数量
|
|
189
|
189
|
List<Map<String, Object>> queryCountByType = deviceInputService.queryCountByType();
|
|
190
|
190
|
String sumCount = "";
|
|
|
191
|
+ String useCount = "";
|
|
191
|
192
|
if(queryCountByType.size()>0 && queryCountByType!=null){
|
|
192
|
193
|
for (Map<String, Object> map : queryCountByType) {
|
|
193
|
|
- int useCount = Integer.parseInt(map.get("userCounts").toString());
|
|
194
|
|
- sumCount = sumCount + useCount+",";
|
|
|
194
|
+ /*int useCount = Integer.parseInt(map.get("userCounts").toString());
|
|
|
195
|
+ sumCount = sumCount + useCount+",";*/
|
|
|
196
|
+ //入库时的数量
|
|
|
197
|
+ //String sumCounts = map.get("sumCounts").toString();
|
|
|
198
|
+ //int sumCounts = Integer.valueOf(map.get("sumCounts").toString());
|
|
|
199
|
+ String a = map.get("sumCounts").toString().substring(0, map.get("sumCounts").toString().length()-2);
|
|
|
200
|
+ int sumCounts = Integer.valueOf(a);
|
|
|
201
|
+
|
|
|
202
|
+ //使用数量
|
|
|
203
|
+ int useCounts = sumCounts-Integer.parseInt(map.get("userCounts").toString());
|
|
|
204
|
+
|
|
|
205
|
+ sumCount = sumCount + sumCounts+",";
|
|
|
206
|
+ useCount = useCount + useCounts+",";
|
|
|
207
|
+
|
|
195
|
208
|
}
|
|
196
|
209
|
sumCount = sumCount.substring(0, sumCount.length()-1);
|
|
|
210
|
+ useCount = useCount.substring(0, useCount.length()-1);
|
|
|
211
|
+ System.out.println(sumCount+"****sumCount***");
|
|
|
212
|
+ System.out.println(useCount+"****useCount***");
|
|
197
|
213
|
}
|
|
198
|
214
|
|
|
199
|
215
|
returnMap.put("sumCount", sumCount);
|
|
200
|
216
|
|
|
201
|
|
- //使用数量
|
|
|
217
|
+ /*//使用数量
|
|
202
|
218
|
List<Map<String, Object>> queryUseCountByType = deviceGetService.queryCountByType();
|
|
203
|
219
|
String useCount = "";
|
|
204
|
220
|
if(queryUseCountByType.size()>0 && queryUseCountByType!=null){
|
|
|
@@ -207,7 +223,7 @@ public class StorageDeviceInputController {
|
|
207
|
223
|
useCount = useCount + getCount+",";
|
|
208
|
224
|
}
|
|
209
|
225
|
useCount = useCount.substring(0, useCount.length()-1);
|
|
210
|
|
- }
|
|
|
226
|
+ }*/
|
|
211
|
227
|
|
|
212
|
228
|
returnMap.put("useCount", useCount);
|
|
213
|
229
|
return returnMap;
|