liuyan
2022-11-17 3aaf6c0574e376b15ca88650460256e078ad16bd
624向SPO推科室
5个文件已修改
177 ■■■■ 已修改文件
force-app/main/default/classes/NFM001Controller.cls 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NFM201Controller.cls 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NFM624Rest.cls 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NFM624RestAbout.cls 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/triggers/NFM001.trigger 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NFM001Controller.cls
@@ -344,9 +344,14 @@
                // エラーが発生した場合
                System.debug(Logginglevel.ERROR, 'NFM001_' + iflog.Name + ':' + ex.getMessage());
                System.debug(Logginglevel.ERROR, 'NFM001_' + iflog.Name + ':' + ex.getStackTraceString());
                logstr += ex.getMessage();
                iflog.ErrorLog__c += ex.getMessage() + '\n';
                iflog.ErrorLog__c += ex.getStackTraceString() + '\n';
                //NFM624触发001和201接口 20221102 LY start
                // Callout from triggers are currently not supported.
                if (!String.valueOf(ex.getMessage()).contains('Callout from triggers')) {
                    logstr += ex.getMessage();
                    iflog.ErrorLog__c += ex.getMessage() + '\n';
                    iflog.ErrorLog__c += ex.getStackTraceString() + '\n';
                }
                //NFM624触发001和201接口 20221102 LY end
                //---Gaozw---add
                if (rowData.retry_cnt__c == null) rowData.retry_cnt__c = 0;
force-app/main/default/classes/NFM201Controller.cls
@@ -44,7 +44,12 @@
     * @param needSendRectMap    送信対象のレコードタイプのmap
     */
    @future (callout=true)
    //NFM624触发001和201接口 20221102 LY start
    public static void callout(String iflog_Id, List<String> accIds, Map<String, String> purposeOfAdviceMap, Map<String, String> needSendRectMap, Map<String, String> needQuolifiedMap) {
        calloutNotFuture(iflog_Id,accIds,purposeOfAdviceMap,needSendRectMap,needQuolifiedMap);
    }
    //NFM624触发001和201接口 20221102 LY end
    public static void calloutNotFuture(String iflog_Id, List<String> accIds, Map<String, String> purposeOfAdviceMap, Map<String, String> needSendRectMap, Map<String, String> needQuolifiedMap) {
        if (accIds == null || accIds.size() == 0) {
            return;
        }
@@ -187,7 +192,13 @@
                    endUser.PurposeOfAdvice       = purposeOfAdviceMap.get(acc.Id);
                    endUser.SectionCategory       = NFMUtil.getMapValue(transferMap, 'Department_Class_Label__c', acc.Department_Class__r.Department_Class_Label__c, iflog);
                    //endUser.SectionName           = acc.Department_Name__c;
                    endUser.SectionName           = acc.name;
                    //NFM624触发001和201接口 LY 20221109 start
                    if(UserInfo.getUserId().equals(System.Label.interfaceUserID)){
                        endUser.SectionName           = acc.Hospital__r.Name+' '+acc.Department_Class__r.Department_Class_Label__c+' '+acc.Department_Name__c;
                    }else{
                        endUser.SectionName           = acc.name;
                    }
                    //NFM624触发001和201接口 LY 20221109 end
                    endUser.SectionCode           = acc.Management_Code__c;
                    //endUser.NeedQuolified         = acc.Hospital__r.If_Need_Quolified__c;
                    endUser.NeedQuolified         = false;
@@ -277,9 +288,17 @@
            // エラーが発生した場合
            System.debug(Logginglevel.ERROR, 'NFM201_' + iflog.Name + ':' + ex.getMessage());
            System.debug(Logginglevel.ERROR, 'NFM201_' + iflog.Name + ':' + ex.getStackTraceString());
            logstr += ex.getMessage();
            iflog.ErrorLog__c += ex.getMessage() + '\n';
            iflog.ErrorLog__c += ex.getStackTraceString() + '\n';
            //NFM624触发001和201接口 20221102 LY start
            // Callout from triggers are currently not supported.
            System.debug('NFM201jiekou'+ex.getMessage());
            if (!String.valueOf(ex.getMessage()).contains('Callout from triggers')) {
                logstr += ex.getMessage();
                iflog.ErrorLog__c += ex.getMessage() + '\n';
                iflog.ErrorLog__c += ex.getStackTraceString() + '\n';
            }
            //NFM624触发001和201接口 20221102 LY end
            if (rowData.retry_cnt__c == null) rowData.retry_cnt__c = 0;
            if (rowData.retry_cnt__c < batch_retry_max_cnt) {
force-app/main/default/classes/NFM624Rest.cls
@@ -50,6 +50,10 @@
        public Boolean AgentFlag; //经销商标识
        public String ApproverID; //审核人员员工编码
        public String DataId;//aws存储凭据
        //邮件624接口新增字段需求 20220706 LY Start
        public String ApproveDate;                 //智慧医疗首次认证通过时间
        //邮件624接口新增字段需求 20220706 LY End
    }
 
    @HttpPost
@@ -234,10 +238,11 @@
                                                      // 通过姓名+手机号判断人员是否重复 thh 20220518 start
                                                      MobilePhone_Encrypted__c
                                                      // 通过姓名+手机号判断人员是否重复 thh 20220518 end
                                                      ,Account.Department_Class__r.Name
                                                      from Contact 
                                                      where CManageCode__c IN: PersonManagementCodeList 
                                                      OR (Account.Parent_PlatformCode__c IN: ManagementList AND LastName_Encrypted__c IN:NameList)
                                                      OR (Account.Parent_Management_Code__c IN: SFDCCodeList AND LastName_Encrypted__c IN:NameList )
                                                      OR (Account.Parent_PlatformCode__c IN: ManagementList AND LastName_Encrypted__c IN:NameList AND UnifiedI_Contact_ID__c = null)
                                                      OR (Account.Parent_Management_Code__c IN: SFDCCodeList AND LastName_Encrypted__c IN:NameList AND UnifiedI_Contact_ID__c = null)
                                                      ORDER BY  MobilePhone ASC,CManageCode__c ASC]; //根据人员管理编码检索联系人
                Map < String, Contact > peopleMap = new Map < String, Contact > (); //联系人
                system.debug('peopleList  '+peopleList);
