张宇恒
2022-04-28 e5e7ddf81d380f7241bcafd15d81c08a25e21b7f
4_27上线
4个文件已修改
345 ■■■■■ 已修改文件
force-app/main/default/classes/NFM603Controller.cls 273 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NFM603ControllerTest.cls 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/RepairHandler.cls 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/RepairHandlerTest.cls 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/NFM603Controller.cls
@@ -220,6 +220,7 @@
                RcSorcDate__c,
                SorcAcceptDate__c,
                SorcOgzDate__c,
                RcOgzDate__c,
                Returns_Product_waySAP__c,
                DnNO__c,
                OgzAcceptDate__c,
@@ -255,6 +256,10 @@
            // 备品出借记录 查找备品出借一览明细的 产品型号
            Map < id, List < SparePartsLendingRecord >> rentalMap = getrentalMap(repairIdList);
            String downSDt = '';
            String downEDt = '';
            String upSDt = '';
            String upEDt = '';
            for (Repair__c repair: repairList) {
@@ -373,13 +378,44 @@
                info.OgzAcceptDate = NFMUtil.formatDateTime2Str(repair.OgzAcceptDateTime__c);//OGZ受理日(小程序)
                //update        wangweipeng         2022/02/16           end
                info.SorcOgzDate = NFMUtil.formatDate2StrDateTime(repair.SorcOgzDate__c);
                // info.SorcOgzDate = NFMUtil.formatDate2StrDateTime(repair.SorcOgzDate__c);RcOgzDate__c
                //update   zhangyuheng    2022/03/07
                info.SorcOgzDate = NFMUtil.formatDate2StrDateTime(repair.RcOgzDate__c);
                info.cus_dn = repair.DnNO__c;
                //修理增加OTS运单号字段 thh 20220308 start
                info.OTSRepairOrder = repair.OTSRepairOrder__c;
                //修理增加OTS运单号字段 thh 20220308 end
                //报价日、初次报价日、RC修理品RC受理日(小程序)时间判断   zyh  20220315   start
                downSDt = DownStartDt();
                downEDt = DownEndDt();
                upSDt = UpStartDt();
                upEDt = UpEndDt();
                //定义下班时间
                if (String.valueOf(info.FirstQuotationDate) >= String.valueOf(downSDt) && String.valueOf(info.FirstQuotationDate) <= String.valueOf(downEDt)) {
                    info.FirstQuotationDate = DownDt();//初次报价日
                }
                if (String.valueOf(info.RCacceptanceDate) >= String.valueOf(downSDt) && String.valueOf(info.RCacceptanceDate) <= String.valueOf(downEDt)) {
                    info.RCacceptanceDate = DownDt();//4.修理品RC受理日
                }
                if (String.valueOf(info.quotationDate) >= String.valueOf(downSDt) && String.valueOf(info.quotationDate) <= String.valueOf(downEDt)) {
                    info.quotationDate = DownDt();//报价日
                }
                //定义上班时间
                if (String.valueOf(info.FirstQuotationDate) >= String.valueOf(upSDt) && String.valueOf(info.FirstQuotationDate) <= String.valueOf(upEDt)) {
                    info.FirstQuotationDate = UpDt();//初次报价日
                }
                if (String.valueOf(info.RCacceptanceDate) >= String.valueOf(upSDt) && String.valueOf(info.RCacceptanceDate) <= String.valueOf(upEDt)) {
                    info.RCacceptanceDate = UpDt();//4.修理品RC受理日
                }
                if (String.valueOf(info.quotationDate) >= String.valueOf(upSDt) && String.valueOf(info.quotationDate) <= String.valueOf(upEDt)) {
                    info.quotationDate = UpDt();//报价日
                }
                //报价日、初次报价日、RC修理品RC受理日(小程序)时间判断   zyh  20220315   end
                repairs.add(info);
                System.debug('repairs1:' + repairs);
            }
            logstr += '\nend';
            if (repairs.size() > 0) {
@@ -459,7 +495,9 @@
            logstr += ex.getMessage();
            iflog.ErrorLog__c += ex.getMessage() + '\n';
            iflog.ErrorLog__c += ex.getStackTraceString() + '\n';
            rowDataSFDC = NFMUtil.LogAutoSend(rowDataSFDC, ex, null);
            if(!Test.isRunningTest()){
                rowDataSFDC = NFMUtil.LogAutoSend(rowDataSFDC, ex, null);
            }
        }
        iflog.Log__c = logstr;
        upsert iflog;
