zhangfeng
2023-07-17 1e4e6a526682ddcd62378b1f2975e7d4b4b2de4f
用户模块修改
已修改9个文件
已添加8个文件
1805 ■■■■■ 文件已修改
src/main/java/com/gk/hotwork/Controller/SpecialityController.java 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Controller/UserController.java 1065 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Domain/Exception/Handler/CustomExceptionHandler.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Domain/SpecialityInfo.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Domain/UserInfo.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Domain/Vo/UserVo.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Domain/dto/req/IdParam.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Domain/dto/req/SpecialityAddReqDTO.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Domain/dto/req/SpecialityModReqDTO.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Mapper/SpecialityMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Mapper/UserInfoMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Mapper/mybatis/UserInfoMapper.xml 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Service/ServiceImpl/SpecialityServiceImpl.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Service/ServiceImpl/UserServiceImpl.java 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Service/SpecialityService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Service/UserService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-dev.yml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Controller/SpecialityController.java
对比新文件
@@ -0,0 +1,126 @@
package com.gk.hotwork.Controller;
import com.gk.hotwork.Controller.Base.BaseController;
import com.gk.hotwork.Domain.SpecialityInfo;
import com.gk.hotwork.Domain.Utils.Msg;
import com.gk.hotwork.Domain.Utils.PageInfo;
import com.gk.hotwork.Domain.Utils.StringUtils;
import com.gk.hotwork.Domain.dto.req.IdParam;
import com.gk.hotwork.Domain.dto.req.SpecialityAddReqDTO;
import com.gk.hotwork.Domain.dto.req.SpecialityModReqDTO;
import com.gk.hotwork.Service.SpecialityService;
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.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
/**
 * @email 1603559716@qq.com
 * @author: zf
 * @date: 2023/7/17
 * @time: 13:36
 */
@Api(tags = "专业接口")
@RequestMapping("/speciality")
@RestController
public class SpecialityController extends BaseController {
    @Autowired
    private SpecialityService specialityService;
    @PostMapping("/add")
    @ApiOperation(value = "添加专业数据",response = Msg.class)
    public Msg addSpeciality(@Validated @RequestBody SpecialityAddReqDTO specialityAddReqDTO){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        SpecialityInfo specialityInfo = new SpecialityInfo();
        specialityInfo.setName(specialityAddReqDTO.getName());
        specialityInfo.setRemark(specialityAddReqDTO.getRemark());
        specialityInfo.setIsDel((byte)0);
        specialityInfo.setCreateTime(new Date());
        specialityInfo.setCreateBy(getUser().getRealname());
        specialityInfo.setUpdateTime(new Date());
        specialityInfo.setUpdateBy(getUser().getRealname());
        specialityService.save(specialityInfo);
       return msg;
    }
    @PostMapping("/mod")
    @ApiOperation(value = "修改专业数据",response = Msg.class)
    public Msg modSpeciality(@Validated @RequestBody SpecialityModReqDTO specialityModReqDTO){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        SpecialityInfo specialityInfo = new SpecialityInfo();
        specialityInfo.setId(specialityModReqDTO.getId());
        specialityInfo.setName(specialityModReqDTO.getName());
        specialityInfo.setRemark(specialityModReqDTO.getRemark());
        specialityInfo.setUpdateTime(new Date());
        specialityInfo.setCreateBy(getUser().getRealname());
        specialityService.updateById(specialityInfo);
        return msg;
    }
    @PostMapping("/del")
    @ApiOperation(value = "删除专业数据",response = Msg.class)
    public Msg delSpeciality(@Validated @RequestBody IdParam idParam){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        SpecialityInfo specialityInfo = new SpecialityInfo();
        specialityInfo.setId(idParam.getId());
        specialityInfo.setIsDel((byte)1);
        specialityInfo.setUpdateTime(new Date());
        specialityInfo.setCreateBy(getUser().getRealname());
        specialityService.updateById(specialityInfo);
        return msg;
    }
    @GetMapping("/list/page")
    @ApiOperation(value = "分页查询专业数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name",value = "专业名称")
    })
    public Msg listSpecialityByPage(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize,String name){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(name)) {
            condition.put("name", name.trim());
        }
        pageInfo.setCondition(condition);
        specialityService.listSpecialityByPage(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/list")
    @ApiOperation(value = "专业数据列表",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name",value = "专业名称")
    })
    public Msg listSpeciality(String name){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        List<SpecialityInfo> specialityInfos = specialityService.listSpeciality(name);
        msg.setResult(specialityInfos);
        return msg;
    }
}
src/main/java/com/gk/hotwork/Controller/UserController.java
@@ -16,6 +16,7 @@
import com.gk.hotwork.Domain.Vo.WorkCertVo;
import com.gk.hotwork.Service.*;
import io.swagger.annotations.*;
import io.swagger.models.auth.In;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -60,6 +61,8 @@
    private BlackListService blackListService;
    @Autowired
    private DeviceLocationService deviceLocationService;
    @Autowired
    private SpecialityService specialityService;
    @Value("${workname}")
    private String workname;
    @Value("${workCert}")
@@ -134,6 +137,148 @@
        pageInfo.setCondition(condition);
        userService.selectUserDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/company/user/list")
    @ApiOperation(value = "获取企业用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "username",value = "用户名"),
            @ApiImplicitParam(name = "company",value = "企业名称"),
            @ApiImplicitParam(name = "realname",value = "姓名"),
            @ApiImplicitParam(name = "idcard",value = "身份证号"),
            @ApiImplicitParam(name = "job",value = "身份证号"),
    })
    public Msg getCompanyUserInfo(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort,String order,
                           String username,String company,String realname, String idcard, String job){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(username)) {
            condition.put("username", username.trim());
        }
        if (StringUtils.isNotBlank(company)) {
            condition.put("company", company.trim());
        }
        if (StringUtils.isNotBlank(realname)){
            condition.put("realname",realname.trim());
        }
        if (StringUtils.isNotBlank(idcard)){
            condition.put("idcard",idcard.trim());
        }
        if (StringUtils.isNotBlank(job)){
            condition.put("job",job.trim());
        }
        condition.put("roleId",35l);
        pageInfo.setCondition(condition);
        userService.selectCompanyUserDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/supervise/user/list")
    @ApiOperation(value = "获取监管用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "username",value = "用户名"),
            @ApiImplicitParam(name = "company",value = "单位名称"),
            @ApiImplicitParam(name = "realname",value = "姓名"),
            @ApiImplicitParam(name = "idcard",value = "身份证号"),
    })
    public Msg getSuperviseUserInfo(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort,String order,
                                  String username,String company,String realname, String idcard){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        UserInfo userInfoCurrent = userService.selectByUser(getUser().getUsername());
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(username)) {
            condition.put("username", username.trim());
        }
        if (StringUtils.isNotBlank(company)) {
            condition.put("company", company.trim());
        }
        if (StringUtils.isNotBlank(realname)){
            condition.put("realname",realname.trim());
        }
        if (StringUtils.isNotBlank(idcard)){
            condition.put("idcard",idcard.trim());
        }
        if(StringUtils.isNotBlank(userInfoCurrent.getProvince())){
            condition.put("province", userInfoCurrent.getProvince());
        }
        if(StringUtils.isNotBlank(userInfoCurrent.getCity())){
            condition.put("city", userInfoCurrent.getCity());
        }
        if(StringUtils.isNotBlank(userInfoCurrent.getCounty())){
            condition.put("county", userInfoCurrent.getCounty());
        }
        condition.put("roleId",38l);
        pageInfo.setCondition(condition);
        userService.selectSuperviseUserDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
    @GetMapping("/expert/user/list")
    @ApiOperation(value = "获取监管用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "sort",value = "排序规则"),
            @ApiImplicitParam(name = "order",value = "排序字段"),
            @ApiImplicitParam(name = "username",value = "用户名"),
            @ApiImplicitParam(name = "company",value = "单位名称"),
            @ApiImplicitParam(name = "realname",value = "姓名"),
            @ApiImplicitParam(name = "idcard",value = "身份证号"),
    })
    public Msg getExpertUserInfo(@RequestParam(defaultValue = "0") Integer pageIndex, @RequestParam(defaultValue = "10") Integer pageSize, String sort,String order,
                                    String username,String company,String realname, String idcard){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        PageInfo pageInfo = new PageInfo(pageIndex, pageSize,sort,order);
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(username)) {
            condition.put("username", username.trim());
        }
        if (StringUtils.isNotBlank(company)) {
            condition.put("company", company.trim());
        }
        if (StringUtils.isNotBlank(realname)){
            condition.put("realname",realname.trim());
        }
        if (StringUtils.isNotBlank(idcard)){
            condition.put("idcard",idcard.trim());
        }
        condition.put("roleId",36l);
        pageInfo.setCondition(condition);
        userService.selectExpertUserDataGrid(pageInfo);
        msg.setResult(pageInfo);
        return msg;
    }
