|
|
@@ -4,7 +4,11 @@ import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.tr.core.exception.TRExcCode;
|
|
|
import cn.tr.core.strategy.LoginUserStrategy;
|
|
|
+import cn.tr.module.smart.common.dto.BizDeptDTO;
|
|
|
import cn.tr.module.smart.common.po.BizDeptPO;
|
|
|
+import cn.tr.module.smart.common.repository.BizDeptRepository;
|
|
|
+import cn.tr.module.smart.common.service.IBizDeptService;
|
|
|
+import cn.tr.module.smart.common.service.IBizQuestionService;
|
|
|
import cn.tr.module.smart.wx.controller.vo.BizWxDeptQuestionVO;
|
|
|
import cn.tr.module.smart.wx.dto.BizClinicAddOrEditDTO;
|
|
|
import cn.tr.module.smart.wx.dto.BizWxAppletClinicQueryDTO;
|
|
|
@@ -39,6 +43,11 @@ import org.springframework.util.StringUtils;
|
|
|
public class BizClinicServiceImpl extends ServiceImpl<BizClinicRepository,BizClinicPO> implements IBizClinicService {
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IBizDeptService bizDeptService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IBizQuestionService bizQuestionService;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -182,8 +191,7 @@ public class BizClinicServiceImpl extends ServiceImpl<BizClinicRepository,BizCli
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public BizWxDeptQuestionVO selectPreSurgeryQuestionnaire(String clinicId) {
|
|
|
-
|
|
|
+ public List<BizWxDeptQuestionVO> selectPreSurgeryQuestionnaire(String clinicId) {
|
|
|
//判断临床id是否为空
|
|
|
if(StrUtil.isBlank(clinicId)){
|
|
|
throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"患者信息不存在");
|
|
|
@@ -191,10 +199,13 @@ public class BizClinicServiceImpl extends ServiceImpl<BizClinicRepository,BizCli
|
|
|
BizClinicPO clinic = baseMapper.selectById(clinicId);
|
|
|
String deptId = clinic.getDeptId();
|
|
|
//判断科室id是否为空
|
|
|
- //如果科室id不为空获取到问题组id
|
|
|
- //判断问题组id是否为空不为空
|
|
|
- //通过问题组id去查询出来biz_question表中的所有问题并传给前端
|
|
|
-
|
|
|
- return null;
|
|
|
+ if(StrUtil.isBlank(deptId)){
|
|
|
+ throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"科室信息不存在");
|
|
|
+ }
|
|
|
+ BizDeptDTO bizDeptDTO = bizDeptService.selectBizDeptById(deptId);
|
|
|
+ String groupId = bizDeptDTO.getGroupId();
|
|
|
+ //通过获取到的groupId查询问卷调查问题表
|
|
|
+ List<BizWxDeptQuestionVO> result = bizQuestionService.selectBizQuestionByGroupId(groupId);
|
|
|
+ return result;
|
|
|
}
|
|
|
}
|