代码提交

This commit is contained in:
liang.chao 2025-12-02 17:45:51 +08:00
parent 03cac72a88
commit 64a71b0312
6 changed files with 63 additions and 4 deletions

View File

@ -146,6 +146,18 @@ public class FileManagementController extends BaseController {
public AjaxResult addRectification(@RequestBody @Validated RectificationDto dto) {
return fileManageService.addRectification(dto);
}
@PostMapping("updateRectification")
@SysLog(title = "加入整改清单", module = "档案管理->档案右侧列表", businessType = OperaType.QUERY, details = "修改整改清单", logType = 1)
@RequiresPermissions("file:manage:rectification")
public AjaxResult updateRectification(@RequestBody @Validated RectificationDto dto) {
return fileManageService.updateRectification(dto);
}
@PostMapping("delRectification")
@SysLog(title = "加入整改清单", module = "档案管理->档案右侧列表", businessType = OperaType.QUERY, details = "删除整改清单", logType = 1)
@RequiresPermissions("file:manage:rectification")
public AjaxResult delRectification(@RequestBody RectificationDto dto) {
return fileManageService.delRectification(dto);
}
@PostMapping("selectRectificationList")
@SysLog(title = "加入整改清单", module = "档案管理->档案右侧列表", businessType = OperaType.QUERY, details = "加入整改清单", logType = 1)
@RequiresPermissions("file:manage:rectification")

View File

@ -11,6 +11,7 @@ import org.springblade.common.core.page.PageDomain;
*/
@Data
public class RectificationDto extends PageDomain {
private String id;
private String fileId;
private String proId;
@NotBlank(message = "不能为空")
@ -23,5 +24,6 @@ public class RectificationDto extends PageDomain {
private String createTime;
private Long updateUserId;
private String updateTime;
private String isRectification;
}

View File

@ -53,7 +53,11 @@ public interface FileManageMapper {
Integer addRectification(RectificationDto dto);
Integer updateisRectification(String fileId);
Integer updateisRectification(RectificationDto dto);
List<RectificationDto> selectRectificationList(RectificationDto dto);
Integer updateRectification(RectificationDto dto);
Integer delRectification(RectificationDto dto);
}

View File

@ -130,9 +130,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateisRectification">
UPDATE da_ky_sys_file_source
set
is_rectification = '1'
is_rectification = #{isRectification}
WHERE id = #{fileId}
</update>
<update id="updateRectification">
UPDATE record_rectification_list
set
description = #{description},
update_user_id = #{updateUserId},
update_time = now()
WHERE id = #{id}
</update>
<delete id="delFileSource">
DELETE FROM da_ky_sys_file_source
WHERE business_id = #{id}
@ -141,8 +149,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
DELETE FROM da_ky_pro_files_contents
WHERE id = #{id}
</delete>
<delete id="delRectification">
DELETE FROM record_rectification_list
WHERE id = #{id}
</delete>
<select id="list" resultType="org.springblade.system.domain.DaKyProFilesContentsDto">
<select id="list" resultType="org.springblade.system.domain.DaKyProFilesContentsDto">
SELECT
dkp.*,
COALESCE(dkp2.content_name, dkp.content_name) AS parentName
@ -289,6 +301,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectRectificationList" resultType="org.springblade.system.domain.RectificationDto">
SELECT
rrl.id,
rrl.file_id AS fileId,
dkp.pro_name AS proName,
dkp.single_pro_name AS singleProName,
concat( dkpfc4.content_name, ' / ', dkpfc3.content_name, ' / ', dkpfc2.content_name, ' / ', dkpfc.content_name, ' / ', dksfs.file_name ) AS contentName,

View File

@ -38,6 +38,9 @@ public interface FileManageService {
DaKyProFilesContentsVo getFileById(Long id);
AjaxResult addRectification(RectificationDto dto);
AjaxResult updateRectification(RectificationDto dto);
List<RectificationDto> selectRectificationList(RectificationDto dto);
AjaxResult delRectification(RectificationDto dto);
}

View File

@ -138,7 +138,8 @@ public class FileManageServiceImpl implements FileManageService {
@Override
public AjaxResult addRectification(RectificationDto dto) {
dto.setCreateUserId(AuthUtil.getUser().getUserId());
fileManageMapper.updateisRectification(dto.getFileId());
dto.setIsRectification("1");
fileManageMapper.updateisRectification(dto);
Integer i = fileManageMapper.addRectification(dto);
if (i > 0) {
return AjaxResult.success("添加整改成功");
@ -147,8 +148,31 @@ public class FileManageServiceImpl implements FileManageService {
}
}
@Override
public AjaxResult updateRectification(RectificationDto dto) {
dto.setUpdateUserId(AuthUtil.getUser().getUserId());
Integer i = fileManageMapper.updateRectification(dto);
if (i > 0) {
return AjaxResult.success("修改成功");
} else {
return AjaxResult.error("修改失败");
}
}
@Override
public List<RectificationDto> selectRectificationList(RectificationDto dto) {
return fileManageMapper.selectRectificationList(dto);
}
@Override
public AjaxResult delRectification(RectificationDto dto) {
dto.setIsRectification("0");
fileManageMapper.updateisRectification(dto);
Integer i = fileManageMapper.delRectification(dto);
if (i > 0) {
return AjaxResult.success("移除成功");
} else {
return AjaxResult.error("移除失败");
}
}
}