Compare commits

...

2 Commits

Author SHA1 Message Date
liang.chao 13cf881db1 代码提交 2025-12-04 15:15:54 +08:00
liang.chao 79784b1e2a 代码提交 2025-12-04 10:59:01 +08:00
13 changed files with 148 additions and 7 deletions

View File

@ -84,6 +84,15 @@ public class FileManagementController extends BaseController {
return getDataTable(new ArrayList<>());
}
}
@PostMapping("getProjectNameById")
public AjaxResult getProjectNameById(@RequestBody ProjectDto dto) {
try {
return AjaxResult.success(service.getProjectNameById(dto));
} catch (Exception e) {
log.error(e.toString(), e);
return AjaxResult.error("请求出错了");
}
}
@PostMapping("getFileManageTree")
@SysLog(title = "档案管理树", module = "档案管理->档案左侧树", businessType = OperaType.QUERY, details = "档案管理树", logType = 1)
@ -370,6 +379,10 @@ public class FileManagementController extends BaseController {
@RequiresPermissions("file:manage:confirm")
public R updateIntegrityStatus(@RequestBody DaKyProFilesContentsDto dto) {
try {
// 该工程下若存在整改文件则不能进行移交
if (fileManageMapper.getRectificationFile(dto) > 0) {
return R.fail("该工程下存在整改文件,请先处理整改文件");
}
Integer i = fileManageService.updateIntegrityStatus(dto);
if (i > 0) {
return R.ok();

View File

@ -15,6 +15,7 @@ import org.springblade.system.domain.ProjectDto;
import org.springblade.system.domain.RectificationDto;
import org.springblade.system.service.RectFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@ -65,4 +66,22 @@ public class RectFeedbackController extends BaseController {
return new AjaxResult(500, "请求出错了");
}
}
@PostMapping("rectify")
@SysLog(title = "整改提交", module = "数据档案移交->整改反馈", businessType = OperaType.INSERT, details = "整改提交", logType = 1)
@RequiresPermissions("rectify:feedback:rectify")
public AjaxResult rectify(@RequestBody @Validated RectificationDto dto) {
return service.rectify(dto);
}
@PostMapping("rectifyPass")
@SysLog(title = "整改通过", module = "数据档案移交->整改反馈", businessType = OperaType.INSERT, details = "整改通过", logType = 1)
@RequiresPermissions("rectify:feedback:rectify")
public AjaxResult rectifyPass(@RequestBody RectificationDto dto) {
return service.rectifyPass(dto);
}
@PostMapping("rectifyRefuse")
@SysLog(title = "整改驳回", module = "数据档案移交->整改反馈", businessType = OperaType.INSERT, details = "整改驳回", logType = 1)
@RequiresPermissions("rectify:feedback:rectify")
public AjaxResult rectifyRefuse(@RequestBody @Validated RectificationDto dto) {
return service.rectifyRefuse(dto);
}
}

View File

@ -5,6 +5,8 @@ import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springblade.common.core.page.PageDomain;
import java.util.List;
/**
* @Authorliang.chao
* @Date2025/12/2 - 13:41
@ -12,11 +14,12 @@ import org.springblade.common.core.page.PageDomain;
@Data
public class RectificationDto extends PageDomain {
private String id;
private String name;
private String[] ids;
private String fileId;
private String proId;
@NotBlank(message = "整改描述不能为空")
@Length(max = 64, message = "整改描述不能超过64个字符")
@NotBlank(message = "描述不能为空")
@Length(max = 64, message = "描述不能超过64个字符")
private String description;
private String proName;
private String singleProName;
@ -42,4 +45,6 @@ public class RectificationDto extends PageDomain {
// 下发人电话
private String issuerPhone;
private List<RectificationDto> rectificationDtos;
}

View File

@ -62,4 +62,6 @@ public interface FileManageMapper {
Integer delRectification(RectificationDto dto);
Integer issue(RectificationDto dto);
Integer getRectificationFile(DaKyProFilesContentsDto dto);
}

View File

@ -302,7 +302,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getchild" resultType="java.lang.Integer">
SELECT
count(dkpfc.id)
FROM·
FROM
da_ky_pro_files_contents dkpfc
left join da_ky_pro_files_contents dkpfc2 on dkpfc.parent_id = dkpfc2.id
WHERE
@ -329,4 +329,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and concat( dkpfc4.content_name, '/', dkpfc3.content_name, '/', dkpfc2.content_name, '/', dkpfc.content_name, '/', dksfs.file_name ) like concat('%', #{contentName}, '%')
</if>
</select>
<select id="getRectificationFile" resultType="java.lang.Integer">
SELECT
count(id)
from record_rectification_list where pro_id = #{proId} and rectify_status != 1
</select>
</mapper>

View File

@ -23,4 +23,6 @@ public interface ProjectMapper {
List<ArchivalCatalogueDto> getfilesContentsById(ProjectDto projectDto);
Integer updateFileStatus(DaKyProFilesContentsDto dto);
ProjectDto getProjectNameById(ProjectDto dto);
}

View File

@ -146,4 +146,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
SELECT * FROM child_nodes ORDER BY id asc
</select>
<select id="getProjectNameById" resultType="org.springblade.system.domain.ProjectDto">
SELECT
dkp.pro_name
FROM
da_ky_project dkp
WHERE
dkp.id = #{id}
</select>
</mapper>

View File

@ -12,4 +12,10 @@ public interface RectFeedbackMapper {
List<RectificationDto> list(RectificationDto projectDto);
RectificationDto detail(RectificationDto dto);
Integer rectify(RectificationDto dto);
Integer saveRecord(RectificationDto dto);
List<RectificationDto> getRecordDetails(RectificationDto detail);
}

View File

@ -3,6 +3,15 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.system.mapper.RectFeedbackMapper">
<insert id="saveRecord">
INSERT INTO record_rectification(rectification_id, description,create_user_id,create_time)
VALUES (#{id}, #{description},#{createUserId},NOW())
</insert>
<update id="rectify">
UPDATE record_rectification_list
SET rectify_status = #{rectifyStatus}
WHERE id = #{id}
</update>
<select id="list" resultType="org.springblade.system.domain.RectificationDto">
SELECT
@ -21,8 +30,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join da_ky_pro_files_contents dkpfc on dksfs.business_id = dkpfc.id
left join blade_dept bd on bd.id = dkpfc.unit_name
WHERE 1=1
<if test="proName != null and proName != ''">
and dkp.pro_name like concat('%',#{proName},'%')
<if test="singleProName != null and singleProName != ''">
and dkp.single_pro_name like concat('%',#{singleProName},'%')
</if>
<if test="rectifyStatus != null">
and rrl.rectify_status = #{rectifyStatus}
@ -36,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
dkp.single_pro_name AS singleProName,
concat( dkpfc4.content_name, '/', dkpfc3.content_name, '/', dkpfc2.content_name, '/', dkpfc.content_name, '/', dksfs.file_name ) AS contentName,
rrl.description,
rrl.rectify_status AS rectifyStatus,
bu.name AS issuerName,
bu.phone AS issuerPhone,
bd.dept_name AS deptName,
@ -52,4 +62,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE rrl.pro_id = #{proId} and dkpfc.pro_id = #{proId} and dkpfc2.pro_id = #{proId} and dkpfc3.pro_id = #{proId} and dkpfc4.pro_id = #{proId}
and rrl.id = #{id}
</select>
<select id="getRecordDetails" resultType="org.springblade.system.domain.RectificationDto">
select bu.name, rr.description
from record_rectification rr
left join blade_user bu on bu.id = rr.create_user_id
where rectification_id = #{id} order by rr.create_time desc
</select>
</mapper>

View File

@ -18,4 +18,6 @@ public interface ProjectService {
List<SelectDto> getFileCatalogSelect();
AjaxResult updateContentsName(ProjectDto projectDto);
ProjectDto getProjectNameById(ProjectDto dto);
}

View File

@ -1,5 +1,6 @@
package org.springblade.system.service;
import org.springblade.common.core.domain.AjaxResult;
import org.springblade.system.domain.RectificationDto;
import java.util.List;
@ -12,4 +13,8 @@ public interface RectFeedbackService {
List<RectificationDto> list(RectificationDto dto);
RectificationDto detail(RectificationDto dto);
AjaxResult rectify(RectificationDto dto);
AjaxResult rectifyPass(RectificationDto dto);
AjaxResult rectifyRefuse(RectificationDto dto);
}

View File

@ -75,4 +75,9 @@ public class ProjectServiceImpl implements ProjectService {
}
}
@Override
public ProjectDto getProjectNameById(ProjectDto dto) {
return projectMapper.getProjectNameById(dto);
}
}

View File

@ -1,11 +1,13 @@
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.RectificationDto;
import org.springblade.system.mapper.RectFeedbackMapper;
import org.springblade.system.service.RectFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@ -17,6 +19,7 @@ import java.util.List;
public class RectFeedbackServiceImpl implements RectFeedbackService {
@Resource
private RectFeedbackMapper rectFeedbackMapper;
@Override
public List<RectificationDto> list(RectificationDto dto) {
return rectFeedbackMapper.list(dto);
@ -24,6 +27,55 @@ public class RectFeedbackServiceImpl implements RectFeedbackService {
@Override
public RectificationDto detail(RectificationDto dto) {
return rectFeedbackMapper.detail(dto);
RectificationDto detail = rectFeedbackMapper.detail(dto);
List<RectificationDto> recordDetails = rectFeedbackMapper.getRecordDetails(detail);
detail.setRectificationDtos(recordDetails);
return detail;
}
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult rectify(RectificationDto dto) {
try {
// 整改完后变成待审核
dto.setRectifyStatus("3");
dto.setCreateUserId(AuthUtil.getUserId());
Integer result = rectFeedbackMapper.rectify(dto);
rectFeedbackMapper.saveRecord(dto);
return result > 0 ? AjaxResult.success("整改成功") : AjaxResult.error("整改失败");
} catch (Exception e) {
return AjaxResult.error("请求出错了");
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult rectifyPass(RectificationDto dto) {
try {
// 整改完后变成通过
dto.setRectifyStatus("1");
dto.setCreateUserId(AuthUtil.getUserId());
dto.setDescription("通过");
Integer result = rectFeedbackMapper.rectify(dto);
rectFeedbackMapper.saveRecord(dto);
return result > 0 ? AjaxResult.success("整改通过") : AjaxResult.error("通过失败");
} catch (Exception e) {
return AjaxResult.error("请求出错了");
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult rectifyRefuse(RectificationDto dto) {
try {
// 整改完后变成驳回
dto.setRectifyStatus("2");
dto.setCreateUserId(AuthUtil.getUserId());
Integer result = rectFeedbackMapper.rectify(dto);
rectFeedbackMapper.saveRecord(dto);
return result > 0 ? AjaxResult.success("整改通过") : AjaxResult.error("通过失败");
} catch (Exception e) {
return AjaxResult.error("请求出错了");
}
}
}