技术监督管理调整,高级算法
This commit is contained in:
@@ -71,13 +71,13 @@ public class BalanceServiceImpl implements BalanceService {
|
|||||||
List<AdvanceBaseDTO> aList = balanceMapper.getFeatureAmplitude(PubUtils.beginTimeToLocalDateTime(advanceBaseParam.getStartTime()), PubUtils.endTimeToLocalDateTime(advanceBaseParam.getEndTime()), generalDeviceDTO.getLineIndexes());
|
List<AdvanceBaseDTO> aList = balanceMapper.getFeatureAmplitude(PubUtils.beginTimeToLocalDateTime(advanceBaseParam.getStartTime()), PubUtils.endTimeToLocalDateTime(advanceBaseParam.getEndTime()), generalDeviceDTO.getLineIndexes());
|
||||||
Map<String, Float> map = aList.stream().collect(Collectors.toMap(AdvanceBaseDTO::getLineId, AdvanceBaseDTO::getValueA));
|
Map<String, Float> map = aList.stream().collect(Collectors.toMap(AdvanceBaseDTO::getLineId, AdvanceBaseDTO::getValueA));
|
||||||
|
|
||||||
List<AdvanceBaseDTO> a90List = balanceMapper.getSarfi(PubUtils.beginTimeToLocalDateTime(advanceBaseParam.getStartTime()), PubUtils.endTimeToLocalDateTime(advanceBaseParam.getEndTime()), generalDeviceDTO.getLineIndexes(), 90f);
|
List<AdvanceBaseDTO> a90List = balanceMapper.getSarfi(PubUtils.beginTimeToLocalDateTime(advanceBaseParam.getStartTime()), PubUtils.endTimeToLocalDateTime(advanceBaseParam.getEndTime()), generalDeviceDTO.getLineIndexes(), 0.9f);
|
||||||
Map<String, Integer> map90 = a90List.stream().collect(Collectors.toMap(AdvanceBaseDTO::getLineId, AdvanceBaseDTO::getValueB));
|
Map<String, Integer> map90 = a90List.stream().collect(Collectors.toMap(AdvanceBaseDTO::getLineId, AdvanceBaseDTO::getValueB));
|
||||||
|
|
||||||
List<AdvanceBaseDTO> a50List = balanceMapper.getSarfi(PubUtils.beginTimeToLocalDateTime(advanceBaseParam.getStartTime()), PubUtils.endTimeToLocalDateTime(advanceBaseParam.getEndTime()), generalDeviceDTO.getLineIndexes(), 50f);
|
List<AdvanceBaseDTO> a50List = balanceMapper.getSarfi(PubUtils.beginTimeToLocalDateTime(advanceBaseParam.getStartTime()), PubUtils.endTimeToLocalDateTime(advanceBaseParam.getEndTime()), generalDeviceDTO.getLineIndexes(), 0.5f);
|
||||||
Map<String, Integer> map50 = a50List.stream().collect(Collectors.toMap(AdvanceBaseDTO::getLineId, AdvanceBaseDTO::getValueB));
|
Map<String, Integer> map50 = a50List.stream().collect(Collectors.toMap(AdvanceBaseDTO::getLineId, AdvanceBaseDTO::getValueB));
|
||||||
|
|
||||||
List<AdvanceBaseDTO> aSeverityList = balanceMapper.getSarfiSeverity(PubUtils.beginTimeToLocalDateTime(advanceBaseParam.getStartTime()), PubUtils.endTimeToLocalDateTime(advanceBaseParam.getEndTime()), generalDeviceDTO.getLineIndexes(), 50f);
|
List<AdvanceBaseDTO> aSeverityList = balanceMapper.getSarfiSeverity(PubUtils.beginTimeToLocalDateTime(advanceBaseParam.getStartTime()), PubUtils.endTimeToLocalDateTime(advanceBaseParam.getEndTime()), generalDeviceDTO.getLineIndexes(), 0.5f);
|
||||||
Map<String, Float> aSeverityListMap = aSeverityList.stream().collect(Collectors.toMap(AdvanceBaseDTO::getLineId, AdvanceBaseDTO::getValueA));
|
Map<String, Float> aSeverityListMap = aSeverityList.stream().collect(Collectors.toMap(AdvanceBaseDTO::getLineId, AdvanceBaseDTO::getValueA));
|
||||||
|
|
||||||
List<BalanceInfo.PointInfo> listTem = new ArrayList<>();
|
List<BalanceInfo.PointInfo> listTem = new ArrayList<>();
|
||||||
|
|||||||
@@ -44,11 +44,16 @@ public class GetBalanceUtils {
|
|||||||
if (newList.size() > 0) {
|
if (newList.size() > 0) {
|
||||||
packageData(newList, qvvrDataStruct);
|
packageData(newList, qvvrDataStruct);
|
||||||
JnaCallDllOrSo jnaCallDll = new JnaCallBalance("qvvr_balance.dll");
|
JnaCallDllOrSo jnaCallDll = new JnaCallBalance("qvvr_balance.dll");
|
||||||
|
System.out.println("路径>>>>>>>"+jnaCallDll.getStrpath());
|
||||||
|
|
||||||
jnaCallDll.setPath();
|
jnaCallDll.setPath();
|
||||||
|
|
||||||
|
System.out.println("路径++++"+jnaCallDll.getStrpath());
|
||||||
// 计算暂降综合评估
|
// 计算暂降综合评估
|
||||||
try {
|
try {
|
||||||
JnaCallBalance.Balancelibrary INSTANTCE = JnaCallBalance.Balancelibrary.INSTANTCE;
|
JnaCallBalance.Balancelibrary INSTANTCE = JnaCallBalance.Balancelibrary.INSTANTCE;
|
||||||
|
|
||||||
|
|
||||||
INSTANTCE.qvvr_fun_cause(qvvrDataStruct);
|
INSTANTCE.qvvr_fun_cause(qvvrDataStruct);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -21,12 +21,16 @@ public class JnaCallBalance extends JnaCallDllOrSo{
|
|||||||
@Override
|
@Override
|
||||||
public void setPath() {
|
public void setPath() {
|
||||||
JnaCallBalance.strpath = super.getStrpath();
|
JnaCallBalance.strpath = super.getStrpath();
|
||||||
|
System.out.println("真实路径-----"+super.getStrpath());
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface Balancelibrary extends Library {
|
public interface Balancelibrary extends Library {
|
||||||
// 加载Lib库
|
// 加载Lib库
|
||||||
|
|
||||||
|
|
||||||
Balancelibrary INSTANTCE = (Balancelibrary) Native.loadLibrary(JnaCallBalance.strpath, Balancelibrary.class);
|
Balancelibrary INSTANTCE = (Balancelibrary) Native.loadLibrary(JnaCallBalance.strpath, Balancelibrary.class);
|
||||||
|
|
||||||
|
|
||||||
// 定义方法--->与C方法相对应
|
// 定义方法--->与C方法相对应
|
||||||
void qvvr_fun_cause(QvvrDataStruct data);
|
void qvvr_fun_cause(QvvrDataStruct data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,14 +23,17 @@ public class JnaCallDllOrSo {
|
|||||||
this.nameDll = name;
|
this.nameDll = name;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String os = System.getProperty("os.name"); // 获取当前操作系统的类型
|
// 获取当前操作系统的类型
|
||||||
int beginIndex = os != null && os.startsWith("Windows") ? 1 : 0;// windows操作系统为1 否则为0
|
String os = System.getProperty("os.name");
|
||||||
|
// windows操作系统为1 否则为0
|
||||||
|
int beginIndex = os != null && os.startsWith("Windows") ? 1 : 0;
|
||||||
if(beginIndex == 0){
|
if(beginIndex == 0){
|
||||||
//linux操作系统
|
//linux操作系统
|
||||||
this.path = URLDecoder.decode(this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath(), "UTF-8");
|
this.path = URLDecoder.decode(this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath(), "UTF-8");
|
||||||
}else {
|
}else {
|
||||||
this.path = URLDecoder.decode(this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath().replaceFirst("/", ""), "UTF-8");
|
this.path = URLDecoder.decode(this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath().replaceFirst("/", ""), "UTF-8");
|
||||||
}
|
}
|
||||||
|
System.out.println("初始化路径************"+this.path);
|
||||||
|
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
log.error(e.getMessage());
|
log.error(e.getMessage());
|
||||||
@@ -49,8 +52,8 @@ public class JnaCallDllOrSo {
|
|||||||
pathPackage = pathPackage.replace('.', '/');
|
pathPackage = pathPackage.replace('.', '/');
|
||||||
this.pathDll = packagePath(path + pathPackage);
|
this.pathDll = packagePath(path + pathPackage);
|
||||||
this.pathDll = path + pathPackage + "/" + this.nameDll;
|
this.pathDll = path + pathPackage + "/" + this.nameDll;
|
||||||
|
//如果dll在jar包内部返回true,否则返回true
|
||||||
return path.endsWith(".jar");//如果dll在jar包内部返回true,否则返回true
|
return path.endsWith(".jar");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean exitFile() {//判断dll文件是否存在
|
public boolean exitFile() {//判断dll文件是否存在
|
||||||
@@ -84,7 +87,7 @@ public class JnaCallDllOrSo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getStrpath() {
|
public String getStrpath() {
|
||||||
if (judgeFileType()) {
|
/* if (judgeFileType()) {
|
||||||
if (!exitFile()) {
|
if (!exitFile()) {
|
||||||
copyDll2Path();
|
copyDll2Path();
|
||||||
}
|
}
|
||||||
@@ -92,7 +95,10 @@ public class JnaCallDllOrSo {
|
|||||||
return packagePath(JnaCallDllOrSo.jarPath);
|
return packagePath(JnaCallDllOrSo.jarPath);
|
||||||
} else {
|
} else {
|
||||||
return this.pathDll;
|
return this.pathDll;
|
||||||
}
|
}*/
|
||||||
|
String aa = this.path+this.nameDll;
|
||||||
|
String bb= aa.replace("/", File.separator);
|
||||||
|
return bb;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPath() {
|
public void setPath() {
|
||||||
|
|||||||
Binary file not shown.
@@ -12,7 +12,7 @@ import java.io.IOException;
|
|||||||
*/
|
*/
|
||||||
public class XssFilter implements Filter {
|
public class XssFilter implements Filter {
|
||||||
|
|
||||||
private static final String[] EXCLUSIONS_URLS = {".js", ".gif", ".jpg", ".png", ".css", ".ico"};
|
private static final String[] EXCLUSIONS_URLS = {".js", ".gif", ".jpg", ".png", ".css", ".ico", ".dll", ".so"};
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -254,6 +254,13 @@ public class SupvPushGwServiceImpl implements SupvPushGwService {
|
|||||||
//TODO 调用上送接口
|
//TODO 调用上送接口
|
||||||
|
|
||||||
|
|
||||||
|
for(SupvReportM supvReportM : supvReportMList){
|
||||||
|
SupvReportM supvReportMPO = new SupvReportM();
|
||||||
|
supvReportMPO.setMonthReportId(supvReportM.getMonthReportId());
|
||||||
|
supvReportMPO.setIsUploadHead(1);
|
||||||
|
supvReportMMapper.updateById(supvReportMPO);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ public class SupvReportMServiceImpl extends MppServiceImpl<SupvReportMMapper, Su
|
|||||||
supvReportM.setStatisticsLevel("5");
|
supvReportM.setStatisticsLevel("5");
|
||||||
}
|
}
|
||||||
supvReportM.setSupvNum(all);
|
supvReportM.setSupvNum(all);
|
||||||
supvReportM.setIsuploadhead(0);
|
supvReportM.setIsUploadHead(0);
|
||||||
supvReportMBatch.add(supvReportM);
|
supvReportMBatch.add(supvReportM);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user