This commit is contained in:
parent
8853c1d9b8
commit
836b0d97da
|
|
@ -2,14 +2,20 @@ package org.springblade.system.controller;
|
|||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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.domain.AjaxResult;
|
||||
import org.springblade.common.core.page.TableDataInfo;
|
||||
import org.springblade.common.enums.OperaType;
|
||||
import org.springblade.common.utils.sql.SqlUtil;
|
||||
import org.springblade.core.tenant.annotation.NonDS;
|
||||
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.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
|
@ -33,6 +39,11 @@ public class ArchivingManageController extends BaseController {
|
|||
|
||||
@Autowired
|
||||
private ProjectService service;
|
||||
@Resource
|
||||
private FileManageMapper fileManageMapper;
|
||||
@Autowired
|
||||
private FileManageService fileManageService;
|
||||
|
||||
@PostMapping("list")
|
||||
public TableDataInfo getProjectList(@RequestBody ProjectDto dto) {
|
||||
try {
|
||||
|
|
@ -46,7 +57,7 @@ public class ArchivingManageController extends BaseController {
|
|||
projectDto.setDeptId(getDeptId());
|
||||
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();
|
||||
}
|
||||
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")
|
||||
@Operation(summary = "归档审核获取整改文件")
|
||||
public AjaxResult getArchivingManageFiles(@RequestBody TransferApplyDto dto) {
|
||||
|
|
@ -78,6 +112,7 @@ public class ArchivingManageController extends BaseController {
|
|||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("agreeRectification")
|
||||
@Operation(summary = "同意归档")
|
||||
public AjaxResult agreeRectification(@RequestBody RectificationDto dto) {
|
||||
|
|
@ -88,6 +123,7 @@ public class ArchivingManageController extends BaseController {
|
|||
return AjaxResult.error("请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("transferAuditDetail")
|
||||
@Operation(summary = "责任单位审核情况")
|
||||
public AjaxResult transferAuditDetail(@RequestBody RectificationDto dto) {
|
||||
|
|
|
|||
|
|
@ -74,4 +74,6 @@ public interface FileManageMapper {
|
|||
Integer updateTransferAudit(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 != ''">
|
||||
and DATE(dkfs.create_time) = #{uploadTime}
|
||||
</if>
|
||||
<if test="unitName != null and unitName != ''">
|
||||
and dkpfc.unit_name = #{unitName}
|
||||
</if>
|
||||
order by dkpfc.create_time desc
|
||||
</select>
|
||||
<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
|
||||
where rta.pro_id = #{proId}
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -770,6 +770,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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 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')
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ public class ProjectServiceImpl implements ProjectService {
|
|||
List<DaKyProFilesContentsDto> list = new ArrayList<>();
|
||||
for (String content : contents) {
|
||||
dto.setParentId(content);
|
||||
dto.setDeptId(AuthUtil.getDeptId());
|
||||
List<DaKyProFilesContentsDto> dtos = transferApplyMapper.ArchivingManageFile(dto);
|
||||
list.addAll(dtos);
|
||||
}
|
||||
|
|
@ -147,15 +148,21 @@ public class ProjectServiceImpl implements ProjectService {
|
|||
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("归档失败");
|
||||
// 检查是否所有部门都审核通过(0表示全部通过)
|
||||
Integer auditStatus = fileManageMapper.selectAuditStatus(dto);
|
||||
if (auditStatus != null && auditStatus == 0) {
|
||||
Integer i = fileManageMapper.agreeRectification(dto);
|
||||
if (i != null && i > 0) {
|
||||
return AjaxResult.success("归档成功");
|
||||
} else {
|
||||
return AjaxResult.error("归档失败");
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("接口异常");
|
||||
return AjaxResult.error("接口异常: " + e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue