Browse Source

统计删除@DataSource注解

new-ays
zzc 3 months ago
parent
commit
a50bfe49db
  1. 17
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/system/SysLoginController.java
  2. 7
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminFmsFollowupController.java
  3. 4
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminPmsPatientController.java
  4. 9
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminPmsTreatmentController.java
  5. 7
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminStatisticsController.java
  6. 2
      acupuncture-framework/src/main/java/com/acupuncture/framework/config/SecurityConfig.java
  7. 47
      acupuncture-framework/src/main/java/com/acupuncture/framework/web/service/SysLoginService.java
  8. 17
      acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/AdminTongjiDao.java
  9. 9
      acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/FmsFollowupDao.java
  10. 6
      acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/PmsTreatmentDao.java
  11. 4
      acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/WxQrCodeDao.java
  12. 9
      acupuncture-system/src/main/java/com/acupuncture/system/service/AdminFmsFollowupQueueService.java
  13. 8
      acupuncture-system/src/main/java/com/acupuncture/system/service/FmsFollowupService.java
  14. 37
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/AdminFmsFollowupQueueServiceImpl.java
  15. 36
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/FmsFollowupServiceImpl.java

17
acupuncture-admin/src/main/java/com/acupuncture/web/controller/system/SysLoginController.java

