已重命名1个文件
已修改49个文件
已添加4个文件
| | |
| | | @GetMapping("/getAccessoryFileByProjectId") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "projectId", dataType = "long", required = true, value = "项目id"), |
| | | @ApiImplicitParam(paramType = "query", name = "processId", dataType = "long", required = true, value = "过程id"), |
| | | @ApiImplicitParam(paramType = "query", name = "moduleType", dataType = "int", required = true, value = "上传模块code") |
| | | }) |
| | | public CommonResult getAccessoryFileByProjectId(Long projectId,Integer moduleType){ |
| | | return CommonResult.success(assAccessoryFileService.getAccessoryFileByProjectId(projectId,moduleType)); |
| | | public CommonResult getAccessoryFileByProjectId(Long projectId,Integer moduleType,@RequestParam(required = false) Long processId){ |
| | | return CommonResult.success(assAccessoryFileService.getAccessoryFileByProjectId(projectId,processId,moduleType)); |
| | | } |
| | | |
| | | |
| | |
| | | return CommonResult.success(investigationService.getInvestigationByProjectId(projectId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据id获取现场勘验记录表详情") |
| | | @GetMapping("/detail/{investigationId}") |
| | | public CommonResult investigationDetail(@PathVariable(value = "investigationId") Long investigationId){ |
| | | return CommonResult.success(investigationService.getInvestigationById(investigationId)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @ApiOperation(value = "创建现场勘验记录表") |
| | | @PostMapping("/add") |
| | | public CommonResult addInvestigation(@Validated @RequestBody AssInvestigation investigation){ |
| | | //app端只能保存数据,不能改变项目流程状态 |
| | | investigation.setState(ApproveStatusEnum.TEMPORARY.getCode()); |
| | | return CommonResult.success(investigationService.addInvestigation(investigation, RequestSourceEnum.APP.getCode())); |
| | | return CommonResult.success(investigationService.addInvestigation(investigation)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | |
| | | @GetMapping("/getAccessoryFileByProjectId") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "projectId", dataType = "long", required = true, value = "项目id"), |
| | | @ApiImplicitParam(paramType = "query", name = "processId", dataType = "long", required = true, value = "过程id"), |
| | | @ApiImplicitParam(paramType = "query", name = "moduleType", dataType = "int", required = true, value = "上传模块code") |
| | | }) |
| | | public CommonResult getAccessoryFileByProjectId(Long projectId,Integer moduleType){ |
| | | return CommonResult.success(assAccessoryFileService.getAccessoryFileByProjectId(projectId,moduleType)); |
| | | public CommonResult getAccessoryFileByProjectId(Long projectId,Integer moduleType,@RequestParam(required = false) Long processId){ |
| | | return CommonResult.success(assAccessoryFileService.getAccessoryFileByProjectId(projectId,processId,moduleType)); |
| | | } |
| | | |
| | | |
| | |
| | | import com.gkhy.assess.system.domain.AssInvestigation; |
| | | import com.gkhy.assess.system.service.AssInvestigationService; |
| | | 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.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @ApiOperation(value = "根据id获取现场勘验记录表详情") |
| | | @GetMapping("/detail/{investigationId}") |
| | | public CommonResult investigationDetail(@PathVariable(value = "investigationId") Long investigationId){ |
| | | return CommonResult.success(investigationService.getInvestigationByProjectId(investigationId)); |
| | | return CommonResult.success(investigationService.getInvestigationById(investigationId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据项目id获取现场勘验记录表详情") |
| | |
| | | @ApiOperation(value = "创建现场勘验记录表") |
| | | @PostMapping("/add") |
| | | public CommonResult addInvestigation(@Validated @RequestBody AssInvestigation investigation){ |
| | | return CommonResult.success(investigationService.addInvestigation(investigation, RequestSourceEnum.WEB.getCode())); |
| | | return CommonResult.success(investigationService.addInvestigation(investigation)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @ApiOperation(value = "现场勘验项目状态流转") |
| | | @PostMapping("/doProcess") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "body", name = "projectId", dataType = "long", required = true, value = "项目id"), |
| | | }) |
| | | public CommonResult doProcess(@RequestBody Map map){ |
| | | investigationService.doInvestigationProcess(map); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | |
| | | return CommonResult.success(investigationService.editInvestigation(investigation)); |
| | | } |
| | | |
| | | // @RepeatSubmit |
| | | // @ApiOperation(value = "现场勘验记录项目状态流转") |
| | | // @PostMapping("/doProcess") |
| | | // public CommonResult doProcess(@RequestBody Long projectId){ |
| | | // investigationService.doInvestigationProcess(projectId); |
| | | // return CommonResult.success(); |
| | | // } |
| | | |
| | | |
| | | } |
| | |
| | | return CommonResult.success(agencyService.agencyList(agency)); |
| | | } |
| | | |
| | | @RequiresPermissions("system:assess:monitor") |
| | | @RequiresPermissions(value={"system:assess:monitor","system:assess:agency"},logical = Logical.OR) |
| | | @ApiOperation(value = "根据id获取机构详情") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "agencyId", dataType = "int", required = true, value = "机构id") |
| | |
| | | level: |
| | | root: INFO |
| | | org: |
| | | com.nms.swspkmas_standalone: DEBUG |
| | | com.gkhy.assess: DEBUG |
| | | |
| | | |
| | | swagger: |
| | |
| | | druid: |
| | | # 主库数据源 |
| | | master: |
| | | url: jdbc:mysql://172.17.254.237:7006/smart_assess?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&serverTimezone=Asia/Shanghai&useSSL=false |
| | | url: jdbc:mysql://127.0.0.1:7006/smart_assess?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&serverTimezone=Asia/Shanghai&useSSL=false |
| | | username: root |
| | | password: 2farwL3yPXfbH2AP |
| | | # 从库数据源 |
| | |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: gkhy@202306 |
| | | password: akj78avauba789a |
| | | |
| | | |
| | | # mybatis-plus相关配置 |
| | |
| | | level: |
| | | root: INFO |
| | | org: |
| | | com.nms.swspkmas_standalone: INFO |
| | | com.gkhy.assess: INFO |
| | | |
| | | |
| | | swagger: |
对比新文件 |
| | |
| | | ALTER TABLE `smart_assess`.`ass_accessory_file` |
| | | ADD COLUMN `process_id` bigint NULL COMMENT '项目过程id'; |
对比新文件 |
| | |
| | | ALTER TABLE `smart_assess`.`sys_agency` |
| | | ADD COLUMN `cert_path` varchar(60) NULL COMMENT '资质证书图片路径'; |
对比新文件 |
| | |
| | | ALTER TABLE `smart_assess`.`sys_user` |
| | | MODIFY COLUMN `certificate_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '证书编号'; |
| | | ALTER TABLE `smart_assess`.`sys_user` |
| | | MODIFY COLUMN `level` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '评价师等级'; |
| | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @Test |
| | | public void testLog(){ |
| | | try { |
| | | int i = 1 / 0; |
| | | }catch (Exception e){ |
| | | log.error("error=",e); |
| | | } |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.assess.common.domain; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.apache.shiro.authc.UsernamePasswordToken; |
| | | |
| | | public class CustomerUsernamePasswordToken extends UsernamePasswordToken { |
| | | @ApiModelProperty("用户身份(0代表监管用户,1代表机构用户,2代表专家用户)") |
| | | private Integer identity; |
| | | |
| | | public CustomerUsernamePasswordToken() { |
| | | } |
| | | |
| | | public CustomerUsernamePasswordToken(String username, String password, Integer identity) { |
| | | super(username, password); |
| | | this.identity = identity; |
| | | } |
| | | |
| | | public Integer getIdentity() { |
| | | return identity; |
| | | } |
| | | |
| | | public void setIdentity(Integer identity) { |
| | | this.identity = identity; |
| | | } |
| | | } |
文件名从 assess-framework/src/main/java/com/gkhy/assess/framework/shiro/JwtToken.java 修改 |
| | |
| | | package com.gkhy.assess.framework.shiro; |
| | | package com.gkhy.assess.common.domain; |
| | | |
| | | import org.apache.shiro.authc.UsernamePasswordToken; |
| | | |
| | | public class JwtToken extends UsernamePasswordToken { |
| | | public class JwtToken extends CustomerUsernamePasswordToken { |
| | | |
| | | private String jwtToken; |
| | | |
| | |
| | | @ApiModelProperty("用户身份(0代表监管用户,1代表机构用户,2代表专家用户)") |
| | | private Integer identity; |
| | | |
| | | @ApiModelProperty("用户人脸数据(app使用)") |
| | | private Object userFace; |
| | | @ApiModelProperty("用户人脸图片地址(app使用),前端访问图片链接格式:http://ip:port/api/文件保存相对路径") |
| | | private String idPhoto; |
| | | } |
| | |
| | | private String code; |
| | | @ApiModelProperty(value = "验证码唯一标识",required = false) |
| | | private String uuid; |
| | | @ApiModelProperty("用户身份(0代表监管用户,1代表机构用户,2代表专家用户)") |
| | | private Integer identity; |
| | | } |
| | |
| | | */ |
| | | public enum AttachTypeEnum |
| | | { |
| | | SOCIAL(1, "社保"), MEDICAL(2, "医保"),SALARY(3, "工资单"); |
| | | SOCIAL(1, "社保"), MEDICAL(2, "医保"),SALARY(3, "工资单"),AGENCY_CERT(4, "机构资质证书"); |
| | | |
| | | private final Integer code; |
| | | private final String info; |
| | |
| | | import com.auth0.jwt.JWTVerifier; |
| | | import com.auth0.jwt.algorithms.Algorithm; |
| | | import com.auth0.jwt.exceptions.JWTDecodeException; |
| | | import com.auth0.jwt.interfaces.Claim; |
| | | import com.auth0.jwt.interfaces.DecodedJWT; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.gkhy.assess.common.api.CommonResult; |
| | | import com.gkhy.assess.common.exception.ApiException; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.crypto.hash.Md5Hash; |
| | | import org.slf4j.Logger; |
| | |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * JwtToken生成的工具类 |
| | |
| | | * @param secret 用户密码 |
| | | * @return |
| | | */ |
| | | public static boolean verify(String token,String username,String secret){ |
| | | public static boolean verify(String token,String username,String secret,Integer identity){ |
| | | try { |
| | | Algorithm algorithm = Algorithm.HMAC256(secret); |
| | | JWTVerifier verifier = JWT.require(algorithm).withClaim("username", username).build(); |
| | | JWTVerifier verifier = JWT.require(algorithm).withClaim("username", username) |
| | | .withClaim("identity",identity).build(); |
| | | DecodedJWT jwt = verifier.verify(token); |
| | | return true; |
| | | }catch (Exception e){ |
| | |
| | | } |
| | | |
| | | |
| | | public static boolean isNeedUpdate(String token,String username,String secret){ |
| | | public static boolean isNeedUpdate(String token, String username, String secret,Integer identity){ |
| | | Date expertsAt =null; |
| | | try { |
| | | Algorithm algorithm = Algorithm.HMAC256(secret); |
| | | JWTVerifier verifier = JWT.require(algorithm).withClaim("username", username).build(); |
| | | JWTVerifier verifier = JWT.require(algorithm).withClaim("username", username) |
| | | .withClaim("identity",identity).build(); |
| | | expertsAt = verifier.verify(token).getExpiresAt(); |
| | | }catch (Exception e){ |
| | | throw new ApiException("token非法无效"); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取token中的信息 无需secret解密也能获得 |
| | | * @param token |
| | | * @return |
| | | */ |
| | | public static Integer getIdentity(String token){ |
| | | try { |
| | | DecodedJWT jwt = JWT.decode(token); |
| | | return jwt.getClaim("identity").asInt(); |
| | | }catch (JWTDecodeException e){ |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 生成签名 |
| | | * @param username |
| | | * @param secret |
| | | * @return |
| | | */ |
| | | public static String sign(String username,String secret){ |
| | | public static String sign(String username,String secret,Integer identity){ |
| | | Date date=new Date(System.currentTimeMillis()+EXPIRATION*1000); |
| | | Algorithm algorithm=Algorithm.HMAC256(secret); |
| | | return JWT.create().withClaim("username",username).withExpiresAt(date).sign(algorithm); |
| | | return JWT.create().withClaim("username",username) |
| | | .withClaim("identity",identity).withExpiresAt(date).sign(algorithm); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Value("${spring.profiles.active}") |
| | | public String activeName; |
| | | |
| | | |
| | | private static final Long RELEASE_SUCCESS = 1L; |
| | | private static final String LOCK_SUCCESS = "OK"; |
| | | private static final String SET_IF_NOT_EXIST = "NX"; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | builder.serializerByType(LocalDateTime.class, new LocalDateTimeSerializer(formatter)); |
| | | //接收时间数据反序列化 |
| | | builder.deserializerByType(LocalDateTime.class, new LocalDateTimeDeserializer(formatter)); |
| | | builder.timeZone(TimeZone.getDefault()); |
| | | builder.timeZone(TimeZone.getTimeZone("UTC+8")); |
| | | }; |
| | | } |
| | | |
| | |
| | | import com.gkhy.assess.common.exception.ApiException; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.authz.UnauthorizedException; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | /** |
| | | * 拦截未知的运行时异常 |
| | | */ |
| | | @ExceptionHandler(UnauthorizedException.class) |
| | | public CommonResult handleUnauthorizedException(RuntimeException ex, HttpServletRequest request) |
| | | { |
| | | writeExceptionLogFile(ex); |
| | | return CommonResult.failed("权限不足,无权操作!"); |
| | | } |
| | | |
| | | /** |
| | | * 拦截未知的运行时异常 |
| | | */ |
| | | @ExceptionHandler(RuntimeException.class) |
| | | public CommonResult handleRuntimeException(RuntimeException ex, HttpServletRequest request) |
| | | { |
| | |
| | | if (request!=null) { |
| | | url=request.getRequestURI(); |
| | | } |
| | | log.error("error={}",ex); |
| | | log.error("error:",ex); |
| | | log.error(ex.getMessage()+",url={}",url); |
| | | } |
| | | } |
| | |
| | | String submitKey = StringUtils.trimToEmpty(request.getHeader(JwtTokenUtil.USER_LOGIN_TOKEN)); |
| | | |
| | | // 唯一标识(指定key + url + 消息头) |
| | | String cacheRepeatKey = CacheConstant.REPEAT_SUBMIT_KEY + url + submitKey; |
| | | String cacheRepeatKey = redisUtils.generateKey(CacheConstant.REPEAT_SUBMIT_KEY + url + submitKey); |
| | | |
| | | Object sessionObj = redisUtils.get(cacheRepeatKey); |
| | | if (sessionObj != null) |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.gkhy.assess.common.api.CommonResult; |
| | | import com.gkhy.assess.common.api.ResultCode; |
| | | import com.gkhy.assess.common.exception.ApiException; |
| | | import com.gkhy.assess.common.utils.JwtTokenUtil; |
| | | import com.gkhy.assess.framework.shiro.JwtToken; |
| | | import com.gkhy.assess.common.domain.JwtToken; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.subject.Subject; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.util.Date; |
| | | |
| | | @Slf4j |
| | | public class JwtFilter extends BasicHttpAuthenticationFilter { |
| | |
| | | package com.gkhy.assess.framework.shiro.realm; |
| | | |
| | | import com.gkhy.assess.common.domain.CustomerUsernamePasswordToken; |
| | | import com.gkhy.assess.common.enums.UserIdentityEnum; |
| | | import com.gkhy.assess.common.exception.ApiException; |
| | | import com.gkhy.assess.common.utils.RequestUtil; |
| | | import com.gkhy.assess.common.utils.SpringContextUtils; |
| | | import com.gkhy.assess.framework.shiro.JwtToken; |
| | | import com.gkhy.assess.common.domain.JwtToken; |
| | | import com.gkhy.assess.framework.shiro.service.SysLoginService; |
| | | import com.gkhy.assess.system.domain.SysUser; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | if(authenticationToken instanceof JwtToken){ |
| | | String token= (String) authenticationToken.getCredentials(); |
| | | if(token==null){ |
| | | |
| | | log.info("————————身份认证失败——————————IP地址: "+ RequestUtil.getRequestIp(req) +",URL:"+req.getRequestURI()); |
| | | throw new AuthenticationException("token为空!"); |
| | | } |
| | |
| | | return new SimpleAuthenticationInfo(sysUser,token,this.getName()); |
| | | } |
| | | }else{ |
| | | UsernamePasswordToken upToken = (UsernamePasswordToken) authenticationToken; |
| | | CustomerUsernamePasswordToken upToken = (CustomerUsernamePasswordToken) authenticationToken; |
| | | String username = upToken.getUsername(); |
| | | String password=new String(upToken.getPassword()); |
| | | sysUser=sysLoginService.login(username,password); |
| | | sysUser=sysLoginService.login(username,password,upToken.getIdentity()); |
| | | if(sysUser!=null){ |
| | | return new SimpleAuthenticationInfo(sysUser,password,this.getName()); |
| | | } |
| | |
| | | import com.gkhy.assess.common.enums.ApproveStatusEnum; |
| | | import com.gkhy.assess.common.enums.UserIdentityEnum; |
| | | import com.gkhy.assess.common.enums.UserStatusEnum; |
| | | import com.gkhy.assess.common.exception.ApiException; |
| | | import com.gkhy.assess.common.utils.JwtTokenUtil; |
| | | import com.gkhy.assess.common.utils.RedisUtils; |
| | | import com.gkhy.assess.system.domain.SysUser; |
| | |
| | | @Autowired |
| | | private HttpServletRequest request; |
| | | |
| | | public SysUser login(String username, String password) { |
| | | SysUser sysUser=sysUserService.getUserByUsernamePhone(username); |
| | | public SysUser login(String username, String password,Integer identity) { |
| | | SysUser sysUser=sysUserService.getUserByUsernamePhone(username,identity); |
| | | validUser(sysUser); |
| | | passwordService.validate(sysUser,password); |
| | | recordLoginInfo(sysUser.getId()); |
| | |
| | | public SysUser validJwtToken(String jwtToken){ |
| | | |
| | | String username= JwtTokenUtil.getUsername(jwtToken); |
| | | if(StringUtils.isEmpty(username)){ |
| | | Integer identity=JwtTokenUtil.getIdentity(jwtToken); |
| | | if(StringUtils.isEmpty(username)||identity==null){ |
| | | throw new AuthenticationException("token非法无效!"); |
| | | } |
| | | SysUser sysUser=sysUserService.getUserByUsernamePhone(username); |
| | | SysUser sysUser=sysUserService.getUserByUsernamePhone(username,identity); |
| | | validUser(sysUser); |
| | | if(!JwtTokenUtil.verify(jwtToken,username,sysUser.getPassword())){ |
| | | if(!JwtTokenUtil.verify(jwtToken,username,sysUser.getPassword(),identity)){ |
| | | throw new AuthenticationException("token非法无效!"); |
| | | } |
| | | if(!jwtTokenRefresh(jwtToken,username,sysUser.getPassword())){ |
| | | if(!jwtTokenRefresh(jwtToken,username,sysUser.getPassword(),identity)){ |
| | | throw new AuthenticationException("Token已失效,请重新登录!"); |
| | | } |
| | | // setRolePermission(sysUser); |
| | |
| | | * @param passWord |
| | | * @return |
| | | */ |
| | | public boolean jwtTokenRefresh(String jwtToken,String username,String passWord){ |
| | | public boolean jwtTokenRefresh(String jwtToken, String username, String passWord, Integer identity){ |
| | | String tokenKey=redisUtils.generateKey(CacheConstant.SYS_USER_TOKEN+":"+JwtTokenUtil.md5Encode(jwtToken)); |
| | | String userKey=redisUtils.generateKey(CacheConstant.SYS_USER_TOKEN+":"+username); |
| | | String userKey=redisUtils.generateKey(CacheConstant.SYS_USER_TOKEN+":"+username+"_"+identity); |
| | | String cacheToken= (String) redisUtils.get(tokenKey); |
| | | if(StringUtils.isNotEmpty(cacheToken)){ |
| | | // 校验token有效性 |
| | | if(!JwtTokenUtil.isNeedUpdate(cacheToken,username,passWord)){ |
| | | String newToken=JwtTokenUtil.sign(username,passWord); |
| | | if(!JwtTokenUtil.isNeedUpdate(cacheToken,username,passWord,identity)){ |
| | | String newToken=JwtTokenUtil.sign(username,passWord,identity); |
| | | // 设置超时时间 |
| | | redisUtils.set(tokenKey,newToken); |
| | | redisUtils.expire(tokenKey,JwtTokenUtil.EXPIRATION*2/1000); |
| | |
| | | @ApiModelProperty("删除标志(0正常,1删除,默认0)") |
| | | @TableField("del_flag") |
| | | private Integer delFlag; |
| | | |
| | | @ApiModelProperty(value = "项目过程id",required = false) |
| | | @TableField("process_id") |
| | | private Long processId; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Size; |
| | | |
| | | import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; |
| | | |
| | |
| | | @TableField(exist = false) |
| | | private List<AssAccessoryFile> assAccessoryFiles; |
| | | |
| | | |
| | | @NotNull(message = "企业陪同合照不能为空") |
| | | @ApiModelProperty("企业陪同合照列表") |
| | | @TableField(exist = false) |
| | | private List<AssAccessoryFile> ccompanyImages; |
| | | @Size(min = 1,message = "企业陪同合照不能为空") |
| | | private List<AssAccessoryFile> companyImages; |
| | | |
| | | @NotNull(message = "主要装置前的合影照片不能为空") |
| | | @ApiModelProperty("主要装置前的合影照片列表") |
| | | @TableField(exist = false) |
| | | @Size(min = 1,message = "主要装置前的合影照片不能为空") |
| | | private List<AssAccessoryFile> deviceImages; |
| | | |
| | | @NotNull(message = "现场勘验照片不能为空") |
| | | @ApiModelProperty("现场勘验照片") |
| | | @TableField(exist = false) |
| | | @Size(min = 1,message = "现场勘验照片不能为空") |
| | | private List<AssAccessoryFile> investingationImages; |
| | | |
| | | |
| | | @ApiModelProperty("现场勘验视频") |
| | | @TableField(exist = false) |
| | | private List<AssAccessoryFile> investingationVideos; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("归档确认总人数和已确认人数") |
| | | @TableField(exist = false) |
| | | private PersonRecognitionVO personRecognition; |
| | | |
| | | @ApiModelProperty("机构名称") |
| | | @TableField(exist = false) |
| | | private String agencyName; |
| | | } |
| | |
| | | import com.gkhy.assess.common.domain.BaseEntity; |
| | | import com.gkhy.assess.common.enums.SensitiveTypeEnum; |
| | | import com.gkhy.assess.common.validate.AgencyGroup; |
| | | import com.gkhy.assess.common.validate.ExpertGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | |
| | | @TableField("cert_number") |
| | | private String certNumber; |
| | | |
| | | @NotNull(message = "资质证书图片路径不能为空") |
| | | @ApiModelProperty("资质证书图片路径,创建机构时传入") |
| | | @TableField("cert_path") |
| | | private String certPath; |
| | | |
| | | |
| | | @NotNull(message = "发证日期不能为空") |
| | | @ApiModelProperty(value = "发证日期",required = true) |
| | |
| | | private String business; |
| | | |
| | | |
| | | @NotBlank(message = "机构信息上报表存放路径不能为空") |
| | | // @NotBlank(message = "机构信息上报表存放路径不能为空") |
| | | @ApiModelProperty(value = "机构信息上报表存放路径",required = true) |
| | | @TableField("report_path") |
| | | private String reportPath; |
| | |
| | | @TableField("version") |
| | | private Integer version; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("version") |
| | | private Integer version; |
| | | |
| | | @ApiModelProperty("证书编号") |
| | | @ApiModelProperty("证书编号,多个证书,逗号隔开") |
| | | @TableField("certificate_no") |
| | | private String certificateNo; |
| | | |
| | |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | @NotBlank(message = "人脸数据不能为空") |
| | | |
| | | @ApiModelProperty(value = "人脸数据",required = true) |
| | | @TableField("face_base") |
| | | private String faceBase; |
| | |
| | | * @param moduleType |
| | | * @return |
| | | */ |
| | | List<AssAccessoryFile> getAccessoryFileByProjectId(@Param("projectId") Long projectId, @Param("moduleType") Integer moduleType); |
| | | List<AssAccessoryFile> getAccessoryFileByProjectId(@Param("projectId") Long projectId,@Param("processId") Long processId, @Param("moduleType") Integer moduleType); |
| | | |
| | | /** |
| | | * 获取数量 |
| | |
| | | * @param moduleType |
| | | * @return |
| | | */ |
| | | Integer getAccessoryFileCountByProjectId(@Param("projectId") Long projectId, @Param("moduleType") Integer moduleType); |
| | | Integer getAccessoryFileCountByProjectId(@Param("projectId") Long projectId, @Param("processId") Long processId,@Param("moduleType") Integer moduleType); |
| | | |
| | | /** |
| | | * 根据id删除评估文件 |
| | |
| | | List<AssFaceRecognition> getFaceRecognitionByProjectId(Long projectId); |
| | | |
| | | /** |
| | | * |
| | | * @param projectId |
| | | * @return |
| | | */ |
| | | List<AssFaceRecognition> getSimpleFaceRecognitionByProjectId(Long projectId); |
| | | |
| | | /** |
| | | * 根据id获取签字确认 |
| | | * @param faceRecognitionId |
| | | * @return |
| | |
| | | import com.gkhy.assess.system.domain.AssInvestigation; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 现场勘验记录表 Mapper 接口 |
| | |
| | | * @param projectId |
| | | * @return |
| | | */ |
| | | AssInvestigation getInvestigationByProjectId(Long projectId); |
| | | List<AssInvestigation> getInvestigationByProjectId(Long projectId); |
| | | |
| | | /** |
| | | * 根据id获取现场勘验记录 |
| | |
| | | * @param username |
| | | * @return |
| | | */ |
| | | public SysUser getUserByUsernamePhone(String username); |
| | | public SysUser getUserByUsernamePhone(@Param("username") String username,@Param("identity") Integer identity); |
| | | |
| | | /** |
| | | * 获取监管用户列表 |
| | |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | SysUser checkPhoneUnique(String phone); |
| | | SysUser checkPhoneUnique(String phone,Integer identity); |
| | | |
| | | /** |
| | | * 校验邮箱是否唯一 |
| | |
| | | * @param moduleType |
| | | * @return |
| | | */ |
| | | List<AssAccessoryFile> getAccessoryFileByProjectId(Long projectId, Integer moduleType); |
| | | List<AssAccessoryFile> getAccessoryFileByProjectId(Long projectId,Long processId, Integer moduleType); |
| | | |
| | | |
| | | /** |
| | | * 根据id删除评估文件 |
| | |
| | | * @param moduleType |
| | | * @return |
| | | */ |
| | | Integer getAccessoryFileCountByProjectId(Long projectId, Integer moduleType); |
| | | Integer getAccessoryFileCountByProjectId(Long projectId,Long processId, Integer moduleType); |
| | | |
| | | /** |
| | | * 批量更新文件processId |
| | | * @param accessoryFileIds |
| | | * @param processId |
| | | * @return |
| | | */ |
| | | Boolean batchUpdateAccessoryFileProcessId(List<Long> accessoryFileIds,Long processId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.assess.system.domain.AssInvestigation; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 现场勘验记录表 服务类 |
| | |
| | | * @param investigation |
| | | * @return |
| | | */ |
| | | int addInvestigation(AssInvestigation investigation,String requestSourceType); |
| | | Long addInvestigation(AssInvestigation investigation); |
| | | |
| | | /** |
| | | * 修改勘验记录 |
| | |
| | | * @param projectId |
| | | * @return |
| | | */ |
| | | AssInvestigation getInvestigationByProjectId(Long projectId); |
| | | List<AssInvestigation> getInvestigationByProjectId(Long projectId); |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 项目状态流转 |
| | | * @param projectId |
| | | * @param map |
| | | */ |
| | | void doInvestigationProcess(Long projectId); |
| | | void doInvestigationProcess(Map map); |
| | | |
| | | } |
| | |
| | | |
| | | import com.gkhy.assess.system.domain.SysUserFace; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.assess.system.domain.vo.UploadObjectVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @param userFace |
| | | * @return |
| | | */ |
| | | int addUserFace(SysUserFace userFace); |
| | | UploadObjectVO addUserFace(SysUserFace userFace); |
| | | |
| | | /** |
| | | * 根据用户id获取人脸数据 |
| | |
| | | * @param username |
| | | * @return |
| | | */ |
| | | SysUser getUserByUsername(String username); |
| | | SysUser getUserByUsername(String username,Integer identity); |
| | | |
| | | /** |
| | | * 登录名或者手机号获取用户 |
| | | * @param username |
| | | * @return |
| | | */ |
| | | SysUser getUserByUsernamePhone(String username); |
| | | SysUser getUserByUsernamePhone(String username,Integer identity); |
| | | |
| | | /** |
| | | * 新增监管用户 |
| | |
| | | */ |
| | | SysUser getUserInfoById(Long userId); |
| | | |
| | | /** |
| | | * 清空缓存 |
| | | * @param username |
| | | * @param identity |
| | | */ |
| | | void delCacheByUsername(String username,Integer identity); |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<AssAccessoryFile> getAccessoryFileByProjectId(Long projectId, Integer moduleType) { |
| | | public List<AssAccessoryFile> getAccessoryFileByProjectId(Long projectId,Long processId, Integer moduleType) { |
| | | projectService.checkUserAllowed(projectId); |
| | | return baseMapper.getAccessoryFileByProjectId(projectId,moduleType); |
| | | return baseMapper.getAccessoryFileByProjectId(projectId,processId,moduleType); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Integer getAccessoryFileCountByProjectId(Long projectId,Long processId, Integer moduleType) { |
| | | projectService.checkUserAllowed(projectId); |
| | | return baseMapper.getAccessoryFileCountByProjectId(projectId,processId,moduleType); |
| | | } |
| | | |
| | | @Override |
| | | public Integer getAccessoryFileCountByProjectId(Long projectId, Integer moduleType) { |
| | | projectService.checkUserAllowed(projectId); |
| | | return baseMapper.getAccessoryFileCountByProjectId(projectId,moduleType); |
| | | public Boolean batchUpdateAccessoryFileProcessId(List<Long> accessoryFileIds, Long processId) { |
| | | return update(Wrappers.<AssAccessoryFile>lambdaUpdate() |
| | | .in(AssAccessoryFile::getId,accessoryFileIds) |
| | | .set(AssAccessoryFile::getProcessId,processId)); |
| | | } |
| | | |
| | | |
| | |
| | | public AssConclusion getConclusionByProjectId(Long projectId) { |
| | | projectService.checkUserAllowed(projectId); |
| | | AssConclusion conclusion= baseMapper.getConclusionByProjectId(projectId); |
| | | conclusion.setAccessoryFiles(accessoryFileService.getAccessoryFileByProjectId(projectId, AccessoryFileTypeEnum.CONCLUSION.getCode())); |
| | | conclusion.setAccessoryFiles(accessoryFileService.getAccessoryFileByProjectId(projectId,null, AccessoryFileTypeEnum.CONCLUSION.getCode())); |
| | | return conclusion; |
| | | } |
| | | |
| | |
| | | public Boolean checkAllFaceRecongnition(Long projectId){ |
| | | projectService.checkUserAllowed(projectId); |
| | | List<AssPlanPerson> planPersonList=planPersonMapper.getAllPlanPersonByProjectId(projectId); |
| | | List<AssFaceRecognition> faceRecognitionList=baseMapper.getFaceRecognitionByProjectId(projectId); |
| | | List<AssFaceRecognition> faceRecognitionList=baseMapper.getSimpleFaceRecognitionByProjectId(projectId); |
| | | Map<Long,AssFaceRecognition> map=faceRecognitionList.stream().collect(Collectors.toMap(AssFaceRecognition::getPersonId,a -> a,(k1,k2) -> k1)); |
| | | String message=""; |
| | | for(AssPlanPerson planPerson:planPersonList){ |
| | |
| | | |
| | | import com.gkhy.assess.common.enums.RequestSourceEnum; |
| | | import com.gkhy.assess.common.exception.ApiException; |
| | | import com.gkhy.assess.system.domain.AssAccessoryFile; |
| | | import com.gkhy.assess.system.domain.AssInvestigation; |
| | | import com.gkhy.assess.system.enums.AccessoryFileTypeEnum; |
| | | import com.gkhy.assess.system.enums.ReportProgressEnum; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = RuntimeException.class) |
| | | public int addInvestigation(AssInvestigation investigation,String requestSourceType) { |
| | | public Long addInvestigation(AssInvestigation investigation) { |
| | | Long projectId=investigation.getProjectId(); |
| | | projectService.checkUserAllowed(projectId); |
| | | checkInvestigationCount(projectId); |
| | | // checkInvestigationCount(projectId); |
| | | investigation.setCreateBy(ShiroUtils.getSysUser().getUsername()); |
| | | if(investigation.getIsSafetyCheck()!=null&&investigation.getIsSafetyCheck()==1){ |
| | | Integer fileCount=accessoryFileService.getAccessoryFileCountByProjectId(projectId, AccessoryFileTypeEnum.INVESTINGATION_ATTACHMENT.getCode()); |
| | | Integer fileCount=accessoryFileService.getAccessoryFileCountByProjectId(projectId,null, AccessoryFileTypeEnum.INVESTINGATION_ATTACHMENT.getCode()); |
| | | if(fileCount==0){ |
| | | throw new ApiException("未上传现场安全检查表"); |
| | | } |
| | | } |
| | | //校验图片数量 |
| | | Integer fileCount=accessoryFileService.getAccessoryFileCountByProjectId(projectId, AccessoryFileTypeEnum.DEVICE_IMAGE.getCode()); |
| | | if(fileCount==0){ |
| | | throw new ApiException("主要装置前的合影照片不能为空"); |
| | | List<AssAccessoryFile> accessFiles=new ArrayList<>(); |
| | | accessFiles.addAll(investigation.getCompanyImages()); |
| | | accessFiles.addAll(investigation.getDeviceImages()); |
| | | accessFiles.addAll(investigation.getInvestingationImages()); |
| | | if(investigation.getInvestingationVideos()!=null&& !investigation.getInvestingationVideos().isEmpty()){ |
| | | accessFiles.addAll(investigation.getInvestingationVideos()); |
| | | } |
| | | fileCount=accessoryFileService.getAccessoryFileCountByProjectId(projectId, AccessoryFileTypeEnum.INVESTINGATION_IMAGE.getCode()); |
| | | if(fileCount==0){ |
| | | throw new ApiException("现场勘验照片照片不能为空"); |
| | | if(investigation.getAssAccessoryFiles()!=null&&!investigation.getAssAccessoryFiles().isEmpty()){ |
| | | accessFiles.addAll(investigation.getAssAccessoryFiles()); |
| | | } |
| | | fileCount=accessoryFileService.getAccessoryFileCountByProjectId(projectId, AccessoryFileTypeEnum.COMPANY_IMAGE.getCode()); |
| | | if(fileCount==0){ |
| | | throw new ApiException("现场勘验人员与企业陪同人员图片不能为空"); |
| | | List<Long> fileIds=new ArrayList<>(); |
| | | for(AssAccessoryFile accessoryFile:accessFiles){ |
| | | if(accessoryFile.getId()==null){ |
| | | throw new ApiException("附件或图片id不能为空"); |
| | | } |
| | | // fileCount=accessoryFileService.getAccessoryFileCountByProjectId(projectId, AccessoryFileTypeEnum.INVESTINGATION_VIDEO.getCode()); |
| | | // if(fileCount==0){ |
| | | // throw new ApiException("现场勘验视频不能为空"); |
| | | // } |
| | | int row=baseMapper.insert(investigation); |
| | | if(requestSourceType== RequestSourceEnum.WEB.getCode()){ |
| | | //校验项目状态 |
| | | projectService.checkReportProgress(projectId, ReportProgressEnum.WORK_NOTIFICATION); |
| | | //更新项目状态 |
| | | projectService.changeReportProgress(projectId,ReportProgressEnum.INVESTINGATION); |
| | | fileIds.add(accessoryFile.getId()); |
| | | } |
| | | //校验项目状态 |
| | | // projectService.checkReportProgress(projectId, ReportProgressEnum.WORK_NOTIFICATION); |
| | | // int row=baseMapper.insert(investigation); |
| | | // if(row>0 && (investigation.getState()==null||!investigation.getState().equals(ApproveStatusEnum.TEMPORARY.getCode()))) { |
| | | // //更新项目状态 |
| | | // projectService.changeReportProgress(projectId,ReportProgressEnum.INVESTINGATION); |
| | | // } |
| | | return row; |
| | | baseMapper.insert(investigation); |
| | | //更新图片过程id |
| | | accessoryFileService.batchUpdateAccessoryFileProcessId(fileIds,investigation.getId()); |
| | | return investigation.getId(); |
| | | } |
| | | |
| | | public void checkInvestigationCount(Long projectId){ |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = RuntimeException.class) |
| | | public int editInvestigation(AssInvestigation investigation) { |
| | | if(investigation.getId()==null){ |
| | | throw new ApiException("现场勘验记录id不能为空!"); |
| | | } |
| | | projectService.checkUserAllowed(investigation.getProjectId()); |
| | | investigation.setUpdateBy(ShiroUtils.getSysUser().getUsername()); |
| | | List<AssAccessoryFile> accessFiles=new ArrayList<>(); |
| | | accessFiles.addAll(investigation.getCompanyImages()); |
| | | accessFiles.addAll(investigation.getDeviceImages()); |
| | | accessFiles.addAll(investigation.getInvestingationImages()); |
| | | if(investigation.getInvestingationVideos()!=null&& !investigation.getInvestingationVideos().isEmpty()){ |
| | | accessFiles.addAll(investigation.getInvestingationVideos()); |
| | | } |
| | | if(investigation.getAssAccessoryFiles()!=null&&!investigation.getAssAccessoryFiles().isEmpty()){ |
| | | accessFiles.addAll(investigation.getAssAccessoryFiles()); |
| | | } |
| | | List<Long> fileIds=new ArrayList<>(); |
| | | for(AssAccessoryFile accessoryFile:accessFiles){ |
| | | if(accessoryFile.getId()==null){ |
| | | throw new ApiException("附件或图片id不能为空"); |
| | | } |
| | | fileIds.add(accessoryFile.getId()); |
| | | } |
| | | accessoryFileService.batchUpdateAccessoryFileProcessId(fileIds,investigation.getId()); |
| | | int row=baseMapper.updateById(investigation); |
| | | return row; |
| | | } |
| | | |
| | | @Override |
| | | public AssInvestigation getInvestigationByProjectId(Long projectId) { |
| | | public List<AssInvestigation> getInvestigationByProjectId(Long projectId) { |
| | | projectService.checkUserAllowed(projectId); |
| | | AssInvestigation investigation= baseMapper.getInvestigationByProjectId(projectId); |
| | | if(investigation!=null) { |
| | | investigation.setAssAccessoryFiles(accessoryFileService.getAccessoryFileByProjectId(projectId, AccessoryFileTypeEnum.INVESTINGATION_ATTACHMENT.getCode())); |
| | | investigation.setCcompanyImages(accessoryFileService.getAccessoryFileByProjectId(projectId, AccessoryFileTypeEnum.COMPANY_IMAGE.getCode())); |
| | | investigation.setDeviceImages(accessoryFileService.getAccessoryFileByProjectId(projectId, AccessoryFileTypeEnum.DEVICE_IMAGE.getCode())); |
| | | investigation.setInvestingationImages(accessoryFileService.getAccessoryFileByProjectId(projectId, AccessoryFileTypeEnum.INVESTINGATION_IMAGE.getCode())); |
| | | investigation.setInvestingationVideos(accessoryFileService.getAccessoryFileByProjectId(projectId, AccessoryFileTypeEnum.INVESTINGATION_VIDEO.getCode())); |
| | | } |
| | | return investigation; |
| | | List<AssInvestigation> investigations= baseMapper.getInvestigationByProjectId(projectId); |
| | | return investigations; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public AssInvestigation getInvestigationById(Long investigationId) { |
| | | return baseMapper.getInvestigationById(investigationId); |
| | | AssInvestigation investigation= baseMapper.getInvestigationById(investigationId); |
| | | if(investigation!=null) { |
| | | investigation.setAssAccessoryFiles(accessoryFileService.getAccessoryFileByProjectId(investigation.getProjectId(),investigation.getId(), AccessoryFileTypeEnum.INVESTINGATION_ATTACHMENT.getCode())); |
| | | investigation.setCompanyImages(accessoryFileService.getAccessoryFileByProjectId(investigation.getProjectId(),investigation.getId(), AccessoryFileTypeEnum.COMPANY_IMAGE.getCode())); |
| | | investigation.setDeviceImages(accessoryFileService.getAccessoryFileByProjectId(investigation.getProjectId(),investigation.getId(), AccessoryFileTypeEnum.DEVICE_IMAGE.getCode())); |
| | | investigation.setInvestingationImages(accessoryFileService.getAccessoryFileByProjectId(investigation.getProjectId(),investigation.getId(), AccessoryFileTypeEnum.INVESTINGATION_IMAGE.getCode())); |
| | | investigation.setInvestingationVideos(accessoryFileService.getAccessoryFileByProjectId(investigation.getProjectId(),investigation.getId(), AccessoryFileTypeEnum.INVESTINGATION_VIDEO.getCode())); |
| | | } |
| | | return investigation; |
| | | } |
| | | |
| | | @Override |
| | | public void doInvestigationProcess(Long projectId) { |
| | | public void doInvestigationProcess(Map map) { |
| | | Long projectId= Long.parseLong(map.get("projectId").toString()); |
| | | projectService.checkUserAllowed(projectId); |
| | | |
| | | //校验项目状态 |
| | | projectService.checkReportProgress(projectId, ReportProgressEnum.WORK_NOTIFICATION); |
| | | //更新项目状态 |
| | |
| | | import com.gkhy.assess.common.exception.ApiException; |
| | | import com.gkhy.assess.common.utils.StringUtils; |
| | | import com.gkhy.assess.system.domain.AssPlanPerson; |
| | | import com.gkhy.assess.system.domain.SysUser; |
| | | import com.gkhy.assess.system.enums.PlayRoleEnum; |
| | | import com.gkhy.assess.system.mapper.AssPlanPersonMapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.assess.system.mapper.SysUserMapper; |
| | | import com.gkhy.assess.system.service.AssPlanPersonService; |
| | | import com.gkhy.assess.system.service.AssProjectService; |
| | | import com.gkhy.assess.system.utils.ShiroUtils; |
| | |
| | | public class AssPlanPersonServiceImpl extends ServiceImpl<AssPlanPersonMapper, AssPlanPerson> implements AssPlanPersonService { |
| | | @Autowired |
| | | private AssProjectService projectService; |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | @Override |
| | | public List<AssPlanPerson> getByProjectId(Long projectId) { |
| | | projectService.checkUserAllowed(projectId); |
| | |
| | | AssPlanPerson pPerson= getOne(lambdaQueryWrapper); |
| | | if(pPerson!=null){ |
| | | PlayRoleEnum playRoleEnum=PlayRoleEnum.getInfoByCode(pPerson.getPlayRole()); |
| | | SysUser sysUser=sysUserMapper.selectById(planPerson.getPersonId()); |
| | | if(sysUser==null){ |
| | | throw new ApiException("选择的用户不存在"); |
| | | } |
| | | String message=playRoleEnum!=null?playRoleEnum.getInfo():""; |
| | | if(StringUtils.isBlank(message)){ |
| | | message="该用户已存在"; |
| | | message=String.format("用户<%s>已担任职务",sysUser.getName()); |
| | | }else{ |
| | | message="该用户已担任"+message; |
| | | message=String.format("用户<%s>已担任%s",sysUser.getName(),message); |
| | | } |
| | | throw new ApiException(message); |
| | | } |
| | |
| | | public AssProcessAudit getProcessAuditByProjectId(Long projectId) { |
| | | projectService.checkUserAllowed(projectId); |
| | | AssProcessAudit processAudit= baseMapper.getProcessAuditByProjectId(projectId); |
| | | processAudit.setAccessoryFiles(accessoryFileService.getAccessoryFileByProjectId(projectId, AccessoryFileTypeEnum.PROCESS_ATTACHMENT.getCode())); |
| | | processAudit.setAccessoryFiles(accessoryFileService.getAccessoryFileByProjectId(projectId, null,AccessoryFileTypeEnum.PROCESS_ATTACHMENT.getCode())); |
| | | return processAudit; |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public String getConfigByKey(String configKey) { |
| | | String redisKey=getCacheKey(configKey); |
| | | String redisKey=redisUtils.generateKey(getCacheKey(configKey)); |
| | | String configValue= (String) redisUtils.get(redisKey); |
| | | if(StringUtils.isNotEmpty(configValue)){ |
| | | return configValue; |
| | |
| | | package com.gkhy.assess.system.service.impl; |
| | | |
| | | import com.gkhy.assess.common.exception.ApiException; |
| | | import com.gkhy.assess.common.utils.StringUtils; |
| | | import com.gkhy.assess.system.domain.SysUser; |
| | | import com.gkhy.assess.system.domain.SysUserFace; |
| | | import com.gkhy.assess.system.domain.vo.UploadObjectVO; |
| | |
| | | import com.gkhy.assess.system.service.SysCommonService; |
| | | import com.gkhy.assess.system.service.SysUserFaceService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.assess.system.service.SysUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | @Autowired |
| | | private SysCommonService commonService; |
| | | @Autowired |
| | | private SysUserMapper userMapper; |
| | | private SysUserService userService; |
| | | @Override |
| | | @Transactional |
| | | public int addUserFace(SysUserFace userFace) { |
| | | int row=0; |
| | | SysUserFace oldUserFace=baseMapper.getFaceByUserId(userFace.getUserId()); |
| | | @Transactional(rollbackFor = RuntimeException.class) |
| | | public UploadObjectVO addUserFace(SysUserFace userFace) { |
| | | |
| | | // SysUserFace oldUserFace=baseMapper.getFaceByUserId(userFace.getUserId()); |
| | | UploadObjectVO uploadObjectVO =commonService.doUpload(userFace.getFile()); |
| | | if(oldUserFace==null){ |
| | | row= baseMapper.insert(userFace); |
| | | /*if(oldUserFace==null){ |
| | | baseMapper.insert(userFace); |
| | | }else{ |
| | | row= baseMapper.updateById(new SysUserFace().setId(oldUserFace.getId()).setFaceBase(userFace.getFaceBase())); |
| | | baseMapper.updateById(new SysUserFace().setId(oldUserFace.getId()).setFaceBase(userFace.getFaceBase())); |
| | | }*/ |
| | | boolean res=userService.updateById(new SysUser().setId(userFace.getUserId()).setIdPhoto(uploadObjectVO.getPath())); |
| | | if(!res){ |
| | | throw new ApiException("人脸数据上传失败"); |
| | | } |
| | | userMapper.updateById(new SysUser().setId(userFace.getUserId()).setIdPhoto(uploadObjectVO.getPath())); |
| | | return row; |
| | | SysUser sysUser=userService.getById(userFace.getUserId()); |
| | | userService.delCacheByUsername(sysUser.getUsername(),sysUser.getIdentity()); |
| | | if(StringUtils.isNotBlank(sysUser.getPhone())) { |
| | | userService.delCacheByUsername(sysUser.getPhone(), sysUser.getIdentity()); |
| | | } |
| | | return uploadObjectVO; |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.assess.common.api.CommonPage; |
| | | import com.gkhy.assess.common.constant.CacheConstant; |
| | | import com.gkhy.assess.common.domain.CustomerUsernamePasswordToken; |
| | | import com.gkhy.assess.common.domain.vo.AccountVO; |
| | | import com.gkhy.assess.common.domain.vo.LoginBody; |
| | | import com.gkhy.assess.common.enums.AttachTypeEnum; |
| | |
| | | |
| | | @Override |
| | | public AccountVO login(LoginBody loginBody) { |
| | | if(loginBody.getIdentity()==null){ |
| | | throw new ApiException("请选择登录用户身份"); |
| | | } |
| | | // 验证码校验 |
| | | validateCaptcha(loginBody.getUsername(), loginBody.getCode(), loginBody.getUuid()); |
| | | UsernamePasswordToken usernamePasswordToken = new UsernamePasswordToken(loginBody.getUsername(), Base64.decodeStr(loginBody.getPassword()), false); |
| | | // UsernamePasswordToken usernamePasswordToken = new UsernamePasswordToken(loginBody.getUsername(), Base64.decodeStr(loginBody.getPassword()), false); |
| | | CustomerUsernamePasswordToken usernamePasswordToken=new CustomerUsernamePasswordToken(loginBody.getUsername(), Base64.decodeStr(loginBody.getPassword()),loginBody.getIdentity()); |
| | | Subject subject= SecurityUtils.getSubject(); |
| | | String msg ; |
| | | try { |
| | |
| | | accountVO.setAgentName(agency.getName()); |
| | | accountVO.setAgentId(agency.getId()); |
| | | } |
| | | String token = JwtTokenUtil.sign(sysUser.getUsername(),sysUser.getPassword()); |
| | | String token = JwtTokenUtil.sign(sysUser.getUsername(),sysUser.getPassword(),loginBody.getIdentity()); |
| | | accountVO.setToken(token); |
| | | cacheUserToken(sysUser.getUsername(),token); |
| | | cacheUserToken(sysUser.getUsername(),sysUser.getIdentity(),token); |
| | | return accountVO; |
| | | }catch (UnknownAccountException | IncorrectCredentialsException uae){ |
| | | throw new ApiException("用户名/密码错误,请重新输入"); |
| | |
| | | |
| | | @Override |
| | | public AccountVO appLogin(LoginBody loginBody) { |
| | | // 验证码校验 |
| | | UsernamePasswordToken usernamePasswordToken = new UsernamePasswordToken(loginBody.getUsername(), Base64.decodeStr(loginBody.getPassword()), false); |
| | | // app端只能是专家用户登录 |
| | | loginBody.setIdentity(UserIdentityEnum.EXPERT.getCode()); |
| | | CustomerUsernamePasswordToken usernamePasswordToken = new CustomerUsernamePasswordToken(loginBody.getUsername(), Base64.decodeStr(loginBody.getPassword()), loginBody.getIdentity()); |
| | | Subject subject= SecurityUtils.getSubject(); |
| | | String msg ; |
| | | try { |
| | |
| | | accountVO.setAgentName(agency.getName()); |
| | | accountVO.setAgentId(agency.getId()); |
| | | } |
| | | String token = JwtTokenUtil.sign(sysUser.getUsername(),sysUser.getPassword()); |
| | | String token = JwtTokenUtil.sign(sysUser.getUsername(),sysUser.getPassword(),loginBody.getIdentity()); |
| | | accountVO.setToken(token); |
| | | cacheUserToken(sysUser.getUsername(),token); |
| | | accountVO.setUserFace(userFaceMapper.getFaceByUserId(sysUser.getId())); |
| | | cacheUserToken(sysUser.getUsername(),sysUser.getIdentity(),token); |
| | | accountVO.setIdPhoto(sysUser.getIdPhoto()); |
| | | return accountVO; |
| | | }catch (UnknownAccountException | IncorrectCredentialsException uae){ |
| | | throw new ApiException("用户名/密码错误,请重新输入"); |
| | |
| | | * 清空旧的登录信息,保证同时只有一个用户再登录,后登录用户会挤掉前一个用户 |
| | | * @param username |
| | | */ |
| | | public void cacheUserToken(String username,String newToken){ |
| | | |
| | | String userKey = redisUtils.generateKey(CacheConstant.SYS_USER_TOKEN + ":" + username); |
| | | public void cacheUserToken(String username,Integer identity,String newToken){ |
| | | String userKey = redisUtils.generateKey(CacheConstant.SYS_USER_TOKEN + ":" + username+"_"+identity); |
| | | String oldToken = (String) redisUtils.get(userKey); |
| | | if (StringUtils.isNotBlank(oldToken)) { |
| | | String oldTokenkey = redisUtils.generateKey(CacheConstant.SYS_USER_TOKEN + ":" + JwtTokenUtil.md5Encode(oldToken)); |
| | |
| | | redisUtils.set(tokenKey,newToken); |
| | | redisUtils.expire(tokenKey,JwtTokenUtil.EXPIRATION*2/1000); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 校验验证码 |
| | |
| | | String jwtToken = request.getHeader(JwtTokenUtil.USER_LOGIN_TOKEN); |
| | | if(StringUtils.isNotBlank(jwtToken)){ |
| | | String username=JwtTokenUtil.getUsername(jwtToken); |
| | | String userKey = redisUtils.generateKey(CacheConstant.SYS_USER_TOKEN + ":" + username); |
| | | Integer identity=JwtTokenUtil.getIdentity(jwtToken); |
| | | String userKey = redisUtils.generateKey(CacheConstant.SYS_USER_TOKEN + ":" + username+"_"+identity); |
| | | String tokenKey= redisUtils.generateKey(CacheConstant.SYS_USER_TOKEN+":"+JwtTokenUtil.md5Encode(jwtToken)); |
| | | //删除redis缓存 |
| | | redisUtils.del(tokenKey); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public SysUser getUserByUsername(String username) { |
| | | String key=redisUtils.generateKey(CacheConstant.SYS_USER_NAME+":"+username); |
| | | public SysUser getUserByUsername(String username,Integer identity) { |
| | | String key=redisUtils.generateKey(CacheConstant.SYS_USER_NAME + ":" + username+"_"+identity); |
| | | SysUser sysUser =null; |
| | | if(redisUtils.hasKey(key)){ |
| | | sysUser= (SysUser) redisUtils.get(key); |
| | |
| | | return sysUser; |
| | | } |
| | | |
| | | public void delCacheByUsername(String username){ |
| | | String key=redisUtils.generateKey(CacheConstant.SYS_USER_NAME+":"+username); |
| | | @Override |
| | | public void delCacheByUsername(String username,Integer identity){ |
| | | String key=redisUtils.generateKey(CacheConstant.SYS_USER_NAME+":"+username+"_"+identity); |
| | | redisUtils.del(key); |
| | | } |
| | | |
| | | @Override |
| | | public SysUser getUserByUsernamePhone(String username) { |
| | | String key=redisUtils.generateKey(CacheConstant.SYS_USER_NAME+":"+username); |
| | | public SysUser getUserByUsernamePhone(String username,Integer identity) { |
| | | String key=redisUtils.generateKey(CacheConstant.SYS_USER_NAME+":"+username+"_"+identity); |
| | | SysUser sysUser =null; |
| | | if(redisUtils.hasKey(key)){ |
| | | sysUser= (SysUser) redisUtils.get(key); |
| | | }else { |
| | | sysUser = baseMapper.getUserByUsernamePhone(username); |
| | | sysUser = baseMapper.getUserByUsernamePhone(username,identity); |
| | | redisUtils.set(key,sysUser,10*60); |
| | | } |
| | | return sysUser; |
| | |
| | | if(!checkUsernameUnique(new SysUser().setUsername(user.getUsername()))){ |
| | | throw new ApiException("用户名已存在"); |
| | | } |
| | | if(!checkPhoneUnique(new SysUser().setUsername(user.getPhone()))){ |
| | | if(!checkPhoneUnique(new SysUser().setUsername(user.getPhone()).setIdentity(UserIdentityEnum.MONITOR.getCode()))){ |
| | | throw new ApiException("手机号已存在"); |
| | | } |
| | | String originPsword=Base64.decodeStr(user.getPassword()); |
| | |
| | | if(!checkUsernameUnique(new SysUser().setUsername(user.getUsername()))){ |
| | | throw new ApiException("用户名已存在"); |
| | | } |
| | | if(!checkPhoneUnique(new SysUser().setUsername(user.getPhone()))){ |
| | | if(!checkPhoneUnique(new SysUser().setUsername(user.getPhone()).setIdentity(UserIdentityEnum.AGENCY.getCode()))){ |
| | | throw new ApiException("手机号已存在"); |
| | | } |
| | | String originPsword=Base64.decodeStr(user.getPassword()); |
| | |
| | | if(!agencyService.checkAgencyNameUnique(new SysAgency().setName(agency.getName()))){ |
| | | throw new ApiException("机构名称已存在"); |
| | | } |
| | | agency.setCreateBy(ShiroUtils.getSysUser().getUsername()); |
| | | agency.setCreateBy(ShiroUtils.getSysUser()!=null?ShiroUtils.getSysUser().getUsername():""); |
| | | boolean b=agencyService.save(agency); |
| | | if(!b){ |
| | | throw new ApiException("保存机构信息失败"); |
| | | } |
| | | |
| | | //创建机构用户 |
| | | user.setIdentity(UserIdentityEnum.AGENCY.getCode()); |
| | | user.setAgencyId(agency.getId()); |
| | | user.setPassword(JwtTokenUtil.encryptPassword(user.getUsername(),originPsword,user.getSalt())); |
| | | user.setCreateBy(ShiroUtils.getSysUser().getUsername()); |
| | | user.setCreateBy(ShiroUtils.getSysUser()!=null?ShiroUtils.getSysUser().getUsername():""); |
| | | b=save(user); |
| | | if(!b){ |
| | | throw new ApiException("创建机构用户信息失败"); |
| | |
| | | if(!checkUsernameUnique(new SysUser().setUsername(user.getUsername()))){ |
| | | throw new ApiException("用户名已存在"); |
| | | } |
| | | if(!checkPhoneUnique(new SysUser().setUsername(user.getPhone()))){ |
| | | if(!checkPhoneUnique(new SysUser().setUsername(user.getPhone()).setIdentity(UserIdentityEnum.EXPERT.getCode()))){ |
| | | throw new ApiException("手机号已存在"); |
| | | } |
| | | String major=user.getMajor(); |
| | |
| | | agencyService.updateById(agency); |
| | | } |
| | | } |
| | | delCacheByUsername(user.getUsername()); |
| | | delCacheByUsername(user.getUsername(),user.getIdentity()); |
| | | user=new SysUser().setId(userId); |
| | | user.setUpdateBy(ShiroUtils.getSysUser().getUsername()); |
| | | user.setDelFlag(DeleteFlagEnum.DELETED.getCode()); |
| | |
| | | if(!checkUsernameUnique(user)){ |
| | | throw new ApiException("用户名已存在"); |
| | | } |
| | | if(!checkPhoneUnique(user)){ |
| | | if(!checkPhoneUnique(user.setIdentity(UserIdentityEnum.MONITOR.getCode()))){ |
| | | throw new ApiException("手机号已存在"); |
| | | } |
| | | delCacheByUsername(user.getUsername()); |
| | | delCacheByUsername(user.getUsername(),UserIdentityEnum.MONITOR.getCode()); |
| | | user.setPassword(null); |
| | | user.setUpdateBy(ShiroUtils.getSysUser().getUsername()); |
| | | boolean b=updateById(user); |
| | |
| | | if(!checkUsernameUnique(user)){ |
| | | throw new ApiException("用户名已存在"); |
| | | } |
| | | if(!checkPhoneUnique(user)){ |
| | | if(!checkPhoneUnique(user.setIdentity(UserIdentityEnum.AGENCY.getCode()))){ |
| | | throw new ApiException("手机号已存在"); |
| | | } |
| | | SysAgency agency=user.getAgency(); |
| | |
| | | throw new ApiException("机构名称已存在"); |
| | | } |
| | | |
| | | delCacheByUsername(user.getUsername()); |
| | | delCacheByUsername(user.getUsername(),UserIdentityEnum.AGENCY.getCode()); |
| | | agency.setUpdateBy(ShiroUtils.getSysUser().getUsername()); |
| | | agencyService.updateById(agency); |
| | | user.setPassword(null); |
| | |
| | | if(!checkUsernameUnique(user)){ |
| | | throw new ApiException("用户名已存在"); |
| | | } |
| | | if(!checkPhoneUnique(user)){ |
| | | if(!checkPhoneUnique(user.setIdentity(UserIdentityEnum.EXPERT.getCode()))){ |
| | | throw new ApiException("手机号已存在"); |
| | | } |
| | | String major=user.getMajor(); |
| | |
| | | if(!delIds.isEmpty()){ |
| | | attachService.deleteAttachsByIds(delIds); |
| | | } |
| | | delCacheByUsername(user.getUsername()); |
| | | delCacheByUsername(user.getUsername(),UserIdentityEnum.EXPERT.getCode()); |
| | | return row; |
| | | } |
| | | |
| | |
| | | SysUser oldUser=checkUserDataScope(user.getId()); |
| | | SysUser newUser=new SysUser().setId(user.getId()).setPassword(JwtTokenUtil.encryptPassword(oldUser.getUsername(),originPsword,oldUser.getSalt())); |
| | | newUser.setUpdateBy(ShiroUtils.getSysUser().getUsername()); |
| | | delCacheByUsername(oldUser.getUsername()); |
| | | delCacheByUsername(oldUser.getUsername(),oldUser.getIdentity()); |
| | | return updateById(newUser); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public boolean checkPhoneUnique(SysUser user) { |
| | | if(user.getIdentity()==null){ |
| | | throw new ApiException("用户身份不能为空"); |
| | | } |
| | | Long userId = user.getId()==null ? -1L : user.getId(); |
| | | SysUser info = baseMapper.checkPhoneUnique(user.getPhone()); |
| | | SysUser info = baseMapper.checkPhoneUnique(user.getPhone(),user.getIdentity()); |
| | | if (info!=null && info.getId().longValue() != userId.longValue()) |
| | | { |
| | | return false; |
| | |
| | | SysUser existUser=checkUserDataScope(user.getId()); |
| | | SysUser su=new SysUser().setId(user.getId()).setStatus(user.getStatus()); |
| | | su.setUpdateBy(ShiroUtils.getSysUser().getUsername()); |
| | | delCacheByUsername(existUser.getUsername()); |
| | | delCacheByUsername(existUser.getUsername(),existUser.getIdentity()); |
| | | return updateById(su); |
| | | } |
| | | |
| | |
| | | SysUser existUser=checkUserDataScope(user.getId()); |
| | | SysUser su=new SysUser().setId(user.getId()).setState(user.getState()); |
| | | su.setUpdateBy(ShiroUtils.getSysUser().getUsername()); |
| | | delCacheByUsername(existUser.getUsername()); |
| | | delCacheByUsername(existUser.getUsername(),existUser.getIdentity()); |
| | | return updateById(su); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | <select id="getAccessoryFileByProjectId" resultType="com.gkhy.assess.system.domain.AssAccessoryFile"> |
| | | select id,file_name,path,module_type,project_id,del_flag,origin_name,create_time from ass_accessory_file |
| | | select id,file_name,path,module_type,project_id,process_id,del_flag,origin_name,create_time from ass_accessory_file |
| | | where project_id=#{projectId} and del_flag=0 and module_type=#{moduleType} |
| | | <if test="processId!=null and processId!=''"> |
| | | and process_id=#{processId} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getAccessoryFileCountByProjectId" resultType="java.lang.Integer"> |
| | | select count(1) from ass_accessory_file |
| | | where project_id=#{projectId} and del_flag=0 and module_type=#{moduleType} |
| | | <if test="processId!=null and processId!=''"> |
| | | and process_id=#{processId} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="getFaceRecognitionByProjectId" resultMap="faceRecognitionResult"> |
| | | select f.id,f.person_id,p.project_id,f.sign_path,f.insurance_path, |
| | | select f.id,p.person_id,p.project_id,f.sign_path,f.insurance_path, |
| | | f.version,f.del_flag,f.create_by,f.create_time,f.update_by,f.update_time,f.remark, |
| | | p.job_type,p.play_role, |
| | | u.name as person_name,u.major as person_major,u.phone as person_phone,u.post as person_post,u.level as person_level, |
| | |
| | | where p.project_id=#{projectId} and p.del_flag=0 |
| | | </select> |
| | | |
| | | <select id="getSimpleFaceRecognitionByProjectId" resultType="com.gkhy.assess.system.domain.AssFaceRecognition"> |
| | | select * from ass_face_recognition |
| | | where project_id=#{projectId} and del_flag=0 |
| | | </select> |
| | | |
| | | <select id="getFaceRecognitionById" resultMap="faceRecognitionResult"> |
| | | <include refid="selectFaceRecognitionVo"/> |
| | | where f.id=#{faceRecognitionId} and a.del_flag=0 |
| | |
| | | |
| | | <select id="getInvestigationByProjectId" resultMap="investigationResult"> |
| | | <include refid="selectInvestigationVo"/> |
| | | where project_id=#{projectId} and del_flag=0 |
| | | where project_id=#{projectId} and del_flag=0 order by create_time desc |
| | | </select> |
| | | |
| | | <select id="getInvestigationById" resultMap="investigationResult"> |
| | |
| | | <result property="businessName" column="business_name" /> |
| | | <result property="leaderId" column="leader_id" /> |
| | | <result property="estimateTypeName" column="estimate_type_name" /> |
| | | <result property="agencyName" column="agency_name" /> |
| | | <association property="leader" javaType="com.gkhy.assess.system.domain.SysUser" resultMap="userResult" /> |
| | | <association property="contract" javaType="com.gkhy.assess.system.domain.AssContract" resultMap="contractResult" /> |
| | | </resultMap> |
| | |
| | | p.actual_location,p.location,p.estimate_type,p.filing_date, |
| | | p.credit_code,p.report_progress,p.phase,p.state,p.introduction,p.is_review,p.del_flag,p.create_by,p.create_time, |
| | | p.update_by,p.update_time,p.remark,d1.label as business_name,d2.label as estimate_type_name,e.leader_id,u.name as leader_name, |
| | | c.id as contract_id,c.contract_money,c.actual_contract_money, |
| | | c.id as contract_id,c.contract_money,c.actual_contract_money,a.name as agency_name, |
| | | (select count(*) from ass_project_material m where m.project_id=p.id and m.file_id is not null) as material_cnt |
| | | from ass_project p |
| | | left join ass_estimate_task e on e.project_id=p.id |
| | |
| | | left join sys_dict_data d1 on d1.id=p.business |
| | | left join sys_dict_data d2 on d2.id=p.estimate_type |
| | | left join ass_contract c on c.project_id=p.id |
| | | left join sys_agency a on a.id=p.agency_id |
| | | </sql> |
| | | |
| | | |
| | |
| | | <result property="manager" column="manager" /> |
| | | <result property="managerPhone" column="manager_phone" /> |
| | | <result property="certNumber" column="cert_number" /> |
| | | <result property="certPath" column="cert_path" /> |
| | | <result property="issueDate" column="issue_date" /> |
| | | <result property="validDate" column="valid_date" /> |
| | | <result property="assetValue" column="asset_value" /> |
| | |
| | | |
| | | <sql id="selectAgencyVo"> |
| | | select a.id,a.name,a.credit_code,a.attribute,a.province,a.city,a.district,a.address,a.web,a.legal_person, |
| | | a.legal_phone,a.manager,a.manager_phone,a.cert_number,a.issue_date,a.valid_date,a.asset_value,a.work_area,a.archive_area, |
| | | a.legal_phone,a.manager,a.manager_phone,a.cert_number,a.cert_path,a.issue_date,a.valid_date,a.asset_value,a.work_area,a.archive_area, |
| | | a.reg_address,a.business,a.report_path,a.del_flag,a.publication,a.create_time,a.remark, |
| | | b.id as user_id,b.username,b.phone |
| | | from sys_agency a |
| | |
| | | </select> |
| | | |
| | | <select id="checkPhoneUnique" resultType="com.gkhy.assess.system.domain.SysUser"> |
| | | select id,phone from sys_user where phone=#{phone} and del_flag=0 limit 1 |
| | | select id,phone from sys_user where phone=#{phone} and identity=#{identity} and del_flag=0 limit 1 |
| | | </select> |
| | | |
| | | <select id="checkEmailUnique" resultType="com.gkhy.assess.system.domain.SysUser"> |
| | |
| | | </select> |
| | | |
| | | <select id="getUserByUsernamePhone" resultType="com.gkhy.assess.system.domain.SysUser"> |
| | | select id,username,name,password,salt,identity,state,status,del_flag,agency_id from sys_user |
| | | where (username=#{username} or phone=#{username}) and del_flag=0 |
| | | select id,username,name,password,salt,identity,id_photo,state,status,del_flag,agency_id from sys_user |
| | | where (username=#{username} or phone=#{username}) and del_flag=0 and identity=#{identity} |
| | | </select> |
| | | |
| | | |
| | |
| | | <mybatis-plus.version>3.5.1</mybatis-plus.version> |
| | | <mysql-connector.version>8.0.29</mysql-connector.version> |
| | | <java-jwt.version>3.11.0</java-jwt.version> |
| | | <fastjson.version>1.2.76</fastjson.version> |
| | | <fastjson.version>1.2.83</fastjson.version> |
| | | <caffeine.version>2.9.3</caffeine.version> |
| | | <kaptcha.version>2.3.2</kaptcha.version> |
| | | <commons.io.version>2.13.0</commons.io.version> |