Commit 423d333e by yukang

Merge remote-tracking branch 'origin/dev' into dev

parents e014097f aaf75274
...@@ -71,14 +71,4 @@ public class CommonConstant { ...@@ -71,14 +71,4 @@ public class CommonConstant {
// ROOT // ROOT
public static final String ROOT = "root"; public static final String ROOT = "root";
} }
public static class ProjectEnv {
public static final String RUN = "run";
public static final String DEV = "dev";
}
} }
...@@ -473,6 +473,77 @@ public class ServiceHPBI002 extends ServiceBase { ...@@ -473,6 +473,77 @@ public class ServiceHPBI002 extends ServiceBase {
} }
/** /**
* 产品项 8da92383157d4bf680ed08093590d847
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产管理驾驶舱1",operType = "查询",operDesc = "产品项")
public EiInfo queryBJInfo(EiInfo inInfo) {
String paramsStr = inInfo.getString(PARAMS_KEY_STR);
JSONArray jsonArray = (JSONArray) JSONArray.parse(paramsStr);
JSONObject jsonObject = (JSONObject) jsonArray.get(0);
JSONArray idsArr = (JSONArray) jsonObject.get("ids");
String idsStr = idsArr.getString(0);
JSONObject paramsObj = null;
if (jsonObject.get("params") instanceof String) {
paramsObj=JSON.parseObject((String) jsonObject.get("params"));
} else {
paramsObj= (JSONObject) jsonObject.get("params");
}
String factStr = paramsObj.getString("factorycode");
String dateStr = paramsObj.getString("date").replace("-","");
EiInfo eiInfo = new EiInfo();
String serviceId = "S_BE_XP_17";
eiInfo.set(EiConstant.serviceId,serviceId);
Map map = new HashMap();
map.put("uuid","8da92383157d4bf680ed08093590d847");
map.put("offset",0);
map.put("limit",1000);
//获取公司代码
String companycode = "%";
if(!StringUtils.isEmpty(UserSessionUtils.getCompanyCode().trim())){
companycode = UserSessionUtils.getCompanyCode();
}
//数据集入参
Map params =new HashMap();
params.put("companycode",companycode);
params.put("factorycode",factStr);
params.put("date",dateStr);
map.put("params",params);
List list =new ArrayList();
list.add(map);
eiInfo.set("queryInfo",list);
//服务接口调用
EiInfo outInfo = XServiceManager.call(eiInfo);
//调用微服务后的结果
Map result = (Map) outInfo.get("result");
Map result1 = (Map) result.get("8da92383157d4bf680ed08093590d847");
List<Map> list1 = (List) result1.get("data");
JSONArray tempArr = new JSONArray();
String json = "DIVLIST";
List tempContentList = Arrays.asList(json.split(","));
tempArr.add(tempContentList);
JSONObject item = new JSONObject();
list1.forEach(obj -> {
// 处理obj
String DIVLIST = "<div style=\"width: 400px; height: 50px;color:#FFFFFF;font-weight: bold;text-align: left;font-size: 24px;\">"
+obj.get("GROUP_NAME")+"</div><div style=\"width: 400px; height: 50px;color:#FFFFFF;text-align: left;font-size: 20px;\">"
+obj.get("PART_NAME")+"</div>";
List datalist =new ArrayList();
datalist.add(DIVLIST);
tempArr.add(datalist);
});
JSONArray ids = new JSONArray();
ids.add(idsStr);
item.put("ids", ids);
item.put("component", null);
item.put("data", tempArr);
List list2 =new ArrayList();
list2.add(item);
outInfo.set("result",list2);
return outInfo;
}
/**
* 近5日综合产量 df9ae382415b4c8bab00058fe4bd99f7 * 近5日综合产量 df9ae382415b4c8bab00058fe4bd99f7
* *
* @param inInfo * @param inInfo
...@@ -657,16 +728,15 @@ public class ServiceHPBI002 extends ServiceBase { ...@@ -657,16 +728,15 @@ public class ServiceHPBI002 extends ServiceBase {
Map result1 = (Map) result.get("49badd3044f04d3e8b89b1d0b7d3ff0e"); Map result1 = (Map) result.get("49badd3044f04d3e8b89b1d0b7d3ff0e");
List<Map> list1 = (List) result1.get("data"); List<Map> list1 = (List) result1.get("data");
JSONArray tempArr = new JSONArray(); JSONArray tempArr = new JSONArray();
String json = "appEname,date,unitCover"; String json = "ORG_ID,ORG_CNAME";
List tempContentList = Arrays.asList(json.split(",")); List tempContentList = Arrays.asList(json.split(","));
tempArr.add(tempContentList); tempArr.add(tempContentList);
JSONObject item = new JSONObject(); JSONObject item = new JSONObject();
list1.forEach(obj -> { list1.forEach(obj -> {
// 处理obj // 处理obj
List datalist =new ArrayList(); List datalist =new ArrayList();
datalist.add(obj.get("SERIES")); datalist.add(obj.get("ORG_ID"));
datalist.add(obj.get("X")); datalist.add(obj.get("ORG_CNAME"));
datalist.add(obj.get("VALUE"));
tempArr.add(datalist); tempArr.add(datalist);
}); });
JSONArray ids = new JSONArray(); JSONArray ids = new JSONArray();
......
...@@ -786,7 +786,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -786,7 +786,7 @@ public class ServiceHPSC002 extends ServiceBase {
String realPath = hpds002.getRealPath(); String realPath = hpds002.getRealPath();
// 项目环境 // 项目环境
String projectEnv = ProjectInfo.getProjectEnv(); String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.ProjectEnv.RUN)) { if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo eiInfo = new EiInfo(); EiInfo eiInfo = new EiInfo();
eiInfo.set("data",realPath+"-"+0); eiInfo.set("data",realPath+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105"); eiInfo.set(EiConstant.serviceId,"S_EU_0105");
......
...@@ -149,7 +149,7 @@ public class ServiceHPSC002A extends ServiceEPBase { ...@@ -149,7 +149,7 @@ public class ServiceHPSC002A extends ServiceEPBase {
String realPath = list.get(0).getRealPath(); String realPath = list.get(0).getRealPath();
// 项目环境 // 项目环境
String projectEnv = ProjectInfo.getProjectEnv(); String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.ProjectEnv.RUN)) { if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo eiInfo = new EiInfo(); EiInfo eiInfo = new EiInfo();
eiInfo.set("data",realPath+"-"+0); eiInfo.set("data",realPath+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105"); eiInfo.set(EiConstant.serviceId,"S_EU_0105");
......
...@@ -330,7 +330,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -330,7 +330,7 @@ public class ServiceHPSC006 extends ServiceBase {
String realPath = hpds002.getRealPath(); String realPath = hpds002.getRealPath();
// 项目环境 // 项目环境
String projectEnv = ProjectInfo.getProjectEnv(); String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.ProjectEnv.RUN)) { if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo eiInfo = new EiInfo(); EiInfo eiInfo = new EiInfo();
eiInfo.set("data",realPath+"-"+0); eiInfo.set("data",realPath+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105"); eiInfo.set(EiConstant.serviceId,"S_EU_0105");
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc CREATED_TIME desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
......
...@@ -127,8 +127,7 @@ ...@@ -127,8 +127,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
A.COMPANY_CODE asc, A.CREATED_TIME desc
A.CREATED_TIME asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
......
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