From 3cc8d1cc3662d88fe7f3666fb1f99e1b19411424 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期一, 14 七月 2025 16:59:58 +0800
Subject: [PATCH] 新功能加问题修复
---
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/CorrectionController.java | 5 +-
multi-system/src/main/resources/mapper/system/InternalAuditCheckPersonMapper.xml | 2
multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditCheckPerson.java | 6 +-
multi-system/src/main/java/com/gkhy/exam/system/service/CorrectionService.java | 2
multi-system/src/main/java/com/gkhy/exam/system/service/impl/CorrectionServiceImpl.java | 4 +-
multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditCheck.java | 4 ++
multi-system/src/main/resources/mapper/system/InternalAuditCheckMapper.xml | 13 ++++--
multi-system/src/main/resources/mapper/system/SysUserMapper.xml | 3 +
multi-system/src/main/java/com/gkhy/exam/system/domain/Correction.java | 6 +-
multi-system/src/main/java/com/gkhy/exam/system/mapper/CorrectionMapper.java | 2
multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditCheckServiceImpl.java | 11 +++--
multi-system/src/main/resources/mapper/system/CorrectionMapper.xml | 5 ++
12 files changed, 39 insertions(+), 24 deletions(-)
diff --git a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/CorrectionController.java b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/CorrectionController.java
index e5dde90..b35b019 100644
--- a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/CorrectionController.java
+++ b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/CorrectionController.java
@@ -34,10 +34,11 @@
@ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
@ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"),
@ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = false, value = "公司id"),
+ @ApiImplicitParam(paramType = "query", name = "deptId", dataType = "int", required = false, value = "部门id"),
})
@GetMapping("/selectCorrectionList")
- public CommonResult selectCorrectionList(Integer companyId){
- return CommonResult.success(correctionService.selectCorrectionList(companyId));
+ public CommonResult selectCorrectionList(Correction correction){
+ return CommonResult.success(correctionService.selectCorrectionList(correction));
}
@RepeatSubmit
@ApiOperation(value = "新增整改管理")
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/Correction.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/Correction.java
index fe001b6..a93c104 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/domain/Correction.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/Correction.java
@@ -67,9 +67,9 @@
@TableField("format")
private String format;
- @ApiModelProperty("年份")
- @TableField("year")
- private String year;
+// @ApiModelProperty("年份")
+// @TableField("year")
+// private String year;
@ApiModelProperty("部门管理")
@TableField("dept_id")
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditCheck.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditCheck.java
index 6d04814..3370520 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditCheck.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditCheck.java
@@ -86,5 +86,9 @@
@TableField("update_time")
private LocalDateTime updateTime;
+ @ApiModelProperty("部门名称")
+ @TableField(exist = false)
+ private String deptName;
+
}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditCheckPerson.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditCheckPerson.java
index 67a55e3..8c1d9d5 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditCheckPerson.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditCheckPerson.java
@@ -30,9 +30,9 @@
@TableId(value = "id", type = IdType.AUTO)
private Long id;
- @ApiModelProperty("企业id")
- @TableField("company_id")
- private Integer companyId;
+// @ApiModelProperty("企业id")
+// @TableField("company_id")
+// private Integer companyId;
@ApiModelProperty("检查id")
@TableField("audit_id")
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/mapper/CorrectionMapper.java b/multi-system/src/main/java/com/gkhy/exam/system/mapper/CorrectionMapper.java
index 3acdcc3..ad69afc 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/mapper/CorrectionMapper.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/mapper/CorrectionMapper.java
@@ -17,5 +17,5 @@
@Mapper
public interface CorrectionMapper extends BaseMapper<Correction> {
- List<Correction> selectCorrectionList(Integer companyId);
+ List<Correction> selectCorrectionList(Correction correction);
}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/CorrectionService.java b/multi-system/src/main/java/com/gkhy/exam/system/service/CorrectionService.java
index 8f33e47..abafb64 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/CorrectionService.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/CorrectionService.java
@@ -15,7 +15,7 @@
* @since 2025-07-10 15:11:50
*/
public interface CorrectionService extends IService<Correction> {
- CommonPage selectCorrectionList(Integer companyId);
+ CommonPage selectCorrectionList(Correction correction);
CommonResult insertCorrection(Correction correction);
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CorrectionServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CorrectionServiceImpl.java
index 26977f9..d87bf10 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CorrectionServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CorrectionServiceImpl.java
@@ -30,9 +30,9 @@
@Autowired
private CorrectionMapper correctionMapper;
@Override
- public CommonPage selectCorrectionList(Integer companyId) {
+ public CommonPage selectCorrectionList(Correction correction) {
PageUtils.startPage();
- List<Correction> corrections = correctionMapper.selectCorrectionList(companyId);
+ List<Correction> corrections = correctionMapper.selectCorrectionList(correction);
return CommonPage.restPage(corrections);
}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditCheckServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditCheckServiceImpl.java
index 09aa831..e066d13 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditCheckServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/InternalAuditCheckServiceImpl.java
@@ -24,6 +24,7 @@
import java.time.LocalDateTime;
import java.util.List;
+import java.util.Set;
import java.util.stream.Collectors;
/**
@@ -65,7 +66,7 @@
if (ObjectUtil.isNotEmpty(internalAuditCheck.getInternalAuditCheckPeople())){
batchInsert(internalAuditCheck.getInternalAuditCheckPeople(),internalAuditCheck1.getId());
}
-
+ return CommonResult.success();
}
return CommonResult.failed();
}
@@ -98,10 +99,10 @@
if (update > 0) {
List<InternalAuditCheckPerson> internalAuditCheckPeople = internalAuditCheck.getInternalAuditCheckPeople();
if (ObjectUtil.isNotEmpty(internalAuditCheckPeople)){
- List<Long> collect = internalAuditCheckPeople.stream().map(InternalAuditCheckPerson::getAuditUserId)
- .collect(Collectors.toList());
+ Set<Long> collect = internalAuditCheckPeople.stream().map(InternalAuditCheckPerson::getAuditUserId)
+ .collect(Collectors.toSet());
if (collect.size() != internalAuditCheckPeople.size()){
- throw new RuntimeException("选择的受审人员重复");
+ throw new RuntimeException("受审人员重复");
}
LambdaQueryWrapper<InternalAuditCheckPerson> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(InternalAuditCheckPerson::getAuditId, internalAuditCheck.getId());
@@ -196,6 +197,6 @@
List<InternalAuditCheckPerson> internalAuditCheckPeople = internalAuditCheckPersonMapper.selectList(queryWrapper);
internalAuditCheckVo.setInternalAuditCheckPeople(internalAuditCheckPeople);
- return CommonResult.success(internalAuditCheck);
+ return CommonResult.success(internalAuditCheckVo);
}
}
diff --git a/multi-system/src/main/resources/mapper/system/CorrectionMapper.xml b/multi-system/src/main/resources/mapper/system/CorrectionMapper.xml
index e18a045..2abcb11 100644
--- a/multi-system/src/main/resources/mapper/system/CorrectionMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/CorrectionMapper.xml
@@ -2,11 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gkhy.exam.system.mapper.CorrectionMapper">
- <select id="selectCorrectionList" resultType="com.gkhy.exam.system.domain.Correction" parameterType="int">
+ <select id="selectCorrectionList" resultType="com.gkhy.exam.system.domain.Correction" parameterType="com.gkhy.exam.system.domain.Correction">
select * from correction where del_flag = 0
<if test="companyId != null">
and company_id = #{companyId}
</if>
+ <if test="deptId != null">
+ and dept_id = #{deptId}
+ </if>
order by create_time desc
</select>
</mapper>
diff --git a/multi-system/src/main/resources/mapper/system/InternalAuditCheckMapper.xml b/multi-system/src/main/resources/mapper/system/InternalAuditCheckMapper.xml
index 39d7b5d..9e9637b 100644
--- a/multi-system/src/main/resources/mapper/system/InternalAuditCheckMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/InternalAuditCheckMapper.xml
@@ -17,17 +17,20 @@
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+ <result column="dept_name" jdbcType="VARCHAR" property="deptName" />
</resultMap>
<select id="selectInternalAuditCheckList" parameterType="int" resultMap="BaseResultMap">
select
- id, company_id, dept_id, audit_id, audit_date, caluse_num, caluse_content, check_record, inconsistent, del_flag, create_by, create_time, update_by, update_time
- from internal_audit_check
- where del_flag = 0
+ a.id, a.company_id, a.dept_id, b.dept_name,a.audit_id, a.audit_date, a.caluse_num, a.caluse_content, a.check_record, a.inconsistent, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time
+ from internal_audit_check a
+ left join sys_dept b on a.dept_id = b.dept_id
+
+ where a.del_flag = 0
<if test="companyId != null">
- and company_id = #{companyId}
+ and a.company_id = #{companyId}
</if>
- order by create_time desc
+ order by a.create_time desc
</select>
diff --git a/multi-system/src/main/resources/mapper/system/InternalAuditCheckPersonMapper.xml b/multi-system/src/main/resources/mapper/system/InternalAuditCheckPersonMapper.xml
index 40df54d..10f7d35 100644
--- a/multi-system/src/main/resources/mapper/system/InternalAuditCheckPersonMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/InternalAuditCheckPersonMapper.xml
@@ -7,7 +7,7 @@
insert into internal_audit_check_person (audit_user_name, audit_user_id,audit_id,create_time,create_by) values
<foreach item="item" index="index" collection="list" separator=",">
- (#{item.auditUserName}, #{item.auditUserId}, #{item.auditId},#{createTime},#{createBy}})
+ (#{item.auditUserName}, #{item.auditUserId}, #{item.auditId},#{item.createTime},#{item.createBy})
</foreach>
</insert>
diff --git a/multi-system/src/main/resources/mapper/system/SysUserMapper.xml b/multi-system/src/main/resources/mapper/system/SysUserMapper.xml
index aaa9a40..de62190 100644
--- a/multi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -73,6 +73,9 @@
<if test="userType != null">
AND u.user_type = #{userType}
</if>
+ <if test="deptId != null">
+ AND d.dept_id = #{deptId}
+ </if>
<if test="companyId != null ">
AND u.company_id = #{companyId}
</if>
--
Gitblit v1.9.2