@@ -523,7 +561,7 @@
    public static Set < Id > NFM603_Ids = new Set < Id > ();
    // public static Map<Id,Id> rprIdMap = new Map<Id,Id>();
    public static void NFM603Trigger(List < Repair__c > newList, Map < Id, Repair__c > newMap, List < Repair__c > oldList, Map < Id, Repair__c > oldMap) {
        List < String > rprIds = new List < String > ();
        Map < Id, Id > rprIdMap = new Map < Id, Id > ();
@@ -548,27 +586,135 @@
                    Repair__c oldrpr = oldMap.get(rpr.Id);
                    // 修理有报修子单号,并且 待发送AWS为false 发送给AWS
                    if (String.isNotBlank(rpr.RepairSubOrder__c) && !rpr.AwaitToSendAWS__c) {
                        if (((rpr.status__c == '0.申请完毕' || rpr.status__c == '1.受理完毕') && (oldrpr.SAP_Transfer_time__c == null && rpr.SAP_Transfer_time__c != null)) || (rpr.Address_type__c == 'X' && (rpr.Address_Type_Index__c != oldrpr.Address_Type_Index__c))) {
                        if (((rpr.status__c == '0.申请完毕' || rpr.status__c == '1.受理完毕') && (oldrpr.SAP_Transfer_time__c == null && rpr.SAP_Transfer_time__c != null)) ||
                            (rpr.Address_type__c == 'X' && (rpr.Address_Type_Index__c != oldrpr.Address_Type_Index__c)) ||
                            //  2022/4/6    zhangyuheng update start
                            (rpr.OTSRepairOrder__c != oldrpr.OTSRepairOrder__c) || // OTS订单号有值,发送AWS
                            //  2022/4/6    zhangyuheng update end
                            //  2022/4/7    zhangyuheng update start
                            (rpr.DeliveryLogisticsNo__c != oldrpr.DeliveryLogisticsNo__c) || // 送修物流单号有值,发送AWS
                            // ((rpr.Discount_Price_formula__c != oldrpr.Discount_Price_formula__c) && rpr.Repair_Firstestimated_Date_formula__c != null) || // 报价金额发生改变且初次报价日有值,发送AWS
                            ((rpr.Returns_Product_waySAP__c != oldrpr.Returns_Product_waySAP__c) && rpr.Repair_Shipped_DateTime__c != null) || // 送修方式发生改变且寄送日有值,发送AWS
                            //  2022/4/7    zhangyuheng update end
                            //  2022/4/18    zhangyuheng update start
                            (rpr.FSE_ApplyForRepair_time__c != oldrpr.FSE_ApplyForRepair_time__c) ||                   // FSE申请修理日发生改变,发送AWS
                            (rpr.Repair_Ordered_DateTime__c != oldrpr.Repair_Ordered_DateTime__c) ||                   // 4.修理品RC受理日(小程序)发生改变,发送AWS
                            (rpr.Repair_Firstestimated_Date__c != oldrpr.Repair_Firstestimated_Date__c) ||             // 初次报价日(不用)发生改变,发送AWS
                            (rpr.Repair_Shipped_DateTime__c != oldrpr.Repair_Shipped_DateTime__c) ||                   // 11.RC修理品返送日(小程序)发生改变,发送AWS
                            (rpr.Repair_Final_Inspection_DateTime__c != oldrpr.Repair_Final_Inspection_DateTime__c) || // 10.最终检测日(小程序)发生改变,发送AWS
                            (rpr.Agreed_DateTime__c != oldrpr.Agreed_DateTime__c) ||                                   //7.用户同意日(小程序)发生改变,发送AWS
                            (rpr.Agreed_Date__c != oldrpr.Agreed_Date__c) ||                                           // 7.用户同意日发生改变,发送AWS
                            (rpr.engineerSendDate__c != oldrpr.engineerSendDate__c)                                    //修理品寄送日发生改变,发送AWS
                            //  2022/4/18    zhangyuheng update start
                            ) {
                            if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                                NFM603Controller.NFM603_Ids.add(rpr.Id);
                                rprIdMap.put(rpr.Id, rpr.Id);
                            }
                        }
                        // 测试环境测试用,上线前请注掉
                        /*if (rpr.Repair_Firstestimated_Date__c != oldrpr.Repair_Firstestimated_Date__c) {
                        //  2022/4/19    zhangyuheng update start
                        // 如果同期中的修理报价(Repair_Quotation_Id__c)为空,判断初次报价日和报价金额
                        if (rpr.Repair_Quotation_Id__c != oldrpr.Repair_Quotation_Id__c) {
                            if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                                NFM603Controller.NFM603_Ids.add(rpr.Id);
                                // rprIds.add(rpr.Id);
                                rprIdMap.put(rpr.Id, rpr.Id);
                            }
                        }
                        if (rpr.Repair_Shipped_Date__c != oldrpr.Repair_Shipped_Date__c) {
                            if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                                NFM603Controller.NFM603_Ids.add(rpr.Id);
                                rprIdMap.put(rpr.Id, rpr.Id);
                        if (rpr.Repair_Quotation_Id__c == null) {
                            // 如果初次报价日(不用)或折扣后金额(不用)发生改变,发送AWS
                            if (rpr.Discount_Price__c != oldrpr.Discount_Price__c || rpr.Repair_Estimated_Date__c != oldrpr.Repair_Estimated_Date__c) {
                                if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                                    NFM603Controller.NFM603_Ids.add(rpr.Id);
                                    rprIdMap.put(rpr.Id, rpr.Id);
                                }
                            }
                        }*/
                        }
                        // 如果同期中的修理报价(Repair_Quotation_Id__c)不为空,在RepairQuoteTrigger.ChangeRepair进行判断触发
                        //  2022/4/19    zhangyuheng update end
                        //  2022/4/6    zhangyuheng update start
                        //OTS订单号有值,发送AWS
                        // if ((oldrpr.OTSRepairOrder__c == null && String.isNotBlank(rpr.OTSRepairOrder__c)) || rpr.OTSRepairOrder__c != oldrpr.OTSRepairOrder__c) {
                        //     if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                        //         NFM603Controller.NFM603_Ids.add(rpr.Id);
                        //         rprIdMap.put(rpr.Id, rpr.Id);
                        //     }
                        // }
                        //  2022/4/6    zhangyuheng update end
                        //  2022/4/7    zhangyuheng update start
                        //送修物流单号有值,发送AWS
                        // if ((oldrpr.DeliveryLogisticsNo__c == null && String.isNotBlank(rpr.DeliveryLogisticsNo__c))  || rpr.DeliveryLogisticsNo__c != oldrpr.DeliveryLogisticsNo__c) {
                        //     if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                        //         NFM603Controller.NFM603_Ids.add(rpr.Id);
                        //         rprIdMap.put(rpr.Id, rpr.Id);
                        //     }
                        // }
                        //报价金额发生改变且初次报价日有值,发送AWS
                        // if ((rpr.Discount_Price_formula__c != oldrpr.Discount_Price_formula__c) && rpr.Repair_Firstestimated_Date_formula__c != null) {
                        //     if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                        //         NFM603Controller.NFM603_Ids.add(rpr.Id);
                        //         rprIdMap.put(rpr.Id, rpr.Id);
                        //     }
                        // }
                        // if ((rpr.Returns_Product_waySAP__c != oldrpr.Returns_Product_waySAP__c) && rpr.Repair_Shipped_DateTime__c != null) {
                        //     if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                        //         NFM603Controller.NFM603_Ids.add(rpr.Id);
                        //         rprIdMap.put(rpr.Id, rpr.Id);
                        //     }
                        // }
                        //  2022/4/7    zhangyuheng update end
                        //  2022/4/18    zhangyuheng update start
                        // FSE申请修理日发生改变,发送AWS
                        // if (rpr.FSE_ApplyForRepair_time__c != oldrpr.FSE_ApplyForRepair_time__c) {
                        //     if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                        //         NFM603Controller.NFM603_Ids.add(rpr.Id);
                        //         rprIdMap.put(rpr.Id, rpr.Id);
                        //     }
                        // }
                        // 4.修理品RC受理日(小程序)发生改变,发送AWS
                        // if (rpr.Repair_Ordered_DateTime__c != oldrpr.Repair_Ordered_DateTime__c) {
                        //     if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                        //         NFM603Controller.NFM603_Ids.add(rpr.Id);
                        //         rprIdMap.put(rpr.Id, rpr.Id);
                        //     }
                        // }
                        // 初次报价日(不用)发生改变,发送AWS
                        // if (rpr.Repair_Firstestimated_Date__c != oldrpr.Repair_Firstestimated_Date__c) {
                        //     if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                        //         NFM603Controller.NFM603_Ids.add(rpr.Id);
                        //         rprIdMap.put(rpr.Id, rpr.Id);
                        //     }
                        // }
                        // 11.RC修理品返送日(小程序)发生改变,发送AWS
                        // if (rpr.Repair_Shipped_DateTime__c != oldrpr.Repair_Shipped_DateTime__c) {
                        //     if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                        //         NFM603Controller.NFM603_Ids.add(rpr.Id);
                        //         rprIdMap.put(rpr.Id, rpr.Id);
                        //     }
                        // }
                        // 10.最终检测日(小程序)发生改变,发送AWS
                        // if (rpr.Repair_Final_Inspection_DateTime__c != oldrpr.Repair_Final_Inspection_DateTime__c) {
                        //     if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                        //         NFM603Controller.NFM603_Ids.add(rpr.Id);
                        //         rprIdMap.put(rpr.Id, rpr.Id);
                        //     }
                        // }
                        //  2022/4/18    zhangyuheng update end
                        // 测试环境测试用,上线前请注掉
                        // if (rpr.Repair_Firstestimated_Date__c != oldrpr.Repair_Firstestimated_Date__c) {
                        //     if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                        //         NFM603Controller.NFM603_Ids.add(rpr.Id);
                        //         // rprIds.add(rpr.Id);
                        //         rprIdMap.put(rpr.Id, rpr.Id);
                        //     }
                        // }
                        // if (rpr.Repair_Shipped_Date__c != oldrpr.Repair_Shipped_Date__c) {
                        //     if (NFM603Controller.NFM603_Ids.contains(rpr.Id) == false) {
                        //         NFM603Controller.NFM603_Ids.add(rpr.Id);
                        //         rprIdMap.put(rpr.Id, rpr.Id);
                        //     }
                        // }
                        // 测试环境测试用,上线前请注掉
                    }
