| | |
| | | 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计划,不可修改科室的值'); |
| | | |
| | |
| | | |
| | | 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, |
| | |
| | | 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]); |
| | |
| | | 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]))); |
| | |
| | | } |
| | | } |
| | | } |
| | | 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]))); |