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

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

import org.eclipse.nebula.widgets.grid.Grid;
import org.eclipse.nebula.widgets.grid.GridColumn;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.utils.SwtUtils;
import org.eclipse.swt.core.widgets.EDialog;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;

import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import com.gx.obe.business.http.HttpResponse;
import com.gx.obe.business.http.HttpUrl;
import com.gx.obe.business.http.HttpUtils;
import com.gx.obe.config.utils.PropertiesUtils;
import com.gx.obe.evaluation.step.entity.CreditChinaData;
import com.gx.obe.evaluation.step.entity.SupplierCreditEntity;
import com.gx.obe.http.HttpUtil;
import com.gx.obe.http.jsons.JSONUtil;
import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.util.utils.ScreenUtils;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.lowagie.text.Font;
import com.swtdesigner.SWTResourceManager;

import net.sf.json.JSONArray;


public class CreditChinaDetailDialog extends EDialog{
	private Supplier supplier;
	
	private Grid supplier_gird;
	
	private GridColumn gridColumn;
	private GridColumn gridColumn1;
	private GridColumn gridColumn2;
	private GridColumn gridColumn3;
	private List<SupplierCreditEntity> supplierCreditEntityList;
	private List<CreditChinaData> supplierCreditChinaList;
	private Label combo;
	private Label combo2;
	private Label combo3;
	private Label combo4;
	private Label combo5;
	private Label combo6;
	private Label combo7;
	private Label combo8;
	private Label combo9;
	private Label combo10;
	private Label combo11;
	private Label combo12;
	//private final static String URL="https://test.powerbeijing-ec.com/jndzzb/creditChinaController.do?getZhixingDetail&creditNo=";
	private final static String URL=PropertiesUtils.getProperty("creditChinaDetialURL","https://www.powerbeijing-ec.com/jndzzb/creditChinaController.do?getZhixingDetail&creditNo=");




	/** 
	 * @author guoyr
	 * @param parentShell
	 * @param tenderProject
	 * @param templateType 
	 */
	public CreditChinaDetailDialog(Shell parentShell,Supplier supplier,List<SupplierCreditEntity> upplierCreditEntityList) {
		super(parentShell);
		setTitle("失信执行人查询详情");
		this.supplier = supplier;
		this.supplierCreditEntityList=upplierCreditEntityList;
	}

