This commit is contained in:
caixiang 2022-08-01 13:42:54 +08:00
parent e9c8f7857b
commit 0750c9583e
18 changed files with 107 additions and 24 deletions

View File

@ -0,0 +1,18 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.cnbm.admin.basic;
import java.io.Serializable;
/**
* 接口请求参数基类
*
* @author jiff
* @date 2018/11/1
* @since 1.0
*/
public class BaseParam implements Serializable {
}

View File

@ -73,6 +73,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/webjars/**", "/webjars/**",
"/websocket/**", "/websocket/**",
"/influx/**", "/influx/**",
"/basic/**",
"/processInspection/**", "/processInspection/**",
"/captcha").anonymous() "/captcha").anonymous()
// .antMatchers("/testCors").hasAuthority("system:dept:list222") // .antMatchers("/testCors").hasAuthority("system:dept:list222")

View File

@ -0,0 +1,36 @@
/*
* Copyright (c) 2018.
* http://www.ulabcare.com
*/
package com.cnbm.admin.params;
import com.cnbm.admin.basic.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 主键请求参数对象
*
* @author jiff
* @date 2018/11/9
* @since 1.0
*/
@Data
@ApiModel("主键参数对象")
public class IdParam implements Serializable {
private static final long serialVersionUID = 1L;
@NotNull(message = "主键不能为空")
@ApiModelProperty(value = "主键", required = true, example = "1", notes = "根据实际接口传递不同对象的主键")
private Long id;
}

View File

@ -119,7 +119,7 @@ public class MachineController {
public Result changeStatus(@PathVariable("id") Long id){ public Result changeStatus(@PathVariable("id") Long id){
machineService.changeStatus(id); machineService.changeStatus(id);
return new Result(); return new Result().ok(true);
} }
} }

View File

@ -1,6 +1,7 @@
package com.cnbm.basic.controller; package com.cnbm.basic.controller;
import com.cnbm.admin.annotation.LogOperation; import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.admin.params.IdParam;
import com.cnbm.common.constant.Constant; import com.cnbm.common.constant.Constant;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.utils.ExcelUtils; import com.cnbm.common.utils.ExcelUtils;
@ -34,7 +35,7 @@ import java.util.Map;
* @since 2022-07-11 * @since 2022-07-11
*/ */
@RestController @RestController
@RequestMapping("/code/product") @RequestMapping("/basic/product")
@Api(tags="产品 表") @Api(tags="产品 表")
public class ProductController { public class ProductController {
@Autowired @Autowired
@ -113,11 +114,11 @@ public class ProductController {
ExcelUtils.exportExcelToTarget(response, null, list, ProductExcel.class); ExcelUtils.exportExcelToTarget(response, null, list, ProductExcel.class);
} }
@GetMapping("status") @PostMapping("status")
@ApiOperation("改变状态") @ApiOperation("改变状态")
@LogOperation("改变状态") @LogOperation("改变状态")
public Result changeStatus(@PathVariable("id") Long id){ public Result changeStatus(@RequestBody IdParam id){
productService.changeStatus(id); productService.changeStatus(id.getId());
return new Result(); return new Result();
} }

View File

@ -90,6 +90,8 @@ public class MachineServiceImpl extends CrudServiceImpl<MachineMapper, Machine,
Integer status = 1 - entity.getStatus(); Integer status = 1 - entity.getStatus();
entity.setStatus(status); entity.setStatus(status);
updateById(entity); updateById(entity);
//return updateById(entity);
} }
} }

View File

@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull;
import java.time.Instant; import java.time.Instant;
/** /**
* @Desc: "" * @Desc: "常规计量值 - entity"
* @Author: caixiang * @Author: caixiang
* @DATE: 2022/6/25 11:13 * @DATE: 2022/6/25 11:13
*/ */

View File