@@ -329,6 +474,804 @@
        userService.save(userInfo);
        return msg;
    }
    /**
     * 专家用户-新增
     * @param jsonObject
     * @return
     */
    @PostMapping("/add/expert/user")
    @ApiOperation(value = "添加专家用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "username",value = "手机号",required = true),
            @ApiImplicitParam(name = "password",value = "密码",required = true),
            @ApiImplicitParam(name = "email",value = "邮箱"),
            @ApiImplicitParam(name = "company",value = "单位"),
            @ApiImplicitParam(name = "job",value = "职务"),
            @ApiImplicitParam(name = "realname",value = "姓名"),
            @ApiImplicitParam(name = "idcard",value = "身份证"),
            @ApiImplicitParam(name = "specialityId",value = "专业方向id"),
            @ApiImplicitParam(name = "professionalLevel",value = "职称"),
    })
    public Msg addExpertUserInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        UserInfo userInfo = new UserInfo();
        String password = jsonObject.getString("password");
        String PW_PATTERN = "(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@#$%^&*_.]).{8,}";
        if (!password.matches(PW_PATTERN)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("密码必须8位以上,并且包含大小写字母、数字、特殊符号三种以上");
            return msg;
        }else {
            userInfo.setPassword(MD5Utils.encode(password));
        }
        String username = jsonObject.getString("username");
        if (StringUtils.isNotBlank(username) && username.length() == 11){
            userInfo.setUsername(username);
        }else{
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("手机号必须为11位数");
            return msg;
        }
        String realname = jsonObject.getString("realname");
        if (StringUtils.isBlank(realname)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("姓名不能为空");
            return msg;
        }
        String idcard = jsonObject.getString("idcard");
        if (StringUtils.isNotBlank(idcard)){
            UserInfo idCardExist = userService.selectByIdCard(null,idcard);
            if (null != idCardExist){
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("身份证重复");
                return msg;
            }else{
                userInfo.setIdcard(idcard);
            }
            if (!IdCardUtil.strongVerifyIdNumber(idcard)) {
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("身份证非法");
                return msg;
            }
        }
        Integer professionalLevel = jsonObject.getInteger("professionalLevel");
        if (professionalLevel == null) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("职称参数为空");
            return msg;
        }
        Long specialityId = jsonObject.getLong("specialityId");
        if (specialityId == null) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("专业参数为空");
            return msg;
        }
        SpecialityInfo specialityInfo = specialityService.getById(specialityId);
        if (specialityInfo == null) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("专业不存在");
            return msg;
        }
        userInfo.setCompany(jsonObject.getString("company"));
        userInfo.setEmail(jsonObject.getString("email"));
        userInfo.setSpecialityId(specialityId);
        userInfo.setProfessionalLevel(professionalLevel);
        userInfo.setJob(jsonObject.getString("job"));
        userInfo.setStatus((byte)1);
        userInfo.setType(3);
        userInfo.setCreatedby(getUser().getRealname());
        userInfo.setRealname(realname);
        userInfo.setCreateddate(new Date());
        userInfo.setLastmodifiedby(getUser().getRealname());
        userInfo.setLastmodifieddate(new Date());
        userInfo.setIsdel((byte)0);
        userInfo.setIsupload((byte)0);
        List<UserInfo> userInfoExist = userService.selectUserInfo(null,userInfo.getUsername());
        if (userInfoExist.size() > 0){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("用户名重复");
            return msg;
        }
        int userSize = userService.selectUserSize();
        int sli = (userSize + 1) % sliceSize;
        userInfo.setSlice(sli + "");
        if (sli == 0)
            userInfo.setSlice(sliceSize + "");
        userService.save(userInfo);
        UserInfo user = userService.selectByUser(userInfo.getUsername());
        //默认配置企业用户角色
        UserRolesInfo userRolesInfo = new UserRolesInfo();
        userRolesInfo.setRoleid(36l);
        userRolesInfo.setUserid(user.getId());
        userRolesService.save(userRolesInfo);
        return msg;
    }
    /**
     * 专家用户-修改
     * @param jsonObject
     * @return
     */
    @PostMapping("/put/expert/user")
    @ApiOperation(value = "修改专家用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "主键",required = true),
            @ApiImplicitParam(name = "username",value = "手机号",required = true),
            @ApiImplicitParam(name = "password",value = "密码",required = true),
            @ApiImplicitParam(name = "email",value = "邮箱"),
            @ApiImplicitParam(name = "company",value = "单位"),
            @ApiImplicitParam(name = "job",value = "职务"),
            @ApiImplicitParam(name = "realname",value = "姓名"),
            @ApiImplicitParam(name = "idcard",value = "身份证"),
            @ApiImplicitParam(name = "specialityId",value = "专业方向id"),
            @ApiImplicitParam(name = "professionalLevel",value = "职称"),
    })
    public Msg putExpertUserInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        UserInfo userInfo = new UserInfo();
        Long id = jsonObject.getLong("id");
        if (id == null) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("主键参数为空");
            return msg;
        }else {
            userInfo.setId(id);
        }
        String password = jsonObject.getString("password");
        String PW_PATTERN = "(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@#$%^&*_.]).{8,}";
        if (!password.matches(PW_PATTERN)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("密码必须8位以上,并且包含大小写字母、数字、特殊符号三种以上");
            return msg;
        }else {
            userInfo.setPassword(MD5Utils.encode(password));
        }
        String username = jsonObject.getString("username");
        if (StringUtils.isNotBlank(username) && username.length() == 11){
            userInfo.setUsername(username);
        }else{
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("手机号必须为11位数");
            return msg;
        }
        String realname = jsonObject.getString("realname");
        if (StringUtils.isBlank(realname)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("姓名不能为空");
            return msg;
        }
        String idcard = jsonObject.getString("idcard");
        if (StringUtils.isNotBlank(idcard)){
            UserInfo idCardExist = userService.selectByIdCard(id,idcard);
            if (null != idCardExist){
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("身份证重复");
                return msg;
            }else{
                userInfo.setIdcard(idcard);
            }
            if (!IdCardUtil.strongVerifyIdNumber(idcard)) {
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("身份证非法");
                return msg;
            }
        }
        Integer professionalLevel = jsonObject.getInteger("professionalLevel");
        if (professionalLevel == null) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("职称参数为空");
            return msg;
        }
        Long specialityId = jsonObject.getLong("specialityId");
        if (specialityId == null) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("专业参数为空");
            return msg;
        }
        SpecialityInfo specialityInfo = specialityService.getById(specialityId);
        if (specialityInfo == null) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("专业不存在");
            return msg;
        }
        userInfo.setCompany(jsonObject.getString("company"));
        userInfo.setEmail(jsonObject.getString("email"));
        userInfo.setSpecialityId(specialityId);
        userInfo.setProfessionalLevel(professionalLevel);
        userInfo.setJob(jsonObject.getString("job"));
        userInfo.setStatus((byte)1);
        userInfo.setType(3);
        userInfo.setCreatedby(getUser().getRealname());
        userInfo.setRealname(realname);
        userInfo.setCreateddate(new Date());
        userInfo.setLastmodifiedby(getUser().getRealname());
        userInfo.setLastmodifieddate(new Date());
        userInfo.setIsdel((byte)0);
        userInfo.setIsupload((byte)0);
        List<UserInfo> userInfoExist = userService.selectUserInfo(null,userInfo.getUsername());
        if (userInfoExist.size() > 0){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("用户名重复");
            return msg;
        }
        int userSize = userService.selectUserSize();
        int sli = (userSize + 1) % sliceSize;
        userInfo.setSlice(sli + "");
        if (sli == 0)
            userInfo.setSlice(sliceSize + "");
        userService.save(userInfo);
        return msg;
    }
    /**
     * 企业用户-新增
     * @param jsonObject
     * @return
     */
    @PostMapping("/add/company/user")
    @ApiOperation(value = "添加企业用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "username",value = "手机号",required = true),
            @ApiImplicitParam(name = "password",value = "密码",required = true),
            @ApiImplicitParam(name = "email",value = "邮箱"),
            @ApiImplicitParam(name = "companyid",value = "单位"),
            @ApiImplicitParam(name = "job",value = "职务"),
            @ApiImplicitParam(name = "realname",value = "姓名"),
            @ApiImplicitParam(name = "idcard",value = "身份证"),
    })
    public Msg addCompanyUserInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        UserInfo userInfo = new UserInfo();
        String password = jsonObject.getString("password");
        String PW_PATTERN = "(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@#$%^&*_.]).{8,}";
        if (!password.matches(PW_PATTERN)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("密码必须8位以上,并且包含大小写字母、数字、特殊符号三种以上");
            return msg;
        }else {
            userInfo.setPassword(MD5Utils.encode(password));
        }
        String username = jsonObject.getString("username");
        if (StringUtils.isNotBlank(username) && username.length() == 11){
            userInfo.setUsername(username);
        }else{
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("手机号必须为11位数");
            return msg;
        }
        String realname = jsonObject.getString("realname");
        if (StringUtils.isBlank(realname)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("姓名不能为空");
            return msg;
        }
        String idcard = jsonObject.getString("idcard");
        if (StringUtils.isNotBlank(idcard)){
            UserInfo idCardExist = userService.selectByIdCard(null,idcard);
            if (null != idCardExist){
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("身份证重复");
                return msg;
            }else{
                userInfo.setIdcard(idcard);
            }
            if (!IdCardUtil.strongVerifyIdNumber(idcard)) {
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("身份证非法");
                return msg;
            }
        }
        Long companyid = jsonObject.getLong("companyid");
        if (companyid == null) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("单位参数为空");
            return msg;
        }
        CompanyInfo companyInfo = companyService.getById(companyid);
        if (companyInfo == null) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("单位不存在");
            return msg;
        }
        userInfo.setEmail(jsonObject.getString("email"));
        userInfo.setCompany(companyInfo.getCompany());
        userInfo.setCompanyid(companyid);
        userInfo.setJob(jsonObject.getString("job"));
        userInfo.setStatus((byte)1);
        userInfo.setType(3);
        userInfo.setCreatedby(getUser().getRealname());
        userInfo.setRealname(realname);
        userInfo.setCreateddate(new Date());
        userInfo.setLastmodifiedby(getUser().getRealname());
        userInfo.setLastmodifieddate(new Date());
        userInfo.setIsdel((byte)0);
        userInfo.setIsupload((byte)0);
        List<UserInfo> userInfoExist = userService.selectUserInfo(null,userInfo.getUsername());
        if (userInfoExist.size() > 0){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("用户名重复");
            return msg;
        }
        int userSize = userService.selectUserSize();
        int sli = (userSize + 1) % sliceSize;
        userInfo.setSlice(sli + "");
        if (sli == 0)
            userInfo.setSlice(sliceSize + "");
        userService.save(userInfo);
        UserInfo user = userService.selectByUser(userInfo.getUsername());
        //默认配置企业用户角色
        UserRolesInfo userRolesInfo = new UserRolesInfo();
        userRolesInfo.setRoleid(35l);
        userRolesInfo.setUserid(user.getId());
        userRolesService.save(userRolesInfo);
        return msg;
    }
    /**
     * 企业用户-修改
     * @param jsonObject
     * @return
     */
    @PostMapping("/put/company/user")
    @ApiOperation(value = "修改企业用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "用户id",required = true),
            @ApiImplicitParam(name = "username",value = "手机号",required = true),
            @ApiImplicitParam(name = "password",value = "密码",required = true),
            @ApiImplicitParam(name = "email",value = "邮箱"),
            @ApiImplicitParam(name = "companyid",value = "单位"),
            @ApiImplicitParam(name = "job",value = "职务"),
            @ApiImplicitParam(name = "realname",value = "姓名"),
            @ApiImplicitParam(name = "idcard",value = "身份证"),
    })
    public Msg putCompanyUserInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        UserInfo userInfo = new UserInfo();
        Long id = jsonObject.getLong("id");
        if (id == null) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("主键参数为空");
            return msg;
        }else {
            userInfo.setId(id);
        }
        String password = jsonObject.getString("password");
        String PW_PATTERN = "(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@#$%^&*_.]).{8,}";
        if (StringUtils.isNotBlank(password)){
            if (!password.matches(PW_PATTERN)){
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("密码必须8位以上,并且包含大小写字母、数字、特殊符号三种以上");
                return msg;
            }else {
                userInfo.setPassword(MD5Utils.encode(password));
            }
        }
        String username = jsonObject.getString("username");
        if (StringUtils.isNotBlank(username) && username.length() == 11){
            userInfo.setUsername(username);
        }else{
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("手机号必须为11位数");
            return msg;
        }
        String realname = jsonObject.getString("realname");
        if (StringUtils.isBlank(realname)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("姓名不能为空");
            return msg;
        }
        String idcard = jsonObject.getString("idcard");
        if (StringUtils.isNotBlank(idcard)){
            UserInfo idCardExist = userService.selectByIdCard(userInfo.getId(),idcard);
            if (null != idCardExist){
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("身份证重复");
                return msg;
            }else{
                userInfo.setIdcard(idcard);
            }
            if (!IdCardUtil.strongVerifyIdNumber(idcard)) {
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("身份证非法");
                return msg;
            }
        }
        Long companyid = jsonObject.getLong("companyid");
        if (companyid == null) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("单位参数为空");
            return msg;
        }
        CompanyInfo companyInfo = companyService.getById(companyid);
        if (companyInfo == null) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("单位不存在");
            return msg;
        }
        userInfo.setEmail(jsonObject.getString("email"));
        userInfo.setCompany(companyInfo.getCompany());
        userInfo.setCompanyid(companyInfo.getId());
        userInfo.setJob(jsonObject.getString("job"));
        userInfo.setLastmodifiedby(getUser().getRealname());
        userInfo.setLastmodifieddate(new Date());
        userInfo.setIsdel((byte)0);
        userInfo.setRealname(realname);
        List<UserInfo> userInfoExist = userService.selectUserInfo(userInfo.getId(),userInfo.getUsername());
        if (userInfoExist.size() > 0){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("用户名重复");
            return msg;
        }
        userService.updateById(userInfo);
        return msg;
    }
    /**
     * 监管用户-新增
     * @param jsonObject
     * @return
     */
    @PostMapping("/add/supervise/user")
    @ApiOperation(value = "添加企业用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "username",value = "手机号",required = true),
            @ApiImplicitParam(name = "password",value = "密码",required = true),
            @ApiImplicitParam(name = "email",value = "邮箱"),
            @ApiImplicitParam(name = "job",value = "职务"),
            @ApiImplicitParam(name = "realname",value = "姓名"),
            @ApiImplicitParam(name = "idcard",value = "身份证"),
            @ApiImplicitParam(name = "executiveLevel",value = "行政级别 "),
            @ApiImplicitParam(name = "province",value = "省(自治区)"),
            @ApiImplicitParam(name = "city",value = "地(市、州)"),
            @ApiImplicitParam(name = "county",value = "区/县"),
    })
    public Msg addSuperviseUserInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        UserInfo userInfo = new UserInfo();
        UserInfo userInfoCurrent = userService.selectByUser(getUser().getUsername());
        Integer executiveLevel = jsonObject.getInteger("executiveLevel");
        if (executiveLevel == null){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("行政级别不能为空");
            return msg;
        }
        String province = jsonObject.getString("province");
        if (StringUtils.isBlank(province)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("省(自治区)不能为空");
            return msg;
        }
        String city = jsonObject.getString("city");
        if (executiveLevel == 2 && StringUtils.isBlank(city)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("地(市、州)不能为空");
            return msg;
        }else {
            userInfo.setCity(city);
        }
        String county = jsonObject.getString("county");
        if (executiveLevel == 3 && (StringUtils.isBlank(city) || StringUtils.isBlank(county))){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("区/县不能为空");
            return msg;
        }else {
            userInfo.setCounty(county);
        }
        //非超管 或者 管理员
        if(!userInfoCurrent.getType().equals(1) && !userInfoCurrent.getType().equals(2)){
            //判断当前用户是否有权限新增其管辖下监管机构用户
            Integer currentUserExLevl = userInfoCurrent.getExecutiveLevel();
            if(currentUserExLevl < executiveLevel){
                if(currentUserExLevl == 1){
                    if(!userInfoCurrent.getProvince().equals(province)){
                        msg.setCode(ErrorCode.ERROR_10004.getCode());
                        msg.setMessage("无权新增非自己管辖地区");
                        return msg;
                    }
                }
                if(currentUserExLevl == 2){
                    if(!userInfoCurrent.getProvince().equals(province) || !userInfoCurrent.getCity().equals(city)){
                        msg.setCode(ErrorCode.ERROR_10004.getCode());
                        msg.setMessage("无权新增非自己管辖地区");
                        return msg;
                    }
                }
                if(currentUserExLevl == 3){
                    msg.setCode(ErrorCode.ERROR_10004.getCode());
                    msg.setMessage("当前用户是区县级,无法再新增下一级监管部门");
                    return msg;
                }
            }else {
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("当前用户是无权限新增同级、上一级监管部门");
                return msg;
            }
        }
        String password = jsonObject.getString("password");
        String PW_PATTERN = "(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@#$%^&*_.]).{8,}";
        if (!password.matches(PW_PATTERN)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("密码必须8位以上,并且包含大小写字母、数字、特殊符号三种以上");
            return msg;
        }else {
            userInfo.setPassword(MD5Utils.encode(password));
        }
        String username = jsonObject.getString("username");
        if (StringUtils.isNotBlank(username) && username.length() == 11){
            userInfo.setUsername(username);
        }else{
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("手机号必须为11位数");
            return msg;
        }
        String realname = jsonObject.getString("realname");
        if (StringUtils.isBlank(realname)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("姓名不能为空");
            return msg;
        }
        String idcard = jsonObject.getString("idcard");
        if (StringUtils.isNotBlank(idcard)){
            UserInfo idCardExist = userService.selectByIdCard(null,idcard);
            if (null != idCardExist){
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("身份证重复");
                return msg;
            }else{
                userInfo.setIdcard(idcard);
            }
            if (!IdCardUtil.strongVerifyIdNumber(idcard)) {
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("身份证非法");
                return msg;
            }
        }
        String companyName = province + (StringUtils.isBlank(city) ? "" : city) + (StringUtils.isBlank(county) ? "" : county) + "应急管理局";
        userInfo.setEmail(jsonObject.getString("email"));
        userInfo.setProvince(province);
        userInfo.setExecutiveLevel(executiveLevel);
        userInfo.setCompany(companyName);
        userInfo.setJob(jsonObject.getString("job"));
        userInfo.setStatus((byte)1);
        userInfo.setType(3);
        userInfo.setCreatedby(getUser().getRealname());
        userInfo.setRealname(realname);
        userInfo.setCreateddate(new Date());
        userInfo.setLastmodifiedby(getUser().getRealname());
        userInfo.setLastmodifieddate(new Date());
        userInfo.setIsdel((byte)0);
        userInfo.setIsupload((byte)0);
        List<UserInfo> userInfoExist = userService.selectUserInfo(null,userInfo.getUsername());
        if (userInfoExist.size() > 0){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("用户名重复");
            return msg;
        }
        int userSize = userService.selectUserSize();
        int sli = (userSize + 1) % sliceSize;
        userInfo.setSlice(sli + "");
        if (sli == 0)
            userInfo.setSlice(sliceSize + "");
        userService.save(userInfo);
        UserInfo user = userService.selectByUser(userInfo.getUsername());
        //默认配置企业用户角色
        UserRolesInfo userRolesInfo = new UserRolesInfo();
        userRolesInfo.setRoleid(38l);
        userRolesInfo.setUserid(user.getId());
        userRolesService.save(userRolesInfo);
        return msg;
    }
    /**
     * 监管用户-修改
     * @param jsonObject
     * @return
     */
    @PostMapping("/put/supervise/user")
    @ApiOperation(value = "修改企业用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "用户id",required = true),
            @ApiImplicitParam(name = "username",value = "手机号",required = true),
            @ApiImplicitParam(name = "password",value = "密码",required = true),
            @ApiImplicitParam(name = "email",value = "邮箱"),
            @ApiImplicitParam(name = "job",value = "职务"),
            @ApiImplicitParam(name = "realname",value = "姓名"),
            @ApiImplicitParam(name = "idcard",value = "身份证"),
            @ApiImplicitParam(name = "executiveLevel",value = "行政级别"),
            @ApiImplicitParam(name = "province",value = "省(自治区)"),
            @ApiImplicitParam(name = "city",value = "地(市、州)"),
            @ApiImplicitParam(name = "county",value = "区/县"),
    })
    public Msg putSuperviseUserInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        UserInfo userInfo = new UserInfo();
        UserInfo userInfoCurrent = userService.selectByUser(getUser().getUsername());
        Integer executiveLevel = jsonObject.getInteger("executiveLevel");
        if (executiveLevel == null){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("行政级别不能为空");
            return msg;
        }
        String province = jsonObject.getString("province");
        if (StringUtils.isBlank(province)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("省(自治区)不能为空");
            return msg;
        }
        String city = jsonObject.getString("city");
        if (executiveLevel == 2 && StringUtils.isBlank(city)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("地(市、州)不能为空");
            return msg;
        }
        String county = jsonObject.getString("county");
        if (executiveLevel == 3 && (StringUtils.isBlank(city) || StringUtils.isBlank(county))){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("区/县不能为空");
            return msg;
        }else {
            userInfo.setCounty(county);
        }
        Long id = jsonObject.getLong("id");
        if(id == null){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("用户主键id不能为空");
            return msg;
        }
        userInfo.setId(id);
        //非超管、 管理员 、自己可以修改
        if((!userInfoCurrent.getType().equals(1)) && (!userInfoCurrent.getType().equals(2)) && (!id .equals(userInfoCurrent.getId()))){
            //判断当前用户是否有权限新增其管辖下监管机构用户
            Integer currentUserExLevl = userInfoCurrent.getExecutiveLevel();
            if(currentUserExLevl < executiveLevel){
                if(currentUserExLevl == 1){
                    if(!userInfoCurrent.getProvince().equals(province)){
                        msg.setCode(ErrorCode.ERROR_10004.getCode());
                        msg.setMessage("无权新增非自己管辖地区");
                        return msg;
                    }
                }
                if(currentUserExLevl == 2){
                    if(!userInfoCurrent.getProvince().equals(province) || !userInfoCurrent.getCity().equals(city)){
                        msg.setCode(ErrorCode.ERROR_10004.getCode());
                        msg.setMessage("无权新增非自己管辖地区");
                        return msg;
                    }
                }
                if(currentUserExLevl == 3){
                    msg.setCode(ErrorCode.ERROR_10004.getCode());
                    msg.setMessage("当前用户是区县级,无权修改监管部门");
                    return msg;
                }
            }else {
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("当前用户是无权限修改同级、上一级监管部门");
                return msg;
            }
        }
        String password = jsonObject.getString("password");
        String PW_PATTERN = "(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[~!@#$%^&*_.]).{8,}";
        if (StringUtils.isNotBlank(password)){
            if (!password.matches(PW_PATTERN)){
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("密码必须8位以上,并且包含大小写字母、数字、特殊符号三种以上");
                return msg;
            }else {
                userInfo.setPassword(MD5Utils.encode(password));
            }
        }
        String username = jsonObject.getString("username");
        if (StringUtils.isNotBlank(username) && username.length() == 11){
            userInfo.setUsername(username);
        }else{
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("手机号必须为11位数");
            return msg;
        }
        String realname = jsonObject.getString("realname");
        if (StringUtils.isBlank(realname)){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("姓名不能为空");
            return msg;
        }
        String idcard = jsonObject.getString("idcard");
        if (StringUtils.isNotBlank(idcard)){
            UserInfo idCardExist = userService.selectByIdCard(userInfo.getId(),idcard);
            if (null != idCardExist){
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("身份证重复");
                return msg;
            }else{
                userInfo.setIdcard(idcard);
            }
            if (!IdCardUtil.strongVerifyIdNumber(idcard)) {
                msg.setCode(ErrorCode.ERROR_10004.getCode());
                msg.setMessage("身份证非法");
                return msg;
            }
        }
        //自己无法修改行政级别
        if (userInfoCurrent.getId().equals(id) && !userInfoCurrent.getExecutiveLevel().equals(executiveLevel)) {
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("自己无法修改行政级别");
            return msg;
        }else{
            userInfo.setExecutiveLevel(executiveLevel);
        }
        String companyName = province + (StringUtils.isBlank(city) ? "" : city) + (StringUtils.isBlank(county) ? "" : county) + "应急管理局";
        userInfo.setEmail(jsonObject.getString("email"));
        userInfo.setProvince(province);
        userInfo.setCity(StringUtils.isBlank(city) ? "" :city);
        userInfo.setCounty(StringUtils.isBlank(county) ? "" :county);
        userInfo.setCompany(companyName);
        userInfo.setJob(jsonObject.getString("job"));
        userInfo.setLastmodifiedby(getUser().getRealname());
        userInfo.setLastmodifieddate(new Date());
        userInfo.setIsdel((byte)0);
        userInfo.setRealname(realname);
        List<UserInfo> userInfoExist = userService.selectUserInfo(userInfo.getId(),userInfo.getUsername());
        if (userInfoExist.size() > 0){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("用户名重复");
            return msg;
        }
        userService.updateById(userInfo);
        return msg;
    }
    @PostMapping("/importUser")
    @ApiOperation(value = "导入用户数据",response = Msg.class)