	/**
	 * @Description: 
	 * @author guoyr
	 * @param parent
	 * @return 
	 */
	@Override
	protected Control createDialogArea(Composite parent) {
		Composite container = (Composite) super.createDialogArea(parent);
		GridLayout gl_container = new GridLayout(1, false);
		gl_container.verticalSpacing = 0;
		gl_container.horizontalSpacing = 0;
		gl_container.marginHeight = 0;
		gl_container.marginWidth = 0;
		container.setLayout(gl_container);
		
		Composite tenderProjectComposite = new Composite(container, SWT.NONE);
		tenderProjectComposite.setBackground(SWTResourceManager.getColor(220, 220, 220));
		tenderProjectComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
		GridLayout gl_tenderProjectComposite = new GridLayout(2, false);
		gl_tenderProjectComposite.marginHeight = 1;
		gl_tenderProjectComposite.horizontalSpacing = 1;
		gl_tenderProjectComposite.verticalSpacing = 1;
		gl_tenderProjectComposite.marginWidth = 1;
		tenderProjectComposite.setLayout(gl_tenderProjectComposite);
		
		Composite composite_1 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_1.setBackground(SWTResourceManager.getColor(240, 240, 240));
		GridData gd_composite_1 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
		gd_composite_1.widthHint = 100;
		composite_1.setLayoutData(gd_composite_1);
		composite_1.setLayout(new GridLayout(1, false));
		
		
		Label gridColumn = new Label(composite_1, SWT.CENTER);
		gridColumn.setText("企业名称:");
		gridColumn.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
		gridColumn.setFont(SWTResourceManager.getFont("默认", 12, SWT.BOLD));
		
		Composite composite_13 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_13.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		GridData gd_composite_13 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite_13.widthHint = 150;
		composite_13.setLayoutData(gd_composite_13);
		GridLayout gl_composite_13 = new GridLayout(1, false);
		gl_composite_13.marginHeight = 0;
		composite_13.setLayout(gl_composite_13);
		
		combo = new Label(composite_13, SWT.READ_ONLY);
		combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
		
		//---------------------------------------------------
		
		
		Composite composite_2 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_2.setBackground(SWTResourceManager.getColor(240, 240, 240));
		GridData gd_composite_2 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
		gd_composite_2.widthHint = 120;
		composite_2.setLayoutData(gd_composite_2);
		composite_2.setLayout(new GridLayout(1, false));	
		
		Label gridColumn1 = new Label(composite_2, SWT.CENTER);
		gridColumn1.setText("组织机构代码:");
		gridColumn1.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
		gridColumn1.setFont(SWTResourceManager.getFont("默认", 12, SWT.BOLD));
		
		
		Composite composite_23 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_23.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		GridData gd_composite_23 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite_13.widthHint = 150;
		composite_23.setLayoutData(gd_composite_23);
		GridLayout gl_composite_23 = new GridLayout(1, false);
		gl_composite_23.marginHeight = 0;
		composite_23.setLayout(gl_composite_23);
		
		combo2 = new Label(composite_23, SWT.READ_ONLY);
		combo2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
		
		
		
		Composite composite_3 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_3.setBackground(SWTResourceManager.getColor(240, 240, 240));
		GridData gd_composite_3 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
		gd_composite_3.widthHint = 100;
		composite_3.setLayoutData(gd_composite_3);
		composite_3.setLayout(new GridLayout(1, false));
		
		Label gridColumn2 = new Label(composite_3, SWT.CENTER);
		gridColumn2.setText("执行法院:");
		gridColumn2.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
		gridColumn2.setFont(SWTResourceManager.getFont("默认", 12, SWT.BOLD));
		
		Composite composite_33 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_33.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		GridData gd_composite_33 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite_33.widthHint = 150;
		composite_33.setLayoutData(gd_composite_33);
		GridLayout gl_composite_33 = new GridLayout(1, false);
		gl_composite_33.marginHeight = 0;
		composite_33.setLayout(gl_composite_33);
		
		combo3 = new Label(composite_33, SWT.READ_ONLY);
		combo3.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
		
		
		
		Composite composite_4 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_4.setBackground(SWTResourceManager.getColor(240, 240, 240));
		GridData gd_composite_4 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
		gd_composite_4.widthHint = 100;
		composite_4.setLayoutData(gd_composite_4);
		composite_4.setLayout(new GridLayout(1, false));
		
		Label gridColumn3 = new Label(composite_4, SWT.CENTER);
		gridColumn3.setText("省份:");
		gridColumn3.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
		gridColumn3.setFont(SWTResourceManager.getFont("默认", 12, SWT.BOLD));
		
		Composite composite_43 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_43.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		GridData gd_composite_43 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite_43.widthHint = 150;
		composite_43.setLayoutData(gd_composite_43);
		GridLayout gl_composite_43 = new GridLayout(1, false);
		gl_composite_43.marginHeight = 0;
		composite_43.setLayout(gl_composite_43);
		
		combo4 = new Label(composite_43, SWT.READ_ONLY);
		combo4.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
		
		
		Composite composite_5 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_5.setBackground(SWTResourceManager.getColor(240, 240, 240));
		GridData gd_composite_5 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
		gd_composite_5.widthHint = 100;
		composite_5.setLayoutData(gd_composite_5);
		composite_5.setLayout(new GridLayout(1, false));
		
		Label gridColumn4 = new Label(composite_5, SWT.CENTER);
		gridColumn4.setText("依据文案号:");
		gridColumn4.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
		gridColumn4.setFont(SWTResourceManager.getFont("默认", 12, SWT.BOLD));
		
		
		Composite composite_53 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_53.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		GridData gd_composite_53 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite_53.widthHint = 150;
		composite_53.setLayoutData(gd_composite_53);
		GridLayout gl_composite_53 = new GridLayout(1, false);
		gl_composite_53.marginHeight = 0;
		composite_53.setLayout(gl_composite_53);
		
		combo5 = new Label(composite_53, SWT.READ_ONLY);
		combo5.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
		
		
		
		Composite composite_6 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_6.setBackground(SWTResourceManager.getColor(240, 240, 240));
		GridData gd_composite_6 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
		gd_composite_6.widthHint = 100;
		composite_6.setLayoutData(gd_composite_6);
		composite_6.setLayout(new GridLayout(1, false));
		
		Label gridColumn5 = new Label(composite_6, SWT.CENTER);
		gridColumn5.setText("立案时间:");
		gridColumn5.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
		gridColumn5.setFont(SWTResourceManager.getFont("默认", 12, SWT.BOLD));
		
		
		Composite composite_63 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_63.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		GridData gd_composite_63 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite_63.widthHint = 150;
		composite_63.setLayoutData(gd_composite_63);
		GridLayout gl_composite_63 = new GridLayout(1, false);
		gl_composite_63.marginHeight = 0;
		composite_63.setLayout(gl_composite_63);
		
		combo6 = new Label(composite_63, SWT.READ_ONLY);
		combo6.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
		
		
		Composite composite_7 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_7.setBackground(SWTResourceManager.getColor(240, 240, 240));
		GridData gd_composite_7 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
		gd_composite_7.widthHint = 100;
		composite_7.setLayoutData(gd_composite_7);
		composite_7.setLayout(new GridLayout(1, false));
		
		Label gridColumn6 = new Label(composite_7, SWT.CENTER);
		gridColumn6.setText("案号:");
		gridColumn6.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
		gridColumn6.setFont(SWTResourceManager.getFont("默认", 12, SWT.BOLD));
		
		
		Composite composite_73 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_73.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		GridData gd_composite_73 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite_73.widthHint = 150;
		composite_73.setLayoutData(gd_composite_73);
		GridLayout gl_composite_73 = new GridLayout(1, false);
		gl_composite_73.marginHeight = 0;
		composite_73.setLayout(gl_composite_73);
		
		combo7 = new Label(composite_73, SWT.READ_ONLY);
		combo7.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
		
		
		
		Composite composite_8 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_8.setBackground(SWTResourceManager.getColor(240, 240, 240));
		GridData gd_composite_8 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
		gd_composite_8.widthHint = 100;
		composite_8.setLayoutData(gd_composite_8);
		composite_8.setLayout(new GridLayout(1, false));
		
		Label gridColumn7 = new Label(composite_8, SWT.CENTER);
		gridColumn7.setText("判罚义务:");
		gridColumn7.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
		gridColumn7.setFont(SWTResourceManager.getFont("默认", 12, SWT.BOLD));
		
		Composite composite_83 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_83.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		GridData gd_composite_83 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite_83.widthHint = 150;
		composite_83.setLayoutData(gd_composite_83);
		GridLayout gl_composite_83 = new GridLayout(1, false);
		gl_composite_83.marginHeight = 0;
		composite_83.setLayout(gl_composite_83);
		
		combo8 = new Label(composite_83, SWT.READ_ONLY);
		combo8.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
		
		
		
		Composite composite_9 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_9.setBackground(SWTResourceManager.getColor(240, 240, 240));
		GridData gd_composite_9 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
		gd_composite_9.widthHint = 100;
		composite_9.setLayoutData(gd_composite_9);
		composite_9.setLayout(new GridLayout(1, false));
		
		Label gridColumn8 = new Label(composite_9, SWT.CENTER);
		gridColumn8.setText("执行依据单位:");
		gridColumn8.setFont(SWTResourceManager.getFont("默认", 12, SWT.BOLD));
		gridColumn8.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
		
		
		Composite composite_93 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_93.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		GridData gd_composite_93 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite_93.widthHint = 150;
		composite_93.setLayoutData(gd_composite_93);
		GridLayout gl_composite_93 = new GridLayout(1, false);
		gl_composite_93.marginHeight = 0;
		composite_93.setLayout(gl_composite_93);
		
		combo9 = new Label(composite_93, SWT.READ_ONLY);
		combo9.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
		
		Composite composite_10 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_10.setBackground(SWTResourceManager.getColor(240, 240, 240));
		GridData gd_composite_10 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
		gd_composite_10.widthHint = 100;
		composite_10.setLayoutData(gd_composite_10);
		composite_10.setLayout(new GridLayout(1, false));
		
		Label gridColumn9 = new Label(composite_10, SWT.CENTER);
		gridColumn9.setText("执行情况:");
		gridColumn9.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
		gridColumn9.setFont(SWTResourceManager.getFont("默认", 12, SWT.BOLD));
		
		Composite composite_103 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_103.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		GridData gd_composite_103 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite_103.widthHint = 150;
		composite_103.setLayoutData(gd_composite_103);
		GridLayout gl_composite_103 = new GridLayout(1, false);
		gl_composite_103.marginHeight = 0;
		composite_103.setLayout(gl_composite_103);
		
		combo10 = new Label(composite_103, SWT.READ_ONLY);
		combo10.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
		
		
		Composite composite_11 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_11.setBackground(SWTResourceManager.getColor(240, 240, 240));
		GridData gd_composite_11 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
		gd_composite_11.widthHint = 180;
		composite_11.setLayoutData(gd_composite_11);
		composite_11.setLayout(new GridLayout(1, false));
		
		Label gridColumn10 = new Label(composite_11, SWT.CENTER);
		gridColumn10.setText("失信被执行人行为:");
		gridColumn10.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
		gridColumn10.setFont(SWTResourceManager.getFont("默认", 12, SWT.BOLD));
		
		Composite composite_113 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_113.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		GridData gd_composite_113 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite_113.widthHint = 150;
		composite_113.setLayoutData(gd_composite_113);
		GridLayout gl_composite_113 = new GridLayout(1, false);
		gl_composite_113.marginHeight = 0;
		composite_113.setLayout(gl_composite_113);
		
		combo11 = new Label(composite_113, SWT.READ_ONLY);
		combo11.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
		
		Composite composite_12 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_12.setBackground(SWTResourceManager.getColor(240, 240, 240));
		GridData gd_composite_12 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
		gd_composite_12.widthHint = 100;
		composite_12.setLayoutData(gd_composite_12);
		composite_12.setLayout(new GridLayout(1, false));
		
		Label gridColumn11 = new Label(composite_12, SWT.CENTER);
		gridColumn11.setText("发布时间:");	
		gridColumn11.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
		gridColumn11.setFont(SWTResourceManager.getFont("默认", 12, SWT.BOLD));
		
		Composite composite_123 = new Composite(tenderProjectComposite, SWT.NONE);
		composite_123.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		GridData gd_composite_123 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite_113.widthHint = 150;
		composite_123.setLayoutData(gd_composite_123);
		GridLayout gl_composite_123 = new GridLayout(1, false);
		gl_composite_123.marginHeight = 0;
		composite_123.setLayout(gl_composite_123);
		
		combo12 = new Label(composite_123, SWT.READ_ONLY);
		combo12.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
		
		
		
		
//		ScrolledComposite scrolledComposite = new ScrolledComposite(container, SWT.H_SCROLL | SWT.V_SCROLL);
//		GridData gd_scrolledComposite = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 4);
//		scrolledComposite.setLayoutData(gd_scrolledComposite);
//		scrolledComposite.setExpandHorizontal(true);
//		scrolledComposite.setExpandVertical(true);
		
		supplier_gird = new Grid(container, SWT.H_SCROLL|SWT.V_SCROLL);
		supplier_gird.setHeaderVisible(true);
		supplier_gird.setItemHeaderWidth(1800);
		supplier_gird.setItemHeight(35);
		supplier_gird.setAutoWidth(true);
		supplier_gird.setColumnScrolling(true);
		
		
		
		
		
//		gridColumn = new GridColumn(supplier_gird, SWT.CENTER);
//		gridColumn.setText("企业名称");
//		gridColumn.setWidth(200);
//		//gridColumn.setMaxmumWidth(500);
//		
//		gridColumn1 = new GridColumn(supplier_gird, SWT.NONE);
//		gridColumn1.setText("组织机构代码");
//		gridColumn1.setWidth(200);
//		
//		gridColumn2 = new GridColumn(supplier_gird, SWT.CENTER);
//		gridColumn2.setText("执行法院");
//		gridColumn2.setWidth(200);
//		
//		gridColumn3 = new GridColumn(supplier_gird, SWT.CENTER);
//		gridColumn3.setText("省份");
//		gridColumn3.setWidth(100);
//		
//		GridColumn gridColumn4 = new GridColumn(supplier_gird, SWT.CENTER);
//		gridColumn4.setText("依据文案号");
//		gridColumn4.setWidth(200);
//		
//		GridColumn gridColumn5 = new GridColumn(supplier_gird, SWT.CENTER);
//		gridColumn5.setText("立案时间");
//		gridColumn5.setWidth(100);
//		
//		GridColumn gridColumn6 = new GridColumn(supplier_gird, SWT.CENTER);
//		gridColumn6.setText("案号");
//		gridColumn6.setWidth(200);
//		
//		GridColumn gridColumn7 = new GridColumn(supplier_gird, SWT.CENTER);
//		gridColumn7.setText("判罚义务");
//		gridColumn7.setWidth(200);
//		
//		GridColumn gridColumn8 = new GridColumn(supplier_gird, SWT.CENTER);
//		gridColumn8.setText("做出执行依据单位");
//		gridColumn8.setWidth(200);
//		
//		GridColumn gridColumn9 = new GridColumn(supplier_gird, SWT.CENTER);
//		gridColumn9.setText("执行情况");
//		gridColumn9.setWidth(100);
//		
//		GridColumn gridColumn10 = new GridColumn(supplier_gird, SWT.CENTER);
//		gridColumn10.setText("失信被执行人行为");
//		gridColumn10.setWidth(200);
//		
//		GridColumn gridColumn11 = new GridColumn(supplier_gird, SWT.CENTER);
//		gridColumn11.setText("发布时间");
//		gridColumn11.setWidth(100);
		
		
		
		//gridColumn.setMaxmumWidth(500);
		
		
		init();
		
		return container;
	}
	
	
	private void init() {
		getsupplierCreditDetail();
		
		constructDetailData();
	}
	
	

