陈昶聿
12 小时以前 9104e047e7ef7c4504bd548711b8fdeda3abd621
ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java
@@ -454,8 +454,14 @@
        if(StringUtils.isNotEmpty(operation.getOpid())){
            PatMedOperationItem patMedOperationItem = new PatMedOperationItem();
            //patMedOperation.opReqid = patMedOperationItem.operationid
            patMedOperationItem.setOperationid(operation.getOpreqid());
            List<PatMedOperationItem> patMedOperationItems = chMapper.selectOperItemList(patMedOperationItem);
            List<PatMedOperationItem> patMedOperationItems = new ArrayList<>();
            if (ObjectUtils.isNotEmpty(operation.getOpreqid())){
                patMedOperationItem.setOperationid(operation.getOpreqid());
                patMedOperationItems = chMapper.selectOperItemList(patMedOperationItem);
            }else {
                log.info("同步手术详情信息:手术申请单ID为空!");
                return count;
            }
            PatMedOperationItem operItem = new PatMedOperationItem();
            operItem.setOperationid(operation.getOpreqid());
@@ -811,7 +817,12 @@
        log.info("selectDeptList的采集到的数量为:{}", sysDepts.size());
        // count = sysDept2Mapper.batchDept(sysDepts);
        for (SysDept row : sysDepts) {
            SysDept sysDeptTemp = sysDept2Mapper.selectDeptByCode(row.getDeptCode(), null);
            // 科室和病区可能共用同一个 dept_code,必须按 dept_type + orgid 精确定位,否则 selectOne 会返回多条
            if (StringUtils.isEmpty(row.getDeptCode())) {
                log.warn("selectDeptList跳过deptCode为空的记录:{}", row);
                continue;
            }
            SysDept sysDeptTemp = sysDept2Mapper.selectDeptByCodeAndType(row.getDeptCode(), row.getOrgid(), row.getDeptType());
            if (sysDeptTemp != null && sysDeptTemp.getDeptName() != null) {
                row.setDeptId(sysDeptTemp.getDeptId());
                count += sysDept2Mapper.updateDept(row);