liusheng
9 天以前 a1e256f64930865ae2d170e333ee3f1a773c6c49
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -25,7 +25,7 @@
import com.ruoyi.system.service.ISysConfigService;
import com.smartor.common.FtpService;
import com.smartor.common.ScheduleSubtaskBuilder;
import com.smartor.config.PhoneUtils;
import com.ruoyi.common.utils.PhoneUtils;
import com.smartor.domain.DTO.*;
import com.smartor.domain.*;
import com.smartor.domain.VO.*;
@@ -62,6 +62,35 @@
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import com.ruoyi.template.domain.VO.HeLibraryCountVO;
import com.ruoyi.inhospvisit.domain.PatMedInhosp;
import com.ruoyi.othervisit.domain.PatMedOperationItem;
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.othervisit.api.OtherVisitFacade;
import com.ruoyi.template.domain.IvrTaskTemplate;
import com.ruoyi.template.domain.IvrTaskTemplateScript;
import com.ruoyi.template.domain.IvrTaskTemplateScriptVO;
import com.ruoyi.template.domain.IvrTaskTemplateTargetoption;
import com.ruoyi.template.domain.IvrTaskTemplateVO;
import com.smartor.domain.IvrTaskVisitResult;
import com.ruoyi.template.mapper.IvrTaskTemplateTargetoptionMapper;
import com.smartor.mapper.IvrTaskVisitResultMapper;
import com.ruoyi.template.service.IIvrTaskTemplateScriptService;
import com.ruoyi.template.service.IIvrTaskTemplateService;
import com.ruoyi.template.service.IIvrTaskTemplateTargetoptionService;
import com.ruoyi.template.domain.IvrLibaExtemplatescript;
import com.ruoyi.template.mapper.IvrLibaExtemplatescriptMapper;
import com.ruoyi.template.domain.SvyLibScriptCategory;
import com.ruoyi.template.domain.SvyTaskTemplate;
import com.ruoyi.template.domain.SvyTaskTemplateScript;
import com.ruoyi.template.domain.SvyTaskTemplateScriptVO;
import com.ruoyi.template.domain.SvyTaskTemplateTargetoption;
import com.ruoyi.template.mapper.SvyLibScriptCategoryMapper;
import com.ruoyi.template.service.ISvyTaskTemplateScriptService;
import com.ruoyi.template.service.ISvyTaskTemplateService;
import static cn.hutool.core.convert.Convert.toHex;
/**
@@ -82,6 +111,24 @@
     */
    @Autowired
    private SatisfactionFacade satisfactionFacade;
    /**
     * 跨模块访问一律经模块门面(禁止直连已搬走的 Mapper)。
     */
    @Autowired
    private OtherVisitFacade otherVisitFacade;
    /**
     * 跨模块访问一律经模块门面(禁止直连已搬走的 Mapper)。
     */
    @Autowired
    private OuthospDataFacade outhospDataFacade;
    /**
     * 跨模块访问一律经模块门面(禁止直连已搬走的 Mapper)。
     */
    @Autowired
    private InhospVisitFacade inhospVisitFacade;
    @Autowired
    private ServiceSubtaskMapper serviceSubtaskMapper;
@@ -151,11 +198,7 @@
    @Autowired
    private FtpService ftpService;
    @Autowired
    private PatMedInhospMapper patMedInhospMapper;
    @Autowired
    private PatMedOuthospMapper patMedOuthospMapper;
    @Autowired
    private PatArchiveMapper patArchiveMapper;
