| | |
| | | @RequestMapping(value = "/basProcessProcedures/add/auth") |
| | | @ManagerAuth |
| | | public R add(BasProcessProcedures basProcessProcedures) { |
| | | BasProcessProcedures boxType = basProcessProceduresService.selectOne(new EntityWrapper<BasProcessProcedures>().eq("box_type", basProcessProcedures.getBoxType())); |
| | | if (!Cools.isEmpty(boxType)){ |
| | | return R.error("标识号重复,请检查!!!"); |
| | | } |
| | | basProcessProceduresService.insert(basProcessProcedures); |
| | | return R.ok(); |
| | | } |
| | |
| | | if (Cools.isEmpty(basProcessProcedures) || null==basProcessProcedures.getId()){ |
| | | return R.error(); |
| | | } |
| | | BasProcessProcedures boxType = basProcessProceduresService.selectOne(new EntityWrapper<BasProcessProcedures>().eq("box_type", basProcessProcedures.getBoxType())); |
| | | BasProcessProcedures basProcessProcedures1 = basProcessProceduresService.selectById(basProcessProcedures.getId()); |
| | | if (!Cools.isEmpty(boxType) && !basProcessProcedures1.equals(boxType)){ |
| | | return R.error("标识号重复,请检查!!!"); |
| | | } |
| | | basProcessProceduresService.updateById(basProcessProcedures); |
| | | return R.ok(); |
| | | } |