This commit is contained in:
caixiang 2022-08-09 14:58:05 +08:00
commit 61dbaf92e1
65 changed files with 562 additions and 307 deletions

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;
@ -46,7 +47,11 @@ public class FactoryController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "type", value = "工厂类型", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:factory:page')") //@PreAuthorize("@ex.hasAuthority('code:factory:page')")
public Result<PageData<FactoryDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<FactoryDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -66,7 +71,7 @@ public class FactoryController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:factory:save')") //@PreAuthorize("@ex.hasAuthority('code:factory:save')")
public Result save(@RequestBody FactoryDTO dto){ public Result save(@RequestBody FactoryDTO dto){
//效验数据 //效验数据
@ -79,7 +84,7 @@ public class FactoryController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:factory:update')") //@PreAuthorize("@ex.hasAuthority('code:factory:update')")
public Result update(@RequestBody FactoryDTO dto){ public Result update(@RequestBody FactoryDTO dto){
//效验数据 //效验数据
@ -90,7 +95,7 @@ public class FactoryController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:factory:delete')") //@PreAuthorize("@ex.hasAuthority('code:factory:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -103,19 +108,19 @@ public class FactoryController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:factory:export')") //@PreAuthorize("@ex.hasAuthority('code:factory:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<FactoryDTO> list = factoryService.list(params); List<FactoryDTO> list = factoryService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, FactoryExcel.class); ExcelUtils.exportExcelToTarget(response, "Factory", list, FactoryExcel.class);
} }
@GetMapping("status") @PostMapping("status")
@ApiOperation("改变状态") @ApiOperation("改变状态")
@LogOperation("改变状态") //@LogOperation("改变状态")
public Result changeStatus(@PathVariable("id") Long id){ public Result changeStatus(@RequestBody IdParam id){
factoryService.changeStatus(id); factoryService.changeStatus(id.getId());
return new Result(); return new Result();
} }

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;
@ -46,7 +47,8 @@ public class MachineController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:machine:page')") //@PreAuthorize("@ex.hasAuthority('code:machine:page')")
public Result<PageData<MachineDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<MachineDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -55,6 +57,24 @@ public class MachineController {
return new Result<PageData<MachineDTO>>().ok(page); return new Result<PageData<MachineDTO>>().ok(page);
} }
/*
@GetMapping("page2")
@ApiOperation("分页2")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
})
//@PreAuthorize("@ex.hasAuthority('code:machine:page')")
public Result<PageData<MachineDTO>> page2(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<MachineDTO> page = machineService.page1(params);
return new Result<PageData<MachineDTO>>().ok(page);
}
*/
@GetMapping("{id}") @GetMapping("{id}")
@ApiOperation("信息") @ApiOperation("信息")
//@PreAuthorize("@ex.hasAuthority('code:machine:info')") //@PreAuthorize("@ex.hasAuthority('code:machine:info')")
@ -66,7 +86,7 @@ public class MachineController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:machine:save')") //@PreAuthorize("@ex.hasAuthority('code:machine:save')")
public Result save(@RequestBody MachineDTO dto){ public Result save(@RequestBody MachineDTO dto){
//效验数据 //效验数据
@ -79,7 +99,7 @@ public class MachineController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:machine:update')") //@PreAuthorize("@ex.hasAuthority('code:machine:update')")
public Result update(@RequestBody MachineDTO dto){ public Result update(@RequestBody MachineDTO dto){
//效验数据 //效验数据
@ -92,7 +112,7 @@ public class MachineController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:machine:delete')") //@PreAuthorize("@ex.hasAuthority('code:machine:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -105,19 +125,19 @@ public class MachineController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:machine:export')") //@PreAuthorize("@ex.hasAuthority('code:machine:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<MachineDTO> list = machineService.list(params); List<MachineDTO> list = machineService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, MachineExcel.class); ExcelUtils.exportExcelToTarget(response, "Machine", list, MachineExcel.class);
} }
@GetMapping("status") @PostMapping("status")
@ApiOperation("改变状态") @ApiOperation("改变状态")
@LogOperation("改变状态") //@LogOperation("改变状态")
public Result changeStatus(@PathVariable("id") Long id){ public Result changeStatus(@RequestBody IdParam id){
machineService.changeStatus(id); machineService.changeStatus(id.getId());
return new Result().ok(true); 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;
@ -46,7 +47,10 @@ public class MeasureToolController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:measureTool:page')") //@PreAuthorize("@ex.hasAuthority('code:measureTool:page')")
public Result<PageData<MeasureToolDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<MeasureToolDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -66,7 +70,7 @@ public class MeasureToolController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:measureTool:save')") //@PreAuthorize("@ex.hasAuthority('code:measureTool:save')")
public Result save(@RequestBody MeasureToolDTO dto){ public Result save(@RequestBody MeasureToolDTO dto){
//效验数据 //效验数据
@ -79,7 +83,7 @@ public class MeasureToolController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:measureTool:update')") //@PreAuthorize("@ex.hasAuthority('code:measureTool:update')")
public Result update(@RequestBody MeasureToolDTO dto){ public Result update(@RequestBody MeasureToolDTO dto){
//效验数据 //效验数据
@ -92,7 +96,7 @@ public class MeasureToolController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:measureTool:delete')") //@PreAuthorize("@ex.hasAuthority('code:measureTool:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -105,7 +109,7 @@ public class MeasureToolController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:measureTool:export')") //@PreAuthorize("@ex.hasAuthority('code:measureTool:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<MeasureToolDTO> list = measureToolService.list(params); List<MeasureToolDTO> list = measureToolService.list(params);
@ -113,11 +117,11 @@ public class MeasureToolController {
ExcelUtils.exportExcelToTarget(response, null, list, MeasureToolExcel.class); ExcelUtils.exportExcelToTarget(response, null, list, MeasureToolExcel.class);
} }
@GetMapping("status") @PostMapping("status")
@ApiOperation("改变状态") @ApiOperation("改变状态")
@LogOperation("改变状态") //@LogOperation("改变状态")
public Result changeStatus(@PathVariable("id") Long id){ public Result changeStatus(@RequestBody IdParam id){
measureToolService.changeStatus(id); measureToolService.changeStatus(id.getId());
return new Result(); return new Result();
} }

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;
@ -46,7 +47,8 @@ public class PlatformController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:platform:page')") //@PreAuthorize("@ex.hasAuthority('code:platform:page')")
public Result<PageData<PlatformDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<PlatformDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -66,7 +68,7 @@ public class PlatformController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:platform:save')") //@PreAuthorize("@ex.hasAuthority('code:platform:save')")
public Result save(@RequestBody PlatformDTO dto){ public Result save(@RequestBody PlatformDTO dto){
//效验数据 //效验数据
@ -79,7 +81,7 @@ public class PlatformController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:platform:update')") //@PreAuthorize("@ex.hasAuthority('code:platform:update')")
public Result update(@RequestBody PlatformDTO dto){ public Result update(@RequestBody PlatformDTO dto){
//效验数据 //效验数据
@ -92,7 +94,7 @@ public class PlatformController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:platform:delete')") //@PreAuthorize("@ex.hasAuthority('code:platform:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -105,19 +107,19 @@ public class PlatformController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:platform:export')") //@PreAuthorize("@ex.hasAuthority('code:platform:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PlatformDTO> list = platformService.list(params); List<PlatformDTO> list = platformService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, PlatformExcel.class); ExcelUtils.exportExcelToTarget(response, "Platform", list, PlatformExcel.class);
} }
@GetMapping("status") @PostMapping("status")
@ApiOperation("改变状态") @ApiOperation("改变状态")
@LogOperation("改变状态") //@LogOperation("改变状态")
public Result changeStatus(@PathVariable("id") Long id){ public Result changeStatus(@RequestBody IdParam id){
platformService.changeStatus(id); platformService.changeStatus(id.getId());
return new Result(); return new Result();
} }

View File

@ -47,7 +47,12 @@ public class ProductController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "product_type_id", value = "产品类型id", paramType = "query", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "inspection_stage", value = "检验阶段1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验", paramType = "query", dataTypeClass = String.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:product:page')") //@PreAuthorize("@ex.hasAuthority('code:product:page')")
public Result<PageData<ProductDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<ProductDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -67,7 +72,7 @@ public class ProductController {
@PostMapping("save") @PostMapping("save")
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:product:save')") //@PreAuthorize("@ex.hasAuthority('code:product:save')")
public Result save(@RequestBody ProductDTO dto){ public Result save(@RequestBody ProductDTO dto){
//效验数据 //效验数据
@ -80,7 +85,7 @@ public class ProductController {
@PutMapping("update") @PutMapping("update")
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:product:update')") //@PreAuthorize("@ex.hasAuthority('code:product:update')")
public Result update(@RequestBody ProductDTO dto){ public Result update(@RequestBody ProductDTO dto){
//效验数据 //效验数据
@ -93,7 +98,7 @@ public class ProductController {
@DeleteMapping("delete") @DeleteMapping("delete")
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:product:delete')") //@PreAuthorize("@ex.hasAuthority('code:product:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -106,7 +111,7 @@ public class ProductController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:product:export')") //@PreAuthorize("@ex.hasAuthority('code:product:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ProductDTO> list = productService.list(params); List<ProductDTO> list = productService.list(params);
@ -116,7 +121,7 @@ public class ProductController {
@PostMapping("status") @PostMapping("status")
@ApiOperation("改变状态") @ApiOperation("改变状态")
@LogOperation("改变状态") //@LogOperation("改变状态")
public Result changeStatus(@RequestBody IdParam id){ public Result changeStatus(@RequestBody IdParam id){
productService.changeStatus(id.getId()); productService.changeStatus(id.getId());

View File

@ -46,7 +46,8 @@ public class ProductFactoryRelationController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:page')") //@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:page')")
public Result<PageData<ProductFactoryRelationDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<ProductFactoryRelationDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -66,7 +67,7 @@ public class ProductFactoryRelationController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:save')") //@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:save')")
public Result save(@RequestBody ProductFactoryRelationDTO dto){ public Result save(@RequestBody ProductFactoryRelationDTO dto){
//效验数据 //效验数据
@ -79,7 +80,7 @@ public class ProductFactoryRelationController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:update')") //@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:update')")
public Result update(@RequestBody ProductFactoryRelationDTO dto){ public Result update(@RequestBody ProductFactoryRelationDTO dto){
//效验数据 //效验数据
@ -92,7 +93,7 @@ public class ProductFactoryRelationController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:delete')") //@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -105,7 +106,7 @@ public class ProductFactoryRelationController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:export')") //@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ProductFactoryRelationDTO> list = productFactoryRelationService.list(params); List<ProductFactoryRelationDTO> list = productFactoryRelationService.list(params);

View File

@ -46,7 +46,8 @@ public class ProductFeaturesController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:productFeatures:page')") //@PreAuthorize("@ex.hasAuthority('code:productFeatures:page')")
public Result<PageData<ProductFeaturesDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<ProductFeaturesDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -66,7 +67,7 @@ public class ProductFeaturesController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:productFeatures:save')") //@PreAuthorize("@ex.hasAuthority('code:productFeatures:save')")
public Result save(@RequestBody ProductFeaturesDTO dto){ public Result save(@RequestBody ProductFeaturesDTO dto){
//效验数据 //效验数据
@ -79,7 +80,7 @@ public class ProductFeaturesController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:productFeatures:update')") //@PreAuthorize("@ex.hasAuthority('code:productFeatures:update')")
public Result update(@RequestBody ProductFeaturesDTO dto){ public Result update(@RequestBody ProductFeaturesDTO dto){
//效验数据 //效验数据
@ -92,7 +93,7 @@ public class ProductFeaturesController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:productFeatures:delete')") //@PreAuthorize("@ex.hasAuthority('code:productFeatures:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -105,7 +106,7 @@ public class ProductFeaturesController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:productFeatures:export')") //@PreAuthorize("@ex.hasAuthority('code:productFeatures:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ProductFeaturesDTO> list = productFeaturesService.list(params); List<ProductFeaturesDTO> list = productFeaturesService.list(params);

View File

@ -46,7 +46,8 @@ public class ProductFeaturesHisController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:page')") //@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:page')")
public Result<PageData<ProductFeaturesHisDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<ProductFeaturesHisDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -66,7 +67,7 @@ public class ProductFeaturesHisController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:save')") //@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:save')")
public Result save(@RequestBody ProductFeaturesHisDTO dto){ public Result save(@RequestBody ProductFeaturesHisDTO dto){
//效验数据 //效验数据
@ -79,7 +80,7 @@ public class ProductFeaturesHisController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:update')") //@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:update')")
public Result update(@RequestBody ProductFeaturesHisDTO dto){ public Result update(@RequestBody ProductFeaturesHisDTO dto){
//效验数据 //效验数据
@ -92,7 +93,7 @@ public class ProductFeaturesHisController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:delete')") //@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -105,7 +106,7 @@ public class ProductFeaturesHisController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:export')") //@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ProductFeaturesHisDTO> list = productFeaturesHisService.list(params); List<ProductFeaturesHisDTO> list = productFeaturesHisService.list(params);

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;
@ -47,7 +48,10 @@ public class ProductTypeController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
}) })
// @PreAuthorize("@ex.hasAuthority('code:productType:page')") // @PreAuthorize("@ex.hasAuthority('code:productType:page')")
public Result<PageData<ProductTypeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<ProductTypeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -67,7 +71,7 @@ public class ProductTypeController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
// @PreAuthorize("@ex.hasAuthority('code:productType:save')") // @PreAuthorize("@ex.hasAuthority('code:productType:save')")
public Result save(@RequestBody ProductTypeDTO dto){ public Result save(@RequestBody ProductTypeDTO dto){
//效验数据 //效验数据
@ -80,7 +84,7 @@ public class ProductTypeController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
// @PreAuthorize("@ex.hasAuthority('code:productType:update')") // @PreAuthorize("@ex.hasAuthority('code:productType:update')")
public Result update(@RequestBody ProductTypeDTO dto){ public Result update(@RequestBody ProductTypeDTO dto){
//效验数据 //效验数据
@ -93,7 +97,7 @@ public class ProductTypeController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
// @PreAuthorize("@ex.hasAuthority('code:productType:delete')") // @PreAuthorize("@ex.hasAuthority('code:productType:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -106,7 +110,7 @@ public class ProductTypeController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
// @PreAuthorize("@ex.hasAuthority('code:productType:export')") // @PreAuthorize("@ex.hasAuthority('code:productType:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ProductTypeDTO> list = productTypeService.list(params); List<ProductTypeDTO> list = productTypeService.list(params);
@ -114,11 +118,11 @@ public class ProductTypeController {
ExcelUtils.exportExcelToTarget(response, null, list, ProductTypeExcel.class); ExcelUtils.exportExcelToTarget(response, null, list, ProductTypeExcel.class);
} }
@GetMapping("status") @PostMapping("status")
@ApiOperation("改变状态") @ApiOperation("改变状态")
@LogOperation("改变状态") //@LogOperation("改变状态")
public Result changeStatus(@PathVariable("id") Long id){ public Result changeStatus(@RequestBody IdParam id){
productTypeService.changeStatus(id); productTypeService.changeStatus(id.getId());
return new Result(); return new Result();
} }

View File

@ -1,7 +1,5 @@
package com.cnbm.basic.controller; package com.cnbm.basic.controller;
import com.cnbm.admin.annotation.LogOperation;
import com.cnbm.basic.dto.WorkingProcedureDTO;
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;
@ -47,7 +45,8 @@ public class ProductWorkingprocedureRelationController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:page')") //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:page')")
public Result<PageData<ProductWorkingprocedureRelationDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<ProductWorkingprocedureRelationDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -67,7 +66,7 @@ public class ProductWorkingprocedureRelationController {
@PostMapping("save") @PostMapping("save")
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:save')") //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:save')")
public Result save(@RequestBody ProductWorkingprocedureRelationDTO dto){ public Result save(@RequestBody ProductWorkingprocedureRelationDTO dto){
//效验数据 //效验数据
@ -80,7 +79,7 @@ public class ProductWorkingprocedureRelationController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:update')") //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:update')")
public Result update(@RequestBody ProductWorkingprocedureRelationDTO dto){ public Result update(@RequestBody ProductWorkingprocedureRelationDTO dto){
//效验数据 //效验数据
@ -93,7 +92,7 @@ public class ProductWorkingprocedureRelationController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:delete')") //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -106,7 +105,7 @@ public class ProductWorkingprocedureRelationController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:export')") //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ProductWorkingprocedureRelationDTO> list = productWorkingprocedureRelationService.list(params); List<ProductWorkingprocedureRelationDTO> list = productWorkingprocedureRelationService.list(params);
@ -114,9 +113,9 @@ public class ProductWorkingprocedureRelationController {
ExcelUtils.exportExcelToTarget(response, null, list, ProductWorkingprocedureRelationExcel.class); ExcelUtils.exportExcelToTarget(response, null, list, ProductWorkingprocedureRelationExcel.class);
} }
@GetMapping("{productId}") @GetMapping("getWorkingprocedureByProductId/{productId}")
@ApiOperation("查询所有工序 依据产品id") @ApiOperation("查询所有工序 依据产品id")
@LogOperation("查询所有工序 依据产品id") //@LogOperation("查询所有工序 依据产品id")
public Result<List<ProductWorkingprocedureRelationDTO>> getWorkingprocedureByProductId(@PathVariable("productId") Long productId){ public Result<List<ProductWorkingprocedureRelationDTO>> getWorkingprocedureByProductId(@PathVariable("productId") Long productId){
List<ProductWorkingprocedureRelationDTO> list = productWorkingprocedureRelationService.getWorkingprocedureByProductId(productId); List<ProductWorkingprocedureRelationDTO> list = productWorkingprocedureRelationService.getWorkingprocedureByProductId(productId);
return new Result<List<ProductWorkingprocedureRelationDTO>>().ok(list); return new Result<List<ProductWorkingprocedureRelationDTO>>().ok(list);
@ -124,7 +123,7 @@ public class ProductWorkingprocedureRelationController {
@PostMapping("batchInsertWorkingprocedure") @PostMapping("batchInsertWorkingprocedure")
@ApiOperation("添加工序流程") @ApiOperation("添加工序流程")
@LogOperation("添加工序流程") //@LogOperation("添加工序流程")
//@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:batchInsertWorkingprocedure')") //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:batchInsertWorkingprocedure')")
public Result batchInsertWorkingprocedure(@RequestBody ProductWorkingprocedureRelationDTO[] lists){ public Result batchInsertWorkingprocedure(@RequestBody ProductWorkingprocedureRelationDTO[] lists){

View File

@ -46,7 +46,8 @@ public class ShiftController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:shift:page')") //@PreAuthorize("@ex.hasAuthority('code:shift:page')")
public Result<PageData<ShiftDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<ShiftDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -66,7 +67,7 @@ public class ShiftController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:shift:save')") //@PreAuthorize("@ex.hasAuthority('code:shift:save')")
public Result save(@RequestBody ShiftDTO dto){ public Result save(@RequestBody ShiftDTO dto){
//效验数据 //效验数据
@ -79,7 +80,7 @@ public class ShiftController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:shift:update')") //@PreAuthorize("@ex.hasAuthority('code:shift:update')")
public Result update(@RequestBody ShiftDTO dto){ public Result update(@RequestBody ShiftDTO dto){
//效验数据 //效验数据
@ -92,7 +93,7 @@ public class ShiftController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:shift:delete')") //@PreAuthorize("@ex.hasAuthority('code:shift:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -105,7 +106,7 @@ public class ShiftController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:shift:export')") //@PreAuthorize("@ex.hasAuthority('code:shift:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<ShiftDTO> list = shiftService.list(params); List<ShiftDTO> list = shiftService.list(params);

View File

@ -46,7 +46,8 @@ public class TeamController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:team:page')") //@PreAuthorize("@ex.hasAuthority('code:team:page')")
public Result<PageData<TeamDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<TeamDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -66,7 +67,7 @@ public class TeamController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:team:save')") //@PreAuthorize("@ex.hasAuthority('code:team:save')")
public Result save(@RequestBody TeamDTO dto){ public Result save(@RequestBody TeamDTO dto){
//效验数据 //效验数据
@ -79,7 +80,7 @@ public class TeamController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:team:update')") //@PreAuthorize("@ex.hasAuthority('code:team:update')")
public Result update(@RequestBody TeamDTO dto){ public Result update(@RequestBody TeamDTO dto){
//效验数据 //效验数据
@ -92,7 +93,7 @@ public class TeamController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:team:delete')") //@PreAuthorize("@ex.hasAuthority('code:team:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -105,7 +106,7 @@ public class TeamController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:team:export')") //@PreAuthorize("@ex.hasAuthority('code:team:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<TeamDTO> list = teamService.list(params); List<TeamDTO> list = teamService.list(params);

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;
@ -46,7 +47,8 @@ public class UnitController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:unit:page')") //@PreAuthorize("@ex.hasAuthority('code:unit:page')")
public Result<PageData<UnitDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<UnitDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -66,7 +68,7 @@ public class UnitController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:unit:save')") //@PreAuthorize("@ex.hasAuthority('code:unit:save')")
public Result save(@RequestBody UnitDTO dto){ public Result save(@RequestBody UnitDTO dto){
//效验数据 //效验数据
@ -79,7 +81,7 @@ public class UnitController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:unit:update')") //@PreAuthorize("@ex.hasAuthority('code:unit:update')")
public Result update(@RequestBody UnitDTO dto){ public Result update(@RequestBody UnitDTO dto){
//效验数据 //效验数据
@ -92,7 +94,7 @@ public class UnitController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:unit:delete')") //@PreAuthorize("@ex.hasAuthority('code:unit:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -105,19 +107,19 @@ public class UnitController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:unit:export')") //@PreAuthorize("@ex.hasAuthority('code:unit:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<UnitDTO> list = unitService.list(params); List<UnitDTO> list = unitService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, UnitExcel.class); ExcelUtils.exportExcelToTarget(response, "Unit", list, UnitExcel.class);
} }
@GetMapping("status") @PostMapping("status")
@ApiOperation("改变状态") @ApiOperation("改变状态")
@LogOperation("改变状态") //@LogOperation("改变状态")
public Result changeStatus(@PathVariable("id") Long id){ public Result changeStatus(@RequestBody IdParam id){
unitService.changeStatus(id); unitService.changeStatus(id.getId());
return new Result(); return new Result();
} }

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;
@ -46,7 +47,10 @@ public class WorkingProcedureController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:workingProcedure:page')") //@PreAuthorize("@ex.hasAuthority('code:workingProcedure:page')")
public Result<PageData<WorkingProcedureDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<WorkingProcedureDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -66,7 +70,7 @@ public class WorkingProcedureController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:workingProcedure:save')") //@PreAuthorize("@ex.hasAuthority('code:workingProcedure:save')")
public Result save(@RequestBody WorkingProcedureDTO dto){ public Result save(@RequestBody WorkingProcedureDTO dto){
//效验数据 //效验数据
@ -79,7 +83,7 @@ public class WorkingProcedureController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:workingProcedure:update')") //@PreAuthorize("@ex.hasAuthority('code:workingProcedure:update')")
public Result update(@RequestBody WorkingProcedureDTO dto){ public Result update(@RequestBody WorkingProcedureDTO dto){
//效验数据 //效验数据
@ -92,7 +96,7 @@ public class WorkingProcedureController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:workingProcedure:delete')") //@PreAuthorize("@ex.hasAuthority('code:workingProcedure:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -105,7 +109,7 @@ public class WorkingProcedureController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:workingProcedure:export')") //@PreAuthorize("@ex.hasAuthority('code:workingProcedure:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WorkingProcedureDTO> list = workingProcedureService.list(params); List<WorkingProcedureDTO> list = workingProcedureService.list(params);
@ -113,18 +117,18 @@ public class WorkingProcedureController {
ExcelUtils.exportExcelToTarget(response, null, list, WorkingProcedureExcel.class); ExcelUtils.exportExcelToTarget(response, null, list, WorkingProcedureExcel.class);
} }
@GetMapping("status") @PostMapping("status")
@ApiOperation("改变状态") @ApiOperation("改变状态")
@LogOperation("改变状态") //@LogOperation("改变状态")
public Result changeStatus(@PathVariable("id") Long id){ public Result changeStatus(@RequestBody IdParam id){
workingProcedureService.changeStatus(id); workingProcedureService.changeStatus(id.getId());
return new Result(); return new Result();
} }
@GetMapping("getWorkingprocedureByProductId") @GetMapping("getWorkingprocedureByProductId/{productId}")
@ApiOperation("查询所有工序 依据产品id") @ApiOperation("查询所有工序 依据产品id")
@LogOperation("查询所有工序 依据产品id") //@LogOperation("查询所有工序 依据产品id")
public Result<List<WorkingProcedureDTO>> getWorkingprocedureByProductId(@PathVariable("productId") Long productId){ public Result<List<WorkingProcedureDTO>> getWorkingprocedureByProductId(@PathVariable("productId") Long productId){
List<WorkingProcedureDTO> list = workingProcedureService.getWorkingProcedureByProductId(productId); List<WorkingProcedureDTO> list = workingProcedureService.getWorkingProcedureByProductId(productId);
return new Result<List<WorkingProcedureDTO>>().ok(list); return new Result<List<WorkingProcedureDTO>>().ok(list);

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;
@ -46,7 +47,8 @@ public class WorkingProcedureTypeController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class) @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
}) })
//@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:page')") //@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:page')")
public Result<PageData<WorkingProcedureTypeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<WorkingProcedureTypeDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
@ -66,7 +68,7 @@ public class WorkingProcedureTypeController {
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") //@LogOperation("保存")
//@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:save')") //@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:save')")
public Result save(@RequestBody WorkingProcedureTypeDTO dto){ public Result save(@RequestBody WorkingProcedureTypeDTO dto){
//效验数据 //效验数据
@ -79,7 +81,7 @@ public class WorkingProcedureTypeController {
@PutMapping @PutMapping
@ApiOperation("修改") @ApiOperation("修改")
@LogOperation("修改") //@LogOperation("修改")
//@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:update')") //@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:update')")
public Result update(@RequestBody WorkingProcedureTypeDTO dto){ public Result update(@RequestBody WorkingProcedureTypeDTO dto){
//效验数据 //效验数据
@ -92,7 +94,7 @@ public class WorkingProcedureTypeController {
@DeleteMapping @DeleteMapping
@ApiOperation("删除") @ApiOperation("删除")
@LogOperation("删除") //@LogOperation("删除")
//@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:delete')") //@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:delete')")
public Result delete(@RequestBody Long[] ids){ public Result delete(@RequestBody Long[] ids){
//效验数据 //效验数据
@ -105,19 +107,19 @@ public class WorkingProcedureTypeController {
@GetMapping("export") @GetMapping("export")
@ApiOperation("导出") @ApiOperation("导出")
@LogOperation("导出") //@LogOperation("导出")
//@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:export')") //@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WorkingProcedureTypeDTO> list = workingProcedureTypeService.list(params); List<WorkingProcedureTypeDTO> list = workingProcedureTypeService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, WorkingProcedureTypeExcel.class); ExcelUtils.exportExcelToTarget(response, "WorkingProcedureType", list, WorkingProcedureTypeExcel.class);
} }
@GetMapping("status") @PostMapping("status")
@ApiOperation("改变状态") @ApiOperation("改变状态")
@LogOperation("改变状态") //@LogOperation("改变状态")
public Result changeStatus(@PathVariable("id") Long id){ public Result changeStatus(@RequestBody IdParam id){
workingProcedureTypeService.changeStatus(id); workingProcedureTypeService.changeStatus(id.getId());
return new Result(); return new Result();
} }

View File

@ -31,7 +31,7 @@ public class PlatformDTO implements Serializable {
private String code; private String code;
@ApiModelProperty(value = "站台分组") @ApiModelProperty(value = "站台分组")
private String group; private String platformGroup;
@ApiModelProperty(value = "1 可用0 不可用") @ApiModelProperty(value = "1 可用0 不可用")
private Integer status; private Integer status;

View File

@ -15,7 +15,7 @@ import java.time.LocalDateTime;
* @since 2022-07-15 * @since 2022-07-15
*/ */
@Data @Data
@ApiModel(value = "工序 表DTO对象") @ApiModel(value = "产品-工序 关系表DTO对象")
public class ProductWorkingprocedureRelationDTO implements Serializable { public class ProductWorkingprocedureRelationDTO implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -34,7 +34,7 @@ public class ProductWorkingprocedureRelationDTO implements Serializable {
private String workingProcedureName; private String workingProcedureName;
@ApiModelProperty(value = "顺序,工序是有先后顺序的。") @ApiModelProperty(value = "顺序,工序是有先后顺序的。")
private Integer order; private Integer sequence;
@ApiModelProperty(value = "1 可用0 不可用") @ApiModelProperty(value = "1 可用0 不可用")
private Integer status; private Integer status;

View File

@ -38,7 +38,7 @@ public class WorkingProcedureDTO implements Serializable {
@ApiModelProperty(value = "机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") @ApiModelProperty(value = "机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"")
private String machineId; private String machineId;
@ApiModelProperty(value = "机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") @ApiModelProperty(value = "机台id对应名称")
private String machineName; private String machineName;
@ApiModelProperty(value = "1 可用0 不可用") @ApiModelProperty(value = "1 可用0 不可用")

View File

@ -30,7 +30,7 @@ public class Platform implements Serializable {
private String code; private String code;
@ApiModelProperty("站台分组") @ApiModelProperty("站台分组")
private String group; private String platformGroup;
@ApiModelProperty("1 可用0 不可用") @ApiModelProperty("1 可用0 不可用")
private Integer status; private Integer status;

View File

@ -18,7 +18,7 @@ import lombok.Data;
*/ */
@Data @Data
@TableName("product_workingprocedure_relation") @TableName("product_workingprocedure_relation")
@ApiModel(value = "ProductWorkingprocedureRelation对象", description = "工序 表") @ApiModel(value = "ProductWorkingprocedureRelation对象", description = "产品-工序 关系")
public class ProductWorkingprocedureRelation implements Serializable { public class ProductWorkingprocedureRelation implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -33,7 +33,7 @@ public class ProductWorkingprocedureRelation implements Serializable {
private Long workingProcedureId; private Long workingProcedureId;
@ApiModelProperty("顺序,工序是有先后顺序的。") @ApiModelProperty("顺序,工序是有先后顺序的。")
private Integer order; private Integer sequence;
@ApiModelProperty("1 可用0 不可用") @ApiModelProperty("1 可用0 不可用")
private Integer status; private Integer status;

View File

@ -15,37 +15,37 @@ import java.util.Date;
*/ */
@Data @Data
public class FactoryExcel { public class FactoryExcel {
@Excel(name = "ID") // @Excel(name = "ID")
private Long id; // private Long id;
@Excel(name = "工厂 ") @Excel(name = "工厂")
private String name; private String name;
@Excel(name = "工厂 编码") @Excel(name = "工厂编码")
private String code; private String code;
@Excel(name = "工厂 描述") @Excel(name = "描述")
private String descs; private String descs;
@Excel(name = "工厂 联系地址") @Excel(name = "联系地址")
private String address; private String address;
@Excel(name = "工厂类型1-内部工厂2-供应商") @Excel(name = "工厂类型")
private String type; private String type;
@Excel(name = "1 可用0 不可用") // @Excel(name = "1 可用0 不可用")
private Integer status; // private Integer status;
@Excel(name = "备注") // @Excel(name = "备注")
private String remark; // private String remark;
@Excel(name = "删除标志,是否有效:1 可用 0不可用") // @Excel(name = "删除标志,是否有效:1 可用 0不可用")
private Integer valid; // private Integer valid;
@Excel(name = "创建人") // @Excel(name = "创建人")
private Long creatorId; // private Long creatorId;
@Excel(name = "创建人姓名") // @Excel(name = "创建人姓名")
private String creatorName; // private String creatorName;
@Excel(name = "创建时间") // @Excel(name = "创建时间")
private LocalDateTime createTime; // private LocalDateTime createTime;
@Excel(name = "更新人") // @Excel(name = "更新人")
private Long updaterId; // private Long updaterId;
@Excel(name = "更新人姓名") // @Excel(name = "更新人姓名")
private String updaterName; // private String updaterName;
@Excel(name = "更新时间") // @Excel(name = "更新时间")
private LocalDateTime updateTime; // private LocalDateTime updateTime;
@Excel(name = "版本号") // @Excel(name = "版本号")
private Integer version; // private Integer version;
} }

View File

@ -13,33 +13,35 @@ import java.time.LocalDateTime;
*/ */
@Data @Data
public class MachineExcel { public class MachineExcel {
@Excel(name = "ID") // @Excel(name = "ID")
private Long id; // private Long id;
@Excel(name = "机台名") @Excel(name = "机台名")
private String name; private String name;
@Excel(name = "机台编码") @Excel(name = "机台编码")
private String code; private String code;
@Excel(name = "机台id关联platform id") // @Excel(name = "机台id关联platform id")
private Long platformId; // private Long platformId;
@Excel(name = "1 可用0 不可用") @Excel(name = "站点")
private Integer status; private String platformName;
// @Excel(name = "1 可用0 不可用")
// private Integer status;
@Excel(name = "备注") @Excel(name = "备注")
private String remark; private String remark;
@Excel(name = "删除标志,是否有效:1 可用 0不可用") // @Excel(name = "删除标志,是否有效:1 可用 0不可用")
private Integer valid; // private Integer valid;
@Excel(name = "创建人") // @Excel(name = "创建人")
private Long creatorId; // private Long creatorId;
@Excel(name = "创建人姓名") // @Excel(name = "创建人姓名")
private String creatorName; // private String creatorName;
@Excel(name = "创建时间") // @Excel(name = "创建时间")
private LocalDateTime createTime; // private LocalDateTime createTime;
@Excel(name = "更新人") // @Excel(name = "更新人")
private Long updaterId; // private Long updaterId;
@Excel(name = "更新人姓名") // @Excel(name = "更新人姓名")
private String updaterName; // private String updaterName;
@Excel(name = "更新时间") // @Excel(name = "更新时间")
private LocalDateTime updateTime; // private LocalDateTime updateTime;
@Excel(name = "版本号") // @Excel(name = "版本号")
private Integer version; // private Integer version;
} }

View File

@ -13,33 +13,33 @@ import java.time.LocalDateTime;
*/ */
@Data @Data
public class PlatformExcel { public class PlatformExcel {
@Excel(name = "ID") // @Excel(name = "ID")
private Long id; // private Long id;
@Excel(name = "站台名") @Excel(name = "站台名")
private String name; private String name;
@Excel(name = "站台编码") @Excel(name = "站台编码")
private String code; private String code;
@Excel(name = "站台分组") @Excel(name = "站台分组")
private String group; private String platformGroup;
@Excel(name = "1 可用0 不可用") // @Excel(name = "1 可用0 不可用")
private Integer status; // private Integer status;
@Excel(name = "备注") // @Excel(name = "备注")
private String remark; // private String remark;
@Excel(name = "删除标志,是否有效:1 可用 0不可用") // @Excel(name = "删除标志,是否有效:1 可用 0不可用")
private Integer valid; // private Integer valid;
@Excel(name = "创建人") // @Excel(name = "创建人")
private Long creatorId; // private Long creatorId;
@Excel(name = "创建人姓名") // @Excel(name = "创建人姓名")
private String creatorName; // private String creatorName;
@Excel(name = "创建时间") // @Excel(name = "创建时间")
private LocalDateTime createTime; // private LocalDateTime createTime;
@Excel(name = "更新人") // @Excel(name = "更新人")
private Long updaterId; // private Long updaterId;
@Excel(name = "更新人姓名") // @Excel(name = "更新人姓名")
private String updaterName; // private String updaterName;
@Excel(name = "更新时间") // @Excel(name = "更新时间")
private LocalDateTime updateTime; // private LocalDateTime updateTime;
@Excel(name = "版本号") // @Excel(name = "版本号")
private Integer version; // private Integer version;
} }

View File

@ -20,7 +20,7 @@ public class ProductWorkingprocedureRelationExcel {
@Excel(name = "工序id,关联 working_procedure 表") @Excel(name = "工序id,关联 working_procedure 表")
private Long workingProcedureId; private Long workingProcedureId;
@Excel(name = "顺序,工序是有先后顺序的。") @Excel(name = "顺序,工序是有先后顺序的。")
private Integer order; private Integer sequence;
@Excel(name = "1 可用0 不可用") @Excel(name = "1 可用0 不可用")
private Integer status; private Integer status;
@Excel(name = "备注") @Excel(name = "备注")

View File

@ -13,33 +13,33 @@ import java.time.LocalDateTime;
*/ */
@Data @Data
public class UnitExcel { public class UnitExcel {
@Excel(name = "ID") // @Excel(name = "ID")
private Long id; // private Long id;
@Excel(name = "单位 名") @Excel(name = "单位 名")
private String name; private String name;
@Excel(name = "单位 编码") @Excel(name = "单位 编码")
private String code; private String code;
@Excel(name = "单位类型1 可计数2 不可计数") // @Excel(name = "单位类型1 可计数2 不可计数")
private Integer type; // private Integer type;
@Excel(name = "1 可用0 不可用") // @Excel(name = "1 可用0 不可用")
private Integer status; // private Integer status;
@Excel(name = "备注") // @Excel(name = "备注")
private String remark; // private String remark;
@Excel(name = "删除标志,是否有效:1 可用 0不可用") // @Excel(name = "删除标志,是否有效:1 可用 0不可用")
private Integer valid; // private Integer valid;
@Excel(name = "创建人") // @Excel(name = "创建人")
private Long creatorId; // private Long creatorId;
@Excel(name = "创建人姓名") // @Excel(name = "创建人姓名")
private String creatorName; // private String creatorName;
@Excel(name = "创建时间") // @Excel(name = "创建时间")
private LocalDateTime createTime; // private LocalDateTime createTime;
@Excel(name = "更新人") // @Excel(name = "更新人")
private Long updaterId; // private Long updaterId;
@Excel(name = "更新人姓名") // @Excel(name = "更新人姓名")
private String updaterName; // private String updaterName;
@Excel(name = "更新时间") // @Excel(name = "更新时间")
private LocalDateTime updateTime; // private LocalDateTime updateTime;
@Excel(name = "版本号") // @Excel(name = "版本号")
private Integer version; // private Integer version;
} }

View File

@ -13,31 +13,31 @@ import java.time.LocalDateTime;
*/ */
@Data @Data
public class WorkingProcedureTypeExcel { public class WorkingProcedureTypeExcel {
@Excel(name = "ID") // @Excel(name = "ID")
private Long id; // private Long id;
@Excel(name = "工序类型 名") @Excel(name = "工序类型 名")
private String name; private String name;
@Excel(name = "工序类型 编码") @Excel(name = "工序类型 编码")
private String code; private String code;
@Excel(name = "1 可用0 不可用") // @Excel(name = "1 可用0 不可用")
private Integer status; // private Integer status;
@Excel(name = "备注") // @Excel(name = "备注")
private String remark; // private String remark;
@Excel(name = "删除标志,是否有效:1 可用 0不可用") // @Excel(name = "删除标志,是否有效:1 可用 0不可用")
private Integer valid; // private Integer valid;
@Excel(name = "创建人") // @Excel(name = "创建人")
private Long creatorId; // private Long creatorId;
@Excel(name = "创建人姓名") // @Excel(name = "创建人姓名")
private String creatorName; // private String creatorName;
@Excel(name = "创建时间") // @Excel(name = "创建时间")
private LocalDateTime createTime; // private LocalDateTime createTime;
@Excel(name = "更新人") // @Excel(name = "更新人")
private Long updaterId; // private Long updaterId;
@Excel(name = "更新人姓名") // @Excel(name = "更新人姓名")
private String updaterName; // private String updaterName;
@Excel(name = "更新时间") // @Excel(name = "更新时间")
private LocalDateTime updateTime; // private LocalDateTime updateTime;
@Excel(name = "版本号") // @Excel(name = "版本号")
private Integer version; // private Integer version;
} }

View File

@ -1,9 +1,12 @@
package com.cnbm.basic.mapper; package com.cnbm.basic.mapper;
import com.cnbm.basic.dto.FactoryDTO;
import com.cnbm.common.dao.BaseDao; import com.cnbm.common.dao.BaseDao;
import com.cnbm.basic.entity.Factory; import com.cnbm.basic.entity.Factory;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* 工厂 * 工厂
* *
@ -13,4 +16,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface FactoryMapper extends BaseDao<Factory> { public interface FactoryMapper extends BaseDao<Factory> {
List<FactoryDTO> list();
} }

View File

@ -1,8 +1,16 @@
package com.cnbm.basic.mapper; package com.cnbm.basic.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cnbm.basic.dto.MachineDTO;
import com.cnbm.common.dao.BaseDao; import com.cnbm.common.dao.BaseDao;
import com.cnbm.basic.entity.Machine; import com.cnbm.basic.entity.Machine;
import com.cnbm.common.page.PageData;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/** /**
* 机台表 * 机台表
@ -12,5 +20,7 @@ import org.apache.ibatis.annotations.Mapper;
*/ */
@Mapper @Mapper
public interface MachineMapper extends BaseDao<Machine> { public interface MachineMapper extends BaseDao<Machine> {
PageData<MachineDTO> page(Map<String, Object> params);
List<MachineDTO> list(Map<String, Object> params);
} }

View File

@ -1,9 +1,13 @@
package com.cnbm.basic.mapper; package com.cnbm.basic.mapper;
import com.cnbm.basic.dto.FactoryDTO;
import com.cnbm.basic.dto.PlatformDTO;
import com.cnbm.common.dao.BaseDao; import com.cnbm.common.dao.BaseDao;
import com.cnbm.basic.entity.Platform; import com.cnbm.basic.entity.Platform;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* 站点表 * 站点表
* *
@ -12,5 +16,5 @@ import org.apache.ibatis.annotations.Mapper;
*/ */
@Mapper @Mapper
public interface PlatformMapper extends BaseDao<Platform> { public interface PlatformMapper extends BaseDao<Platform> {
List<PlatformDTO> list();
} }

View File

@ -17,5 +17,5 @@ import java.util.Map;
*/ */
@Mapper @Mapper
public interface ProductMapper extends BaseDao<Product> { public interface ProductMapper extends BaseDao<Product> {
IPage<ProductDTO> page(Map<String, Object> params); // IPage<ProductDTO> page(Map<String, Object> params);
} }

View File

@ -1,12 +1,14 @@
package com.cnbm.basic.mapper; package com.cnbm.basic.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cnbm.basic.dto.FactoryDTO;
import com.cnbm.basic.dto.ProductTypeDTO; import com.cnbm.basic.dto.ProductTypeDTO;
import com.cnbm.common.dao.BaseDao; import com.cnbm.common.dao.BaseDao;
import com.cnbm.basic.entity.ProductType; import com.cnbm.basic.entity.ProductType;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -18,4 +20,5 @@ import java.util.Map;
@Mapper @Mapper
public interface ProductTypeMapper extends BaseDao<ProductType> { public interface ProductTypeMapper extends BaseDao<ProductType> {
//IPage<ProductTypeDTO> page(IPage<ProductType> objectPage, @Param("param") Map<String, Object> params); //IPage<ProductTypeDTO> page(IPage<ProductType> objectPage, @Param("param") Map<String, Object> params);
List<ProductTypeDTO> list();
} }

View File

@ -1,9 +1,13 @@
package com.cnbm.basic.mapper; package com.cnbm.basic.mapper;
import com.cnbm.basic.dto.FactoryDTO;
import com.cnbm.basic.dto.UnitDTO;
import com.cnbm.common.dao.BaseDao; import com.cnbm.common.dao.BaseDao;
import com.cnbm.basic.entity.Unit; import com.cnbm.basic.entity.Unit;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* 单位 * 单位
* *
@ -12,5 +16,5 @@ import org.apache.ibatis.annotations.Mapper;
*/ */
@Mapper @Mapper
public interface UnitMapper extends BaseDao<Unit> { public interface UnitMapper extends BaseDao<Unit> {
List<UnitDTO> list();
} }

View File

@ -6,6 +6,7 @@ import com.cnbm.common.dao.BaseDao;
import com.cnbm.basic.entity.WorkingProcedure; import com.cnbm.basic.entity.WorkingProcedure;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -16,5 +17,6 @@ import java.util.Map;
*/ */
@Mapper @Mapper
public interface WorkingProcedureMapper extends BaseDao<WorkingProcedure> { public interface WorkingProcedureMapper extends BaseDao<WorkingProcedure> {
IPage<WorkingProcedureDTO> page(Map<String, Object> params); //IPage<WorkingProcedureDTO> page(Map<String, Object> params);
List<WorkingProcedureDTO> list();
} }

View File

@ -5,6 +5,7 @@ import com.cnbm.common.service.CrudService;
import com.cnbm.basic.dto.FactoryDTO; import com.cnbm.basic.dto.FactoryDTO;
import com.cnbm.basic.entity.Factory; import com.cnbm.basic.entity.Factory;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -24,5 +25,7 @@ public interface IFactoryService extends CrudService<Factory, FactoryDTO> {
void delete(Long[] ids); void delete(Long[] ids);
void changeStatus(Long id); List<FactoryDTO> list();
boolean changeStatus(Long id);
} }

View File

@ -5,6 +5,7 @@ import com.cnbm.common.service.CrudService;
import com.cnbm.basic.dto.MachineDTO; import com.cnbm.basic.dto.MachineDTO;
import com.cnbm.basic.entity.Machine; import com.cnbm.basic.entity.Machine;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -16,6 +17,8 @@ import java.util.Map;
public interface IMachineService extends CrudService<Machine, MachineDTO> { public interface IMachineService extends CrudService<Machine, MachineDTO> {
PageData<MachineDTO> page (Map<String, Object> params); PageData<MachineDTO> page (Map<String, Object> params);
PageData<MachineDTO> page1 (Map<String, Object> params);
MachineDTO get(Long id); MachineDTO get(Long id);
void save(MachineDTO dto); void save(MachineDTO dto);
@ -24,5 +27,7 @@ public interface IMachineService extends CrudService<Machine, MachineDTO> {
void delete(Long[] ids); void delete(Long[] ids);
void changeStatus(Long id); List<MachineDTO> list(Map<String, Object> params);
boolean changeStatus(Long id);
} }

View File

@ -24,5 +24,5 @@ public interface IMeasureToolService extends CrudService<MeasureTool, MeasureToo
void delete(Long[] ids); void delete(Long[] ids);
void changeStatus(Long id); boolean changeStatus(Long id);
} }

View File

@ -5,6 +5,7 @@ import com.cnbm.common.service.CrudService;
import com.cnbm.basic.dto.PlatformDTO; import com.cnbm.basic.dto.PlatformDTO;
import com.cnbm.basic.entity.Platform; import com.cnbm.basic.entity.Platform;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -24,5 +25,7 @@ public interface IPlatformService extends CrudService<Platform, PlatformDTO> {
void delete(Long[] ids); void delete(Long[] ids);
void changeStatus(Long id); List<PlatformDTO> list();
boolean changeStatus(Long id);
} }

View File

@ -1,10 +1,12 @@
package com.cnbm.basic.service; package com.cnbm.basic.service;
import com.cnbm.basic.dto.FactoryDTO;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.service.CrudService; import com.cnbm.common.service.CrudService;
import com.cnbm.basic.dto.ProductTypeDTO; import com.cnbm.basic.dto.ProductTypeDTO;
import com.cnbm.basic.entity.ProductType; import com.cnbm.basic.entity.ProductType;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -24,5 +26,7 @@ public interface IProductTypeService extends CrudService<ProductType, ProductTyp
void delete(Long[] ids); void delete(Long[] ids);
void changeStatus(Long id); List<ProductTypeDTO> list();
boolean changeStatus(Long id);
} }

View File

@ -1,10 +1,12 @@
package com.cnbm.basic.service; package com.cnbm.basic.service;
import com.cnbm.basic.dto.FactoryDTO;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.service.CrudService; import com.cnbm.common.service.CrudService;
import com.cnbm.basic.dto.UnitDTO; import com.cnbm.basic.dto.UnitDTO;
import com.cnbm.basic.entity.Unit; import com.cnbm.basic.entity.Unit;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -22,5 +24,7 @@ public interface IUnitService extends CrudService<Unit, UnitDTO> {
void update(UnitDTO dto); void update(UnitDTO dto);
void changeStatus(Long id); List<UnitDTO> list();
boolean changeStatus(Long id);
} }

View File

@ -25,7 +25,9 @@ public interface IWorkingProcedureService extends CrudService<WorkingProcedure,
void delete(Long[] ids); void delete(Long[] ids);
void changeStatus(Long id); boolean changeStatus(Long id);
List<WorkingProcedureDTO> getWorkingProcedureByProductId(Long productId); List<WorkingProcedureDTO> getWorkingProcedureByProductId(Long productId);
List<WorkingProcedureDTO> list();
} }

View File

@ -24,5 +24,5 @@ public interface IWorkingProcedureTypeService extends CrudService<WorkingProcedu
void delete(Long[] ids); void delete(Long[] ids);
void changeStatus(Long id); boolean changeStatus(Long id);
} }

View File

@ -3,6 +3,7 @@ package com.cnbm.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.cnbm.basic.dto.MachineDTO;
import com.cnbm.basic.dto.ProductTypeDTO; import com.cnbm.basic.dto.ProductTypeDTO;
import com.cnbm.basic.entity.ProductType; import com.cnbm.basic.entity.ProductType;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
@ -13,11 +14,13 @@ import com.cnbm.basic.entity.Factory;
import com.cnbm.basic.service.IFactoryService; import com.cnbm.basic.service.IFactoryService;
import com.cnbm.common.utils.ConvertUtils; import com.cnbm.common.utils.ConvertUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -28,6 +31,7 @@ import java.util.Map;
*/ */
@Service @Service
public class FactoryServiceImpl extends CrudServiceImpl<FactoryMapper, Factory, FactoryDTO> implements IFactoryService { public class FactoryServiceImpl extends CrudServiceImpl<FactoryMapper, Factory, FactoryDTO> implements IFactoryService {
@Autowired private FactoryMapper mapper;
@Override @Override
public QueryWrapper<Factory> getWrapper(Map<String, Object> params){ public QueryWrapper<Factory> getWrapper(Map<String, Object> params){
@ -82,12 +86,19 @@ public class FactoryServiceImpl extends CrudServiceImpl<FactoryMapper, Factory,
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void changeStatus(Long id) { public boolean changeStatus(Long id) {
//改变状态 开启1 关闭0 //改变状态 开启1 关闭0
Factory entity = baseDao.selectById(id); Factory entity = baseDao.selectById(id);
Integer status = 1 - entity.getStatus(); Integer status = 1 - entity.getStatus();
entity.setStatus(status); entity.setStatus(status);
updateById(entity); return updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public List<FactoryDTO> list() {
List<FactoryDTO> list = mapper.list();
return list;
} }
} }

View File

@ -3,6 +3,8 @@ package com.cnbm.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cnbm.basic.entity.Platform;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl; import com.cnbm.common.service.impl.CrudServiceImpl;
import com.cnbm.basic.dto.MachineDTO; import com.cnbm.basic.dto.MachineDTO;
@ -10,12 +12,14 @@ import com.cnbm.basic.mapper.MachineMapper;
import com.cnbm.basic.entity.Machine; import com.cnbm.basic.entity.Machine;
import com.cnbm.basic.service.IMachineService; import com.cnbm.basic.service.IMachineService;
import com.cnbm.common.utils.ConvertUtils; import com.cnbm.common.utils.ConvertUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -25,7 +29,10 @@ import java.util.Map;
* @since 2022-07-15 * @since 2022-07-15
*/ */
@Service @Service
public class MachineServiceImpl extends CrudServiceImpl<MachineMapper, Machine, MachineDTO> implements IMachineService { public class MachineServiceImpl extends CrudServiceImpl<MachineMapper, Machine, MachineDTO> implements IMachineService {
@Autowired
private MachineMapper mapper;
@Override @Override
public QueryWrapper<Machine> getWrapper(Map<String, Object> params){ public QueryWrapper<Machine> getWrapper(Map<String, Object> params){
@ -37,24 +44,42 @@ public class MachineServiceImpl extends CrudServiceImpl<MachineMapper, Machine,
} }
@Autowired @Autowired
private PlatformServiceImpl platformServiceImpl; private PlatformServiceImpl platformService;
@Override @Override
public PageData<MachineDTO> page (Map<String, Object> params){ public PageData<MachineDTO> page (Map<String, Object> params) {
IPage<Machine> page = baseDao.selectPage( IPage<Machine> page = baseDao.selectPage(
getPage(params, "id", true), getPage(params, "id", true),
getWrapper(params) getWrapper(params)
); );
PageData<MachineDTO> machineDTOPageData = getPageData(page, MachineDTO.class); PageData<MachineDTO> machineDTOPageData = getPageData(page, MachineDTO.class);
if(machineDTOPageData.getTotal()!=0){
for(MachineDTO machineDTO:machineDTOPageData.getList()){ if (!machineDTOPageData.getList().isEmpty()) {
String platform_name = platformServiceImpl.selectById(machineDTO.getPlatformId()).getName();
machineDTO.setPlatformName(platform_name); for (MachineDTO machineDTO : machineDTOPageData.getList()) {
Platform platform = platformService.selectById(machineDTO.getPlatformId());
String platformName = null;
if (platform != null) {
platformName = platform.getName();
}
machineDTO.setPlatformName(platformName);
} }
} }
return machineDTOPageData; return machineDTOPageData;
} }
@Override
public PageData<MachineDTO> page1 (Map<String, Object> params){
// IPage<Machine> page = baseDao.selectPage(
// getPage(params, "id", true),
// getWrapper(params)
// );
return mapper.page(params);
}
@Override @Override
public MachineDTO get(Long id) { public MachineDTO get(Long id) {
Machine entity = baseDao.selectById(id); Machine entity = baseDao.selectById(id);
@ -84,14 +109,19 @@ public class MachineServiceImpl extends CrudServiceImpl<MachineMapper, Machine,
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void changeStatus(Long id) { public boolean changeStatus(Long id) {
//改变状态 开启1 关闭0 //改变状态 开启1 关闭0
Machine entity = baseDao.selectById(id); Machine entity = baseDao.selectById(id);
Integer status = 1 - entity.getStatus(); Integer status = 1 - entity.getStatus();
entity.setStatus(status); entity.setStatus(status);
updateById(entity); return updateById(entity);
}
//return updateById(entity); @Override
@Transactional(rollbackFor = Exception.class)
public List<MachineDTO> list(Map<String, Object> params) {
List<MachineDTO> list = mapper.list(params);
return list;
} }
} }

View File

@ -70,12 +70,12 @@ public class MeasureToolServiceImpl extends CrudServiceImpl<MeasureToolMapper, M
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void changeStatus(Long id) { public boolean changeStatus(Long id) {
//改变状态 开启1 关闭0 //改变状态 开启1 关闭0
MeasureTool entity = baseDao.selectById(id); MeasureTool entity = baseDao.selectById(id);
Integer status = 1 - entity.getStatus(); Integer status = 1 - entity.getStatus();
entity.setStatus(status); entity.setStatus(status);
updateById(entity); return updateById(entity);
} }
} }

View File

@ -3,6 +3,7 @@ package com.cnbm.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.cnbm.basic.dto.FactoryDTO;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl; import com.cnbm.common.service.impl.CrudServiceImpl;
import com.cnbm.basic.dto.PlatformDTO; import com.cnbm.basic.dto.PlatformDTO;
@ -11,11 +12,13 @@ import com.cnbm.basic.entity.Platform;
import com.cnbm.basic.service.IPlatformService; import com.cnbm.basic.service.IPlatformService;
import com.cnbm.common.utils.ConvertUtils; import com.cnbm.common.utils.ConvertUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -26,6 +29,8 @@ import java.util.Map;
*/ */
@Service @Service
public class PlatformServiceImpl extends CrudServiceImpl<PlatformMapper, Platform, PlatformDTO> implements IPlatformService { public class PlatformServiceImpl extends CrudServiceImpl<PlatformMapper, Platform, PlatformDTO> implements IPlatformService {
@Autowired
private PlatformMapper mapper;
@Override @Override
public QueryWrapper<Platform> getWrapper(Map<String, Object> params){ public QueryWrapper<Platform> getWrapper(Map<String, Object> params){
@ -74,12 +79,19 @@ public class PlatformServiceImpl extends CrudServiceImpl<PlatformMapper, Platfor
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void changeStatus(Long id) { public boolean changeStatus(Long id) {
//改变状态 开启1 关闭0 //改变状态 开启1 关闭0
Platform entity = baseDao.selectById(id); Platform entity = baseDao.selectById(id);
Integer status = 1 - entity.getStatus(); Integer status = 1 - entity.getStatus();
entity.setStatus(status); entity.setStatus(status);
updateById(entity); return updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public List<PlatformDTO> list() {
List<PlatformDTO> list = mapper.list();
return list;
} }

View File

@ -3,6 +3,7 @@ package com.cnbm.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cnbm.basic.entity.ProductType; import com.cnbm.basic.entity.ProductType;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl; import com.cnbm.common.service.impl.CrudServiceImpl;
@ -28,8 +29,8 @@ import java.util.Map;
@Service @Service
public class ProductServiceImpl extends CrudServiceImpl<ProductMapper, Product, ProductDTO> implements IProductService { public class ProductServiceImpl extends CrudServiceImpl<ProductMapper, Product, ProductDTO> implements IProductService {
//@Autowired @Autowired
//ProductMapper mapper; ProductMapper mapper;
@Override @Override
public QueryWrapper<Product> getWrapper(Map<String, Object> params){ public QueryWrapper<Product> getWrapper(Map<String, Object> params){
@ -59,10 +60,15 @@ public class ProductServiceImpl extends CrudServiceImpl<ProductMapper, Product,
getWrapper(params) getWrapper(params)
); );
PageData<ProductDTO> productDTOPageData = getPageData(page,ProductDTO.class); PageData<ProductDTO> productDTOPageData = getPageData(page,ProductDTO.class);
if(productDTOPageData.getTotal()!=0){
if(!productDTOPageData.getList().isEmpty()){
for(ProductDTO productDTO:productDTOPageData.getList()){ for(ProductDTO productDTO:productDTOPageData.getList()){
String productType = productTypeService.selectById(productDTO.getProductTypeId()).getName(); ProductType productType = productTypeService.selectById(productDTO.getProductTypeId());
productDTO.setProductType(productType); String productTypeName = null;
if (productType!=null){
productTypeName = productType.getName();
}
productDTO.setProductType(productTypeName);
} }
} }
return productDTOPageData; return productDTOPageData;

View File

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cnbm.admin.dto.SysDictDataDTO; import com.cnbm.admin.dto.SysDictDataDTO;
import com.cnbm.admin.entity.SysDictDataEntity; import com.cnbm.admin.entity.SysDictDataEntity;
import com.cnbm.basic.dto.FactoryDTO;
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.service.impl.CrudServiceImpl; import com.cnbm.common.service.impl.CrudServiceImpl;
@ -21,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -32,9 +34,8 @@ import java.util.Map;
@Service @Service
public class ProductTypeServiceImpl extends CrudServiceImpl<ProductTypeMapper, ProductType, ProductTypeDTO> implements IProductTypeService { public class ProductTypeServiceImpl extends CrudServiceImpl<ProductTypeMapper, ProductType, ProductTypeDTO> implements IProductTypeService {
@Autowired
//@Autowired private ProductTypeMapper mapper;
//private ProductTypeMapper productTypeMapper;
@Override @Override
public QueryWrapper<ProductType> getWrapper(Map<String, Object> params){ public QueryWrapper<ProductType> getWrapper(Map<String, Object> params){
@ -50,11 +51,6 @@ public class ProductTypeServiceImpl extends CrudServiceImpl<ProductTypeMapper, P
@Override @Override
public PageData<ProductTypeDTO> page (Map<String, Object> params){ public PageData<ProductTypeDTO> page (Map<String, Object> params){
//QueryWrapper<ProductTypeDTO> wrapper = new QueryWrapper<>();
//wrapper.eq("id",params.get("id"));
//IPage<ProductTypeDTO> page = productTypeMapper.page(getPage(params, Constant.CREATE_DATE, false), params);
//return getPageData(page,ProductTypeDTO.class);
IPage<ProductType> page = baseDao.selectPage( IPage<ProductType> page = baseDao.selectPage(
getPage(params, "id", true), getPage(params, "id", true),
getWrapper(params) getWrapper(params)
@ -91,12 +87,18 @@ public class ProductTypeServiceImpl extends CrudServiceImpl<ProductTypeMapper, P
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void changeStatus(Long id) { public boolean changeStatus(Long id) {
//改变状态 开启1 关闭0 //改变状态 开启1 关闭0
ProductType entity = baseDao.selectById(id); ProductType entity = baseDao.selectById(id);
Integer status = 1 - entity.getStatus(); Integer status = 1 - entity.getStatus();
entity.setStatus(status); entity.setStatus(status);
updateById(entity); return updateById(entity);
} }
@Override
@Transactional(rollbackFor = Exception.class)
public List<ProductTypeDTO> list() {
List<ProductTypeDTO> list = mapper.list();
return list;
}
} }

View File

@ -3,6 +3,7 @@ package com.cnbm.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.cnbm.basic.dto.FactoryDTO;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl; import com.cnbm.common.service.impl.CrudServiceImpl;
import com.cnbm.basic.dto.UnitDTO; import com.cnbm.basic.dto.UnitDTO;
@ -10,10 +11,12 @@ import com.cnbm.basic.entity.Unit;
import com.cnbm.basic.mapper.UnitMapper; import com.cnbm.basic.mapper.UnitMapper;
import com.cnbm.basic.service.IUnitService; import com.cnbm.basic.service.IUnitService;
import com.cnbm.common.utils.ConvertUtils; import com.cnbm.common.utils.ConvertUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -24,6 +27,8 @@ import java.util.Map;
*/ */
@Service @Service
public class UnitServiceImpl extends CrudServiceImpl<UnitMapper, Unit, UnitDTO> implements IUnitService { public class UnitServiceImpl extends CrudServiceImpl<UnitMapper, Unit, UnitDTO> implements IUnitService {
@Autowired
private UnitMapper mapper;
@Override @Override
public QueryWrapper<Unit> getWrapper(Map<String, Object> params){ public QueryWrapper<Unit> getWrapper(Map<String, Object> params){
@ -65,11 +70,19 @@ public class UnitServiceImpl extends CrudServiceImpl<UnitMapper, Unit, UnitDTO>
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void changeStatus(Long id) { public boolean changeStatus(Long id) {
//改变状态 开启1 关闭0 //改变状态 开启1 关闭0
Unit entity = baseDao.selectById(id); Unit entity = baseDao.selectById(id);
Integer status = 1 - entity.getStatus(); Integer status = 1 - entity.getStatus();
entity.setStatus(status); entity.setStatus(status);
updateById(entity); return updateById(entity);
} }
@Override
@Transactional(rollbackFor = Exception.class)
public List<UnitDTO> list() {
List<UnitDTO> list = mapper.list();
return list;
}
} }

View File

@ -3,8 +3,12 @@ package com.cnbm.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.cnbm.basic.dto.UnitDTO;
import com.cnbm.basic.entity.Machine;
import com.cnbm.basic.entity.ProductWorkingprocedureRelation; import com.cnbm.basic.entity.ProductWorkingprocedureRelation;
import com.cnbm.basic.entity.WorkingProcedureType;
import com.cnbm.basic.mapper.ProductWorkingprocedureRelationMapper; import com.cnbm.basic.mapper.ProductWorkingprocedureRelationMapper;
import com.cnbm.basic.mapper.UnitMapper;
import com.cnbm.common.page.PageData; import com.cnbm.common.page.PageData;
import com.cnbm.common.service.impl.CrudServiceImpl; import com.cnbm.common.service.impl.CrudServiceImpl;
import com.cnbm.basic.dto.WorkingProcedureDTO; import com.cnbm.basic.dto.WorkingProcedureDTO;
@ -58,24 +62,34 @@ public class WorkingProcedureServiceImpl extends CrudServiceImpl<WorkingProcedur
getWrapper(params) getWrapper(params)
); );
PageData<WorkingProcedureDTO> workingProcedureDTOPageData = getPageData(page, WorkingProcedureDTO.class); PageData<WorkingProcedureDTO> workingProcedureDTOPageData = getPageData(page, WorkingProcedureDTO.class);
if(workingProcedureDTOPageData.getTotal()!=0){ if(!workingProcedureDTOPageData.getList().isEmpty()){
for(WorkingProcedureDTO workingProcedureDTO:workingProcedureDTOPageData.getList()){ for(WorkingProcedureDTO workingProcedureDTO:workingProcedureDTOPageData.getList()){
//工序类型 id,关联working_procedure_type表 //工序类型 id,关联working_procedure_type表
String workingProcedureTypeName = workingProcedureTypeServiceImpl.selectById(workingProcedureDTO.getWorkingProcedureTypeId()).getName(); WorkingProcedureType workingProcedureType = workingProcedureTypeServiceImpl.selectById(workingProcedureDTO.getWorkingProcedureTypeId());
String workingProcedureTypeName = null;
if(workingProcedureType!=null){
workingProcedureTypeName = workingProcedureType.getName();
}
workingProcedureDTO.setWorkingProcedureTypeName(workingProcedureTypeName); workingProcedureDTO.setWorkingProcedureTypeName(workingProcedureTypeName);
//机台
//机台(也就是设备)这个工序对应的设备可能有一个或者多个如果多个用逗号隔开"id1,id2,...
//String machineNameList = null;
if(StringUtils.isNotBlank(workingProcedureDTO.getMachineId())){ if(StringUtils.isNotBlank(workingProcedureDTO.getMachineId())){
String[] machineIdList = workingProcedureDTO.getMachineId().split(","); String[] machineIdList = workingProcedureDTO.getMachineId().split(",");
ArrayList<String> machineList = new ArrayList<>(); ArrayList<String> machineList = new ArrayList<>();
for(String machineId:machineIdList){ for(String machineId:machineIdList){
//QueryWrapper<Machine> machineQueryWrapper = new QueryWrapper<>(); //QueryWrapper<Machine> machineQueryWrapper = new QueryWrapper<>();
//machineQueryWrapper.eq(StringUtils.isNotBlank(machineId), "id", machineId); //machineQueryWrapper.eq(StringUtils.isNotBlank(machineId), "id", machineId);
String machineName = machineServiceImpl.selectById(machineId).getName(); //String machineName = null;
machineList.add(machineName); Machine machine = machineServiceImpl.selectById(machineId);
if(machine!=null&&machine.getName()!=null) {
machineList.add(machine.getName());
}
} }
String machineNameList = String.join(",", machineList); String machineNameList = String.join(",", machineList);
workingProcedureDTO.setMachineName(machineNameList); workingProcedureDTO.setMachineName(machineNameList);
} }
} }
} }
return workingProcedureDTOPageData; return workingProcedureDTOPageData;
@ -110,12 +124,12 @@ public class WorkingProcedureServiceImpl extends CrudServiceImpl<WorkingProcedur
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void changeStatus(Long id) { public boolean changeStatus(Long id) {
//改变状态 开启1 关闭0 //改变状态 开启1 关闭0
WorkingProcedure entity = baseDao.selectById(id); WorkingProcedure entity = baseDao.selectById(id);
Integer status = 1 - entity.getStatus(); Integer status = 1 - entity.getStatus();
entity.setStatus(status); entity.setStatus(status);
updateById(entity); return updateById(entity);
} }
@Autowired @Autowired
@ -135,4 +149,15 @@ public class WorkingProcedureServiceImpl extends CrudServiceImpl<WorkingProcedur
return workingProcedureDTOList; return workingProcedureDTOList;
} }
@Autowired
private WorkingProcedureMapper workingProcedureMapper;
@Override
@Transactional(rollbackFor = Exception.class)
public List<WorkingProcedureDTO> list() {
List<WorkingProcedureDTO> list = workingProcedureMapper.list();
return list;
}
} }

View File

@ -74,12 +74,12 @@ public class WorkingProcedureTypeServiceImpl extends CrudServiceImpl<WorkingProc
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void changeStatus(Long id) { public boolean changeStatus(Long id) {
//改变状态 开启1 关闭0 //改变状态 开启1 关闭0
WorkingProcedureType entity = baseDao.selectById(id); WorkingProcedureType entity = baseDao.selectById(id);
Integer status = 1 - entity.getStatus(); Integer status = 1 - entity.getStatus();
entity.setStatus(status); entity.setStatus(status);
updateById(entity); return updateById(entity);
} }
} }

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cnbm.basic.mapper.MachineMapper">
</mapper>

View File

@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cnbm.basic.mapper.FactoryMapper"> <mapper namespace="com.cnbm.basic.mapper.FactoryMapper">
<select id="list" resultType="com.cnbm.basic.dto.FactoryDTO">
select * from factory
order by id asc
</select>
</mapper> </mapper>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cnbm.basic.mapper.MachineMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.cnbm.basic.dto.MachineDTO">
<id column="ID" property="id" />
<result column="CODE" property="code" />
<result column="NAME" property="name" />
<result column="REMARK" property="remark" />
<result column="STATUS" property="status" />
<result column="platformName" property="platformName" />
</resultMap>
<select id="page" resultMap="BaseResultMap">
select m.id,m.code,m.name,m.remark,m.status,p.name as platformName
from machine m
LEFT JOIN platform p ON p.id=m.platform_id
<where>
</where>
</select>
<select id="list" resultType="com.cnbm.basic.dto.MachineDTO">
select m.id,m.code,m.name,m.remark,m.status,p.name as platformName
from machine m
LEFT JOIN platform p ON p.id=m.platform_id
<where>
<if test="status != null">
and m.status = #{status}
</if>
</where>
order by m.id asc
</select>
</mapper>

View File

@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cnbm.basic.mapper.PlatformMapper"> <mapper namespace="com.cnbm.basic.mapper.PlatformMapper">
<select id="list" resultType="com.cnbm.basic.dto.PlatformDTO">
select * from platform
order by id asc
</select>
</mapper> </mapper>

View File

@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cnbm.basic.mapper.ProductTypeMapper"> <mapper namespace="com.cnbm.basic.mapper.ProductTypeMapper">
<select id="list" resultType="com.cnbm.basic.dto.ProductTypeDTO">
select * from product_type
order by id asc
</select>
</mapper> </mapper>

View File

@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cnbm.basic.mapper.UnitMapper"> <mapper namespace="com.cnbm.basic.mapper.UnitMapper">
<select id="list" resultType="com.cnbm.basic.dto.UnitDTO">
select * from unit
order by id asc
</select>
</mapper> </mapper>

View File

@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cnbm.basic.mapper.WorkingProcedureMapper"> <mapper namespace="com.cnbm.basic.mapper.WorkingProcedureMapper">
<select id="list" resultType="com.cnbm.basic.dto.WorkingProcedureDTO">
select * from working_procedure
order by id asc
</select>
</mapper> </mapper>