c309ec6868bf937529e8e3ff948dbdedd66e5631..35c4bf0535cd2260f2a9e2a2845588db39ac8ba0
2026-03-30 陈昶聿
【丽水】数据导入新增短号
35c4bf 对比 | 目录
2026-03-30 陈昶聿
【丽水】手术随访暂停
099ea4 对比 | 目录
已修改6个文件
149 ■■■■■ 文件已修改
smartor/src/main/java/com/smartor/domain/ExternalInHospPatientInfo.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchive.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchiveOthreInfo.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java 106 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ExternalInHospPatientInfo.java
@@ -188,4 +188,7 @@
    @ApiModelProperty(value = "经管医生姓名")
    private String JingGuanYSXM;
    @ApiModelProperty(value = "短号信息")
    private String DuanHaoXX;
}
smartor/src/main/java/com/smartor/domain/PatArchive.java
@@ -204,6 +204,13 @@
    @Excel(name = " 手机号码 ")
    private String telcode;
    /**
     * 手机短号
     */
    @ApiModelProperty("手机短号")
    @Excel(name = " 手机短号 ")
    private String telshortcode;
    /**
     * 亲属号码
smartor/src/main/java/com/smartor/domain/PatArchiveOthreInfo.java
@@ -250,6 +250,13 @@
    @Excel(name = " 手机号码 ")
    private String telcode;
    /**
     * 手机短号
     */
    @ApiModelProperty("手机短号")
    @Excel(name = " 手机短号 ")
    private String telshortcode;
    /**
     * 亲属号码
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -378,60 +378,60 @@
                    patMedInhospMapper.updatePatMedInhosp(pmiJB);
                }
            }
            PatMedInhosp pmss = new PatMedInhosp();
            //获取需要出院疾病随访,未处理的数据
            pmss.setOpercheckFlag("0");
            pmss.setInhospstate("1");
            pmss.setFuflag("1");
            List<PatMedInhosp> patMedInhospSSs = patMedInhospMapper.selectPatMedInhospList(pmss);
            log.info("dealOutHospInfo需要处理的出院疾病患者信息:{}", CollectionUtils.isNotEmpty(patMedInhospSSs) ? patMedInhospSSs.size() : null);
            for (PatMedInhosp patMedInhosp1 : patMedInhospSSs) {
                String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid());
                patMedInhosp1.setTagname(tagname);
            }
            for (PatMedInhosp pmiSS : patMedInhospSSs) {
                //获取患者信息
                PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(pmiSS.getPatid());
                if (Objects.isNull(patArchive)) {
                    pmiSS.setDiagcheckFlag("2");
                    pmiSS.setLongTaskReason("患者基本信息为空");
                    patMedInhospMapper.updatePatMedInhosp(pmiSS);
                    continue;
                }
                try {
//                    if (StringUtils.isEmpty(pmiSS.getLeaveicd10code())) {
//                        continue;
//            手术随访
//            PatMedInhosp pmss = new PatMedInhosp();
//            //获取需要出院疾病随访,未处理的数据
//            pmss.setOpercheckFlag("0");
//            pmss.setInhospstate("1");
//            pmss.setFuflag("1");
//            List<PatMedInhosp> patMedInhospSSs = patMedInhospMapper.selectPatMedInhospList(pmss);
//            log.info("dealOutHospInfo需要处理的出院疾病患者信息:{}", CollectionUtils.isNotEmpty(patMedInhospSSs) ? patMedInhospSSs.size() : null);
//            for (PatMedInhosp patMedInhosp1 : patMedInhospSSs) {
//                String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid());
//                patMedInhosp1.setTagname(tagname);
//            }
//
//            for (PatMedInhosp pmiSS : patMedInhospSSs) {
//                //获取患者信息
//                PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(pmiSS.getPatid());
//                if (Objects.isNull(patArchive)) {
//                    pmiSS.setDiagcheckFlag("2");
//                    pmiSS.setLongTaskReason("患者基本信息为空");
//                    patMedInhospMapper.updatePatMedInhosp(pmiSS);
//                    continue;
//                }
//                try {
////                    if (StringUtils.isEmpty(pmiSS.getLeaveicd10code())) {
////                        continue;
////                    }
//                    // 根据患者的疾病,获取该疾病的长期任务
//                    ServiceTaskoper serviceTaskoper = new ServiceTaskoper();
//                    serviceTaskoper.setLongtask(1L);
//                    serviceTaskoper.setOrgid(pmiSS.getOrgid());
//                    //todo
//                    serviceTaskoper.setOplevelcode("");
//
//                    List<ServiceTaskoper> serviceTaskopers = serviceTaskoperMapper.selectServiceTaskoperList(serviceTaskoper);
//                    //如果部门模板为空(将deptIsNull设置为true)
//                    if (CollectionUtils.isEmpty(serviceTaskopers) || serviceTaskopers.size() == 0) {
//                        PatMedInhosp patMedInhosp = patMedInhospMapper.selectPatMedInhospByInhospid(pmiSS.getInhospid());
//                        pmiSS.setOpercheckFlag("2");
//                        pmiSS.setLongTaskReason(patMedInhosp.getLongTaskReason() + "所患的手术未配置长期任务;");
//                        patMedInhospMapper.updatePatMedInhosp(pmiSS);
//                    } else {
//                        for (ServiceTaskoper serviceTaskoper1 : serviceTaskopers) {
//                            writeInSubTask(serviceTaskoper1.getTaskId(), true, pmiSS, patArchive, 3, config);
//                        }
//                    }
                    // 根据患者的疾病,获取该疾病的长期任务
                    ServiceTaskoper serviceTaskoper = new ServiceTaskoper();
                    serviceTaskoper.setLongtask(1L);
                    serviceTaskoper.setOrgid(pmiSS.getOrgid());
                    //todo
                    serviceTaskoper.setOplevelcode("");
                    List<ServiceTaskoper> serviceTaskopers = serviceTaskoperMapper.selectServiceTaskoperList(serviceTaskoper);
                    //如果部门模板为空(将deptIsNull设置为true)
                    if (CollectionUtils.isEmpty(serviceTaskopers) || serviceTaskopers.size() == 0) {
                        PatMedInhosp patMedInhosp = patMedInhospMapper.selectPatMedInhospByInhospid(pmiSS.getInhospid());
                        pmiSS.setOpercheckFlag("2");
                        pmiSS.setLongTaskReason(patMedInhosp.getLongTaskReason() + "所患的手术未配置长期任务;");
                        patMedInhospMapper.updatePatMedInhosp(pmiSS);
                    } else {
                        for (ServiceTaskoper serviceTaskoper1 : serviceTaskopers) {
                            writeInSubTask(serviceTaskoper1.getTaskId(), true, pmiSS, patArchive, 3, config);
                        }
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                    log.error("人员手术处理出异常了:{}", e.getMessage());
                    pmiSS.setOpercheckFlag("2");
                    pmiSS.setLongTaskReason("人员手术处理异常:" + e.getMessage());
                    patMedInhospMapper.updatePatMedInhosp(pmiSS);
                }
            }
//
//                } catch (Exception e) {
//                    e.printStackTrace();
//                    log.error("人员手术处理出异常了:{}", e.getMessage());
//                    pmiSS.setOpercheckFlag("2");
//                    pmiSS.setLongTaskReason("人员手术处理异常:" + e.getMessage());
//                    patMedInhospMapper.updatePatMedInhosp(pmiSS);
//                }
//            }
        }
        //获取未处理在院的数据(如果刚刚出院的患者数据的出院时间,在下面查询出的入院时间之前,那之前的出院患者的数据,也得停掉,因为又入院了)
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -548,6 +548,17 @@
        }
        if (CollectionUtils.isNotEmpty(epai)) externalInHospPatientAddrInfo = epai2.get(0);
        if (CollectionUtils.isNotEmpty(epli)) externalInHospPatientLiaisonInfo = epli2.get(0);
        List<HashMap<String, Object>> bingRenKZXXList = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("BingRenKZXXList") : null;
        if (CollectionUtils.isNotEmpty(bingRenKZXXList)) {
            for(HashMap<String, Object> bingRenKZXX : bingRenKZXXList){
                String XiangMuDM = ObjectUtils.isNotEmpty(bingRenKZXX.get("XiangMuDM")) ? bingRenKZXX.get("XiangMuDM").toString() : null;
                if(StringUtils.isNotEmpty(XiangMuDM) && XiangMuDM.equals("DuanHaoXX")){
                    externalInHospPatientInfo.setDuanHaoXX(ObjectUtils.isNotEmpty(bingRenKZXX.get("XiangMuZMC")) ? bingRenKZXX.get("XiangMuZMC").toString() : null);
                    break;
                }
            }
        }
        //新增患者基本信息新增或修改
        PatArchive patArchive = addPatArchive(externalInHospPatientInfo, externalInHospPatientAddrInfo, externalInHospPatientLiaisonInfo);
@@ -1487,6 +1498,9 @@
        patArchive.setTelcode(externalInHospPatientInfo.getLianXiDH());
        if (StringUtils.isEmpty(patArchive.getTelcode()))
            patArchive.setTelcode(externalInHospPatientInfo.getLianXiRDH());
        //增加短号信息
        if (StringUtils.isNotEmpty(externalInHospPatientInfo.getDuanHaoXX()))
            patArchive.setTelshortcode(externalInHospPatientInfo.getDuanHaoXX());
        patArchive.setRelativetelcode(externalInHospPatientInfo.getLianXiRDH());
        patArchive.setGuid(externalInHospPatientInfo.getZuZhiJGID());
        patArchive.setInhospno(externalInHospPatientInfo.getBingAnHao());
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -28,6 +28,7 @@
        <result property="archivetime" column="archivetime"/>
        <result property="archiveby" column="archiveby"/>
        <result property="telcode" column="telcode"/>
        <result property="telshortcode" column="telshortcode"/>
        <result property="relativetelcode" column="relativetelcode"/>
        <result property="idcardtype" column="idcardtype"/>
        <result property="orgid" column="orgid"/>
@@ -90,6 +91,7 @@
        <result property="archivetime" column="archivetime"/>
        <result property="archiveby" column="archiveby"/>
        <result property="telcode" column="telcode"/>
        <result property="telshortcode" column="telshortcode"/>
        <result property="relativetelcode" column="relativetelcode"/>
        <result property="idcardtype" column="idcardtype"/>
        <result property="orgid" column="orgid"/>
@@ -153,6 +155,7 @@
               archivetime,
               archiveby,
               telcode,
               telshortcode,
               relativetelcode,
               idcardtype,
               orgid,
@@ -306,6 +309,7 @@
            <if test="archivetime != null">archivetime,</if>
            <if test="archiveby != null">archiveby,</if>
            <if test="telcode != null">telcode,</if>
            <if test="telshortcode != null">telshortcode,</if>
            <if test="relativetelcode != null">relativetelcode,</if>
            <if test="idcardtype != null">idcardtype,</if>
            <if test="orgid != null">orgid,</if>
@@ -356,6 +360,7 @@
            <if test="archivetime != null">#{archivetime},</if>
            <if test="archiveby != null">#{archiveby},</if>
            <if test="telcode != null">#{telcode},</if>
            <if test="telshortcode != null">#{telshortcode},</if>
            <if test="relativetelcode != null">#{relativetelcode},</if>
            <if test="idcardtype != null">#{idcardtype},</if>
            <if test="orgid != null">#{orgid},</if>
@@ -415,6 +420,7 @@
            <if test="archivetime != null">archivetime = #{archivetime},</if>
            <if test="archiveby != null">archiveby = #{archiveby},</if>
            <if test="telcode != null">telcode = #{telcode},</if>
            <if test="telshortcode != null">telshortcode = #{telshortcode},</if>
            <if test="relativetelcode != null">relativetelcode = #{relativetelcode},</if>
            <if test="idcardtype != null">idcardtype = #{idcardtype},</if>
            <if test="orgid != null">orgid = #{orgid},</if>
@@ -491,6 +497,7 @@
        a.archivetime,
        a.archiveby,
        a.telcode,
        a.telshortcode,
        a.relativetelcode,
        a.idcardtype,
        a.orgid,
@@ -564,6 +571,7 @@
        a.archivetime,
        a.archiveby,
        a.telcode,
        a.telshortcode,
        a.relativetelcode,
        a.idcardtype,
        a.orgid,
@@ -702,6 +710,7 @@
        a.archivetime,
        a.archiveby,
        a.telcode,
        a.telshortcode,
        a.relativetelcode,
        a.idcardtype,
        a.orgid,
@@ -795,6 +804,7 @@
        a.archivetime,
        a.archiveby,
        a.telcode,
        a.telshortcode,
        a.relativetelcode,
        a.idcardtype,
        a.orgid,
@@ -887,6 +897,7 @@
        a.archivetime,
        a.archiveby,
        a.telcode,
        a.telshortcode,
        a.relativetelcode,
        a.idcardtype,
        a.orgid,
@@ -1122,6 +1133,7 @@
        a.archivetime,
        a.archiveby,
        a.telcode,
        a.telshortcode,
        a.relativetelcode,
        a.idcardtype,
        a.orgid,