package com.gx.obe.evaluation.step.report;

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

import com.gx.obe.report.dataset.word.BaseDateSet;
import com.gx.obe.util.utils.LogUtils;
import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.web.entity.Supplier;
import com.report.word.WordDataSet;

/**
 * @Description: 评委会自律承诺书
 * @author wangx
 */
public class DisciplineDataSet extends BaseDateSet{
	
	{
		LogUtils.logClass(DisciplineDataSet.class);
	}
	
	public WordDataSet getWordDataSet() {
		String tenderNo = ObjectUtils.getObjString(tenderProject.getTenderNo());
		List<Map<String,Object>> supplierList = new ArrayList<Map<String,Object>>();
		List<Supplier> allSupplierList = supplierService.getAllSupplierList(tenderProject.getId());
		if(null != allSupplierList && allSupplierList.size() > 0){
			int sort = 1;
			for (Supplier supplier : allSupplierList) {
				Map<String, Object> supplierMap = new HashMap<String, Object>();
				supplierMap.put("supplierName", supplier.getSupplierName());
				supplierMap.put("sort", sort++);
				supplierMap.put("tenderNo", tenderNo);
				supplierList.add(supplierMap);
			}
		}
		
		reportDataSet.putParam("supplierList", supplierList);
		return reportDataSet;
	}

}