@@ -851,7 +1794,106 @@
        return msg;
    }
    /**
     * 企业-新增
     * @param jsonObject
     * @return
     */
    @PostMapping("/addCompany")
    @ApiOperation(value = "添加企业信息",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "code",value = "单位代码"),
            @ApiImplicitParam(name = "company",value = "单位名称"),
            @ApiImplicitParam(name = "contactname",value = "联系人"),
            @ApiImplicitParam(name = "contactphone",value = "联系电话"),
            @ApiImplicitParam(name = "province",value = "省份"),
            @ApiImplicitParam(name = "city",value = "城市"),
            @ApiImplicitParam(name = "area",value = "区县"),
            @ApiImplicitParam(name = "town",value = "街道"),
            @ApiImplicitParam(name = "community",value = "社区"),
    })
    public Msg addCompanyInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        CompanyInfo companyInfo = new CompanyInfo();
        companyInfo.setCode(jsonObject.getString("code"));
        companyInfo.setCompany(jsonObject.getString("company"));
        companyInfo.setContactname(jsonObject.getString("contactname"));
        companyInfo.setContactphone(jsonObject.getString("contactphone"));
        companyInfo.setProvince(jsonObject.getString("province"));
        companyInfo.setCity(jsonObject.getString("city"));
        companyInfo.setArea(jsonObject.getString("area"));
        companyInfo.setTown(jsonObject.getString("town"));
        companyInfo.setCommunity(jsonObject.getString("community"));
        companyInfo.setCreatedby(getUser().getRealname());
        companyInfo.setCreateddate(new Date());
        companyInfo.setLastmodifiedby(getUser().getRealname());
        companyInfo.setLastmodifieddate(new Date());
        companyInfo.setIsdel((byte)0);
        CompanyInfo companyInfoExist = companyService.selectExistByName(null,companyInfo.getCompany());
        if (null != companyInfoExist){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("单位名称重复");
            return msg;
        }else {
            companyService.save(companyInfo);
        }
        return msg;
    }
    /**
     * 企业-修改
     * @param jsonObject
     * @return
     */
    @PostMapping("/putCompany")
    @ApiOperation(value = "修改企业信息",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id",value = "单位主键"),
            @ApiImplicitParam(name = "code",value = "单位代码"),
            @ApiImplicitParam(name = "company",value = "单位名称"),
            @ApiImplicitParam(name = "contactname",value = "联系人"),
            @ApiImplicitParam(name = "contactphone",value = "联系电话"),
            @ApiImplicitParam(name = "province",value = "省份"),
            @ApiImplicitParam(name = "city",value = "城市"),
            @ApiImplicitParam(name = "area",value = "区县"),
            @ApiImplicitParam(name = "town",value = "街道"),
            @ApiImplicitParam(name = "community",value = "社区"),
    })
    public Msg putCompanyInfo(@RequestBody JSONObject jsonObject){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        CompanyInfo companyInfo = new CompanyInfo();
        companyInfo.setId(jsonObject.getLong("id"));
        companyInfo.setCode(jsonObject.getString("code"));
        companyInfo.setCompany(jsonObject.getString("company"));
        companyInfo.setContactname(jsonObject.getString("contactname"));
        companyInfo.setContactphone(jsonObject.getString("contactphone"));
        companyInfo.setProvince(jsonObject.getString("province"));
        companyInfo.setCity(jsonObject.getString("city"));
        companyInfo.setArea(jsonObject.getString("area"));
        companyInfo.setTown(jsonObject.getString("town"));
        companyInfo.setCommunity(jsonObject.getString("community"));
        companyInfo.setLastmodifiedby(getUser().getRealname());
        companyInfo.setLastmodifieddate(new Date());
        companyInfo.setIsdel((byte)0);
        CompanyInfo companyInfoExist = companyService.selectExistByName(companyInfo.getId(),companyInfo.getCompany());
        if (null != companyInfoExist){
            msg.setCode(ErrorCode.ERROR_10004.getCode());
            msg.setMessage("单位名称重复");
            return msg;
        }else {
            companyService.updateById(companyInfo);
        }
        return msg;
    }
    /*@PostMapping("/addCompany")
    @ApiOperation(value = "添加单位信息",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "code",value = "单位代码"),
@@ -971,6 +2013,7 @@
        }
        return msg;
    }
     */
    @PostMapping("/delCompany")
    @ApiOperation(value = "删除单位信息", notes = "删除单位信息", response = Msg.class)