@ -0,0 +1,31 @@
package com.cnbm.influx.template;
import lombok.Data;
import java.time.Instant;
/**
* @Desc: "常规计数值 - entity"
* @Author: caixiang
* @DATE: 2022/6/25 11:13
*/
@Data
public class EventForCount {
private Instant time;
private String inspectionSheetId;
//n = 某个批次的样本数
private Integer n;
//failN = 某个批次不合格品数
private String failN;
//batchNum = 某个批次
private String batchNum;
//检测名
private String detectionName;
}

View File

@ -10,9 +10,9 @@ import com.cnbm.influx.constant.Constant;
import com.cnbm.influx.param.QueryDataParam; import com.cnbm.influx.param.QueryDataParam;
import com.cnbm.influx.param.Range; import com.cnbm.influx.param.Range;
import com.cnbm.processInspection.dto.*; import com.cnbm.processInspection.dto.*;
import com.cnbm.processInspection.graphAnalyzed.mr.MeanRGraph; import com.cnbm.processInspection.graphAnalyzed.forMeterage.mr.MeanRGraph;
import com.cnbm.processInspection.graphAnalyzed.ms.MeanStandardDeviationGraph; import com.cnbm.processInspection.graphAnalyzed.forMeterage.ms.MeanStandardDeviationGraph;
import com.cnbm.processInspection.graphAnalyzed.xmr.XMRGraph; import com.cnbm.processInspection.graphAnalyzed.forMeterage.xmr.XMRGraph;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;

View File

@ -1,7 +1,7 @@
package com.cnbm.processInspection.dto; package com.cnbm.processInspection.dto;
import com.cnbm.common.spc.math.StandardDiviation; import com.cnbm.common.spc.math.StandardDiviation;
import com.cnbm.processInspection.graphAnalyzed.xmr.XMRGraphEntity; import com.cnbm.processInspection.graphAnalyzed.forMeterage.xmr.XMRGraphEntity;
import com.cnbm.qualityPlanning.entity.ControlLimit; import com.cnbm.qualityPlanning.entity.ControlLimit;
import com.cnbm.qualityPlanning.entity.ProcessCapability; import com.cnbm.qualityPlanning.entity.ProcessCapability;
import com.cnbm.qualityPlanning.entity.SpecificationLimit; import com.cnbm.qualityPlanning.entity.SpecificationLimit;

View File

@ -1,7 +1,7 @@
package com.cnbm.processInspection.dto; package com.cnbm.processInspection.dto;
import com.cnbm.common.spc.math.StandardDiviation; import com.cnbm.common.spc.math.StandardDiviation;
import com.cnbm.processInspection.graphAnalyzed.mr.MRGraphEntity; import com.cnbm.processInspection.graphAnalyzed.forMeterage.mr.MRGraphEntity;
import com.cnbm.qualityPlanning.entity.ControlLimit; import com.cnbm.qualityPlanning.entity.ControlLimit;
import com.cnbm.qualityPlanning.entity.ProcessCapability; import com.cnbm.qualityPlanning.entity.ProcessCapability;
import com.cnbm.qualityPlanning.entity.SpecificationLimit; import com.cnbm.qualityPlanning.entity.SpecificationLimit;

View File

@ -1,7 +1,7 @@
package com.cnbm.processInspection.dto; package com.cnbm.processInspection.dto;
import com.cnbm.common.spc.math.StandardDiviation; import com.cnbm.common.spc.math.StandardDiviation;
import com.cnbm.processInspection.graphAnalyzed.ms.MSDGraphEntity; import com.cnbm.processInspection.graphAnalyzed.forMeterage.ms.MSDGraphEntity;
import com.cnbm.qualityPlanning.entity.ControlLimit; import com.cnbm.qualityPlanning.entity.ControlLimit;
import com.cnbm.qualityPlanning.entity.ProcessCapability; import com.cnbm.qualityPlanning.entity.ProcessCapability;
import com.cnbm.qualityPlanning.entity.SpecificationLimit; import com.cnbm.qualityPlanning.entity.SpecificationLimit;