	private void constructDetailData() {
		// TODO Auto-generated method stub
		if(supplierCreditChinaList != null && supplierCreditChinaList.size()>0) {
			combo.setText(supplierCreditChinaList.get(0).getName());
			combo2.setText(supplierCreditChinaList.get(0).getOrgno());
			combo3.setText(supplierCreditChinaList.get(0).getExecutegov());
			combo4.setText(supplierCreditChinaList.get(0).getProvince());
			combo5.setText(supplierCreditChinaList.get(0).getExecuteno());
			combo6.setText(supplierCreditChinaList.get(0).getLiandate());
			combo7.setText(supplierCreditChinaList.get(0).getAnno());
			combo8.setText(supplierCreditChinaList.get(0).getYiwu());
			combo9.setText(supplierCreditChinaList.get(0).getExecuteunite());
			combo10.setText(supplierCreditChinaList.get(0).getExecutestatus());
			combo11.setText(supplierCreditChinaList.get(0).getActionremark());
			combo12.setText(supplierCreditChinaList.get(0).getPublicdate());
			
			combo.setFont(SWTResourceManager.getFont("默认", 12, SWT.NORMAL));
			combo2.setFont(SWTResourceManager.getFont("默认", 12, SWT.NORMAL));
			combo3.setFont(SWTResourceManager.getFont("默认", 12, SWT.NORMAL));
			combo4.setFont(SWTResourceManager.getFont("默认", 12, SWT.NORMAL));
			combo5.setFont(SWTResourceManager.getFont("默认", 12, SWT.NORMAL));
			combo6.setFont(SWTResourceManager.getFont("默认", 12, SWT.NORMAL));
			combo7.setFont(SWTResourceManager.getFont("默认", 12, SWT.NORMAL));
			combo8.setFont(SWTResourceManager.getFont("默认", 12, SWT.NORMAL));
			combo9.setFont(SWTResourceManager.getFont("默认", 12, SWT.NORMAL));
			combo10.setFont(SWTResourceManager.getFont("默认", 12, SWT.NORMAL));
			combo11.setFont(SWTResourceManager.getFont("默认", 12, SWT.NORMAL));
			combo12.setFont(SWTResourceManager.getFont("默认", 12, SWT.NORMAL));
		}
		
		
	}

