buli
2023-05-22 71b93327e8f3fb3bffffc7c033c1f782e7b6ab32
force-app/main/default/classes/EquipmentRepairBatch.cls
@@ -7,7 +7,9 @@
*****************************************************************************************************/
global class EquipmentRepairBatch implements Database.Batchable<sObject>,Database.Stateful {
    public String query;
    public List < String > accountIdList;
    // public List < String > accountIdList;
    public Set < String > accountIdList;
    private BatchIF_Log__c iflog;
    public Date td = Date.today();  //如2022.10.15
    public String OCSM_Period_half;
@@ -22,7 +24,7 @@
        // OCSM_Period = 'FY'+(td.year()+1);
    }
    global EquipmentRepairBatch(List <String> accountIdList) {
    global EquipmentRepairBatch(Set <String> accountIdList) {
        this.query = query;
        this.accountIdList = accountIdList;
        // OCSM_Period = 'FY'+(td.year()+1);
@@ -91,9 +93,13 @@
        //保有设备 1.有无维修合同(字段)2.
        //保有设备Id
        List<Id> mids = new List<Id>();
        // List<Id> mids = new List<Id>();
        Set<Id> mids = new Set<Id>();
        //医院Id
        List<Id> assetHos = new List<Id>();
        // List<Id> assetHos = new List<Id>();
        Set<Id> assetHos = new Set<Id>();
        // for (Asset ass: resultList) {
        //     mids.add(ass.Id);
        //     assetHos.add(ass.Hospital__c);