|
|
|
@ -14,6 +14,7 @@ import com.qhclh.ytzh.R; |
|
|
|
import com.qhclh.ytzh.base.BaseFragment; |
|
|
|
import com.qhclh.ytzh.home.RpcUrl; |
|
|
|
import com.qhclh.ytzh.tasks.ViewOnClickTask; |
|
|
|
import com.qhclh.ytzh.utils.DateTimeUtil; |
|
|
|
import com.qhclh.ytzh.work.tablepoultry.ChoseEvent; |
|
|
|
|
|
|
|
import org.forks.jsonrpc.JsonRpcResult; |
|
|
|
@ -25,7 +26,9 @@ import org.greenrobot.eventbus.ThreadMode; |
|
|
|
import org.json.JSONArray; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import butterknife.BindView; |
|
|
|
@ -64,13 +67,13 @@ public class YuchuFragment extends BaseFragment { |
|
|
|
@Override |
|
|
|
public void onResume() { |
|
|
|
super.onResume(); |
|
|
|
BatchTotalCount1(); |
|
|
|
BatchTotalCount1(choseDate); |
|
|
|
} |
|
|
|
|
|
|
|
@Subscribe(threadMode = ThreadMode.MAIN,sticky = true) |
|
|
|
public void onEvent(ChoseEvent event){ |
|
|
|
choseDate = event.getTime(); |
|
|
|
System.out.println("aaa+++yuchuf+++"+choseDate); |
|
|
|
BatchTotalCount1(choseDate); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@ -84,7 +87,7 @@ public class YuchuFragment extends BaseFragment { |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
private void BatchTotalCount1() { |
|
|
|
private void BatchTotalCount1(final long time) { |
|
|
|
ViewOnClickTask BatchTotalCount1Task = new ViewOnClickTask(getActivity(),"加载中...") { |
|
|
|
List<RpcObject> rpcStr; |
|
|
|
@Override |
|
|
|
@ -145,7 +148,7 @@ public class YuchuFragment extends BaseFragment { |
|
|
|
|
|
|
|
@Override |
|
|
|
public Object call() throws Exception { |
|
|
|
JsonRpcResult result = RpcFacade.rpcCall(RpcUrl.BatchTotalCount1); |
|
|
|
JsonRpcResult result = RpcFacade.rpcCall(RpcUrl.BatchTotalCount1,new SimpleDateFormat("yyyy-MM-dd").parse(DateTimeUtil.getYMD(new Date(time)))); |
|
|
|
rpcStr = result.getRpcObjectList(RpcUrl.BatchTotalCount1_fanhui); |
|
|
|
return null; |
|
|
|
} |
|
|
|
|