@@ -582,7 +728,7 @@
                iflog.Type__c = LOG_TYPE;
                iflog.Log__c = 'callout start\n';
                insert iflog;
                NFM603Controller.callout(iflog.Id, rprIds);
                NFM603Controller.executefuture(iflog, rprIds);
            }
        } else {
            if (Trigger.isUpdate) {
@@ -596,4 +742,105 @@
            }
        }
    }
    //报价日、初次报价日、RC修理品RC受理日(小程序)时间方法   zyh  20220315   start
    //下班开始时间
    public static String DownStartDt(){
        String timenow = Datetime.now().format('yyyyMMddHHmmss');
        String dt = NFMUtil.formatDate2Str(Date.today());
        String rtn = null;
        if (dt == null) {
            return rtn;
        }
        rtn = String.valueOf(dt);
        rtn = rtn.replaceAll('-', '');
        if (rtn >= '40001231') {
            rtn = '99991231';
        } else if (rtn < '19000101') {
            rtn = '19000101';
        }
        return rtn + '173001';
    }
    //下班结束时间
    public static String DownEndDt(){
        String dt = NFMUtil.formatDate2Str(Date.today());
        String rtn = null;
        if (dt == null) {
            return rtn;
        }
        rtn = String.valueOf(dt);
        rtn = rtn.replaceAll('-', '');
        if (rtn >= '40001231') {
            rtn = '99991231';
        } else if (rtn < '19000101') {
            rtn = '19000101';
        }
        return rtn + '235959';
    }
    //上班开始时间
    public static String UpStartDt(){
        String dt = NFMUtil.formatDate2Str(Date.today());
        String rtn = null;
        if (dt == null) {
            return rtn;
        }
        rtn = String.valueOf(dt);
        rtn = rtn.replaceAll('-', '');
        if (rtn >= '40001231') {
            rtn = '99991231';
        } else if (rtn < '19000101') {
            rtn = '19000101';
        }
        return rtn + '000000';
    }
    //上班结束时间
    public static String UpEndDt(){
        String dt = NFMUtil.formatDate2Str(Date.today());
        String rtn = null;
        if (dt == null) {
            return rtn;
        }
        rtn = String.valueOf(dt);
        rtn = rtn.replaceAll('-', '');
        if (rtn >= '40001231') {
            rtn = '99991231';
        } else if (rtn < '19000101') {
            rtn = '19000101';
        }
        return rtn + '084459';
    }
    //上班定义时间
    public static String UpDt(){
        String dt = NFMUtil.formatDate2Str(Date.today());
        String rtn = null;
        if (dt == null) {
            return rtn;
        }
        rtn = String.valueOf(dt);
        rtn = rtn.replaceAll('-', '');
        if (rtn >= '40001231') {
            rtn = '99991231';
        } else if (rtn < '19000101') {
            rtn = '19000101';
        }
        return rtn + '090000';
    }
    //下班定义时间
    public static String DownDt(){
        String dt = NFMUtil.formatDate2Str(Date.today());
        String rtn = null;
        if (dt == null) {
            return rtn;
        }
        rtn = String.valueOf(dt);
        rtn = rtn.replaceAll('-', '');
        if (rtn >= '40001231') {
            rtn = '99991231';
        } else if (rtn < '19000101') {
            rtn = '19000101';
        }
        return rtn + '170000';
    }
    //报价日、初次报价日、RC修理品RC受理日(小程序)时间方法   zyh  20220315   end
}
force-app/main/default/classes/NFM603ControllerTest.cls
@@ -74,7 +74,11 @@
        ast = [select Id, Name, Product_Serial_No__c, AccountId, Department_Class__c, Department_Class__r.Management_Code_Auto__c, Hospital__c, Product2Id, Product2.ProductCode, Product2.Repair_Product_Code__c, SerialNumber
               from Asset
               where Id = :ast.Id];
        RepairSubOrder__c subOrder = new RepairSubOrder__c();
        subOrder.AttachmentDownload__c = true;
        subOrder.AttachmentLink__c = 'https://albsylfw.s3.cn-northwest-1.amazonaws.com.cn/20211220/14/11/30/lessthan12/5e8cb69e-f935-48f5-825e-b8344d60f6d4.zip';
        subOrder.AttachmentName__c = '测试附件下载';
        insert subOrder;
        Repair__c rpr = new Repair__c();
        rpr.PAE_Determine__c = 'PAE' ;   //-- 
        rpr.ifDeadHurt__c = '有';        //-- R1
