Merge remote-tracking branch 'origin/master'

master
heminjian502 2 years ago
commit 6044071949

@ -11,6 +11,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.RequestParamsUtil;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.common.utils.http.HttpUtils;
@ -25,11 +26,8 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
import java.util.stream.Collectors;
@ -501,4 +499,34 @@ public class AppController extends BaseController
return jsonObject;
}
/**
*
*
* @param patientId id
* @return {@code AjaxResult}
*/
@ApiOperation("新增预约记录")
@Log(title = "App新增预约记录", businessType = BusinessType.INSERT)
@PostMapping("/record/add/{patientId}")
public AjaxResult addRecord(@PathVariable("patientId") Long patientId)
{
TRecord tRecord = new TRecord();
tRecord.setHospitalId(SecurityUtils.getLoginUser().getUser().getHospitalId());
tRecord.setPatientId(patientId);
tRecord.setDoctorId(getUserId());
tRecord.setStatus("0");
tRecord.setCreateBy(getUsername());
tRecordService.insertTRecord(tRecord);
TPatientHospitalDoctor tPatientHospitalDoctor = new TPatientHospitalDoctor();
tPatientHospitalDoctor.setHospitalId(tRecord.getHospitalId());
tPatientHospitalDoctor.setDoctorId(tRecord.getDoctorId());
tPatientHospitalDoctor.setPatientId(tRecord.getPatientId());
List<TPatientHospitalDoctor> tPHDs = itPatientHospitalDoctorService.selectTPatientHospitalDoctorList(tPatientHospitalDoctor);
if (tPHDs.isEmpty())
{
itPatientHospitalDoctorService.insertTPatientHospitalDoctor(tPatientHospitalDoctor);
}
return AjaxResult.success("预约成功。");
}
}

@ -20,7 +20,7 @@ import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl;
/**
* spring security
*
*
* @author ruoyi
*/
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
@ -31,7 +31,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
*/
@Autowired
private UserDetailsService userDetailsService;
/**
*
*/
@ -49,13 +49,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
*/
@Autowired
private JwtAuthenticationTokenFilter authenticationTokenFilter;
/**
*
*/
@Autowired
private CorsFilter corsFilter;
/**
* AuthenticationManager
*
@ -97,7 +97,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
.authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/login/app","/login/app/fill/info","/register", "/captchaImage").anonymous()
.antMatchers("/login", "/login/app","/login/app/fill/info","/register", "/captchaImage","/common/upload").anonymous()
.antMatchers(
HttpMethod.GET,
"/",

Loading…
Cancel
Save