代码提交
This commit is contained in:
parent
c4a706cf3b
commit
6feeb99312
|
|
@ -0,0 +1,91 @@
|
|||
package org.springblade.system.controller;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springblade.common.core.controller.BaseController;
|
||||
import org.springblade.common.core.domain.AjaxResult;
|
||||
import org.springblade.common.core.page.TableDataInfo;
|
||||
import org.springblade.common.utils.sql.SqlUtil;
|
||||
import org.springblade.core.tenant.annotation.NonDS;
|
||||
import org.springblade.system.domain.*;
|
||||
import org.springblade.system.service.ProjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/12/5 - 9:29
|
||||
* 归档管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/archivingManage")
|
||||
@Slf4j
|
||||
@NonDS
|
||||
public class ArchivingManageController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ProjectService service;
|
||||
@PostMapping("list")
|
||||
public TableDataInfo getProjectList(@RequestBody ProjectDto dto) {
|
||||
try {
|
||||
// 直接使用 dto 中的分页参数
|
||||
PageHelper.startPage(dto.getPageNum() != null ? dto.getPageNum() : 1,
|
||||
dto.getPageSize() != null ? dto.getPageSize() : 10,
|
||||
SqlUtil.escapeOrderBySql(dto.getOrderBy()))
|
||||
.setReasonable(dto.getReasonable() != null ? dto.getReasonable() : true);
|
||||
List<ProjectDto> list = service.getArchivingManage(dto);
|
||||
for (ProjectDto projectDto : list) {
|
||||
projectDto.setDeptId(getDeptId());
|
||||
projectDto.setAuditStatus(service.getAuditStatus(projectDto));
|
||||
}
|
||||
if (StringUtils.isNotBlank(dto.getAuditStatus())){
|
||||
list = list.stream().filter(projectDto -> projectDto.getAuditStatus().equals(dto.getAuditStatus())).toList();
|
||||
}
|
||||
return getDataTable(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return getDataTable(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("getArchivingManageFiles")
|
||||
@Operation(summary = "归档审核获取整改文件")
|
||||
public AjaxResult getArchivingManageFiles(@RequestBody TransferApplyDto dto) {
|
||||
try {
|
||||
List<DaKyProFilesContentsDto> list = service.getArchivingManageFiles(dto);
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("addRectification")
|
||||
@Operation(summary = "下发整改")
|
||||
public AjaxResult addRectification(@RequestBody RectificationDto dto) {
|
||||
try {
|
||||
return service.addRectification(dto);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
@PostMapping("agreeRectification")
|
||||
@Operation(summary = "同意归档")
|
||||
public AjaxResult agreeRectification(@RequestBody RectificationDto dto) {
|
||||
try {
|
||||
return service.agreeRectification(dto);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -174,7 +174,7 @@ public class FileManagementController extends BaseController {
|
|||
return fileManageService.issue(dto);
|
||||
}
|
||||
@PostMapping("selectRectificationList")
|
||||
@SysLog(title = "加入整改清单", module = "档案管理->档案右侧列表", businessType = OperaType.QUERY, details = "加入整改清单", logType = 1)
|
||||
@SysLog(title = "整改清单列表", module = "档案管理->档案右侧列表", businessType = OperaType.QUERY, details = "整改清单列表", logType = 1)
|
||||
@RequiresPermissions("file:manage:rectification")
|
||||
public TableDataInfo selectRectificationList(@RequestBody RectificationDto dto) {
|
||||
// 直接使用 dto 中的分页参数
|
||||
|
|
|
|||
|
|
@ -14,9 +14,13 @@ public class ProjectDto extends PageDomain {
|
|||
*/
|
||||
private String id;
|
||||
/**
|
||||
* id
|
||||
* 工程id
|
||||
*/
|
||||
private String proId;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
|
|
@ -86,6 +90,12 @@ public class ProjectDto extends PageDomain {
|
|||
*/
|
||||
private String fileStatus;
|
||||
|
||||
/**
|
||||
* 归档审核状态 0.待审核 1.审批通过 2.审批驳回(下发整改)
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@ public class RectificationDto extends PageDomain {
|
|||
private String issuerName;
|
||||
// 下发人电话
|
||||
private String issuerPhone;
|
||||
// 整改类型(0:下发整改 1:归档审核整改)
|
||||
private String rectificationType;
|
||||
// 审核部门
|
||||
private String auditDept;
|
||||
// 审批状态 0.待审核 1.审批通过 2.审批驳回(下发整改)
|
||||
private String auditStatus;
|
||||
|
||||
private List<RectificationDto> rectificationDtos;
|
||||
|
||||
|
|
|
|||
|
|
@ -64,4 +64,12 @@ public interface FileManageMapper {
|
|||
Integer issue(RectificationDto dto);
|
||||
|
||||
Integer getRectificationFile(DaKyProFilesContentsDto dto);
|
||||
|
||||
List<String> getdeptIds(DaKyProFilesContentsDto dto);
|
||||
|
||||
Integer insertRecordTransferAudit(String deptId);
|
||||
|
||||
Integer agreeRectification(RectificationDto dto);
|
||||
|
||||
Integer updateTransferAudit(RectificationDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,8 +82,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
</insert>
|
||||
<insert id="addRectification">
|
||||
insert into record_rectification_list (file_id,pro_id,description,create_user_id,create_time)
|
||||
values (#{fileId}, #{proId}, #{description}, #{createUserId}, now())
|
||||
INSERT INTO record_rectification_list
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="fileId != null">
|
||||
file_id,
|
||||
</if>
|
||||
<if test="proId != null">
|
||||
pro_id,
|
||||
</if>
|
||||
<if test="description != null and description != ''">
|
||||
description,
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
create_user_id,
|
||||
</if>
|
||||
<if test="issueTime != null and issueTime != ''">
|
||||
issue_time,
|
||||
</if>
|
||||
<if test="rectifyStatus != null and rectifyStatus != ''">
|
||||
rectify_status,
|
||||
</if>
|
||||
<if test="issueUser != null and issueUser != ''">
|
||||
issue_user,
|
||||
</if>
|
||||
create_time,
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="fileId != null">
|
||||
#{fileId},
|
||||
</if>
|
||||
<if test="proId != null">
|
||||
#{proId},
|
||||
</if>
|
||||
<if test="description != null and description != ''">
|
||||
#{description},
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
#{createUserId},
|
||||
</if>
|
||||
<if test="issueTime != null and issueTime != ''">
|
||||
#{issueTime},
|
||||
</if>
|
||||
<if test="rectifyStatus != null and rectifyStatus != ''">
|
||||
#{rectifyStatus},
|
||||
</if>
|
||||
<if test="issueUser != null and issueUser != ''">
|
||||
#{issueUser},
|
||||
</if>
|
||||
NOW(),
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertRecordTransferAudit">
|
||||
insert into record_transfer_audit (pro_id,audit_dept,audit_status,create_time)
|
||||
values (#{proId},#{deptId}, 0, now())
|
||||
</insert>
|
||||
<update id="updateFileManage">
|
||||
UPDATE da_ky_pro_files_contents
|
||||
|
|
@ -146,9 +197,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
set
|
||||
is_issue = #{isIssue},
|
||||
issue_time = now(),
|
||||
issue_user = #{issueUser}
|
||||
issue_user = #{issueUser},
|
||||
rectify_status = '0'
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<update id="agreeRectification">
|
||||
update da_ky_project set file_status = '2' where id = #{proId}
|
||||
</update>
|
||||
<update id="updateTransferAudit">
|
||||
UPDATE record_transfer_audit
|
||||
set
|
||||
audit_status = #{auditStatus}
|
||||
WHERE pro_id = #{proId} and audit_dept = #{auditDept}
|
||||
</update>
|
||||
<delete id="delFileSource">
|
||||
DELETE FROM da_ky_sys_file_source
|
||||
WHERE business_id = #{id}
|
||||
|
|
@ -334,4 +395,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
count(id)
|
||||
from record_rectification_list where pro_id = #{proId} and rectify_status != 1
|
||||
</select>
|
||||
<select id="getdeptIds" resultType="java.lang.String">
|
||||
SELECT
|
||||
unit_name
|
||||
from da_ky_pro_files_contents where pro_id = #{proId} and level = 5 and del_flag = '1'
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -25,4 +25,9 @@ public interface ProjectMapper {
|
|||
Integer updateFileStatus(DaKyProFilesContentsDto dto);
|
||||
|
||||
ProjectDto getProjectNameById(ProjectDto dto);
|
||||
|
||||
List<ProjectDto> getArchivingManageList(ProjectDto dto);
|
||||
|
||||
String getAuditStatus(ProjectDto dto);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,8 +87,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="proStatus != null and proStatus != ''">
|
||||
AND dkp.pro_status = #{proStatus}
|
||||
</if>
|
||||
<if test="fileStatus != null and fileStatus != ''">
|
||||
AND dkp.file_status = #{fileStatus}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getArchivingManageList" resultType="org.springblade.system.domain.ProjectDto">
|
||||
SELECT
|
||||
dkp.*
|
||||
FROM
|
||||
da_ky_project dkp
|
||||
WHERE
|
||||
dkp.del_flag = '1'
|
||||
<if test="proName != null and proName != ''">
|
||||
AND INSTR(dkp.pro_name, #{proName}) > 0
|
||||
</if>
|
||||
<if test="fileStatus != null and fileStatus != ''">
|
||||
AND dkp.file_status = #{fileStatus}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="getFileCatalogSelect" resultType="org.springblade.system.domain.SelectDto">
|
||||
SELECT
|
||||
id,
|
||||
|
|
@ -155,5 +174,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
dkp.id = #{id}
|
||||
</select>
|
||||
<select id="getAuditStatus" resultType="java.lang.String">
|
||||
SELECT
|
||||
dkp.audit_status
|
||||
FROM
|
||||
record_transfer_audit dkp
|
||||
WHERE
|
||||
dkp.pro_id = #{id} and dkp.audit_dept = #{deptId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -71,4 +71,6 @@ public interface TransferApplyMapper {
|
|||
Integer updateProjectFileStatus(TransferFileDto dto);
|
||||
|
||||
Integer delRecord(TransferApplyDto dto);
|
||||
|
||||
List<DaKyProFilesContentsDto> ArchivingManageFile(TransferApplyDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -730,5 +730,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
1 ELSE 0
|
||||
END AS result
|
||||
</select>
|
||||
<select id="ArchivingManageFile" resultType="org.springblade.system.domain.DaKyProFilesContentsDto">
|
||||
SELECT
|
||||
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 dkpfc.parent_id = #{parentId}
|
||||
AND dkpfc.pro_id = #{proId} AND dkpfc1.pro_id = #{proId} AND dkpfc2.pro_id = #{proId} AND dkpfc3.pro_id = #{proId}
|
||||
AND dkpfc.LEVEL = 5
|
||||
AND NOT EXISTS ( SELECT 1 FROM record_rectification_list tf WHERE tf.file_id = dkfs.id and tf.rectification_type = '1')
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
package org.springblade.system.service;
|
||||
|
||||
import org.springblade.common.core.domain.AjaxResult;
|
||||
import org.springblade.system.domain.ArchivalCatalogueDto;
|
||||
import org.springblade.system.domain.ProjectDto;
|
||||
import org.springblade.system.domain.SelectDto;
|
||||
import org.springblade.system.domain.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -20,4 +18,14 @@ public interface ProjectService {
|
|||
AjaxResult updateContentsName(ProjectDto projectDto);
|
||||
|
||||
ProjectDto getProjectNameById(ProjectDto dto);
|
||||
|
||||
List<ProjectDto> getArchivingManage(ProjectDto dto);
|
||||
|
||||
String getAuditStatus(ProjectDto dto);
|
||||
|
||||
List<DaKyProFilesContentsDto> getArchivingManageFiles(TransferApplyDto dto);
|
||||
|
||||
AjaxResult addRectification(RectificationDto dto);
|
||||
|
||||
AjaxResult agreeRectification(RectificationDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,6 +92,12 @@ public class FileManageServiceImpl implements FileManageService {
|
|||
|
||||
@Override
|
||||
public Integer updateIntegrityStatus(DaKyProFilesContentsDto dto) {
|
||||
// 先查询需要哪些部门审核
|
||||
List<String> deptIds = fileManageMapper.getdeptIds(dto);
|
||||
for (String deptId : deptIds) {
|
||||
// 生成部门审核记录
|
||||
fileManageMapper.insertRecordTransferAudit(deptId);
|
||||
}
|
||||
fileManageMapper.updateIntegrityStatus(dto);
|
||||
return projectMapper.updateFileStatus(dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,25 @@
|
|||
package org.springblade.system.service.impl;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springblade.common.core.domain.AjaxResult;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.system.domain.ArchivalCatalogueDto;
|
||||
import org.springblade.system.domain.DaKyProFilesContentsDto;
|
||||
import org.springblade.system.domain.ProjectDto;
|
||||
import org.springblade.system.domain.SelectDto;
|
||||
import org.springblade.system.domain.*;
|
||||
import org.springblade.system.mapper.FileManageMapper;
|
||||
import org.springblade.system.mapper.ProjectMapper;
|
||||
import org.springblade.system.mapper.TransferApplyMapper;
|
||||
import org.springblade.system.service.ProjectService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/9/11 - 10:05
|
||||
|
|
@ -25,59 +27,137 @@ import java.util.List;
|
|||
@Service
|
||||
public class ProjectServiceImpl implements ProjectService {
|
||||
|
||||
@Resource
|
||||
private ProjectMapper projectMapper;
|
||||
@Resource
|
||||
private ProjectMapper projectMapper;
|
||||
|
||||
@Resource
|
||||
private FileManageMapper fileManageMapper;
|
||||
@Resource
|
||||
private FileManageMapper fileManageMapper;
|
||||
|
||||
@Override
|
||||
public List<ProjectDto> list(ProjectDto dto) {
|
||||
List<ProjectDto> list = projectMapper.list(dto);
|
||||
for (ProjectDto projectDto : list) {
|
||||
Integer num = fileManageMapper.getFilesNum(projectDto.getId());
|
||||
projectDto.setFileUplaudNum(num);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@Resource
|
||||
private TransferApplyMapper transferApplyMapper;
|
||||
|
||||
@Override
|
||||
public List<SelectDto> getFileCatalogSelect() {
|
||||
return projectMapper.getFileCatalogSelect();
|
||||
}
|
||||
@Override
|
||||
public List<ProjectDto> list(ProjectDto dto) {
|
||||
List<ProjectDto> list = projectMapper.list(dto);
|
||||
for (ProjectDto projectDto : list) {
|
||||
Integer num = fileManageMapper.getFilesNum(projectDto.getId());
|
||||
projectDto.setFileUplaudNum(num);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult updateContentsName(ProjectDto projectDto) {
|
||||
try {
|
||||
Integer num = projectMapper.updateContentsName(projectDto);
|
||||
if (num > 0) {
|
||||
// 档案管理中新增该工程下所有目录
|
||||
List<ArchivalCatalogueDto> list = projectMapper.getfilesContentsById(projectDto);
|
||||
for (ArchivalCatalogueDto archivalCatalogueDto : list) {
|
||||
DaKyProFilesContentsDto dakyProFilesContentsDto = new DaKyProFilesContentsDto();
|
||||
BeanUtils.copyProperties(archivalCatalogueDto, dakyProFilesContentsDto);
|
||||
dakyProFilesContentsDto.setId(archivalCatalogueDto.getId().toString());
|
||||
dakyProFilesContentsDto.setParentId(archivalCatalogueDto.getParentId().toString());
|
||||
dakyProFilesContentsDto.setCreateUserId(AuthUtil.getUser().getUserId());
|
||||
dakyProFilesContentsDto.setCreateUserName(AuthUtil.getUser().getUserName());
|
||||
dakyProFilesContentsDto.setProId(projectDto.getProId());
|
||||
dakyProFilesContentsDto.setDataSource("1");
|
||||
dakyProFilesContentsDto.setIsUnique("0");
|
||||
projectMapper.insertDakyProFilesContents(dakyProFilesContentsDto);
|
||||
}
|
||||
return AjaxResult.success("配置成功");
|
||||
} else {
|
||||
return AjaxResult.error("配置失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("接口异常");
|
||||
}
|
||||
@Override
|
||||
public List<SelectDto> getFileCatalogSelect() {
|
||||
return projectMapper.getFileCatalogSelect();
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult updateContentsName(ProjectDto projectDto) {
|
||||
try {
|
||||
Integer num = projectMapper.updateContentsName(projectDto);
|
||||
if (num > 0) {
|
||||
// 档案管理中新增该工程下所有目录
|
||||
List<ArchivalCatalogueDto> list = projectMapper.getfilesContentsById(projectDto);
|
||||
for (ArchivalCatalogueDto archivalCatalogueDto : list) {
|
||||
DaKyProFilesContentsDto dakyProFilesContentsDto = new DaKyProFilesContentsDto();
|
||||
BeanUtils.copyProperties(archivalCatalogueDto, dakyProFilesContentsDto);
|
||||
dakyProFilesContentsDto.setId(archivalCatalogueDto.getId().toString());
|
||||
dakyProFilesContentsDto.setParentId(archivalCatalogueDto.getParentId().toString());
|
||||
dakyProFilesContentsDto.setCreateUserId(AuthUtil.getUser().getUserId());
|
||||
dakyProFilesContentsDto.setCreateUserName(AuthUtil.getUser().getUserName());
|
||||
dakyProFilesContentsDto.setProId(projectDto.getProId());
|
||||
dakyProFilesContentsDto.setDataSource("1");
|
||||
dakyProFilesContentsDto.setIsUnique("0");
|
||||
projectMapper.insertDakyProFilesContents(dakyProFilesContentsDto);
|
||||
}
|
||||
return AjaxResult.success("配置成功");
|
||||
} else {
|
||||
return AjaxResult.error("配置失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("接口异常");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectDto getProjectNameById(ProjectDto dto) {
|
||||
return projectMapper.getProjectNameById(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectDto> getArchivingManage(ProjectDto dto) {
|
||||
dto.setFileStatus("1");
|
||||
return projectMapper.getArchivingManageList(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAuditStatus(ProjectDto dto) {
|
||||
return projectMapper.getAuditStatus(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DaKyProFilesContentsDto> getArchivingManageFiles(TransferApplyDto dto) {
|
||||
List<String> contents = transferApplyMapper.getTransferApplyFilesContents(dto);
|
||||
List<DaKyProFilesContentsDto> list = new ArrayList<>();
|
||||
for (String content : contents) {
|
||||
dto.setParentId(content);
|
||||
List<DaKyProFilesContentsDto> dtos = transferApplyMapper.ArchivingManageFile(dto);
|
||||
list.addAll(dtos);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult addRectification(RectificationDto dto) {
|
||||
try {
|
||||
dto.setCreateUserId(AuthUtil.getUser().getUserId());
|
||||
dto.setIsRectification("1");
|
||||
dto.setRectificationType("1");
|
||||
Integer i = 0;
|
||||
for (String s : dto.getFileId().split(",")) {
|
||||
dto.setFileId(s);
|
||||
fileManageMapper.updateisRectification(dto);
|
||||
dto.setIssueUser(AuthUtil.getUser().getUserId().toString());
|
||||
dto.setRectifyStatus("0");
|
||||
LocalDateTime currentDateTime = LocalDateTime.now();
|
||||
// 定义完整日期时间格式
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
// 格式化当前日期时间
|
||||
dto.setIssueTime(currentDateTime.format(formatter));
|
||||
i += fileManageMapper.addRectification(dto);
|
||||
}
|
||||
dto.setAuditDept(AuthUtil.getUser().getDeptId().toString());
|
||||
dto.setAuditStatus("2");
|
||||
fileManageMapper.updateTransferAudit(dto);
|
||||
if (i > 0) {
|
||||
return AjaxResult.success("添加整改成功");
|
||||
} else {
|
||||
return AjaxResult.error("添加整改失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("接口异常");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult agreeRectification(RectificationDto dto) {
|
||||
try {
|
||||
dto.setAuditDept(AuthUtil.getUser().getDeptId().toString());
|
||||
dto.setAuditStatus("1");
|
||||
fileManageMapper.updateTransferAudit(dto);
|
||||
Integer i = fileManageMapper.agreeRectification(dto);
|
||||
if (i > 0) {
|
||||
return AjaxResult.success("归档成功");
|
||||
} else {
|
||||
return AjaxResult.error("归档失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("接口异常");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue