Fancy
2024-06-19 c3d68f210192e2ec5bd06e4d21ede0bd8305fd63
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();
    }
}