配置调整

master
hwf452 10 months ago
parent 22366f83f4
commit 74b32fddf4

@ -160,11 +160,22 @@ public class LoginActivity extends BaseActivity {
// et_use.setText("FGTL01");
// et_pwd.setText("123");
et_use.setText("310673");
et_pwd.setText("Abcd@1234");
// et_use.setText("310673");
// et_pwd.setText("Abcd@1234");
// et_use.setText("310482");
// et_pwd.setText("310482");
// et_use.setText("FK1");
// et_pwd.setText("123456");
//谭添欢燃料运行E班
// et_use.setText("310273");
// et_pwd.setText("@Tth310273");
//文华鲲(燃料运行C班)
et_use.setText("310295");
et_pwd.setText("@Whk310295");
}
}
@ -226,6 +237,7 @@ public class LoginActivity extends BaseActivity {
public void onSucceed(int what, Response<String> response) {
String json = response.get();
showLog("---login----");
showLog(json);
UserInfo userInfo = GsonUtils.GsonToBean(json, UserInfo.class);
if (userInfo != null) {

@ -373,7 +373,9 @@ public class DjdscFragment extends BaseFragment {
private void sCData(String json) {
dialog.show();
++requestCount;
Logger.v(json);
showLog("------点检上传------");
showLog(json);
//计划
Request<String> request = NoHttp.createStringRequest(Contans.IP + Contans.DJJHSC, RequestMethod.POST);
request.setDefineRequestBodyForJson(UiUtlis.encoder(json));
@ -390,7 +392,7 @@ public class DjdscFragment extends BaseFragment {
// }
}
queue.add(0, request, new HttpResponseListener<>(getActivity(), request, callback, false, false, ""));
//queue.add(0, request, new HttpResponseListener<>(getActivity(), request, callback, false, false, ""));
//NohttpUtils.getInstance().add(getActivity(), 0, request, callback, true, false, "上传中...");

@ -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);

@ -14,6 +14,8 @@ import android.os.Build;
import android.os.Environment;
import androidx.core.content.FileProvider;
import androidx.appcompat.app.AlertDialog;
import android.text.TextUtils;
import android.util.Log;
import android.view.WindowManager;
@ -110,6 +112,7 @@ public class PushService extends IntentService {
break;
//点检
case 1:
showLog("点检");
Request<String> dj = NoHttp.createStringRequest(Contans.IP + Contans.DJJHLIST);
dj.add("BZMC", UiUtlis.encoder((String) SPUtils.get(getApplicationContext(), Contans.BZBH, "12108080101")));
NohttpUtils.getInstance().addNoProgress(this, 1, dj, callback);
@ -172,8 +175,9 @@ public class PushService extends IntentService {
}
break;
case 1:
showLog("1");
showLog("点检");
showLog(response.get());
DjjhList list = GsonToBean(response.get(), DjjhList.class);
if (list != null) {
if (list.getTotal() != 0) {
@ -463,4 +467,13 @@ public class PushService extends IntentService {
}
return null;
}
public void showLog(String logText) {
if (BuildConfig.LOG_ERROR) {
if(TextUtils.isEmpty(logText)){
Log.i("app", "logText is null");
}else{
Log.i("app", logText);
}
}
}
}
Loading…
Cancel
Save