@@ -1597,4 +2640,26 @@
        String password = accountBody.getString("department");
        return success(userService.getAccount(username, password));
    }
    /**
     * 获取专家用户列表
     */
    @GetMapping("/expert/list")
    @ApiOperation(value = "获取监管用户数据",response = Msg.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "realname",value = "姓名"),
    })
    public Msg getExpertUserList(String realname){
        Msg msg = new Msg();
        msg.setCode("200");
        msg.setMessage("success");
        HashMap<String, Object> condition = new HashMap<String, Object>();
        if (StringUtils.isNotBlank(realname)){
            condition.put("realname",realname.trim());
        }
        condition.put("roleId",36l);
        msg.setResult(userService.selectExpertList(realname));
        return msg;
    }
}
src/main/java/com/gk/hotwork/Domain/Exception/Handler/CustomExceptionHandler.java
@@ -1,9 +1,11 @@
package com.gk.hotwork.Domain.Exception.Handler;
import com.gk.hotwork.Domain.Exception.BusinessException;
import com.gk.hotwork.Domain.Exception.E;
import com.gk.hotwork.Domain.Utils.Msg;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
@@ -21,4 +23,15 @@
        msg.setMessage(ex.getMessage());
        return msg;
    }
    /**
     * 处理入参异常
     * @param e
     * @return
     */
    @ResponseBody
    @ExceptionHandler(MethodArgumentNotValidException.class)
    public Msg handleMethodArgumentNotValidException(MethodArgumentNotValidException e){
        logger.warn(e.getBindingResult().getFieldError().getDefaultMessage());
        return new Msg(E.DATA_PARAM_NULL.getCode(),e.getBindingResult().getFieldError().getDefaultMessage());
    }
}
src/main/java/com/gk/hotwork/Domain/SpecialityInfo.java
对比新文件
@@ -0,0 +1,42 @@
package com.gk.hotwork.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 io.swagger.annotations.ApiModel;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
@ApiModel
@TableName("speciality")
public class SpecialityInfo implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 专业名称
     */
    private String name;
    /**
     * 描述
     **/
    private String remark;
    /**
     * 是否删除 1删除 0未删
     **/
    private Byte isDel;
    private Date createTime;
    private String createBy;
    private Date updateTime;
    private String updateBy;
}
src/main/java/com/gk/hotwork/Domain/UserInfo.java
@@ -178,6 +178,73 @@
    private String slice;
    private String province;
    private String city;
    private String county;
    /**
     * 行政级别 1-省(自治区) 2-地(市、州) 3-区/县
     */
    private Integer executiveLevel;
    /**
     * 专业方向id
     */
    private Long specialityId;
    /**
     * 专业等级(1初级,2中级,3高级,4其他)
     */
    private Integer professionalLevel;
    public Long getSpecialityId() {
        return specialityId;
    }
    public void setSpecialityId(Long specialityId) {
        this.specialityId = specialityId;
    }
    public Integer getProfessionalLevel() {
        return professionalLevel;
    }
    public void setProfessionalLevel(Integer professionalLevel) {
        this.professionalLevel = professionalLevel;
    }
    public Integer getExecutiveLevel() {
        return executiveLevel;
    }
    public void setExecutiveLevel(Integer executiveLevel) {
        this.executiveLevel = executiveLevel;
    }
    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 getCounty() {
        return county;
    }
    public void setCounty(String county) {
        this.county = county;
    }
    public Long getRoleid() {
        return roleid;
    }
