/*
20211208 by ljh 查看新品收货最大编码，不用了可以删除。测试类都在 MaxManagmentCodeControllerTest
*/
public with sharing class MaxManagmentCodeController {
    public List<String> codeList{get;set;}
    public MaxManagmentCodeController() {
        
    }
    public void init(){
	codeList = new List<String>();
	List<AggregateResult> asa = new List<AggregateResult>();
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'GI1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'GI0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'XB1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'XB4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'XB0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'DB1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'DB4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'DB0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'HB1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'HB4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'HB0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'SA0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'BA1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'BA4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'BA0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'XN1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'XN5%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'XN0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'HN1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'HN4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'HN0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'PA1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'PA4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'PA0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'HD1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'HD4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'HD0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'SA1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'SA4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'CP6%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'SP0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'CP5%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'GI6%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'CP4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'FW0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'FW0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'FW0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'MA4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'MA3%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'MA2%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'MA1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'MA0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'SP6%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'SP5%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'SP4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'SP3%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'SP2%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'SP1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'GI5%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'CP3%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'GI4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'CP2%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'GI3%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'CP1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'GI2%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'CP0%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'FW6%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'FW5%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'FW4%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'FW3%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'FW2%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'FW1%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'MA6%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'MA5%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'PAJ%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'SAJ%'];
	codeList.add((String)asa[0].get('code'));
	asa = [SELECT Max(EquipmentSet_Managment_Code__c) code FROM ReceivingNoteDetail__c WHERE EquipmentSet_Managment_Code__c like	'BAJ%'];
	codeList.add((String)asa[0].get('code'));
	//String codess = String.join(codeList,',');
	//system.debug('===codess:'+codess);
	//system.debug('===codeList:'+codeList);
    }
}