完成100需求,补充99需求追溯术中产生的费用新增费用项时向表中插入SourceBillNo和generate_source_enum字段值
This commit is contained in:
@@ -2,11 +2,14 @@ package com.openhis.web.clinicalmanage.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.core.domain.model.LoginUser;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.web.clinicalmanage.appservice.ISurgicalScheduleAppService;
|
||||
import com.openhis.web.clinicalmanage.dto.OpCreateScheduleDto;
|
||||
import com.openhis.web.clinicalmanage.dto.OpScheduleDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.catalina.User;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -98,4 +101,29 @@ public class SurgicalScheduleController {
|
||||
surgicalScheduleAppService.exportSurgerySchedule(opScheduleDto, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证密码
|
||||
* @param password 密码
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping(value = "/checkPassword")
|
||||
public R<?> checkPassword(@RequestParam String password) {
|
||||
try {
|
||||
//获取当前登录用户信息
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return R.fail("用户未登录");
|
||||
}
|
||||
// 直接使用 SecurityUtils.matchesPassword 进行密码验证
|
||||
boolean isMatch = SecurityUtils.matchesPassword(password, loginUser.getPassword());
|
||||
if (isMatch) {
|
||||
return R.ok(true);
|
||||
} else {
|
||||
return R.fail("密码错误");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return R.fail("密码验证失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user