|
|
|
@ -12,9 +12,14 @@ import com.qhclh.ytzh.R; |
|
|
|
import com.qhclh.ytzh.base.BaseFragment; |
|
|
|
import com.qhclh.ytzh.bean.ShangpinPianquBean; |
|
|
|
import com.qhclh.ytzh.home.MainActivity; |
|
|
|
import com.qhclh.ytzh.home.RpcUrl; |
|
|
|
import com.qhclh.ytzh.index.HomepageEvent; |
|
|
|
import com.qhclh.ytzh.tasks.ViewOnClickTask; |
|
|
|
import com.qhclh.ytzh.utils.RecyclerViewUtil; |
|
|
|
|
|
|
|
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; |
|
|
|
@ -60,10 +65,6 @@ public class ShangpinFragment extends BaseFragment { |
|
|
|
.error(R.mipmap.ic_launcher_round) |
|
|
|
.placeholder(R.mipmap.ic_launcher_round) |
|
|
|
.into(shangpin_banner); |
|
|
|
shangpin_zonglan.setText("总栏:"+999); |
|
|
|
shangpin_zongcunlan.setText("存栏:"+599); |
|
|
|
shangpin_zongkonglan.setText("空栏:"+400); |
|
|
|
shangpin_zongzhishu.setText("总只数:"+3456780); |
|
|
|
rv_shangpinpianqu.setNestedScrollingEnabled(false); |
|
|
|
|
|
|
|
} |
|
|
|
@ -95,7 +96,7 @@ public class ShangpinFragment extends BaseFragment { |
|
|
|
@Override |
|
|
|
public void onItemClick(View view, int position, long id) { |
|
|
|
///< 设置的id |
|
|
|
System.out.println("aaa+++++++"+shangpinPianquAdapter.getItemId(position)); |
|
|
|
// System.out.println("aaa+++++++"+shangpinPianquAdapter.getItemId(position)); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
@ -118,6 +119,33 @@ public class ShangpinFragment extends BaseFragment { |
|
|
|
}else { |
|
|
|
shangpin_banner.setVisibility(View.GONE); |
|
|
|
} |
|
|
|
|
|
|
|
BreedFactoryCountInfo(); |
|
|
|
BreedFactoryAreaCountInfo(); |
|
|
|
} |
|
|
|
|
|
|
|
private void BreedFactoryAreaCountInfo() { |
|
|
|
} |
|
|
|
|
|
|
|
private void BreedFactoryCountInfo() { |
|
|
|
ViewOnClickTask BreedFactoryCountInfoTask = new ViewOnClickTask(getActivity(),"加载中...") { |
|
|
|
RpcObject rpc; |
|
|
|
@Override |
|
|
|
protected void successUI() { |
|
|
|
shangpin_zonglan.setText("总栏:"+rpc.getInt("ZongLan")); |
|
|
|
shangpin_zongcunlan.setText("存栏:"+rpc.getInt("CunLan")); |
|
|
|
shangpin_zongkonglan.setText("空栏:"+rpc.getInt("KongLan")); |
|
|
|
shangpin_zongzhishu.setText("总只数:"+rpc.getDecimal("BreedNumber")); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Object call() throws Exception { |
|
|
|
JsonRpcResult result = RpcFacade.rpcCall(RpcUrl.BreedReportRpcCountInfo); |
|
|
|
rpc = result.getRpcObject(RpcUrl.BreedReportRpcCountInfo_fanhui); |
|
|
|
return null; |
|
|
|
} |
|
|
|
}; |
|
|
|
BreedFactoryCountInfoTask.execute(); |
|
|
|
} |
|
|
|
|
|
|
|
@Subscribe(threadMode = ThreadMode.MAIN,sticky = true) |
|
|
|
|