Quellcode durchsuchen

云南最新bug修改

lvzhikai vor 5 Jahren
Ursprung
Commit
489a4c03d4

+ 13 - 5
src/main/java/com/chinaitop/depot/basic/controller/BasicWarehouseController.java

@@ -1,10 +1,7 @@
1 1
 package com.chinaitop.depot.basic.controller;
2 2
 
3 3
 import java.text.SimpleDateFormat;
4
-import java.util.Date;
5
-import java.util.HashMap;
6
-import java.util.List;
7
-import java.util.Map;
4
+import java.util.*;
8 5
 
9 6
 import javax.annotation.Resource;
10 7
 import javax.servlet.http.HttpServletRequest;
@@ -88,7 +85,18 @@ public class BasicWarehouseController {
88 85
 				criteria.andWarehouseIdEqualTo(warehouseId);
89 86
 			}
90 87
 			if (null != libraryType) {
91
-				criteria.andLibraryTypeEqualTo(libraryType);
88
+				//处理空仓报警问题
89
+				if(libraryType.length() == 1){
90
+					criteria.andLibraryTypeEqualTo(libraryType);
91
+				}else if(libraryType.length() > 3){
92
+					String[] libraryString = libraryType.substring(2).split(",");
93
+					Integer[] libraryInteger = new Integer[libraryString.length];
94
+					for (int i = 0; i < libraryString.length; i++) {
95
+						libraryInteger[i] = Integer.parseInt(libraryString[i]);
96
+					}
97
+					List<Integer> result = Arrays.asList(libraryInteger);
98
+					criteria.andWarehouseIdNotIn(result);
99
+				}
92 100
 			}
93 101
 
94 102
 			/* 查询当前库下的数据 */

+ 1 - 1
src/main/java/com/chinaitop/depot/basic/service/BasicStorehouseService.java

@@ -80,7 +80,7 @@ public interface BasicStorehouseService {
80 80
 	 * 导入
81 81
 	 * 
82 82
 	 * @param list
83
-	 * @param depotInfo 
83
+	 * @param depotInfo
84 84
 	 * @return
85 85
 	 */
86 86
 	public String importData(List<List<String>> list, JSONObject userInfo);