|
|
|
@ -4,11 +4,21 @@ import android.widget.LinearLayout; |
|
|
|
|
|
|
|
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 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.text.SimpleDateFormat; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import butterknife.BindView; |
|
|
|
|
|
|
|
/** |
|
|
|
@ -44,6 +54,25 @@ public class ShangjiFragment extends BaseFragment { |
|
|
|
@Subscribe(threadMode = ThreadMode.MAIN,sticky = true) |
|
|
|
public void onEvent(FowlEvent event){ |
|
|
|
System.out.println("aaa+++shangji+++"+event.getId()); |
|
|
|
QueryBreedPlanFactoryInfo(event.getId()); |
|
|
|
} |
|
|
|
|
|
|
|
private void QueryBreedPlanFactoryInfo(final long id) { |
|
|
|
ViewOnClickTask factoryinfoTask = new ViewOnClickTask(getActivity(),"加载中...") { |
|
|
|
List<RpcObject> objList; |
|
|
|
@Override |
|
|
|
protected void successUI() { |
|
|
|
System.out.println("aaa+++objl+++"+objList); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Object call() throws Exception { |
|
|
|
JsonRpcResult result = RpcFacade.rpcCall(RpcUrl.QueryBreedPlanFactoryInfo,"上鸡",id,new SimpleDateFormat("yyyy-MM-dd").parse(DateTimeUtil.getYMD(new Date(System.currentTimeMillis()))),null); |
|
|
|
objList = result.getRpcObjectList(RpcUrl.QueryBreedPlanFactoryInfo_fanhui); |
|
|
|
return null; |
|
|
|
} |
|
|
|
}; |
|
|
|
factoryinfoTask.execute(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
|