	private void getsupplierCreditDetail() {
		// TODO Auto-generated method stub
		if(supplierCreditEntityList!=null && supplierCreditEntityList.size()>0) {
			for(SupplierCreditEntity supplierCreditEntity: supplierCreditEntityList) {
				if(!supplierCreditEntity.getName().equals(supplier.getSupplierName())){
					continue;
				}
				String creditCode  = supplierCreditEntity.getCode();
				String url = URL+creditCode;
				String result = HttpUtil.get(url);
				Gson gson =new Gson();
				JsonObject meetJsonObject = new JsonParser().parse(result).getAsJsonObject();
				JsonObject datJsonObject = meetJsonObject.get("data").getAsJsonObject();
				JsonArray zhiXingDetailListArray=datJsonObject.get("zhiXingDetailList").getAsJsonArray();
				supplierCreditChinaList = gson.fromJson(zhiXingDetailListArray,new TypeToken<List<CreditChinaData>>(){}.getType());
				
			}
		}
		
		//String result = HttpUtil.get(url);
//		String result = "{\r\n" + 
//				"    \"msg\": \"\",\r\n" + 
//				"    \"code\": \"\",\r\n" + 
//				"    \"data\": {\r\n" + 
//				"		\"zhiXingDetailList\": [\r\n" + 
//				"			{\r\n" + 
//				"				\"actionremark\": \"违反财产报告制度\",\r\n" + 
//				"				\"anno\": \"(2023)琼9003执738号\",\r\n" + 
//				"				\"executegov\": \"儋州市人民法院\",\r\n" + 
//				"				\"executeno\": \"(2023)琼9003执738号\",\r\n" + 
//				"				\"executestatus\": \"全部未履行\",\r\n" + 
//				"				\"executeunite\": \"儋州市人民法院\",\r\n" + 
//				"				\"liandate\": \"2023-02-27\",\r\n" + 
//				"				\"name\": \"恒大童世界集团有限公司\",\r\n" + 
//				"				\"operName\": \"\",\r\n" + 
//				"				\"orgno\": \"914401013401907528\",\r\n" + 
//				"				\"province\": \"海南\",\r\n" + 
//				"				\"publicdate\": \"2023-08-11\",\r\n" + 
//				"				\"yiwu\": \"支付2855165.48元及利息81500.61元，支付迟延利息\"\r\n" + 
//				"			}\r\n" + 
//				"		]\r\n" + 
//				"	},\r\n" + 
//				"	\"header\": {\r\n" + 
//				"        \"msg\": \"根据社会统一信用代码获取失信被执行人信息成功\",\r\n" + 
//				"        \"ret\": \"0\",\r\n" + 
//				"        \"size\": \"\"\r\n" + 
//				"    },\r\n" + 
//				"    \"user\": null\r\n" + 
//				"}\r\n";
//		Gson gson =new Gson();
//		JsonObject meetJsonObject = new JsonParser().parse(result).getAsJsonObject();
//		JsonObject datJsonObject = meetJsonObject.get("data").getAsJsonObject();
//		JsonArray zhiXingDetailListArray=datJsonObject.get("zhiXingDetailList").getAsJsonArray();
//		supplierCreditChinaList = gson.fromJson(zhiXingDetailListArray,new TypeToken<List<CreditChinaData>>(){}.getType());	
	}

	/**
	 * Return the initial size of the dialog.
	 */
	@Override
	protected Point getInitialSize() {
		ScreenUtils  util = new ScreenUtils();
		int screenHight  = util.getScreenHight();
		int screenweigh  = util.getScreenWight();
		return new Point((int)(screenweigh),(int)(screenHight));
		//return new Point(1000, 616);
		}

}
