/*package nc.ws.intf.IWSBIGetNCWYData.Test;

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

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

import nc.vo.pub.BusinessException.BusinessException;
import nc.ws.intf.IWSBIGetNCWYData.IWSBIGetNCWYDataPortTypeProxy;
import nc.ws.vo.KMFZYEVO.KMFZYEVO;
import nc.ws.vo.QueryVO.QueryVO;

public class Test {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		IWSBIGetNCWYDataPortTypeProxy IPTP = new IWSBIGetNCWYDataPortTypeProxy();
		try {
			
			//科目辅助余额-账簿编码
			List<String> KMFZYEbookCodes = new ArrayList<>();
			//费用调整数据
			List<String> FYTZbookCodes = new ArrayList<>();
			//预算编制数据
			List<String> YSBZbookCodes = new ArrayList<>();
			
			String year = "2017";
			String month = "03";
			
			//1.获取档案编码及名称
			String archives = IPTP.getBaseDocNames();
			archives = archives.trim().replace("{", "").replace("}", "");
			List<String> archiveslist = java.util.Arrays.asList(archives.split(","));
			Map<String,String> archivesMap = new HashMap<String,String>();
			for(String x : archiveslist)
			{
				List<String> xarchives = java.util.Arrays.asList(x.split("="));
				archivesMap.put(xarchives.get(0).trim(), xarchives.get(1).trim());
			}
			System.out.println(archivesMap);
			//2.获取档案数据
			for(String x : archivesMap.keySet())
			{
				String ChildArchives = IPTP.getBaseDoc(x);
				System.out.println(ChildArchives);
				String[] ChildArchives1 = (((ChildArchives.replace("[", "")).replace("]", "")).replace("{", "")).split("},");
				
				System.out.println("KMFZYEbookCodes:" + ChildArchives1);
				System.out.println("111111:" + (archivesMap.get(x).equals("核算账簿")));
				System.out.println("111111:" +  archivesMap.get(x));
				
				List<Map<String,String>> ChildArchives2 = new ArrayList<>();
				for(int i = 0; i < ChildArchives1.length;i++)
				{
					String str = ChildArchives1[i].replace("}", "").trim();

					List<String> ca = java.util.Arrays.asList(str.split(","));					
					
					
					Map<String,String> ChildArchivesMap = new HashMap<String,String>();
					
					String key = null;
					for(String ca1 : ca)
					{
						System.out.println(ca1);
						List<String> xarchives = java.util.Arrays.asList(ca1.split("="));
						if(xarchives.size() <= 1)
						{
							ChildArchivesMap.put(key,ChildArchivesMap.get(key) + "," + xarchives.get(0));
						}
						else
						{
							key = xarchives.get(0).trim();
							ChildArchivesMap.put(xarchives.get(0).trim(), xarchives.get(1).trim());
						}
						
					}
					
					//获取科目辅助余额
					if(archivesMap.get(x).equals("核算账簿"))
					{
						KMFZYEbookCodes.add(ChildArchivesMap.get("code"));
					}
					//获取费用调整数据
					else if(archivesMap.get(x).equals("财务组织"))
					{
						FYTZbookCodes.add(ChildArchivesMap.get("code"));
					}
					//获取预算编制数据
					else if(archivesMap.get(x).equals("预算科目"))
					{
						YSBZbookCodes.add(ChildArchivesMap.get("code"));
					}
					
					ChildArchives2.add(ChildArchivesMap);					
				}
				
			}
			//获取科目辅助余额
			System.out.println("KMFZYEbookCodes:" + KMFZYEbookCodes.size());
			QueryVO qv = new QueryVO();
			qv.setBookCodes((String[])KMFZYEbookCodes.toArray(new String[KMFZYEbookCodes.size()]));
			qv.setYear(year);
			qv.setMonth(month);			
			KMFZYEVO[] KMFZYE = IPTP.getKMFZYE(qv);
			System.out.println("KMFZYE:" + KMFZYE.length);
			
			//获取费用调整数据
			qv.setBookCodes((String[])FYTZbookCodes.toArray(new String[FYTZbookCodes.size()]));
			String FYTZ = IPTP.getFYTZ(qv);
			JSONObject FYTZJson = JSON.parseObject(FYTZ);
			System.out.println("FYTZJson:" + FYTZ);
			
			//获取预算编制数据
			qv.setMonth(String.valueOf(Integer.parseInt(month)));	
			qv.setBookCodes((String[])YSBZbookCodes.toArray(new String[YSBZbookCodes.size()]));
			String YSBZ = IPTP.getYSBZ(qv);
			//JSONObject YSBZJson = JSON.parseObject(YSBZ);
			System.out.println("YSBZJson:" + YSBZ);
			
			System.out.println("3333333333");
			
			//获业务规则			
			List<String> ruleNamelist = new ArrayList<>();
			ruleNamelist.add("WYA02物业板块_单项目公司_收入表_实际数2018");
			ruleNamelist.add("WYA03物业板块_单项目公司_支出表_实际数2018");
			ruleNamelist.add("WYA04物业板块_多项目公司_收入表_实际数2018");
			ruleNamelist.add("WYA05物业板块_多项目公司_支出表_实际数2018");
			ruleNamelist.add("WYA06物业板块_汇总模型_决算表2018");
			for(String ruleName : ruleNamelist)
			{
				String ruleNames = IPTP.getRules(ruleName);
				System.out.println(ruleNames);
			}
					
		} catch (BusinessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
*/