liurunyu
4 天以前 ac4f0d8e61c545c74f287563765179696b51b856
增加排班删除功能
5个文件已修改
30 ■■■■ 已修改文件
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrScheduleRelMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrScheduleRelMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/ScheduleCtrl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/ScheduleSv.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrScheduleRelMapper.java
@@ -19,7 +19,7 @@
    int updateByPrimaryKey(PrScheduleRel record);
    void deleteByScheduleId(Long scheduleId);
    long deleteByScheduleId(Long scheduleId);
    List<PrScheduleRel> selectByScheduleId(Long scheduleId);
}
pms-parent/pms-global/src/main/resources/mapper/PrScheduleRelMapper.xml
@@ -119,8 +119,8 @@
    where id = #{id,jdbcType=BIGINT}
  </update>
  <delete id="deleteByScheduleId">
    delete  from pr_schedule_rel where schedule_id=#{scheduleId}
  <delete id="deleteByScheduleId" parameterType="java.lang.Long">
    delete from pr_schedule_rel where schedule_id=#{scheduleId}
  </delete>
  <select id="selectByScheduleId" resultMap="BaseResultMap">
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java
@@ -79,7 +79,7 @@
        int count = roleSv.delete(Long.parseLong(id));
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
            return BaseResponseUtils.buildFail("数据库删除失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/ScheduleCtrl.java
@@ -65,6 +65,23 @@
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * 删除
     * @param id
     * @return
     */
    @GetMapping(path="delete")
    @SsoPowerAop(power = "10200009")
    @Log("删除角色信息")
    public BaseResponse<Boolean> delete(String id){
        long count = sv.delete(Long.parseLong(id));
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库删除失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * 查询任务计划列表
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/ScheduleSv.java
@@ -70,6 +70,11 @@
        saveRel(schedule);
        return scheduleDao.updateByPrimaryKeySelective(schedule);
    }
    @Transactional
    public long delete(Long id) {
        return this.scheduleRelDao.deleteByScheduleId(id);
    }
    private void saveRel(PrSchedule schedule) {
        schedule.relList.forEach(rel -> validateRelData(rel, schedule));