高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
force-app/main/default/classes/ReceivingNoteWaitingReceiptController.cls
@@ -26,6 +26,13 @@
        };
    }
    //20210806 ljh 管理编码 end
    // 20230117 ljh DB202301096735 start
    public List<ReceivingNoteDetail__c>  rndInfo {
        get {
            return  [select id,Fixture_Arrival_Product__c FROM ReceivingNoteDetail__c  where Fixture_Arrival_Product__c = ''  LIMIT 1 ];
        }
    }
    // 20230117 ljh DB202301096735 end
    public ReceivingNoteWaitingReceiptController() {
        parId = System.currentPageReference().getParameters().get('parId');
@@ -604,12 +611,12 @@
                }
            }
            //重新编码
            // 20211203 ljh SFDC-C8ZATE start
            // 20212103 ljh SFDC-C8ZATE start
            List<Asset_EquipmentSet_Managment_Code__c> aemCodeList = new List<Asset_EquipmentSet_Managment_Code__c>();
            Map<String,Asset_EquipmentSet_Managment_Code__c> oldCodeMap = new Map<String,Asset_EquipmentSet_Managment_Code__c>();
            // 20211203 ljh SFDC-C8ZATE end
            // 20212103 ljh SFDC-C8ZATE end
            if(codeNewMap.size() > 0){
                // 20211203 ljh SFDC-C8ZATE start
                // 20212103 ljh SFDC-C8ZATE start
                // List<Asset_EquipmentSet_Managment_Code__c> aemCodeList = [SELECT Id, key__c, code__c, 
                aemCodeList = [SELECT Id, key__c, code__c,   
                        LastNo__c, keyName__c, isSpecial__c, MaxLastNo__c FROM Asset_EquipmentSet_Managment_Code__c
@@ -646,7 +653,7 @@
                            rndMap.put(rnde1.Id,rnde2); 
                        }
                        oldCodeMap.put(aem.Id,aem); // 20211203 ljh SFDC-C8ZATE end
                        oldCodeMap.put(aem.Id,aem); // 20212103 ljh SFDC-C8ZATE end
                        Asset_EquipmentSet_Managment_Code__c aesm = new Asset_EquipmentSet_Managment_Code__c();
                        aesm.Id = aem.Id;
                        aesm.LastNo__c = code;
@@ -671,7 +678,7 @@
                    }
                }
                //20210804 ljh 管理编码 end
                // 20211203 ljh SFDC-C8ZATE start
                // 20212103 ljh SFDC-C8ZATE start
                // 判断此时此刻的值 是否和最初的值是否一样,不一样提示
                List<Asset_EquipmentSet_Managment_Code__c> aemCodeNowList = [SELECT Id, key__c, code__c,   
                        LastNo__c, keyName__c, isSpecial__c, MaxLastNo__c FROM Asset_EquipmentSet_Managment_Code__c
@@ -685,7 +692,7 @@
                    //}
                }        
                update aesmUList; //20210809 ljh 管理编码
                // 20211203 ljh SFDC-C8ZATE end
                // 20212103 ljh SFDC-C8ZATE end
                update rndList; 
                // update aesmUList; //20210809 ljh 管理编码
                pageRef.getParameters().put('message','已保存');