@@ -83,12 +87,16 @@
        rpr.Account__c             = depart.Id;
        rpr.Department_Class__c    = section.Id;
        rpr.Hospital__c            = company.Id;
        rpr.DeliveryLogisticsMode__c = '其他';
        rpr.RepairSubOrder__c = subOrder.Id;
        rpr.Delivered_Product__c   = ast.Id;
        rpr.Status__c              = '1.受理完毕';
        rpr.SAP_Transfer_time__c = null;
        rpr.Incharge_Staff__c = Userinfo.getUserId();
        rpr.Repair_Detail__c = 'test';
        rpr.GeneratedPDFField__c = null;
        rpr.AsyncData__c    = true;
        rpr.AwaitToSendAWS__c = false;
        rpr.Complaint_Number__c = null;
        rpr.ReportAdverseEvents__c = '有';
        rpr.ProblemOccurred__c = '到货验收';
@@ -99,6 +107,7 @@
        rpr.Failure_Occurrence_Date__c = Date.today();
        rpr.Repair_Ordered_Date__c = Date.today();
        rpr.Repair_Shipped_Date__c = Date.today();
        rpr.Repair_Ordered_DateTime__c = Datetime.newInstance(2022,04,13,18,18,18);
        rpr.ReturnType__c = 'A20';
        rpr.AwaitToSendAWS__c = true;
        //rpr.Returns_Product_waySAP__c = '返送医院';