@@ -246,12 +251,15 @@
                        Map < String, Contact > snameMap = new Map < String, Contact > ();
                        string namekey;
                        string nameKey2;
                        string nameKey3;
                        if(String.isBlank(ct.MobilePhone_Encrypted__c)){
                           namekey = ct.Account.Name + ' ' + ct.LastName_Encrypted__c.trim();
                           nameKey2 = ct.Account.Management_Code__c + ' ' + ct.LastName_Encrypted__c.trim();
                           nameKey3 = ct.Account.Department_Class__r.Name + ' ' + ct.LastName_Encrypted__c.trim();
                        } else{
                           namekey = ct.Account.Name + ' ' + ct.LastName_Encrypted__c.trim() + ' ' + ct.MobilePhone_Encrypted__c.trim();
                           nameKey2 = ct.Account.Management_Code__c + ' ' + ct.LastName_Encrypted__c.trim() + ' ' + ct.MobilePhone_Encrypted__c.trim();
                           nameKey3 = ct.Account.Department_Class__r.Name + ' ' + ct.LastName_Encrypted__c.trim() + ' ' + ct.MobilePhone_Encrypted__c.trim();
                        }
                        // snameMap.put(namekey,ct);
                        if (nameMap.containsKey(ct.Account.parent.Name)) {
@@ -259,6 +267,7 @@
                        }
                        snameMap.put(namekey, ct);
                        snameMap.put(nameKey2,ct);
                        snameMap.put(nameKey3,ct);
                        // // 通过姓名+手机号判断人员是否重复 thh 20220518 start
                        // if(String.isBlank(ct.MobilePhone_Encrypted__c)){
                        //     snameMap.put(ct.LastName_Encrypted__c.trim(), ct);