@ -66,6 +66,23 @@ public class SysLoginController
return ajax; return ajax;
} }
/**
* 登录方法
*
* @param loginBody 登录信息
* @return 结果
*/
@PostMapping("/loginSimple")
public AjaxResult loginSimple(@RequestBody LoginBody loginBody)
{
AjaxResult ajax = AjaxResult.success();
// 生成令牌
String token = loginService.loginSimple(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
loginBody.getUuid());
ajax.put(Constants.TOKEN, token);
return ajax;
}
/** /**
* 获取用户信息 * 获取用户信息
* *

7
acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminFmsFollowupController.java

@ -1,8 +1,10 @@
package com.acupuncture.web.controller.web; package com.acupuncture.web.controller.web;
import com.acupuncture.common.annotation.Anonymous; import com.acupuncture.common.annotation.Anonymous;
import com.acupuncture.common.annotation.DataSource;
import com.acupuncture.common.core.domain.BaseDto; import com.acupuncture.common.core.domain.BaseDto;
import com.acupuncture.common.core.domain.JsonResponse; import com.acupuncture.common.core.domain.JsonResponse;
import com.acupuncture.common.enums.DataSourceType;
import com.acupuncture.system.domain.dto.FmsFollowupDto; import com.acupuncture.system.domain.dto.FmsFollowupDto;
import com.acupuncture.system.domain.vo.FmsFollowupVo; import com.acupuncture.system.domain.vo.FmsFollowupVo;
import com.acupuncture.system.service.AdminFmsFollowupQueueService; import com.acupuncture.system.service.AdminFmsFollowupQueueService;
@ -36,6 +38,7 @@ public class AdminFmsFollowupController {
@ApiOperation("查询队列") @ApiOperation("查询队列")
@PostMapping("/query") @PostMapping("/query")
@Anonymous @Anonymous
@DataSource(DataSourceType.MASTER)
public JsonResponse<PageInfo<FmsFollowupVo.FollowupQueueVO>> queryCommonQueue(@RequestBody @Validated BaseDto<FmsFollowupDto.QueueQuery> dto) { public JsonResponse<PageInfo<FmsFollowupVo.FollowupQueueVO>> queryCommonQueue(@RequestBody @Validated BaseDto<FmsFollowupDto.QueueQuery> dto) {
if (dto.getPageNum() > 0) { if (dto.getPageNum() > 0) {
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
@ -45,6 +48,7 @@ public class AdminFmsFollowupController {
@ApiOperation("添加随访队列") @ApiOperation("添加随访队列")
@PostMapping("/add") @PostMapping("/add")
@DataSource(DataSourceType.MASTER)
public JsonResponse<Integer> addQueue(@RequestBody @Validated FmsFollowupDto.Add dto){ public JsonResponse<Integer> addQueue(@RequestBody @Validated FmsFollowupDto.Add dto){
return JsonResponse.ok(fmsFollowupQueueService.addQueue(dto)); return JsonResponse.ok(fmsFollowupQueueService.addQueue(dto));
} }
@ -57,12 +61,14 @@ public class AdminFmsFollowupController {
@ApiOperation("删除随访队列") @ApiOperation("删除随访队列")
@PostMapping("/del") @PostMapping("/del")
@DataSource(DataSourceType.MASTER)
public JsonResponse<Integer> delQueue(@RequestBody @Validated FmsFollowupDto.Del dto){ public JsonResponse<Integer> delQueue(@RequestBody @Validated FmsFollowupDto.Del dto){
return JsonResponse.ok(fmsFollowupQueueService.delQueue(dto)); return JsonResponse.ok(fmsFollowupQueueService.delQueue(dto));
} }
@ApiOperation("查询随访患者") @ApiOperation("查询随访患者")
@PostMapping("/queryPatient") @PostMapping("/queryPatient")
@DataSource(DataSourceType.MASTER)
public JsonResponse<PageInfo<FmsFollowupVo.FollowupPatient>> queryPatient(@RequestBody @Validated BaseDto<FmsFollowupDto.FollowupPatientQueryDTO> dto) { public JsonResponse<PageInfo<FmsFollowupVo.FollowupPatient>> queryPatient(@RequestBody @Validated BaseDto<FmsFollowupDto.FollowupPatientQueryDTO> dto) {
if (dto.getPageNum() > 0) { if (dto.getPageNum() > 0) {
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
@ -72,6 +78,7 @@ public class AdminFmsFollowupController {
@ApiOperation("查询随访任务") @ApiOperation("查询随访任务")
@PostMapping("/queryTask") @PostMapping("/queryTask")
@DataSource(DataSourceType.MASTER)
public JsonResponse<PageInfo<FmsFollowupVo.FollowupTaskVO>> queryTask(@RequestBody @Validated BaseDto<FmsFollowupDto.FollowupTaskQueryDTO> dto) { public JsonResponse<PageInfo<FmsFollowupVo.FollowupTaskVO>> queryTask(@RequestBody @Validated BaseDto<FmsFollowupDto.FollowupTaskQueryDTO> dto) {
if (dto.getPageNum() > 0) { if (dto.getPageNum() > 0) {
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); PageHelper.startPage(dto.getPageNum(), dto.getPageSize());

4
acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminPmsPatientController.java

@ -1,7 +1,9 @@
package com.acupuncture.web.controller.web; package com.acupuncture.web.controller.web;
import com.acupuncture.common.annotation.DataSource;
import com.acupuncture.common.core.domain.BaseDto; import com.acupuncture.common.core.domain.BaseDto;
import com.acupuncture.common.core.domain.JsonResponse; import com.acupuncture.common.core.domain.JsonResponse;
import com.acupuncture.common.enums.DataSourceType;
import com.acupuncture.system.domain.dto.FmsFollowupDto; import com.acupuncture.system.domain.dto.FmsFollowupDto;
import com.acupuncture.system.domain.dto.PmsPatientDto; import com.acupuncture.system.domain.dto.PmsPatientDto;
import com.acupuncture.system.domain.vo.FmsFollowupVo; import com.acupuncture.system.domain.vo.FmsFollowupVo;
@ -47,6 +49,7 @@ public class AdminPmsPatientController {
*/ */
@ApiOperation("查询上报类型") @ApiOperation("查询上报类型")
@PostMapping("/list") @PostMapping("/list")
@DataSource(DataSourceType.MASTER)
public JsonResponse<PageInfo<PmsPatientVo.PatientResult>> adminQuery( @RequestBody @Validated BaseDto<PmsPatientDto.PatientQuery> dto) { public JsonResponse<PageInfo<PmsPatientVo.PatientResult>> adminQuery( @RequestBody @Validated BaseDto<PmsPatientDto.PatientQuery> dto) {
if (dto.getPageNum() > 0) { if (dto.getPageNum() > 0) {
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
@ -56,6 +59,7 @@ public class AdminPmsPatientController {
@ApiOperation("导出") @ApiOperation("导出")
@PostMapping("/export") @PostMapping("/export")
@DataSource(DataSourceType.MASTER)
public void adminExportPatient(HttpServletResponse response, @RequestBody @Validated PmsPatientDto.PatientQuery dto) { public void adminExportPatient(HttpServletResponse response, @RequestBody @Validated PmsPatientDto.PatientQuery dto) {
pmsPatientService.adminExportPatient(response, dto); pmsPatientService.adminExportPatient(response, dto);
} }

9
acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminPmsTreatmentController.java

@ -1,7 +1,9 @@
package com.acupuncture.web.controller.web; package com.acupuncture.web.controller.web;
import com.acupuncture.common.annotation.DataSource;
import com.acupuncture.common.core.domain.BaseDto; import com.acupuncture.common.core.domain.BaseDto;
import com.acupuncture.common.core.domain.JsonResponse; import com.acupuncture.common.core.domain.JsonResponse;
import com.acupuncture.common.enums.DataSourceType;
import com.acupuncture.framework.datasource.DynamicDataSourceContextHolder; import com.acupuncture.framework.datasource.DynamicDataSourceContextHolder;
import com.acupuncture.system.domain.dto.PmsTreatmentDto; import com.acupuncture.system.domain.dto.PmsTreatmentDto;
import com.acupuncture.system.domain.po.DmsTenant; import com.acupuncture.system.domain.po.DmsTenant;
@ -41,13 +43,10 @@ public class AdminPmsTreatmentController {
@Resource @Resource
private PmsTreatmentService treatmentService; private PmsTreatmentService treatmentService;
@Resource
private DmsTenantMapper dmsTenantMapper;
@Resource
private UmsDataSourceMapper umsDataSourceMapper;
@ApiOperation("查询诊疗档案") @ApiOperation("查询诊疗档案")
@PostMapping("/list") @PostMapping("/list")
@DataSource(DataSourceType.MASTER)
public JsonResponse<PageInfo<PmsTreatmentVo.TreatmentVO>> listTreatment(@RequestBody @Validated BaseDto<PmsTreatmentDto.TreatmentQueryDTO> queryDTO) { public JsonResponse<PageInfo<PmsTreatmentVo.TreatmentVO>> listTreatment(@RequestBody @Validated BaseDto<PmsTreatmentDto.TreatmentQueryDTO> queryDTO) {
if (queryDTO.getPageNum() > 0) { if (queryDTO.getPageNum() > 0) {
PageHelper.startPage(queryDTO.getPageNum(), queryDTO.getPageSize()); PageHelper.startPage(queryDTO.getPageNum(), queryDTO.getPageSize());
@ -57,12 +56,14 @@ public class AdminPmsTreatmentController {
@ApiOperation("查询诊疗档案数据") @ApiOperation("查询诊疗档案数据")
@PostMapping("/queryRecord") @PostMapping("/queryRecord")
@DataSource(DataSourceType.MASTER)
public JsonResponse<PmsTreatmentVo.TreatmentRecordVO> queryRecord(@RequestBody @Validated PmsTreatmentDto.QueryRecord dto) { public JsonResponse<PmsTreatmentVo.TreatmentRecordVO> queryRecord(@RequestBody @Validated PmsTreatmentDto.QueryRecord dto) {
return JsonResponse.ok(treatmentService.adminQueryRecord(dto.getTreatmentId(), dto.getCodeList())); return JsonResponse.ok(treatmentService.adminQueryRecord(dto.getTreatmentId(), dto.getCodeList()));
} }
@ApiOperation("导出诊疗档案数据") @ApiOperation("导出诊疗档案数据")
@PostMapping("/exportTreatment") @PostMapping("/exportTreatment")
@DataSource(DataSourceType.MASTER)
public void exportTreatment(HttpServletResponse response, @RequestBody @Validated PmsTreatmentDto.TreatmentQueryDTO dto) { public void exportTreatment(HttpServletResponse response, @RequestBody @Validated PmsTreatmentDto.TreatmentQueryDTO dto) {
treatmentService.adminExportTreatment(response, dto); treatmentService.adminExportTreatment(response, dto);
} }

7
acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminStatisticsController.java

@ -1,6 +1,8 @@
package com.acupuncture.web.controller.web; package com.acupuncture.web.controller.web;
import com.acupuncture.common.annotation.DataSource;
import com.acupuncture.common.core.domain.JsonResponse; import com.acupuncture.common.core.domain.JsonResponse;
import com.acupuncture.common.enums.DataSourceType;
import com.acupuncture.system.domain.dto.StatisticsDto; import com.acupuncture.system.domain.dto.StatisticsDto;
import com.acupuncture.system.domain.vo.AdminStatisticsVo; import com.acupuncture.system.domain.vo.AdminStatisticsVo;
import com.acupuncture.system.service.AdminStatisticsService; import com.acupuncture.system.service.AdminStatisticsService;
@ -33,30 +35,35 @@ public class AdminStatisticsController {
@ApiOperation("患者统计") @ApiOperation("患者统计")
@PostMapping("/patientTotal") @PostMapping("/patientTotal")
@DataSource(DataSourceType.MASTER)
public JsonResponse<AdminStatisticsVo.PatientVo> queryPatientStatistics(@RequestBody @Validated StatisticsDto.Query dto) { public JsonResponse<AdminStatisticsVo.PatientVo> queryPatientStatistics(@RequestBody @Validated StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.queryPatientStatistics(dto)); return JsonResponse.ok(statisticsService.queryPatientStatistics(dto));
} }
@ApiOperation("诊疗统计") @ApiOperation("诊疗统计")
@PostMapping("/zlInfo") @PostMapping("/zlInfo")
@DataSource(DataSourceType.MASTER)
public JsonResponse<AdminStatisticsVo.TreamentVo> queryZlStatistics(@RequestBody @Validated StatisticsDto.Query dto) { public JsonResponse<AdminStatisticsVo.TreamentVo> queryZlStatistics(@RequestBody @Validated StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.queryZlStatistics(dto)); return JsonResponse.ok(statisticsService.queryZlStatistics(dto));
} }
@ApiOperation("治疗类型统计") @ApiOperation("治疗类型统计")
@PostMapping("/zlType") @PostMapping("/zlType")
@DataSource(DataSourceType.MASTER)
public JsonResponse<AdminStatisticsVo.ZlTypeVo> queryZlTypeStatistics(@RequestBody @Validated StatisticsDto.Query dto) { public JsonResponse<AdminStatisticsVo.ZlTypeVo> queryZlTypeStatistics(@RequestBody @Validated StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.queryZlTypeStatistics(dto)); return JsonResponse.ok(statisticsService.queryZlTypeStatistics(dto));
} }
@ApiOperation("随访分布统计") @ApiOperation("随访分布统计")
@PostMapping("/sffb") @PostMapping("/sffb")
@DataSource(DataSourceType.MASTER)
public JsonResponse<List<AdminStatisticsVo.SffbVo.DlVo>> querySfStatistics(@RequestBody @Validated StatisticsDto.Query dto) { public JsonResponse<List<AdminStatisticsVo.SffbVo.DlVo>> querySfStatistics(@RequestBody @Validated StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.querySfStatistics(dto)); return JsonResponse.ok(statisticsService.querySfStatistics(dto));
} }
@ApiOperation("失访统计") @ApiOperation("失访统计")
@PostMapping("/sftj") @PostMapping("/sftj")
@DataSource(DataSourceType.MASTER)
public JsonResponse<List<AdminStatisticsVo.SftjVo>> querySfTjStatistics(@RequestBody @Validated StatisticsDto.Query dto) { public JsonResponse<List<AdminStatisticsVo.SftjVo>> querySfTjStatistics(@RequestBody @Validated StatisticsDto.Query dto) {
return JsonResponse.ok(statisticsService.querySfTjStatistics(dto)); return JsonResponse.ok(statisticsService.querySfTjStatistics(dto));
} }

2
acupuncture-framework/src/main/java/com/acupuncture/framework/config/SecurityConfig.java

@ -114,7 +114,7 @@ public class SecurityConfig
.authorizeHttpRequests((requests) -> { .authorizeHttpRequests((requests) -> {
permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll()); permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
// 对于登录login 注册register 验证码captchaImage 允许匿名访问 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
requests.antMatchers("/login", "/register", "/captchaImage", "/web/login", "/web/queryTenantById", "/api/http/getUserInfo", "/api/http/addReportImage", "/api/http/uploadMemberInfo", "/task/task").permitAll() requests.antMatchers("/login", "/register", "/captchaImage", "/web/login", "/web/queryTenantById", "/api/http/getUserInfo", "/api/http/addReportImage", "/api/http/uploadMemberInfo", "/task/task", "/loginSimple").permitAll()
// 静态资源,可匿名访问 // 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**", "/static/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**", "/static/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()

47
acupuncture-framework/src/main/java/com/acupuncture/framework/web/service/SysLoginService.java

@ -100,6 +100,53 @@ public class SysLoginService
return tokenService.createToken(loginUser); return tokenService.createToken(loginUser);
} }
/**
* 登录验证
*
* @param username 用户名
* @param password 密码
* @param code 验证码
* @param uuid 唯一标识
* @return 结果
*/
public String loginSimple(String username, String password, String code, String uuid)
{
// 验证码校验
// validateCaptcha(username, code, uuid);
// 登录前置校验
loginPreCheck(username, password);
// 用户验证
Authentication authentication = null;
try
{
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password);
AuthenticationContextHolder.setContext(authenticationToken);
// 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
authentication = authenticationManager.authenticate(authenticationToken);
}
catch (Exception e)
{
if (e instanceof BadCredentialsException)
{
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match")));
throw new UserPasswordNotMatchException();
}
else
{
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage()));
throw new ServiceException(e.getMessage());
}
}
finally
{
AuthenticationContextHolder.clearContext();
}
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
recordLoginInfo(loginUser.getUserId());
// 生成token
return tokenService.createToken(loginUser);
}
/** /**
* 登录验证 * 登录验证
* *

17
acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/AdminTongjiDao.java

@ -25,7 +25,6 @@ public interface AdminTongjiDao {
* @param tenantId * @param tenantId
* @return * @return
*/ */
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.PatientVo.GenderVo queryGenderStatistics(@Param("dto") StatisticsDto.Query dto, AdminStatisticsVo.PatientVo.GenderVo queryGenderStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@ -36,53 +35,37 @@ public interface AdminTongjiDao {
* @param tenantId * @param tenantId
* @return * @return
*/ */
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.PatientVo.AgeVo queryAgeStatistics(@Param("dto") StatisticsDto.Query dto, AdminStatisticsVo.PatientVo.AgeVo queryAgeStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.PatientVo.JwbzVo queryJwbzStatistics(@Param("dto") StatisticsDto.Query dto, AdminStatisticsVo.PatientVo.JwbzVo queryJwbzStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
List<String> queryZyzdStatistics(@Param("dto") StatisticsDto.Query dto, List<String> queryZyzdStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
Integer queryTotalPatient(@Param("dto") StatisticsDto.Query dto, Integer queryTotalPatient(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.TreamentVo.TxfbVo queryTxfbStatistics(@Param("dto") StatisticsDto.Query dto, AdminStatisticsVo.TreamentVo.TxfbVo queryTxfbStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.TreamentVo.ZytzVo queryZytzStatistics(@Param("dto") StatisticsDto.Query dto, AdminStatisticsVo.TreamentVo.ZytzVo queryZytzStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.ZlTypeVo.Zllxtj queryZllxtjStatistics(@Param("dto") StatisticsDto.Query dto, AdminStatisticsVo.ZlTypeVo.Zllxtj queryZllxtjStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.ZlTypeVo.BzfffbVo.Fpz queryFpzStatistics(@Param("dto") StatisticsDto.Query dto, AdminStatisticsVo.ZlTypeVo.BzfffbVo.Fpz queryFpzStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.ZlTypeVo.ZlxgVo queryZlxgStatistics(@Param("dto") StatisticsDto.Query dto, AdminStatisticsVo.ZlTypeVo.ZlxgVo queryZlxgStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.ZlTypeVo.ZlfyVo queryZlfyStatistics(@Param("dto") StatisticsDto.Query dto, AdminStatisticsVo.ZlTypeVo.ZlfyVo queryZlfyStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
List<AdminStatisticsVo.SftjVo> querySftjStatistics(@Param("dto") StatisticsDto.Query dto, List<AdminStatisticsVo.SftjVo> querySftjStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
List<AdminStatisticsVo.SffbVo.DlVo> querySfStatistics(@Param("dto") StatisticsDto.Query dto, List<AdminStatisticsVo.SffbVo.DlVo> querySfStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.TreamentVo.TtfbVo queryTtfbStatistics(@Param("dto") StatisticsDto.Query dto, AdminStatisticsVo.TreamentVo.TtfbVo queryTtfbStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.TreamentVo.SmfbVo querySmfbStatistics(@Param("dto") StatisticsDto.Query dto, AdminStatisticsVo.TreamentVo.SmfbVo querySmfbStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.TreamentVo.JlfbVo queryJlfbStatistics(@Param("dto") StatisticsDto.Query dto, AdminStatisticsVo.TreamentVo.JlfbVo queryJlfbStatistics(@Param("dto") StatisticsDto.Query dto,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
AdminStatisticsVo.ZlTypeVo.BzfffbVo.Smz querySmzStatistics(@Param("dto") StatisticsDto.Query dto, @Param("tenantId") Long tenantId); AdminStatisticsVo.ZlTypeVo.BzfffbVo.Smz querySmzStatistics(@Param("dto") StatisticsDto.Query dto, @Param("tenantId") Long tenantId);
List<String> queryTxStatistics(@Param("dto") StatisticsDto.Query dto, List<String> queryTxStatistics(@Param("dto") StatisticsDto.Query dto,

9
acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/FmsFollowupDao.java

@ -22,10 +22,8 @@ public interface FmsFollowupDao {
* @param name * @param name
* @return * @return
*/ */
@DataSource(DataSourceType.MASTER)
List<FmsFollowupVo.FollowupQueueVO> queryCommonQueue(@Param("name") String name); List<FmsFollowupVo.FollowupQueueVO> queryCommonQueue(@Param("name") String name);
@DataSource(DataSourceType.MASTER)
List<FmsFollowupVo.FollowupQueueVO> queryAll(@Param("name") String name, List<FmsFollowupVo.FollowupQueueVO> queryAll(@Param("name") String name,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@ -44,13 +42,6 @@ public interface FmsFollowupDao {
@Param("haveQueue")Integer haveQueue, @Param("haveQueue")Integer haveQueue,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER)
List<FmsFollowupVo.FollowupPatient> queryTaskPatient(@Param("id") Long id,
@Param("taskFlag") Byte taskFlag,
@Param("haveQueue")Integer haveQueue,
@Param("tenantId") Long tenantId,
@Param("dataScore") String dataScore);
List<FmsFollowupVo.FollowupPatient> adminQueryPatient(@Param("id") Long id, List<FmsFollowupVo.FollowupPatient> adminQueryPatient(@Param("id") Long id,
@Param("taskFlag") Byte taskFlag, @Param("taskFlag") Byte taskFlag,
@Param("haveQueue")Integer haveQueue, @Param("haveQueue")Integer haveQueue,

6
acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/PmsTreatmentDao.java

@ -25,14 +25,14 @@ public interface PmsTreatmentDao {
List<PmsTreatmentVo.TreatmentRecord> selectRecord(@Param("treatmentId") Long treatmentId, List<PmsTreatmentVo.TreatmentRecord> selectRecord(@Param("treatmentId") Long treatmentId,
@Param("codeList") List<String> codeList); @Param("codeList") List<String> codeList);
@DataSource(DataSourceType.MASTER) // @DataSource(DataSourceType.MASTER)
List<PmsTreatmentVo.TreatmentRecord> adminSelectRecord(@Param("treatmentId") Long treatmentId, List<PmsTreatmentVo.TreatmentRecord> adminSelectRecord(@Param("treatmentId") Long treatmentId,
@Param("codeList") List<String> codeList); @Param("codeList") List<String> codeList);
// void batchInsert(@Param("pmsPatientList") List<PmsPatient> pmsPatientList); // void batchInsert(@Param("pmsPatientList") List<PmsPatient> pmsPatientList);
@DataSource(DataSourceType.MASTER) // @DataSource(DataSourceType.MASTER)
List<PmsTreatmentVo.TreatmentVO> adminQuery(@Param("query") PmsTreatmentDto.TreatmentQueryDTO query); List<PmsTreatmentVo.TreatmentVO> adminQuery(@Param("query") PmsTreatmentDto.TreatmentQueryDTO query);
@DataSource(DataSourceType.MASTER) // @DataSource(DataSourceType.MASTER)
PmsTreatmentVo.TreatmentRecordVO adminQueryTreatment(@Param("id") Long id); PmsTreatmentVo.TreatmentRecordVO adminQueryTreatment(@Param("id") Long id);
} }

4
acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/WxQrCodeDao.java

@ -9,7 +9,7 @@ import java.util.List;
public interface WxQrCodeDao { public interface WxQrCodeDao {
@DataSource(DataSourceType.MASTER) // @DataSource(DataSourceType.MASTER)
AmsWxQrCodeVo.Result queryById(@Param("id")Long id); AmsWxQrCodeVo.Result queryById(@Param("id")Long id);
/** /**
@ -28,7 +28,7 @@ public interface WxQrCodeDao {
@Param("userId") Long userId, @Param("userId") Long userId,
@Param("tenantId") Long tenantId); @Param("tenantId") Long tenantId);
@DataSource(DataSourceType.MASTER) // @DataSource(DataSourceType.MASTER)
List<AmsWxQrCodeVo.ScreenResult> adminSelectScreenList(@Param("hospitalIdList") List<Long> hospitalIdList); List<AmsWxQrCodeVo.ScreenResult> adminSelectScreenList(@Param("hospitalIdList") List<Long> hospitalIdList);

9
acupuncture-system/src/main/java/com/acupuncture/system/service/AdminFmsFollowupQueueService.java

@ -19,7 +19,7 @@ public interface AdminFmsFollowupQueueService {
* 查询公共队列 * 查询公共队列
* @return * @return
*/ */
@DataSource(DataSourceType.MASTER) // @DataSource(DataSourceType.MASTER)
List<FmsFollowupVo.FollowupQueueVO> queryCommonQueue(String name, Long tenantId); List<FmsFollowupVo.FollowupQueueVO> queryCommonQueue(String name, Long tenantId);
/** /**
@ -46,13 +46,6 @@ public interface AdminFmsFollowupQueueService {
@DataSource(DataSourceType.MASTER) @DataSource(DataSourceType.MASTER)
int delQueue(FmsFollowupDto.Del dto); int delQueue(FmsFollowupDto.Del dto);
/**
* 查询随访患者
* @param dto
* @return
*/
List<FmsFollowupVo.FollowupPatient> queryPatient(FmsFollowupDto.FollowupPatientQueryDTO dto);
/** /**
* 查询随访患者 * 查询随访患者
* @param dto * @param dto

8
acupuncture-system/src/main/java/com/acupuncture/system/service/FmsFollowupService.java

@ -51,14 +51,6 @@ public interface FmsFollowupService {
*/ */
List<FmsFollowupVo.FollowupPatient> queryPatient(FmsFollowupDto.FollowupPatientQueryDTO dto); List<FmsFollowupVo.FollowupPatient> queryPatient(FmsFollowupDto.FollowupPatientQueryDTO dto);
/**
* 查询随访患者
* @param dto
* @return
*/
@DataSource(DataSourceType.MASTER)
List<FmsFollowupVo.FollowupPatient> queryTaskPatient(FmsFollowupDto.FollowupPatientQueryDTO dto);
/** /**
* 更新随访患者 * 更新随访患者
* @param dto * @param dto

37
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/AdminFmsFollowupQueueServiceImpl.java

@ -40,7 +40,7 @@ public class AdminFmsFollowupQueueServiceImpl implements AdminFmsFollowupQueueSe
private FmsFollowupQueueMapper fmsFollowupQueueMapper; private FmsFollowupQueueMapper fmsFollowupQueueMapper;
@Override @Override
@DataSource(DataSourceType.MASTER) // @DataSource(DataSourceType.MASTER)
public List<FmsFollowupVo.FollowupQueueVO> queryCommonQueue(String name, Long tenantId) { public List<FmsFollowupVo.FollowupQueueVO> queryCommonQueue(String name, Long tenantId) {
return fmsFollowupDao.queryAll(name, tenantId); return fmsFollowupDao.queryAll(name, tenantId);
} }
@ -75,41 +75,6 @@ public class AdminFmsFollowupQueueServiceImpl implements AdminFmsFollowupQueueSe
return fmsFollowupQueueMapper.updateByExampleSelective(fmsFollowupQueue, fmsFollowupQueueExample); return fmsFollowupQueueMapper.updateByExampleSelective(fmsFollowupQueue, fmsFollowupQueueExample);
} }
@Override
public List<FmsFollowupVo.FollowupPatient> queryPatient(FmsFollowupDto.FollowupPatientQueryDTO dto) {
List<FmsFollowupVo.FollowupPatient> followupPatients = fmsFollowupDao.queryPatient(dto.getQueueId(), null, dto.getHaveQueue(), SecurityUtils.getTenantId());
if (CollectionUtil.isNotEmpty(followupPatients)) {
List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue");
for (FmsFollowupVo.FollowupPatient followupPatient : followupPatients) {
if (CollectionUtil.isNotEmpty(followupPatient.getQueueList())) {
List<PmsTreatmentVo.TreatmentVO.QueueVo> queueVos = fmsFollowupDao.adminQueryQueueListByPatientId(followupPatient.getPatientId());
List<FmsFollowupVo.FollowupPatient.QueueVo> queueVoList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(queueVos)) {
queueVoList = BeanUtil.copyToList(queueVos, FmsFollowupVo.FollowupPatient.QueueVo.class);
Map<Long, FmsFollowupVo.FollowupQueueVO> map = new HashMap<>();
if (CollectionUtil.isNotEmpty(commonFollowupQueue)) {
List<FmsFollowupVo.FollowupQueueVO> followupQueueVOS1 = BeanUtil.copyToList(commonFollowupQueue, FmsFollowupVo.FollowupQueueVO.class);
map = followupQueueVOS1.stream().collect(Collectors.toMap(FmsFollowupVo.FollowupQueueVO::getId, Function.identity()));
}
for (FmsFollowupVo.FollowupPatient.QueueVo queueVo : queueVoList) {
if (queueVo == null || queueVo.getQueueId() == null) {
continue;
}
FmsFollowupVo.FollowupQueueVO followupQueueVO = map.get(queueVo.getQueueId());
if (followupQueueVO != null) {
queueVo.setQueueName(followupQueueVO.getName());
}
}
}
followupPatient.setQueueList(queueVoList);
}
}
}
return followupPatients;
}
@Override @Override
public List<FmsFollowupVo.FollowupPatient> adminQueryPatient(FmsFollowupDto.FollowupPatientQueryDTO dto) { public List<FmsFollowupVo.FollowupPatient> adminQueryPatient(FmsFollowupDto.FollowupPatientQueryDTO dto) {
List<FmsFollowupVo.FollowupPatient> followupPatients = fmsFollowupDao.adminQueryPatient(dto.getQueueId(), null, dto.getHaveQueue(), dto.getTenantId()); List<FmsFollowupVo.FollowupPatient> followupPatients = fmsFollowupDao.adminQueryPatient(dto.getQueueId(), null, dto.getHaveQueue(), dto.getTenantId());

36
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/FmsFollowupServiceImpl.java

@ -131,42 +131,6 @@ public class FmsFollowupServiceImpl implements FmsFollowupService {
return followupPatients; return followupPatients;
} }
@Override
@DataSource(DataSourceType.MASTER)
public List<FmsFollowupVo.FollowupPatient> queryTaskPatient(FmsFollowupDto.FollowupPatientQueryDTO dto) {
List<FmsFollowupVo.FollowupPatient> followupPatients = fmsFollowupDao.queryTaskPatient(dto.getQueueId(), null, dto.getHaveQueue(), dto.getTenantId(), dto.getDataScore());
if (CollectionUtil.isNotEmpty(followupPatients)) {
List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue");
for (FmsFollowupVo.FollowupPatient followupPatient : followupPatients) {
if (CollectionUtil.isNotEmpty(followupPatient.getQueueList())) {
List<PmsTreatmentVo.TreatmentVO.QueueVo> queueVos = fmsFollowupDao.queryQueueListByPatientId(followupPatient.getPatientId());
List<FmsFollowupVo.FollowupPatient.QueueVo> queueVoList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(queueVos)) {
queueVoList = BeanUtil.copyToList(queueVos, FmsFollowupVo.FollowupPatient.QueueVo.class);
Map<Long, FmsFollowupVo.FollowupQueueVO> map = new HashMap<>();
if (CollectionUtil.isNotEmpty(commonFollowupQueue)) {
List<FmsFollowupVo.FollowupQueueVO> followupQueueVOS1 = BeanUtil.copyToList(commonFollowupQueue, FmsFollowupVo.FollowupQueueVO.class);
map = followupQueueVOS1.stream().collect(Collectors.toMap(FmsFollowupVo.FollowupQueueVO::getId, Function.identity()));
}
for (FmsFollowupVo.FollowupPatient.QueueVo queueVo : queueVoList) {
if (queueVo == null || queueVo.getQueueId() == null) {
continue;
}
FmsFollowupVo.FollowupQueueVO followupQueueVO = map.get(queueVo.getQueueId());
if (followupQueueVO != null) {
queueVo.setQueueName(followupQueueVO.getName());
}
}
}
followupPatient.setQueueList(queueVoList);
}
}
}
return followupPatients;
}
@Override @Override
public Integer updPatient(FmsFollowupDto.UpdPatient dto) { public Integer updPatient(FmsFollowupDto.UpdPatient dto) {
FmsPatientQueueRelationExample fmsPatientQueueRelationExample = new FmsPatientQueueRelationExample(); FmsPatientQueueRelationExample fmsPatientQueueRelationExample = new FmsPatientQueueRelationExample();

Loading…
Cancel
Save