@@ -228,8 +271,6 @@
    private ServiceOutPathMapper serviceOutPathMapper;
    private static final String KEY_SEP = "\u0001";
    @Autowired
    private PatMedOperationItemMapper patMedOperationItemMapper;
    /**
     * 查询单一任务(随访)
@@ -452,7 +493,7 @@
                    serviceSubtaskRes.setCurrentPreachform(serviceSubtask.getPreachform().split(",")[0]);
                }
            }
            PatMedInhosp inhosp = patMedInhospMapper.selectPatMedInhospByInhospid(serviceSubtask.getInhospid());
            PatMedInhosp inhosp = inhospVisitFacade.selectPatMedInhospByInhospid(serviceSubtask.getInhospid());
            if (ObjectUtils.isNotEmpty(inhosp)) {
                PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(inhosp.getPatid());
                if (ObjectUtils.isNotEmpty(patArchive)) {
@@ -513,7 +554,7 @@
        patMedInhosp.setDeptcheckFlag("0");
        patMedInhosp.setWardcheckFlag("0");
        patMedInhosp.setDiagcheckFlag("0");
        return patMedInhospMapper.updatePatMedInhosp(patMedInhosp);
        return inhospVisitFacade.updatePatMedInhosp(patMedInhosp);
    }
    public Map<String, String> calculateAge(LocalDate birthdate, LocalDate today) {
@@ -737,7 +778,7 @@
                    PatMedInhosp patMedInhosp = new PatMedInhosp();
                    patMedInhosp.setInhospMydFlag("1");
                    patMedInhosp.setInhospid(inhospid);
                    patMedInhospMapper.updatePatMedInhosp(patMedInhosp);
                    inhospVisitFacade.updatePatMedInhosp(patMedInhosp);
                }
            }
            format = getOutPath(serviceSubtask, rsaPublicKeyExample);
@@ -785,7 +826,7 @@
        PatMedInhosp patMedInhosp = new PatMedInhosp();
        patMedInhosp.setPatid(serviceSubtask1.getPatid());
        patMedInhosp.setInhospstate("0");
        List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp);
        List<PatMedInhosp> patMedInhospList = inhospVisitFacade.selectPatMedInhospList(patMedInhosp);
        PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(serviceSubtask1.getPatid());
        //景宁 新增再次随访不能触发患者再入院
        boolean inhospAgain = true;
@@ -1232,13 +1273,13 @@
                            patMedInhosp.setWardcheckFlag("0");
                            patMedInhosp.setDiagcheckFlag("0");
                            patMedInhosp.setInhospid(serviceSubtask.getInhospid());
                            patMedInhospMapper.updatePatMedInhosp(patMedInhosp);
                            inhospVisitFacade.updatePatMedInhosp(patMedInhosp);
                        }
                    } else if (serviceSubtask.getServiceType().equals("3")) {
                        if (serviceSubtask.getInhospid() != null) {
                            PatMedOuthospQueryReq req = new PatMedOuthospQueryReq();
                            req.setOuthospno(serviceSubtask.getHospno());
                            List<PatMedOuthosp> patMedOuthosps = patMedOuthospMapper.callSpQueryOuthosp(req);
                            List<PatMedOuthosp> patMedOuthosps = outhospDataFacade.callSpQueryOuthosp(req);
                            if (CollectionUtils.isNotEmpty(patMedOuthosps)) {
                                PatMedOuthosp patMedOuthosp = patMedOuthosps.get(0);
                                patMedOuthosp.setServerState("0");
@@ -1253,7 +1294,7 @@
                            PatMedOperationItem patMedOperationItem = new PatMedOperationItem();
                            patMedOperationItem.setOpercheckFlag("0");
                            patMedOperationItem.setId(serviceSubtask.getOperationItemId());
                            patMedOperationItemMapper.updatePatMedOperationItem(patMedOperationItem);
                            otherVisitFacade.updateOperationItem(patMedOperationItem);
                        }
                    }
                }
@@ -2890,7 +2931,7 @@
            }
            req.setDeptcode(deptcodes);
            req.setOrgid(request.getOrgid());
            Long count = patMedOuthospMapper.callSpQueryOuthospCount(req);
            Long count = outhospDataFacade.callSpQueryOuthospCount(req);
            serviceStatisticsResponse.setPmoCount(count);
        }
@@ -5461,7 +5502,7 @@
     * @return
     */
    @Override
    public Integer matchOptionIndex(String url, String questionText, String voiceText, List<IvrTaskTemplateTargetoption> options, String uuid) {
    public <T> Integer matchOptionIndex(String url, String questionText, String voiceText, List<T> options, String uuid) {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("userQuestion", questionText);
        jsonObject.put("userAnswer", voiceText);