@@ -311,6 +320,7 @@
                List < Account > upsertAccountList = new List < Account > ();
                //联系人List(更新用) 
                List < Contact > upsertContactList = new List < Contact > ();
                List < Contact > upsertContactList1 = new List < Contact > ();
 
                for (Gedata gedata: newGeDataList) {
                    logstr += gedata.Name;
@@ -345,12 +355,20 @@
                        ct.Contact_address__c = gedata.ContactAddress;//联系地址
                        ct.Contact_address_Encrypted__c=gedata.ContactAddressEncrypted;//联系地址密文 add 20220215
                        ct.Platform_disabled_representation__c = gedata.ForbiddenStatus;//平台禁用标识
                        //LLIU-CFF7DD 【委托】客户人员信息有效/无效为“空”的处理 LY 20220616 strat
                        if (gedata.ForbiddenStatus == false) {
                            ct.Isactive__c =  '有效';
                        }
                        //LLIU-CFF7DD 【委托】客户人员信息有效/无效为“空”的处理 LY 20220616 end
                        //ct.IsFromPlatform__c = true; //来自智慧医疗创建
                        ct.Ignore_Same_Name__c = true; //不是重复的客户名 
                        //ct.SendToComPlat__c = true;
                        ct.AWS_Data_Id__c =gedata.DataId;//add 20220215 aws存储凭证
                        ct.MobilePhone_Encrypted__c =gedata.MobileEncrypted;//add 20220215 手机密文
                        ct.LastName_Encrypted__c =gedata.NameEncrypted;//add 20220215 姓名密文
                        //邮件624接口新增字段需求 20220706 LY Start
                        ct.ApproveDate__c =NFMUtil.parseDateTimeStr2Date(gedata.ApproveDate);                //智慧医疗首次认证通过时间
                        //邮件624接口新增字段需求 20220706 LY End
                    }
                    
 
@@ -362,7 +380,7 @@
                        //更新经销商联系人
                        if (!peopleMap.containsKey(personCode)) {
                            rowData.Is_Error__c = 1;
                            logstr += 'error:人员管理编码 [PersonManagementCode] 对应的联系人不存在,此条数据跳过';
                            logstr += 'error:人员管理编码'+personCode+'对应的联系人不存在,请确认。';
                            continue;
                        }
                        ct.id = peopleMap.get(personCode).id;
