package com.benyun.project.third.kingdee.test;

import com.alibaba.fastjson.JSONObject;
import com.benyun.project.third.kingdee.utils.K3cloudUitl;

public class InvokeTest {

    public static void main(String[] args) throws Exception {
        K3cloudUitl.POST_K3CloudURL = "http://111.12.86.145:9010/k3cloud/";
        String dbId = "605ea0f8b69e3e";
        String uid = "陈永瀚";
        String pwd = "kingdee*123";
        int lang = 2052;
        Boolean flag = K3cloudUitl.Login(dbId, uid, pwd, lang);
        if (flag) {
            JSONObject jsonObject = selectSaleOrder();
            System.out.println(jsonObject);
        }
    }

    private static JSONObject selectSaleOrder(){  //查询销售单
        String formid="SAL_SaleOrder";//QWZE_WorkingHours
        String content="{\"Number\":\"XSDD003208\"}";
        System.out.println(content);
        JSONObject jsonObject=new JSONObject();
        try {
            jsonObject= K3cloudUitl.View(formid, content);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return jsonObject;
    }
//    private static JSONObject selectSaleOrder(){  //查询销售出库单
//        String formid="SAL_OUTSTOCK";//QWZE_WorkingHours
//        String content="{\"Number\":\"XSCKD003313\"}";
//        System.out.println(content);
//        JSONObject jsonObject=new JSONObject();
//        try {
//            jsonObject= K3cloudUitl.View(formid, content);
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        return jsonObject;
//    }

}