src/main/java/com/gk/hotwork/Domain/Vo/UserVo.java
@@ -1,9 +1,6 @@
package com.gk.hotwork.Domain.Vo;
import com.gk.hotwork.Domain.AuthorizationInfo;
import com.gk.hotwork.Domain.CompanyInfo;
import com.gk.hotwork.Domain.ExamScoreInfo;
import com.gk.hotwork.Domain.UserInfo;
import com.gk.hotwork.Domain.*;
import java.util.Date;
import java.util.List;
@@ -44,6 +41,16 @@
    private CompanyInfo companyInfo;
    private SpecialityInfo specialityInfo;
    public SpecialityInfo getSpecialityInfo() {
        return specialityInfo;
    }
    public void setSpecialityInfo(SpecialityInfo specialityInfo) {
        this.specialityInfo = specialityInfo;
    }
    public String getToken() {
        return token;
    }
src/main/java/com/gk/hotwork/Domain/dto/req/IdParam.java
对比新文件
@@ -0,0 +1,22 @@
package com.gk.hotwork.Domain.dto.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
 * @email 1603559716@qq.com
 * @author: zf
 * @date: 2023/7/17
 * @time: 14:24
 */
@Data
@ApiModel("主键")
public class IdParam {
    @NotNull(message = "主键不可为空")
    @ApiModelProperty(value = "主键")
    private Long id;
}
src/main/java/com/gk/hotwork/Domain/dto/req/SpecialityAddReqDTO.java
对比新文件
@@ -0,0 +1,25 @@
package com.gk.hotwork.Domain.dto.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
/**
 * @email 1603559716@qq.com
 * @author: zf
 * @date: 2023/7/17
 * @time: 13:54
 */