@@ -383,6 +401,9 @@
                                string DepartmentCode = string.isNotBlank(gedata.RelatedDepartment) ? gedata.RelatedDepartment : gedata.DepartmentManagementCode2;
                                string DepartmentClasskey = gedata.AccountName + ' ' + gedata.DepartmentClass;
                                system.debug('DepartmentClasskey------->'+DepartmentClasskey);
                                system.debug('DepartmentCode------->'+DepartmentCode);
                                system.debug('AccountMap------->'+AccountMap);
                                system.debug('AccountMap.containsKey(DepartmentCode)------->'+AccountMap.containsKey(DepartmentCode));
                                //科室存在
                                if (AccountMap.containsKey(DepartmentCode)) {
                                    //人员管理编码存在
@@ -399,7 +420,7 @@
                                        } else { //联系人不存在 2 完成
                                            system.debug('2逻辑 有医院 有科室 有人员管理编码但查找无此人 动作:报错');
                                            rowData.Is_Error__c = 1;
                                            logstr += 'error:人员管理编码 [PersonManagementCode] 对应的联系人不存在,此条数据跳过';
                                            logstr += 'error:人员管理编码'+personCode+'对应的联系人不存在,请确认。';
                                            continue;
                                        }
                                    } else { //人员管理编码不存在
@@ -451,27 +472,36 @@
                                        } else { //人员管理编码查找无值 4 完成
                                            system.debug('4逻辑');
                                            rowData.Is_Error__c = 1;
                                            logstr += 'error:人员管理编码 [PersonManagementCode] 对应的联系人不存在,此条数据跳过';
                                            logstr += 'error:人员管理编码'+personCode+'对应的联系人不存在,请确认。';
                                            continue;
                                        }
                                    } else { //人员管理编码不存在
                                        system.debug('人员管理编码不存在');
                                        string namekey = gedata.DepartmentName + ' ' + gedata.NameEncrypted + ' ' + gedata.MobileEncrypted;
                                        //string namekey = gedata.DepartmentName + ' ' + gedata.NameEncrypted + ' ' + gedata.MobileEncrypted;
                                        string namekey = DepartmentClasskey + ' ' + gedata.NameEncrypted;
                                        //string namekey = gedata.DepartmentName + ' ' + gedata.NameEncrypted;
                                        //string namekey = '8103587' + ' ' + gedata.NameEncrypted;
                                        //string namekey = gedata.AccountName + ' ' + gedata.DepartmentName + ' ' + gedata.DepartmentClass + ' ' + gedata.Name;
                                        system.debug('DepartmentClasskey'+DepartmentClasskey);
                                        system.debug('351nameMap     '+nameMap);
                                        system.debug('nameMap.get(DepartmentClasskey)'+nameMap.get(DepartmentClasskey));
                                        if (nameMap.containsKey(DepartmentClasskey)) { //查找是否存在该战略科室 
                                            System.debug('人员管理编码不存在的情况下战略科室存在');
                                            system.debug('战略科室存在' + nameMap.get(DepartmentClasskey));
                                            Map < String, Contact > sMap = nameMap.get(DepartmentClasskey);
                                            system.debug('namekey'+namekey);
                                            system.debug('sMap.containsKey(namekey)'+sMap.containsKey(namekey));
                                            system.debug('sMap.keySet'+sMap.keySet());
                                            system.debug('sMap.containsKey(namekey)'+sMap.get(namekey));
                                            //system.debug('sMap.containsKey(namekey)8103587 '+sMap.get('8103587 '+gedata.NameEncrypted));
                                            //system.debug('sMap.containsKey(namekey)北京大学第三医院 普外科 手动创建科室4'+sMap.get('北京大学第三医院 普外科 手动创建科室4 '+gedata.NameEncrypted));
                                            //if (sMap.containsKey(namekey)) { //查找存在 8 完成
                                            if (sMap.containsKey(namekey)) { //查找存在 8 完成
                                                system.debug('8逻辑');
                                                system.debug('该联系人存在');
                                                ct.id = sMap.get(namekey).id;
                                                //upsertAccountList.add(dpt);//可以注释
                                                upsertContactList.add(ct);
                                                system.debug('list里的联系人信息'+upsertContactList);
                                                // if(sMap.containsKey(gedata.Name)){
                                                //     ct.Id = sMap.get(gedata.Name).Id;
                                                // }
@@ -489,11 +519,22 @@
                                            contactMap.put(Gedata.DepartmentManagementCode2, ct);
                                            system.debug('contactMap        '  +  contactMap);
                                            //upsertContactList.add(ct);
                                        }else{
                                            system.debug('创建联系人和科室');
                                            //system.debug('peopleList[0]'+peopleList[0]);
                                            if (peopleList.size()>0) {
                                                ct.id = peopleList[0].ID;
                                            }
                                            // dpt.Department_Name__c = gedata.DepartmentName;
                                            // upsertAccountList.add(dpt);
                                            contactMap.put(Gedata.DepartmentManagementCode2, ct);
                                            system.debug('122222222222222222222contactMap'+contactMap);
                                        }
                                        system.debug('创建联系人和科室');
                                        dpt.Department_Name__c = gedata.DepartmentName;
                                        upsertAccountList.add(dpt);
                                        contactMap.put(Gedata.DepartmentManagementCode2, ct);
                                    }
                                }
                            }else if('无效'.equals(hospital.Is_Active_Formula__c)){
@@ -515,6 +556,9 @@
                            hp.OCM_Category__c = 'L';
                            hp.PlatformCode__c = gedata.HospitalManagementCode2;
                            hp.State_Master__c = StateMap.get(gedata.State); //  省
                            //Ly 省文本赋值 start
                            hp.State_Text__c = gedata.State; //  省(文本)
                            //Ly 省文本赋值 end
                            hp.City_Master__c = CityMap.get(gedata.City); //     市
                            hp.Hospital_Source__c = '智慧医疗';
                            upsertAccountList.add(hp);
@@ -525,7 +569,9 @@
                    system.debug('upsertContactList      ' + upsertContactList);
                    system.debug('upsertAccountList      ' + upsertAccountList);
                    if (upsertAccountList.size() > 0) {
                        ControllerUtil.EscapeNFM001Trigger = true;
                        //放开触发201接口条件 20221102 LY start
                        //ControllerUtil.EscapeNFM001Trigger = true;
                        //放开触发201接口条件 20221102 LY end
                        StaticParameter.EscapeNFM001AgencyContractTrigger2 = true;
                        system.debug('upsertAccountList                           ' + upsertAccountList);
                        upsert upsertAccountList;
@@ -540,14 +586,15 @@
                            system.debug('ContactMap'+ContactMap);
                            system.debug('ContactMap.containsKey(ac.PlatformCode__c)'+ContactMap.containsKey(ac.PlatformCode__c));
                            if(ContactMap.containsKey(ac.PlatformCode__c)){
                                c = contactMap.get(ac.PlatformCode__c);
                                if(string.isblank(c.Id)|| c.AccountId != ac.Id){
                                    c.Accountid = ac.id;
                                }
                                c.OwnerId = ac.OwnerId;
                                upsertContactList.add(c);
                                upsertContactList1.add(c);
                                system.debug('OwnerId'+ac.OwnerId);
                                system.debug('upsertContactList'+upsertContactList);
                                system.debug('upsertContactList1'+upsertContactList1);
                            }
 
                            if(ac.RecordTypeId == '01210000000QemGAAS' && ac.Is_Active__c == '草案中' && string.isNotBlank( OCSMMap.get(ac.OCM_man_province_HP__c))){
@@ -570,6 +617,10 @@
                        // Database.executeBatch(new NFM623RestBatch(), 1);
                        supplement(gedata.ContactId);
                    }
                    if(upsertContactList1.size()>0){
                        upsert upsertContactList1;
                    }
                }
            }
            rowData.retry_cnt__c = 0;
