Commit ec2437fb authored by 董天德's avatar 董天德

Merge branch 'dev_ch_master' into uat_ch_master

parents a0a1ab2a 883a6348
......@@ -121,6 +121,7 @@
a.REASONS_REVIEW reasonsReview,
a.REASONS_REMARK reasonsRemark,
a.MEDICAL_AREA medicalArea,
a.REVIEW_FREQUENCY reviewFrequency,
a.BANK_CARD_NO bankCardNo
from CH_DISABLE_APPLY a
LEFT JOIN CH_SRV_ORGAN o ON a.SRV_ORGAN_ID = o.SRV_ORGAN_ID
......
......@@ -82,11 +82,14 @@ public class TaskController {
* @param tel 失能人员手机号码
*/
@RequestMapping("/taskReportList")
public Result<List<TaskReportVO>> taskReportList(String name, String certiCode, String tel) {
List<TaskReportVO> taskReportList = taskService.taskReportList(name, certiCode, tel);
return Result.success(taskReportList);
public Result<Page<TaskReportVO>> taskReportList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize,String name, String certiCode, String tel) {
Page<TaskReportVO> page = new Page<>(pageNum, pageSize);
page = taskService.taskReportList(page,name, certiCode, tel);
log.info("评定报告录入:"+JSONObject.toJSONString(page));
return Result.success(page);
}
/**
* 查询评定报告附件列表
*
......
......@@ -42,7 +42,7 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
/**
* 评定报告录入列表
*/
List<TaskReportVO> taskReportList(String name, String certiCode, String tel);
Page<TaskReportVO> taskReportList(Page<TaskReportVO> page,String name, String certiCode, String tel);
TaskReportVO getReportById(String reportId);
......
......@@ -28,7 +28,7 @@ public interface TaskService {
String street, String realName, String certiCode, String taskName, String taskTel,
String daysRemaining, String taskStatus, String isReturn, String area);
List<TaskReportVO> taskReportList(String name, String certiCode, String tel);
Page<TaskReportVO> taskReportList(Page<TaskReportVO> page,String name, String certiCode, String tel);
List<AprEmpVO> aprEmpList(String provincial, String city, String area, String organName, String name, String tel, String groupLeader);
......
......@@ -108,8 +108,8 @@ public class TaskServiceImpl implements TaskService {
* @param tel 失能人员手机号码
*/
@Override
public List<TaskReportVO> taskReportList(String name, String certiCode, String tel) {
return taskMapper.taskReportList(name, certiCode, tel);
public Page<TaskReportVO> taskReportList(Page<TaskReportVO> page,String name, String certiCode, String tel) {
return taskMapper.taskReportList(page,name, certiCode, tel);
}
/**
......
......@@ -75,6 +75,10 @@ public class DisableExamineInfoVO {
private Short addressType;
//***失能人员医疗及失能信息
/**
* 是否首次申请 初次申请,争议复评,定期复评,变更评定
*/
private Long reviewFrequency;
//诊断疾病
private String disease;
private Integer diseTypeF;
......
......@@ -52,7 +52,7 @@ public class ResourceServerConfig {
.jwtAuthenticationConverter(jwtAuthenticationConverter());
http.authorizeExchange()
.pathMatchers("/api/oauth/token","/api.system/role/getRoleResource",
"/api.system/resource/getManinMenu","/oauth/*","/api/oauth/genKeyPair").permitAll()
"/api.system/resource/getManinMenu","/oauth/*","/api/oauth/genKeyPair","/api.system/user/updatePassword").permitAll()
.anyExchange().access(authorizationManager)
.and()
.exceptionHandling()
......
......@@ -18,6 +18,7 @@ import com.hungraim.ltc.system.service.impl.SystemUserRoleServiceImpl;
import com.hungraim.ltc.system.service.impl.SystemUserServiceImpl;
import com.hungraim.ltc.util.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.*;
......@@ -301,6 +302,43 @@ public class UserController {
return Result.success("更新成功");
}
@PostMapping("/updatePassword")
public Result updatePassword(String oldPassword,String newPassword,@RequestHeader("Authorization") String token){
log.info("oldPassword:"+oldPassword+",newPassword:"+newPassword);
if(StringUtils.isBlank(newPassword) || StringUtils.isBlank(oldPassword)){
Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
//校验旧密码是否匹配
Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
if(userId == null){
return Result.failed("未获取到用户信息!");
}
SystemUser userinfo = userInfoService.getById(userId);
if(userinfo == null){
return Result.failed("未获取到用户信息!");
}
BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
String userinfoPassword = userinfo.getPassword();
if(!bCryptPasswordEncoder.matches(oldPassword, userinfoPassword)){
return Result.failed("旧密码不匹配!");
}
if (CheckStrength.checkPasswordStrength(newPassword) < 4) {
return Result.failed("密码太简单,请设置复杂密码!");
}
SystemUser user = new SystemUser();
user.setPassword(new BCryptPasswordEncoder().encode(newPassword));
user.setUserId(userId.longValue());
userInfoService.updateById(user);
return Result.success();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment