代码提交

This commit is contained in:
liang.chao 2025-09-19 15:47:55 +08:00
parent 39783dfdf4
commit a942cf0ee0
5 changed files with 59 additions and 0 deletions

View File

@ -147,4 +147,14 @@ public class TransferApplyController extends BaseController {
return AjaxResult.error();
}
}
@GetMapping("getTransferApplyFilesByApplyId")
public AjaxResult getTransferApplyFilesByApplyId(TransferApplyDto dto) {
try {
List<DaKyProFilesContentsDto> list = transferApplyService.getTransferApplyFilesByApplyId(dto);
return AjaxResult.success(list);
} catch (Exception e) {
log.error(e.toString(), e);
return AjaxResult.error();
}
}
}

View File

@ -48,4 +48,6 @@ public interface TransferApplyMapper {
String getProNameById(TransferApplyDto dto);
Integer updateTransferRecordFile(TransferFileDto dto);
List<DaKyProFilesContentsDto> getTransferApplyFilesByApplyId(TransferApplyDto dto);
}

View File

@ -35,4 +35,6 @@ public interface TransferApplyService {
List<TransferFileDto> getTransferRecordFiles(TransferFileDto dto);
AjaxResult updateTransferRecordFile(TransferFileDto dto);
List<DaKyProFilesContentsDto> getTransferApplyFilesByApplyId(TransferApplyDto dto);
}

View File

@ -139,4 +139,9 @@ public class TransferApplyServiceImpl implements TransferApplyService {
Integer i = transferApplyMapper.updateTransferRecordFile(dto);
return i > 0 ? AjaxResult.success("修改成功") : AjaxResult.error("修改失败");
}
@Override
public List<DaKyProFilesContentsDto> getTransferApplyFilesByApplyId(TransferApplyDto dto) {
return transferApplyMapper.getTransferApplyFilesByApplyId(dto);
}
}

View File

@ -471,5 +471,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
id = #{id}
</select>
<select id="getTransferApplyFilesByApplyId" resultType="com.bonus.web.domain.DaKyProFilesContentsDto">
SELECT distinct
dkpfc.id AS id,
dkpfc.pro_id AS proId,
dkpfc.content_name AS contentName,
dkpfc.parent_id AS parentId,
dkpfc.LEVEL AS LEVEL,
dkpfc.sort AS sort,
dkpfc.mark_code AS markCode,
dkpfc.term AS term,
concat(dkpfc3.content_name,'/',dkpfc2.content_name) AS parParentName,
dkpfc1.content_name AS parentName,
dkpfc.unit_name AS unitName,
CASE
WHEN dkpfc.data_source = '1' THEN
'本系统上传'
WHEN dkpfc.data_source = '2' THEN
'智慧现场' ELSE ''
END AS dataSource,
dkpfc.is_unique AS isUnique,
dkpfc.integrity_status AS integrityStatus,
dkfs.id AS fileId,
dkfs.file_name AS fileName,
dkfs.file_path AS filePath,
dkfs.create_time AS createTime,
dkfs.source_file_name AS sourceFileName,
dkfs.create_user_name AS createUserName
FROM
da_ky_pro_files_contents dkpfc
left join da_ky_pro_files_contents dkpfc1 on dkpfc.parent_id = dkpfc1.id
left join da_ky_pro_files_contents dkpfc2 on dkpfc1.parent_id = dkpfc2.id
left join da_ky_pro_files_contents dkpfc3 on dkpfc2.parent_id = dkpfc3.id
LEFT JOIN da_ky_sys_file_source dkfs ON dkpfc.id = dkfs.business_id
LEFT JOIN da_ky_transfer_file fs ON dkfs.id = fs.file_source_id
WHERE
dkpfc.del_flag = '1' and
fs.transfer_apply_id = #{id}
AND dkpfc.LEVEL = 5
</select>
</mapper>