From 6b652d0e9269156936a1d6425829e104b7e680b5 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期五, 14 十一月 2025 13:21:48 +0800
Subject: [PATCH] 功能修改
---
multi-system/src/main/java/com/gkhy/exam/system/service/MemoService.java | 26 +
multi-system/src/main/java/com/gkhy/exam/system/mapper/EmployeeRecordMapper.java | 24 +
multi-common/src/main/java/com/gkhy/exam/common/domain/entity/SysUser.java | 41 -
multi-system/src/main/java/com/gkhy/exam/system/domain/vo/IndexDataRep.java | 16
multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/EmployeeRecordController.java | 67 +++
multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysUserController.java | 11
multi-system/src/main/java/com/gkhy/exam/system/domain/Memo.java | 55 ++
multi-system/src/main/java/com/gkhy/exam/system/domain/req/EmployeeRecordReq.java | 32 +
multi-system/src/main/resources/mapper/system/SysNoticeMapper.xml | 49 +
multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysNoticeServiceImpl.java | 1
multi-system/src/main/java/com/gkhy/exam/system/domain/EmployeeRecord.java | 118 +++++
multi-system/src/main/java/com/gkhy/exam/system/service/impl/MemoServiceImpl.java | 85 ++++
multi-system/src/main/java/com/gkhy/exam/system/mapper/SysUserMapper.java | 3
multi-system/src/main/java/com/gkhy/exam/system/service/SysUserService.java | 2
multi-system/src/main/java/com/gkhy/exam/system/domain/SysNotice.java | 38 +
multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/MemoController.java | 60 +++
multi-system/src/main/java/com/gkhy/exam/system/domain/DTO/KnowledgeImportDTO.java | 2
multi-system/src/main/java/com/gkhy/exam/system/domain/vo/SpSysUser.java | 29 +
multi-system/src/main/resources/mapper/system/SysUserMapper.xml | 108 ++++
multi-system/src/main/java/com/gkhy/exam/system/mapper/MemoMapper.java | 23 +
multi-system/src/main/java/com/gkhy/exam/system/service/impl/EmployeeRecordServiceImpl.java | 60 +++
multi-system/src/main/java/com/gkhy/exam/system/domain/vo/EmployeeRecordVO.java | 49 ++
multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExternalKnowledgeServiceImpl.java | 9
multi-system/src/main/java/com/gkhy/exam/system/service/EmployeeRecordService.java | 27 +
multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysUserServiceImpl.java | 99 ++++
multi-system/src/main/resources/mapper/system/ExternalKnowledgeMapper.xml | 3
multi-system/src/main/resources/mapper/system/EmployeeRecordMapper.xml | 51 ++
multi-system/src/main/java/com/gkhy/exam/system/domain/InformationPlatform.java | 6
multi-system/src/main/java/com/gkhy/exam/system/domain/ExternalKnowledge.java | 2
multi-system/src/main/resources/mapper/system/MemoMapper.xml | 58 ++
multi-system/src/main/java/com/gkhy/exam/system/domain/vo/IndexSearch.java | 11
31 files changed, 1,081 insertions(+), 84 deletions(-)
diff --git a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/EmployeeRecordController.java b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/EmployeeRecordController.java
new file mode 100644
index 0000000..fe7afca
--- /dev/null
+++ b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/EmployeeRecordController.java
@@ -0,0 +1,67 @@
+package com.gkhy.exam.admin.controller.system;
+
+
+import com.gkhy.exam.common.annotation.RepeatSubmit;
+import com.gkhy.exam.common.api.CommonResult;
+import com.gkhy.exam.system.domain.AnnualVerificationPlan;
+import com.gkhy.exam.system.domain.EmployeeRecord;
+import com.gkhy.exam.system.domain.req.EmployeeRecordReq;
+import com.gkhy.exam.system.service.EmployeeRecordService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * <p>
+ * 人员档案 前端控制器
+ * </p>
+ *
+ * @author hh
+ * @since 2025-11-11 13:54:12
+ */
+@RestController
+@RequestMapping("/system/employee-record")
+@Api(tags = "人员档案")
+public class EmployeeRecordController{
+
+
+ @Autowired
+ private EmployeeRecordService employeeRecordService;
+
+
+ @ApiOperation(value = "人员档案列表(分页)")
+ @ApiImplicitParams({
+ @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 = "name", dataType = "String", required = false, value = "姓名"),
+ @ApiImplicitParam(paramType = "query", name = "phone", dataType = "String", required = false, value = "手机号码"),
+ @ApiImplicitParam(paramType = "query", name = "qualification", dataType = "int", required = false, value = "学历1、高中及以下2、专科3、本科4、硕士5、博士及以上"),
+ @ApiImplicitParam(paramType = "query", name = "idCard", dataType = "String", required = false, value = "身份证号"),
+
+ })
+ @GetMapping("/selectEmployeeRecordList")
+ public CommonResult selectEmployeeRecordList(EmployeeRecordReq employeeRecordReq){
+ return CommonResult.success(employeeRecordService.selectEmployeeRecordList(employeeRecordReq));
+ }
+ @RepeatSubmit
+ @ApiOperation(value = "编辑人员档案")
+ @PostMapping("/saveEmployeeRecord")
+ public CommonResult saveEmployeeRecord(@RequestBody @Validated EmployeeRecord employeeRecord){
+ return employeeRecordService.saveEmployeeRecord(employeeRecord);
+ }
+
+
+ @ApiOperation(value = "人员档案列表")
+ @GetMapping("/getEmployeeRecordList")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = true, value = "公司id")
+ })
+ public CommonResult getEmployeeRecordList(@RequestParam("companyId") Long companyId){
+ return employeeRecordService.getEmployeeRecordList(companyId);
+ }
+}
diff --git a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/MemoController.java b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/MemoController.java
new file mode 100644
index 0000000..62e89ff
--- /dev/null
+++ b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/MemoController.java
@@ -0,0 +1,60 @@
+package com.gkhy.exam.admin.controller.system;
+
+
+import com.gkhy.exam.common.annotation.Log;
+import com.gkhy.exam.common.annotation.RepeatSubmit;
+import com.gkhy.exam.common.api.CommonResult;
+import com.gkhy.exam.common.enums.BusinessType;
+import com.gkhy.exam.system.domain.AnnualMaintenanceService;
+import com.gkhy.exam.system.domain.Memo;
+import com.gkhy.exam.system.domain.SysCategory;
+import com.gkhy.exam.system.service.MemoService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * <p>
+ * 备忘录 前端控制器
+ * </p>
+ *
+ * @author hh
+ * @since 2025-11-10 13:58:42
+ */
+@Api(tags = "备忘录")
+@RestController
+@RequestMapping("/system/memo")
+public class MemoController {
+ @Autowired
+ private MemoService memoService;
+
+ @RepeatSubmit
+ @ApiOperation(value = "新增编辑备忘录")
+ @PostMapping("/saveMemo")
+ public CommonResult saveMemo(@Validated @RequestBody Memo memo){
+ return memoService.saveMemo(memo);
+ }
+
+ @ApiOperation(value = "获取备忘录")
+ @GetMapping("/getMemo")
+ public CommonResult getMemo(){
+ return memoService.getMemo();
+ }
+
+ @ApiOperation(value = "获取流程内容数据(分页)")
+ @ApiImplicitParams({
+ @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"),
+
+ })
+ @GetMapping("/getIndexTitle")
+ public CommonResult getIndexTitle(){
+ return CommonResult.success(memoService.getIndexTitle());
+ }
+
+}
diff --git a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysUserController.java b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysUserController.java
index 6adfa08..ebcc12c 100644
--- a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysUserController.java
+++ b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysUserController.java
@@ -43,6 +43,17 @@
return CommonResult.success(sysUserService.selectUserList(user));
}
+ @ApiOperation(value = "特殊作业人员列表(分页)")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
+ @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10")
+ })
+ @GetMapping("/spList")
+ public CommonResult spList(SysUser user){
+ return CommonResult.success(sysUserService.selectSpUserList(user));
+ }
+
+
@PreAuthorize("hasAnyAuthority('train:exam:system','train:exam:company','train:exam:depart','train:exam:workshop','train:exam:other')")
@ApiOperation(value = "根据用户id获取用户信息")
@GetMapping(value = { "/{userId}" })
diff --git a/multi-common/src/main/java/com/gkhy/exam/common/domain/entity/SysUser.java b/multi-common/src/main/java/com/gkhy/exam/common/domain/entity/SysUser.java
index 54d60a5..9777ad2 100644
--- a/multi-common/src/main/java/com/gkhy/exam/common/domain/entity/SysUser.java
+++ b/multi-common/src/main/java/com/gkhy/exam/common/domain/entity/SysUser.java
@@ -60,9 +60,7 @@
// @NotBlank(message = "手机号码不能为空")
// @Length(min = 11, max = 11, message = "手机号只能为11位")
// @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$",message = "手机号码有误!")
- @ApiModelProperty(value = "手机号码",required = false)
- @TableField("phone")
- private String phone;
+
@ApiModelProperty("用户性别(0男,1女,2未知,默认2)")
@TableField("sex")
@@ -78,10 +76,18 @@
@TableField("person_type")
private Integer personType;
-// @NotBlank(message = "职称不能为空")
- @ApiModelProperty("职称1、初级2中级3高级")
- @TableField("positional")
- private String positional;
+ @ApiModelProperty(value = "是否内部人员0是1否",required = true)
+ @NotNull(message = "请选择是否内部人员")
+ @TableField("internal")
+ private Integer internal;
+
+ @ApiModelProperty(value = "手机号码",required = false)
+ @TableField("phone")
+ private String phone;
+
+ @ApiModelProperty("职务")
+ @TableField("duty")
+ private String duty;
@ApiModelProperty("父级账号id")
@TableField("parent_id")
@@ -130,31 +136,10 @@
@TableField(exist = false)
private String deptName;
- @ApiModelProperty("职务")
- @TableField("duty")
- private String duty;
-
@ApiModelProperty(value = "专业",required = true)
@TableField("post")
@NotBlank(message = "专业不能为空")
private String post;
-
- @ApiModelProperty("身份证号")
- @TableField("id_card")
- private String idCard;
-
- @ApiModelProperty("入职时间")
- @TableField("entry_time")
- private LocalDate entryTime;
-
- @ApiModelProperty("离职时间")
- @TableField("resign_time")
- private LocalDate resignTime;
-
- @ApiModelProperty(value = "学历1、高中及以下2、专科3、本科4、硕士5、博士及以上",required = true)
-// @NotNull(message = "学历不能为空")
- @TableField("qualification")
- private Integer qualification;
@ApiModelProperty("特殊作业证书")
@TableField("operation_certificate")
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/DTO/KnowledgeImportDTO.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/DTO/KnowledgeImportDTO.java
index 220afb0..8e2469d 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/domain/DTO/KnowledgeImportDTO.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/DTO/KnowledgeImportDTO.java
@@ -18,7 +18,7 @@
@ExcelProperty("文件类型")
//1、体系文件2、项目文件3、其他 4、技术文件 5、知识产权 7、会议文件 (内部知识)
- //1、标准2、规范3、法律法规4、其他 5、质量服务标准 (外部知识)
+ //1、管理2、技术3、质量服务标准、其他 (外部知识)
private String knowledgeType;
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/EmployeeRecord.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/EmployeeRecord.java
new file mode 100644
index 0000000..52f944d
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/EmployeeRecord.java
@@ -0,0 +1,118 @@
+package com.gkhy.exam.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * <p>
+ * 人员档案
+ * </p>
+ *
+ * @author hh
+ * @since 2025-11-11 13:54:12
+ */
+@Getter
+@Setter
+@TableName("employee_record")
+@ApiModel(value = "EmployeeRecord对象", description = "人员档案")
+public class EmployeeRecord implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("人员档案id")
+ @TableId(value = "employee_id", type = IdType.AUTO)
+ private Long employeeId;
+
+ @ApiModelProperty("公司id")
+ @TableField("company_id")
+ private Long companyId;
+
+ @ApiModelProperty(value = "用户id",required = true)
+ @TableField("user_id")
+ private Long userId;
+
+ @ApiModelProperty("岗位职责")
+ @TableField("duties")
+ private String duties;
+
+ @ApiModelProperty("工龄")
+ @TableField("seniority")
+ private BigDecimal seniority;
+
+ @ApiModelProperty("资格资历")
+ @TableField("qualification_requirements")
+ private String qualificationRequirements;
+
+ @ApiModelProperty("学历1、高中及以下2、专科3、本科4、硕士5、博士及以上")
+ @TableField("qualification")
+ @NotNull(message = "学历不能为空")
+ private Integer qualification;
+
+ @ApiModelProperty("身份证号")
+ @TableField("id_card")
+ private String idCard;
+
+ @ApiModelProperty("职称1、初级2中级3高级")
+ @TableField("positional")
+ @NotNull(message = "职称不能为空")
+ private String positional;
+
+ @ApiModelProperty("入职时间")
+ @TableField("entry_time")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @NotNull(message = "入职时间不能为空")
+ private LocalDate entryTime;
+
+ @ApiModelProperty("离职日期")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @TableField("resign_time")
+ private LocalDate resignTime;
+
+ @ApiModelProperty("创建时间")
+ @TableField("create_time")
+ private LocalDateTime createTime;
+
+ @ApiModelProperty("更新者")
+ @TableField("update_by")
+ private String updateBy;
+
+ @ApiModelProperty("更新时间")
+ @TableField("update_time")
+ private LocalDateTime updateTime;
+
+ @ApiModelProperty("备注")
+ @TableField("remark")
+ private String remark;
+
+ @ApiModelProperty("乐观锁")
+ @TableField("version")
+ private Integer version;
+
+ @ApiModelProperty("证书")
+ @TableField("certificate")
+ private String certificate;
+
+ @ApiModelProperty("删除标志(0代表存在,2代表删除,默认0)")
+ @TableField("del_flag")
+ private Integer delFlag;
+
+ @ApiModelProperty("创建者")
+ @TableField("create_by")
+ private String createBy;
+
+
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/ExternalKnowledge.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/ExternalKnowledge.java
index 11c7d25..734f643 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/domain/ExternalKnowledge.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/ExternalKnowledge.java
@@ -46,7 +46,7 @@
@NotBlank(message = "编号不能为空")
private String number;
- @ApiModelProperty(value ="1、标准2、规范3、法律法规4、其他 5、质量服务标准",required = true)
+ @ApiModelProperty(value ="1、管理2、技术3、质量服务标准、其他 ",required = true)
@TableField("knowledge_type")
@NotNull(message = "类型不能为空")
private Integer knowledgeType;
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/InformationPlatform.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/InformationPlatform.java
index b27f27e..c079c8b 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/domain/InformationPlatform.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/InformationPlatform.java
@@ -1,6 +1,5 @@
package com.gkhy.exam.system.domain;
-import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gkhy.exam.common.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
@@ -29,6 +28,11 @@
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime buildDate;
+ @ApiModelProperty("地址")
+ private String platformAddress;
+ @ApiModelProperty("图标")
+ private String platformPic;
+
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/Memo.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/Memo.java
new file mode 100644
index 0000000..8c51740
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/Memo.java
@@ -0,0 +1,55 @@
+package com.gkhy.exam.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 备忘录
+ * </p>
+ *
+ * @author hh
+ * @since 2025-11-10 13:58:42
+ */
+@Getter
+@Setter
+@TableName("memo")
+@ApiModel(value = "Memo对象", description = "备忘录")
+public class Memo implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ @TableField("company_id")
+ @ApiModelProperty("企业id")
+ private Long companyId;
+
+ @TableField("content")
+ @ApiModelProperty("内容")
+ private String content;
+
+ @TableField("create_by_id")
+ @ApiModelProperty("创建人id")
+ private Long createById;
+
+ @TableField("create_time")
+ private LocalDateTime createTime;
+
+ @TableField("update_by_id")
+ private Long updateById;
+
+ @TableField("update_time")
+ private LocalDateTime updateTime;
+
+
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/SysNotice.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/SysNotice.java
index c79beb4..c59e66a 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/domain/SysNotice.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/SysNotice.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.gkhy.exam.common.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
@@ -12,13 +13,16 @@
import lombok.Setter;
import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
+
+import java.util.Date;
import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
/**
* 通知公告表 sys_notice
- *
+ *
* @author ruoyi
*/
@Getter
@@ -34,15 +38,40 @@
private Long id;
@ApiModelProperty("公告标题")
- @NotBlank(message = "公告标题不能为空")
- @Size(min = 0, max = 50, message = "公告标题不能超过50个字符")
+// @NotBlank(message = "公告标题不能为空")
+// @Size(min = 0, max = 50, message = "公告标题不能超过50个字符")
@TableField("title")
private String title;
+
+ @TableField("company_id")
+ @ApiModelProperty("企业id")
+ @NotNull(message = "企业id不能为空")
+ private Long companyId;
@ApiModelProperty("公告类型(1通知 2公告)")
@TableField("type")
private String type;
+ @ApiModelProperty(value = "附件地址")
+ @TableField("file_path")
+ private String filePath;
+
+ @ApiModelProperty(value = "文件名称")
+ @TableField("file_name")
+ private String fileName;
+
+ @ApiModelProperty("部门ID")
+ @TableField("dept_id")
+ private Long deptId;
+
+ @ApiModelProperty("部门名称")
+ @TableField(exist = false)
+ private String deptName;
+
+ @ApiModelProperty("发布时间")
+ @TableField("publish_date")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date publishDate;
@ApiModelProperty("公告内容")
@TableField("content")
@@ -51,4 +80,7 @@
@ApiModelProperty("公告状态(0正常 1关闭)")
@TableField("status")
private Integer status;
+
+ @ApiModelProperty("删除标志(0代表存在 1代表删除)")
+ private Integer delFlag;
}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/req/EmployeeRecordReq.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/req/EmployeeRecordReq.java
new file mode 100644
index 0000000..e4f3ff0
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/req/EmployeeRecordReq.java
@@ -0,0 +1,32 @@
+package com.gkhy.exam.system.domain.req;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel("人员档案查询数据")
+public class EmployeeRecordReq {
+
+ @ApiModelProperty("公司id")
+ private Long companyId;
+
+ @ApiModelProperty(value = "名称")
+ private String name;
+
+// @ApiModelProperty(value = "人员类别1技术2管理3行政4特殊作业")
+// private Integer personType;
+
+ @ApiModelProperty(value = "手机号码")
+ private String phone;
+
+ @ApiModelProperty("学历1、高中及以下2、专科3、本科4、硕士5、博士及以上")
+ private Integer qualification;
+
+ @ApiModelProperty("身份证号")
+ private String idCard;
+
+ @ApiModelProperty("职称1、初级2中级3高级")
+ private String positional;
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/EmployeeRecordVO.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/EmployeeRecordVO.java
new file mode 100644
index 0000000..3df7cfe
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/EmployeeRecordVO.java
@@ -0,0 +1,49 @@
+package com.gkhy.exam.system.domain.vo;
+
+import com.gkhy.exam.system.domain.EmployeeRecord;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+
+@Data
+@ApiModel(value = "人员档案数据", description = "人员档案数据")
+public class EmployeeRecordVO extends EmployeeRecord {
+
+ private static final long serialVersionUID = 1L;
+
+
+ @ApiModelProperty(value = "名称")
+ private String name;
+
+// @ApiModelProperty(value = "用户类型(0系统用户,1企业级用户,2部门级用户,3车间级(岗位)级,4其他,默认0,6企业管理员)",required = true)
+// private Integer userType;
+
+ @ApiModelProperty("用户性别(0男,1女,2未知,默认2)")
+ private Integer sex;
+
+ @ApiModelProperty(value = "用户年龄")
+ private Integer age;
+
+ @ApiModelProperty(value = "人员类别1技术2管理3行政4特殊作业")
+ private Integer personType;
+
+ @ApiModelProperty(value = "手机号码")
+ private String phone;
+
+ @ApiModelProperty("职务")
+ private String duty;
+
+
+ @ApiModelProperty("部门id")
+ private Long deptId;
+
+ @ApiModelProperty("部门名称")
+ private String deptName;
+
+ @ApiModelProperty(value = "专业")
+ private String post;
+
+
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/IndexDataRep.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/IndexDataRep.java
new file mode 100644
index 0000000..01c108b
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/IndexDataRep.java
@@ -0,0 +1,16 @@
+package com.gkhy.exam.system.domain.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel("首页数据返回对象")
+public class IndexDataRep {
+ @ApiModelProperty(value = "标题")
+ private String title;
+ @ApiModelProperty(value = "数据id")
+ private String dataId;
+ @ApiModelProperty(value = "数据类型1内审实施计划2培训计划3项目评审4年度检定计划5用章审批")
+ private String type;
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/IndexSearch.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/IndexSearch.java
new file mode 100644
index 0000000..0f4231a
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/IndexSearch.java
@@ -0,0 +1,11 @@
+package com.gkhy.exam.system.domain.vo;
+
+import lombok.Data;
+
+@Data
+public class IndexSearch {
+ private Long companyId;
+ private Long userId;
+ private String keyword;
+ private String keyword1;
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/SpSysUser.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/SpSysUser.java
new file mode 100644
index 0000000..ef524ba
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/SpSysUser.java
@@ -0,0 +1,29 @@
+package com.gkhy.exam.system.domain.vo;
+
+import com.gkhy.exam.common.domain.entity.SysUser;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+
+@Data
+@ApiModel("特殊人员数据展示")
+public class SpSysUser extends SysUser {
+
+ @ApiModelProperty(value = "学历1、高中及以下2、专科3、本科4、硕士5、博士及以上", required = true)
+ private Integer qualification;
+
+ @ApiModelProperty("职称1、初级2中级3高级")
+ private String positional;
+
+ @ApiModelProperty("身份证号")
+ private String idCard;
+
+ @ApiModelProperty("入职时间")
+ private LocalDate entryTime;
+
+ @ApiModelProperty("离职时间")
+ private LocalDate resignTime;
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/mapper/EmployeeRecordMapper.java b/multi-system/src/main/java/com/gkhy/exam/system/mapper/EmployeeRecordMapper.java
new file mode 100644
index 0000000..a725ecb
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/mapper/EmployeeRecordMapper.java
@@ -0,0 +1,24 @@
+package com.gkhy.exam.system.mapper;
+
+import com.gkhy.exam.system.domain.EmployeeRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gkhy.exam.system.domain.req.EmployeeRecordReq;
+import com.gkhy.exam.system.domain.vo.EmployeeRecordVO;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 人员档案 Mapper 接口
+ * </p>
+ *
+ * @author hh
+ * @since 2025-11-11 13:54:12
+ */
+@Mapper
+public interface EmployeeRecordMapper extends BaseMapper<EmployeeRecord> {
+
+ List<EmployeeRecordVO> selectEmployeeRecordList(EmployeeRecordReq req);
+ List<EmployeeRecord> getEmployeeRecordList(Long companyId);
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/mapper/MemoMapper.java b/multi-system/src/main/java/com/gkhy/exam/system/mapper/MemoMapper.java
new file mode 100644
index 0000000..0b40aca
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/mapper/MemoMapper.java
@@ -0,0 +1,23 @@
+package com.gkhy.exam.system.mapper;
+
+import com.gkhy.exam.system.domain.Memo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gkhy.exam.system.domain.vo.IndexDataRep;
+import com.gkhy.exam.system.domain.vo.IndexSearch;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 备忘录 Mapper 接口
+ * </p>
+ *
+ * @author hh
+ * @since 2025-11-10 13:58:42
+ */
+@Mapper
+public interface MemoMapper extends BaseMapper<Memo> {
+
+ List<IndexDataRep> getIndexTitle(IndexSearch indexSearch);
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/mapper/SysUserMapper.java b/multi-system/src/main/java/com/gkhy/exam/system/mapper/SysUserMapper.java
index b9173bb..2c5cbd8 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/mapper/SysUserMapper.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/mapper/SysUserMapper.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gkhy.exam.common.domain.entity.SysUser;
+import com.gkhy.exam.system.domain.vo.SpSysUser;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@@ -30,7 +31,7 @@
*/
List<SysUser> userList(SysUser user);
-
+ List<SpSysUser> userSpList(SysUser user);
/**
* 根据手机号获取用户
* @param phone
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/EmployeeRecordService.java b/multi-system/src/main/java/com/gkhy/exam/system/service/EmployeeRecordService.java
new file mode 100644
index 0000000..91719c2
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/EmployeeRecordService.java
@@ -0,0 +1,27 @@
+package com.gkhy.exam.system.service;
+
+import com.gkhy.exam.common.api.CommonPage;
+import com.gkhy.exam.common.api.CommonResult;
+import com.gkhy.exam.system.domain.CustomerRecord;
+import com.gkhy.exam.system.domain.EmployeeRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gkhy.exam.system.domain.req.EmployeeRecordReq;
+
+/**
+ * <p>
+ * 人员档案 服务类
+ * </p>
+ *
+ * @author hh
+ * @since 2025-11-11 13:54:12
+ */
+public interface EmployeeRecordService extends IService<EmployeeRecord> {
+
+ CommonPage selectEmployeeRecordList(EmployeeRecordReq req);
+
+
+ CommonResult saveEmployeeRecord(EmployeeRecord employeeRecord);
+
+ CommonResult getEmployeeRecordList(Long companyId);
+
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/MemoService.java b/multi-system/src/main/java/com/gkhy/exam/system/service/MemoService.java
new file mode 100644
index 0000000..d8b0952
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/MemoService.java
@@ -0,0 +1,26 @@
+package com.gkhy.exam.system.service;
+
+import com.gkhy.exam.common.api.CommonPage;
+import com.gkhy.exam.common.api.CommonResult;
+import com.gkhy.exam.system.domain.Meetings;
+import com.gkhy.exam.system.domain.Memo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 备忘录 服务类
+ * </p>
+ *
+ * @author hh
+ * @since 2025-11-10 13:58:42
+ */
+public interface MemoService extends IService<Memo> {
+
+ CommonResult saveMemo(Memo memo);
+
+ CommonResult getMemo();
+
+
+ CommonPage getIndexTitle();
+
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/SysUserService.java b/multi-system/src/main/java/com/gkhy/exam/system/service/SysUserService.java
index 0ca15d8..83ff388 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/SysUserService.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/SysUserService.java
@@ -23,7 +23,7 @@
*/
CommonPage selectUserList(SysUser user);
-
+ CommonPage selectSpUserList(SysUser user);
/**
* 根据登录名获取用户
* @param username
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/EmployeeRecordServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/EmployeeRecordServiceImpl.java
new file mode 100644
index 0000000..5b22abe
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/EmployeeRecordServiceImpl.java
@@ -0,0 +1,60 @@
+package com.gkhy.exam.system.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.gkhy.exam.common.api.CommonPage;
+import com.gkhy.exam.common.api.CommonResult;
+import com.gkhy.exam.common.utils.PageUtils;
+import com.gkhy.exam.system.domain.EmployeeRecord;
+import com.gkhy.exam.system.domain.req.EmployeeRecordReq;
+import com.gkhy.exam.system.domain.vo.EmployeeRecordVO;
+import com.gkhy.exam.system.mapper.EmployeeRecordMapper;
+import com.gkhy.exam.system.service.EmployeeRecordService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 人员档案 服务实现类
+ * </p>
+ *
+ * @author hh
+ * @since 2025-11-11 13:54:12
+ */
+@Service
+public class EmployeeRecordServiceImpl extends ServiceImpl<EmployeeRecordMapper, EmployeeRecord> implements EmployeeRecordService {
+
+ @Autowired
+ private EmployeeRecordMapper employeeRecordMapper;
+ @Override
+ public CommonPage selectEmployeeRecordList(EmployeeRecordReq req) {
+ PageUtils.startPage();
+ List<EmployeeRecordVO> employeeRecords = employeeRecordMapper.selectEmployeeRecordList(req);
+
+ return CommonPage.restPage(employeeRecords);
+ }
+
+ @Override
+ public CommonResult saveEmployeeRecord(EmployeeRecord employeeRecord) {
+ LambdaQueryWrapper<EmployeeRecord> queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(EmployeeRecord::getEmployeeId, employeeRecord.getEmployeeId());
+ queryWrapper.eq(EmployeeRecord :: getDelFlag, 0);
+ if (employeeRecordMapper.selectCount(queryWrapper) <= 0) {
+ return CommonResult.failed("该员工不存在");
+ }
+ employeeRecordMapper.update(employeeRecord, queryWrapper);
+
+ return CommonResult.success();
+ }
+
+ @Override
+ public CommonResult getEmployeeRecordList(Long companyId) {
+// LambdaQueryWrapper<EmployeeRecord> queryWrapper = new LambdaQueryWrapper<>();
+// queryWrapper.eq(EmployeeRecord::getCompanyId, companyId);
+// queryWrapper.eq(EmployeeRecord::getDelFlag, 0);
+ List<EmployeeRecord> employeeRecords = employeeRecordMapper.getEmployeeRecordList(companyId);
+ return CommonResult.success(employeeRecords);
+ }
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExternalKnowledgeServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExternalKnowledgeServiceImpl.java
index d80c920..4ae57a7 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExternalKnowledgeServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExternalKnowledgeServiceImpl.java
@@ -94,17 +94,14 @@
externalKnowledge.setName(dto.getName());
externalKnowledge.setNumber(dto.getNumber());
switch (dto.getKnowledgeType()) {
- case "标准":
+ case "管理":
externalKnowledge.setKnowledgeType(1);
break;
- case "规范":
+ case "技术":
externalKnowledge.setKnowledgeType(2);
break;
- case "法律法规":
- externalKnowledge.setKnowledgeType(3);
- break;
case "质量服务标准":
- externalKnowledge.setKnowledgeType(5);
+ externalKnowledge.setKnowledgeType(3);
break;
default:
externalKnowledge.setKnowledgeType(4);
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/MemoServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/MemoServiceImpl.java
new file mode 100644
index 0000000..1c842f1
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/MemoServiceImpl.java
@@ -0,0 +1,85 @@
+package com.gkhy.exam.system.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.gkhy.exam.common.api.CommonPage;
+import com.gkhy.exam.common.api.CommonResult;
+import com.gkhy.exam.common.utils.PageUtils;
+import com.gkhy.exam.common.utils.SecurityUtils;
+import com.gkhy.exam.system.domain.Memo;
+import com.gkhy.exam.system.domain.vo.IndexDataRep;
+import com.gkhy.exam.system.domain.vo.IndexSearch;
+import com.gkhy.exam.system.mapper.MemoMapper;
+import com.gkhy.exam.system.service.MemoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * 备忘录 服务实现类
+ * </p>
+ *
+ * @author hh
+ * @since 2025-11-10 13:58:42
+ */
+@Service
+public class MemoServiceImpl extends ServiceImpl<MemoMapper, Memo> implements MemoService {
+
+ @Autowired
+ private MemoMapper memoMapper;
+ @Override
+ public CommonResult saveMemo(Memo memo) {
+ if (memo.getId() != null){
+
+ LambdaUpdateWrapper<Memo> updateWrapper = new LambdaUpdateWrapper<>();
+ updateWrapper.eq(Memo::getCreateById, SecurityUtils.getUserId());
+ updateWrapper.set(Memo::getContent, memo.getContent())
+ .set(Memo::getUpdateById, memo.getUpdateById())
+ .set(Memo::getUpdateTime, LocalDateTime.now());
+ memoMapper.update(new Memo(), updateWrapper);
+ }else {
+ LambdaQueryWrapper<Memo> queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(Memo::getCreateById, SecurityUtils.getUserId());
+ if (memoMapper.selectCount(queryWrapper) >= 1){
+ return CommonResult.failed("只能保存一个");
+ }
+ memo.setCreateById(SecurityUtils.getUserId());
+ memo.setCompanyId(SecurityUtils.getCompanyId() == null ? 0 : SecurityUtils.getCompanyId());
+ memo.setCreateTime(LocalDateTime.now());
+ memoMapper.insert(memo);
+ }
+ return CommonResult.success(memo);
+ }
+
+ @Override
+ public CommonResult getMemo() {
+ LambdaQueryWrapper<Memo> queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(Memo::getCreateById, SecurityUtils.getUserId());
+ return CommonResult.success(memoMapper.selectOne(queryWrapper));
+ }
+
+ @Override
+ public CommonPage getIndexTitle() {
+
+ Long userId = SecurityUtils.getUserId();
+ Long deptId = SecurityUtils.getLoginUser().getUser().getDeptId();
+ Long companyId = SecurityUtils.getCompanyId();
+ IndexSearch indexSearch = new IndexSearch();
+ indexSearch.setUserId(userId);
+ indexSearch.setCompanyId(companyId);
+ if (deptId != null && deptId == 20){
+ indexSearch.setKeyword(deptId.toString());
+ }
+ if (deptId != null && deptId == 22){
+ indexSearch.setKeyword1(deptId.toString());
+ }
+ PageUtils.startPage();
+ List<IndexDataRep> indexTitle = memoMapper.getIndexTitle(indexSearch);
+ return CommonPage.restPage(indexTitle);
+ }
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysNoticeServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysNoticeServiceImpl.java
index 559d862..73674de 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysNoticeServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysNoticeServiceImpl.java
@@ -21,6 +21,7 @@
@Override
public CommonPage selectNoticeList(SysNotice notice) {
PageUtils.startPage();
+ notice.setDeptId(SecurityUtils.getLoginUser().getUser().getDeptId());
List<SysNotice> notices=baseMapper.selectNoticeList(notice);
return CommonPage.restPage(notices);
}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysUserServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysUserServiceImpl.java
index 00db515..d006990 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysUserServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysUserServiceImpl.java
@@ -3,6 +3,7 @@
import cn.hutool.core.codec.Base64;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.exam.common.annotation.DataScope;
import com.gkhy.exam.common.api.CommonPage;
@@ -16,8 +17,13 @@
import com.gkhy.exam.common.utils.RedisUtils;
import com.gkhy.exam.common.utils.SecurityUtils;
import com.gkhy.exam.common.utils.StringUtils;
+import com.gkhy.exam.system.domain.EmployeeRecord;
import com.gkhy.exam.system.domain.ExStudent;
import com.gkhy.exam.system.domain.SysUserRole;
+import com.gkhy.exam.system.domain.req.EmployeeRecordReq;
+import com.gkhy.exam.system.domain.vo.EmployeeRecordVO;
+import com.gkhy.exam.system.domain.vo.SpSysUser;
+import com.gkhy.exam.system.mapper.EmployeeRecordMapper;
import com.gkhy.exam.system.mapper.SysUserMapper;
import com.gkhy.exam.system.mapper.SysUserRoleMapper;
import com.gkhy.exam.system.service.ExStudentService;
@@ -28,6 +34,7 @@
import org.springframework.transaction.annotation.Transactional;
import javax.validation.Validator;
+import java.time.LocalDateTime;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
@@ -56,6 +63,10 @@
@Autowired
private ExStudentService exStudentService;
+ @Autowired
+ private EmployeeRecordMapper employeeRecordMapper;
+
+
@Override
public CommonPage<SysUser> selectUserList(SysUser user) {
SysUser currentUser = SecurityUtils.getLoginUser().getUser();
@@ -69,6 +80,23 @@
}
PageUtils.startPage();
users = baseMapper.userList(user);
+ }
+ return CommonPage.restPage(users);
+ }
+
+ @Override
+ public CommonPage selectSpUserList(SysUser user) {
+ SysUser currentUser = SecurityUtils.getLoginUser().getUser();
+ List<SpSysUser> users = new ArrayList<>();
+ if (!currentUser.getUserType().equals(UserTypeEnum.WORKSHOP_USER.getCode())) {
+ if (!currentUser.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode())) {
+ user.setCompanyId(currentUser.getCompanyId());
+ Map<String, Object> paramsMap = new HashMap<>();
+// paramsMap.put("userType",currentUser.getUserType());
+ user.setParams(paramsMap);
+ }
+ PageUtils.startPage();
+ users = baseMapper.userSpList(user);
}
return CommonPage.restPage(users);
}
@@ -123,6 +151,10 @@
@Override
public SysUser selectUserById(Long userId) {
+
+
+
+
return baseMapper.getUserById(userId);
}
@@ -133,20 +165,17 @@
throw new ApiException("管理员用户不能被删除");
}
delCacheByUsername(user.getUsername());
- return baseMapper.deleteUserById(userId);
+ int i = baseMapper.deleteUserById(userId);
+ if (i > 0){
+ delEmployeeRecord(userId);
+ }
+ return i;
}
@Override
@Transactional(rollbackFor = RuntimeException.class)
public int addUser(SysUser user) {
- ExStudent exStudent = new ExStudent();
- exStudent.setCompanyId(user.getCompanyId());
- exStudent.setName(user.getName());
- exStudent.setPassword(user.getPassword());
- exStudent.setDeptId(user.getDeptId());
- exStudent.setDuty(user.getDuty());
- exStudent.setSex(user.getSex());
- exStudent.setPhone(user.getPhone());
+
checkRequestData(user);
checkUserAllowed(user);
@@ -156,14 +185,44 @@
batchSaveRole(user.getRoles(), user.getId(), false);
+ ExStudent exStudent = new ExStudent();
+ exStudent.setCompanyId(user.getCompanyId());
+ exStudent.setName(user.getName());
+ exStudent.setPassword(user.getPassword());
+ exStudent.setDeptId(user.getDeptId());
+ exStudent.setDuty(user.getDuty());
+ exStudent.setSex(user.getSex());
+ exStudent.setPhone(user.getPhone());
exStudent.setUserId(user.getId());
exStudentService.insertStudent(exStudent);
+
+ Integer internal = user.getInternal();
+ if (internal == 0){
+ EmployeeRecord employeeRecord = new EmployeeRecord();
+ employeeRecord.setCompanyId(user.getCompanyId());
+ employeeRecord.setUserId(user.getId());
+ employeeRecord.setCreateBy(SecurityUtils.getUsername());
+ employeeRecord.setCreateTime(LocalDateTime.now());
+ saveEmployeeRecord(employeeRecord);
+ }
if (row < 1) {
throw new ApiException("新增用户失败");
}
return row;
}
+
+ private void saveEmployeeRecord( EmployeeRecord employeeRecord){
+ employeeRecordMapper.insert( employeeRecord);
+ }
+
+ private void delEmployeeRecord(Long userId){
+ LambdaUpdateWrapper<EmployeeRecord> updateWrapper = new LambdaUpdateWrapper<>();
+ updateWrapper.eq(EmployeeRecord::getUserId,userId).set(EmployeeRecord::getDelFlag,1)
+ .set(EmployeeRecord::getUpdateBy,SecurityUtils.getUsername()).set(EmployeeRecord::getUpdateTime,LocalDateTime.now());
+ employeeRecordMapper.update(new EmployeeRecord() ,updateWrapper);
+ }
+
public void batchSaveRole(List<SysRole> roleIds, Long userId, boolean isUpdate) {
@@ -191,12 +250,24 @@
@Override
public int updateUser(SysUser user) {
+ SysUser sysUser = selectUserById(user.getId());
checkRequestData(user);
checkUserAllowed(user);
user.setUpdateBy(SecurityUtils.getUsername());
user.setPassword(null);
int row = baseMapper.updateById(user);
batchSaveRole(user.getRoles(), user.getId(), true);
+
+ if (sysUser.getInternal() == 0 && sysUser.getInternal() == 1){
+ delEmployeeRecord(user.getId());
+ }else if (sysUser.getInternal() == 1 && user.getInternal() == 0){
+ EmployeeRecord employeeRecord = new EmployeeRecord();
+ employeeRecord.setCompanyId(user.getCompanyId());
+ employeeRecord.setUserId(user.getId());
+ employeeRecord.setCreateBy(SecurityUtils.getUsername());
+ employeeRecord.setCreateTime(LocalDateTime.now());
+ saveEmployeeRecord(employeeRecord);
+ }
if (row < 1) {
throw new ApiException("更新用户信息失败");
@@ -266,9 +337,9 @@
@Override
public Map<String, Object> getUserData(Long companyId) {
- List<SysUser> sysUsers = baseMapper.selectList(new LambdaQueryWrapper<>(
- SysUser.class
- ).eq(SysUser::getCompanyId, companyId).eq(SysUser::getDelFlag, UserConstant.ENABLE));
+ EmployeeRecordReq req = new EmployeeRecordReq();
+ req.setCompanyId(companyId);
+ List<EmployeeRecordVO> sysUsers = employeeRecordMapper.selectEmployeeRecordList(req);
int totalUser = sysUsers.size();
Map<String, Object> map = new HashMap<>();
@@ -276,7 +347,7 @@
map.put("totalUser", totalUser);
//专业
map.put("post", sysUsers.stream()
- .map(SysUser::getPost)
+ .map(EmployeeRecordVO::getPost)
.filter(Objects::nonNull)
.distinct()
.collect(Collectors.joining(",")));
@@ -353,7 +424,7 @@
map.put("jsRatio", String.format("%.2f", jsRatio));
double averageAge = sysUsers.stream()
.filter(user -> user.getAge() != null) // 过滤年龄为null的用户
- .mapToInt(SysUser::getAge) // 提取年龄值
+ .mapToInt(EmployeeRecordVO::getAge) // 提取年龄值
.average() // 计算平均值
.orElse(0.0);
map.put("avgAge", String.format("%.1f", averageAge));//平均年龄
diff --git a/multi-system/src/main/resources/mapper/system/EmployeeRecordMapper.xml b/multi-system/src/main/resources/mapper/system/EmployeeRecordMapper.xml
new file mode 100644
index 0000000..901405a
--- /dev/null
+++ b/multi-system/src/main/resources/mapper/system/EmployeeRecordMapper.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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.EmployeeRecordMapper">
+
+
+
+ <select id="selectEmployeeRecordList" parameterType="com.gkhy.exam.system.domain.req.EmployeeRecordReq"
+ resultType="com.gkhy.exam.system.domain.vo.EmployeeRecordVO">
+
+ select
+ a.name, a.sex, a.age, a.person_type personType , a.phone, a.dept_id deptId, a.post,a.duty,
+ aa.employee_id employeeId, aa.company_id companyId,
+ b.dept_name deptName,aa.user_id userId,aa.duties,aa.seniority,aa.qualification_requirements qualificationRequirements,
+ aa.qualification,aa.id_card idCard,aa.positional,aa.entry_time entryTime,aa.resign_time resignTime,aa.certificate,
+ aa.version,aa.create_time createTime,aa.update_time updateTime,aa.create_by createBy,aa.update_by updateBy
+ from employee_record aa
+ inner join sys_user a on a.id = aa.user_id and a.company_id = aa.company_id
+ inner join sys_dept b on a.dept_id = b.dept_id
+ where a.del_flag = 0 and aa.del_flag = 0
+ <if test="companyId != null">
+ and aa.company_id = #{companyId}
+ </if>
+ <if test="name != null and name != ''">
+ and a.name like concat('%',#{name},'%')
+ </if>
+ <if test="phone != null and phone != ''">
+ and a.phone like concat('%',#{phone},'%')
+ </if>
+ <if test="qualification != null">
+ and aa.qualification = #{qualification}
+ </if>
+ <if test="positional != null">
+ and aa.positional = #{positional}
+ </if>
+ </select>
+
+ <select id="getEmployeeRecordList" parameterType="long"
+ resultType="com.gkhy.exam.system.domain.EmployeeRecord">
+ select
+ a.name,
+ aa.employee_id employeeId, aa.user_id userId
+ from employee_record aa
+ inner join sys_user a on a.id = aa.user_id and a.company_id = aa.company_id
+ where a.del_flag = 0 and aa.del_flag = 0
+ <if test="companyId != null">
+ and aa.company_id = #{companyId}
+ </if>
+ </select>
+
+
+</mapper>
diff --git a/multi-system/src/main/resources/mapper/system/ExternalKnowledgeMapper.xml b/multi-system/src/main/resources/mapper/system/ExternalKnowledgeMapper.xml
index 51b5947..3a50dd6 100644
--- a/multi-system/src/main/resources/mapper/system/ExternalKnowledgeMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/ExternalKnowledgeMapper.xml
@@ -7,6 +7,9 @@
<if test="companyId!=null ">
and company_id = #{companyId}
</if>
+ <if test="knowledgeType != null">
+ and knowledge_type = #{knowledgeType}
+ </if>
ORDER BY create_time desc
</select>
</mapper>
diff --git a/multi-system/src/main/resources/mapper/system/MemoMapper.xml b/multi-system/src/main/resources/mapper/system/MemoMapper.xml
new file mode 100644
index 0000000..6ec692d
--- /dev/null
+++ b/multi-system/src/main/resources/mapper/system/MemoMapper.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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.MemoMapper">
+
+
+
+ <select id="getIndexTitle" resultType="com.gkhy.exam.system.domain.vo.IndexDataRep" parameterType="com.gkhy.exam.system.domain.vo.IndexSearch">
+ <if test="keyword != '' and keyword != null">
+ SELECT CONCAT(`year`, '年内审实施计划') AS title,
+ '1' AS type,
+ id AS dataId
+ FROM internal_audit_carry
+ WHERE del_flag = 1
+ AND review_start = DATE(
+ NOW()) and company_id = #{companyId}
+ UNION ALL
+ SELECT a.device_name AS title,
+ '4' AS type,
+ a.annual_verification_id AS dataId
+ FROM annual_verification_device a
+ INNER JOIN annual_verification_plan b ON a.annual_verification_id = b.id
+ WHERE a.del_flag = 0
+ AND b.del_flag = 0
+ AND DATE_SUB(DATE(a.next_calibration_time), INTERVAL 1 MONTH) = DATE(
+ now()) and b.company_id = #{companyId}
+ UNION ALL
+ </if>
+ <if test="keyword1 != '' and keyword1 != null">
+ SELECT train_name AS title,
+ '2' AS type,
+ id AS dataId
+ FROM train_plan
+ WHERE del_flag = 1
+ AND DATE_SUB(DATE(train_time), INTERVAL 1 MONTH) = DATE(
+ NOW()) and company_id = #{companyId}
+ UNION ALL
+ </if>
+ SELECT b.item_name AS title,
+ '3' AS type,
+ a.id AS dataId
+ FROM item_review a
+ INNER JOIN item b ON b.id = a.item_id
+ AND b.del_flag = 1
+ INNER JOIN item_review_user c ON c.review_id = a.id
+ AND c.del_flag = 0
+ WHERE a.del_flag = 0
+ AND c.review_user_id = #{userId}
+ AND c.`status` = 2 and a.company_id = #{companyId}
+ UNION ALL
+ SELECT a.use_seal_cause AS title,
+ '5' AS type,
+ a.id AS dataId
+ FROM use_seal_apply a
+ WHERE a.del_flag = 0
+ AND (a.apply_user_id = #{userId} or a.next_check = #{userId} )
+ AND a.`status` = 1 and a.company_id = #{companyId}
+ </select>
+</mapper>
diff --git a/multi-system/src/main/resources/mapper/system/SysNoticeMapper.xml b/multi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
index 53ef940..52be8c1 100644
--- a/multi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
@@ -15,10 +15,18 @@
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
+ <result property="filePath" column="file_path" />
+ <result property="fileName" column="file_name" />
+ <result property="deptId" column="dept_id" />
+ <result property="publishDate" column="publish_date" />
+ <result property="companyId" column="company_id" />
+ </resultMap>
+ <resultMap type="com.gkhy.exam.system.domain.SysNotice" id="SysNoticeVoResult">
+ <result property="deptName" column="dept_name" />
</resultMap>
<sql id="selectNoticeVo">
- select id, title, type, cast(content as char) as content, status, create_by, create_time, update_by, update_time, remark
+ select id, title, type, cast(content as char) as content,company_id, status, create_by, create_time, update_by, update_time, remark, file_path, file_name, dept_id, publish_date
from sys_notice
</sql>
@@ -27,25 +35,34 @@
where id = #{noticeId}
</select>
- <select id="selectNoticeList" resultMap="SysNoticeResult">
- <include refid="selectNoticeVo"/>
- <where>
- <if test="title != null and title != ''">
- AND title like concat('%', #{title}, '%')
- </if>
- <if test="type != null and type != ''">
- AND type = #{type}
- </if>
- <if test="createBy != null and createBy != ''">
- AND create_by like concat('%', #{createBy}, '%')
- </if>
- </where>
- order by create_time desc
+ <select id="selectNoticeList" resultMap="SysNoticeVoResult">
+ select a.id, a.title, a.type, cast(a.content as char) as content, a.status, a.create_by, a.create_time, a.update_by,
+ a.update_time, a.remark, a.file_path, a.file_name, a.dept_id, a.publish_date,b.dept_name,a.company_id
+ from sys_notice a
+ left join sys_dept b on a.dept_id = b.dept_id
+ where a.del_flag = 0
+ <if test="companyId != null">
+ AND a.company_id = #{companyId}
+ </if>
+ <if test="title != null and title != ''">
+ AND a.title like concat('%', #{title}, '%')
+ </if>
+ <if test="type != null and type != ''">
+ AND a.type = #{type}
+ </if>
+ <if test="deptId != null">
+ AND a.deptId = #{dept_id}
+ </if>
+ <if test="createBy != null and createBy != ''">
+ AND a.create_by like concat('%', #{createBy}, '%')
+ </if>
+
+ order by a.create_time desc
</select>
<delete id="deleteNoticeByIds" parameterType="Long">
- delete from sys_notice where notice_id in
+ update sys_notice set del_flag = 1 where id in
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
#{noticeId}
</foreach>
diff --git a/multi-system/src/main/resources/mapper/system/SysUserMapper.xml b/multi-system/src/main/resources/mapper/system/SysUserMapper.xml
index f714afc..3f15857 100644
--- a/multi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -26,18 +26,19 @@
<result property="companyName" column="company_name" />
<result property="remainPeriod" column="remain_period" />
<result property="parentName" column="parent_name" />
- <result property="idCard" column="id_card" />
+<!-- <result property="idCard" column="id_card" />-->
<result property="duty" column="duty" />
<result property="post" column="post" />
<result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" />
- <result property="entryTime" column="entry_time" />
- <result property="resignTime" column="resign_time" />
+<!-- <result property="entryTime" column="entry_time" />-->
+<!-- <result property="resignTime" column="resign_time" />-->
<result property="personType" column="person_type" />
<result property="age" column="age" />
- <result property="positional" column="positional" />
- <result property="qualification" column="qualification" />
+<!-- <result property="positional" column="positional" />-->
+<!-- <result property="qualification" column="qualification" />-->
<result property="operationCertificate" column="operation_certificate" />
+ <result property="internal" column="internal" />
</resultMap>
@@ -46,6 +47,16 @@
<result property="roleId" column="role_id" />
<result property="roleName" column="role_name" />
</collection>
+ </resultMap>
+
+
+ <resultMap id="SysUserSpVoResult" type="com.gkhy.exam.system.domain.vo.SpSysUser" extends="SysUserVoResult">
+ <result property="idCard" column="id_card" />
+ <result property="entryTime" column="entry_time" />
+ <result property="resignTime" column="resign_time" />
+ <result property="positional" column="positional" />
+ <result property="qualification" column="qualification" />
+
</resultMap>
@@ -65,10 +76,11 @@
left join sys_role r on r.role_id=ur.role_id
where ur.user_id = #{userId}
</select>
+<!-- ,u.id_card,u.entry_time,u.resign_time,u.positional,u.qualification-->
<select id="userList" resultMap="SysUserVoResult">
select u.id,u.username,u.name,u.user_type,u.phone,u.parent_id,u.company_id,u.sex,u.status,u.del_flag,u.version,
u.login_ip,u.login_date,u.create_by,u.create_time,u.remark,c.name as company_name,su.name as parent_name,
- u.dept_id,d.dept_name,u.duty,u.post,u.id_card,u.entry_time,u.resign_time,u.person_type,u.age,u.positional,u.qualification,u.operation_certificate
+ u.dept_id,d.dept_name,u.duty,u.post,u.person_type,u.age,u.operation_certificate,u.internal
from sys_user u
left join sys_company c on c.id=u.company_id
left join sys_user su on su.id=u.parent_id and u.parent_id!=0
@@ -88,9 +100,12 @@
<if test="personType != null">
AND u.person_type = #{personType}
</if>
- <if test="qualification != null">
- AND u.qualification = #{qualification}
+ <if test="internal != null">
+ AND u.internal = #{internal}
</if>
+<!-- <if test="qualification != null">-->
+<!-- AND u.qualification = #{qualification}-->
+<!-- </if>-->
<if test="userType != null">
AND u.user_type = #{userType}
</if>
@@ -128,15 +143,84 @@
+ <select id="userSpList" resultMap="SysUserSpVoResult">
+ select u.id,u.username,u.name,u.user_type,u.phone,u.parent_id,u.company_id,u.sex,u.status,u.del_flag,u.version,
+ u.login_ip,u.login_date,u.create_by,u.create_time,u.remark,c.name as company_name,su.name as parent_name,
+ u.dept_id,d.dept_name,u.duty,u.post,u.person_type,u.age,u.operation_certificate,u.internal,
+ ur.id_card,ur.entry_time,ur.resign_time,ur.positional,ur.qualification
+ from sys_user u
+ left join sys_company c on c.id=u.company_id
+ left join sys_user su on su.id=u.parent_id and u.parent_id!=0
+ left join sys_dept d on d.dept_id=u.dept_id
+ left join employee_record ur on ur.user_id=u.id
+
+ <where>
+ and u.del_flag = 0
+ <if test="username != null and username != ''">
+ AND u.username like concat('%', #{username}, '%')
+ </if>
+ <if test="name != null and name != ''">
+ AND u.name like concat('%', #{name}, '%')
+ </if>
+ <if test="status != null and status != ''">
+ AND u.status = #{status}
+ </if>
+ <if test="personType != null">
+ AND u.person_type = #{personType}
+ </if>
+ <if test="internal != null">
+ AND u.internal = #{internal}
+ </if>
+ <!-- <if test="qualification != null">-->
+ <!-- AND u.qualification = #{qualification}-->
+ <!-- </if>-->
+ <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>
+ <if test="phone != null and phone != ''">
+ AND u.phone like concat('%', #{phone}, '%')
+ </if>
+ <if test="post != null and post != ''">
+ AND u.post like concat('%', #{post}, '%')
+ </if>
+ <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+ AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
+ </if>
+ <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+ AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
+ </if>
+ <if test="params.userType != null and (params.userType==4 or params.userType==1)">
+ AND u.user_type in (2,3)
+ </if>
+ <if test="params.userType != null and params.userType==2">
+ AND u.user_type in (3)
+ </if>
+ <if test="params.userType != null and params.userType==0">
+ AND u.user_type in (1,2,3,4)
+ </if>
+
+ </where>
+ order by u.id desc
+ </select>
+
+
+
+
<select id="getUserByPhone" resultMap="SysUserResult">
select id,username,name,password,parent_id,company_id,phone,status,del_flag from sys_user
where phone=#{phone} and del_flag=0
</select>
-
- <select id="getUserById" resultMap="SysUserResult">
+<!--,u.positional,u.qualification,u.id_card,u.entry_time,u.resign_time,-->
+ <select id="getUserById" resultMap="SysUserVoResult">
select u.id,u.username,u.user_type,u.name,u.phone,u.parent_id,u.company_id,u.status,u.sex,u.del_flag,u.version,c.name as company_name,
- c.remain_period,su.name as parent_name,u.dept_id,d.dept_name,u.duty,u.post,u.id_card,u.entry_time,u.resign_time,
- u.person_type,u.age,u.positional,u.qualification,u.operation_certificate
+ c.remain_period,su.name as parent_name,u.dept_id,d.dept_name,u.duty,u.post,
+ u.person_type,u.age,u.operation_certificate,u.internal
from sys_user u
left join sys_company c on c.id=u.company_id
left join sys_user su on su.id=u.parent_id and u.parent_id!=0
--
Gitblit v1.9.2