代码提交
This commit is contained in:
parent
ae46ab4484
commit
79784b1e2a
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import lombok.Data;
|
|||
import org.hibernate.validator.constraints.Length;
|
||||
import org.springblade.common.core.page.PageDomain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2025/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;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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("请求出错了");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue