package nc.itf.hi.ws.IPsnInfoQueryWs.Test;

import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.List;

import cn.com.countrygarden.bi.main.model.bd_psndoc;
import cn.com.countrygarden.bi.main.model.hi_psndoc_work;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import nc.itf.hi.ws.IPsnInfoQueryWs.IPsnInfoQueryWsPortTypeProxy;

public class Test1 {
     public static void main(String[] args) {
    	 IPsnInfoQueryWsPortTypeProxy ip = new IPsnInfoQueryWsPortTypeProxy();
    	 List<hi_psndoc_work> hi_psndoc_work = new ArrayList<hi_psndoc_work>();
    	 String dayin;
    	 
			try {
				dayin = ip.queryPsnInfo(1, 1);
				System.out.println(dayin);
			} catch (RemoteException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
		/*	JSONObject jsonObject = JSON.parseObject(dayin);
			JSONObject data = (JSONObject) jsonObject.get("data");
			System.out.println(data);
			JSONArray work = data.getJSONArray("work");	
			System.out.println(work);
			if(work!=null||work.size()!=0){ 
				for(int i=0;i<work.size();i++){ 
					JSONObject jo = (JSONObject)work.getJSONObject(i);
					hi_psndoc_work hi=new hi_psndoc_work();
					String pk_group = jo.getString("pk_group");
					hi.setPK_GROUP(pk_group);
					String workcorp = jo.getString("workcorp");
					hi.setWORKCORP(workcorp);
					String begindate = jo.getString("begindate");
					hi.setBEGINDATE(begindate);
					String modifier = jo.getString("modifier");
					hi.setMODIFIER(modifier);
					String lastflag = jo.getString("lastflag");
					hi.setLASTFLAG(lastflag);
					String workdept = jo.getString("workdept");
					hi.setWORKDEPT(workdept);
					String recordnum = jo.getString("recordnum");
					hi.setRECORDNUM(recordnum);
					String dr = jo.getString("dr");
					hi.setDR(dr);
					String pk_org = jo.getString("pk_org");
					hi.setPK_ORG(pk_org);
					String workpost = jo.getString("workpost");
					hi.setWORKPOST(workpost);
					String enddate = jo.getString("enddate");
					hi.setENDDATE(enddate);
					String modifiedtime = jo.getString("modifiedtime");
					hi.setMODIFIEDTIME(modifiedtime);
					String pk_psndoc = jo.getString("pk_psndoc");
					hi.setPK_PSNDOC(pk_psndoc);
					String pk_psndoc_sub = jo.getString("pk_psndoc_sub");
					hi.setPK_PSNDOC_SUB(pk_psndoc_sub);
					String creationtime = jo.getString("creationtime");
					hi.setCREATIONTIME(creationtime);
					String rn = jo.getString("rn");
					hi.setRN(rn);
					String ts = jo.getString("ts");
					hi.setTS(ts);
					hi_psndoc_work.add(hi);				
				}
			}*/
		
    	 }
     } 
