This commit is contained in:
parent
8853c1d9b8
commit
836b0d97da
|
|
@ -2,14 +2,20 @@ package org.springblade.system.controller;
|
||||||
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springblade.common.annotation.RequiresPermissions;
|
||||||
|
import org.springblade.common.annotation.SysLog;
|
||||||
import org.springblade.common.core.controller.BaseController;
|
import org.springblade.common.core.controller.BaseController;
|
||||||
import org.springblade.common.core.domain.AjaxResult;
|
import org.springblade.common.core.domain.AjaxResult;
|
||||||
import org.springblade.common.core.page.TableDataInfo;
|
import org.springblade.common.core.page.TableDataInfo;
|
||||||
|
import org.springblade.common.enums.OperaType;
|
||||||
import org.springblade.common.utils.sql.SqlUtil;
|
import org.springblade.common.utils.sql.SqlUtil;
|
||||||
import org.springblade.core.tenant.annotation.NonDS;
|
import org.springblade.core.tenant.annotation.NonDS;
|
||||||
import org.springblade.system.domain.*;
|
import org.springblade.system.domain.*;
|
||||||
|
import org.springblade.system.mapper.FileManageMapper;
|
||||||
|
import org.springblade.system.service.FileManageService;
|
||||||
import org.springblade.system.service.ProjectService;
|
import org.springblade.system.service.ProjectService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
@ -33,6 +39,11 @@ public class ArchivingManageController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProjectService service;
|
private ProjectService service;
|
||||||
|
@Resource
|
||||||
|
private FileManageMapper fileManageMapper;
|
||||||
|
@Autowired
|
||||||
|
private FileManageService fileManageService;
|
||||||
|
|
||||||
@PostMapping("list")
|
@PostMapping("list")
|
||||||
public TableDataInfo getProjectList(@RequestBody ProjectDto dto) {
|
public TableDataInfo getProjectList(@RequestBody ProjectDto dto) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -46,7 +57,7 @@ public class ArchivingManageController extends BaseController {
|
||||||
projectDto.setDeptId(getDeptId());
|
projectDto.setDeptId(getDeptId());
|
||||||
projectDto.setAuditStatus(service.getAuditStatus(projectDto));
|
projectDto.setAuditStatus(service.getAuditStatus(projectDto));
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(dto.getAuditStatus())){
|
if (StringUtils.isNotBlank(dto.getAuditStatus())) {
|
||||||
list = list.stream().filter(projectDto -> projectDto.getAuditStatus().equals(dto.getAuditStatus())).toList();
|
list = list.stream().filter(projectDto -> projectDto.getAuditStatus().equals(dto.getAuditStatus())).toList();
|
||||||
}
|
}
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|
@ -56,6 +67,29 @@ public class ArchivingManageController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("getFileManageByDept")
|
||||||
|
@SysLog(title = "第四级档案信息", module = "档案管理->档案右侧列表", businessType = OperaType.QUERY, details = "第四级档案信息", logType = 1)
|
||||||
|
@RequiresPermissions("file:manage:query")
|
||||||
|
public TableDataInfo getFileManageByDept(@RequestBody DaKyProFilesContentsDto dto) {
|
||||||
|
if (dto.getParentId().equals("0")) {
|
||||||
|
return getDataTable(new ArrayList<>());
|
||||||
|
} else {
|
||||||
|
Integer level = fileManageMapper.getLevelById(dto);
|
||||||
|
if (level == 4) {
|
||||||
|
// 直接使用 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);
|
||||||
|
dto.setUnitName(getDeptId());
|
||||||
|
List<DaKyProFilesContentsDto> list = fileManageService.FileManage(dto);
|
||||||
|
return getDataTable(list);
|
||||||
|
} else {
|
||||||
|
return getDataTable(new ArrayList<>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("getArchivingManageFiles")
|
@PostMapping("getArchivingManageFiles")
|
||||||
@Operation(summary = "归档审核获取整改文件")
|
@Operation(summary = "归档审核获取整改文件")
|
||||||
public AjaxResult getArchivingManageFiles(@RequestBody TransferApplyDto dto) {
|
public AjaxResult getArchivingManageFiles(@RequestBody TransferApplyDto dto) {
|
||||||
|
|
@ -78,6 +112,7 @@ public class ArchivingManageController extends BaseController {
|
||||||
return AjaxResult.error("请求出错了");
|
return AjaxResult.error("请求出错了");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("agreeRectification")
|
@PostMapping("agreeRectification")
|
||||||
@Operation(summary = "同意归档")
|
@Operation(summary = "同意归档")
|
||||||
public AjaxResult agreeRectification(@RequestBody RectificationDto dto) {
|
public AjaxResult agreeRectification(@RequestBody RectificationDto dto) {
|
||||||
|
|
@ -88,6 +123,7 @@ public class ArchivingManageController extends BaseController {
|
||||||
return AjaxResult.error("请求出错了");
|
return AjaxResult.error("请求出错了");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("transferAuditDetail")
|
@PostMapping("transferAuditDetail")
|
||||||
@Operation(summary = "责任单位审核情况")
|
@Operation(summary = "责任单位审核情况")
|
||||||
public AjaxResult transferAuditDetail(@RequestBody RectificationDto dto) {
|
public AjaxResult transferAuditDetail(@RequestBody RectificationDto dto) {
|
||||||
|
|
|
||||||
|
|
@ -74,4 +74,6 @@ public interface FileManageMapper {
|
||||||
Integer updateTransferAudit(RectificationDto dto);
|
Integer updateTransferAudit(RectificationDto dto);
|
||||||
|
|
||||||
List<RectificationDto> transferAuditDetail(RectificationDto dto);
|
List<RectificationDto> transferAuditDetail(RectificationDto dto);
|
||||||
|
|
||||||
|
Integer selectAuditStatus(RectificationDto dto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -277,6 +277,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="uploadTime != null and uploadTime != ''">
|
<if test="uploadTime != null and uploadTime != ''">
|
||||||
and DATE(dkfs.create_time) = #{uploadTime}
|
and DATE(dkfs.create_time) = #{uploadTime}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="unitName != null and unitName != ''">
|
||||||
|
and dkpfc.unit_name = #{unitName}
|
||||||
|
</if>
|
||||||
order by dkpfc.create_time desc
|
order by dkpfc.create_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="selectFileManage" resultType="java.lang.Integer">
|
<select id="selectFileManage" resultType="java.lang.Integer">
|
||||||
|
|
@ -407,4 +410,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join blade_dept bd on rta.audit_dept = bd.id
|
left join blade_dept bd on rta.audit_dept = bd.id
|
||||||
where rta.pro_id = #{proId}
|
where rta.pro_id = #{proId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectAuditStatus" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count(id)
|
||||||
|
from record_transfer_audit where pro_id = #{proId} and audit_status != 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -770,6 +770,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND dkpfc.parent_id = #{parentId}
|
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.pro_id = #{proId} AND dkpfc1.pro_id = #{proId} AND dkpfc2.pro_id = #{proId} AND dkpfc3.pro_id = #{proId}
|
||||||
AND dkpfc.LEVEL = 5
|
AND dkpfc.LEVEL = 5
|
||||||
|
AND dkpfc.unit_name = #{deptId}
|
||||||
AND NOT EXISTS ( SELECT 1 FROM record_rectification_list tf WHERE tf.file_id = dkfs.id and tf.rectification_type = '1')
|
AND NOT EXISTS ( SELECT 1 FROM record_rectification_list tf WHERE tf.file_id = dkfs.id and tf.rectification_type = '1')
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ public class ProjectServiceImpl implements ProjectService {
|
||||||
List<DaKyProFilesContentsDto> list = new ArrayList<>();
|
List<DaKyProFilesContentsDto> list = new ArrayList<>();
|
||||||
for (String content : contents) {
|
for (String content : contents) {
|
||||||
dto.setParentId(content);
|
dto.setParentId(content);
|
||||||
|
dto.setDeptId(AuthUtil.getDeptId());
|
||||||
List<DaKyProFilesContentsDto> dtos = transferApplyMapper.ArchivingManageFile(dto);
|
List<DaKyProFilesContentsDto> dtos = transferApplyMapper.ArchivingManageFile(dto);
|
||||||
list.addAll(dtos);
|
list.addAll(dtos);
|
||||||
}
|
}
|
||||||
|
|
@ -147,15 +148,21 @@ public class ProjectServiceImpl implements ProjectService {
|
||||||
try {
|
try {
|
||||||
dto.setAuditDept(AuthUtil.getUser().getDeptId().toString());
|
dto.setAuditDept(AuthUtil.getUser().getDeptId().toString());
|
||||||
dto.setAuditStatus("1");
|
dto.setAuditStatus("1");
|
||||||
|
// 更新审核状态
|
||||||
fileManageMapper.updateTransferAudit(dto);
|
fileManageMapper.updateTransferAudit(dto);
|
||||||
Integer i = fileManageMapper.agreeRectification(dto);
|
// 检查是否所有部门都审核通过(0表示全部通过)
|
||||||
if (i > 0) {
|
Integer auditStatus = fileManageMapper.selectAuditStatus(dto);
|
||||||
return AjaxResult.success("归档成功");
|
if (auditStatus != null && auditStatus == 0) {
|
||||||
} else {
|
Integer i = fileManageMapper.agreeRectification(dto);
|
||||||
return AjaxResult.error("归档失败");
|
if (i != null && i > 0) {
|
||||||
|
return AjaxResult.success("归档成功");
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error("归档失败");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return AjaxResult.error("接口异常");
|
return AjaxResult.error("接口异常: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue