1747191978@qq.com 3 months ago
parent
commit
79d3eebb0d
  1. 12
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/AdminPmsTreatmentController.java
  2. 43
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/ExternalController.java
  3. 24
      acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/ScreeningController.java
  4. 16
      acupuncture-admin/src/main/java/com/acupuncture/web/task/TaskController.java
  5. 2
      acupuncture-common/src/main/java/com/acupuncture/common/constant/UserConstants.java
  6. 15
      acupuncture-framework/src/main/java/com/acupuncture/framework/aspectj/AdminGlobalDataSourceAspect.java
  7. 2
      acupuncture-framework/src/main/java/com/acupuncture/framework/config/SecurityConfig.java
  8. 2
      acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/AdminTenantUserDto.java
  9. 2
      acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/ExternalDto.java
  10. 2
      acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/FmsFollowupDto.java
  11. 2
      acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/ScreeningDto.java
  12. 29
      acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/PmsTreatmentVo.java
  13. 1
      acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/PmsTreatmentDao.java
  14. 40
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ExternalServiceImpl.java
  15. 49
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/PmsTreatmentServiceImpl.java
  16. 139
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ScreeningServiceImpl.java
  17. 3
      acupuncture-system/src/main/resources/mapper/dao/AdminDmsUserDao.xml
  18. 3
      acupuncture-system/src/main/resources/mapper/dao/ScreeningDetailDao.xml

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

@ -85,14 +85,14 @@ public class AdminPmsTreatmentController {
DynamicDataSourceContextHolder.setDataSourceType(dataSourceKey); DynamicDataSourceContextHolder.setDataSourceType(dataSourceKey);
} }
@ApiOperation("导出诊疗档案评估报告") // @ApiOperation("导出诊疗档案评估报告")
@PostMapping("/exportTreatmentPg") // @PostMapping("/exportTreatmentPg")
public JsonResponse<String> exportTreatmentPg(HttpServletResponse response, @RequestBody @Validated PmsTreatmentDto.ExportVO dto){ // public JsonResponse<String> exportTreatmentPg(HttpServletResponse response, @RequestBody @Validated PmsTreatmentDto.ExportVO dto){
return JsonResponse.ok(treatmentService.exportTreatmentPg(response, dto)); // return JsonResponse.ok(treatmentService.exportTreatmentPg(response, dto));
} // }
@ApiOperation("后台导出诊疗档案评估报告") @ApiOperation("后台导出诊疗档案评估报告")
@PostMapping("/admin/exportTreatmentPg") @PostMapping("/exportTreatmentPg")
public JsonResponse<String> adminExportTreatmentPg(HttpServletResponse response, @RequestBody @Validated PmsTreatmentDto.ExportVO dto){ public JsonResponse<String> adminExportTreatmentPg(HttpServletResponse response, @RequestBody @Validated PmsTreatmentDto.ExportVO dto){
return JsonResponse.ok(treatmentService.adminExportTreatmentPg(response, dto)); return JsonResponse.ok(treatmentService.adminExportTreatmentPg(response, dto));
} }

43
acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/ExternalController.java

@ -1,8 +1,10 @@
package com.acupuncture.web.controller.web; package com.acupuncture.web.controller.web;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONArray;
import com.acupuncture.common.annotation.Anonymous; import com.acupuncture.common.annotation.Anonymous;
import com.acupuncture.common.config.RuoYiConfig; import com.acupuncture.common.config.RuoYiConfig;
import com.acupuncture.common.core.domain.AjaxResult; import com.acupuncture.common.core.domain.AjaxResult;
@ -35,6 +37,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -103,24 +106,28 @@ public class ExternalController {
// return "upload ok"; // return "upload ok";
// } // }
// @Anonymous @Anonymous
// @ApiOperation("上传数据") @ApiOperation("上传数据")
// @PostMapping("/http/uploadMemberInfo") @PostMapping("/http/uploadMemberInfo")
// public Object add(@RequestBody String str){ public Object add(@RequestBody String str){
// JsonArray jsonValues = new JsonArray();
// JSONArray objects = new JSONArray(str);
// log.info("上传数据dto123:{}",list); List<ExternalDto.RtcfInfoDto> list = new ArrayList<>();
//// List<ExternalDto.RtcfInfoDto> list = dto.getList(); for (Object object : objects) {
// int add = 0; list.add(BeanUtil.copyProperties(object, ExternalDto.RtcfInfoDto.class));
// for (ExternalDto.RtcfInfoDto rtcfInfoDto : list) { }
// checkoutData(rtcfInfoDto.getUUID()); log.info("上传数据dto123:{}",list);
// add += externalService.add(rtcfInfoDto); // List<ExternalDto.RtcfInfoDto> list = dto.getList();
// } int add = 0;
// if (add == 0) { for (ExternalDto.RtcfInfoDto rtcfInfoDto : list) {
// return "upload fail"; checkoutData(rtcfInfoDto.getUUID());
// } add += externalService.add(rtcfInfoDto);
// return "upload ok"; }
// } if (add == 0) {
return "upload fail";
}
return "upload ok";
}
@Anonymous @Anonymous
@ApiOperation("上传数据") @ApiOperation("上传数据")

24
acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/ScreeningController.java

@ -7,9 +7,14 @@ import com.acupuncture.common.annotation.Anonymous;
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.utils.SecurityUtils; import com.acupuncture.common.utils.SecurityUtils;
import com.acupuncture.framework.datasource.DynamicDataSourceContextHolder;
import com.acupuncture.system.domain.dto.ScreeningDto; import com.acupuncture.system.domain.dto.ScreeningDto;
import com.acupuncture.system.domain.po.DmsTenant;
import com.acupuncture.system.domain.po.UmsDataSource;
import com.acupuncture.system.domain.vo.QuestionnaireVo; import com.acupuncture.system.domain.vo.QuestionnaireVo;
import com.acupuncture.system.domain.vo.ScrScreenVo; import com.acupuncture.system.domain.vo.ScrScreenVo;
import com.acupuncture.system.persist.mapper.DmsTenantMapper;
import com.acupuncture.system.persist.mapper.UmsDataSourceMapper;
import com.acupuncture.system.service.IScreeningService; import com.acupuncture.system.service.IScreeningService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@ -36,6 +41,11 @@ import java.util.List;
public class ScreeningController { public class ScreeningController {
@Resource @Resource
private IScreeningService screeningService; private IScreeningService screeningService;
@Resource
private DmsTenantMapper dmsTenantMapper;
@Resource
private UmsDataSourceMapper umsDataSourceMapper;
@ApiOperation(value = "查询筛查列表", notes = "原:查询医院是否填写了调查筛查") @ApiOperation(value = "查询筛查列表", notes = "原:查询医院是否填写了调查筛查")
@RequestMapping(value = "/queryDetail", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "/queryDetail", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@ -72,11 +82,22 @@ public class ScreeningController {
@RequestMapping(value = "/createNoToken", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @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 { public JsonResponse<QuestionnaireVo.DetailInfo> createNoToken(@ApiParam @Validated @RequestBody BaseDto<ScreeningDto.CreateDetail> params) throws Exception {
log.info("创建筛查详情{}", params); log.info("创建筛查详情{}", params);
// changeDataSource(params.getParam().getTenantId());
QuestionnaireVo.DetailInfo detailInfo = screeningService.createDetail(params.getParam(), params.getParam().getUserId(), params.getParam().getTenantId()); QuestionnaireVo.DetailInfo detailInfo = screeningService.createDetail(params.getParam(), params.getParam().getUserId(), params.getParam().getTenantId());
log.info("创建筛查详情结束"); log.info("创建筛查详情结束");
return JsonResponse.ok(detailInfo); 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 = "") @ApiOperation(value = "提交筛查", notes = "")
@RequestMapping(value = "/submit", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "/submit", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse submitQuestionnaire(@ApiParam @Validated @RequestBody BaseDto<ScreeningDto.SubmitScreeningQuestionnaire> params) throws Exception { public JsonResponse submitQuestionnaire(@ApiParam @Validated @RequestBody BaseDto<ScreeningDto.SubmitScreeningQuestionnaire> params) throws Exception {
@ -90,16 +111,17 @@ public class ScreeningController {
@RequestMapping(value = "/submitNoToken", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "/submitNoToken", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse submitNoToken(@ApiParam @Validated @RequestBody BaseDto<ScreeningDto.SubmitScreeningQuestionnaire> params) throws Exception { public JsonResponse submitNoToken(@ApiParam @Validated @RequestBody BaseDto<ScreeningDto.SubmitScreeningQuestionnaire> params) throws Exception {
log.info("提交筛查开始{}", params); log.info("提交筛查开始{}", params);
// changeDataSource(params.getParam().getTenantId());
screeningService.submitQuestionnaire(params.getParam(), 0L); screeningService.submitQuestionnaire(params.getParam(), 0L);
return JsonResponse.ok(); return JsonResponse.ok();
} }
@Anonymous @Anonymous
@ApiOperation(value = "保存调查筛查**", notes = "") @ApiOperation(value = "保存调查筛查**", notes = "")
@RequestMapping(value = "/save", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "/save", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse saveQuestionnaire(@ApiParam @Validated @RequestBody BaseDto<ScreeningDto.SaveQuestionnaire> params) throws Exception { public JsonResponse saveQuestionnaire(@ApiParam @Validated @RequestBody BaseDto<ScreeningDto.SaveQuestionnaire> params) throws Exception {
log.info("保存调查筛查开始{}", params); log.info("保存调查筛查开始{}", params);
// changeDataSource(params.getParam().getTenantId());
screeningService.saveQuestionnaire(params.getParam(), params.getParam().getUserId()); screeningService.saveQuestionnaire(params.getParam(), params.getParam().getUserId());
log.info("保存调查筛查结束"); log.info("保存调查筛查结束");
return JsonResponse.ok(); return JsonResponse.ok();

16
acupuncture-admin/src/main/java/com/acupuncture/web/task/TaskController.java

@ -17,6 +17,7 @@ import com.acupuncture.system.persist.dao.FmsFollowupDao;
import com.acupuncture.system.persist.dao.UmsDataSourceDao; import com.acupuncture.system.persist.dao.UmsDataSourceDao;
import com.acupuncture.system.persist.mapper.FmsFollowupTaskMapper; import com.acupuncture.system.persist.mapper.FmsFollowupTaskMapper;
import com.acupuncture.system.persist.mapper.FmsPatientQueueRelationMapper; import com.acupuncture.system.persist.mapper.FmsPatientQueueRelationMapper;
import com.acupuncture.system.service.FmsFollowupQueueService;
import com.acupuncture.system.service.FmsFollowupService; import com.acupuncture.system.service.FmsFollowupService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -60,6 +61,8 @@ public class TaskController {
private FmsPatientQueueRelationMapper fmsPatientQueueRelationMapper; private FmsPatientQueueRelationMapper fmsPatientQueueRelationMapper;
@Resource @Resource
private RedisCache redisCache; private RedisCache redisCache;
@Resource
private FmsFollowupQueueService fmsFollowupQueueService;
@ApiOperation("定时任务添加随访工单") @ApiOperation("定时任务添加随访工单")
@PostMapping("/task") @PostMapping("/task")
@ -78,10 +81,14 @@ public class TaskController {
} }
//查询公共队列 //查询公共队列
List<Object> queueResults = redisCache.getCacheList("common_followup_queue"); List<Object> queueResults = redisCache.getCacheList("common_followup_queue");
List<FmsFollowupVo.FollowupQueueVO> followupQueueVOS = new ArrayList<>();
if (CollectionUtil.isEmpty(queueResults)) {
followupQueueVOS = fmsFollowupQueueService.queryCommonQueue(null);
}
// List<FmsFollowupVo.FollowupQueueVO> queueResults = fmsFollowupDao.queryCommonQueue(null); // List<FmsFollowupVo.FollowupQueueVO> queueResults = fmsFollowupDao.queryCommonQueue(null);
//切换数据源 //切换数据源
for (UmsDataSourceVo.Result result : query) { for (UmsDataSourceVo.Result result : query) {
if ("MASTER".equals(result.getDataSourceKey())) { if ("MASTER".equals(result.getDataSourceKey()) || "SXYFYY".equals(result.getDataSourceKey())) {
continue; continue;
} }
changeDataSource(result); changeDataSource(result);
@ -92,11 +99,11 @@ public class TaskController {
if (CollectionUtil.isEmpty(queueList)) { if (CollectionUtil.isEmpty(queueList)) {
if (CollectionUtil.isEmpty(queueResults)) { if (CollectionUtil.isEmpty(queueResults)) {
queueList = BeanUtil.copyToList(queueResults, FmsFollowupVo.FollowupQueueVO.class); queueList = followupQueueVOS;
} }
} else { } else {
if (CollectionUtil.isEmpty(queueResults)) { if (CollectionUtil.isEmpty(queueResults)) {
queueList.addAll(BeanUtil.copyToList(queueResults, FmsFollowupVo.FollowupQueueVO.class)); queueList.addAll(followupQueueVOS);
} }
} }
for (FmsFollowupVo.FollowupQueueVO followupQueueVO : queueList) { for (FmsFollowupVo.FollowupQueueVO followupQueueVO : queueList) {
@ -106,6 +113,9 @@ public class TaskController {
// changeDataSource(result); // changeDataSource(result);
FmsFollowupDto.FollowupPatientQueryDTO followupPatientQueryDTO = new FmsFollowupDto.FollowupPatientQueryDTO(); FmsFollowupDto.FollowupPatientQueryDTO followupPatientQueryDTO = new FmsFollowupDto.FollowupPatientQueryDTO();
followupPatientQueryDTO.setQueueId(followupQueueVO.getId()); followupPatientQueryDTO.setQueueId(followupQueueVO.getId());
followupPatientQueryDTO.setTenantId(followupQueueVO.getTenantId());
changeDataSource(result);
List<FmsFollowupVo.FollowupPatient> patientList = fmsFollowupService.queryPatient(followupPatientQueryDTO); List<FmsFollowupVo.FollowupPatient> patientList = fmsFollowupService.queryPatient(followupPatientQueryDTO);
// List<FmsFollowupVo.FollowupPatient> patientList = fmsFollowupDao.queryPatient(followupQueueVO.getId(), null, null); // List<FmsFollowupVo.FollowupPatient> patientList = fmsFollowupDao.queryPatient(followupQueueVO.getId(), null, null);
if (CollectionUtil.isEmpty(patientList)) { if (CollectionUtil.isEmpty(patientList)) {

2
acupuncture-common/src/main/java/com/acupuncture/common/constant/UserConstants.java

@ -81,6 +81,8 @@ public class UserConstants
public static final String HEADER_KEY_TOKEN = "Authorization"; public static final String HEADER_KEY_TOKEN = "Authorization";
public static final String DEPT = "TENANT_ID";
/** /**
* QuestionAnswer分隔符 * QuestionAnswer分隔符
*/ */

15
acupuncture-framework/src/main/java/com/acupuncture/framework/aspectj/AdminGlobalDataSourceAspect.java

@ -70,17 +70,22 @@ public class AdminGlobalDataSourceAspect {
// 获取请求携带的令牌 // 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes) HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest(); RequestContextHolder.getRequestAttributes()).getRequest();
String authHeader = request.getHeader(UserConstants.HEADER_KEY_TOKEN);
//token为空 //token为空
Long tenantId;
String header = request.getHeader(UserConstants.DEPT);
if(StrUtil.isNotEmpty(header)){
tenantId = Long.parseLong(header);
}else {
// String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
String authHeader = request.getHeader(UserConstants.HEADER_KEY_TOKEN);
if (StrUtil.isEmpty(authHeader)) { if (StrUtil.isEmpty(authHeader)) {
return null; return null;
} }
// String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID); tenantId = SecurityUtils.getTenantId();
Long tenantId = SecurityUtils.getTenantId();
if (tenantId == null) { if (tenantId == null) {
return null; return null;
} }
}
//设置所属医院和数据源 //设置所属医院和数据源
// SecurityUtils.setCurrentHospitalId(Long.parseLong(deptId)); // SecurityUtils.setCurrentHospitalId(Long.parseLong(deptId));
@ -90,7 +95,7 @@ public class AdminGlobalDataSourceAspect {
// if(ObjectUtil.isNull(loginUser) || loginUser.getUser().isAdmin()){ // if(ObjectUtil.isNull(loginUser) || loginUser.getUser().isAdmin()){
// return null; // return null;
// } // }
//根据部门ID查询数据源 //根据组织ID查询数据源
UmsDataSource dataSource = dmsLoginService.getDataSourceByTenantId(tenantId); UmsDataSource dataSource = dmsLoginService.getDataSourceByTenantId(tenantId);
if (dataSource == null) { if (dataSource == null) {
throw new BaseException(DATASOURCE_NOT_FOUND); throw new BaseException(DATASOURCE_NOT_FOUND);

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").permitAll() requests.antMatchers("/login", "/register", "/captchaImage", "/web/login", "/web/queryTenantById", "/api/http/getUserInfo", "/api/http/addReportImage", "/api/http/uploadMemberInfo", "/task/task").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()

2
acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/AdminTenantUserDto.java

@ -71,6 +71,8 @@ public class AdminTenantUserDto {
@Data @Data
public static class Query { public static class Query {
private Long tenantId; private Long tenantId;
private String tenantName;
} }
} }

2
acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/ExternalDto.java

@ -2,6 +2,7 @@ package com.acupuncture.system.domain.dto;
import com.acupuncture.system.domain.po.UplReportImage; import com.acupuncture.system.domain.po.UplReportImage;
import com.acupuncture.system.domain.po.UplRtcfInfo; import com.acupuncture.system.domain.po.UplRtcfInfo;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import lombok.Data; import lombok.Data;
@ -34,6 +35,7 @@ public class ExternalDto {
private String message; private String message;
@JsonProperty(value = "UUID")
private String UUID; private String UUID;
private String deviceID; private String deviceID;

2
acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/FmsFollowupDto.java

@ -107,6 +107,8 @@ public class FmsFollowupDto {
private Integer educationYears; private Integer educationYears;
private Date dischargeTime;
private String phone; private String phone;
private Byte idCardType; private Byte idCardType;

2
acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/ScreeningDto.java

@ -183,6 +183,7 @@ public class ScreeningDto {
@NotNull(message = "问卷详情id不能为空") @NotNull(message = "问卷详情id不能为空")
@ApiModelProperty("问卷详情id") @ApiModelProperty("问卷详情id")
private Long detailId; private Long detailId;
private Long tenantId;
} }
@Data @Data
@ -229,6 +230,7 @@ public class ScreeningDto {
@ApiModelProperty("答案") @ApiModelProperty("答案")
private String answer; private String answer;
private Long userId; private Long userId;
private Long tenantId;
} }
@Data @Data

29
acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/PmsTreatmentVo.java

@ -65,25 +65,51 @@ public class PmsTreatmentVo {
@Data @Data
public static class TreatmentRecordVO { public static class TreatmentRecordVO {
private Long id; private Long id;
private Long treatmentId;
private Long patientId;
private String name; private String name;
private String pinyinFull;
private String pinyinSimple;
private Byte gender; private Byte gender;
private Integer age; private Integer age;
private Date birthDate; private Date birthDate;
private String ethnicity; private String ethnicity;
private Integer educationYears; private Integer educationYears;
private String phone; private String phone;
private Byte idCardType; private Byte idCardType;
private String idCard; private String idCard;
private Byte visitType; private Byte visitType;
private String visitNumber; private String visitNumber;
private Date visitTime; private Date visitTime;
private Date dischargeTime; private Date dischargeTime;
private String doctor; private String doctor;
private String deptName; private String deptName;
private String diagnosisCode; private String diagnosisCode;
private String diagnosisName; private String diagnosisName;
private Byte status; private Byte status;
private Long treatmentId;
private Long organizationId; private Long organizationId;
@ApiModelProperty("生效的code和答案字典") @ApiModelProperty("生效的code和答案字典")
private Map<String, TreatmentRecord> validRecordValDict; private Map<String, TreatmentRecord> validRecordValDict;
@ -118,7 +144,6 @@ public class PmsTreatmentVo {
this.diagnosisName = pmsTreatment.getDiagnosisName(); this.diagnosisName = pmsTreatment.getDiagnosisName();
this.status = pmsTreatment.getStatus(); this.status = pmsTreatment.getStatus();
this.organizationId = pmsTreatment.getTenantId(); this.organizationId = pmsTreatment.getTenantId();
} }
} }

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

@ -33,5 +33,6 @@ public interface PmsTreatmentDao {
@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)
PmsTreatmentVo.TreatmentRecordVO adminQueryTreatment(@Param("id") Long id); PmsTreatmentVo.TreatmentRecordVO adminQueryTreatment(@Param("id") Long id);
} }

40
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ExternalServiceImpl.java

@ -53,7 +53,7 @@ public class ExternalServiceImpl implements ExternalService {
uplRtcfInfos.setId(IdUtil.getSnowflakeNextId()); uplRtcfInfos.setId(IdUtil.getSnowflakeNextId());
uplRtcfInfos.setCreateTime(new Date()); uplRtcfInfos.setCreateTime(new Date());
uplRtcfInfos.setDelFlag((byte) 0); uplRtcfInfos.setDelFlag((byte) 0);
uplRtcfInfos.setUuid(rtcfInfoDto.getUUID());
uplRtcfInfos.setAsmi(rtcfInfoDto.getASMI()); uplRtcfInfos.setAsmi(rtcfInfoDto.getASMI());
uplRtcfInfos.setBmi(rtcfInfoDto.getBMI()); uplRtcfInfos.setBmi(rtcfInfoDto.getBMI());
uplRtcfInfos.setDeviceId(rtcfInfoDto.getDeviceID()); uplRtcfInfos.setDeviceId(rtcfInfoDto.getDeviceID());
@ -100,6 +100,44 @@ public class ExternalServiceImpl implements ExternalService {
uplRtcfInfos.setRlFat(rtcfInfoDto.getRL_fat()); uplRtcfInfos.setRlFat(rtcfInfoDto.getRL_fat());
uplRtcfInfos.setTrWater(rtcfInfoDto.getTR_water()); uplRtcfInfos.setTrWater(rtcfInfoDto.getTR_water());
uplRtcfInfos.setLaWater(rtcfInfoDto.getLA_water()); uplRtcfInfos.setLaWater(rtcfInfoDto.getLA_water());
uplRtcfInfos.setBoneMax(rtcfInfoDto.getBoneMax());
uplRtcfInfos.setBoneMin(rtcfInfoDto.getBoneMin());
uplRtcfInfos.setBone(rtcfInfoDto.getBone());
uplRtcfInfos.setProtein(rtcfInfoDto.getProtein());
uplRtcfInfos.setWater(rtcfInfoDto.getWater());
uplRtcfInfos.setIcw(rtcfInfoDto.getICW());
uplRtcfInfos.setEcw(rtcfInfoDto.getECW());
uplRtcfInfos.setMuscleControl(rtcfInfoDto.getMuscle_control());
uplRtcfInfos.setRaWater(rtcfInfoDto.getRA_water());
uplRtcfInfos.setRlWater(rtcfInfoDto.getRL_water());
uplRtcfInfos.setLaMuscle(rtcfInfoDto.getLA_muscle());
uplRtcfInfos.setTrMuscle(rtcfInfoDto.getTR_muscle());
uplRtcfInfos.setRaMuscle(rtcfInfoDto.getRA_muscle());
uplRtcfInfos.setRlMuscle(rtcfInfoDto.getRL_muscle());
uplRtcfInfos.setTrBone(rtcfInfoDto.getTR_bone());
uplRtcfInfos.setLaBone(rtcfInfoDto.getLA_bone());
uplRtcfInfos.setRaBone(rtcfInfoDto.getRA_bone());
uplRtcfInfos.setRlBone(rtcfInfoDto.getRL_bone());
uplRtcfInfos.setBoneMin(rtcfInfoDto.getBoneMin());
uplRtcfInfos.setBoneMax(rtcfInfoDto.getBoneMax());
uplRtcfInfos.setVfiMax(rtcfInfoDto.getVFIMax());
uplRtcfInfos.setVfiMin(rtcfInfoDto.getVFIMin());
uplRtcfInfos.setWhr(rtcfInfoDto.getWHR());
uplRtcfInfos.setWhrMax(rtcfInfoDto.getWHRMax());
uplRtcfInfos.setWhrMin(rtcfInfoDto.getWHRMin());
uplRtcfInfos.setEdemaMax(rtcfInfoDto.getEdemaMax());
uplRtcfInfos.setEdemaMin(rtcfInfoDto.getEdemaMin());
uplRtcfInfos.setEdema(rtcfInfoDto.getEdema());
uplRtcfInfos.setProteinMax(rtcfInfoDto.getProteinMax());
uplRtcfInfos.setProteinMin(rtcfInfoDto.getProteinMin());
uplRtcfInfos.setWaterMax(rtcfInfoDto.getWaterMax());
uplRtcfInfos.setWaterMin(rtcfInfoDto.getWaterMin());
uplRtcfInfos.setMuscleMax(rtcfInfoDto.getMuscleMax());
uplRtcfInfos.setWaterMin(rtcfInfoDto.getWaterMin());
uplRtcfInfos.setSmmMax(rtcfInfoDto.getSMMMax());
uplRtcfInfos.setSmmMin(rtcfInfoDto.getSMMMin());
uplRtcfInfos.setBmiMax(rtcfInfoDto.getBMIMax());
uplRtcfInfos.setBmiMin(rtcfInfoDto.getBMIMin());
int insert = uplRtcfInfoMapper.insert(uplRtcfInfos); int insert = uplRtcfInfoMapper.insert(uplRtcfInfos);
if (insert > 0) { if (insert > 0) {

49
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/PmsTreatmentServiceImpl.java

@ -284,6 +284,7 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
patientQueueRelation.setId(IdUtil.getSnowflakeNextId()); patientQueueRelation.setId(IdUtil.getSnowflakeNextId());
patientQueueRelation.setDelFlag((byte) 0); patientQueueRelation.setDelFlag((byte) 0);
patientQueueRelation.setIdCard(pmsTreatment.getIdCard()); patientQueueRelation.setIdCard(pmsTreatment.getIdCard());
patientQueueRelation.setDischargeTime(pmsTreatment.getDischargeTime());
patientQueueRelation.setIdCardType(pmsTreatment.getIdCardType().byteValue()); patientQueueRelation.setIdCardType(pmsTreatment.getIdCardType().byteValue());
patientQueueRelation.setCreateBy(SecurityUtils.getUsername()); patientQueueRelation.setCreateBy(SecurityUtils.getUsername());
patientQueueRelation.setPatientId(pmsTreatment.getPatientId()); patientQueueRelation.setPatientId(pmsTreatment.getPatientId());
@ -298,6 +299,7 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
patientQueueRelation.setIdCard(pmsTreatment.getIdCard()); patientQueueRelation.setIdCard(pmsTreatment.getIdCard());
patientQueueRelation.setIdCardType(pmsTreatment.getIdCardType().byteValue()); patientQueueRelation.setIdCardType(pmsTreatment.getIdCardType().byteValue());
patientQueueRelation.setCreateBy(SecurityUtils.getUsername()); patientQueueRelation.setCreateBy(SecurityUtils.getUsername());
patientQueueRelation.setDischargeTime(pmsTreatment.getDischargeTime());
patientQueueRelation.setPatientId(pmsTreatment.getPatientId()); patientQueueRelation.setPatientId(pmsTreatment.getPatientId());
patientQueueRelation.setQueueId(null); patientQueueRelation.setQueueId(null);
patientQueueRelation.setCreateTime(new Date()); patientQueueRelation.setCreateTime(new Date());
@ -345,8 +347,51 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
} else { } else {
recordVoMap = MapUtil.newHashMap(); recordVoMap = MapUtil.newHashMap();
} }
treatmentRecordVO.setRecordValDict(recordVoMap);
//查询公共队列
List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue");
PmsTreatmentRecordExample pmsTreatmentRecordExample = new PmsTreatmentRecordExample();
pmsTreatmentRecordExample.createCriteria().andDelFlagEqualTo((byte) 0).andQuestionCodeEqualTo("JBXX_ZYZD").andTreatmentIdEqualTo(pmsTreatment.getId());
List<PmsTreatmentRecord> pmsTreatmentRecords = pmsTreatmentRecordMapper.selectByExample(pmsTreatmentRecordExample);
if (CollectionUtil.isNotEmpty(pmsTreatmentRecords)) {
String answer = pmsTreatmentRecords.get(0).getAnswer();
if (StrUtil.isNotEmpty(answer)) {
pmsTreatment.setDiagnosisName(answer.replace("!@#", ","));
}
}
List<PmsTreatmentVo.TreatmentVO.QueueVo> queueVos = fmsFollowupDao.queryQueueListByPatientId(pmsTreatment.getPatientId());
if (CollectionUtil.isNotEmpty(queueVos)) {
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()));
}
List<PmsTreatmentVo.TreatmentVO.QueueVo> list = new ArrayList<>();
for (PmsTreatmentVo.TreatmentVO.QueueVo queueVo : queueVos) {
if (queueVo == null || queueVo.getQueueId() == null) {
list.add(queueVo);
continue;
}
FmsFollowupVo.FollowupQueueVO followupQueueVO = map.get(queueVo.getQueueId());
if (followupQueueVO != null) {
queueVo.setQueueName(followupQueueVO.getName());
}
}
queueVos.removeAll(list);
}
PmsTreatmentVo.TreatmentRecord treatmentRecord = new PmsTreatmentVo.TreatmentRecord();
List<String> queueIdList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(queueVos)) {
for (PmsTreatmentVo.TreatmentVO.QueueVo vo : queueVos) {
queueIdList.add(vo.getQueueId() + "");
}
}
treatmentRecord.setValid(true);
treatmentRecord.setAnswerString(queueIdList.stream().collect(Collectors.joining("!@#")));
treatmentRecord.setQuestionCode("SFDL");
recordVoMap.put("SFDL", CollectionUtil.newArrayList(treatmentRecord));
treatmentRecordVO.setRecordValDict(recordVoMap);
return treatmentRecordVO; return treatmentRecordVO;
} }
@ -565,7 +610,7 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService {
if (StrUtil.isNotEmpty(idcard) && IdcardUtil.isValidCard(idcard)) { if (StrUtil.isNotEmpty(idcard) && IdcardUtil.isValidCard(idcard)) {
dto.setBirthDate(IdcardUtil.getBirthDate(idcard)); dto.setBirthDate(IdcardUtil.getBirthDate(idcard));
} }
dto.setIdCardType(rowList.get(7).toString().trim().equals("身份证") ? 0 : rowList.get(7).toString().trim().equals("护照或外国人永居证") ? 1 : rowList.get(7).toString().trim().equals("港澳居民来往内地通行证") ? 2 : rowList.get(7).toString().trim().equals("台湾居民来往大陆通行证") ? 3 : 4); // dto.setIdCardType(rowList.get(7).toString().trim().equals("身份证") ? 0 : rowList.get(7).toString().trim().equals("护照或外国人永居证") ? 1 : rowList.get(7).toString().trim().equals("港澳居民来往内地通行证") ? 2 : rowList.get(7).toString().trim().equals("台湾居民来往大陆通行证") ? 3 : 4);
dto.setIdCard(idcard); dto.setIdCard(idcard);
dto.setVisitType(rowList.get(9).toString().trim().equals("门诊") ? 0 : 1); dto.setVisitType(rowList.get(9).toString().trim().equals("门诊") ? 0 : 1);
dto.setVisitNumber(rowList.get(10).toString()); dto.setVisitNumber(rowList.get(10).toString());

139
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/ScreeningServiceImpl.java

@ -87,23 +87,20 @@ public class ScreeningServiceImpl implements IScreeningService {
List<String> headerList = CollectionUtil.newArrayList( List<String> headerList = CollectionUtil.newArrayList(
"姓名", "姓名",
"性别", "性别",
"年龄",
"身份证",
"出生日期", "出生日期",
"手机号", "年龄",
"有高血压,>=140/90mmHg", // "身份证",
"血脂异常,或不清楚", "联系方式",
"有糖尿病", "身高",
"心跳不规则", "体重",
"吸烟", "BMI",
"明显超重或肥胖", "体重自评结论",
"缺乏运动", "失眠自评(SRSS)得分",
"有卒中家族史", "可接受的治疗方式",
"有既往脑卒中病史", "可接受的治疗周期",
"有既往短暂脑缺血病史", "筛查时间",
"筛查结果", "组织"
"数据来源", );
"科室名称");
excelWriter.writeHeadRow(headerList); excelWriter.writeHeadRow(headerList);
PageInfo<ScrScreenVo.Result> page = queryDetailByPage(param, -1, -1); PageInfo<ScrScreenVo.Result> page = queryDetailByPage(param, -1, -1);
@ -124,55 +121,66 @@ public class ScreeningServiceImpl implements IScreeningService {
row += 1; row += 1;
excelWriter.writeCellValue(0, row, detailVos.get(i).getName() + ""); excelWriter.writeCellValue(0, row, detailVos.get(i).getName() + "");
excelWriter.writeCellValue(1, row, map.get("SCWJ-SEX") == null ? "未知" : map.get("SCWJ-SEX").getAnswer()); excelWriter.writeCellValue(1, row, map.get("SCWJ-SEX") == null ? "未知" : map.get("SCWJ-SEX").getAnswer());
excelWriter.writeCellValue(2, row, map.get("SCWJ-AGE") == null ? "" : map.get("SCWJ-AGE").getAnswer()); // excelWriter.writeCellValue(3, row, map.get("SCWJ-idCard") == null ? "" : map.get("SCWJ-idCard").getAnswer());
excelWriter.writeCellValue(3, row, map.get("SCWJ-idCard") == null ? "" : map.get("SCWJ-idCard").getAnswer()); excelWriter.writeCellValue(2, row, map.get("SCWJ-BIRTH") == null ? "" : map.get("SCWJ-BIRTH").getAnswer());
excelWriter.writeCellValue(4, row, map.get("SCWJ-BIRTH") == null ? "" : map.get("SCWJ-BIRTH").getAnswer()); excelWriter.writeCellValue(3, row, map.get("SCWJ-AGE") == null ? "" : map.get("SCWJ-AGE").getAnswer());
excelWriter.writeCellValue(5, row, map.get("SCWJ-PHONE") == null ? "" : map.get("SCWJ-PHONE").getAnswer()); excelWriter.writeCellValue(4, row, map.get("SCWJ-PHONE") == null ? "" : map.get("SCWJ-PHONE").getAnswer());
if (record == null || StrUtil.isEmpty(record.getAnswer())) { excelWriter.writeCellValue(5, row, map.get("SCWJ-HEIGHT") == null ? "" : map.get("SCWJ-HEIGHT").getAnswer());
excelWriter.writeCellValue(6, row, "否"); excelWriter.writeCellValue(6, row, map.get("SCWJ-WEIGHT") == null ? "" : map.get("SCWJ-WEIGHT").getAnswer());
excelWriter.writeCellValue(7, row, "否"); excelWriter.writeCellValue(7, row, map.get("SCWJ-BMI") == null ? "" : map.get("SCWJ-BMI").getAnswer());
excelWriter.writeCellValue(8, row, "否"); excelWriter.writeCellValue(8, row, map.get("SCWJ-JL") == null ? "" : map.get("SCWJ-JL").getAnswer());
excelWriter.writeCellValue(9, row, "否"); excelWriter.writeCellValue(9, row, map.get("SCWJ-RESULT") == null ? "" : map.get("SCWJ-RESULT").getAnswer());
excelWriter.writeCellValue(10, row, "否"); excelWriter.writeCellValue(10, row, map.get("SCWJ-ZLFS") == null ? "" : map.get("SCWJ-ZLFS").getAnswer());
excelWriter.writeCellValue(11, row, "否"); excelWriter.writeCellValue(11, row, map.get("SCWJ-ZLZQ") == null ? "" : map.get("SCWJ-ZLZQ").getAnswer());
excelWriter.writeCellValue(12, row, "否");
excelWriter.writeCellValue(13, row, "否"); excelWriter.writeCellValue(12, row, DateUtil.format(detailVos.get(i).getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
excelWriter.writeCellValue(14, row, "否"); excelWriter.writeCellValue(13, row, detailVos.get(i).getTenantName());
excelWriter.writeCellValue(15, row, "否");
} else { // if (record == null || StrUtil.isEmpty(record.getAnswer())) {
String answer = record.getAnswer(); // excelWriter.writeCellValue(6, row, "否");
String[] split = answer.split(","); // excelWriter.writeCellValue(7, row, "否");
excelWriter.writeCellValue(6, row, Arrays.asList(split).contains("01") ? "是" : "否"); // excelWriter.writeCellValue(8, row, "否");
excelWriter.writeCellValue(7, row, Arrays.asList(split).contains("02") ? "是" : "否"); // excelWriter.writeCellValue(9, row, "否");
excelWriter.writeCellValue(8, row, Arrays.asList(split).contains("03") ? "是" : "否"); // excelWriter.writeCellValue(10, row, "否");
excelWriter.writeCellValue(9, row, Arrays.asList(split).contains("04") ? "是" : "否"); // excelWriter.writeCellValue(11, row, "否");
excelWriter.writeCellValue(10, row, Arrays.asList(split).contains("05") ? "是" : "否"); // excelWriter.writeCellValue(12, row, "否");
excelWriter.writeCellValue(11, row, Arrays.asList(split).contains("06") ? "是" : "否"); // excelWriter.writeCellValue(13, row, "否");
excelWriter.writeCellValue(12, row, Arrays.asList(split).contains("07") ? "是" : "否"); // excelWriter.writeCellValue(14, row, "否");
excelWriter.writeCellValue(13, row, Arrays.asList(split).contains("08") ? "是" : "否"); // excelWriter.writeCellValue(15, row, "否");
excelWriter.writeCellValue(14, row, Arrays.asList(split).contains("09") ? "是" : "否"); // } else {
excelWriter.writeCellValue(15, row, Arrays.asList(split).contains("10") ? "是" : "否"); // String answer = record.getAnswer();
} // String[] split = answer.split(",");
String str = ""; // excelWriter.writeCellValue(6, row, Arrays.asList(split).contains("01") ? "是" : "否");
if (map.get("SCWJ-RESULT") != null && StrUtil.isNotEmpty(map.get("SCWJ-RESULT").getAnswer())) { // excelWriter.writeCellValue(7, row, Arrays.asList(split).contains("02") ? "是" : "否");
String answer1 = map.get("SCWJ-RESULT").getAnswer(); // excelWriter.writeCellValue(8, row, Arrays.asList(split).contains("03") ? "是" : "否");
if ("0".equals(answer1)) { // excelWriter.writeCellValue(9, row, Arrays.asList(split).contains("04") ? "是" : "否");
str = "正常"; // excelWriter.writeCellValue(10, row, Arrays.asList(split).contains("05") ? "是" : "否");
} // excelWriter.writeCellValue(11, row, Arrays.asList(split).contains("06") ? "是" : "否");
if ("1".equals(answer1)) { // excelWriter.writeCellValue(12, row, Arrays.asList(split).contains("07") ? "是" : "否");
str = "低危"; // excelWriter.writeCellValue(13, row, Arrays.asList(split).contains("08") ? "是" : "否");
} // excelWriter.writeCellValue(14, row, Arrays.asList(split).contains("09") ? "是" : "否");
if ("2".equals(answer1)) { // excelWriter.writeCellValue(15, row, Arrays.asList(split).contains("10") ? "是" : "否");
str = "中危"; // }
} // String str = "";
if ("3".equals(answer1)) { // if (map.get("SCWJ-RESULT") != null && StrUtil.isNotEmpty(map.get("SCWJ-RESULT").getAnswer())) {
str = "高危"; // String answer1 = map.get("SCWJ-RESULT").getAnswer();
} // if ("0".equals(answer1)) {
} // str = "正常";
excelWriter.writeCellValue(16, row, str); // }
excelWriter.writeCellValue(17, row, map.get("SCWJ-SQMC") == null ? "" : map.get("SCWJ-SQMC").getAnswer()); // if ("1".equals(answer1)) {
excelWriter.writeCellValue(18, row, map.get("SCWJ-DEPT") == null ? "" : map.get("SCWJ-DEPT").getAnswer()); // str = "低危";
// }
// if ("2".equals(answer1)) {
// str = "中危";
// }
// if ("3".equals(answer1)) {
// str = "高危";
// }
// }
// excelWriter.writeCellValue(16, row, map.get("SCWJ-JL") == null ? "" : map.get("SCWJ-JL").getAnswer());
// excelWriter.writeCellValue(17, row, map.get("SCWJ-SQMC") == null ? "" : map.get("SCWJ-SQMC").getAnswer());
// excelWriter.writeCellValue(18, row, map.get("SCWJ-DEPT") == null ? "" : map.get("SCWJ-DEPT").getAnswer());
} }
} }
} }
@ -320,6 +328,7 @@ public class ScreeningServiceImpl implements IScreeningService {
} }
@Override @Override
public PageInfo<ScrScreenVo.Result> queryDetailByPage(ScreeningDto.Query param, Integer pageNum, Integer pageSize) { public PageInfo<ScrScreenVo.Result> queryDetailByPage(ScreeningDto.Query param, Integer pageNum, Integer pageSize) {
param.setTenantId(SecurityUtils.getTenantId());
List<ScrScreenVo.Result> results = screeningDetailDao.queryResult(null, null, param); List<ScrScreenVo.Result> results = screeningDetailDao.queryResult(null, null, param);
if (CollectionUtil.isNotEmpty(results)) { if (CollectionUtil.isNotEmpty(results)) {
List<ScrScreenVo.ScreeningDetailVo> screeningDetailVos = screeningDetailDao.queryDetailList(results.stream().map(ScrScreenVo.Result::getId).collect(Collectors.toList())); List<ScrScreenVo.ScreeningDetailVo> screeningDetailVos = screeningDetailDao.queryDetailList(results.stream().map(ScrScreenVo.Result::getId).collect(Collectors.toList()));
@ -382,6 +391,7 @@ public class ScreeningServiceImpl implements IScreeningService {
} }
if (param.getCode().equals("SCWJ-BIRTH")) { if (param.getCode().equals("SCWJ-BIRTH")) {
questionnaireDetail.setAge(DateUtil.ageOfNow(param.getAnswer())); questionnaireDetail.setAge(DateUtil.ageOfNow(param.getAnswer()));
// param.setAnswer(DateUtil.format(DateUtil.parse(param.getAnswer()), "yyyy-MM-dd"));
} }
log.info("questionnaireDetail:{}", questionnaireDetail.getId()); log.info("questionnaireDetail:{}", questionnaireDetail.getId());
log.info("questionnaireDetail:{}", questionnaireDetail.getName()); log.info("questionnaireDetail:{}", questionnaireDetail.getName());
@ -465,6 +475,7 @@ public class ScreeningServiceImpl implements IScreeningService {
detail.setScreenId(detailInfo.getId()); detail.setScreenId(detailInfo.getId());
detail.setTenantId(hospitailId); detail.setTenantId(hospitailId);
detail.setSubmitStatus(UserConstants.SubmitStatus.save.status); detail.setSubmitStatus(UserConstants.SubmitStatus.save.status);
detail.setCreateTime(new Date());
detail.setDelFlag((byte) 0); detail.setDelFlag((byte) 0);
scrScreeningRecordMapper.insertSelective(detail); scrScreeningRecordMapper.insertSelective(detail);
detailInfo.setDetailId(detail.getId()); detailInfo.setDetailId(detail.getId());

3
acupuncture-system/src/main/resources/mapper/dao/AdminDmsUserDao.xml

@ -30,6 +30,9 @@
<if test="dto.tenantId != null"> <if test="dto.tenantId != null">
AND u.tenant_id = #{dto.tenantId} AND u.tenant_id = #{dto.tenantId}
</if> </if>
<if test="dto.tenantName != null">
AND t.name like concat('%',#{dto.tenantName},'%')
</if>
</where> </where>
</select> </select>

3
acupuncture-system/src/main/resources/mapper/dao/ScreeningDetailDao.xml

@ -87,6 +87,9 @@
) )
</if> </if>
</if> </if>
<if test="param.tenantId != null">
and r.tenant_id = #{param.tenantId}
</if>
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and r.create_time &gt;= #{param.startTime} and r.create_time &gt;= #{param.startTime}
</if> </if>

Loading…
Cancel
Save