Commit 7d1e9cfd by 宋祥

Merge branch 'dev-sx' of http://git.pseer.com/platform/hp-smart into dev

parents 3af5b348 87e91179
......@@ -116,7 +116,7 @@ public class HPPZTools {
if(pz004s!=null&&pz004s.size()==0){
pz004s = null;
}
AssertUtils.isNull(pz004s, String.format("存货编码[%s]不存在", inventCode));
AssertUtils.isEmpty(pz004s, String.format("存货编码[%s]不存在", inventCode));
return pz004s.get(0);
}
......@@ -205,7 +205,7 @@ public class HPPZTools {
if(pz007s.size()==0){
pz007s = null;
}
AssertUtils.isNull(pz007s, String.format("仓库编码[%s]不存在", whCode));
AssertUtils.isEmpty(pz007s, String.format("仓库编码[%s]不存在", whCode));
return pz007s.get(0);
}
......@@ -696,7 +696,7 @@ public class HPPZTools {
Map queryMap = new HashMap();
queryMap.put("prdtCode", prdtCode);
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);
}
}
......@@ -720,7 +720,7 @@ public class HPPZTools {
Map queryMap = new HashMap();
queryMap.put("prdtCode", prdtCode);
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);
}
......@@ -735,7 +735,7 @@ public class HPPZTools {
Map queryMap = new HashMap();
queryMap.put("id", id);
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);
}
......
......@@ -224,7 +224,7 @@ public class ServiceHPSC003 extends ServiceBase {
HPSCTools.HpSc003.updateStatus(id, HPConstant.planStatus.S_1);
// 生成二维码
if (StringUtils.isBlank(dbSc003.getQrcodeDocId())) {
HPSCTools.HpSc003.createQrCode(id);
HPSCTools.HpSc003.createQrCode(dbSc003.getPlanInfoNo());
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("提交成功");
......
......@@ -247,7 +247,7 @@
SET
QRCODE_DOC_ID = #qrcodeDocId#,
<include refid="updateRevise"/>
WHERE ID = #id#
WHERE PLAN_INFO_NO = #planInfoNo#
</update>
</sqlMap>
......@@ -183,7 +183,7 @@ public class HPSCTools {
if(results.size()==0){
results = null;
}
AssertUtils.isNull(results, String.format("项目编码[%s]信息不存在", projCode));
AssertUtils.isEmpty(results, String.format("项目编码[%s]信息不存在", projCode));
return results.get(0);
}
......@@ -253,7 +253,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("prdtCode", prdtCode);
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);
}
......@@ -268,7 +268,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("projCode", projCode);
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);
}
......@@ -283,7 +283,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("projCode", projCode);
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);
}
......@@ -299,7 +299,7 @@ public class HPSCTools {
queryMap.put("projCode", projCode);
queryMap.put("id", id);
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);
}
......@@ -316,7 +316,7 @@ public class HPSCTools {
queryMap.put("projCode", projCode);
queryMap.put("id", id);
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);
}
......@@ -331,7 +331,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("id", id);
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);
}
......@@ -376,7 +376,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("id", id);
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);
}
......@@ -426,17 +426,18 @@ public class HPSCTools {
* 生成二维码
*
* @param id
* @param planInfoNo
*/
public static void createQrCode(Long id) throws Exception {
AssertUtils.isNull(id, "节点ID不能为空");
public static void createQrCode(String planInfoNo) throws Exception {
AssertUtils.isNull(planInfoNo, "计划号不能为空");
// 取配置地址
String url = PlatApplicationContext.getProperty("iplat.planInfo.qrcode.url");
if (StringUtils.isBlank(url)) {
return;
}
Map<String, Object> resultMap = QrCodeUtils.create(String.format(url, id));
Map<String, Object> resultMap = QrCodeUtils.create(String.format(url, planInfoNo));
Map map = new HashMap();
map.put("id", id);
map.put("planInfoNo", planInfoNo);
map.put("qrcodeDocId", resultMap.get("docId"));
DaoUtils.update(HPSqlConstant.HPSC003.UPDATE_QRCODE, map);
}
......@@ -535,7 +536,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo);
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);
}
......@@ -616,7 +617,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("id", id);
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);
}
......@@ -633,7 +634,7 @@ public class HPSCTools {
queryMap.put("id", id);
queryMap.put("childId", childId);
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);
}
......@@ -689,7 +690,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo);
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);
}
......@@ -727,7 +728,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo);
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);
}
......@@ -736,7 +737,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("id", id);
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);
}
......@@ -986,7 +987,7 @@ public class HPSCTools {
if(results!=null&&results.size()==0){
results = null;
}
AssertUtils.isNull(results, String.format("生产下料ID[%s]信息不存在", id));
AssertUtils.isEmpty(results, String.format("生产下料ID[%s]信息不存在", id));
return results.get(0);
}
......@@ -1001,7 +1002,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("productionOrderNo", productionOrderNo);
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;
}
}
......@@ -1018,7 +1019,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("id", id);
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;
}
......@@ -1033,7 +1034,7 @@ public class HPSCTools {
Map queryMap = new HashMap();
queryMap.put("hpsc006Id", id);
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;
}
}
......
......@@ -195,7 +195,7 @@ public class HPXSTools {
Map queryMap = new HashMap();
queryMap.put("orgId", orgId);
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;
}
......@@ -211,7 +211,7 @@ public class HPXSTools {
queryMap.put("orgId", orgId);
queryMap.put("orgType", OrgTypeEnum.FACTORY.getCode());
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);
}
......@@ -263,7 +263,7 @@ public class HPXSTools {
queryMap.put("orgType", orgType);
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;
}
......
......@@ -26,7 +26,7 @@ public class HPZLTools {
Map queryMap = new HashMap();
queryMap.put("id", id);
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);
}
......@@ -41,7 +41,7 @@ public class HPZLTools {
Map queryMap = new HashMap();
queryMap.put("checkNo", checkNo);
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);
}
......
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