| | |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.ruoyi.template.domain.HeLibrary; |
| | | import com.ruoyi.template.domain.IvrLibaScriptAssort; |
| | | import com.ruoyi.inhospvisit.domain.PatMedInhosp; |
| | | import com.ruoyi.outpatientvisit.domain.PatMedOuthosp; |
| | | import com.ruoyi.outpatientvisit.domain.PatMedOuthospQueryReq; |
| | | import com.ruoyi.inhospvisit.api.InhospVisitFacade; |
| | | import com.ruoyi.outpatientvisit.api.OuthospDataFacade; |
| | | import com.ruoyi.template.domain.IvrTaskTemplate; |
| | | import com.ruoyi.template.domain.IvrTaskTemplateScriptVO; |
| | | import com.ruoyi.template.domain.IvrTaskTemplateTargetoption; |
| | | import com.ruoyi.template.service.IIvrTaskTemplateService; |
| | | import com.ruoyi.template.domain.IvrLibaTemplateScript; |
| | | import com.ruoyi.template.mapper.IvrLibaScriptAssortMapper; |
| | | import com.ruoyi.template.service.IIvrLibaTemplateScriptService; |
| | | import com.ruoyi.template.domain.SvyLibScriptCategory; |
| | | import com.ruoyi.template.domain.SvyLibTemplateScript; |
| | | import com.ruoyi.template.domain.SvyTaskTemplate; |
| | | import com.ruoyi.template.domain.SvyTaskTemplateScriptVO; |
| | | import com.ruoyi.template.domain.SvyTaskTemplateTargetoption; |
| | | import com.ruoyi.template.mapper.SvyLibScriptCategoryMapper; |
| | | import com.ruoyi.template.service.ISvyTaskTemplateService; |
| | | /** |
| | | * 任务问卷问题选项Service业务层处理 |
| | | * |
| | |
| | | public class ServiceSubtaskAnswerServiceImpl implements IServiceSubtaskAnswerService { |
| | | @Autowired |
| | | private ServiceSubtaskAnswerMapper serviceSubtaskAnswerMapper; |
| | | |
| | | /** |
| | | * 跨模块访问一律经模块门面(禁止直连已搬走的 Mapper)。 |
| | | */ |
| | | @Autowired |
| | | private OuthospDataFacade outhospDataFacade; |
| | | |
| | | /** |
| | | * 跨模块访问一律经模块门面(禁止直连已搬走的 Mapper)。 |
| | | */ |
| | | @Autowired |
| | | private InhospVisitFacade inhospVisitFacade; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | |
| | | private PatArchiveMapper patArchiveMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private PatMedInhospMapper patMedInhospMapper; |
| | | |
| | | @Autowired |
| | | private PatMedOuthospMapper patMedOuthospMapper; |
| | | |
| | | @Autowired |
| | | private IServiceSubtaskDetailTraceService traceService; |
| | |
| | | @Autowired |
| | | private ISvyLibTemplateScriptService svyLibTemplateScriptService; |
| | | |
| | | @Autowired |
| | | private ISvyTaskTemplateTargetoptionService svyTaskTemplateTargetoptionService; |
| | | |
| | | @Autowired |
| | | private IIvrTaskTemplateService ivrTaskTemplateService; |
| | |
| | | //住院 |
| | | PatMedInhosp patMedInhosp = new PatMedInhosp(); |
| | | patMedInhosp.setSerialnum(serviceSubTaskMYDAnswerReq.getSerialnum()); |
| | | patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp); |
| | | patMedInhospList = inhospVisitFacade.selectPatMedInhospList(patMedInhosp); |
| | | if (CollectionUtils.isNotEmpty(patMedInhospList)) patid = patMedInhospList.get(0).getPatid(); |
| | | } else if (serviceSubTaskMYDAnswerReq.getMzzy().equals("2")) { |
| | | //门诊 |
| | | PatMedOuthospQueryReq patMedOuthosp = new PatMedOuthospQueryReq(); |
| | | patMedOuthosp.setSerialnum(serviceSubTaskMYDAnswerReq.getSerialnum()); |
| | | patMedOuthosps = patMedOuthospMapper.callSpQueryOuthosp(patMedOuthosp); |
| | | patMedOuthosps = outhospDataFacade.callSpQueryOuthosp(patMedOuthosp); |
| | | if (CollectionUtils.isNotEmpty(patMedOuthosps)) patid = patMedOuthosps.get(0).getPatid(); |
| | | } else if (serviceSubTaskMYDAnswerReq.getMzzy().equals("3")) { |
| | | //指定一个部门,用来处理投诉建议 |
| | |
| | | serviceSubtask.setNurseName(patMedInhospList.get(0).getNurseName()); |
| | | serviceSubtask.setNurseId(patMedInhospList.get(0).getNurseId()); |
| | | serviceSubtask.setInhospid(patMedInhospList.get(0).getInhospid()); |
| | | serviceSubtask.setCampusid(patMedInhospList.get(0).getCampusid()); |
| | | serviceSubtask.setServiceType("6"); |
| | | } else if (CollectionUtils.isNotEmpty(patMedOuthosps)) { |
| | | serviceSubtask.setHospType("1"); |
| | |
| | | serviceSubtask.setDeptcode(patMedOuthosps.get(0).getDeptcode()); |
| | | serviceSubtask.setDrname(patMedOuthosps.get(0).getDrname()); |
| | | serviceSubtask.setDrcode(patMedOuthosps.get(0).getDrcode()); |
| | | serviceSubtask.setCampusid(patMedOuthosps.get(0).getCampusid()); |
| | | serviceSubtask.setServiceType("14"); |
| | | } |
| | | if (!Objects.isNull(patArchive)) { |
| | |
| | | serviceSubtask.setSfzh(patArchive.getIdcardno()); |
| | | serviceSubtask.setAddr(patArchive.getPlaceOfResidence()); |
| | | serviceSubtask.setOrgid(patArchive.getOrgid()); |
| | | // 院区兜底:住院/门急诊记录的院区在本库常为空,用患者档案的院区补上, |
| | | // 否则统计接口(@AddOrgId 按登录用户院区过滤 service_subtask.campusid)会把这些子任务整批丢掉 |
| | | if (StringUtils.isEmpty(serviceSubtask.getCampusid())) { |
| | | serviceSubtask.setCampusid(patArchive.getCampusid()); |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(dealDept)) { |
| | | //投诉建议的处理部门 |