Commit fae7d072 by 江和松

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

parents 3802b547 7bea233c
......@@ -519,6 +519,7 @@ public class ServiceHGBI002 extends ServiceBase {
outInfo.set("result",list2);
return outInfo;
}
/**
* 近7日综合产量 45d33e71262840babc0d60c0a01863d0
*
......@@ -568,16 +569,84 @@ public class ServiceHGBI002 extends ServiceBase {
Map result1 = (Map) result.get("45d33e71262840babc0d60c0a01863d0");
List<Map> list1 = (List) result1.get("data");
JSONArray tempArr = new JSONArray();
String json = "appEname,date,unitCover";
String json = "date,unitCover";
List tempContentList = Arrays.asList(json.split(","));
tempArr.add(tempContentList);
JSONObject item = new JSONObject();
list1.forEach(obj -> {
// 处理obj
List datalist =new ArrayList();
datalist.add(obj.get("SERIES"));
datalist.add(obj.get("X"));
datalist.add(obj.get("VALUE"));
datalist.add(obj.get("RCL"));
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;
}
/**
* 工序日产量 4af343c61a1742a49a9a0bb11111cbd5
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产管理驾驶舱",operType = "查询",operDesc = "工序日产量")
public EiInfo queryXXCLInfo(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 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","4af343c61a1742a49a9a0bb11111cbd5");
map.put("offset",0);
map.put("limit",1000);
//获取公司代码
String companycode = "%";
if(!StringUtils.isEmpty(UserSessionUtils.getUserCompany().getUsercode())){
companycode = UserSessionUtils.getUserCompany().getUsercode();
}
//数据集入参
Map params =new HashMap();
params.put("companycode",companycode);
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("4af343c61a1742a49a9a0bb11111cbd5");
List<Map> list1 = (List) result1.get("data");
JSONArray tempArr = new JSONArray();
String json = "SERIES,RCL";
List tempContentList = Arrays.asList(json.split(","));
tempArr.add(tempContentList);
JSONObject item = new JSONObject();
list1.forEach(obj -> {
// 处理obj
List datalist =new ArrayList();
datalist.add(obj.get("SERIES"));
datalist.add(obj.get("RCL"));
tempArr.add(datalist);
});
JSONArray ids = new JSONArray();
......@@ -615,7 +684,7 @@ public class ServiceHGBI002 extends ServiceBase {
String serviceId = "S_BE_XP_17";
eiInfo.set(EiConstant.serviceId,serviceId);
Map map = new HashMap();
map.put("uuid","4f5cb7ea6eb646d98aa0b1c79bf5c224");
map.put("uuid","4af343c61a1742a49a9a0bb11111cbd5");
map.put("offset",0);
map.put("limit",1000);
//获取公司代码
......@@ -636,7 +705,7 @@ public class ServiceHGBI002 extends ServiceBase {
EiInfo outInfo = XServiceManager.call(eiInfo);
//调用微服务后的结果
Map result = (Map) outInfo.get("result");
Map result1 = (Map) result.get("4f5cb7ea6eb646d98aa0b1c79bf5c224");
Map result1 = (Map) result.get("4af343c61a1742a49a9a0bb11111cbd5");
List<Map> list1 = (List) result1.get("data");
JSONArray tempArr = new JSONArray();
String json = "appEname,date,unitCover";
......@@ -648,7 +717,7 @@ public class ServiceHGBI002 extends ServiceBase {
List datalist =new ArrayList();
datalist.add(obj.get("SERIES"));
datalist.add(obj.get("X"));
datalist.add(obj.get("VALUE"));
datalist.add(obj.get("RCL"));
tempArr.add(datalist);
});
JSONArray ids = new JSONArray();
......@@ -705,7 +774,7 @@ public class ServiceHGBI002 extends ServiceBase {
List datalist =new ArrayList();
datalist.add(obj.get("SERIES"));
datalist.add(obj.get("X"));
datalist.add(obj.get("VALUE"));
datalist.add(obj.get("RCL"));
tempArr.add(datalist);
});
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