|
|
@ -1,6 +1,9 @@ |
|
|
package com.qhclh.ytzh.work.Fowl; |
|
|
package com.qhclh.ytzh.work.Fowl; |
|
|
|
|
|
|
|
|
|
|
|
import android.view.LayoutInflater; |
|
|
|
|
|
import android.view.View; |
|
|
import android.widget.LinearLayout; |
|
|
import android.widget.LinearLayout; |
|
|
|
|
|
import android.widget.TextView; |
|
|
|
|
|
|
|
|
import com.qhclh.ytzh.R; |
|
|
import com.qhclh.ytzh.R; |
|
|
import com.qhclh.ytzh.base.BaseFragment; |
|
|
import com.qhclh.ytzh.base.BaseFragment; |
|
|
@ -63,6 +66,52 @@ public class ShangjiFragment extends BaseFragment { |
|
|
@Override |
|
|
@Override |
|
|
protected void successUI() { |
|
|
protected void successUI() { |
|
|
System.out.println("aaa+++objl+++"+objList); |
|
|
System.out.println("aaa+++objl+++"+objList); |
|
|
|
|
|
firstContent.removeAllViews(); |
|
|
|
|
|
for (int i=0;i<objList.size();i++){ |
|
|
|
|
|
View view = LayoutInflater.from(getActivity()).inflate(R.layout.view_first2,null); |
|
|
|
|
|
TextView time = view.findViewById(R.id.item_f1); |
|
|
|
|
|
TextView sum = view.findViewById(R.id.item_f2); |
|
|
|
|
|
|
|
|
|
|
|
LinearLayout secondContent = view.findViewById(R.id.secondContent_f2); |
|
|
|
|
|
LinearLayout main_ll = view.findViewById(R.id.main_ll_f2); |
|
|
|
|
|
|
|
|
|
|
|
if (objList.get(i).getDate("Date")!=null) { |
|
|
|
|
|
time.setText(DateTimeUtil.getYMD2(objList.get(i).getDate("Date"))); |
|
|
|
|
|
} |
|
|
|
|
|
sum.setText(objList.get(i).getInt("Number")+""); |
|
|
|
|
|
// main_ll.setTag(rpcStr.get(i).getLong("BreedFactory_ID")); |
|
|
|
|
|
secondContent.removeAllViews(); |
|
|
|
|
|
List<RpcObject> detailsList = objList.get(i).getList("Details"); |
|
|
|
|
|
for (int j=0;j<detailsList.size();j++){ |
|
|
|
|
|
View view2 = LayoutInflater.from(getActivity()).inflate(R.layout.view_second2,null); |
|
|
|
|
|
TextView item1 = view2.findViewById(R.id.item_s1); |
|
|
|
|
|
TextView item2 = view2.findViewById(R.id.item_s2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (detailsList.get(j).getString("BreedFactory_Name")!=null) { |
|
|
|
|
|
item1.setText(detailsList.get(j).getString("BreedFactory_Name")); |
|
|
|
|
|
}else { |
|
|
|
|
|
item1.setText(""); |
|
|
|
|
|
} |
|
|
|
|
|
if (detailsList.get(j).getInt("Number")!=null) { |
|
|
|
|
|
item2.setText("栋数:" + detailsList.get(j).getInt("Number")); |
|
|
|
|
|
}else { |
|
|
|
|
|
item2.setText("栋数:"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
secondContent.addView(view2); |
|
|
|
|
|
} |
|
|
|
|
|
firstContent.addView(view); |
|
|
|
|
|
// main_ll.setOnClickListener(new View.OnClickListener() { |
|
|
|
|
|
// @Override |
|
|
|
|
|
// public void onClick(View view) { |
|
|
|
|
|
// Intent intent = new Intent(getActivity(),PoultryReportActvity.class); |
|
|
|
|
|
// intent.putExtra("BreedFactory_ID",(long)view.getTag()); |
|
|
|
|
|
// intent.putExtra("time",choseDate); |
|
|
|
|
|
// startActivity(intent); |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
|