|
|
|
|
@ -85,8 +85,8 @@ public class XscbglActivity extends BaseActivity {
|
|
|
|
|
|
|
|
|
|
String UserIDTemp = (String) SPUtils.get(context, Contans.USERID, "");
|
|
|
|
|
username = RSAUtils.decryptBASE64StrLocal(UserIDTemp);
|
|
|
|
|
Log.i("app", "---------->");
|
|
|
|
|
Log.i("app", username);
|
|
|
|
|
showLog("---------->");
|
|
|
|
|
showLog(username);
|
|
|
|
|
|
|
|
|
|
str.add("巡检任务");
|
|
|
|
|
imageId.add(R.mipmap.icon_xs1);
|
|
|
|
|
@ -173,7 +173,6 @@ public class XscbglActivity extends BaseActivity {
|
|
|
|
|
if(type.equals("BA")){Log.i("app",Contans.IP + Contans.BAXJ);
|
|
|
|
|
requestxs = NoHttp.createStringRequest(Contans.IP + Contans.BAXJ, RequestMethod.POST);
|
|
|
|
|
}else{
|
|
|
|
|
Log.i("app",Contans.IP + Contans.XSCB);
|
|
|
|
|
requestxs = NoHttp.createStringRequest(Contans.IP + Contans.XSCB, RequestMethod.POST);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -188,30 +187,24 @@ public class XscbglActivity extends BaseActivity {
|
|
|
|
|
@Override
|
|
|
|
|
public void onSucceed(int what, Response<String> response) {
|
|
|
|
|
|
|
|
|
|
Log.i("app","----------------");
|
|
|
|
|
Log.i("app",response.get());
|
|
|
|
|
XjjhList list = GsonToBean(response.get(), XjjhList.class);
|
|
|
|
|
Log.i("app",list.getMsg());
|
|
|
|
|
Log.i("app",list.getState());
|
|
|
|
|
Log.i("app",String.valueOf(list.getData().size()));
|
|
|
|
|
Log.i("app",String .valueOf("mt"));
|
|
|
|
|
Log.i("app","app");
|
|
|
|
|
|
|
|
|
|
String result = response.get();
|
|
|
|
|
showLog("----------------");
|
|
|
|
|
showLog(result);
|
|
|
|
|
XjjhList list = GsonToBean(result, XjjhList.class);
|
|
|
|
|
|
|
|
|
|
if (list != null) {
|
|
|
|
|
for(int i=0;i<list.getData().size();i++){
|
|
|
|
|
Xjjh xjjh = list.getData().get(i);
|
|
|
|
|
Log.i("app",new Gson().toJson(xjjh));
|
|
|
|
|
}
|
|
|
|
|
// for(int i=0;i<list.getData().size();i++){
|
|
|
|
|
// Xjjh xjjh = list.getData().get(i);
|
|
|
|
|
// showLog(new Gson().toJson(xjjh));
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (list.getState().equals("1")) {
|
|
|
|
|
|
|
|
|
|
List<Xjjh> xjjhs = list.getData();//服务器数据
|
|
|
|
|
|
|
|
|
|
DataSupport.deleteAll(Xjjh.class, "download = 0 and username = ?",username);
|
|
|
|
|
|
|
|
|
|
for (Xjjh xjjh : xjjhs) {
|
|
|
|
|
|
|
|
|
|
showLog(new Gson().toJson(xjjh));
|
|
|
|
|
List<Xjjh> dbxjjh = DataSupport.where("zxid = ? and download = ? and username = ?", xjjh.getZxid(), "1",username).find(Xjjh.class);
|
|
|
|
|
|
|
|
|
|
if (dbxjjh.size() == 0) {
|
|
|
|
|
@ -249,11 +242,10 @@ public class XscbglActivity extends BaseActivity {
|
|
|
|
|
@Override
|
|
|
|
|
public void onSucceed(int what, Response<String> response) {
|
|
|
|
|
|
|
|
|
|
Log.i("app",response.get());
|
|
|
|
|
ProfessionList list = GsonToBean(response.get(), ProfessionList.class);
|
|
|
|
|
Log.i("app",list.getMsg());
|
|
|
|
|
Log.i("app",list.getState());
|
|
|
|
|
Log.i("app",String.valueOf(list.getData().size()));
|
|
|
|
|
String result = response.get();
|
|
|
|
|
showLog("----------------");
|
|
|
|
|
showLog(result);
|
|
|
|
|
ProfessionList list = GsonToBean(result, ProfessionList.class);
|
|
|
|
|
|
|
|
|
|
if (list != null) {
|
|
|
|
|
//获取数据成功
|
|
|
|
|
@ -279,7 +271,7 @@ public class XscbglActivity extends BaseActivity {
|
|
|
|
|
XsRequestInfo info = new XsRequestInfo();
|
|
|
|
|
info.setAction("BA_XJGL_RWLB_GET");
|
|
|
|
|
String json = GsonUtils.GsonString(info);
|
|
|
|
|
Log.i("app",json);
|
|
|
|
|
showLog(json);
|
|
|
|
|
return json;
|
|
|
|
|
}
|
|
|
|
|
private String createJson() {
|
|
|
|
|
@ -294,7 +286,7 @@ public class XscbglActivity extends BaseActivity {
|
|
|
|
|
info.setMk("RL");
|
|
|
|
|
}
|
|
|
|
|
String json = GsonUtils.GsonString(info);
|
|
|
|
|
Log.i("app",json);
|
|
|
|
|
showLog(json);
|
|
|
|
|
return json;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -302,7 +294,7 @@ public class XscbglActivity extends BaseActivity {
|
|
|
|
|
XsRequestInfo info = new XsRequestInfo();
|
|
|
|
|
info.setAction("YX_XJGL_ZY_GET");
|
|
|
|
|
String jsonZY = GsonUtils.GsonString(info);
|
|
|
|
|
Log.i("app",jsonZY);
|
|
|
|
|
showLog(jsonZY);
|
|
|
|
|
return jsonZY;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|