@@ -230,6 +239,29 @@
        Test.stopTest();
    }
    @isTest
    static void testCallOut1_2(){
      List<Repair__c> repairList = [select id,Repair_Ordered_DateTime__c,OTSRepairOrder__c,SAP_Transfer_time__c,Status__c from Repair__c];
      Test.startTest();
        List<Id> idList = new List<Id>();
        for(Repair__c repair : repairList){
            repair.Repair_Ordered_DateTime__c = Datetime.newInstance(2022,04,13,05,18,18);
        repair.SAP_Transfer_time__c = Datetime.newInstance(2022,04,13,18,18,18);
            repair.OTSRepairOrder__c = '123123123';
          // idList.add(repair.Id);
        }
        upsert repairList;
        for(Repair__c repair : repairList){
          idList.add(repair.Id);
        }
        BatchIF_Log__c iflog = new BatchIF_Log__c();
        iflog.Log__c = 'test start \n';
        insert iflog;
        NFM603Controller.executefuture(iflog,idList);
        Test.stopTest();
    }
    // @isTest
    // static void testcallout2(){
@@ -246,11 +278,11 @@
    //     Test.stopTest();
    // }
    @isTest
    static void testcallout3(){
      BatchIF_Log__c iflog = [select id from BatchIF_Log__c where Type__c = '603test'];
        NFM603Controller.ManualExecute(iflog.Id);
    }
    // @isTest
    // static void testcallout3(){
    //   BatchIF_Log__c iflog = [select id from BatchIF_Log__c where Type__c = '603test' limit 1];
    //     NFM603Controller.ManualExecute(iflog.Id);
    // }
    @isTest
    static void NFM603BatchTest01(){
force-app/main/default/classes/RepairHandler.cls
@@ -98,9 +98,27 @@
            // 包含报修子单的修理 修理单状态编号变更发送AWS Start
            if (Trigger.isUpdate) {
                Repair__c oldrpr = oldMap.get(nObj.Id);
                if (String.isNotBlank(nObj.RepairSubOrder__c) && nObj.RepairOrderStatusCode__c != oldrpr.RepairOrderStatusCode__c) {
                    nObj.AwaitToSendAWS__c = true;
                }
                // 2022/04/20 zhangyuheng  update start
                if ((nObj.OTSRepairOrder__c == oldrpr.OTSRepairOrder__c) && // OTS订单号发生改变,即时发送AWS
                    (nObj.DeliveryLogisticsNo__c == oldrpr.DeliveryLogisticsNo__c) && // 送修物流单号发生改变,即时发送AWS
                    (nObj.Returns_Product_waySAP__c == oldrpr.Returns_Product_waySAP__c) && // 送修方式发生改变且寄送日有值,即时发送AWS
                    (nObj.FSE_ApplyForRepair_time__c == oldrpr.FSE_ApplyForRepair_time__c) &&                   // FSE申请修理日发生改变,即时发送AWS
                    (nObj.Repair_Ordered_DateTime__c == oldrpr.Repair_Ordered_DateTime__c) &&                   // 4.修理品RC受理日(小程序)发生改变,即时发送AWS
                    (nObj.Repair_Firstestimated_Date__c == oldrpr.Repair_Firstestimated_Date__c) &&             // 初次报价日(不用)发生改变,即时发送AWS
                    (nObj.Repair_Shipped_DateTime__c == oldrpr.Repair_Shipped_DateTime__c) &&                   // 11.RC修理品返送日(小程序)发生改变,即时发送AWS
                    (nObj.Repair_Final_Inspection_DateTime__c == oldrpr.Repair_Final_Inspection_DateTime__c) && // 10.最终检测日(小程序)发生改变,即时发送AWS
                    (nObj.Agreed_DateTime__c == oldrpr.Agreed_DateTime__c) &&                                   //7.用户同意日(小程序)发生改变,即时发送AWS
                    (nObj.Agreed_Date__c == oldrpr.Agreed_Date__c) &&                                           // 7.用户同意日发生改变,即时发送AWS
                    (nObj.engineerSendDate__c == oldrpr.engineerSendDate__c)
                    ) {
                    // 2022/04/20 zhangyuheng  update end
                    if (String.isNotBlank(nObj.RepairSubOrder__c) && nObj.RepairOrderStatusCode__c != oldrpr.RepairOrderStatusCode__c) {
                        nObj.AwaitToSendAWS__c = true;
                    }
                    // 2022/04/20 zhangyuheng  update start
                }
                // 2022/04/20 zhangyuheng  update end
            }
            // 包含报修子单的修理 修理单状态编号变更发送AWS End
            
force-app/main/default/classes/RepairHandlerTest.cls
@@ -349,7 +349,7 @@
                Username = 'Test' + timenow + '@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP',
                TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja',
                ProfileId = System.Label.ProfileId_SystemAdmin,
                Dept__c = '医疗华北营业本部', Province__c = '北京');
                Dept__c = '医疗华北营业本部', Province__c = '北京',Employee_No__c = '12345'); // 2022-04-25   zhangyuheng   update  'Employee_No__c = '12345''
        List<Profile> p = [Select Id From Profile Where Name = '2S1_销售医院担当'];
        System.assertEquals(p.size(), 1);
@@ -359,7 +359,7 @@
                Username = 'Test1' + timenow + '@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP',
                TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja',
                ProfileId = p[0].Id,
                Dept__c = '医疗华北营业本部', Province__c = '北京');
                Dept__c = '医疗华北营业本部', Province__c = '北京',Employee_No__c = '23456'); // 2022-04-25   zhangyuheng   update  'Employee_No__c = '23456''
        List<User> us = new List<User>();
        us.add(user1);
        us.add(user2);