|
|
@ -1,5 +1,6 @@ |
|
|
package com.qhclh.ytzh.index.shangpin; |
|
|
package com.qhclh.ytzh.index.shangpin; |
|
|
|
|
|
|
|
|
|
|
|
import android.content.Intent; |
|
|
import android.support.v7.widget.GridLayoutManager; |
|
|
import android.support.v7.widget.GridLayoutManager; |
|
|
import android.support.v7.widget.RecyclerView; |
|
|
import android.support.v7.widget.RecyclerView; |
|
|
import android.view.View; |
|
|
import android.view.View; |
|
|
@ -82,7 +83,10 @@ public class ShangpinFragment extends BaseFragment { |
|
|
@Override |
|
|
@Override |
|
|
public void onItemClick(View view, int position, long id) { |
|
|
public void onItemClick(View view, int position, long id) { |
|
|
///< 设置的id |
|
|
///< 设置的id |
|
|
// System.out.println("aaa+++++++"+shangpinPianquAdapter.getItemId(position)); |
|
|
|
|
|
|
|
|
Intent intent = new Intent(getActivity(),PianquinfosActivity.class); |
|
|
|
|
|
intent.putExtra("id",shangpinPianquAdapter.getItemId(position)); |
|
|
|
|
|
intent.putExtra("name",list.get(position).getPianqu()); |
|
|
|
|
|
startActivity(intent); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -119,7 +123,7 @@ public class ShangpinFragment extends BaseFragment { |
|
|
for (int i =0;i<rpcList.size();i++){ |
|
|
for (int i =0;i<rpcList.size();i++){ |
|
|
ShangpinPianquBean shangpinPianquBean = new ShangpinPianquBean(); |
|
|
ShangpinPianquBean shangpinPianquBean = new ShangpinPianquBean(); |
|
|
shangpinPianquBean.setId(rpcList.get(i).getLong("WeatherArea_ID")); |
|
|
shangpinPianquBean.setId(rpcList.get(i).getLong("WeatherArea_ID")); |
|
|
shangpinPianquBean.setPianqu("片区:"+rpcList.get(i).getString("WeatherArea_Name")); |
|
|
|
|
|
|
|
|
shangpinPianquBean.setPianqu(rpcList.get(i).getString("WeatherArea_Name")); |
|
|
shangpinPianquBean.setZonglan("总栏:"+rpcList.get(i).getInt("ZongLan")); |
|
|
shangpinPianquBean.setZonglan("总栏:"+rpcList.get(i).getInt("ZongLan")); |
|
|
shangpinPianquBean.setCunlan("存栏:"+rpcList.get(i).getInt("CunLan")); |
|
|
shangpinPianquBean.setCunlan("存栏:"+rpcList.get(i).getInt("CunLan")); |
|
|
shangpinPianquBean.setKonglan("空栏:"+rpcList.get(i).getInt("KongLan")); |
|
|
shangpinPianquBean.setKonglan("空栏:"+rpcList.get(i).getInt("KongLan")); |
|
|
|