diff --git a/app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java b/app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java index 16c812a..ddcb0f9 100644 --- a/app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java +++ b/app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java @@ -129,4 +129,7 @@ public class RpcUrl { public static String HouseTotalInfoCount2 = "/MainSystem/B3_ZhongHui/Rpcs/HatchReportRpc/HouseTotalInfoCount2"; public static String HouseView1 = "/MainSystem/B3_ZhongHui/Rpcs/HatchReportRpc/HouseView1"; + + public static String QueryHatchingStoreDetails = "/MainSystem/B3_ZhongHui/Rpcs/HatchDayReportRpc/QueryHatchingStoreDetails"; + public static String QueryHatchingStoreDetails_fanhui = "/MainSystem/B3_ZhongHui/Rpcs/HatchDayInfo"; } diff --git a/app/src/main/java/com/qhclh/ytzh/work/Hatchery/HatcheryReportActivity.java b/app/src/main/java/com/qhclh/ytzh/work/Hatchery/HatcheryReportActivity.java index 5378108..c7f4bd2 100644 --- a/app/src/main/java/com/qhclh/ytzh/work/Hatchery/HatcheryReportActivity.java +++ b/app/src/main/java/com/qhclh/ytzh/work/Hatchery/HatcheryReportActivity.java @@ -11,15 +11,21 @@ import android.widget.ListView; import com.qhclh.ytzh.R; import com.qhclh.ytzh.base.BaseActivity; +import com.qhclh.ytzh.home.RpcUrl; +import com.qhclh.ytzh.tasks.ViewOnClickTask; import com.qhclh.ytzh.ui.Chose2timePopuWindow; import com.qhclh.ytzh.ui.LinkedHorizontalScrollView; import com.qhclh.ytzh.ui.NoScrollHorizontalScrollView; +import org.forks.jsonrpc.JsonRpcResult; +import org.forks.jsonrpc.RpcFacade; +import org.forks.jsonrpc.RpcObject; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import java.util.ArrayList; +import java.util.Date; import java.util.List; import butterknife.BindView; @@ -185,7 +191,27 @@ public class HatcheryReportActivity extends BaseActivity { @Subscribe(threadMode = ThreadMode.MAIN, sticky = false) public void onEvent(ChoseTimeEvent event) { - System.out.println("aaa+++starttiem+++"+event.getStartDate()); - System.out.println("aaa+++endtime+++"+event.getEndDate()); +// System.out.println("aaa+++starttiem+++"+event.getStartDate()); +// System.out.println("aaa+++endtime+++"+event.getEndDate()); + QueryHatchingStoreDetails(hatchingStoreID,event.getStartDate(),event.getEndDate()); + + } + + private void QueryHatchingStoreDetails(final long id,final Date starDate,final Date endDate) { + ViewOnClickTask hatchTask = new ViewOnClickTask(HatcheryReportActivity.this,"加载中...") { + List objList; + @Override + protected void successUI() { + System.out.println("aaa++++rpclist+++"+objList); + } + + @Override + public Object call() throws Exception { + JsonRpcResult result = RpcFacade.rpcCall(RpcUrl.QueryHatchingStoreDetails,id,starDate,endDate); + objList = result.getRpcObjectList(RpcUrl.QueryHatchingStoreDetails_fanhui); + return null; + } + }; + hatchTask.execute(); } }