| | |
| | | } |
| | | |
| | | @Transactional |
| | | public int save(PltProductionLine line) throws Exception { |
| | | public int save(PltProductionLine line) throws RuntimeException { |
| | | if(dao.selectByNameId(line.id,line.name)>0){ |
| | | throw new Exception("生产线名称已存在"); |
| | | throw new RuntimeException("生产线名称已存在"); |
| | | } |
| | | int count = dao.insertSelective(line); |
| | | return count; |
| | |
| | | |
| | | |
| | | @Transactional |
| | | public int update(PltProductionLine line) throws Exception { |
| | | public int update(PltProductionLine line) throws RuntimeException { |
| | | if(dao.selectByNameId(line.id,line.name)>0){ |
| | | throw new Exception("生产线名称已存在"); |
| | | throw new RuntimeException("生产线名称已存在"); |
| | | } |
| | | int count = dao.updateByPrimaryKeySelective(line); |
| | | return count; |
| | |
| | | return rsVo ; |
| | | } |
| | | |
| | | public List<PltProductionLine> selectAll() { |
| | | return dao.selectAll(); |
| | | } |
| | | } |
| | | |