force-app/main/default/classes/NFM624RestAbout.cls
@@ -16,10 +16,10 @@
    global class GeDatas {
        public NFMUtil.Monitoring Monitoring;
        public GeData[] GeData;
        }
    global class GeData{
      }
  global class GeData{
           public String PersonManagementCode; //人员管理编码
         public String PersonManagementCode; //人员管理编码
        public String HospitalManagementCode2; //医院平台编码  平台编码 PlatformCode__c
        public String DepartmentManagementCode2; //科室平台编码  平台编码 PlatformCode__c
        //public String Name; //姓名
@@ -29,7 +29,7 @@
        public String DepartmentName; //所属科室
        public String RelatedDepartment; //关联SFDC科室 客户管理编码(手写) AgentCode_Ext__c
        //public Boolean AgentFlag; //经销商标识
        public String dataId;
      public String dataId;
        public String AccountName; //医院名
        public String MobileEncrypted; //电话密文 add 20220519 thh
    }
@@ -39,11 +39,11 @@
    global class Response {
        public List<ResponseDetail> ResponseDetails {get;set;}
    }
    global class ResponseDetail{
        public String  dataId;
        public String  awsDataId; //=CONTACT.AWS_Data_Id__c
        public String  sfId;
      public String  dataId;
      public String  awsDataId; //=CONTACT.AWS_Data_Id__c
      public String  sfId;
    }  
 
    @HttpPost
@@ -201,8 +201,8 @@
                                                       //AccountId 
                                                       from Contact 
                                                       where CManageCode__c IN: PersonManagementCodeList 
                                                      OR (Account.Parent_PlatformCode__c IN: ManagementList AND LastName_Encrypted__c IN:NameList)
                                                      OR (Account.Parent_Management_Code__c IN: SFDCCodeList AND LastName_Encrypted__c IN:NameList )
                                                      OR (Account.Parent_PlatformCode__c IN: ManagementList AND LastName_Encrypted__c IN:NameList AND UnifiedI_Contact_ID__c = null)
                                                      OR (Account.Parent_Management_Code__c IN: SFDCCodeList AND LastName_Encrypted__c IN:NameList AND UnifiedI_Contact_ID__c = null)
                                                      ORDER BY  MobilePhone ASC,CManageCode__c ASC]; //根据人员管理编码检索联系人
                 Map < String, Contact > peopleMap = new Map < String, Contact > (); //联系人
                 system.debug('peopleList  '+peopleList);
