This commit is contained in:
2022-08-24 11:25:20 +08:00
14 changed files with 63 additions and 31 deletions

View File

@@ -30,7 +30,6 @@ public class IvtQueryServiceImpl implements IvtQueryService {
HashMap map = new HashMap();
map.put("flag", "1");
map.put("stor_id", MapUtil.getStr(whereJson,"stor_id"));
map.put("sect_id", MapUtil.getStr(whereJson,"sect_id"));
map.put("material_name", MapUtil.getStr(whereJson,"material_name"));
map.put("material_type_id", MapUtil.getStr(whereJson,"material_type_id"));
map.put("storagevehicle_code", MapUtil.getStr(whereJson,"storagevehicle_code"));
@@ -51,6 +50,21 @@ public class IvtQueryServiceImpl implements IvtQueryService {
String classIds = classstandardService.getAllChildIdStr(class_idStr);
map.put("classIds", classIds);
}
String sect_id = (String) whereJson.get("sect_id");
if(StrUtil.isNotEmpty(sect_id)){
String[] sects = sect_id.substring(1).split(",");
StringBuilder sb = new StringBuilder();
if(sects != null){
for(int i=0;i< sects.length;i++){
sb.append(",'" + sects[i] + "'");
}
}
if(sb.length()>0){
String str = sb.toString();
str = "(" + str.substring(1) + ")";
map.put("sects",str);
}
}
JSONObject json = WQL.getWO("Qivt_query_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ivt.instorage_time desc");
return json;
}
@@ -74,7 +88,6 @@ public class IvtQueryServiceImpl implements IvtQueryService {
HashMap map = new HashMap();
map.put("flag", "1");
map.put("stor_id", MapUtil.getStr(whereJson,"stor_id"));
map.put("sect_id", MapUtil.getStr(whereJson,"sect_id"));
map.put("material_name", MapUtil.getStr(whereJson,"material_name"));
map.put("material_type_id", MapUtil.getStr(whereJson,"material_type_id"));
map.put("storagevehicle_code", MapUtil.getStr(whereJson,"storagevehicle_code"));
@@ -95,6 +108,21 @@ public class IvtQueryServiceImpl implements IvtQueryService {
String classIds = classstandardService.getAllChildIdStr(class_idStr);
map.put("classIds", classIds);
}
String sect_id = (String) whereJson.get("sect_id");
if(StrUtil.isNotEmpty(sect_id)){
String[] sects = sect_id.substring(1).split(",");
StringBuilder sb = new StringBuilder();
if(sects != null){
for(int i=0;i< sects.length;i++){
sb.append(",'" + sects[i] + "'");
}
}
if(sb.length()>0){
String str = sb.toString();
str = "(" + str.substring(1) + ")";
map.put("sects",str);
}
}
JSONArray rows = WQL.getWO("Qivt_query_01").addParamMap(map).process().getResultJSONArray(0);
List<Map<String, Object>> list = new ArrayList<>();
for (int i = 0; i < rows.size(); i++) {

View File

@@ -27,6 +27,7 @@
输入.bucketunique TYPEAS s_string
输入.material_model TYPEAS s_string
输入.classIds TYPEAS f_string
输入.sects TYPEAS f_string
[临时表]
@@ -108,8 +109,8 @@
OPTION 输入.stor_id <> ""
struct.stor_id = 输入.stor_id
ENDOPTION
OPTION 输入.sect_id <> ""
struct.sect_id = 输入.sect_id
OPTION 输入.sects <> ""
struct.sect_id in 输入.sects
ENDOPTION
OPTION 输入.material_name <> ""
( me.material_name like "%" 输入.material_name "%" or me.material_code like "%" 输入.material_name "%" )