Browse Source

no message

master
lh 7 years ago
parent
commit
2aaaa038bd
2 changed files with 31 additions and 2 deletions
  1. +3
    -0
      app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java
  2. +28
    -2
      app/src/main/java/com/qhclh/ytzh/work/Hatchery/HatcheryReportActivity.java

+ 3
- 0
app/src/main/java/com/qhclh/ytzh/home/RpcUrl.java View File

@ -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";
}

+ 28
- 2
app/src/main/java/com/qhclh/ytzh/work/Hatchery/HatcheryReportActivity.java View File

@ -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<RpcObject> 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();
}
}

Loading…
Cancel
Save