From 0750c9583e98f21691309ce86e33700cc94cb7dc Mon Sep 17 00:00:00 2001 From: caixiang <939387484@qq.com> Date: Mon, 1 Aug 2022 13:42:54 +0800 Subject: [PATCH] mark --- .../java/com/cnbm/admin/basic/BaseParam.java | 18 ++++++++++ .../com/cnbm/admin/config/SecurityConfig.java | 1 + .../java/com/cnbm/admin/params/IdParam.java | 36 +++++++++++++++++++ .../basic/controller/MachineController.java | 2 +- .../basic/controller/ProductController.java | 9 ++--- .../service/impl/MachineServiceImpl.java | 2 ++ .../java/com/cnbm/influx/template/Event.java | 2 +- .../cnbm/influx/template/EventForCount.java | 31 ++++++++++++++++ .../ProcessInspectionController.java | 6 ++-- .../processInspection/dto/XMRGraphData.java | 2 +- .../processInspection/dto/XbarRGraphData.java | 2 +- .../processInspection/dto/XbarSGraphData.java | 2 +- .../{ => forMeterage}/mr/MRGraphEntity.java | 2 +- .../{ => forMeterage}/mr/MeanRGraph.java | 4 +-- .../{ => forMeterage}/ms/MSDGraphEntity.java | 2 +- .../ms/MeanStandardDeviationGraph.java | 4 +-- .../{ => forMeterage}/xmr/XMRGraph.java | 4 +-- .../{ => forMeterage}/xmr/XMRGraphEntity.java | 2 +- 18 files changed, 107 insertions(+), 24 deletions(-) create mode 100644 ym-admin/src/main/java/com/cnbm/admin/basic/BaseParam.java create mode 100644 ym-admin/src/main/java/com/cnbm/admin/params/IdParam.java create mode 100644 ym-influx/src/main/java/com/cnbm/influx/template/EventForCount.java rename ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/{ => forMeterage}/mr/MRGraphEntity.java (93%) rename ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/{ => forMeterage}/mr/MeanRGraph.java (99%) rename ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/{ => forMeterage}/ms/MSDGraphEntity.java (94%) rename ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/{ => forMeterage}/ms/MeanStandardDeviationGraph.java (99%) rename ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/{ => forMeterage}/xmr/XMRGraph.java (99%) rename ym-process-inspection/src/main/java/com/cnbm/processInspection/graphAnalyzed/{ => forMeterage}/xmr/XMRGraphEntity.java (93%) diff --git a/ym-admin/src/main/java/com/cnbm/admin/basic/BaseParam.java b/ym-admin/src/main/java/com/cnbm/admin/basic/BaseParam.java new file mode 100644 index 0000000..81237d3 --- /dev/null +++ b/ym-admin/src/main/java/com/cnbm/admin/basic/BaseParam.java @@ -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 { +} diff --git a/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java b/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java index 2203625..2b39550 100644 --- a/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java +++ b/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java @@ -73,6 +73,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { "/webjars/**", "/websocket/**", "/influx/**", + "/basic/**", "/processInspection/**", "/captcha").anonymous() // .antMatchers("/testCors").hasAuthority("system:dept:list222") diff --git a/ym-admin/src/main/java/com/cnbm/admin/params/IdParam.java b/ym-admin/src/main/java/com/cnbm/admin/params/IdParam.java new file mode 100644 index 0000000..8bf2d6a --- /dev/null +++ b/ym-admin/src/main/java/com/cnbm/admin/params/IdParam.java @@ -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; + +} diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/MachineController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/MachineController.java index e749ca8..b39272e 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/MachineController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/MachineController.java @@ -119,7 +119,7 @@ public class MachineController { public Result changeStatus(@PathVariable("id") Long id){ machineService.changeStatus(id); - return new Result(); + return new Result().ok(true); } } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductController.java index eb5be8c..17b6d79 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductController.java @@ -1,6 +1,7 @@ package com.cnbm.basic.controller; import com.cnbm.admin.annotation.LogOperation; +import com.cnbm.admin.params.IdParam; import com.cnbm.common.constant.Constant; import com.cnbm.common.page.PageData; import com.cnbm.common.utils.ExcelUtils; @@ -34,7 +35,7 @@ import java.util.Map; * @since 2022-07-11 */ @RestController -@RequestMapping("/code/product") +@RequestMapping("/basic/product") @Api(tags="产品 表") public class ProductController { @Autowired @@ -113,11 +114,11 @@ public class ProductController { ExcelUtils.exportExcelToTarget(response, null, list, ProductExcel.class); } - @GetMapping("status") + @PostMapping("status") @ApiOperation("改变状态") @LogOperation("改变状态") - public Result changeStatus(@PathVariable("id") Long id){ - productService.changeStatus(id); + public Result changeStatus(@RequestBody IdParam id){ + productService.changeStatus(id.getId()); return new Result(); } diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MachineServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MachineServiceImpl.java index ddf9fc7..c36e011 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MachineServiceImpl.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MachineServiceImpl.java @@ -90,6 +90,8 @@ public class MachineServiceImpl extends CrudServiceImpl