liusheng
2 天以前 1e1814178edf84090b28492bbad340ab13e5c169
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -396,6 +396,9 @@
        //新增患者基本信息新增或修改
        PatArchive patArchive = addPatArchive(externalInHospPatientInfo, externalInHospPatientAddrInfo, externalInHospPatientLiaisonInfo);
        PatMedInhosp patMedInhosp = new PatMedInhosp();
        patMedInhosp.setInhospno(externalInHospPatientInfo.getBingAnHao());
        patMedInhosp.setSerialnum(externalInHospPatientInfo.getJiuZhenYWID());
@@ -939,12 +942,13 @@
            // 4. 新建(此时只剩冷表,PatMedOuthosp没了,需要新建一个)
            patMedOuthospMapper.createPatMedOuthosp(newName, oldName);
            //设置新表自增主键
            //5.设置新表自增主键
            patMedOuthospMapper.createPatMedOuthospAutoAdd(oldName);
            // 5. 设置新表自增起始值
            //6. 设置新表自增起始值
            patMedOuthospMapper.setAutoIncrement(oldName, maxId + 1);
            // 6. 更新/新建视图
            // 7. 更新/新建视图
            // 重新获取所有表名(包含刚新建的主表)
            List<String> allTables = patMedOuthospMapper.getAllOuthospTableNames();
            StringBuilder sb = new StringBuilder();