fwq
2024-02-20 f41f4a35dd4c86fdaeac1a2027c6b76a9136e9cd
日志
1个文件已修改
11 ■■■■■ 已修改文件
phi_platform_user/src/main/java/com/hx/phip/service/treat/impl/TreatV3ServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/service/treat/impl/TreatV3ServiceImpl.java
@@ -458,16 +458,16 @@
        logger.info("-----新增治疗单,多线程处理用户科室关系----");
        TreatSingle treatSingle = treatSingleMapper.selectOneByKey(treatSingleId);
        if (treatSingle == null){
            logger.error("新增治疗单处理科室关系,查询治疗单失败"+treatSingleId);
            logger.info("新增治疗单处理科室关系,查询治疗单失败"+treatSingleId);
            return;
        }
        if (StringUtils.isEmpty(treatSingle.getUserId())){
            logger.error("新增治疗单处理科室关系,用户id为空");
            logger.info("新增治疗单处理科室关系,用户id为空");
            return;
        }
        User user = userMapper.selectOneByKey(treatSingle.getUserId());
        if (user == null){
            logger.error("新增治疗单处理科室关系,查询用户失败"+treatSingle.getUserId());
            logger.info("新增治疗单处理科室关系,查询用户失败"+treatSingle.getUserId());
            return;
        }
        SqlSentence sqlSentence = new SqlSentence();
@@ -495,14 +495,17 @@
                }
                UserFamiliesRoom mapData = dataMap.get(treatProjectDoctor.getDepartmentId());
                if (mapData == null){
                    logger.info("当前科室关系不存在,新增数据:"+JSON.toJSONString(treatProjectDoctor));
                    //没有科室关系,创建科室关系
                    FamiliesRoom familiesRoom = familiesRoomMapper.selectOneByKey(treatProjectDoctor.getDepartmentId());
                    //找不到科室信息不处理
                    if (familiesRoom == null){
                        logger.info("新增治疗单处理科室关系,查询科室失败:"+treatProjectDoctor.getDepartmentId());
                        continue;
                    }
                    //不是皮肤科和注射科不处理
                    if (!"注射科".equals(familiesRoom.getFamiliesRoomName()) && !"皮肤科".equals(familiesRoom.getFamiliesRoomName())){
                        logger.info("新增治疗单处理科室关系,不处理注射科和皮肤科以外的:"+familiesRoom.getFamiliesRoomName());
                        continue;
                    }
                    UserFamiliesRoom userFamiliesRoom = new UserFamiliesRoom();
@@ -536,7 +539,7 @@
                    }
                    userBeChangeLog.setRoomId(treatProjectDoctor.getDepartmentId());
                    userBeChangeLog.setRoomName(familiesRoom.getFamiliesRoomName());
                    userBeChangeLog.setRemark("新增治疗单处理科室关系");
                    userBeChangeLog.setRemark("治疗单:"+treatSingle.getTreatSingleNo());
                    if (userBeChangeLogMapper.insert(userBeChangeLog) != 1){
                        throw new TipsException("新增失败2!"+ JSON.toJSONString(userBeChangeLog));
                    }