View File

@ -1,4 +1,4 @@
package com.cnbm.processInspection.graphAnalyzed.mr; package com.cnbm.processInspection.graphAnalyzed.forMeterage.mr;

View File

@ -1,4 +1,4 @@
package com.cnbm.processInspection.graphAnalyzed.mr; package com.cnbm.processInspection.graphAnalyzed.forMeterage.mr;
import com.cnbm.basic.entity.ProductFeatures; import com.cnbm.basic.entity.ProductFeatures;
import com.cnbm.common.spc.math.Math; import com.cnbm.common.spc.math.Math;
@ -7,7 +7,6 @@ import com.cnbm.common.spc.util.DataUtils;
import com.cnbm.influx.config.InfluxClient; import com.cnbm.influx.config.InfluxClient;
import com.cnbm.influx.constant.Constant; import com.cnbm.influx.constant.Constant;
import com.cnbm.influx.param.QueryDataParam; import com.cnbm.influx.param.QueryDataParam;
import com.cnbm.influx.param.Range;
import com.cnbm.influx.param.Tag; import com.cnbm.influx.param.Tag;
import com.cnbm.processInspection.controlCoefficientConstant.XBarRCoefficients; import com.cnbm.processInspection.controlCoefficientConstant.XBarRCoefficients;
import com.cnbm.processInspection.dto.InterpretationListArg; import com.cnbm.processInspection.dto.InterpretationListArg;
@ -17,7 +16,6 @@ import com.influxdb.query.FluxRecord;
import com.influxdb.query.FluxTable; import com.influxdb.query.FluxTable;
import lombok.Data; import lombok.Data;
import java.time.Instant;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package com.cnbm.processInspection.graphAnalyzed.ms; package com.cnbm.processInspection.graphAnalyzed.forMeterage.ms;

View File

@ -1,4 +1,4 @@
package com.cnbm.processInspection.graphAnalyzed.ms; package com.cnbm.processInspection.graphAnalyzed.forMeterage.ms;
import com.cnbm.basic.entity.ProductFeatures; import com.cnbm.basic.entity.ProductFeatures;
import com.cnbm.common.spc.math.Math; import com.cnbm.common.spc.math.Math;
@ -7,7 +7,6 @@ import com.cnbm.common.spc.util.DataUtils;
import com.cnbm.influx.config.InfluxClient; import com.cnbm.influx.config.InfluxClient;
import com.cnbm.influx.constant.Constant; import com.cnbm.influx.constant.Constant;
import com.cnbm.influx.param.QueryDataParam; import com.cnbm.influx.param.QueryDataParam;
import com.cnbm.influx.param.Range;
import com.cnbm.influx.param.Tag; import com.cnbm.influx.param.Tag;
import com.cnbm.processInspection.controlCoefficientConstant.XBarSCoefficients; import com.cnbm.processInspection.controlCoefficientConstant.XBarSCoefficients;
@ -18,7 +17,6 @@ import com.influxdb.query.FluxRecord;
import com.influxdb.query.FluxTable; import com.influxdb.query.FluxTable;
import lombok.Data; import lombok.Data;
import java.time.Instant;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package com.cnbm.processInspection.graphAnalyzed.xmr; package com.cnbm.processInspection.graphAnalyzed.forMeterage.xmr;
import com.cnbm.basic.entity.ProductFeatures; import com.cnbm.basic.entity.ProductFeatures;
import com.cnbm.common.spc.math.Math; import com.cnbm.common.spc.math.Math;
@ -215,8 +215,6 @@ public class XMRGraph {
} }
} }
} }
// 结束 // 结束

View File

@ -1,4 +1,4 @@
package com.cnbm.processInspection.graphAnalyzed.xmr; package com.cnbm.processInspection.graphAnalyzed.forMeterage.xmr;