|
|
@ -89,6 +89,12 @@ public class ZyProcessController extends JeecgController<ZyProcess, IZyProcessSe |
|
|
|
@ApiOperation(value="zy_process-添加", notes="zy_process-添加") |
|
|
|
@ApiOperation(value="zy_process-添加", notes="zy_process-添加") |
|
|
|
@PostMapping(value = "/add") |
|
|
|
@PostMapping(value = "/add") |
|
|
|
public Result<?> add(@RequestBody ZyProcess zyProcess) { |
|
|
|
public Result<?> add(@RequestBody ZyProcess zyProcess) { |
|
|
|
|
|
|
|
zyProcess.setCreateTime(null); |
|
|
|
|
|
|
|
QueryWrapper queryWrapper=new QueryWrapper(); |
|
|
|
|
|
|
|
queryWrapper.eq("process_name",zyProcess.getProcessName()); |
|
|
|
|
|
|
|
int a=zyProcessService.count(queryWrapper); |
|
|
|
|
|
|
|
if(a!=0) |
|
|
|
|
|
|
|
return Result.error("添加失败,该工序名称已存在!!!"); |
|
|
|
zyProcessService.save(zyProcess); |
|
|
|
zyProcessService.save(zyProcess); |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
return Result.OK("添加成功!"); |
|
|
|
} |
|
|
|
} |
|
|
@ -103,6 +109,11 @@ public class ZyProcessController extends JeecgController<ZyProcess, IZyProcessSe |
|
|
|
@ApiOperation(value="zy_process-编辑", notes="zy_process-编辑") |
|
|
|
@ApiOperation(value="zy_process-编辑", notes="zy_process-编辑") |
|
|
|
@PutMapping(value = "/edit") |
|
|
|
@PutMapping(value = "/edit") |
|
|
|
public Result<?> edit(@RequestBody ZyProcess zyProcess) { |
|
|
|
public Result<?> edit(@RequestBody ZyProcess zyProcess) { |
|
|
|
|
|
|
|
QueryWrapper queryWrapper=new QueryWrapper(); |
|
|
|
|
|
|
|
queryWrapper.eq("process_name",zyProcess.getProcessName()); |
|
|
|
|
|
|
|
int a=zyProcessService.count(queryWrapper); |
|
|
|
|
|
|
|
if(a!=0) |
|
|
|
|
|
|
|
return Result.error("编辑失败,该工序名称已存在!!!"); |
|
|
|
zyProcessService.updateById(zyProcess); |
|
|
|
zyProcessService.updateById(zyProcess); |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
} |
|
|
|
} |
|
|
@ -187,6 +198,15 @@ public class ZyProcessController extends JeecgController<ZyProcess, IZyProcessSe |
|
|
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
|
|
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
|
|
|
return super.importExcel(request, response, ZyProcess.class); |
|
|
|
return super.importExcel(request, response, ZyProcess.class); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@AutoLog(value = "zy_process-顺序查询") |
|
|
|
|
|
|
|
@ApiOperation(value="zy_process-顺序查询", notes="zy_process-顺序查询") |
|
|
|
|
|
|
|
@GetMapping(value = "/sort") |
|
|
|
|
|
|
|
public Result<?> sort(@RequestParam(name="id",required=true) String id) { |
|
|
|
|
|
|
|
String sort=zyProcessService.sort(id); |
|
|
|
|
|
|
|
if(sort==null){ |
|
|
|
|
|
|
|
return Result.ok(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return Result.OK(sort.substring(10,sort.length())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|