提交 7e87df76 authored 作者: inroi's avatar inroi

微调

上级 8532945f
...@@ -105,7 +105,25 @@ public class CategoryDao { ...@@ -105,7 +105,25 @@ public class CategoryDao {
if (where != null) { if (where != null) {
where = where + " AND " + key + "='" + value + "'"; where = where + " AND " + key + "='" + value + "'";
} else { } else {
where = key + " IN ('" + value + "')"; where = key + " IN (" + value + ")";
}
}
}
if (where != null) {
return ",\"FilterString\":\"" + where + "\"";
}
return "";
}
private String whereByNumbers(Map<String, String> map) {
String where = null;
for (String key : map.keySet()) {
String value = String.valueOf(map.get(key));
if (value != null && value.length() != 0) {
if (where != null) {
where = where + " AND " + key + "='" + value + "'";
} else {
where = key + " IN (" + value + ")";
} }
} }
} }
...@@ -253,6 +271,34 @@ public class CategoryDao { ...@@ -253,6 +271,34 @@ public class CategoryDao {
} }
/** /**
* 根据编码批量查询
*/
public List<List<Object>> selectByNumbers(String sFormId, Map<String, String> key, Map<String, String> where) {
List<List<Object>> list = null;
try {
if (result) {
String content;
if (where != null) {
content = "{\"FormId\":\"" + sFormId + "\"," + Stringkey(key) + whereByNumbers(where) + "}";
} else {
content = "{\"FormId\":\"" + sFormId + "\"," + Stringkey(key) + "}";
}
System.out.println("================content==============" + content + "=================content===================");
list = client.executeBillQuery(content);
} else {
throw new KingdeeConnectException(loginResult);
}
} catch (KingdeeConnectException e) {
throw new KingdeeConnectException(loginResult);
} catch (Exception e) {
e.printStackTrace();
throw new KingdeeConnectException(KingDeeConstant.URL, baseCommonService);
}
return list;
}
/**
* 查询单据体(带日志) * 查询单据体(带日志)
* *
* @return * @return
......
...@@ -70,7 +70,7 @@ public class ImsProduceOrderCloseApi { ...@@ -70,7 +70,7 @@ public class ImsProduceOrderCloseApi {
} }
private List<List<Object>> selectByList(String sFormId, Map<String, String> key, String erpMo) { private List<List<Object>> selectByList(String sFormId, Map<String, String> key, String erpMo) {
return categoryDao.selectByIds(sFormId, key, new HashMap<String, String>(2) {{ return categoryDao.selectByNumbers(sFormId, key, new HashMap<String, String>(2) {{
put("FBillNo", erpMo); put("FBillNo", erpMo);
}}); }});
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论