From f44f701dad19c46b954efdb22df4eea898d2eb49 Mon Sep 17 00:00:00 2001 From: yanyang Date: Thu, 21 Jul 2022 09:47:38 +0800 Subject: [PATCH] status --- .../basic/controller/FactoryController.java | 2 +- .../basic/controller/MachineController.java | 9 +++ .../controller/MeasureToolController.java | 2 +- .../basic/controller/PlatformController.java | 9 +++ .../controller/ProductTypeController.java | 2 +- .../cnbm/basic/controller/UnitController.java | 2 +- .../WorkingProcedureController.java | 9 +++ .../WorkingProcedureTypeController.java | 9 +++ .../cnbm/basic/mapper/ProductTypeMapper.xml | 75 ------------------- .../impl/WorkingProcedureServiceImpl.java | 2 +- .../basic/mapper => resources}/UnitMapper.xml | 0 .../src/main/java/com/cnbm/influx/Main.java | 1 - 12 files changed, 41 insertions(+), 81 deletions(-) delete mode 100644 ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductTypeMapper.xml rename ym-baisc/src/main/{java/com/cnbm/basic/mapper => resources}/UnitMapper.xml (100%) diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/FactoryController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/FactoryController.java index 1e46a5c..1c806cf 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/FactoryController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/FactoryController.java @@ -113,7 +113,7 @@ public class FactoryController { ExcelUtils.exportExcelToTarget(response, null, list, FactoryExcel.class); } - @GetMapping("{id}") + @GetMapping("{statusId}") @ApiOperation("改变状态") @LogOperation("改变状态") public Result changeStatus(@PathVariable("id") 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 ac8a148..61c1b3d 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 @@ -113,4 +113,13 @@ public class MachineController { ExcelUtils.exportExcelToTarget(response, null, list, MachineExcel.class); } + @GetMapping("{statusId}") + @ApiOperation("改变状态") + @LogOperation("改变状态") + public Result changeStatus(@PathVariable("id") Long id){ + machineService.changeStatus(id); + + return new Result(); + } + } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/MeasureToolController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/MeasureToolController.java index cad9865..142788c 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/MeasureToolController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/MeasureToolController.java @@ -113,7 +113,7 @@ public class MeasureToolController { ExcelUtils.exportExcelToTarget(response, null, list, MeasureToolExcel.class); } - @GetMapping("{id}") + @GetMapping("{statusId}") @ApiOperation("改变状态") @LogOperation("改变状态") public Result changeStatus(@PathVariable("id") Long id){ diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/PlatformController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/PlatformController.java index 964ef6c..3b06a3b 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/PlatformController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/PlatformController.java @@ -113,4 +113,13 @@ public class PlatformController { ExcelUtils.exportExcelToTarget(response, null, list, PlatformExcel.class); } + @GetMapping("{statusId}") + @ApiOperation("改变状态") + @LogOperation("改变状态") + public Result changeStatus(@PathVariable("id") Long id){ + platformService.changeStatus(id); + + return new Result(); + } + } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductTypeController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductTypeController.java index 3a6a706..0a42a12 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductTypeController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductTypeController.java @@ -114,7 +114,7 @@ public class ProductTypeController { ExcelUtils.exportExcelToTarget(response, null, list, ProductTypeExcel.class); } - @GetMapping("{id}") + @GetMapping("{statusId}") @ApiOperation("改变状态") @LogOperation("改变状态") public Result changeStatus(@PathVariable("id") Long id){ diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/UnitController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/UnitController.java index 21dc6bd..2de8587 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/UnitController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/UnitController.java @@ -113,7 +113,7 @@ public class UnitController { ExcelUtils.exportExcelToTarget(response, null, list, UnitExcel.class); } - @GetMapping("{id}") + @GetMapping("{statusId}") @ApiOperation("改变状态") @LogOperation("改变状态") public Result changeStatus(@PathVariable("id") Long id){ diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureController.java index 5e0f43b..cb2fc1b 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureController.java @@ -113,4 +113,13 @@ public class WorkingProcedureController { ExcelUtils.exportExcelToTarget(response, null, list, WorkingProcedureExcel.class); } + @GetMapping("{statusId}") + @ApiOperation("改变状态") + @LogOperation("改变状态") + public Result changeStatus(@PathVariable("id") Long id){ + workingProcedureService.changeStatus(id); + + return new Result(); + } + } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureTypeController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureTypeController.java index b213bb0..a4f0ac1 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureTypeController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureTypeController.java @@ -113,4 +113,13 @@ public class WorkingProcedureTypeController { ExcelUtils.exportExcelToTarget(response, null, list, WorkingProcedureTypeExcel.class); } + @GetMapping("{statusId}") + @ApiOperation("改变状态") + @LogOperation("改变状态") + public Result changeStatus(@PathVariable("id") Long id){ + workingProcedureTypeService.changeStatus(id); + + return new Result(); + } + } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductTypeMapper.xml b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductTypeMapper.xml deleted file mode 100644 index 1a9a449..0000000 --- a/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductTypeMapper.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - id, - `name`, - code, - descs, - `status`, - remark, - `valid`, - creator_id, - creator_name, - create_time, - updater_id, - updater_name, - update_time, - version - - - - - - - - - - - - - - - - - - - - - INSERT INTO product_type( - id, - name, - code, - descs, - status, - remark, - valid, - creator_id, - creator_name, - create_time, - updater_id, - updater_name, - update_time, - version - )VALUES - - ( - #{element.id}, - #{element.name}, - #{element.code}, - #{element.descs}, - #{element.status}, - #{element.remark}, - #{element.valid}, - #{element.creatorId}, - #{element.creatorName}, - #{element.createTime}, - #{element.updaterId}, - #{element.updaterName}, - #{element.updateTime}, - #{element.version} - ) - - - - diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureServiceImpl.java index e654eea..bdcce31 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureServiceImpl.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureServiceImpl.java @@ -65,7 +65,7 @@ public class WorkingProcedureServiceImpl extends CrudServiceImpl machineList = new ArrayList<>(); + ArrayList machineList = new ArrayList<>(); for(String machineId:machineIdList){ //QueryWrapper machineQueryWrapper = new QueryWrapper<>(); //machineQueryWrapper.eq(StringUtils.isNotBlank(machineId), "id", machineId); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/UnitMapper.xml b/ym-baisc/src/main/resources/UnitMapper.xml similarity index 100% rename from ym-baisc/src/main/java/com/cnbm/basic/mapper/UnitMapper.xml rename to ym-baisc/src/main/resources/UnitMapper.xml diff --git a/ym-influx/src/main/java/com/cnbm/influx/Main.java b/ym-influx/src/main/java/com/cnbm/influx/Main.java index 9b4f594..18df8d2 100644 --- a/ym-influx/src/main/java/com/cnbm/influx/Main.java +++ b/ym-influx/src/main/java/com/cnbm/influx/Main.java @@ -2,7 +2,6 @@ package com.cnbm.influx; import com.cnbm.influx.config.InfluxClient; import com.cnbm.influx.param.QueryDataParam; -import com.cnbm.influx.common.Utils; import com.cnbm.influx.param.PageInfo; import com.cnbm.influx.param.Range; import com.cnbm.influx.param.Tag;