| | |
| | | |
| | | BatchIF_Log__c rowData = NFMUtil.saveRowData(Monitoring, 'NFM105', ges.RepairStatusUpdate.GeneralData); |
| | | if (String.isBlank(rowData.Log__c) == false) { |
| | | executefuture(rowData.Id); |
| | | //上限合同 LY 20230209 start |
| | | //executefuture(rowData.Id); |
| | | main(rowData.Id); |
| | | //上限合同 LY 20230209 end |
| | | } |
| | | |
| | | // JSONを戻す |
| | |
| | | ,Maintenance_Contract__c |
| | | ,SerialNumber__c |
| | | ,Agreed_Date__c |
| | | ,Limit_Price__c //上限合同 LY 20230209 |
| | | from Repair__c |
| | | where SAPRepairNo__c in :sapRepairNoList |
| | | OR Name in :sfdcRepairNoList] |
| | |
| | | update astUpdateMap.values(); |
| | | } |
| | | |
| | | |
| | | //上限合同 LY 20230131 start 维修合同上的合同期间修理金额汇总 |
| | | List<ID> updateMC = new List<ID>(); |
| | | if (rprList.size() > 0 ) { |
| | | for (Repair__c rc : rprList) { |
| | | if (rc.Limit_Price__c) { |
| | | //B95-报价同意确认、B99-报价同意确认取消、A95-取消修理受理、A96-取消修理、A99-修理单关闭 更新合同期间修理金额 |
| | | //if (rc.RepairOrderStatusCode__c =='B95' || rc.RepairOrderStatusCode__c =='B99' || rc.RepairOrderStatusCode__c =='A99' || rc.RepairOrderStatusCode__c =='A95' || rc.RepairOrderStatusCode__c =='A96'){ |
| | | if (rc.Agreed_Date__c != null){ |
| | | Maintenance_Contract__c mc = new Maintenance_Contract__c(); |
| | | if (!updateMC.contains(rc.Maintenance_Contract__c)) { |
| | | mc.Id = rc.Maintenance_Contract__c; |
| | | } |
| | | updateMC.add(mc.Id); |
| | | } |
| | | } |
| | | } |
| | | if (updateMC.size()>0) { |
| | | Database.executeBatch(new RollupToMaintenanceContractBatch(updateMC), 1); |
| | | } |
| | | } |
| | | //上限合同 LY 20230131 end |
| | | |
| | | //add by rentx 2021-3-4 start |
| | | /* |
| | |
| | | List<Maintenance_Contract_Asset_Estimate__c> updateList = new List<Maintenance_Contract_Asset_Estimate__c>(); |
| | | //查询当前修理对应的维修合同是否为限次合同 && 大修 |
| | | for (Repair__c rep : rprList) { |
| | | if (rep.Maintenance_Contract__c != null && rep.Maintenance_Contract__r.URF_Contract__c == true && (rep.Repair_Rank__c == 'A' || rep.Repair_Rank__c == 'B' || rep.Repair_Rank__c == 'C') && rep.Agreed_Date__c != null) { |
| | | //URF限次合同2期 LY 20220929 start 追加修理单删除和取消的状态条件 |
| | | if (rep.Maintenance_Contract__c != null && rep.Maintenance_Contract__r.URF_Contract__c == true && (rep.Repair_Rank__c == 'A' || rep.Repair_Rank__c == 'B' || rep.Repair_Rank__c == 'C') && rep.Agreed_Date__c != null && rep.Status1__c !='0.取消' && rep.Status1__c !='0.删除') { |
| | | //URF限次合同2期 LY 20220929 end |
| | | contractIds.add(rep.Maintenance_Contract__c); |
| | | } |
| | | } |