@Data
@ApiModel(value = "专业")
public class SpecialityAddReqDTO {
    @NotEmpty(message = "专业名称不能为空")
    @ApiModelProperty(value = "专业名称",required = true)
    private String name;
    @ApiModelProperty(value = "备注")
    private String remark;
}
src/main/java/com/gk/hotwork/Domain/dto/req/SpecialityModReqDTO.java
对比新文件
@@ -0,0 +1,30 @@
package com.gk.hotwork.Domain.dto.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
 * @email 1603559716@qq.com
 * @author: zf
 * @date: 2023/7/17
 * @time: 13:54
 */
@Data
@ApiModel(value = "专业")
public class SpecialityModReqDTO {
    @NotNull(message = "专业主键不能为空")
    @ApiModelProperty(value = "专业主键" ,required = true)
    private Long id;
    @NotEmpty(message = "专业名称不能为空")
    @ApiModelProperty(value = "专业名称" ,required = true)
    private String name;
    @ApiModelProperty(value = "备注")
    private String remark;
}
src/main/java/com/gk/hotwork/Mapper/SpecialityMapper.java
对比新文件
@@ -0,0 +1,15 @@
package com.gk.hotwork.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gk.hotwork.Domain.SpecialityInfo;
import org.springframework.stereotype.Repository;
/**
 * @email 1603559716@qq.com
 * @author: zf
 * @date: 2023/7/17
 * @time: 13:43
 */
@Repository
public interface SpecialityMapper extends BaseMapper<SpecialityInfo> {
}
src/main/java/com/gk/hotwork/Mapper/UserInfoMapper.java
@@ -21,6 +21,8 @@
    UserInfo selectByPrimaryKey(Long id);
    List<UserVo> selectUserDataGrid(Page<UserVo> page, Map<String, Object> record);
    List<UserVo> selectCompanyUserDataList(Page<UserVo> page, Map<String, Object> record);
    List<UserVo> selectSuperviseUserDataList(Page<UserVo> page, Map<String, Object> record);
    List<UserInfo> selectUserInfo(@Param("id") Long id, @Param("username") String username);
