Fancy
2024-06-12 5dac0857309483496cf2828cc121fe8a0db84497
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proLine/ProLineSv.java
@@ -24,9 +24,9 @@
    }
    @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;
@@ -45,9 +45,9 @@
    @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;
@@ -76,5 +76,8 @@
        return rsVo ;
    }
    public List<PltProductionLine> selectAll() {
        return dao.selectAll();
    }
}