@@ -211,12 +211,15 @@
                         Map < String, Contact > snameMap = new Map < String, Contact > ();
                         string namekey;
                         string nameKey2;
                         string nameKey3;
                         if(String.isBlank(ct.MobilePhone_Encrypted__c)){
                            namekey = ct.Account.Name + ' ' + ct.LastName_Encrypted__c.trim();
                            nameKey2 = ct.Account.Management_Code__c + ' ' + ct.LastName_Encrypted__c.trim();
                            nameKey3 = ct.LastName_Encrypted__c.trim();
                         } else{
                            namekey = ct.Account.Name + ' ' + ct.LastName_Encrypted__c.trim() + ' ' + ct.MobilePhone_Encrypted__c.trim();
                            nameKey2 = ct.Account.Management_Code__c + ' ' + ct.LastName_Encrypted__c.trim() + ' ' + ct.MobilePhone_Encrypted__c.trim();
                            nameKey3 = ct.LastName_Encrypted__c.trim() + ' ' + ct.MobilePhone_Encrypted__c.trim();
                         }
                         snameMap.put(namekey,ct);
                         if (nameMap.containsKey(ct.Account.parent.Name)) {
@@ -224,6 +227,7 @@
                         }
                         snameMap.put(nameKey2,ct); 
                         snameMap.put(namekey, ct);
                         snameMap.put(namekey3, ct);
                         // // 通过姓名+手机号判断人员是否重复 thh 20220518 start
                         // System.System.debug('ct.MobilePhone_Encrypted__c1:' + ct.MobilePhone_Encrypted__c);
                         // if(String.isBlank(ct.MobilePhone_Encrypted__c)){
@@ -238,6 +242,7 @@
                     }
                     peopleMap.put(ct.CManageCode__c, ct);
                     System.debug('peopleMap'+peopleMap);
                     System.debug('nameMap111'+nameMap);
                 }
                 for (Gedata gedata: newGeDataList) {
                     String personCode = gedata.PersonManagementCode;
@@ -263,6 +268,8 @@
                        //无人员管理编码
                        string namekey = gedata.RelatedDepartment + ' ' + gedata.NameEncrypted + ' ' + gedata.MobileEncrypted;
                        string namekey1 = gedata.RelatedDepartment + ' ' + gedata.NameEncrypted;
                        string namekey2 = gedata.NameEncrypted + ' ' + gedata.MobileEncrypted;
                        string namekey3 = gedata.NameEncrypted;
                        system.debug('DepartmentClasskey     =    '+DepartmentClasskey);
                        system.debug('nameMap22222222    '+nameMap);
                        if (nameMap.containskey(DepartmentClasskey)) { 
@@ -280,9 +287,14 @@
                                red.sfid = sMap.get(namekey1).id;
                                
                            // // 通过姓名+手机号判断人员是否重复 thh 20220518 start
                            // } else if(sMap.containsKey(gedata.NameEncrypted + gedata.MobileEncrypted) && sMap.get(gedata.NameEncrypted + gedata.MobileEncrypted).UnifiedI_Contact_ID__c == null){
                                // red.awsDataId = sMap.get(gedata.NameEncrypted + gedata.MobileEncrypted).AWS_Data_Id__c;
                                // red.sfid = sMap.get(gedata.NameEncrypted + gedata.MobileEncrypted).id;
                            } else if(sMap.containsKey(namekey2) ){
                                system.debug('战略科室存在科室为空电话有值');
                                red.awsDataId = sMap.get(namekey2).AWS_Data_Id__c;
                                red.sfid = sMap.get(namekey2).id;
                            }else if(sMap.containsKey(namekey3)){
                                system.debug('战略科室存在科室为空电话无值');
                                red.awsDataId = sMap.get(namekey3).AWS_Data_Id__c;
                                red.sfid = sMap.get(namekey3).id;
                            // // 通过姓名+手机号判断人员是否重复 thh 20220518 end
                            }else { // 7 完成
                                system.debug('根据名字匹配不存在');
@@ -294,6 +306,11 @@
                            responseList.ResponseDetails.add(red);
                            system.debug('responseList.ResponseDetails'+responseList.ResponseDetails);
                        }else{
                            system.debug('战略科室不存在');
                            if (peopleList.size()>0 && peopleList[0].MobilePhone_Encrypted__c ==null) {
                                red.awsDataId =peopleList[0].AWS_Data_Id__c;
                                red.sfid =peopleList[0].id;
                            }
                            responseList.ResponseDetails.add(red);
                        }
                    }    
