周计划子项禁止删除
This commit is contained in:
parent
54518511d2
commit
64471c4c8b
@ -102,7 +102,7 @@
|
|||||||
v-show="isShow"
|
v-show="isShow"
|
||||||
>填充</el-button
|
>填充</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -111,7 +111,7 @@
|
|||||||
v-hasPermi="['benyi:themeweekplan:remove']"
|
v-hasPermi="['benyi:themeweekplan:remove']"
|
||||||
v-show="isShow"
|
v-show="isShow"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
@ -168,7 +168,7 @@
|
|||||||
v-show="isShow"
|
v-show="isShow"
|
||||||
>填充</el-button
|
>填充</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@ -176,7 +176,7 @@
|
|||||||
v-hasPermi="['benyi:themeweekplan:remove']"
|
v-hasPermi="['benyi:themeweekplan:remove']"
|
||||||
v-show="isShow"
|
v-show="isShow"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -112,11 +112,11 @@ public class ByThemeWeekplanController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:query')")
|
@PreAuthorize("@ss.hasPermi('benyi:themeweekplan:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||||
AjaxResult ajax=AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
ByThemeWeekplan byThemeWeekplan=byThemeWeekplanService.selectByThemeWeekplanById(id);
|
ByThemeWeekplan byThemeWeekplan = byThemeWeekplanService.selectByThemeWeekplanById(id);
|
||||||
ajax.put(AjaxResult.DATA_TAG, byThemeWeekplan);
|
ajax.put(AjaxResult.DATA_TAG, byThemeWeekplan);
|
||||||
ajax.put("classname",byClassService.selectByClassById(byThemeWeekplan.getClassid()).getBjmc());
|
ajax.put("classname", byClassService.selectByClassById(byThemeWeekplan.getClassid()).getBjmc());
|
||||||
ajax.put("createusername",userService.selectUserById(byThemeWeekplan.getCreateuserid()).getNickName());
|
ajax.put("createusername", userService.selectUserById(byThemeWeekplan.getCreateuserid()).getNickName());
|
||||||
return ajax;
|
return ajax;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ public class ByThemeWeekplanController extends BaseController {
|
|||||||
String bjtypeNew = byClassService.selectByClassById(classId).getBjtype();
|
String bjtypeNew = byClassService.selectByClassById(classId).getBjtype();
|
||||||
if (bjtypeNew.equals("1")) {
|
if (bjtypeNew.equals("1")) {
|
||||||
return AjaxResult.error("当前班级为托班,无法创建计划");
|
return AjaxResult.error("当前班级为托班,无法创建计划");
|
||||||
}else {
|
} else {
|
||||||
//判断当前班级是否创建月计划
|
//判断当前班级是否创建月计划
|
||||||
ByThemeMonthplan byThemeMonthplan = new ByThemeMonthplan();
|
ByThemeMonthplan byThemeMonthplan = new ByThemeMonthplan();
|
||||||
byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||||
@ -224,6 +224,10 @@ public class ByThemeWeekplanController extends BaseController {
|
|||||||
@Log(title = "主题整合周计划(根据月计划明细)", businessType = BusinessType.DELETE)
|
@Log(title = "主题整合周计划(根据月计划明细)", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable String[] ids) {
|
public AjaxResult remove(@PathVariable String[] ids) {
|
||||||
|
//先删除子项
|
||||||
|
for (int i = 0; i < ids.length; i++) {
|
||||||
|
byThemeWeekplanitemService.deleteByThemeWeekplanitemByPId(ids[i]);
|
||||||
|
}
|
||||||
return toAjax(byThemeWeekplanService.deleteByThemeWeekplanByIds(ids));
|
return toAjax(byThemeWeekplanService.deleteByThemeWeekplanByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,4 +58,12 @@ public interface ByThemeWeekplanitemMapper {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteByThemeWeekplanitemByIds(Long[] ids);
|
public int deleteByThemeWeekplanitemByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除主题整合周计划明细信息
|
||||||
|
*
|
||||||
|
* @param pid 主题周计划主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteByThemeWeekplanitemByPId(String pid);
|
||||||
}
|
}
|
||||||
|
@ -58,4 +58,13 @@ public interface IByThemeWeekplanitemService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteByThemeWeekplanitemById(Long id);
|
public int deleteByThemeWeekplanitemById(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除主题整合周计划明细信息
|
||||||
|
*
|
||||||
|
* @param pid 主题周计划主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteByThemeWeekplanitemByPId(String pid);
|
||||||
}
|
}
|
||||||
|
@ -87,4 +87,15 @@ public class ByThemeWeekplanitemServiceImpl implements IByThemeWeekplanitemServi
|
|||||||
public int deleteByThemeWeekplanitemById(Long id) {
|
public int deleteByThemeWeekplanitemById(Long id) {
|
||||||
return byThemeWeekplanitemMapper.deleteByThemeWeekplanitemById(id);
|
return byThemeWeekplanitemMapper.deleteByThemeWeekplanitemById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除主题整合周计划明细信息
|
||||||
|
*
|
||||||
|
* @param pid 主题周计划主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteByThemeWeekplanitemByPId(String pid) {
|
||||||
|
return byThemeWeekplanitemMapper.deleteByThemeWeekplanitemByPId(pid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,10 @@
|
|||||||
delete from by_theme_weekplanitem where id = #{id}
|
delete from by_theme_weekplanitem where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteByThemeWeekplanitemByPId" parameterType="String">
|
||||||
|
delete from by_theme_weekplanitem where wpid = #{wpid}
|
||||||
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteByThemeWeekplanitemByIds" parameterType="String">
|
<delete id="deleteByThemeWeekplanitemByIds" parameterType="String">
|
||||||
delete from by_theme_weekplanitem where id in
|
delete from by_theme_weekplanitem where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user