|
@@ -107,7 +107,7 @@ public class ExeclReadEquipStaticInfoUtil {
|
|
|
throws Exception {
|
|
|
RepositoryImpl Repository = RepositoryContainer.instance;
|
|
|
JSONObject object = new JSONObject();
|
|
|
- LinkedHashMap<String, JSONArray> map= Maps.newLinkedHashMap();
|
|
|
+ LinkedHashMap<String, JSONArray> map = Maps.newLinkedHashMap();
|
|
|
// 根据ibmsSceneCode和ibmsClassCode查询对应的excel获取台账信息点
|
|
|
if (Constant.info_point_version.equals("old")) {
|
|
|
FileInputStream fis = new FileInputStream(FileUtil.file(ibmsSceneCode + ".xlsx"));
|
|
@@ -132,7 +132,26 @@ public class ExeclReadEquipStaticInfoUtil {
|
|
|
String codeVal = obj.get("code").toString();
|
|
|
if (codeVal.equals(codeInfo)) {
|
|
|
if (queryObj != null) {
|
|
|
- obj.put("data", queryObj.get(codeInfo));
|
|
|
+ StringBuilder data = new StringBuilder();
|
|
|
+ JSONArray dataSource = obj.getJSONArray("dataSource");
|
|
|
+ if (dataSource != null) {
|
|
|
+ JSONArray dataArr = (JSONArray) queryObj.get(codeInfo);
|
|
|
+ if (dataArr != null) {
|
|
|
+ for (Object o : dataArr) {
|
|
|
+ for (int x = 0; x < dataSource.size(); x++) {
|
|
|
+ JSONObject dataObj = (JSONObject) dataSource.get(x);
|
|
|
+ String code = dataObj.get("code").toString();
|
|
|
+ if (o.equals(code)) {
|
|
|
+ String codeName = dataObj.get("name").toString();
|
|
|
+ data.append(codeName);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ obj.put("data", data);
|
|
|
+ } else {
|
|
|
+ obj.put("data", queryObj.get(codeInfo));
|
|
|
+ }
|
|
|
}
|
|
|
obj.put("enable", row.getCell(2).getBooleanCellValue());
|
|
|
dic.add(obj);
|
|
@@ -141,11 +160,10 @@ public class ExeclReadEquipStaticInfoUtil {
|
|
|
}
|
|
|
}
|
|
|
//object.put(caVal, dic);
|
|
|
- map.put(caVal,dic);
|
|
|
+ map.put(caVal, dic);
|
|
|
}
|
|
|
fis.close();
|
|
|
- }
|
|
|
- else if (Constant.info_point_version.equals("new")) {
|
|
|
+ } else if (Constant.info_point_version.equals("new")) {
|
|
|
JSONArray infoArray = Repository.infoArrayJson.get(classCode);
|
|
|
|
|
|
String infoClass = "基本参数";
|
|
@@ -175,7 +193,7 @@ public class ExeclReadEquipStaticInfoUtil {
|
|
|
}
|
|
|
}
|
|
|
//object.put(infoClass, dic);
|
|
|
- map.put(infoClass,dic);
|
|
|
+ map.put(infoClass, dic);
|
|
|
}
|
|
|
//return object;
|
|
|
return map;
|