Compare commits
No commits in common. "master" and "yanyang" have entirely different histories.
21
README.md
21
README.md
@ -1,4 +1,23 @@
|
|||||||
spc 主项目
|
**项目说明**
|
||||||
|
- 这是根据renren框架重新修改出来的框架
|
||||||
|
- 采用SpringBoot、MyBatis、spring security框架
|
||||||
|
- 提供了代码生成器,只需编写30%左右代码,其余的代码交给系统自动生成,可快速完成开发任务
|
||||||
|
- 代码生成器是用的Velocity模版引擎,如果需要可以在ym-generator模块中进行vm模板的修改和一些包名等基础修改
|
||||||
|
<br>
|
||||||
|
|
||||||
|
**新增业务模块需要注意**
|
||||||
|
- 新增业务模块时,业务模块需要依赖ym-admin,并且ym-gateway模块maven需要依赖新建模块
|
||||||
|
- 自动生成的controller接口都带鉴权注解,如果开发阶段可以先注释掉,后面开发完成之后再把鉴权添加到数据库
|
||||||
|
<br>
|
||||||
|
|
||||||
|
**技术选型:**
|
||||||
|
- 核心框架:Spring Boot 2.7
|
||||||
|
- 安全框架:Spring Security
|
||||||
|
- 持久层框架:MyBatis 3.5
|
||||||
|
- 定时器:Quartz 2.3
|
||||||
|
- 数据库连接池:HikariCP
|
||||||
|
- 日志管理:log4j2
|
||||||
|
- 页面交互:Vue2.x
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
@ -73,7 +73,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
"/webjars/**",
|
"/webjars/**",
|
||||||
"/websocket/**",
|
"/websocket/**",
|
||||||
"/influx/**",
|
"/influx/**",
|
||||||
"/spcData/**",
|
|
||||||
|
|
||||||
// "/basic/**",
|
// "/basic/**",
|
||||||
// "/qualityPlanning/**",
|
// "/qualityPlanning/**",
|
||||||
|
@ -52,10 +52,10 @@ public class LoginServiceImpl implements LoginService {
|
|||||||
@Override
|
@Override
|
||||||
public Result login(HttpServletRequest request, LoginParam loginParam) {
|
public Result login(HttpServletRequest request, LoginParam loginParam) {
|
||||||
//验证码是否正确
|
//验证码是否正确
|
||||||
// boolean flag = captchaService.validate(loginParam.getUuid(), loginParam.getCaptcha());
|
boolean flag = captchaService.validate(loginParam.getUuid(), loginParam.getCaptcha());
|
||||||
// if(!flag){
|
if(!flag){
|
||||||
// return new Result<>().error(ErrorCode.CAPTCHA_ERROR, "验证码错误");
|
return new Result<>().error(ErrorCode.CAPTCHA_ERROR, "验证码错误");
|
||||||
// }
|
}
|
||||||
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginParam.getUsername(),loginParam.getPassword());
|
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginParam.getUsername(),loginParam.getPassword());
|
||||||
Authentication authenticate = authenticationManager.authenticate(authenticationToken);
|
Authentication authenticate = authenticationManager.authenticate(authenticationToken);
|
||||||
//登录日志
|
//登录日志
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
package com.cnbm.common.spc.util;
|
package com.cnbm.common.spc.util;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.Instant;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.ZoneOffset;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -18,18 +13,14 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class DataUtils {
|
public class DataUtils {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
// ArrayList<Integer> arrs = new ArrayList<>();
|
ArrayList<Integer> arrs = new ArrayList<>();
|
||||||
//
|
|
||||||
// for(int i=0;i<100;i++){
|
for(int i=0;i<100;i++){
|
||||||
// arrs.add(i);
|
arrs.add(i);
|
||||||
// }
|
}
|
||||||
// List<List<Integer>> lists = fixedGroup(arrs, 10);
|
List<List<Integer>> lists = fixedGroup(arrs, 10);
|
||||||
// System.out.println();
|
System.out.println();
|
||||||
LocalDateTime now = LocalDateTime.now();
|
|
||||||
Instant instant1 = now.atZone(ZoneId.systemDefault()).toInstant();
|
|
||||||
Instant instant2 = now.toInstant(ZoneOffset.UTC);
|
|
||||||
Instant instant3 = StringToInstant("2024-01-22 12:00:00");
|
|
||||||
System.out.println(instant1+" - "+instant2+" - "+instant3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -55,20 +46,7 @@ public class DataUtils {
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
public static final Instant StringToInstant(String string) {
|
|
||||||
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
||||||
LocalDateTime parse = LocalDateTime.parse(string, dateTimeFormatter);
|
|
||||||
//return parse.toInstant(ZoneOffset.UTC);
|
|
||||||
return parse.atZone(ZoneId.systemDefault()).toInstant();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static final Instant StringToInstantPlus8(String string) {
|
|
||||||
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
|
|
||||||
//LocalDateTime parse = LocalDateTime.parse(string, dateTimeFormatter).plusHours(8);
|
|
||||||
LocalDateTime parse = LocalDateTime.parse(string, dateTimeFormatter).minusHours(8);
|
|
||||||
return parse.toInstant(ZoneOffset.UTC);
|
|
||||||
}
|
|
||||||
public static String splitToNeed(String s,Integer type){
|
public static String splitToNeed(String s,Integer type){
|
||||||
String[] s1 = s.split(" ");
|
String[] s1 = s.split(" ");
|
||||||
String[] split = s1[0].split("-");
|
String[] split = s1[0].split("-");
|
||||||
|
@ -2,15 +2,9 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
#MySQL
|
#MySQL
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# url: jdbc:mysql://mysql.picaiba.com:30307/spc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://mysql.picaiba.com:30307/spc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
||||||
# username: root
|
username: root
|
||||||
# password: 1qaz@WSX3edc$RFV
|
password: 1qaz@WSX3edc$RFV
|
||||||
url: jdbc:mysql://172.16.21.131:3306/spc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
|
||||||
username: spcw
|
|
||||||
password: fxltsblXSSXYBY
|
|
||||||
# url: jdbc:mysql://172.16.21.131:3306/spc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
|
||||||
# username: spcw
|
|
||||||
# password: fxltsblXSSXYBY
|
|
||||||
# #Oracle
|
# #Oracle
|
||||||
# driver-class-name: oracle.jdbc.OracleDriver
|
# driver-class-name: oracle.jdbc.OracleDriver
|
||||||
# url: jdbc:oracle:thin:@192.168.10.10:1521:xe
|
# url: jdbc:oracle:thin:@192.168.10.10:1521:xe
|
||||||
@ -83,4 +77,4 @@ spring:
|
|||||||
# writeTimeout: 5s # Write timeout for OkHttpClient. (Default: 10s)
|
# writeTimeout: 5s # Write timeout for OkHttpClient. (Default: 10s)
|
||||||
# connectTimeout: 5s # Connection timeout for OkHttpClient. (Default: 10s)
|
# connectTimeout: 5s # Connection timeout for OkHttpClient. (Default: 10s)
|
||||||
|
|
||||||
# management.health.influx.enabled=true # Whether to enable InfluxDB 2.x health check.
|
# management.health.influx.enabled=true # Whether to enable InfluxDB 2.x health check.
|
@ -2,12 +2,9 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
#MySQL
|
#MySQL
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# url: jdbc:mysql://mysql.picaiba.com:30307/ym_pass?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://mysql.picaiba.com:30307/ym_pass?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
||||||
# username: root
|
username: root
|
||||||
# password: 1qaz@WSX3edc$RFV
|
password: 1qaz@WSX3edc$RFV
|
||||||
url: jdbc:mysql://172.16.21.131:3306/spc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
|
||||||
username: spcw
|
|
||||||
password: fxltsblXSSXYBY
|
|
||||||
# #Oracle
|
# #Oracle
|
||||||
# driver-class-name: oracle.jdbc.OracleDriver
|
# driver-class-name: oracle.jdbc.OracleDriver
|
||||||
# url: jdbc:oracle:thin:@192.168.10.10:1521:xe
|
# url: jdbc:oracle:thin:@192.168.10.10:1521:xe
|
||||||
|
@ -5,9 +5,9 @@ server:
|
|||||||
threads:
|
threads:
|
||||||
max: 1000
|
max: 1000
|
||||||
min-spare: 30
|
min-spare: 30
|
||||||
port: 8999
|
port: 8080
|
||||||
servlet:
|
servlet:
|
||||||
context-path: /spcserver
|
context-path: /ym-spc
|
||||||
session:
|
session:
|
||||||
cookie:
|
cookie:
|
||||||
http-only: true
|
http-only: true
|
||||||
@ -33,12 +33,9 @@ spring:
|
|||||||
enabled: true
|
enabled: true
|
||||||
redis:
|
redis:
|
||||||
database: 2
|
database: 2
|
||||||
# host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
# port: 6379
|
port: 6379
|
||||||
# password: ''
|
password: '' # 密码(默认为空)
|
||||||
host: 172.16.21.99
|
|
||||||
port: 6380
|
|
||||||
password: '@WSXcde3' # 密码(默认为空)
|
|
||||||
timeout: 6000ms # 连接超时时长(毫秒)
|
timeout: 6000ms # 连接超时时长(毫秒)
|
||||||
jedis:
|
jedis:
|
||||||
pool:
|
pool:
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.cnbm.influx.config;
|
package com.cnbm.influx.config;
|
||||||
|
|
||||||
import com.cnbm.common.spc.util.DataUtils;
|
|
||||||
import com.cnbm.influx.constant.Constant;
|
import com.cnbm.influx.constant.Constant;
|
||||||
import com.cnbm.influx.param.*;
|
import com.cnbm.influx.param.*;
|
||||||
import com.cnbm.influx.template.Event;
|
import com.cnbm.influx.template.Event;
|
||||||
@ -20,10 +19,8 @@ public enum InfluxClient {
|
|||||||
/**
|
/**
|
||||||
* influxdb 读写客户端,,如果write比较繁忙,后续可以考虑,维护 client一个线程池。
|
* influxdb 读写客户端,,如果write比较繁忙,后续可以考虑,维护 client一个线程池。
|
||||||
* */
|
* */
|
||||||
//Client("http://192.168.0.171:8086","lkq32gtomiKd4nu-kwZVUBEbn1HLdigjRPfuA6p8c29KFfqRs8JcR3IDLDsKzVFA-TDHbG1W6EP3EcJKKqpDPg==","qgs","qgs-bucket"),
|
Client("http://192.168.0.170:8086","lkBsC27QZr1W50BSPlGxpTqNNpwuUk5uz1dZZRPSPbCG5VmNDDUo8P3UkZIhGWwfJwkuz6ZGZ7Et4_KBaG3gHw==","qgs","qgs-bucket"),
|
||||||
|
|
||||||
//瑞昌-cdte spc-all-token
|
|
||||||
Client("http://172.16.21.111:8086","XLTjiVj368gLL0j-hTcAS6HE17M7tY5fj3ipt1gXTjgVqdGRE5pEhpGMABzchYFZpmaQsGTUckR5Rs8Erz8nKQ==","qgs","qgs-bucket"),
|
|
||||||
;
|
;
|
||||||
private String url;
|
private String url;
|
||||||
private String token;
|
private String token;
|
||||||
@ -119,8 +116,6 @@ public enum InfluxClient {
|
|||||||
.addTag("argName", event.getArgName())
|
.addTag("argName", event.getArgName())
|
||||||
.addField("argValue", event.getArgValue())
|
.addField("argValue", event.getArgValue())
|
||||||
.time(event.getTime().toEpochMilli(), WritePrecision.MS);
|
.time(event.getTime().toEpochMilli(), WritePrecision.MS);
|
||||||
//.time(DataUtils.StringToInstantPlus8(event.getTime().toString()).toEpochMilli(), WritePrecision.MS);
|
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
point = Point.measurement(measurement)
|
point = Point.measurement(measurement)
|
||||||
.addTag("transationId", event.getTransationId()==null ? "" : event.getTransationId())
|
.addTag("transationId", event.getTransationId()==null ? "" : event.getTransationId())
|
||||||
@ -133,8 +128,9 @@ public enum InfluxClient {
|
|||||||
.addTag("argName", event.getArgName())
|
.addTag("argName", event.getArgName())
|
||||||
.addField("argValue", event.getArgValue())
|
.addField("argValue", event.getArgValue())
|
||||||
.time(event.getTime().toEpochMilli(), WritePrecision.MS);
|
.time(event.getTime().toEpochMilli(), WritePrecision.MS);
|
||||||
//.time(DataUtils.StringToInstantPlus8(event.getTime().toString()).toEpochMilli(), WritePrecision.MS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
list.add(point);
|
list.add(point);
|
||||||
}
|
}
|
||||||
writeApi.writePoints(list);
|
writeApi.writePoints(list);
|
||||||
|
@ -29,27 +29,6 @@ public class S7DemoController {
|
|||||||
private static final Logger logger = LoggerFactory.getLogger(S7DemoController.class);
|
private static final Logger logger = LoggerFactory.getLogger(S7DemoController.class);
|
||||||
|
|
||||||
|
|
||||||
//for 常规计量型
|
|
||||||
@PostMapping("/insertDemoDataForMetering")
|
|
||||||
public void insertDemoDataForMetering() throws InterruptedException {
|
|
||||||
List<Event> list = new ArrayList<>();
|
|
||||||
Random r = new Random();
|
|
||||||
|
|
||||||
for(int i=0;i<999;i++){
|
|
||||||
Thread.sleep(10);
|
|
||||||
Event event = new Event();
|
|
||||||
event.setTime(DataUtils.getAfterDate(i).toInstant());
|
|
||||||
event.setTransationId("forbatch"+i);
|
|
||||||
event.setArgName("LTWeight");
|
|
||||||
Double d = r.nextDouble() * 2.5 + 66;
|
|
||||||
event.setArgValue(d.toString());
|
|
||||||
|
|
||||||
event.setInspectionSheetId(i+"");
|
|
||||||
list.add(event);
|
|
||||||
}
|
|
||||||
InfluxClient.Client.batchInsert(list,"Weight");
|
|
||||||
}
|
|
||||||
|
|
||||||
//for 常规计数型
|
//for 常规计数型
|
||||||
@PostMapping("/insertDemoDataForCount")
|
@PostMapping("/insertDemoDataForCount")
|
||||||
public void insertDemoDataForCount() throws InterruptedException {
|
public void insertDemoDataForCount() throws InterruptedException {
|
||||||
@ -169,7 +148,26 @@ public class S7DemoController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//for 常规计量型
|
||||||
|
@PostMapping("/insertDemoDataForMetering")
|
||||||
|
public void insertDemoDataForMetering() throws InterruptedException {
|
||||||
|
List<Event> list = new ArrayList<>();
|
||||||
|
Random r = new Random();
|
||||||
|
|
||||||
|
for(int i=0;i<99;i++){
|
||||||
|
Thread.sleep(10);
|
||||||
|
Event event = new Event();
|
||||||
|
event.setTime(Instant.now());
|
||||||
|
event.setTransationId("forbatch"+i);
|
||||||
|
event.setArgName("LTWeight");
|
||||||
|
Double d = r.nextDouble() * 2.5 + 66;
|
||||||
|
event.setArgValue(d.toString());
|
||||||
|
|
||||||
|
event.setInspectionSheetId(i+"");
|
||||||
|
list.add(event);
|
||||||
|
}
|
||||||
|
InfluxClient.Client.batchInsert(list,"Weight");
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// @PostMapping("/insertBatchJYD")
|
// @PostMapping("/insertBatchJYD")
|
||||||
// public void insertBatchJYD() throws InterruptedException {
|
// public void insertBatchJYD() throws InterruptedException {
|
||||||
|
@ -16,7 +16,7 @@ public class BaseParam implements Serializable {
|
|||||||
//page 信息可选
|
//page 信息可选
|
||||||
private PageInfo pageInfo;
|
private PageInfo pageInfo;
|
||||||
|
|
||||||
@NotEmpty(message = "measurement 不能为空, 设备名(一个设备一个measurement,一个表)")
|
@NotEmpty(message = "measurement 不能为空")
|
||||||
private String measurement;
|
private String measurement;
|
||||||
|
|
||||||
@NotNull(message = "查询时间段不能为空")
|
@NotNull(message = "查询时间段不能为空")
|
||||||
|
@ -142,6 +142,44 @@ public class ProcessInspectionController {
|
|||||||
return R.ok("成功",xmrGraphData);
|
return R.ok("成功",xmrGraphData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @PostMapping("/getBatchs")
|
||||||
|
// public R<List<String>> getBatchs() throws InterruptedException {
|
||||||
|
// List<Event> list = new ArrayList<>();
|
||||||
|
// Random r = new Random();
|
||||||
|
// Instant instant = DataUtils.getBeforeDate(400).toInstant();
|
||||||
|
// List<String> res = new ArrayList<>();
|
||||||
|
//
|
||||||
|
// QueryDataParam queryDataParam = new QueryDataParam();
|
||||||
|
// queryDataParam.setBucket("qgs-bucket");
|
||||||
|
// queryDataParam.setMeasurement("Weight");
|
||||||
|
// List<String> dropNames = new ArrayList<>();
|
||||||
|
// dropNames.add("transationId");
|
||||||
|
// dropNames.add("_value");
|
||||||
|
// dropNames.add("_start");
|
||||||
|
// dropNames.add("_stop");
|
||||||
|
// dropNames.add("_time");
|
||||||
|
// dropNames.add("_field");
|
||||||
|
// dropNames.add("_measurement");
|
||||||
|
// dropNames.add("inspectionSheetId");
|
||||||
|
// dropNames.add("argName");
|
||||||
|
// queryDataParam.setDropedTagNames(dropNames);
|
||||||
|
//
|
||||||
|
// queryDataParam.setTags(Arrays.asList(new Tag("argName","LTWeight")));
|
||||||
|
//
|
||||||
|
// queryDataParam.setRange(new Range(DataUtils.getBeforeDate(100).toInstant(),Instant.now()));
|
||||||
|
//// queryDataParam.setPageInfo(new PageInfo(1,10));
|
||||||
|
// List<FluxTable> query = InfluxClient.Client.queryByGroup(queryDataParam);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// for (FluxTable fluxTable : query) {
|
||||||
|
// List<FluxRecord> records = fluxTable.getRecords();
|
||||||
|
// if(records.size()!=0){
|
||||||
|
// res.add((String) records.get(0).getValueByKey("batchNum"));
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return R.ok(res);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/NPGraphTest")
|
@PostMapping("/NPGraphTest")
|
||||||
@ -182,8 +220,7 @@ public class ProcessInspectionController {
|
|||||||
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
||||||
// queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
//queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
||||||
queryDataParam.setRange(new Range( DataUtils.StringToInstant(graphArg.getBegin()) , DataUtils.StringToInstant(graphArg.getEnd()) ));
|
|
||||||
queryDataParam.setTimeType(graphArg.getGroupType());
|
queryDataParam.setTimeType(graphArg.getGroupType());
|
||||||
npGraph.initialDate(queryDataParam);
|
npGraph.initialDate(queryDataParam);
|
||||||
|
|
||||||
@ -311,9 +348,7 @@ public class ProcessInspectionController {
|
|||||||
QueryDataParam queryDataParam = new QueryDataParam();
|
QueryDataParam queryDataParam = new QueryDataParam();
|
||||||
// queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
//queryDataParam.setRange(new Range(graphArg.getBegin().toInstant(), graphArg.getEnd().toInstant()));
|
queryDataParam.setRange(new Range(graphArg.getBegin().toInstant(), graphArg.getEnd().toInstant()));
|
||||||
queryDataParam.setRange(new Range( DataUtils.StringToInstant(graphArg.getBegin()) , DataUtils.StringToInstant(graphArg.getEnd()) ));
|
|
||||||
|
|
||||||
meanStandardDeviationGraph.initialDate(queryDataParam);
|
meanStandardDeviationGraph.initialDate(queryDataParam);
|
||||||
|
|
||||||
XbarSGraphData xbarSGraphData = new XbarSGraphData(
|
XbarSGraphData xbarSGraphData = new XbarSGraphData(
|
||||||
@ -350,8 +385,7 @@ public class ProcessInspectionController {
|
|||||||
// queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
|
|
||||||
//queryDataParam.setRange(new Range(graphArg.getBegin().toInstant(), graphArg.getEnd().toInstant()));
|
queryDataParam.setRange(new Range(graphArg.getBegin().toInstant(), graphArg.getEnd().toInstant()));
|
||||||
queryDataParam.setRange(new Range( DataUtils.StringToInstant(graphArg.getBegin()) , DataUtils.StringToInstant(graphArg.getEnd()) ));
|
|
||||||
meanRGraph.initialDate(queryDataParam);
|
meanRGraph.initialDate(queryDataParam);
|
||||||
|
|
||||||
|
|
||||||
@ -387,8 +421,7 @@ public class ProcessInspectionController {
|
|||||||
QueryDataParam queryDataParam = new QueryDataParam();
|
QueryDataParam queryDataParam = new QueryDataParam();
|
||||||
// queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
//queryDataParam.setRange(new Range(graphArg.getBegin().toInstant(), graphArg.getEnd().toInstant()));
|
queryDataParam.setRange(new Range(graphArg.getBegin().toInstant(), graphArg.getEnd().toInstant()));
|
||||||
queryDataParam.setRange(new Range( DataUtils.StringToInstant(graphArg.getBegin()) , DataUtils.StringToInstant(graphArg.getEnd()) ));
|
|
||||||
xmrGraph.initialDate(queryDataParam);
|
xmrGraph.initialDate(queryDataParam);
|
||||||
|
|
||||||
XMRGraphData xmrGraphData = new XMRGraphData(
|
XMRGraphData xmrGraphData = new XMRGraphData(
|
||||||
@ -418,8 +451,7 @@ public class ProcessInspectionController {
|
|||||||
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
||||||
// queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
//queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
||||||
queryDataParam.setRange(new Range( DataUtils.StringToInstant(graphArg.getBegin()) , DataUtils.StringToInstant(graphArg.getEnd()) ));
|
|
||||||
queryDataParam.setTimeType(graphArg.getGroupType());
|
queryDataParam.setTimeType(graphArg.getGroupType());
|
||||||
pGraph.initialDate(queryDataParam);
|
pGraph.initialDate(queryDataParam);
|
||||||
|
|
||||||
@ -441,8 +473,7 @@ public class ProcessInspectionController {
|
|||||||
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
||||||
// queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
//queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
||||||
queryDataParam.setRange(new Range( DataUtils.StringToInstant(graphArg.getBegin()) , DataUtils.StringToInstant(graphArg.getEnd()) ));
|
|
||||||
queryDataParam.setTimeType(graphArg.getGroupType());
|
queryDataParam.setTimeType(graphArg.getGroupType());
|
||||||
cGraph.initialDate(queryDataParam);
|
cGraph.initialDate(queryDataParam);
|
||||||
|
|
||||||
@ -465,8 +496,7 @@ public class ProcessInspectionController {
|
|||||||
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
QueryDataGroupByTimeParam queryDataParam = new QueryDataGroupByTimeParam();
|
||||||
// queryDataParam.setMeasurement(Constant.measurement);
|
// queryDataParam.setMeasurement(Constant.measurement);
|
||||||
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
queryDataParam.setMeasurement(graphArg.getProcedureName());
|
||||||
//queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
queryDataParam.setRange(new Range( graphArg.getBegin().toInstant() , graphArg.getEnd().toInstant() ));
|
||||||
queryDataParam.setRange(new Range( DataUtils.StringToInstant(graphArg.getBegin()) , DataUtils.StringToInstant(graphArg.getEnd()) ));
|
|
||||||
queryDataParam.setTimeType(graphArg.getGroupType());
|
queryDataParam.setTimeType(graphArg.getGroupType());
|
||||||
uGraph.initialDate(queryDataParam);
|
uGraph.initialDate(queryDataParam);
|
||||||
|
|
||||||
|
@ -23,25 +23,15 @@ public class GraphArg {
|
|||||||
@NotNull(message = "检验特性Id 不能为空")
|
@NotNull(message = "检验特性Id 不能为空")
|
||||||
private Long productFeaturesId;
|
private Long productFeaturesId;
|
||||||
|
|
||||||
// @ApiModelProperty(value = "查询时间段,开始")
|
|
||||||
// @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
|
|
||||||
// @NotNull(message = "时间段,开始 不能为空")
|
|
||||||
// private Date begin;
|
|
||||||
//
|
|
||||||
// @ApiModelProperty(value = "查询时间段,结束")
|
|
||||||
// @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
|
|
||||||
// @NotNull(message = "时间段,结束 不能为空")
|
|
||||||
// private Date end;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "查询时间段,开始")
|
@ApiModelProperty(value = "查询时间段,开始")
|
||||||
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
|
||||||
@NotNull(message = "时间段,开始 不能为空")
|
@NotNull(message = "时间段,开始 不能为空")
|
||||||
private String begin;
|
private Date begin;
|
||||||
|
|
||||||
@ApiModelProperty(value = "查询时间段,结束")
|
@ApiModelProperty(value = "查询时间段,结束")
|
||||||
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
|
||||||
@NotNull(message = "时间段,结束 不能为空")
|
@NotNull(message = "时间段,结束 不能为空")
|
||||||
private String end;
|
private Date end;
|
||||||
|
|
||||||
@ApiModelProperty(value = "判读方案列表,只用于 计量型")
|
@ApiModelProperty(value = "判读方案列表,只用于 计量型")
|
||||||
private List<InterpretationListArg> interpretationScheme;
|
private List<InterpretationListArg> interpretationScheme;
|
||||||
|
@ -110,9 +110,6 @@ public class CGraph {
|
|||||||
queryDataParam.setTags(Arrays.asList(new Tag("argName",argName)));
|
queryDataParam.setTags(Arrays.asList(new Tag("argName",argName)));
|
||||||
|
|
||||||
List<FluxTable> query = InfluxClient.Client.queryGroupByTime(queryDataParam);
|
List<FluxTable> query = InfluxClient.Client.queryGroupByTime(queryDataParam);
|
||||||
if(query.size() == 0){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//1. 先从fluxdb 里面提取原始数据
|
//1. 先从fluxdb 里面提取原始数据
|
||||||
//计算p bar
|
//计算p bar
|
||||||
this.cbar = computeCbar(query);
|
this.cbar = computeCbar(query);
|
||||||
|
@ -104,9 +104,6 @@ public class NPGraph {
|
|||||||
|
|
||||||
queryDataParam.setTags(Arrays.asList(new Tag("argName",argName)));
|
queryDataParam.setTags(Arrays.asList(new Tag("argName",argName)));
|
||||||
List<FluxTable> query = InfluxClient.Client.queryGroupByTime(queryDataParam);
|
List<FluxTable> query = InfluxClient.Client.queryGroupByTime(queryDataParam);
|
||||||
if(query.size() == 0){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//1. 先从fluxdb 里面提取原始数据
|
//1. 先从fluxdb 里面提取原始数据
|
||||||
List<Double> originData = new ArrayList<>();
|
List<Double> originData = new ArrayList<>();
|
||||||
//计算p bar
|
//计算p bar
|
||||||
|
@ -115,9 +115,6 @@ public class PGraph {
|
|||||||
queryDataParam.setTags(Arrays.asList(new Tag("argName",argName)));
|
queryDataParam.setTags(Arrays.asList(new Tag("argName",argName)));
|
||||||
|
|
||||||
List<FluxTable> query = InfluxClient.Client.queryGroupByTime(queryDataParam);
|
List<FluxTable> query = InfluxClient.Client.queryGroupByTime(queryDataParam);
|
||||||
if(query.size() == 0){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//1. 先从fluxdb 里面提取原始数据
|
//1. 先从fluxdb 里面提取原始数据
|
||||||
//计算p bar
|
//计算p bar
|
||||||
this.pbar = computePbar(query);
|
this.pbar = computePbar(query);
|
||||||
|
@ -114,9 +114,6 @@ public class UGraph {
|
|||||||
|
|
||||||
queryDataParam.setTags(Arrays.asList(new Tag("argName",argName)));
|
queryDataParam.setTags(Arrays.asList(new Tag("argName",argName)));
|
||||||
List<FluxTable> query = InfluxClient.Client.queryGroupByTime(queryDataParam);
|
List<FluxTable> query = InfluxClient.Client.queryGroupByTime(queryDataParam);
|
||||||
if(query.size() == 0){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//1. 先从fluxdb 里面提取原始数据
|
//1. 先从fluxdb 里面提取原始数据
|
||||||
//计算p bar
|
//计算p bar
|
||||||
this.ubar = computeUbar(query);
|
this.ubar = computeUbar(query);
|
||||||
|
@ -103,12 +103,8 @@ public class MeanStandardDeviationGraph {
|
|||||||
queryDataParam.setTags(Arrays.asList(new Tag("argName",argName)));
|
queryDataParam.setTags(Arrays.asList(new Tag("argName",argName)));
|
||||||
|
|
||||||
List<FluxTable> query = InfluxClient.Client.query(queryDataParam);
|
List<FluxTable> query = InfluxClient.Client.query(queryDataParam);
|
||||||
if(query.size() == 0){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//1. 先从fluxdb 里面提取原始数据
|
//1. 先从fluxdb 里面提取原始数据
|
||||||
List<Double> originData = new ArrayList<>();
|
List<Double> originData = new ArrayList<>();
|
||||||
|
|
||||||
for (FluxTable fluxTable : query) {
|
for (FluxTable fluxTable : query) {
|
||||||
List<FluxRecord> records = fluxTable.getRecords();
|
List<FluxRecord> records = fluxTable.getRecords();
|
||||||
for (FluxRecord fluxRecord : records) {
|
for (FluxRecord fluxRecord : records) {
|
||||||
|
@ -100,9 +100,6 @@ public class XMRGraph {
|
|||||||
|
|
||||||
|
|
||||||
List<FluxTable> query = InfluxClient.Client.query(queryDataParam);
|
List<FluxTable> query = InfluxClient.Client.query(queryDataParam);
|
||||||
if(query.size() == 0){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//1. 先从fluxdb 里面提取原始数据
|
//1. 先从fluxdb 里面提取原始数据
|
||||||
List<Double> originData = new ArrayList<>();
|
List<Double> originData = new ArrayList<>();
|
||||||
for (FluxTable fluxTable : query) {
|
for (FluxTable fluxTable : query) {
|
||||||
|
Loading…
Reference in New Issue
Block a user