Pārlūkot izejas kodu

add:人员档案管理

caozixuan 1 gadu atpakaļ
vecāks
revīzija
5669d732e3

+ 278 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/params/UserArchivesParam.java

@@ -0,0 +1,278 @@
+package com.qmth.sop.business.bean.params;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.sop.common.enums.EducationEnum;
+import com.qmth.sop.common.enums.GenderEnum;
+import com.qmth.sop.common.enums.RoleTypeEnum;
+import io.swagger.annotations.ApiModelProperty;
+import org.hibernate.validator.constraints.Range;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @Description: 人员档案编辑参数
+ * @Author: CaoZixuan
+ * @Date: 2023-08-14
+ */
+public class UserArchivesParam {
+    @ApiModelProperty(value = "档案id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    @ApiModelProperty(value = "编号")
+    @NotNull(message = "请输入人员档案编号")
+    @NotBlank(message = "请输入人员档案编号")
+    private String code;
+
+    @ApiModelProperty(value = "姓名")
+    @NotNull(message = "请输入人员姓名")
+    @NotBlank(message = "请输入人员姓名")
+    private String name;
+
+    @ApiModelProperty(value = "国家")
+    @NotNull(message = "请输入常驻地区")
+    @NotBlank(message = "请输入常驻地区")
+    private String country;
+
+    @ApiModelProperty(value = "省份")
+    @NotNull(message = "请输入常驻地区")
+    @NotBlank(message = "请输入常驻地区")
+    private String province;
+
+    @ApiModelProperty(value = "城市")
+    @NotNull(message = "请输入常驻地区")
+    @NotBlank(message = "请输入常驻地区")
+    private String city;
+
+    @ApiModelProperty(value = "县区")
+    private String area;
+
+    @ApiModelProperty(value = "地址")
+    private String address;
+
+    @ApiModelProperty(value = "身份证号")
+    @NotNull(message = "请输入身份证号")
+    @NotBlank(message = "请输入身份证号")
+    private String identity;
+
+    @ApiModelProperty(value = "性别,MAN:男,WOMAN:女")
+    @NotNull(message = "请输入性别")
+    private GenderEnum gender;
+
+    @ApiModelProperty(value = "学历")
+    private EducationEnum education;
+
+    @ApiModelProperty(value = "手机号")
+    @NotNull(message = "请输入手机号")
+    @NotBlank(message = "请输入手机号")
+    private String mobileNumber;
+
+    @ApiModelProperty(value = "邮箱")
+    @NotNull(message = "请输入电子邮箱")
+    @NotBlank(message = "请输入电子邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "底照保存地址")
+    @NotNull(message = "请输入照片地址")
+    @NotBlank(message = "请输入照片地址")
+    private String basePhotoPath;
+
+    @ApiModelProperty(value = "供应商id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    @NotNull(message = "请选择供应商")
+    @Range(min = 1L, message = "请选择供应商")
+    private Long supplierId;
+
+    @ApiModelProperty(value = "入档时间")
+    @NotNull(message = "请选择入档时间")
+    @Range(min = 1L, message = "请选择入档时间")
+    private Long archivesTime;
+
+    @ApiModelProperty(value = "认证角色集合")
+    @NotEmpty(message = "请选择认证角色")
+    private List<RoleTypeEnum> roleTypeList;
+
+    @ApiModelProperty(value = "认证时间")
+    private Long authenticationTime;
+
+    @ApiModelProperty(value = "认证成绩")
+    private Double authenticationScore;
+
+    @ApiModelProperty(value = "认证有效时间")
+    private Long authenticationValidTime;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getCountry() {
+        return country;
+    }
+
+    public void setCountry(String country) {
+        this.country = country;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getArea() {
+        return area;
+    }
+
+    public void setArea(String area) {
+        this.area = area;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getIdentity() {
+        return identity;
+    }
+
+    public void setIdentity(String identity) {
+        this.identity = identity;
+    }
+
+    public GenderEnum getGender() {
+        return gender;
+    }
+
+    public void setGender(GenderEnum gender) {
+        this.gender = gender;
+    }
+
+    public EducationEnum getEducation() {
+        return education;
+    }
+
+    public void setEducation(EducationEnum education) {
+        this.education = education;
+    }
+
+    public String getMobileNumber() {
+        return mobileNumber;
+    }
+
+    public void setMobileNumber(String mobileNumber) {
+        this.mobileNumber = mobileNumber;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getBasePhotoPath() {
+        return basePhotoPath;
+    }
+
+    public void setBasePhotoPath(String basePhotoPath) {
+        this.basePhotoPath = basePhotoPath;
+    }
+
+    public Long getSupplierId() {
+        return supplierId;
+    }
+
+    public void setSupplierId(Long supplierId) {
+        this.supplierId = supplierId;
+    }
+
+    public Long getArchivesTime() {
+        return archivesTime;
+    }
+
+    public void setArchivesTime(Long archivesTime) {
+        this.archivesTime = archivesTime;
+    }
+
+    public List<RoleTypeEnum> getRoleTypeList() {
+        return roleTypeList;
+    }
+
+    public void setRoleTypeList(List<RoleTypeEnum> roleTypeList) {
+        this.roleTypeList = roleTypeList;
+    }
+
+    public Long getAuthenticationTime() {
+        return authenticationTime;
+    }
+
+    public void setAuthenticationTime(Long authenticationTime) {
+        this.authenticationTime = authenticationTime;
+    }
+
+    public Double getAuthenticationScore() {
+        return authenticationScore;
+    }
+
+    public void setAuthenticationScore(Double authenticationScore) {
+        this.authenticationScore = authenticationScore;
+    }
+
+    public Long getAuthenticationValidTime() {
+        return authenticationValidTime;
+    }
+
+    public void setAuthenticationValidTime(Long authenticationValidTime) {
+        this.authenticationValidTime = authenticationValidTime;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+}

+ 1 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/ServiceUnitResult.java

@@ -13,6 +13,7 @@ import io.swagger.annotations.ApiModelProperty;
  */
  */
 public class ServiceUnitResult {
 public class ServiceUnitResult {
     @ApiModelProperty("服务单元id")
     @ApiModelProperty("服务单元id")
+    @JsonSerialize(using = ToStringSerializer.class)
     private Long id;
     private Long id;
 
 
     @ApiModelProperty(value = "服务单元名称")
     @ApiModelProperty(value = "服务单元名称")

+ 262 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/UserArchivesResult.java

@@ -0,0 +1,262 @@
+package com.qmth.sop.business.bean.result;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.sop.common.enums.EducationEnum;
+import com.qmth.sop.common.enums.GenderEnum;
+import com.qmth.sop.common.enums.RoleTypeEnum;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+/**
+ * @Description: 人员档案查询结果
+ * @Author: CaoZixuan
+ * @Date: 2023-08-14
+ */
+public class UserArchivesResult {
+    @ApiModelProperty(value = "档案id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long userArchivesId;
+
+    @ApiModelProperty(value = "编号")
+    private String code;
+
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "省")
+    private String province;
+
+    @ApiModelProperty(value = "市")
+    private String city;
+
+    @ApiModelProperty(value = "县")
+    private String area;
+
+    @ApiModelProperty(value = "性别")
+    private GenderEnum gender;
+
+    @ApiModelProperty("年龄")
+    private Integer age;
+
+    @ApiModelProperty(value = "身份证号")
+    private String identity;
+
+    @ApiModelProperty(value = "学历")
+    private EducationEnum education;
+
+    @ApiModelProperty(value = "电话")
+    private String mobileNumber;
+
+    @ApiModelProperty(value = "电子邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "底照保存地址")
+    private String basePhotoPath;
+
+    @ApiModelProperty(value = "供应商id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long supplierId;
+
+    @ApiModelProperty(value = "供应商名称")
+    private String supplierName;
+
+    @ApiModelProperty(value = "入档时间")
+    private Long archivesTime;
+
+    @ApiModelProperty(value = "认证角色集合")
+    private List<RoleTypeEnum> roleTypeList;
+
+    @ApiModelProperty(value = "认证成绩")
+    private Double authenticationScore;
+
+    @ApiModelProperty(value = "认证有效时间")
+    private Long authenticationValidTime;
+
+    @ApiModelProperty(value = "认证状态")
+    private Boolean authenticationStatus;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "用户id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long userId;
+
+    public Long getUserArchivesId() {
+        return userArchivesId;
+    }
+
+    public void setUserArchivesId(Long userArchivesId) {
+        this.userArchivesId = userArchivesId;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getArea() {
+        return area;
+    }
+
+    public void setArea(String area) {
+        this.area = area;
+    }
+
+    public GenderEnum getGender() {
+        return gender;
+    }
+
+    public void setGender(GenderEnum gender) {
+        this.gender = gender;
+    }
+
+    public Integer getAge() {
+        return age;
+    }
+
+    public void setAge(Integer age) {
+        this.age = age;
+    }
+
+    public String getIdentity() {
+        return identity;
+    }
+
+    public void setIdentity(String identity) {
+        this.identity = identity;
+    }
+
+    public EducationEnum getEducation() {
+        return education;
+    }
+
+    public void setEducation(EducationEnum education) {
+        this.education = education;
+    }
+
+    public String getMobileNumber() {
+        return mobileNumber;
+    }
+
+    public void setMobileNumber(String mobileNumber) {
+        this.mobileNumber = mobileNumber;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getBasePhotoPath() {
+        return basePhotoPath;
+    }
+
+    public void setBasePhotoPath(String basePhotoPath) {
+        this.basePhotoPath = basePhotoPath;
+    }
+
+    public Long getSupplierId() {
+        return supplierId;
+    }
+
+    public void setSupplierId(Long supplierId) {
+        this.supplierId = supplierId;
+    }
+
+    public String getSupplierName() {
+        return supplierName;
+    }
+
+    public void setSupplierName(String supplierName) {
+        this.supplierName = supplierName;
+    }
+
+    public Long getArchivesTime() {
+        return archivesTime;
+    }
+
+    public void setArchivesTime(Long archivesTime) {
+        this.archivesTime = archivesTime;
+    }
+
+    public List<RoleTypeEnum> getRoleTypeList() {
+        return roleTypeList;
+    }
+
+    public void setRoleTypeList(List<RoleTypeEnum> roleTypeList) {
+        this.roleTypeList = roleTypeList;
+    }
+
+    public Double getAuthenticationScore() {
+        return authenticationScore;
+    }
+
+    public void setAuthenticationScore(Double authenticationScore) {
+        this.authenticationScore = authenticationScore;
+    }
+
+    public Long getAuthenticationValidTime() {
+        return authenticationValidTime;
+    }
+
+    public void setAuthenticationValidTime(Long authenticationValidTime) {
+        this.authenticationValidTime = authenticationValidTime;
+    }
+
+    public Boolean getAuthenticationStatus() {
+        return authenticationStatus;
+    }
+
+    public void setAuthenticationStatus(Boolean authenticationStatus) {
+        this.authenticationStatus = authenticationStatus;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+}

+ 4 - 3
sop-business/src/main/java/com/qmth/sop/business/entity/TBUserArchives.java

@@ -1,6 +1,7 @@
 package com.qmth.sop.business.entity;
 package com.qmth.sop.business.entity;
 
 
 import com.qmth.sop.common.base.BaseEntity;
 import com.qmth.sop.common.base.BaseEntity;
+import com.qmth.sop.common.enums.EducationEnum;
 import com.qmth.sop.common.enums.GenderEnum;
 import com.qmth.sop.common.enums.GenderEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
@@ -48,7 +49,7 @@ public class TBUserArchives extends BaseEntity implements Serializable {
     private GenderEnum gender;
     private GenderEnum gender;
 
 
     @ApiModelProperty(value = "学历")
     @ApiModelProperty(value = "学历")
-    private String education;
+    private EducationEnum education;
 
 
     @ApiModelProperty(value = "手机号")
     @ApiModelProperty(value = "手机号")
     private String mobileNumber;
     private String mobileNumber;
@@ -131,11 +132,11 @@ public class TBUserArchives extends BaseEntity implements Serializable {
         this.gender = gender;
         this.gender = gender;
     }
     }
 
 
-    public String getEducation() {
+    public EducationEnum getEducation() {
         return education;
         return education;
     }
     }
 
 
-    public void setEducation(String education) {
+    public void setEducation(EducationEnum education) {
         this.education = education;
         this.education = education;
     }
     }
 
 

+ 16 - 2
sop-business/src/main/java/com/qmth/sop/business/mapper/TBUserArchivesMapper.java

@@ -1,7 +1,12 @@
 package com.qmth.sop.business.mapper;
 package com.qmth.sop.business.mapper;
 
 
-import com.qmth.sop.business.entity.TBUserArchives;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.qmth.sop.business.bean.result.UserArchivesResult;
+import com.qmth.sop.business.entity.TBUserArchives;
+import com.qmth.sop.common.enums.RoleTypeEnum;
+import org.apache.ibatis.annotations.Param;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -12,5 +17,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * @since 2023-08-01
  * @since 2023-08-01
  */
  */
 public interface TBUserArchivesMapper extends BaseMapper<TBUserArchives> {
 public interface TBUserArchivesMapper extends BaseMapper<TBUserArchives> {
-
+    IPage<UserArchivesResult> findUserArchivesPage(@Param("iPage") Page<UserArchivesResult> iPage,
+                                                   @Param("city") String city,
+                                                   @Param("supplierId") Long supplierId,
+                                                   @Param("archivesName") String archivesName,
+                                                   @Param("roleType") RoleTypeEnum roleType,
+                                                   @Param("status") Boolean status,
+                                                   @Param("archivesTimeStart") Long archivesTimeStart,
+                                                   @Param("archivesTimeEnd") Long archivesTimeEnd,
+                                                   @Param("remainValidTime") Long remainValidTime,
+                                                   @Param("currentTime") Long currentTime);
 }
 }

+ 31 - 1
sop-business/src/main/java/com/qmth/sop/business/service/TBUserArchivesService.java

@@ -1,8 +1,13 @@
 package com.qmth.sop.business.service;
 package com.qmth.sop.business.service;
 
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.qmth.sop.business.bean.params.UserArchivesParam;
+import com.qmth.sop.business.bean.result.UserArchivesResult;
+import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.business.entity.TBUserArchives;
 import com.qmth.sop.business.entity.TBUserArchives;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.sop.common.enums.RoleTypeEnum;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -14,6 +19,31 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
  */
 public interface TBUserArchivesService extends IService<TBUserArchives> {
 public interface TBUserArchivesService extends IService<TBUserArchives> {
 
 
-//    Page<Object> findUserArchivesPage(String city,Long supplierId,String archivesName,);
+    /**
+     * 人员档案管理分页查询
+     *
+     * @param city                    城市
+     * @param supplierId              供应桑id
+     * @param archivesName            档案名称
+     * @param roleType                认证橘色
+     * @param authenticationStatus    认证状态
+     * @param authenticationTimeStart 入档时间-起始
+     * @param authenticationTimeEnd   入档时间-终止
+     * @param remainValidDay          剩余有效天
+     * @param pageNumber              分页页数
+     * @param pageSize                分页容量
+     * @return 结果
+     */
+    IPage<UserArchivesResult> findUserArchivesPage(String city, Long supplierId, String archivesName, RoleTypeEnum roleType,
+                                                   Boolean authenticationStatus, Long authenticationTimeStart,
+                                                   Long authenticationTimeEnd, Integer remainValidDay, Integer pageNumber, Integer pageSize);
 
 
+    /**
+     * 编辑用户档案
+     *
+     * @param userArchivesParam 人员档案参数
+     * @param requestUser       请求的用户
+     * @return 档案id
+     */
+    Long editUserArchives(UserArchivesParam userArchivesParam, SysUser requestUser);
 }
 }

+ 151 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBUserArchivesServiceImpl.java

@@ -1,10 +1,31 @@
 package com.qmth.sop.business.service.impl;
 package com.qmth.sop.business.service.impl;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.sop.business.bean.params.UserArchivesParam;
+import com.qmth.sop.business.bean.result.UserArchivesResult;
+import com.qmth.sop.business.entity.SysSupplier;
+import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.business.entity.TBUserArchives;
 import com.qmth.sop.business.entity.TBUserArchives;
 import com.qmth.sop.business.mapper.TBUserArchivesMapper;
 import com.qmth.sop.business.mapper.TBUserArchivesMapper;
+import com.qmth.sop.business.service.SysSupplierService;
+import com.qmth.sop.business.service.SysUserRoleService;
 import com.qmth.sop.business.service.TBUserArchivesService;
 import com.qmth.sop.business.service.TBUserArchivesService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.sop.common.contant.SystemConstant;
+import com.qmth.sop.common.enums.EducationEnum;
+import com.qmth.sop.common.enums.ExceptionResultEnum;
+import com.qmth.sop.common.enums.GenderEnum;
+import com.qmth.sop.common.enums.RoleTypeEnum;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.time.Duration;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -16,5 +37,134 @@ import org.springframework.stereotype.Service;
  */
  */
 @Service
 @Service
 public class TBUserArchivesServiceImpl extends ServiceImpl<TBUserArchivesMapper, TBUserArchives> implements TBUserArchivesService {
 public class TBUserArchivesServiceImpl extends ServiceImpl<TBUserArchivesMapper, TBUserArchives> implements TBUserArchivesService {
+    @Resource
+    private SysUserRoleService sysUserRoleService;
+    @Resource
+    private SysSupplierService sysSupplierService;
+
+    @Override
+    public IPage<UserArchivesResult> findUserArchivesPage(String city, Long supplierId, String archivesName, RoleTypeEnum roleType, Boolean authenticationStatus, Long authenticationTimeStart, Long authenticationTimeEnd, Integer remainValidDay, Integer pageNumber, Integer pageSize) {
+        if (city != null && city.length() > 0) {
+            city = SystemConstant.translateSpecificSign(city);
+        }
+        if (archivesName != null && archivesName.length() > 0) {
+            archivesName = SystemConstant.translateSpecificSign(archivesName);
+        }
+        // 认证的角色枚举
+        List<RoleTypeEnum> authRole = new ArrayList<>();
+        authRole.add(RoleTypeEnum.EFFECT_ENGINEER);
+        authRole.add(RoleTypeEnum.REGION_COORDINATOR);
+        authRole.add(RoleTypeEnum.ASSISTANT_ENGINEER);
+
+        Long remainValidTime = SystemConstant.processMiniute(Duration.ofDays(remainValidDay));
+        IPage<UserArchivesResult> page = this.baseMapper.findUserArchivesPage(new Page<>(pageNumber, pageSize), city, supplierId, archivesName, roleType, authenticationStatus, authenticationTimeStart, authenticationTimeEnd, remainValidTime, System.currentTimeMillis());
+        for (UserArchivesResult record : page.getRecords()) {
+            List<RoleTypeEnum> roleTypeEnumList = new ArrayList<>();
+            Long userId = record.getUserId();
+            if (userId != null && userId > 0) {
+                for (RoleTypeEnum roleTypeEnum : authRole) {
+                    // TODO: 2023/8/14 可优化查询 
+                    if (sysUserRoleService.userContainsRoles(userId, roleTypeEnum)) {
+                        roleTypeEnumList.add(roleTypeEnum);
+                    }
+                }
+            }
+            record.setRoleTypeList(roleTypeEnumList);
+        }
+        return page;
+    }
+
+    @Transactional
+    @Override
+    public Long editUserArchives(UserArchivesParam userArchivesParam, SysUser requestUser) {
+        Long id = userArchivesParam.getId();
+        String code = userArchivesParam.getCode();
+        // 校验档案编号唯一
+        List<TBUserArchives> codeCheckList = this.list(new QueryWrapper<TBUserArchives>().lambda().eq(TBUserArchives::getCode, code));
+        if (codeCheckList.size() > 1) {
+            throw ExceptionResultEnum.ERROR.exception("系统中存在多个相同的档案编号异常[" + code + "]");
+        } else if (codeCheckList.size() == 1) {
+            TBUserArchives codeCheck = codeCheckList.get(0);
+            if (!Objects.equals(codeCheck.getId(), id)) {
+                throw ExceptionResultEnum.ERROR.exception("系统中已经存在档案编号[" + code + "]");
+            }
+        }
+        // 校验身份证号唯一
+        String identify = userArchivesParam.getIdentity();
+        List<TBUserArchives> identifyCheckList = this.list(new QueryWrapper<TBUserArchives>().lambda().eq(TBUserArchives::getIdentity, identify));
+        if (identifyCheckList.size() > 1) {
+            throw ExceptionResultEnum.ERROR.exception("系统中存在多个相同的身份证号异常[" + identify + "]");
+        } else if (identifyCheckList.size() == 1) {
+            TBUserArchives identifyCheck = identifyCheckList.get(0);
+            if (!Objects.equals(identifyCheck.getId(), id)) {
+                throw ExceptionResultEnum.ERROR.exception("系统中已经存在身份证号[" + identify + "]");
+            }
+        }
+        // 校验手机号唯一
+        String mobileNumber = userArchivesParam.getMobileNumber();
+        List<TBUserArchives> mobileNumberCheckList = this.list(new QueryWrapper<TBUserArchives>().lambda().eq(TBUserArchives::getMobileNumber, mobileNumber));
+        if (mobileNumberCheckList.size() > 1) {
+            throw ExceptionResultEnum.ERROR.exception("系统中存在多个相同的手机号异常[" + mobileNumber + "]");
+        } else if (mobileNumberCheckList.size() == 1) {
+            TBUserArchives mobileNumberCheck = mobileNumberCheckList.get(0);
+            if (!Objects.equals(mobileNumberCheck.getId(), id)) {
+                throw ExceptionResultEnum.ERROR.exception("系统中已经存在手机号[" + mobileNumber + "]");
+            }
+        }
+
+        String name = userArchivesParam.getName();
+        String country = userArchivesParam.getCountry();
+        String province = userArchivesParam.getProvince();
+        String city = userArchivesParam.getCity();
+        String area = userArchivesParam.getArea();
+        String address = userArchivesParam.getAddress();
+        GenderEnum gender = userArchivesParam.getGender();
+        EducationEnum education = userArchivesParam.getEducation();
+        String email = userArchivesParam.getEmail();
+        String basePhotoPath = userArchivesParam.getBasePhotoPath();
+        Long supplierId = userArchivesParam.getSupplierId();
+        if (supplierId != null && supplierId > 0) {
+            SysSupplier sysSupplier = sysSupplierService.getById(supplierId);
+            if (Objects.isNull(sysSupplier)) {
+                throw ExceptionResultEnum.ERROR.exception("供应商不存在");
+            }
+        }
+        Long archivesTime = userArchivesParam.getArchivesTime();
+        List<RoleTypeEnum> roleTypeList = userArchivesParam.getRoleTypeList();
+        Long authenticationTime = userArchivesParam.getAuthenticationTime();
+        Double authenticationScore = userArchivesParam.getAuthenticationScore();
+        Long authenticationValidTime = userArchivesParam.getAuthenticationValidTime();
+        String remark = userArchivesParam.getRemark();
+
+        TBUserArchives tbUserArchives = new TBUserArchives();
+        tbUserArchives.setCode(code);
+        tbUserArchives.setName(name);
+        tbUserArchives.setCountry(country);
+        tbUserArchives.setProvince(province);
+        tbUserArchives.setCity(city);
+        tbUserArchives.setArea(area);
+        tbUserArchives.setAddress(address);
+        tbUserArchives.setIdentity(identify);
+        tbUserArchives.setGender(gender);
+        tbUserArchives.setEducation(education);
+        tbUserArchives.setMobileNumber(mobileNumber);
+        tbUserArchives.setEmail(email);
+        tbUserArchives.setBasePhotoPath(basePhotoPath);
+        // 档案表编辑
+        if (id == null || id == 0) {
+            // 新增
+            tbUserArchives.setCreateId(requestUser.getId());
+            this.save(tbUserArchives);
+            id = tbUserArchives.getId();
+        } else {
+            // 编辑
+            tbUserArchives.setId(id);
+            tbUserArchives.setUpdateId(requestUser.getId());
+            this.updateById(tbUserArchives);
+        }
 
 
+        // 档案详细表编辑
+        // TODO: 2023/8/14  档案详细 用户关联新增 
+        return null;
+    }
 }
 }

+ 6 - 0
sop-business/src/main/resources/db/log/caozixuan_update_log.sql

@@ -59,3 +59,9 @@ UPDATE sys_privilege SET related = '2012' WHERE (id = '237');
 -- 2023/08/13
 -- 2023/08/13
 ALTER TABLE `t_b_crm`
 ALTER TABLE `t_b_crm`
     CHANGE COLUMN `service_id` `service_id` BIGINT NULL COMMENT '服务单元id' ;
     CHANGE COLUMN `service_id` `service_id` BIGINT NULL COMMENT '服务单元id' ;
+
+-- 日志管理权限
+INSERT INTO sys_privilege (id, name, url, type, parent_id, sequence, property, enable, default_auth, front_display) VALUES ('2014', '日志管理-查询', '/api/sys/log/page', 'URL', '10', '1', 'AUTH', '1', '1', '0');
+UPDATE sys_privilege SET related = '2014' WHERE (id = '108');
+UPDATE sys_privilege SET related = '2014' WHERE (id = '109');
+UPDATE sys_privilege SET related = '2014' WHERE (id = '110');

+ 1 - 1
sop-business/src/main/resources/mapper/TBServiceMapper.xml

@@ -17,7 +17,7 @@
                    ':',
                    ':',
                    tbs.region_project_count) AS rate,
                    tbs.region_project_count) AS rate,
             tbs.status,
             tbs.status,
-            creator.real_name AS realName,
+            creator.real_name AS creatorName,
             tbs.create_time AS createTime
             tbs.create_time AS createTime
         FROM
         FROM
             t_b_service tbs
             t_b_service tbs

+ 71 - 0
sop-business/src/main/resources/mapper/TBUserArchivesMapper.xml

@@ -2,4 +2,75 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qmth.sop.business.mapper.TBUserArchivesMapper">
 <mapper namespace="com.qmth.sop.business.mapper.TBUserArchivesMapper">
 
 
+    <select id="findUserArchivesPage" resultType="com.qmth.sop.business.bean.result.UserArchivesResult">
+        SELECT
+            tbua.id AS userArchivesId,
+            tbua.code,
+            tbua.name,
+            tbua.province,
+            tbua.city,
+            tbua.area,
+            tbua.identity,
+            tbua.gender,
+            education,
+            tbua.mobile_number AS mobileNumber,
+            tbua.email,
+            base_photo_path AS basePhotoPath,
+            tbuas.supplier_id AS supplierId,
+            ss.name AS supplierName,
+            tbuas.archives_time AS archivesTime,
+            tbuas.authentication_score AS authenticationScore,
+            tbuas.authentication_valid_time AS authenticationValidTime,
+            tbuas.remark,
+            su.id AS userId
+        FROM
+            t_b_user_archives tbua
+                LEFT JOIN
+            t_b_user_archives_supplier tbuas ON tbua.id = tbuas.supplier_id
+                LEFT JOIN
+            sys_supplier ss ON ss.id = tbuas.supplier_id
+                LEFT JOIN
+            sys_user su ON su.mobile_number = tbua.mobile_number
+        <where>
+            <if test="city != null and city != ''">
+                AND tbua.city LIKE CONCAT('%',#{city},'%')
+            </if>
+            <if test="supplierId != null">
+                AND ss.id = #{supplierId}
+            </if>
+            <if test="archivesName != null and archivesName != ''">
+                AND tbua.name LIKE CONCAT('%',#{archivesName},'%')
+            </if>
+            <if test="archivesTimeStart != null">
+                AND tbuas.archives_time >= #{archivesTimeStart}
+            </if>
+            <if test="archivesTimeEnd != null">
+                AND #{archivesTimeEnd} >= tbuas.archives_time
+            </if>
+            <if test="remainValidTime != null">
+                AND tbuas.authentication_valid_time >= #{remainValidTime}
+            </if>
+            <if test="status != null">
+                <choose>
+                    <when test="status">
+                        AND tbuas.authentication_valid_time >= #{currentTime}
+                    </when>
+                    <otherwise>
+                        AND (tbuas.authentication_valid_time IS NULL OR tbuas.authentication_valid_time &lt;= #{currentTime})
+                    </otherwise>
+                </choose>
+            </if>
+            <if test="roleType != null">
+                AND EXISTS(SELECT
+                            1
+                        FROM
+                            sys_user_role sur
+                        LEFT JOIN
+                            sys_role sr ON sur.role_id = sr.id
+                        WHERE
+                            su.id = sur.user_id
+                                AND sr.type = #{roleType})
+            </if>
+        </where>
+    </select>
 </mapper>
 </mapper>

+ 23 - 0
sop-common/src/main/java/com/qmth/sop/common/enums/EducationEnum.java

@@ -0,0 +1,23 @@
+package com.qmth.sop.common.enums;
+
+/**
+ * @Description: 学历枚举
+ * @Author: CaoZixuan
+ * @Date: 22023-08-14
+ */
+public enum EducationEnum {
+    BACHELOR_DEGREE("本科及以上"),
+    JUNIOR_COLLEGE("大专"),
+    HIGH_SCHOOL("高中"),
+    MIDDLE_SCHOOL("初中");
+
+    EducationEnum(String title) {
+        this.title = title;
+    }
+
+    private final String title;
+
+    public String getTitle() {
+        return title;
+    }
+}

+ 7 - 0
sop-server/src/main/java/com/qmth/sop/server/api/TBServiceController.java

@@ -2,6 +2,7 @@ package com.qmth.sop.server.api;
 
 
 
 
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.sop.business.annotation.OperationLog;
 import com.qmth.sop.business.bean.params.ServiceUnitParam;
 import com.qmth.sop.business.bean.params.ServiceUnitParam;
 import com.qmth.sop.business.bean.result.SysLogResult;
 import com.qmth.sop.business.bean.result.SysLogResult;
 import com.qmth.sop.business.entity.SysUser;
 import com.qmth.sop.business.entity.SysUser;
@@ -39,6 +40,7 @@ public class TBServiceController {
     @ApiOperation(value = "服务单元管理-分页查询")
     @ApiOperation(value = "服务单元管理-分页查询")
     @RequestMapping(value = "/page", method = RequestMethod.POST)
     @RequestMapping(value = "/page", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = SysLogResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = SysLogResult.class)})
+    @OperationLog
     public Result findServiceUnitPage(@ApiParam(value = "业务类型") @RequestParam(required = false) ProductTypeEnum type,
     public Result findServiceUnitPage(@ApiParam(value = "业务类型") @RequestParam(required = false) ProductTypeEnum type,
                                       @ApiParam(value = "负责人") @RequestParam(required = false) String serviceLeadId,
                                       @ApiParam(value = "负责人") @RequestParam(required = false) String serviceLeadId,
                                       @ApiParam(value = "服务状态") @RequestParam(required = false) ServiceStatusEnum status,
                                       @ApiParam(value = "服务状态") @RequestParam(required = false) ServiceStatusEnum status,
@@ -54,6 +56,7 @@ public class TBServiceController {
     @ApiOperation(value = "服务单元管理-编辑")
     @ApiOperation(value = "服务单元管理-编辑")
     @RequestMapping(value = "/edit", method = RequestMethod.POST)
     @RequestMapping(value = "/edit", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "更新成功", response = Result.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "更新成功", response = Result.class)})
+    @OperationLog
     public Result editServiceUnit(@Valid @RequestBody ServiceUnitParam serviceUnitParam, BindingResult bindingResult) {
     public Result editServiceUnit(@Valid @RequestBody ServiceUnitParam serviceUnitParam, BindingResult bindingResult) {
         if (bindingResult.hasErrors()) {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
@@ -65,6 +68,7 @@ public class TBServiceController {
     @ApiOperation(value = "服务单元管理-作废")
     @ApiOperation(value = "服务单元管理-作废")
     @RequestMapping(value = "/cancel", method = RequestMethod.POST)
     @RequestMapping(value = "/cancel", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "作废成功", response = Result.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "作废成功", response = Result.class)})
+    @OperationLog
     public Result cancelServiceUnit(@ApiParam(value = "服务单元id", required = true) @RequestParam String id) {
     public Result cancelServiceUnit(@ApiParam(value = "服务单元id", required = true) @RequestParam String id) {
         tbServiceService.cancelServiceUnit(SystemConstant.convertIdToLong(id));
         tbServiceService.cancelServiceUnit(SystemConstant.convertIdToLong(id));
         return ResultUtil.ok();
         return ResultUtil.ok();
@@ -73,6 +77,7 @@ public class TBServiceController {
     @ApiOperation(value = "服务单元管理-发布")
     @ApiOperation(value = "服务单元管理-发布")
     @RequestMapping(value = "/publish", method = RequestMethod.POST)
     @RequestMapping(value = "/publish", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "发布成功", response = Result.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "发布成功", response = Result.class)})
+    @OperationLog
     public Result publishServiceUnit(@ApiParam(value = "服务单元id", required = true) @RequestParam String id) {
     public Result publishServiceUnit(@ApiParam(value = "服务单元id", required = true) @RequestParam String id) {
         tbServiceService.publishServiceUnit(SystemConstant.convertIdToLong(id));
         tbServiceService.publishServiceUnit(SystemConstant.convertIdToLong(id));
         return ResultUtil.ok();
         return ResultUtil.ok();
@@ -81,6 +86,7 @@ public class TBServiceController {
     @ApiOperation(value = "服务单元管理-关闭")
     @ApiOperation(value = "服务单元管理-关闭")
     @RequestMapping(value = "/cloze", method = RequestMethod.POST)
     @RequestMapping(value = "/cloze", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "作废成功", response = Result.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "作废成功", response = Result.class)})
+    @OperationLog
     public Result clozeServiceUnit(@ApiParam(value = "服务单元id", required = true) @RequestParam String id) {
     public Result clozeServiceUnit(@ApiParam(value = "服务单元id", required = true) @RequestParam String id) {
         tbServiceService.clozeServiceUnit(SystemConstant.convertIdToLong(id));
         tbServiceService.clozeServiceUnit(SystemConstant.convertIdToLong(id));
         return ResultUtil.ok();
         return ResultUtil.ok();
@@ -89,6 +95,7 @@ public class TBServiceController {
     @ApiOperation(value = "服务单元管理-重启")
     @ApiOperation(value = "服务单元管理-重启")
     @RequestMapping(value = "/restart", method = RequestMethod.POST)
     @RequestMapping(value = "/restart", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "重启成功", response = Result.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "重启成功", response = Result.class)})
+    @OperationLog
     public Result restartServiceUnit(@ApiParam(value = "服务单元id", required = true) @RequestParam String id) {
     public Result restartServiceUnit(@ApiParam(value = "服务单元id", required = true) @RequestParam String id) {
         tbServiceService.restartServiceUnit(SystemConstant.convertIdToLong(id));
         tbServiceService.restartServiceUnit(SystemConstant.convertIdToLong(id));
         return ResultUtil.ok();
         return ResultUtil.ok();

+ 4 - 0
sop-server/src/main/java/com/qmth/sop/server/api/TBServiceRegionController.java

@@ -2,6 +2,7 @@ package com.qmth.sop.server.api;
 
 
 
 
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.sop.business.annotation.OperationLog;
 import com.qmth.sop.business.bean.params.ServiceRegionParam;
 import com.qmth.sop.business.bean.params.ServiceRegionParam;
 import com.qmth.sop.business.bean.result.ServiceRegionResult;
 import com.qmth.sop.business.bean.result.ServiceRegionResult;
 import com.qmth.sop.business.service.TBServiceRegionService;
 import com.qmth.sop.business.service.TBServiceRegionService;
@@ -35,6 +36,7 @@ public class TBServiceRegionController {
     @ApiOperation(value = "服务区域规划-分页查询")
     @ApiOperation(value = "服务区域规划-分页查询")
     @RequestMapping(value = "/page", method = RequestMethod.POST)
     @RequestMapping(value = "/page", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = ServiceRegionResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = ServiceRegionResult.class)})
+    @OperationLog
     public Result findServiceRegionPage(@ApiParam(value = "服务单元id") @RequestParam(required = false) String serviceUnitId,
     public Result findServiceRegionPage(@ApiParam(value = "服务单元id") @RequestParam(required = false) String serviceUnitId,
                                         @ApiParam(value = "大区经理") @RequestParam(required = false) String leadId,
                                         @ApiParam(value = "大区经理") @RequestParam(required = false) String leadId,
                                         @ApiParam(value = "城市") @RequestParam(required = false) String city,
                                         @ApiParam(value = "城市") @RequestParam(required = false) String city,
@@ -47,6 +49,7 @@ public class TBServiceRegionController {
     @ApiOperation(value = "服务区域规划-编辑")
     @ApiOperation(value = "服务区域规划-编辑")
     @RequestMapping(value = "/edit", method = RequestMethod.POST)
     @RequestMapping(value = "/edit", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Result.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Result.class)})
+    @OperationLog
     public Result bindCrmWithServiceBatch(@Valid @RequestBody ServiceRegionParam serviceRegionParam, BindingResult bindingResult) {
     public Result bindCrmWithServiceBatch(@Valid @RequestBody ServiceRegionParam serviceRegionParam, BindingResult bindingResult) {
         if (bindingResult.hasErrors()) {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
@@ -57,6 +60,7 @@ public class TBServiceRegionController {
     @ApiOperation(value = "服务区域规划-删除")
     @ApiOperation(value = "服务区域规划-删除")
     @RequestMapping(value = "/remove", method = RequestMethod.POST)
     @RequestMapping(value = "/remove", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = ServiceRegionResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = ServiceRegionResult.class)})
+    @OperationLog
     public Result removeServiceRegion(@ApiParam(value = "服务单元id") @RequestParam(required = false) String serviceUnitId) {
     public Result removeServiceRegion(@ApiParam(value = "服务单元id") @RequestParam(required = false) String serviceUnitId) {
         tbServiceRegionService.removeServiceRegion(SystemConstant.convertIdToLong(serviceUnitId));
         tbServiceRegionService.removeServiceRegion(SystemConstant.convertIdToLong(serviceUnitId));
         return ResultUtil.ok();
         return ResultUtil.ok();

+ 6 - 0
sop-server/src/main/java/com/qmth/sop/server/api/TBServiceScopeController.java

@@ -2,6 +2,7 @@ package com.qmth.sop.server.api;
 
 
 
 
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.sop.business.annotation.OperationLog;
 import com.qmth.sop.business.bean.params.ServiceScopeParam;
 import com.qmth.sop.business.bean.params.ServiceScopeParam;
 import com.qmth.sop.business.bean.result.CrmServiceResult;
 import com.qmth.sop.business.bean.result.CrmServiceResult;
 import com.qmth.sop.business.service.TBCrmService;
 import com.qmth.sop.business.service.TBCrmService;
@@ -36,6 +37,7 @@ public class TBServiceScopeController {
     @ApiOperation(value = "服务范围管理-分页查询")
     @ApiOperation(value = "服务范围管理-分页查询")
     @RequestMapping(value = "/page", method = RequestMethod.POST)
     @RequestMapping(value = "/page", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = CrmServiceResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = CrmServiceResult.class)})
+    @OperationLog
     public Result findServiceScopePage(@ApiParam(value = "服务单元id") @RequestParam(required = false) String serviceUnitId,
     public Result findServiceScopePage(@ApiParam(value = "服务单元id") @RequestParam(required = false) String serviceUnitId,
                                        @ApiParam(value = "城市") @RequestParam(required = false) String city,
                                        @ApiParam(value = "城市") @RequestParam(required = false) String city,
                                        @ApiParam(value = "客户类型") @RequestParam(required = false) ProductTypeEnum productType,
                                        @ApiParam(value = "客户类型") @RequestParam(required = false) ProductTypeEnum productType,
@@ -50,6 +52,7 @@ public class TBServiceScopeController {
     @ApiOperation(value = "服务范围管理-新增服务范围-未绑定派单分页查询")
     @ApiOperation(value = "服务范围管理-新增服务范围-未绑定派单分页查询")
     @RequestMapping(value = "/unbind/page", method = RequestMethod.POST)
     @RequestMapping(value = "/unbind/page", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = CrmServiceResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = CrmServiceResult.class)})
+    @OperationLog
     public Result findUnbindOrderPage(@ApiParam(value = "派单人") @RequestParam(required = false) String crmUserId,
     public Result findUnbindOrderPage(@ApiParam(value = "派单人") @RequestParam(required = false) String crmUserId,
                                       @ApiParam(value = "客户类型") @RequestParam(required = false) ProductTypeEnum productType,
                                       @ApiParam(value = "客户类型") @RequestParam(required = false) ProductTypeEnum productType,
                                       @ApiParam(value = "客户名称") @RequestParam(required = false) String customName,
                                       @ApiParam(value = "客户名称") @RequestParam(required = false) String customName,
@@ -64,6 +67,7 @@ public class TBServiceScopeController {
     @ApiOperation(value = "服务范围管理-批量划定派单和服务单元关系")
     @ApiOperation(value = "服务范围管理-批量划定派单和服务单元关系")
     @RequestMapping(value = "/bind_batch", method = RequestMethod.POST)
     @RequestMapping(value = "/bind_batch", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Result.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Result.class)})
+    @OperationLog
     public Result bindCrmWithServiceBatch(@Valid @RequestBody ServiceScopeParam serviceScopeParam, BindingResult bindingResult) {
     public Result bindCrmWithServiceBatch(@Valid @RequestBody ServiceScopeParam serviceScopeParam, BindingResult bindingResult) {
         if (bindingResult.hasErrors()) {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
@@ -75,6 +79,7 @@ public class TBServiceScopeController {
     @ApiOperation(value = "服务范围管理-移出")
     @ApiOperation(value = "服务范围管理-移出")
     @RequestMapping(value = "/unbind", method = RequestMethod.POST)
     @RequestMapping(value = "/unbind", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Result.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Result.class)})
+    @OperationLog
     public Result unbind(@ApiParam(value = "派单id") @RequestParam(required = false) String crmId) {
     public Result unbind(@ApiParam(value = "派单id") @RequestParam(required = false) String crmId) {
         tbCrmService.unbindCrmWithService(SystemConstant.convertIdToLong(crmId));
         tbCrmService.unbindCrmWithService(SystemConstant.convertIdToLong(crmId));
         return ResultUtil.ok();
         return ResultUtil.ok();
@@ -83,6 +88,7 @@ public class TBServiceScopeController {
     @ApiOperation(value = "服务范围管理-派单小计")
     @ApiOperation(value = "服务范围管理-派单小计")
     @RequestMapping(value = "/subTotal", method = RequestMethod.POST)
     @RequestMapping(value = "/subTotal", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
+    @OperationLog
     public Result findCrmSubTotalData() {
     public Result findCrmSubTotalData() {
         return ResultUtil.ok(tbCrmService.findCrmSubTotalData());
         return ResultUtil.ok(tbCrmService.findCrmSubTotalData());
     }
     }