|
|
|
|
@ -18,6 +18,7 @@ import com.example.administrator.zhapp.DBModel.Ajhxzrwqy;
|
|
|
|
|
import com.example.administrator.zhapp.DBModel.Djjh;
|
|
|
|
|
import com.example.administrator.zhapp.DBModel.DjjhList;
|
|
|
|
|
import com.example.administrator.zhapp.DBModel.DjjhRwList;
|
|
|
|
|
import com.example.administrator.zhapp.DBModel.DjjhRwQyList;
|
|
|
|
|
import com.example.administrator.zhapp.DBModel.Zy;
|
|
|
|
|
import com.example.administrator.zhapp.DBModel.ZyInfo;
|
|
|
|
|
import com.example.administrator.zhapp.R;
|
|
|
|
|
@ -230,9 +231,13 @@ public class XzjhFragment extends BaseFragment {
|
|
|
|
|
|
|
|
|
|
//用来捕获数据解析的异常
|
|
|
|
|
try {
|
|
|
|
|
String result = response.get();
|
|
|
|
|
showLog(String.valueOf(what));
|
|
|
|
|
showLog(result);
|
|
|
|
|
|
|
|
|
|
switch (what) {
|
|
|
|
|
case 0:
|
|
|
|
|
list = GsonUtils.GsonToBean(response.get(), DjjhList.class);
|
|
|
|
|
list = GsonUtils.GsonToBean(result, DjjhList.class);
|
|
|
|
|
if (list != null) {
|
|
|
|
|
if (list.getTotal() != 0) {
|
|
|
|
|
djjhs.clear();
|
|
|
|
|
@ -247,8 +252,7 @@ public class XzjhFragment extends BaseFragment {
|
|
|
|
|
case 1:
|
|
|
|
|
++requestCount;
|
|
|
|
|
rwlist = null;
|
|
|
|
|
Log.e("dataLog", response.get());
|
|
|
|
|
rwlist = GsonUtils.GsonToBean(response.get(), DjjhRwList.class);
|
|
|
|
|
rwlist = GsonUtils.GsonToBean(result, DjjhRwList.class);
|
|
|
|
|
|
|
|
|
|
//保存数据
|
|
|
|
|
if (rwlist != null) {
|
|
|
|
|
@ -259,6 +263,9 @@ public class XzjhFragment extends BaseFragment {
|
|
|
|
|
Log.e("dataLog", rwlist.getRows().get(0).getDjjhRqqys().get(0).getJHID());
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < rwlist.getRows().size(); i++) {
|
|
|
|
|
DjjhRwQyList item = rwlist.getRows().get(i);
|
|
|
|
|
showLog(GsonUtils.GsonString(item));
|
|
|
|
|
showLog(GsonUtils.GsonString(rwlist.getRows().get(i).getDjjhRqqys()));
|
|
|
|
|
DataSupport.saveAll(rwlist.getRows().get(i).getDjjhRqqys());
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
@ -269,7 +276,7 @@ public class XzjhFragment extends BaseFragment {
|
|
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
|
++requestCount;
|
|
|
|
|
AjhjhxzrwList list = GsonUtils.GsonToBean(response.get(), AjhjhxzrwList.class);
|
|
|
|
|
AjhjhxzrwList list = GsonUtils.GsonToBean(result, AjhjhxzrwList.class);
|
|
|
|
|
if (list != null) {
|
|
|
|
|
if (list.getTotal() != 0) {
|
|
|
|
|
rwqys.clear();
|
|
|
|
|
@ -290,7 +297,7 @@ public class XzjhFragment extends BaseFragment {
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case 9:
|
|
|
|
|
ZyInfo info = GsonUtils.GsonToBean(response.get(), ZyInfo.class);
|
|
|
|
|
ZyInfo info = GsonUtils.GsonToBean(result, ZyInfo.class);
|
|
|
|
|
if (info != null) {
|
|
|
|
|
if (DataSupport.count("zy") != 0) {
|
|
|
|
|
DataSupport.deleteAll(Zy.class);
|
|
|
|
|
|