Commit c303ac6d authored by 张帅's avatar 张帅

kgd添加接口服务更新

parent 3b09a3e3
......@@ -49,6 +49,13 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-component-security</artifactId>
<version>${amos.version}</version>
</dependency>
<!-- j2cache 二级缓存 -->
<dependency>
<groupId>net.oschina.j2cache</groupId>
......
......@@ -42,6 +42,8 @@ public class ClientHandler<path> implements Runnable {
@Override
public void run() {
try {
// 获取输入流和输出流
InputStream ips = socket.getInputStream();
// ips中,不是单纯的文件流,还有一些其他字段,所以要将单纯文件的部分过滤出来
......@@ -64,18 +66,26 @@ public class ClientHandler<path> implements Runnable {
private String upload2Maas(InputStream inputStream, String hostAndPort, String filename) throws IOException {
Properties properties = new Properties();
FileInputStream input = new FileInputStream("amos-boot-system-kgd\\src\\main\\resources\\application-dev.properties");
properties.load(input);
String keyValue = properties.getProperty("keyValue");
System.out.println(keyValue);
AmosRequestContext robotAuthentication = SpringContextHelper.getBean(AmosRequestContext.class);
if (Objects.nonNull(robotAuthentication)) {
// String token = robotAuthentication.getToken();
// String product = robotAuthentication.getProduct();
// String appKey = robotAuthentication.getAppKey();
String token = robotAuthentication.getToken();
String product = robotAuthentication.getProduct();
String appKey = robotAuthentication.getAppKey();
String token = "1121d8d2-915f-453e-8e20-1558566cefbb"; // 如果token、失效,就去浏览器复制最新的token、
/* String token = "ae8d0003-128c-424f-9730-dc9923c395b1"; // 如果token、失效,就去浏览器复制最新的token、
String product = "AMOS_STUDIO_WEB";
String appKey = "AMOS_STUDIO";
String appKey = "AMOS_STUDIO";*/
//1, 上传到maas
String uploadUrl = "http://" + hostAndPort + "/maas/dsm/excel/upload";
String uploadUrl = "http://" + hostAndPort + "/maas/maas/desktop/excel/upload";
MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
Resource resource = new InputStreamResource(inputStream) {
@Override
......@@ -95,7 +105,8 @@ public class ClientHandler<path> implements Runnable {
ResponseEntity<String> responseEntity = restTemplate.exchange(uploadUrl, HttpMethod.POST, requestEntity, String.class);
String body = responseEntity.getBody();
JSONObject jsonObject = JSONObject.parseObject(body);
String result = jsonObject.getString("result");
// String result = jsonObject.getString("result");
String result = jsonObject.getJSONObject("result").getString("key");
String path = jsonObject.getString("path");
if (jsonObject.getString("status").equals("200")) {
log.info("路径:" + path + "/" + result);
......@@ -108,7 +119,7 @@ public class ClientHandler<path> implements Runnable {
Map<String, String> params2 = new HashMap<>();
params2.put("connType", "excel");
params2.put("detail", "{\"location\":{\"type\":\"excel\",\"path\":\"" + result + "\"}}");
params2.put("subjectid", "534de50c-bb8c-4450-87a0-557aac745a94");
params2.put("subjectid", keyValue);
HttpEntity<Map<String, String>> requestEntity2 = new HttpEntity<>(params2, getHeader(token, product, appKey, hostAndPort, false));
ResponseEntity<String> response2 = restTemplate.exchange(connsUrl, HttpMethod.POST, requestEntity2, String.class);
String body2 = response2.getBody();
......@@ -142,7 +153,7 @@ public class ClientHandler<path> implements Runnable {
String tablesUrl = "http://" + hostAndPort + "/maas/maas/desktop/tables";
Map<String, String> params3 = new HashMap<>();
params3.put("name", filename);
params3.put("pid", "534de50c-bb8c-4450-87a0-557aac745a94");
params3.put("pid", keyValue);
params3.put("connId", connId);
// params3.add("config", sheetArray.get(0).toString());
params3.put("config", "{\"columnNameLineNumber\":1,\"skipEmptyLines\":true,\"skipEmptyColumns\":false,\"columnFormatter\":{\"zztest\":{\"name\":\"zztest\",\"alias\":\"zztest\",\"type\":\"VARCHAR\"},\"zz\":{\"name\":\"zz\",\"alias\":\"zz\",\"type\":\"VARCHAR\"}},\"sheet\":\"Sheet1\"}");
......@@ -153,32 +164,31 @@ public class ClientHandler<path> implements Runnable {
String result2 = jsonObject3.getString("result");
String path2 = jsonObject3.getString("path");
// //datasource(name:excel+时间戳)
// // 获取当前时间的时间戳
// long timestamp = System.currentTimeMillis();
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// String timestampStr = sdf.format(new Date(timestamp));
// String datasourceUrl = "http://" + hostAndPort + "/maas/dsm/datasources";
// JSONObject all = new JSONObject();
// JSONObject oneJson = new JSONObject();
// all.put("filepath",result);
// for (int i = 0; i < sheetArray.size(); i++) {
// oneJson.put(sheets[i],sheetArray.get(i));
// }
// all.put("config",oneJson);
// Map<String, String> datasourceParams = new HashMap<>();
// datasourceParams.put("detail", all.toString());
// datasourceParams.put("groupid", "72684d79-5d28-4086-9f21-5b091b6675db");
// datasourceParams.put("subtype", "excel");
// datasourceParams.put("name", "excel"+timestampStr);
// datasourceParams.put("type", "File");
// HttpEntity<Map<String, String>> datasourceRequestEntity = new HttpEntity<>(datasourceParams, getHeader(token,product,appKey,hostAndPort,false));
// ResponseEntity<String> datasourceResponseEntity = restTemplate.exchange(datasourceUrl, HttpMethod.POST, datasourceRequestEntity, String.class);
// String datasourceResponseEntityBody = datasourceResponseEntity.getBody();
// log.info("datasourceResponseEntityBody:" + datasourceResponseEntityBody);
// return path + "/" + result;
//datasource(name:excel+时间戳)
// 获取当前时间的时间戳
long timestamp = System.currentTimeMillis();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String timestampStr = sdf.format(new Date(timestamp));
String datasourceUrl = "http://" + hostAndPort + "/maas/dsm/datasources";
JSONObject all = new JSONObject();
JSONObject oneJson = new JSONObject();
all.put("filepath",result);
for (int i = 0; i < sheetArray.size(); i++) {
oneJson.put(sheets[i],sheetArray.get(i));
}
all.put("config",oneJson);
Map<String, String> datasourceParams = new HashMap<>();
datasourceParams.put("detail", all.toString());
datasourceParams.put("groupid", "72684d79-5d28-4086-9f21-5b091b6675db");
datasourceParams.put("subtype", "excel");
datasourceParams.put("name", "excel"+timestampStr);
datasourceParams.put("type", "File");
HttpEntity<Map<String, String>> datasourceRequestEntity = new HttpEntity<>(datasourceParams, getHeader(token,product,appKey,hostAndPort,false));
ResponseEntity<String> datasourceResponseEntity = restTemplate.exchange(datasourceUrl, HttpMethod.POST, datasourceRequestEntity, String.class);
String datasourceResponseEntityBody = datasourceResponseEntity.getBody();
log.info("datasourceResponseEntityBody:" + datasourceResponseEntityBody);
return path + "/" + result;
}
return null;
}
......
package com.yeejoin.amos.kgd.config;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class ConfigName {
private Properties properties = new Properties();
public ConfigName(String path) {
try {
InputStream inputStream = new FileInputStream(path);
}catch (IOException e){
e.printStackTrace();
}
}
public String getProperty(String key) {
return properties.getProperty(key);
}
public static void main(String[] args) {
String path = "D:\\KGD_7.31\\amos-boot-biz\\amos-boot-system-kgd\\src\\main\\resources\\application-dev.properties";
ConfigName configName = new ConfigName(path);
String data = configName.getProperty("kgd.data.keyValue");
System.out.println(data);
}
}
package com.yeejoin.amos.kgd.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.kgd.model.AnalysisResult;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author Lizhou
* @description 针对表【analysis_result】的数据库操作Mapper
* @createDate 2024-07-31 17:07:12
* @Entity com.atguigu.pojo.AnalysisResult
*/
public interface AnalysisResultMapper extends BaseMapper<AnalysisResult> {
Integer queryHighFrequencyNumber(@Param("deviceId") String deviceId);
List<AnalysisResult> queryHighFrequencyData(@Param("deviceId") String deviceId,
@Param("highFrequencyNumber") Integer highFrequencyNumber);
List<AnalysisResult> queryHighFrequencyAnalysisData(@Param("deviceId") String deviceId,
@Param("highFrequencyNumber") Integer highFrequencyNumber);
List<String> queryVarName(@Param("deviceId") String deviceId);
AnalysisResult queryAnalysisData(@Param("deviceId") String deviceId,
@Param("varName") String varName);
AnalysisResult queryAnalysisResultRate(@Param("deviceId") String deviceId,
@Param("varName") String varName);
List<AnalysisResult> querySwitchDataByDeviceId(@Param("deviceId") String deviceId,
@Param("switchNumber") Integer switchNumber);
Integer querySwitchTypeNumber(@Param("deviceId") String deviceId);
List<AnalysisResult> queryPredictionResult(@Param("deviceId") String deviceId,
@Param("varName") String varName,
@Param("predictiveNumber") Integer predictiveNumber);
Integer queryTemperatureTypeNumber(@Param("deviceId") String deviceId,
@Param("varName") String varName);
List<AnalysisResult> queryTemperature(@Param("deviceId") String deviceId,
@Param("temperatureNumber") Integer temperatureNumber);
}
package com.yeejoin.amos.kgd.model;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
/**
* @TableName analysis_result
*/
@TableName(value ="analysis_result")
@Data
public class AnalysisResult implements Serializable {
private Integer id;
private String samplingtime;
private String deviceId;
private String varType;
private String varName;
private String data;
private String analysisData;
private String analysisResult;
private String analysisResultRate;
private String predictResult;
private String groupName;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.yeejoin.amos.kgd.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.kgd.model.AnalysisResult;
/**
* @author Lizhou
* @description 针对表【analysis_result】的数据库操作Service
* @createDate 2024-07-31 17:07:12
*/
public interface AnalysisResultService extends IService<AnalysisResult> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.kgd.mapper.AnalysisResultMapper">
<resultMap id="BaseResultMap" type="com.yeejoin.amos.kgd.mapper.AnalysisResultMapper">
<id property="id" column="ID" jdbcType="INTEGER"/>
<result property="samplingtime" column="SamplingTime" jdbcType="VARCHAR"/>
<result property="deviceId" column="DEVICE_ID" jdbcType="VARCHAR"/>
<result property="varType" column="VAR_TYPE" jdbcType="VARCHAR"/>
<result property="varName" column="VAR_NAME" jdbcType="VARCHAR"/>
<result property="data" column="DATA" jdbcType="VARCHAR"/>
<result property="analysisData" column="ANALYSIS_DATA" jdbcType="VARCHAR"/>
<result property="analysisResult" column="ANALYSIS_RESULT" jdbcType="VARCHAR"/>
<result property="analysisResultRate" column="ANALYSIS_RESULT_RATE" jdbcType="VARCHAR"/>
<result property="predictResult" column="PREDICT_RESULT" jdbcType="VARCHAR"/>
<result property="groupName" column="GROUP_NAME" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
ID,SamplingTime,DEVICE_ID,
VAR_TYPE,VAR_NAME,DATA,
ANALYSIS_DATA,ANALYSIS_RESULT,ANALYSIS_RESULT_RATE,
PREDICT_RESULT,GROUP_NAME
</sql>
<select id="queryHighFrequencyNumber" resultType="java.lang.Integer">
select COUNT(DISTINCT VAR_NAME)
from analysis_result
where DEVICE_ID=#{deviceId} and VAR_TYPE='高频'
</select>
<select id="queryHighFrequencyData" resultType="com.yeejoin.amos.kgd.model.AnalysisResult">
select *
from analysis_result
where DEVICE_ID=#{deviceId} and VAR_TYPE='高频'
order by SamplingTime desc
limit #{highFrequencyNumber}
</select>
<select id="queryHighFrequencyAnalysisData" resultType="com.yeejoin.amos.kgd.model.AnalysisResult">
select *
from analysis_result
where DEVICE_ID=#{deviceId} and VAR_TYPE='高频'
order by SamplingTime desc
limit #{highFrequencyNumber}
</select>
<select id="queryAnalysisResultRate" resultType="com.yeejoin.amos.kgd.model.AnalysisResult">
select *
from analysis_result
where DEVICE_ID=#{deviceId} and VAR_TYPE='高频' and VAR_NAME=#{varName}
order by SamplingTime desc
limit 1
</select>
<select id="querySwitchDataByDeviceId" resultType="com.yeejoin.amos.kgd.model.AnalysisResult" >
select *
from analysis_result
where DEVICE_ID=#{deviceId} and VAR_TYPE='开关量'
order by SamplingTime desc
limit #{switchNumber};
</select>
<select id="querySwitchTypeNumber" resultType="java.lang.Integer">
select COUNT(DISTINCT VAR_NAME)
from analysis_result
where DEVICE_ID=#{deviceId} and VAR_TYPE='开关量'
</select>
<select id="queryVarName" resultType="java.lang.String">
select VAR_NAME from analysis_result where DEVICE_ID=#{deviceId} and VAR_TYPE='高频' group by VAR_NAME order by VAR_NAME;
</select>
<select id="queryPredictionResult" resultType="com.yeejoin.amos.kgd.model.AnalysisResult">
select *
from analysis_result
where DEVICE_ID=#{deviceId} and VAR_TYPE='高频' and VAR_NAME=#{varName}
order by SamplingTime desc
limit #{predictiveNumber}
</select>
<select id="queryAnalysisData" resultType="com.yeejoin.amos.kgd.model.AnalysisResult">
select *
from analysis_result
where DEVICE_ID=#{deviceId} and VAR_TYPE='高频' and VAR_NAME=#{varName}
order by SamplingTime desc
limit 1
</select>
<select id="queryTemperatureTypeNumber" resultType="java.lang.Integer">
select COUNT(DISTINCT VAR_NAME)
from analysis_result
where DEVICE_ID=#{deviceId} and VAR_TYPE='低频'
</select>
<select id="queryTemperature" resultType="com.yeejoin.amos.kgd.model.AnalysisResult">
select *
from analysis_result
where DEVICE_ID=#{deviceId} and VAR_TYPE='低频'
order by SamplingTime desc
limit #{temperatureNumber}
</select>
</mapper>
......@@ -20,7 +20,7 @@
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>visual-feign-morphic</artifactId>
<version>1.6.3-SNAPSHOT</version>
<version>1.8.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.typroject</groupId>
......
......@@ -78,6 +78,12 @@
<artifactId>xmlworker</artifactId>
<version>5.5.9</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
......@@ -146,7 +146,7 @@ public class RemoteSecurityService {
List<AgencyUserModel> agencyUserModel=null;
FeignClientResult feignClientResult;
try {
feignClientResult = Privilege.agencyUserClient.queryByRoleId(RoleIds,null);
feignClientResult = Privilege.agencyUserClient.queryByRoleId(RoleIds,null,null);
agencyUserModel = (List<AgencyUserModel>)feignClientResult.getResult();
} catch (InnerInvokException e) {
......
......@@ -44,7 +44,8 @@
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.doc</artifactId>
<version>5.1.9</version>
<!-- <version>5.1.9</version>-->
<version>5.4.10</version>
</dependency>
<dependency>
<groupId>com.amosframework.boot</groupId>
......
package com.yeejoin.amos.kgd.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.kgd.service.AnalysisResultService;
import com.yeejoin.amos.kgd.service.impl.AnalysisResultServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
@RestController
@Api(tags = "数据Api")
@RequestMapping(value = "/data/select")
public class AnalysisResultController {
@Autowired
AnalysisResultServiceImpl analysisResultService;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "根据设备ID查询数据,幅值与时间")
@RequestMapping(value = "/select", method = RequestMethod.GET)
@ResponseBody
public ResponseModel selectByDeviceId(@RequestParam String deviceId){
JSONObject jsonData = analysisResultService.getDataByDeviceId(deviceId);
return ResponseHelper.buildResponse(jsonData);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "根据设备ID查询,幅值与频率")
@RequestMapping(value = "/analysisAllData", method = RequestMethod.GET)
@ResponseBody
public ResponseModel selectAnalysisDataByDeviceId(@RequestParam String deviceId){
JSONObject jsonData = analysisResultService.getAnalysisDataByDeviceId(deviceId);
return ResponseHelper.buildResponse(jsonData);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "根据设备id、高频,查var_name的所有类别,下拉栏的")
@RequestMapping(value = "/varName", method = RequestMethod.GET)
@ResponseBody
public ResponseModel selectVarNameByDeviceId(@RequestParam String deviceId){
JSONArray jsonArray = analysisResultService.getVarNameByDeviceId(deviceId);
return ResponseHelper.buildResponse(jsonArray);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "根据设备ID和低频,查温度,data")
@RequestMapping(value = "/temperature", method = RequestMethod.GET)
@ResponseBody
public ResponseModel selectTemperatureByDeviceId(String deviceId){
JSONObject jsonData = analysisResultService.getTemperatureByDeviceId(deviceId);
return ResponseHelper.buildResponse(jsonData);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "根据设备ID和varName查幅值与时间,data")
@RequestMapping(value = "/analysisData", method = RequestMethod.GET)
@ResponseBody
public ResponseModel selectAnalysisDataByDeviceIdAndStatus(@RequestParam String deviceId, @RequestParam String varName){
JSONObject jsonData = analysisResultService.getAnalysisDataByDeviceIdAndVarName(deviceId, varName);
return ResponseHelper.buildResponse(jsonData);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "根据设备ID和状态查故障率")
@RequestMapping(value = "/faultRate", method = RequestMethod.GET)
@ResponseBody
public ResponseModel selectFaultRateByDeviceIdAndStatus(@RequestParam String deviceId, @RequestParam String varName){
JSONObject jsonData = analysisResultService.getFaultRateByDeviceIdAndStatus(deviceId, varName);
return ResponseHelper.buildResponse(jsonData);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "根据设备ID和状态查故障类型占比")
@RequestMapping(value = "/faultTypeProportion", method = RequestMethod.GET)
@ResponseBody
public ResponseModel selectFaultTypeProportionByDeviceIdAndStatus(@RequestParam String deviceId, @RequestParam String varName){
JSONArray jsonArray = analysisResultService.getFaultTypeProportionByDeviceIdAndStatus(deviceId, varName);
return ResponseHelper.buildResponse(jsonArray);
}
@Value("${kgd.data.switchNumber}")
private int switchNumber;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "根据设备ID查询开关量信息")
@RequestMapping(value = "/switchData", method = RequestMethod.GET)
@ResponseBody
public ResponseModel selectSwitchDataByDeviceId(@RequestParam String deviceId){
System.out.println(switchNumber);
JSONObject jsonData = analysisResultService.getSwitchDataByDeviceId(deviceId, switchNumber);
return ResponseHelper.buildResponse(jsonData);
}
@Value("${kgd.data.predictiveNumber}")
private int predictiveNumber;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "根据设备ID和varName查询最近n条预测结果")
@RequestMapping(value = "/predictiveTrend", method = RequestMethod.GET)
@ResponseBody
public ResponseModel selectPredictionResultByDeviceId(@RequestParam String deviceId,
@RequestParam String vaName){
JSONObject jsonData = analysisResultService.getPredictionResultByDeviceId(deviceId, vaName, predictiveNumber);
return ResponseHelper.buildResponse(jsonData);
}
}
......@@ -48,7 +48,7 @@ public class RuleDangerService {
latentDangerRo.setTerminal(RuleConstant.APP);
List<RoleModel> result = Privilege.roleClient.queryRoleList(roleName, null).getResult();
if (result.size() > 0) {
List<AgencyUserModel> userModels = Privilege.agencyUserClient.queryByRoleId(String.valueOf(result.get(0).getSequenceNbr()), null).getResult();
List<AgencyUserModel> userModels = Privilege.agencyUserClient.queryByRoleId(String.valueOf(result.get(0).getSequenceNbr()), null, null).getResult();
//只发送给本部门的人员
Long pointId = latentDanger.getBizInfo().getLong("pointId");
......
......@@ -171,7 +171,7 @@ public class AsyncTask {
try {
List<RoleModel> result = Privilege.roleClient.queryRoleList(roleName, null).getResult();
if (result.size() > 0) {
List<AgencyUserModel> userModels = Privilege.agencyUserClient.queryByRoleId(String.valueOf(result.get(0).getSequenceNbr()), null).getResult();
List<AgencyUserModel> userModels = Privilege.agencyUserClient.queryByRoleId(String.valueOf(result.get(0).getSequenceNbr()), null, null).getResult();
List<String> userIds = userModels.stream().map(AgencyUserModel::getUserId).collect(Collectors.toList());
model.setRecivers(userIds);
}
......
......@@ -220,7 +220,7 @@ public class RemoteSecurityService {
List<AgencyUserModel> agencyUserModel = null;
FeignClientResult feignClientResult;
try {
feignClientResult = Privilege.agencyUserClient.queryByRoleId(RoleIds, null);
feignClientResult = Privilege.agencyUserClient.queryByRoleId(RoleIds, null, null);
agencyUserModel = (List<AgencyUserModel>) feignClientResult.getResult();
} catch (InnerInvokException e) {
......
......@@ -221,7 +221,7 @@ public class RemoteSecurityService {
List<AgencyUserModel> agencyUserModel = null;
FeignClientResult feignClientResult;
try {
feignClientResult = Privilege.agencyUserClient.queryByRoleId(RoleIds, null);
feignClientResult = Privilege.agencyUserClient.queryByRoleId(RoleIds, null, null);
agencyUserModel = (List<AgencyUserModel>) feignClientResult.getResult();
} catch (InnerInvokException e) {
......
......@@ -223,7 +223,7 @@ public class RemoteSecurityService {
List<AgencyUserModel> agencyUserModel = null;
FeignClientResult feignClientResult;
try {
feignClientResult = Privilege.agencyUserClient.queryByRoleId(RoleIds, null);
feignClientResult = Privilege.agencyUserClient.queryByRoleId(RoleIds, null, null);
agencyUserModel = (List<AgencyUserModel>) feignClientResult.getResult();
} catch (InnerInvokException e) {
......
......@@ -122,7 +122,7 @@ public class RulePlanService {
Privilege.roleClient.queryRoleList(supervisionPersonChargerRole, null).getResult();
if (!ValidationUtil.isEmpty(roleList)) {
List<AgencyUserModel> agencyUserModelList = Privilege.agencyUserClient.queryByRoleId(
String.valueOf(roleList.get(0).getSequenceNbr()), null).getResult();
String.valueOf(roleList.get(0).getSequenceNbr()), null, null).getResult();
if (!ValidationUtil.isEmpty(agencyUserModelList)) {
List<String> finalUserIds = userIds;
agencyUserModelList.forEach(userModel -> {
......
......@@ -226,7 +226,7 @@ public class RemoteSecurityService {
List<AgencyUserModel> agencyUserModel = null;
FeignClientResult feignClientResult;
try {
feignClientResult = Privilege.agencyUserClient.queryByRoleId(RoleIds, null);
feignClientResult = Privilege.agencyUserClient.queryByRoleId(RoleIds, null, null);
agencyUserModel = (List<AgencyUserModel>) feignClientResult.getResult();
} catch (InnerInvokException e) {
......
......@@ -382,7 +382,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Override
public List<DutySeatDto> getSeatInfos() {
// 获取人员信息
FeignClientResult<List<AgencyUserModel>> userListResult = Privilege.agencyUserClient.list(null);
FeignClientResult<List<AgencyUserModel>> userListResult = Privilege.agencyUserClient.list(null, null);
List<AgencyUserModel> userList = userListResult.getResult();
List<DutySeatDto> dutyList = new ArrayList<>();
userList.stream().forEach(u -> {
......
......@@ -34,7 +34,8 @@ import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
@MapperScan({"org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*",
"org.typroject.tyboot.core.auth.face.orm.dao*", "org.typroject.tyboot.component.*.face.orm.dao*",
"com.yeejoin.amos.boot.module.*.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper",
"com.yeejoin.amos.avic.face.orm.dao*"})
"com.yeejoin.amos.avic.face.orm.dao*",
"com.yeejoin.amos.kgd.*"})
@ComponentScan(basePackages = {"org.typroject", "com.yeejoin"})
public class AmoKGDApplication {
private static final Logger logger = LoggerFactory.getLogger(AmoKGDApplication.class);
......@@ -50,5 +51,4 @@ public class AmoKGDApplication {
+ "Application Amos-Biz-Boot is running! Access URLs:\n\t" + "Swagger文档: \thttp://" + ip + ":" + port
+ path + "/doc.html\n" + "----------------------------------------------------------");
}
}
......@@ -12,6 +12,11 @@ spring.redis.port=6379
spring.redis.password=yeejoin@2020
# mybaits-plus
mybatis-plus.mapper-locations=classpath:/mapper/*.xml
spring.cache.type=GENERIC
j2cache.open-spring-cache=true
j2cache.cache-clean-mode=passive
......@@ -67,4 +72,9 @@ knife4j.basic.password=a1234560
management.security.enabled=true
spring.security.user.name=admin
spring.security.user.password=a1234560
\ No newline at end of file
spring.security.user.password=
kgd.data.switchNumber=10
kgd.data.predictiveNumber=10
keyValue=f348f867-0279-45ef-9162-3f1115e6fea8
spring.application.name=AMOS-BIZ-KGD-API
server.servlet.context-path=/kgd
server.port=33002
server.port=33003
server.uri-encoding=UTF-8
spring.profiles.active=dev
spring.jackson.time-zone=GMT+8
......
......@@ -24,8 +24,8 @@
<springboot.version>2.3.11.RELEASE</springboot.version>
<springcloud.version>Hoxton.SR8</springcloud.version>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<tyboot-version>1.1.20</tyboot-version>
<amos.version>1.6.6-SNAPSHOT</amos.version>
<tyboot-version>1.1.24-SNAPSHOT</tyboot-version>
<amos.version>1.8.5</amos.version>
<itext.version>7.1.1</itext.version>
</properties>
......@@ -286,6 +286,7 @@
<name>e-iceblue</name>
<url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<modules>
......
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