@@ -58,4 +60,9 @@
     查询by Id
     */
    UserInfo getByUserId(Long userId);
    List<UserVo> selectExpertUserDataList(Page<UserVo> page, Map<String, Object> record);
    List<UserInfo> selectExpertList(String realname);
}
src/main/java/com/gk/hotwork/Mapper/mybatis/UserInfoMapper.xml
@@ -69,6 +69,10 @@
      <result column="company_id" property="id"  />
      <result column="company" property="company"  />
    </association>
    <association property="specialityInfo" javaType="com.gk.hotwork.Domain.SpecialityInfo">
      <result column="speciality_id" property="id"  />
      <result column="speciality_name" property="name"  />
    </association>
  </resultMap>
  <sql id="Base_Column_List" >
    <!--          -->
@@ -144,6 +148,199 @@
    </where>
  </select>
  <select id="selectCompanyUserDataList" resultMap="UserVo">
    SELECT
    user.id,
    user.username,
    user.email,
    c.company,
    c.id company_id,
    user.department,
    user.job,
    user.createdby,
    user.createddate,
    user.lastmodifiedby,
    user.lastmodifieddate,
    user.status,
    user.expiredate,
    user.isdel,
    user.type,
    user.realname,
    user.idcard,
    user.iscompany,
    user.isdepartment,
    user.isupload,
    user.empno,
    user.deviceno,
    user.cardid,
    user.crossx,
    user.crossy,
    user.updateat,
    user.issecurityofficer,
    user.province,
    user.city,
    user.county,
    user.executive_level
    FROM
    `user` as user
    left join company as c on c.id = user.companyid
    left join userroles as r on r.userid = `user`.id
    <where>
        `user`.status = 1
        and  user.type != 1
      <if test="record.username != null and record.username !=''">
        and user.username like concat ('%',#{record.username,jdbcType=VARCHAR},'%')
      </if>
      <if test="record.realname != null and record.realname !=''">
        and user.realname like concat ('%',#{record.realname,jdbcType=VARCHAR},'%')
      </if>
      <if test="record.company != null and record.company !=''">
        and c.company like concat ('%',#{record.company,jdbcType=VARCHAR},'%')
      </if>
      <if test="record.job != null and record.job !=''">
        and user.job like concat ('%',#{record.job,jdbcType=VARCHAR},'%')
      </if>
      <if test="record.roleId != null">
        and r.roleid = #{record.roleId}
      </if>
    </where>
  </select>
  <select id="selectSuperviseUserDataList" resultMap="UserVo">
    SELECT
    user.id,
    user.username,
    user.email,
    user.company,
    c.id company_id,
    user.department,
    user.job,
    user.createdby,
    user.createddate,
    user.lastmodifiedby,
    user.lastmodifieddate,
    user.status,
    user.expiredate,
    user.isdel,
    user.type,
    user.realname,
    user.idcard,
    user.iscompany,
    user.isdepartment,
    user.isupload,
    user.empno,
    user.deviceno,
    user.cardid,
    user.crossx,
    user.crossy,
    user.updateat,
    user.issecurityofficer,
    user.province,
    user.city,
    user.county,
    user.executive_level
    FROM
    `user` as user
    left join company as c on c.id = user.companyid
    left join userroles as r on r.userid = `user`.id
    <where>
      `user`.status = 1
      and  user.type != 1
      <if test="record.username != null and record.username !=''">
        and user.username like concat ('%',#{record.username,jdbcType=VARCHAR},'%')
      </if>
      <if test="record.realname != null and record.realname !=''">
        and user.realname like concat ('%',#{record.realname,jdbcType=VARCHAR},'%')
      </if>
      <if test="record.company != null and record.company !=''">
        and user.company like concat ('%',#{record.company,jdbcType=VARCHAR},'%')
      </if>
      <if test="record.job != null and record.job !=''">
        and user.job like concat ('%',#{record.job,jdbcType=VARCHAR},'%')
      </if>
      <if test="record.roleId != null">
        and r.roleid = #{record.roleId}
      </if>
      <if test="record.province != null and record.province !=''">
        and user.province = #{record.province}
      </if>
      <if test="record.city != null and record.city !=''">
        and user.city = #{record.city}
      </if>
      <if test="record.county != null and record.county !=''">
        and user.county = #{record.county}
      </if>
    </where>
  </select>
  <select id="selectExpertUserDataList" resultMap="UserVo">
    SELECT
    user.id,
    user.username,
    user.email,
    user.company,
    c.id company_id,
    user.department,
    user.job,
    user.createdby,
    user.createddate,
    user.lastmodifiedby,
    user.lastmodifieddate,
    user.status,
    user.expiredate,
    user.isdel,
    user.type,
    user.realname,
    user.idcard,
    user.iscompany,
    user.isdepartment,
    user.isupload,
    user.empno,
    user.deviceno,
    user.cardid,
    user.crossx,
    user.crossy,
    user.updateat,
    user.issecurityofficer,
    user.province,
    user.city,
    user.county,
    user.executive_level,
    user.professional_level,
    user.speciality_id,
    s.name as speciality_name
    FROM
    `user` as user
    left join company as c on c.id = user.companyid
    left join userroles as r on r.userid = `user`.id
    left join speciality as s on s.id = `user`.speciality_id
    <where>
      `user`.status = 1
      and  user.type != 1
      <if test="record.username != null and record.username !=''">
        and user.username like concat ('%',#{record.username,jdbcType=VARCHAR},'%')
      </if>
      <if test="record.realname != null and record.realname !=''">
        and user.realname like concat ('%',#{record.realname,jdbcType=VARCHAR},'%')
      </if>
      <if test="record.company != null and record.company !=''">
        and user.company like concat ('%',#{record.company,jdbcType=VARCHAR},'%')
      </if>
      <if test="record.job != null and record.job !=''">
        and user.job like concat ('%',#{record.job,jdbcType=VARCHAR},'%')
      </if>
      <if test="record.roleId != null">
        and r.roleid = #{record.roleId}
      </if>
      <if test="record.province != null and record.province !=''">
        and user.province = #{record.province}
      </if>
      <if test="record.city != null and record.city !=''">
        and user.city = #{record.city}
      </if>
      <if test="record.county != null and record.county !=''">
        and user.county = #{record.county}
      </if>
    </where>
  </select>
  <select id="selectUserInfo" resultType="com.gk.hotwork.Domain.UserInfo">
    select user.*,d.department departmentname
    from user as user
@@ -348,4 +545,18 @@
    select * from user where id = #{userId}
  </select>
  <select id="selectExpertList" resultType="com.gk.hotwork.Domain.UserInfo">
    select u.id,u.realname
    from user u
    left join userroles r on r.userid = u.id
    where
        u.status = 1
      and u.type != 1
    and r.roleid = 36
    <if test="realname != null and realname != ''">
      u.realname  like concat("%",#{realname},"%")
    </if>
  </select>
</mapper>
src/main/java/com/gk/hotwork/Service/ServiceImpl/SpecialityServiceImpl.java
对比新文件
@@ -0,0 +1,49 @@
package com.gk.hotwork.Service.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gk.hotwork.Domain.SpecialityInfo;
import com.gk.hotwork.Domain.Utils.PageInfo;
import com.gk.hotwork.Domain.Utils.StringUtils;
import com.gk.hotwork.Mapper.SpecialityMapper;
import com.gk.hotwork.Service.SpecialityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * @email 1603559716@qq.com
 * @author: zf
 * @date: 2023/7/17
 * @time: 13:42
 */
@Service
public class SpecialityServiceImpl extends ServiceImpl<SpecialityMapper, SpecialityInfo> implements SpecialityService {
    @Autowired
    private SpecialityMapper mapper;
    @Override
    public void listSpecialityByPage(PageInfo pageInfo) {
        Page<SpecialityInfo> page = new Page<>(pageInfo.getPageIndex(), pageInfo.getPageSize());
        mapper.selectPage(page, new LambdaQueryWrapper<SpecialityInfo>()
                .eq(SpecialityInfo::getIsDel, (byte) 0)
                .like(pageInfo.getCondition().containsKey("name"), SpecialityInfo::getName, pageInfo.getCondition().get("name"))
                .orderByDesc(SpecialityInfo::getCreateTime)
        );
        pageInfo.setTotalCount(page.getTotal());
        pageInfo.setResult(page.getRecords());
    }
    @Override
    public List<SpecialityInfo> listSpeciality(String name) {
        List<SpecialityInfo> list = mapper.selectList(new LambdaQueryWrapper<SpecialityInfo>()
                .eq(SpecialityInfo::getIsDel, (byte) 0)
                .like(StringUtils.isNotBlank(name), SpecialityInfo::getName, name));
        return list;
    }
}
src/main/java/com/gk/hotwork/Service/ServiceImpl/UserServiceImpl.java
@@ -75,6 +75,86 @@
    }
    @Override
    public void selectCompanyUserDataGrid(PageInfo pageInfo) {
        Page<UserVo> page = new Page<>(pageInfo.getPageIndex(), pageInfo.getPageSize());
        List<OrderItem> orderItems = new ArrayList<>();
        OrderItem orderItem = new OrderItem();
        if (StringUtils.isNotBlank(pageInfo.getSort()) && StringUtils.isNotBlank(pageInfo.getOrder())) {
            orderItem.setAsc(pageInfo.getOrder().equalsIgnoreCase("ascending"));
            orderItem.setColumn(pageInfo.getSort());
        }else {
            orderItem.setAsc(false);
            orderItem.setColumn("createddate");
        }
        orderItems.add(orderItem);
        page.setOrders(orderItems);
        List<UserVo> list = userInfoMapper.selectCompanyUserDataList(page,pageInfo.getCondition());
        for (UserVo userVo : list) {
            List<RoleInfo> roleInfoList = roleService.selectRoleByUser(userVo.getId());
            userVo.setRoles(roleInfoList);
            UserFace userFace = userFaceService.selectByUserId(userVo.getId());
            if (userFace != null)
                userVo.setCode(userFace.getCode());
        }
        pageInfo.setResult(list);
        pageInfo.setTotalCount(page.getTotal());
    }
    @Override
    public void selectSuperviseUserDataGrid(PageInfo pageInfo) {
        Page<UserVo> page = new Page<>(pageInfo.getPageIndex(), pageInfo.getPageSize());
        List<OrderItem> orderItems = new ArrayList<>();
        OrderItem orderItem = new OrderItem();
        if (StringUtils.isNotBlank(pageInfo.getSort()) && StringUtils.isNotBlank(pageInfo.getOrder())) {
            orderItem.setAsc(pageInfo.getOrder().equalsIgnoreCase("ascending"));
            orderItem.setColumn(pageInfo.getSort());
        }else {
            orderItem.setAsc(false);
            orderItem.setColumn("createddate");
        }
        orderItems.add(orderItem);
        page.setOrders(orderItems);
        List<UserVo> list = userInfoMapper.selectSuperviseUserDataList(page,pageInfo.getCondition());
        for (UserVo userVo : list) {
            List<RoleInfo> roleInfoList = roleService.selectRoleByUser(userVo.getId());
            userVo.setRoles(roleInfoList);
            UserFace userFace = userFaceService.selectByUserId(userVo.getId());
            if (userFace != null)
                userVo.setCode(userFace.getCode());
        }
        pageInfo.setResult(list);
        pageInfo.setTotalCount(page.getTotal());
    }
    @Override
    public void selectExpertUserDataGrid(PageInfo pageInfo) {
        Page<UserVo> page = new Page<>(pageInfo.getPageIndex(), pageInfo.getPageSize());
        List<OrderItem> orderItems = new ArrayList<>();
        OrderItem orderItem = new OrderItem();
        if (StringUtils.isNotBlank(pageInfo.getSort()) && StringUtils.isNotBlank(pageInfo.getOrder())) {
            orderItem.setAsc(pageInfo.getOrder().equalsIgnoreCase("ascending"));
            orderItem.setColumn(pageInfo.getSort());
        }else {
            orderItem.setAsc(false);
            orderItem.setColumn("createddate");
        }
        orderItems.add(orderItem);
        page.setOrders(orderItems);
        List<UserVo> list = userInfoMapper.selectExpertUserDataList(page,pageInfo.getCondition());
        for (UserVo userVo : list) {
            List<RoleInfo> roleInfoList = roleService.selectRoleByUser(userVo.getId());
            userVo.setRoles(roleInfoList);
        }
        pageInfo.setResult(list);
        pageInfo.setTotalCount(page.getTotal());
    }
    @Override
    public List<UserInfo> selectExpertList(String realname) {
        List<UserInfo> userInfos = userInfoMapper.selectExpertList(realname);
        return userInfos;
    }
    @Override
    public UserInfo selectByUser(String username) {
        UserInfo userInfo = new UserInfo();
        userInfo.setUsername(username);
@@ -438,4 +518,8 @@
    public UserInfo getByUserId(Long userId) {
        return userInfoMapper.getByUserId(userId);
    }
}
src/main/java/com/gk/hotwork/Service/SpecialityService.java
对比新文件
@@ -0,0 +1,21 @@
package com.gk.hotwork.Service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gk.hotwork.Domain.SpecialityInfo;
import com.gk.hotwork.Domain.Utils.PageInfo;
import com.gk.hotwork.Domain.dto.req.SpecialityAddReqDTO;
import java.util.List;
/**
 * @email 1603559716@qq.com
 * @author: zf
 * @date: 2023/7/17
 * @time: 13:39
 */
public interface SpecialityService extends IService<SpecialityInfo> {
    void listSpecialityByPage(PageInfo pageInfo);
    List<SpecialityInfo> listSpeciality(String name);
}
src/main/java/com/gk/hotwork/Service/UserService.java
@@ -21,6 +21,9 @@
    void selectUserDataGrid(PageInfo pageInfo);
    void selectCompanyUserDataGrid(PageInfo pageInfo);
    void selectSuperviseUserDataGrid(PageInfo pageInfo);
    UserInfo selectByUser(String username);
    List<UserInfo> selectUserInfo(Long id, String username);
@@ -108,4 +111,8 @@
     */
    UserInfo getByUserId(Long userId);
    void selectExpertUserDataGrid(PageInfo pageInfo);
    List<UserInfo> selectExpertList(String realname);
}
src/main/resources/application-dev.yml
@@ -10,9 +10,9 @@
spring:
  datasource:
    one:
      url: jdbc:mysql://139.196.181.203:3306/hazad_investigation?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
      url: jdbc:mysql://192.168.0.52:3306/hazad_investigation?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
      username: root
      password: GKHY@root20201!
      password: gkhymysql
      type: com.alibaba.druid.pool.DruidDataSource
  #redis
@@ -116,7 +116,7 @@
      url:
rocketmq:
  name-server: 192.168.30.107:9876
  name-server: 192.168.0.52:9876
  #name-server: localhost:9876
  producer:
    group: gkhy-safeplatform-dev-ZIS