Commit aaf75274 by wancheng

报屏显示优化

parent 00c46a41
...@@ -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();
......
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