游畅
2022-03-29 2b6adf750ca9ae5d0094029b25ba474635558109
force-app/main/default/classes/OPDPlanHandler.cls
@@ -174,7 +174,7 @@
                            nobj.SkipValidationRulesAndWorkflows__c = true;//跳过验证规则或工作流
                            nObj.supplementaryApplication__c = true;
                            nobj.originalOpdRentalApply__c = originalOpdPlanApplication.Rental_Apply2__c;
                            nobj.originalOpdRentalApplyName__c = originalOpdPlanApplication.Rental_Apply2__r.Name;
                            //nobj.originalOpdRentalApplyName__c = originalOpdPlanApplication.Rental_Apply2__r.Name;
                            if (nObj.Account_Laboratory__c != originalOpdPlanApplication.Account_Laboratory__c) {
                                nObj.Account_Laboratory__c.addError('补充申请的OPD计划,不可修改科室的值');
@@ -865,6 +865,7 @@
                    from Account_Number_of_target__c
                    where id in :OpdTargetAcc.values()]);//查询目标客户 本财年的 
            system.debug('==本财年' + acctarList.size());
            Map<id, Account_Number_of_target__c> acctarlastList = new Map<id, Account_Number_of_target__c>([select id,
                    OPD_amount_290MiroBF__c,
                    OPD_amount_290MiroGI__c,
@@ -924,7 +925,7 @@
                    OPDPlan__c opdplan = new OPDPlan__c();
                    for (String opd : OpdPlanDetail) {
                        opdplan.id = t.id;
                        if(acctarList !=null){
                        if(acctarList !=null && acctarList.size() >0){
                        if (column != null) {
                            for (Integer i = 0; i < column.size(); i++) { //是否产品OPD目标客户
                                List<String>  titleAccout = tempImportantProduct.get(column[i]);
@@ -1041,7 +1042,7 @@
                            for (Integer i = 0; i < columnOPDAmount.size(); i++) { //本期OPD次数
                                String  titleAccout5 = tempImportantOPDAmount.get(columnOPDAmount[i]);
                                if (opd == titleAccout5) {
                                    if(acctarList !=null){
                                    if(acctarList !=null && acctarList.size()>0){
                                        if (acctarList.containskey(opdct) && acctarList.get(opdct).get(columnOPDAmount[i]) != null && acctarList.get(opdct).get(columnOPDAmount[i]) != 0) {
                                            system.debug('=columnOPDAmount[i]==' + columnOPDAmount[i] + '=本期OPD次数=' + acctarList.get(opdct).get(columnOPDAmount[i]));
                                            Decimal aa = acctarList.get(opdct).get(columnOPDAmount[i]) == null ? 0 : Decimal.valueOf(String.valueOf(acctarList.get(opdct).get(columnOPDAmount[i])));
@@ -1058,7 +1059,7 @@
                                            }
                                        }
                                    }
                                    if(acctarlastList !=null){
                                    if(acctarlastList !=null && acctarlastList.size()>0){
                                        if (acctarlastList.containskey(opdla) && acctarlastList.get(opdla).get(columnOPDAmount[i]) != null && acctarlastList.get(opdla).get(columnOPDAmount[i]) != 0) {
                                            system.debug('=columnOPDAmount[i]==' + columnOPDAmount[i] + '=上期OPD次数=' + acctarlastList.get(opdla).get(columnOPDAmount[i]));
                                            Decimal bb = acctarlastList.get(opdla).get(columnOPDAmount[i]) == null ? 0 : Decimal.valueOf(String.valueOf(acctarlastList.get(opdla).get(columnOPDAmount[i])));