package com.steering.jobface.jhy.CollectionType;

import CoreFS.SA06.CoreReturnSortObject;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 *  冲击试验类
 * Created by 朱少波 on 2018/3/12.
 */
public class ImpactCollection  extends BaseCollection {
    @Override
    public String[] GetPhyCodeMin() {
        return new String[]{ "R0002"};
    }

    @Override
    public List<Map<String, Object>> GetCollectionData() {
        return  ( (CoreReturnSortObject) getDataBySqlID("PhyCollectDao","ImpactCollection.getData").getResult() ).getResult();
    }

    @Override
    public void RemarkOldData(String CheckNo, String SampleNo) {
        ArrayList<String> ar = new ArrayList<String>();
        ar.add("ImpactCollection.setDataFlag");
        ArrayList<Object[]> para = new ArrayList<Object[]>();
        para.add(new Object[]{
                "3",
                CheckNo,SampleNo
        });
        setDataById("PhyCollectDao",ar  ,para );
    }

    @Override
    public void RemarkFailData(String CheckNo, String SampleNo) {
        ArrayList<String> ar = new ArrayList<String>();
        ar.add("ImpactCollection.setDataFlag");
        ArrayList<Object[]> para = new ArrayList<Object[]>();
        para.add(new Object[]{
                "4",
                CheckNo,SampleNo
        });
        setDataById("PhyCollectDao",ar  ,para );
    }

    @Override
    public void RemarkOkData(String CheckNo, String SampleNo) {
        ArrayList<String> ar = new ArrayList<String>();
        ar.add("ImpactCollection.setDataFlag");
        ArrayList<Object[]> para = new ArrayList<Object[]>();
        para.add(new Object[]{
                "1",
                CheckNo,SampleNo
        });
        setDataById("PhyCollectDao",ar  ,para );
    }
}
