|
|
@ -82,21 +82,11 @@ public class ScreeningController { |
|
|
|
@RequestMapping(value = "/createNoToken", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse<QuestionnaireVo.DetailInfo> createNoToken(@ApiParam @Validated @RequestBody BaseDto<ScreeningDto.CreateDetail> params) throws Exception { |
|
|
|
log.info("创建筛查详情{}", params); |
|
|
|
// changeDataSource(params.getParam().getTenantId());
|
|
|
|
QuestionnaireVo.DetailInfo detailInfo = screeningService.createDetail(params.getParam(), params.getParam().getUserId(), params.getParam().getTenantId()); |
|
|
|
log.info("创建筛查详情结束"); |
|
|
|
return JsonResponse.ok(detailInfo); |
|
|
|
} |
|
|
|
|
|
|
|
private void changeDataSource(Long tenantId) { |
|
|
|
DmsTenant dmsTenant = dmsTenantMapper.selectByPrimaryKey(tenantId); |
|
|
|
if (dmsTenant != null) { |
|
|
|
UmsDataSource umsDataSource = umsDataSourceMapper.selectByPrimaryKey(dmsTenant.getDataSourceId()); |
|
|
|
if (umsDataSource != null) { |
|
|
|
DynamicDataSourceContextHolder.setDataSourceType(umsDataSource.getDataSourceKey()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "提交筛查", notes = "") |
|
|
|
@RequestMapping(value = "/submit", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
@ -111,7 +101,6 @@ public class ScreeningController { |
|
|
|
@RequestMapping(value = "/submitNoToken", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse submitNoToken(@ApiParam @Validated @RequestBody BaseDto<ScreeningDto.SubmitScreeningQuestionnaire> params) throws Exception { |
|
|
|
log.info("提交筛查开始{}", params); |
|
|
|
// changeDataSource(params.getParam().getTenantId());
|
|
|
|
screeningService.submitQuestionnaire(params.getParam(), 0L); |
|
|
|
return JsonResponse.ok(); |
|
|
|
} |
|
|
@ -121,7 +110,6 @@ public class ScreeningController { |
|
|
|
@RequestMapping(value = "/save", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse saveQuestionnaire(@ApiParam @Validated @RequestBody BaseDto<ScreeningDto.SaveQuestionnaire> params) throws Exception { |
|
|
|
log.info("保存调查筛查开始{}", params); |
|
|
|
// changeDataSource(params.getParam().getTenantId());
|
|
|
|
screeningService.saveQuestionnaire(params.getParam(), params.getParam().getUserId()); |
|
|
|
log.info("保存调查筛查结束"); |
|
|
|
return JsonResponse.ok(); |
|
|
|