Commit a971e3ef by 宋祥

1.fixBug:校验方法错误问题修复

parent 8c2df8f1
...@@ -124,7 +124,7 @@ public class HPPZTools { ...@@ -124,7 +124,7 @@ public class HPPZTools {
if(pz004s!=null&&pz004s.size()==0){ if(pz004s!=null&&pz004s.size()==0){
pz004s = null; pz004s = null;
} }
AssertUtils.isNull(pz004s, String.format("存货编码[%s]不存在", inventCode)); AssertUtils.isEmpty(pz004s, String.format("存货编码[%s]不存在", inventCode));
return pz004s.get(0); return pz004s.get(0);
} }
...@@ -213,7 +213,7 @@ public class HPPZTools { ...@@ -213,7 +213,7 @@ public class HPPZTools {
if(pz007s.size()==0){ if(pz007s.size()==0){
pz007s = null; pz007s = null;
} }
AssertUtils.isNull(pz007s, String.format("仓库编码[%s]不存在", whCode)); AssertUtils.isEmpty(pz007s, String.format("仓库编码[%s]不存在", whCode));
return pz007s.get(0); return pz007s.get(0);
} }
...@@ -704,7 +704,7 @@ public class HPPZTools { ...@@ -704,7 +704,7 @@ public class HPPZTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("prdtCode", prdtCode); queryMap.put("prdtCode", prdtCode);
List<HPPZ015> results = DaoBase.getInstance().query("HPPZ015.query", queryMap); List<HPPZ015> results = DaoBase.getInstance().query("HPPZ015.query", queryMap);
AssertUtils.isNull(results, String.format("部件编码[%s]信息不存在", prdtCode)); AssertUtils.isEmpty(results, String.format("部件编码[%s]信息不存在", prdtCode));
return results.get(0); return results.get(0);
} }
} }
...@@ -728,7 +728,7 @@ public class HPPZTools { ...@@ -728,7 +728,7 @@ public class HPPZTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("prdtCode", prdtCode); queryMap.put("prdtCode", prdtCode);
List<HPPZ015A> results = DaoBase.getInstance().query("HPPZ015A.query", queryMap); List<HPPZ015A> results = DaoBase.getInstance().query("HPPZ015A.query", queryMap);
AssertUtils.isNull(results, String.format("部件编码[%s]信息不存在", prdtCode)); AssertUtils.isEmpty(results, String.format("部件编码[%s]信息不存在", prdtCode));
return results.get(0); return results.get(0);
} }
...@@ -743,7 +743,7 @@ public class HPPZTools { ...@@ -743,7 +743,7 @@ public class HPPZTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id", id); queryMap.put("id", id);
List<HPPZ015A> results = DaoBase.getInstance().query("HPPZ015A.queryEntityByParentPrtdCode", queryMap); List<HPPZ015A> results = DaoBase.getInstance().query("HPPZ015A.queryEntityByParentPrtdCode", queryMap);
AssertUtils.isNull(results, String.format("节点ID[%s]信息不存在", id)); AssertUtils.isEmpty(results, String.format("节点ID[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
......
...@@ -183,7 +183,7 @@ public class HPSCTools { ...@@ -183,7 +183,7 @@ public class HPSCTools {
if(results.size()==0){ if(results.size()==0){
results = null; results = null;
} }
AssertUtils.isNull(results, String.format("项目编码[%s]信息不存在", projCode)); AssertUtils.isEmpty(results, String.format("项目编码[%s]信息不存在", projCode));
return results.get(0); return results.get(0);
} }
...@@ -253,7 +253,7 @@ public class HPSCTools { ...@@ -253,7 +253,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("prdtCode", prdtCode); queryMap.put("prdtCode", prdtCode);
List<HPSC002> results = DaoBase.getInstance().query("HPSC002.query", queryMap); List<HPSC002> results = DaoBase.getInstance().query("HPSC002.query", queryMap);
AssertUtils.isNull(results, String.format("部件编码[%s]信息不存在", prdtCode)); AssertUtils.isEmpty(results, String.format("部件编码[%s]信息不存在", prdtCode));
return results.get(0); return results.get(0);
} }
...@@ -268,7 +268,7 @@ public class HPSCTools { ...@@ -268,7 +268,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("projCode", projCode); queryMap.put("projCode", projCode);
List<HPSC002> results = DaoBase.getInstance().query("HPSC002.query", queryMap); List<HPSC002> results = DaoBase.getInstance().query("HPSC002.query", queryMap);
AssertUtils.isNull(results, String.format("项目编码[%s]信息不存在", projCode)); AssertUtils.isEmpty(results, String.format("项目编码[%s]信息不存在", projCode));
return results.get(0); return results.get(0);
} }
...@@ -283,7 +283,7 @@ public class HPSCTools { ...@@ -283,7 +283,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("projCode", projCode); queryMap.put("projCode", projCode);
List<HPSC002> results = DaoBase.getInstance().query("HPSC002.queryTree", queryMap); List<HPSC002> results = DaoBase.getInstance().query("HPSC002.queryTree", queryMap);
AssertUtils.isNull(results, String.format("项目编码[%s]信息不存在", projCode)); AssertUtils.isEmpty(results, String.format("项目编码[%s]信息不存在", projCode));
return results.get(0); return results.get(0);
} }
...@@ -299,7 +299,7 @@ public class HPSCTools { ...@@ -299,7 +299,7 @@ public class HPSCTools {
queryMap.put("projCode", projCode); queryMap.put("projCode", projCode);
queryMap.put("id", id); queryMap.put("id", id);
List<HPSC002> results = DaoBase.getInstance().query("HPSC002.queryTree2", queryMap); List<HPSC002> results = DaoBase.getInstance().query("HPSC002.queryTree2", queryMap);
AssertUtils.isNull(results, String.format("项目编码[%s]信息不存在", projCode)); AssertUtils.isEmpty(results, String.format("项目编码[%s]信息不存在", projCode));
return results.get(0); return results.get(0);
} }
...@@ -316,7 +316,7 @@ public class HPSCTools { ...@@ -316,7 +316,7 @@ public class HPSCTools {
queryMap.put("projCode", projCode); queryMap.put("projCode", projCode);
queryMap.put("id", id); queryMap.put("id", id);
List<HPSC002> results = DaoBase.getInstance().query("HPSC002.queryTree3", queryMap); List<HPSC002> results = DaoBase.getInstance().query("HPSC002.queryTree3", queryMap);
AssertUtils.isNull(results, String.format("项目编码[%s]信息不存在", projCode)); AssertUtils.isEmpty(results, String.format("项目编码[%s]信息不存在", projCode));
return results.get(0); return results.get(0);
} }
...@@ -331,7 +331,7 @@ public class HPSCTools { ...@@ -331,7 +331,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id", id); queryMap.put("id", id);
List<HPSC002> results = DaoBase.getInstance().query("HPSC002.queryEntityByParentPrtdCode", queryMap); List<HPSC002> results = DaoBase.getInstance().query("HPSC002.queryEntityByParentPrtdCode", queryMap);
AssertUtils.isNull(results, String.format("节点ID[%s]信息不存在", id)); AssertUtils.isEmpty(results, String.format("节点ID[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
...@@ -376,7 +376,7 @@ public class HPSCTools { ...@@ -376,7 +376,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id", id); queryMap.put("id", id);
List<HPSC003> results = DaoBase.getInstance().query(HPSC003.QUERY, queryMap); List<HPSC003> results = DaoBase.getInstance().query(HPSC003.QUERY, queryMap);
AssertUtils.isNull(results, String.format("物料ID[%s]信息不存在", id)); AssertUtils.isEmpty(results, String.format("物料ID[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
...@@ -535,7 +535,7 @@ public class HPSCTools { ...@@ -535,7 +535,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo); queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap); List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单号[%s]信息不存在", prodOrderNo)); AssertUtils.isEmpty(results, String.format("生产订单号[%s]信息不存在", prodOrderNo));
return results.get(0); return results.get(0);
} }
...@@ -616,7 +616,7 @@ public class HPSCTools { ...@@ -616,7 +616,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id", id); queryMap.put("id", id);
List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap); List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产任务ID[%s]信息不存在", id)); AssertUtils.isEmpty(results, String.format("生产任务ID[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
...@@ -633,7 +633,7 @@ public class HPSCTools { ...@@ -633,7 +633,7 @@ public class HPSCTools {
queryMap.put("id", id); queryMap.put("id", id);
queryMap.put("childId", childId); queryMap.put("childId", childId);
List<HPSC005B> results = DaoBase.getInstance().query(HPSC005B.QUERY, queryMap); List<HPSC005B> results = DaoBase.getInstance().query(HPSC005B.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产任务ID[%s]信息不存在", id)); AssertUtils.isEmpty(results, String.format("生产任务ID[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
...@@ -689,7 +689,7 @@ public class HPSCTools { ...@@ -689,7 +689,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo); queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap); List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", prodOrderNo)); AssertUtils.isEmpty(results, String.format("生产订单[%s]信息不存在", prodOrderNo));
return results.get(0); return results.get(0);
} }
...@@ -727,7 +727,7 @@ public class HPSCTools { ...@@ -727,7 +727,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo); queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC005C> results = DaoBase.getInstance().query(HPSC005C.QUERY, queryMap); List<HPSC005C> results = DaoBase.getInstance().query(HPSC005C.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", prodOrderNo)); AssertUtils.isEmpty(results, String.format("生产订单[%s]信息不存在", prodOrderNo));
return results.get(0); return results.get(0);
} }
...@@ -736,7 +736,7 @@ public class HPSCTools { ...@@ -736,7 +736,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id", id); queryMap.put("id", id);
List<HPSC006> results = DaoBase.getInstance().query(HPSC006.QUERY2, queryMap); List<HPSC006> results = DaoBase.getInstance().query(HPSC006.QUERY2, queryMap);
AssertUtils.isNull(results, String.format("生产id[%s]信息不存在", id)); AssertUtils.isEmpty(results, String.format("生产id[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
...@@ -986,7 +986,7 @@ public class HPSCTools { ...@@ -986,7 +986,7 @@ public class HPSCTools {
if(results!=null&&results.size()==0){ if(results!=null&&results.size()==0){
results = null; results = null;
} }
AssertUtils.isNull(results, String.format("生产下料ID[%s]信息不存在", id)); AssertUtils.isEmpty(results, String.format("生产下料ID[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
...@@ -1001,7 +1001,7 @@ public class HPSCTools { ...@@ -1001,7 +1001,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("productionOrderNo", productionOrderNo); queryMap.put("productionOrderNo", productionOrderNo);
List<HPSC006> results = DaoBase.getInstance().query(HPSC006.QUERY, queryMap); List<HPSC006> results = DaoBase.getInstance().query(HPSC006.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", productionOrderNo)); AssertUtils.isEmpty(results, String.format("生产订单[%s]信息不存在", productionOrderNo));
return results; return results;
} }
} }
...@@ -1018,7 +1018,7 @@ public class HPSCTools { ...@@ -1018,7 +1018,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id", id); queryMap.put("id", id);
List<HPSC007> results = DaoBase.getInstance().query(HPSC007.QUERY, queryMap); List<HPSC007> results = DaoBase.getInstance().query(HPSC007.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产下料ID[%s]信息不存在", id)); AssertUtils.isEmpty(results, String.format("生产下料ID[%s]信息不存在", id));
return results; return results;
} }
...@@ -1033,7 +1033,7 @@ public class HPSCTools { ...@@ -1033,7 +1033,7 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("hpsc006Id", id); queryMap.put("hpsc006Id", id);
List<HPSC007> results = DaoBase.getInstance().query(HPSC007.QUERY, queryMap); List<HPSC007> results = DaoBase.getInstance().query(HPSC007.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产下料ID[%s]信息不存在", id)); AssertUtils.isEmpty(results, String.format("生产下料ID[%s]信息不存在", id));
return results; return results;
} }
} }
......
...@@ -195,7 +195,7 @@ public class HPXSTools { ...@@ -195,7 +195,7 @@ public class HPXSTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("orgId", orgId); queryMap.put("orgId", orgId);
List<Org> results = DaoBase.getInstance().query(HPSqlConstant.HpXsOrg.QUERY_PARENT, queryMap); List<Org> results = DaoBase.getInstance().query(HPSqlConstant.HpXsOrg.QUERY_PARENT, queryMap);
AssertUtils.isNull(results, String.format("组织[%s]不存在父级信息", orgId)); AssertUtils.isEmpty(results, String.format("组织[%s]不存在父级信息", orgId));
return results; return results;
} }
...@@ -211,7 +211,7 @@ public class HPXSTools { ...@@ -211,7 +211,7 @@ public class HPXSTools {
queryMap.put("orgId", orgId); queryMap.put("orgId", orgId);
queryMap.put("orgType", OrgTypeEnum.FACTORY.getCode()); queryMap.put("orgType", OrgTypeEnum.FACTORY.getCode());
List<Org> results = DaoBase.getInstance().query(HPSqlConstant.HpXsOrg.QUERY_PARENT, queryMap); List<Org> results = DaoBase.getInstance().query(HPSqlConstant.HpXsOrg.QUERY_PARENT, queryMap);
AssertUtils.isNull(results, String.format("组织[%s]不存在厂区信息", orgId)); AssertUtils.isEmpty(results, String.format("组织[%s]不存在厂区信息", orgId));
return results.get(0); return results.get(0);
} }
...@@ -263,7 +263,7 @@ public class HPXSTools { ...@@ -263,7 +263,7 @@ public class HPXSTools {
queryMap.put("orgType", orgType); queryMap.put("orgType", orgType);
List<Map> results = DaoBase.getInstance().query("HPXSOrg.queryGroupComboBox", queryMap); List<Map> results = DaoBase.getInstance().query("HPXSOrg.queryGroupComboBox", queryMap);
AssertUtils.isNull(results, String.format("组织[%s]不存在父级信息", orgId)); AssertUtils.isEmpty(results, String.format("组织[%s]不存在父级信息", orgId));
return results; return results;
} }
......
...@@ -26,7 +26,7 @@ public class HPZLTools { ...@@ -26,7 +26,7 @@ public class HPZLTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id", id); queryMap.put("id", id);
List<HPZL001> results = DaoBase.getInstance().query(HPZL001.QUERY, queryMap); List<HPZL001> results = DaoBase.getInstance().query(HPZL001.QUERY, queryMap);
AssertUtils.isNull(results, String.format("质检单[%s]信息不存在", id)); AssertUtils.isEmpty(results, String.format("质检单[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
...@@ -41,7 +41,7 @@ public class HPZLTools { ...@@ -41,7 +41,7 @@ public class HPZLTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("checkNo", checkNo); queryMap.put("checkNo", checkNo);
List<HPZL001> results = DaoBase.getInstance().query(HPZL001.QUERY, queryMap); List<HPZL001> results = DaoBase.getInstance().query(HPZL001.QUERY, queryMap);
AssertUtils.isNull(results, String.format("质检单号[%s]信息不存在", checkNo)); AssertUtils.isEmpty(results, String.format("质检单号[%s]信息不存在", checkNo));
return results.get(0); return results.get(0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment