|
|
|
@ -32,7 +32,7 @@ import butterknife.BindView; |
|
|
|
* Created by 青花瓷 on 2017/12/19. |
|
|
|
*/ |
|
|
|
|
|
|
|
public class WriteDActivity extends BaseActivity implements CalendarDialogFragment.CalendarClickListener{ |
|
|
|
public class WriteDActivity extends BaseActivity implements CalendarDialogFragment.CalendarClickListener { |
|
|
|
@BindView(R.id.toolbar) |
|
|
|
Toolbar mToolbar; |
|
|
|
@BindView(R.id.tv_toolbar_title) |
|
|
|
@ -82,6 +82,7 @@ public class WriteDActivity extends BaseActivity implements CalendarDialogFragme |
|
|
|
super.onResume(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static RpcObject rpcObj; |
|
|
|
|
|
|
|
private List<RpcObject> detailsList; |
|
|
|
@ -92,58 +93,103 @@ public class WriteDActivity extends BaseActivity implements CalendarDialogFragme |
|
|
|
private String obs; |
|
|
|
private String water; |
|
|
|
private String weight; |
|
|
|
private String zuidiwendu; |
|
|
|
private String zuigaowendu; |
|
|
|
private String zuidishidu; |
|
|
|
private String zuigaoshidu; |
|
|
|
private String zuixiaotongfeng; |
|
|
|
private String zuidatongfeng; |
|
|
|
private String fuya; |
|
|
|
|
|
|
|
private void LoadOrCreateEditingDayProduct(final Date time) { |
|
|
|
ViewOnClickTask LoadOrCreateEditingDayProductTask = new ViewOnClickTask(this, "加载中...") { |
|
|
|
@Override |
|
|
|
protected void successUI() { |
|
|
|
System.out.println("aaa+++++++++++"+rpcObj); |
|
|
|
System.out.println("aaa+++++++++++" + rpcObj); |
|
|
|
detailsList = rpcObj.getManyList("Details"); |
|
|
|
for (int i = 0; i < detailsList.size(); i++) { |
|
|
|
if (detailsList.get(i).getLong("House_ID")!=null) { |
|
|
|
houseid = detailsList.get(i).getLong("House_ID")+""; |
|
|
|
}else { |
|
|
|
if (detailsList.get(i).getLong("House_ID") != null) { |
|
|
|
houseid = detailsList.get(i).getLong("House_ID") + ""; |
|
|
|
} else { |
|
|
|
houseid = ""; |
|
|
|
} |
|
|
|
|
|
|
|
if (detailsList.get(i).getString("House_Name")!=null) { |
|
|
|
if (detailsList.get(i).getString("House_Name") != null) { |
|
|
|
housename = detailsList.get(i).getString("House_Name"); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
housename = ""; |
|
|
|
} |
|
|
|
|
|
|
|
if (detailsList.get(i).getInt("Days")!=null) { |
|
|
|
days = detailsList.get(i).getInt("Days")+""; |
|
|
|
}else { |
|
|
|
if (detailsList.get(i).getInt("Days") != null) { |
|
|
|
days = detailsList.get(i).getInt("Days") + ""; |
|
|
|
} else { |
|
|
|
days = ""; |
|
|
|
} |
|
|
|
|
|
|
|
if (detailsList.get(i).getInt("DieNumber")!=null) { |
|
|
|
dienumber = detailsList.get(i).getInt("DieNumber")+""; |
|
|
|
}else { |
|
|
|
if (detailsList.get(i).getInt("DieNumber") != null) { |
|
|
|
dienumber = detailsList.get(i).getInt("DieNumber") + ""; |
|
|
|
} else { |
|
|
|
dienumber = ""; |
|
|
|
} |
|
|
|
|
|
|
|
if (detailsList.get(i).getInt("Obsolete")!=null) { |
|
|
|
obs = detailsList.get(i).getInt("Obsolete")+""; |
|
|
|
}else { |
|
|
|
if (detailsList.get(i).getInt("Obsolete") != null) { |
|
|
|
obs = detailsList.get(i).getInt("Obsolete") + ""; |
|
|
|
} else { |
|
|
|
obs = ""; |
|
|
|
} |
|
|
|
|
|
|
|
if (detailsList.get(i).getDecimal("WaterIntake")!=null) { |
|
|
|
water = detailsList.get(i).getDecimal("WaterIntake")+""; |
|
|
|
}else { |
|
|
|
water =""; |
|
|
|
if (detailsList.get(i).getDecimal("WaterIntake") != null) { |
|
|
|
water = detailsList.get(i).getDecimal("WaterIntake") + ""; |
|
|
|
} else { |
|
|
|
water = ""; |
|
|
|
} |
|
|
|
|
|
|
|
if (detailsList.get(i).getDecimal("Weight")!=null) { |
|
|
|
weight = detailsList.get(i).getDecimal("Weight")+""; |
|
|
|
}else { |
|
|
|
if (detailsList.get(i).getDecimal("Weight") != null) { |
|
|
|
weight = detailsList.get(i).getDecimal("Weight") + ""; |
|
|
|
} else { |
|
|
|
weight = ""; |
|
|
|
} |
|
|
|
|
|
|
|
if (detailsList.get(i).getDecimal("MinTemperature") != null) { |
|
|
|
zuidiwendu = detailsList.get(i).getDecimal("MinTemperature") + ""; |
|
|
|
} else { |
|
|
|
zuidiwendu = ""; |
|
|
|
} |
|
|
|
if (detailsList.get(i).getDecimal("MaxTemperature") != null) { |
|
|
|
zuigaowendu = detailsList.get(i).getDecimal("MaxTemperature") + ""; |
|
|
|
} else { |
|
|
|
zuigaowendu = ""; |
|
|
|
} |
|
|
|
if (detailsList.get(i).getDecimal("MinHumidity") != null) { |
|
|
|
zuidishidu = detailsList.get(i).getDecimal("MinHumidity") + ""; |
|
|
|
} else { |
|
|
|
zuidishidu = ""; |
|
|
|
} |
|
|
|
|
|
|
|
if (detailsList.get(i).getDecimal("MaxHumidity") != null) { |
|
|
|
zuigaoshidu = detailsList.get(i).getDecimal("MaxHumidity") + ""; |
|
|
|
} else { |
|
|
|
zuigaoshidu = ""; |
|
|
|
} |
|
|
|
if (detailsList.get(i).getDecimal("MinFanNum") != null) { |
|
|
|
zuixiaotongfeng = detailsList.get(i).getDecimal("MinFanNum") + ""; |
|
|
|
} else { |
|
|
|
zuixiaotongfeng = ""; |
|
|
|
} |
|
|
|
if (detailsList.get(i).getDecimal("MaxVentilating") != null) { |
|
|
|
zuidatongfeng = detailsList.get(i).getDecimal("MaxVentilating") + ""; |
|
|
|
} else { |
|
|
|
zuidatongfeng = ""; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WriteBean writebean = new WriteBean(); |
|
|
|
writebean.setHouseid(Long.parseLong(houseid)); |
|
|
|
writebean.setHousename(housename); |
|
|
|
writebean.setSiwang(dienumber); |
|
|
|
writebean.setTaotai(obs); |
|
|
|
writebean.setYinshuiliang(water); |
|
|
|
writebean.setTizhong(weight); |
|
|
|
list.add(writebean); |
|
|
|
} |
|
|
|
initTabLayout(); |
|
|
|
@ -180,7 +226,7 @@ public class WriteDActivity extends BaseActivity implements CalendarDialogFragme |
|
|
|
|
|
|
|
private void initTabLayout() { |
|
|
|
|
|
|
|
for (int i =0 ;i<detailsList.size() ;i++) { |
|
|
|
for (int i = 0; i < detailsList.size(); i++) { |
|
|
|
mTitleList.add(detailsList.get(i).getString("House_Name")); |
|
|
|
} |
|
|
|
mTabLayout.setTabMode(TabLayout.MODE_SCROLLABLE); |
|
|
|
@ -188,7 +234,7 @@ public class WriteDActivity extends BaseActivity implements CalendarDialogFragme |
|
|
|
|
|
|
|
private void initViewPager() { |
|
|
|
|
|
|
|
for (int i=0;i<detailsList.size();i++) { |
|
|
|
for (int i = 0; i < detailsList.size(); i++) { |
|
|
|
mFragmentList.add(new WriteDFragment(list)); |
|
|
|
} |
|
|
|
|
|
|
|
|