force-app/main/default/triggers/NFM001.trigger
@@ -159,7 +159,7 @@
                }
            }
            // OCM_Category__cについて病院しかつかってないため、診療科より変更はありえない
            if (Trigger.oldMap.get(a.Id).get('OCM_Category__c') != a.OCM_Category__c && needSendRectMap.get(a.RecordTypeId) == '病院' && isChanged == false) {
            if (null!=a.OCSMField2__c||(Trigger.oldMap.get(a.Id).get('OCM_Category__c') != a.OCM_Category__c && needSendRectMap.get(a.RecordTypeId) == '病院' && isChanged == false)) {
                isChanged = true;
                NFM001Controller.debug_msg = 'OCM_Category__c';
                needChild = true;
@@ -296,8 +296,14 @@
        insert iflog;
        iflog = [Select Id, Name from BatchIF_Log__c where Id = :iflog.Id];
        System.debug(Logginglevel.DEBUG, 'NFM001_' + iflog.Name + ' start');                  // callout の中 end のlogを出します
        NFM001Controller.callout(iflog.Id, accIds, purposeOfAdviceMap, needSendRectMap);
        //NFM624触发001和201接口 20221102 LY start
        //NFM001Controller.callout(iflog.Id, accIds, purposeOfAdviceMap, needSendRectMap);
        if(UserInfo.getUserId().equals(System.Label.interfaceUserID)){
            NFM001Controller.calloutNotFuture(iflog.Id, accIds, purposeOfAdviceMap, needSendRectMap);
        } else {
            NFM001Controller.callout(iflog.Id, accIds, purposeOfAdviceMap, needSendRectMap);
        }
        //NFM624触发001和201接口 20221102 LY end
        // LHJ 向SPO传NFM201 Start
        NFM201Controller.debug_msg = accIds.size() + ',' + NFM201Controller.debug_msg;
        BatchIF_Log__c iflog201 = new BatchIF_Log__c();
@@ -308,7 +314,14 @@
        System.debug(Logginglevel.DEBUG, 'NFM201_' + iflog201.Name + ' start');                  // callout の中 end のlogを出します
        //NFM201Controller.callout(iflog201.Id, accIds, purposeOfAdviceMap, needSendRectMap);
        if(!System.Test.isRunningTest()){
        NFM201Controller.callout(iflog201.Id, accIds, purposeOfAdviceMap, needSendRectMap, needQuolifiedMap);
            //NFM624触发001和201接口 20221102 LY start
            //NFM201Controller.callout(iflog201.Id, accIds, purposeOfAdviceMap, needSendRectMap, needQuolifiedMap);
            if(UserInfo.getUserId().equals(System.Label.interfaceUserID)){
                NFM201Controller.calloutNotFuture(iflog201.Id, accIds, purposeOfAdviceMap, needSendRectMap, needQuolifiedMap);
            } else {
                NFM201Controller.callout(iflog201.Id, accIds, purposeOfAdviceMap, needSendRectMap, needQuolifiedMap);
            }
            //NFM624触发001和201接口 20221102 LY end
        }
        // LHJ End
        //NFM201Controller.debug_msg = accIds.size() + ',' + NFM201Controller.debug_msg;