buli
2023-05-24 a1369f4a77132580a86ea45b4f22cd3f8723664a
force-app/main/default/classes/DNUpsertBatch.cls
@@ -622,13 +622,8 @@
            tempeSF.DNName__c = tempDN.Name;
            tempeSF.Statu_Achievements__c = tempDN.Statu_Achievements__c;
            tempeSF.Statu_Achievements_DN__c = tempDN.ID;
            //Updated By Li Jun 20230420 start
            //tempeSF.Sales_assistant_name_text__c = tempDN.Sales_assistant_name_text__c;
            tempeSF.Sales_assistant_name_text__c = tempDN.Opportunity__c != null && tempDN.Opportunity__r.OCM_man_province_cus__c != '' && getManagementProvince().containsKey(tempDN.Opportunity__r.OCM_man_province_cus__c)?
                                                    getManagementProvince().get(tempDN.Opportunity__r.OCM_man_province_cus__c).Window1__c: null;
            tempeSF.Sales_assistant_name_text__c = tempDN.Sales_assistant_name_text__c;
            tempeSF.RC_Manager__c = tempDN.RC_Manager__c;
            //Updated By Li Jun 20230420 end
            //生成签收单时,给是否无偿出库赋值  精琢技术 thh 2021-10-15 start
            if(tempDN.Statu_Achievements__r.orderType__c == 'ZM16'){
                tempeSF.isFreeDelivery__c = true;
@@ -754,14 +749,15 @@
                    tempSADN.Is_Corrosion__c=opp.Is_Corrosion__c;
                    // 电子签收单  赋值营业助理和营业管理部担当 start
                    //集中采购的询价 精琢技术 wql 2020/01/11 start 
                    //Add By Li Jun 20230420 Start
                    tempSADN.Sales_assistant_name_text__c =opp.OCM_man_province_cus__c!='' && provinceGIMap.containskey(opp.OCM_man_province_cus__c)?provinceGIMap.get(opp.OCM_man_province_cus__c):null;
                    //Add By Li Jun 20230420 End
                    if(opp.Group_purchase_PCL__c){
                        system.debug('集采课');
                        tempSADN.Sales_assistant_name_text__c = provinceGIMap.containskey('集采课')?provinceGIMap.get('集采课'):null; //Add  By Li Jun 20230523
                        //tempSADN.Sales_assistant_name_text__c = provinceGIMap.get('集采课'); //Commented By Li Jun 20230420
                        tempSADN.RC_Manager__c =  provinceOwnerMap.get('集采课');
                    }else{
                        system.debug('非集采课');
                        //tempSADN.Sales_assistant_name_text__c = opp.Sales_assistant_name_text__c; //Commented By Li Jun 20230420
                        tempSADN.Sales_assistant_name_text__c =opp.OCM_man_province_cus__c!='' && provinceGIMap.containskey(opp.OCM_man_province_cus__c)?provinceGIMap.get(opp.OCM_man_province_cus__c):null; //Add  By Li Jun 20230523
                        tempSADN.RC_Manager__c =  provinceOwnerMap.get(opp.OCM_man_province_cus__c);
                    }
                    //集中采购的询价 精琢技术 wql 2020/01/11 end