2022-11-14微调

zhc4dev
YTD 2 years ago
parent 619f07edd8
commit c5bd277295
  1. 22
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessAccessoriesController.java
  2. 24
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessActionController.java
  3. 12
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessFabricController.java
  4. 12
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessMachineController.java
  5. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/operationtool/controller/ZyOperationtoolController.java

@ -98,7 +98,7 @@ public class ZyProcessAccessoriesController extends JeecgController<ZyProcessAcc
IPage<ZyProcessAccessories> pageList = zyProcessAccessoriesService.page1(page, s,t);
return Result.OK(pageList);
}
/**
* 添加
*
@ -109,10 +109,16 @@ public class ZyProcessAccessoriesController extends JeecgController<ZyProcessAcc
@ApiOperation(value="面料表-添加", notes="面料表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProcessAccessories zyProcessAccessories) {
QueryWrapper s=new QueryWrapper();
s.eq("process_id",zyProcessAccessories.getProcessId());
s.eq("accessories_id",zyProcessAccessories.getAccessoriesId());
int a=zyProcessAccessoriesService.count(s);
if(a>=1)
return Result.error("已存在本信息");
zyProcessAccessoriesService.save(zyProcessAccessories);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -123,10 +129,16 @@ public class ZyProcessAccessoriesController extends JeecgController<ZyProcessAcc
@ApiOperation(value="面料表-编辑", notes="面料表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyProcessAccessories zyProcessAccessories) {
QueryWrapper s=new QueryWrapper();
s.eq("process_id",zyProcessAccessories.getProcessId());
s.eq("accessories_id",zyProcessAccessories.getAccessoriesId());
int a=zyProcessAccessoriesService.count(s);
if(a>=1)
return Result.error("已存在本信息");
zyProcessAccessoriesService.updateById(zyProcessAccessories);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -140,7 +152,7 @@ public class ZyProcessAccessoriesController extends JeecgController<ZyProcessAcc
zyProcessAccessoriesService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -154,7 +166,7 @@ public class ZyProcessAccessoriesController extends JeecgController<ZyProcessAcc
this.zyProcessAccessoriesService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*

@ -49,7 +49,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyProcessActionController extends JeecgController<ZyProcessAction, IZyProcessActionService> {
@Autowired
private IZyProcessActionService zyProcessActionService;
/**
* 分页列表查询
*
@ -97,7 +97,7 @@ public class ZyProcessActionController extends JeecgController<ZyProcessAction,
return Result.OK(pageList);
}
/**
* 添加
*
@ -108,10 +108,16 @@ public class ZyProcessActionController extends JeecgController<ZyProcessAction,
@ApiOperation(value="zy_process_action-添加", notes="zy_process_action-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProcessAction zyProcessAction) {
QueryWrapper s=new QueryWrapper();
s.eq("process_id",zyProcessAction.getProcessId());
s.eq("action_id",zyProcessAction.getActionId());
int a=zyProcessActionService.count(s);
if(a>=1)
return Result.error("已存在本信息");
zyProcessActionService.save(zyProcessAction);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -122,10 +128,16 @@ public class ZyProcessActionController extends JeecgController<ZyProcessAction,
@ApiOperation(value="zy_process_action-编辑", notes="zy_process_action-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyProcessAction zyProcessAction) {
QueryWrapper s=new QueryWrapper();
s.eq("process_id",zyProcessAction.getProcessId());
s.eq("action_id",zyProcessAction.getActionId());
int a=zyProcessActionService.count(s);
if(a>=1)
return Result.error("已存在本信息");
zyProcessActionService.updateById(zyProcessAction);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -139,7 +151,7 @@ public class ZyProcessActionController extends JeecgController<ZyProcessAction,
zyProcessActionService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -153,7 +165,7 @@ public class ZyProcessActionController extends JeecgController<ZyProcessAction,
this.zyProcessActionService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*

@ -106,6 +106,12 @@ public class ZyProcessFabricController extends JeecgController<ZyProcessFabric,
@ApiOperation(value="zy_process_fabric-添加", notes="zy_process_fabric-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProcessFabric zyProcessFabric) {
QueryWrapper s=new QueryWrapper();
s.eq("process_id",zyProcessFabric.getProcessId());
s.eq("fabric_id",zyProcessFabric.getFabricId());
int a=zyProcessFabricService.count(s);
if(a>=1)
return Result.error("已存在本信息");
zyProcessFabricService.save(zyProcessFabric);
return Result.OK("添加成功!");
}
@ -120,6 +126,12 @@ public class ZyProcessFabricController extends JeecgController<ZyProcessFabric,
@ApiOperation(value="zy_process_fabric-编辑", notes="zy_process_fabric-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyProcessFabric zyProcessFabric) {
QueryWrapper s=new QueryWrapper();
s.eq("process_id",zyProcessFabric.getProcessId());
s.eq("fabric_id",zyProcessFabric.getFabricId());
int a=zyProcessFabricService.count(s);
if(a>=1)
return Result.error("已存在本信息");
zyProcessFabricService.updateById(zyProcessFabric);
return Result.OK("编辑成功!");
}

@ -105,6 +105,12 @@ public class ZyProcessMachineController extends JeecgController<ZyProcessMachine
@ApiOperation(value="zy_process_machine-添加", notes="zy_process_machine-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProcessMachine zyProcessMachine) {
QueryWrapper s=new QueryWrapper();
s.eq("process_id",zyProcessMachine.getProcessId());
s.eq("machine_id",zyProcessMachine.getMachineId());
int a=zyProcessMachineService.count(s);
if(a>=1)
return Result.error("已存在本信息");
zyProcessMachineService.save(zyProcessMachine);
return Result.OK("添加成功!");
}
@ -119,6 +125,12 @@ public class ZyProcessMachineController extends JeecgController<ZyProcessMachine
@ApiOperation(value="zy_process_machine-编辑", notes="zy_process_machine-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyProcessMachine zyProcessMachine) {
QueryWrapper s=new QueryWrapper();
s.eq("process_id",zyProcessMachine.getProcessId());
s.eq("machine_id",zyProcessMachine.getMachineId());
int a=zyProcessMachineService.count(s);
if(a>=1)
return Result.error("已存在本信息");
zyProcessMachineService.updateById(zyProcessMachine);
return Result.OK("编辑成功!");
}

@ -1,5 +1,6 @@
package org.jeecg.modules.operationtool.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
@ -88,6 +89,12 @@ public class ZyOperationtoolController extends JeecgController<ZyOperationtool,
@ApiOperation(value="工序工具-添加", notes="工序工具-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyOperationtool zyOperationtool) {
QueryWrapper s=new QueryWrapper();
s.eq("process_id",zyOperationtool.getOperationid());
s.eq("toolid",zyOperationtool.getToolid());
int a=zyOperationtoolService.count(s);
if(a>=1)
return Result.error("已存在本信息");
zyOperationtoolService.save(zyOperationtool);
return Result.OK("添加成功!");
}
@ -102,6 +109,12 @@ public class ZyOperationtoolController extends JeecgController<ZyOperationtool,
@ApiOperation(value="工序工具-编辑", notes="工序工具-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyOperationtool zyOperationtool) {
QueryWrapper s=new QueryWrapper();
s.eq("operationid",zyOperationtool.getOperationid());
s.eq("toolid",zyOperationtool.getToolid());
int a=zyOperationtoolService.count(s);
if(a>=1)
return Result.error("已存在本信息");
zyOperationtoolService.updateById(zyOperationtool);
return Result.OK("编辑成功!");
}

Loading…
Cancel
Save