1. 修改密码新增运控系统配置
parent
14e5c154ec
commit
5431d23a0f
|
@ -34,7 +34,7 @@ public class YunKongGetAppSchedule {
|
||||||
JSONObject params = new JSONObject();
|
JSONObject params = new JSONObject();
|
||||||
params.put("type", "user");
|
params.put("type", "user");
|
||||||
params.put("page", "0");
|
params.put("page", "0");
|
||||||
params.put("limit", "1000");
|
params.put("limit", "20");
|
||||||
|
|
||||||
JSONObject obj = ykUtils.call(YkInf.getAppList,params,JSONObject.class);
|
JSONObject obj = ykUtils.call(YkInf.getAppList,params,JSONObject.class);
|
||||||
List<AppEntity> appList = JSONArray.parseArray(obj.getString("list"),AppEntity.class);
|
List<AppEntity> appList = JSONArray.parseArray(obj.getString("list"),AppEntity.class);
|
||||||
|
|
|
@ -40,13 +40,13 @@ public class YunKongMessageSchedule {
|
||||||
|
|
||||||
private final MessageRepository messageRepository;
|
private final MessageRepository messageRepository;
|
||||||
|
|
||||||
@Scheduled(cron = "${message.schedule:0 0/1 * * * ?}")
|
@Scheduled(cron = "${message.schedule:0 0/2 * * * ?}")
|
||||||
protected void schedule() {
|
protected void schedule() {
|
||||||
if (!enable) return;
|
if (!enable) return;
|
||||||
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("page", 1);
|
params.put("page", 1);
|
||||||
params.put("limit", 1000);
|
params.put("limit", 15);
|
||||||
params.put("approve_status", 1);
|
params.put("approve_status", 1);
|
||||||
params.put("userId", userId);
|
params.put("userId", userId);
|
||||||
params.put("taskStatus", "");
|
params.put("taskStatus", "");
|
||||||
|
@ -72,7 +72,7 @@ public class YunKongMessageSchedule {
|
||||||
JSONObject item = array.getJSONObject(i);
|
JSONObject item = array.getJSONObject(i);
|
||||||
String externalId = item.getString("record_id");
|
String externalId = item.getString("record_id");
|
||||||
if (StringUtils.isEmpty(externalId)) {
|
if (StringUtils.isEmpty(externalId)) {
|
||||||
log.info("【运控接口】当前外部id为null:" + item.toJSONString());
|
// log.info("【运控接口】当前外部id为null:" + item.toJSONString());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Message message = oldMessages.stream()
|
Message message = oldMessages.stream()
|
||||||
|
|
|
@ -50,10 +50,10 @@ public class IndexServiceImpl implements IndexService {
|
||||||
param.put("limit", pager.getRows());
|
param.put("limit", pager.getRows());
|
||||||
String result = ykUtil.call(YkInfo.getTaskList, param, JSONArray.class);
|
String result = ykUtil.call(YkInfo.getTaskList, param, JSONArray.class);
|
||||||
JSONObject jsonObject = JSONArray.parseObject(result, JSONObject.class);
|
JSONObject jsonObject = JSONArray.parseObject(result, JSONObject.class);
|
||||||
return new GeneralResult(true, jsonObject, "查询成功");
|
return new GeneralResult(true, jsonObject, "待办工单列表查询成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("查询失败", e);
|
log.info("待办工单列表查询失败", e);
|
||||||
return new GeneralResult(false, "查询失败");
|
return new GeneralResult(false, "待办工单列表查询失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,10 +81,10 @@ public class IndexServiceImpl implements IndexService {
|
||||||
resultMap.put("waitDoneTotal", jsonObject.getInteger("todoCount"));
|
resultMap.put("waitDoneTotal", jsonObject.getInteger("todoCount"));
|
||||||
resultMap.put("doneTotal", jsonObject.getInteger("doneCount"));
|
resultMap.put("doneTotal", jsonObject.getInteger("doneCount"));
|
||||||
|
|
||||||
return new GeneralResult(true, resultMap, "查询成功");
|
return new GeneralResult(true, resultMap, "工单统计查询成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("查询失败", e);
|
log.info("工单统计查询失败", e);
|
||||||
return new GeneralResult(false, "查询失败");
|
return new GeneralResult(false, "工单统计查询失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,10 +114,10 @@ public class IndexServiceImpl implements IndexService {
|
||||||
List<JSONObject> list = JSONObject.parseObject(data, List.class);
|
List<JSONObject> list = JSONObject.parseObject(data, List.class);
|
||||||
|
|
||||||
|
|
||||||
return new GeneralResult(true, list, "查询成功");
|
return new GeneralResult(true, list, "获取用户数据权限申请数量查询成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("查询失败", e);
|
log.info("获取用户数据权限申请数量查询失败", e);
|
||||||
return new GeneralResult(false, "查询失败");
|
return new GeneralResult(false, "获取用户数据权限申请数量查询失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ public class IndexServiceImpl implements IndexService {
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("type", "user");
|
param.put("type", "user");
|
||||||
param.put("page", 1);
|
param.put("page", 1);
|
||||||
param.put("limit", Integer.MAX_VALUE);
|
param.put("limit", 15);
|
||||||
String result = ykUtil.call(YkInfo.getAllAppList, param, JSONArray.class);
|
String result = ykUtil.call(YkInfo.getAllAppList, param, JSONArray.class);
|
||||||
JSONObject allAppJson = JSONObject.parseObject(result, JSONObject.class);
|
JSONObject allAppJson = JSONObject.parseObject(result, JSONObject.class);
|
||||||
List<JSONObject> allAppList = JSONObject.parseObject(allAppJson.getString("list"), List.class);
|
List<JSONObject> allAppList = JSONObject.parseObject(allAppJson.getString("list"), List.class);
|
||||||
|
@ -158,10 +158,10 @@ public class IndexServiceImpl implements IndexService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.info("allAppList:{}", JSON.toJSONString(allAppList));
|
log.info("allAppList:{}", JSON.toJSONString(allAppList));
|
||||||
return new GeneralResult(true, allAppList, "查询成功");
|
return new GeneralResult(true, allAppList, "首页数据展示模块查询成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("查询失败", e);
|
log.error("首页数据展示模块查询失败", e);
|
||||||
return new GeneralResult(true,new ArrayList<>(),"查询失败");
|
return new GeneralResult(true,new ArrayList<>(),"首页数据展示模块查询失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,13 +173,13 @@ public class IndexServiceImpl implements IndexService {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
if (!"200".equals(jsonObject.getString("code"))) {
|
if (!"200".equals(jsonObject.getString("code"))) {
|
||||||
log.info("result:" + result);
|
log.info("result:" + result);
|
||||||
return new GeneralResult(false, "查询失败");
|
return new GeneralResult(false, "近7日告警趋势查询失败");
|
||||||
}
|
}
|
||||||
JSONObject data = jsonObject.getJSONObject("data");
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
return new GeneralResult(true, data, "查询成功");
|
return new GeneralResult(true, data, "近7日告警趋势查询成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("查询失败", e);
|
log.info("近7日告警趋势查询失败", e);
|
||||||
return new GeneralResult(false, "查询失败");
|
return new GeneralResult(false, "近7日告警趋势查询失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,13 +191,13 @@ public class IndexServiceImpl implements IndexService {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
if (!"200".equals(jsonObject.getString("code"))) {
|
if (!"200".equals(jsonObject.getString("code"))) {
|
||||||
log.info("result:" + result);
|
log.info("result:" + result);
|
||||||
return new GeneralResult(false, "查询失败");
|
return new GeneralResult(false, "单日告警统计查询失败");
|
||||||
}
|
}
|
||||||
JSONObject data = jsonObject.getJSONObject("data");
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
return new GeneralResult(true, data, "查询成功");
|
return new GeneralResult(true, data, "单日告警统计查询成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("查询失败", e);
|
log.info("单日告警统计查询失败", e);
|
||||||
return new GeneralResult(false, "查询失败");
|
return new GeneralResult(false, "单日告警统计查询失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,13 +208,13 @@ public class IndexServiceImpl implements IndexService {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
if (!"200".equals(jsonObject.getString("code"))) {
|
if (!"200".equals(jsonObject.getString("code"))) {
|
||||||
log.info("result:" + result);
|
log.info("result:" + result);
|
||||||
return new GeneralResult(false, "查询失败");
|
return new GeneralResult(false, "单日告警统计查询失败");
|
||||||
}
|
}
|
||||||
List<JSONObject> data = JSONObject.parseObject(jsonObject.getString("data"), List.class);
|
List<JSONObject> data = JSONObject.parseObject(jsonObject.getString("data"), List.class);
|
||||||
return new GeneralResult(true, data, "查询成功");
|
return new GeneralResult(true, data, "单日告警统计查询成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("查询失败", e);
|
log.info("单日告警统计查询失败", e);
|
||||||
return new GeneralResult(false, "查询失败");
|
return new GeneralResult(false, "单日告警统计查询失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,7 @@ public class TrxServiceImpl implements TrxService {
|
||||||
result = JSONObject.parseObject(response.body());
|
result = JSONObject.parseObject(response.body());
|
||||||
log.info("调用天融信用户软key登录接口, 响应信息:" + JSONObject.toJSONString(result));
|
log.info("调用天融信用户软key登录接口, 响应信息:" + JSONObject.toJSONString(result));
|
||||||
if (!"0".equals(result.getString("result"))) {
|
if (!"0".equals(result.getString("result"))) {
|
||||||
return new GeneralResult(false, "用户登录天融信失败" + result.getString("errmsg"));
|
return new GeneralResult(false, "天融信登录返回失败:" + result.getString("errmsg"));
|
||||||
}
|
}
|
||||||
String trxToken = result.getString("token");
|
String trxToken = result.getString("token");
|
||||||
String userId = result.getString("user_id");
|
String userId = result.getString("user_id");
|
||||||
|
|
Loading…
Reference in New Issue