|
|
@@ -85,7 +85,7 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
public void signinWork(WorkModel model) {
|
|
|
//1.判读mac地址是否符合 3.签到
|
|
|
if (!MyApplication.getInstance().isNetworkActive()) {
|
|
|
- CommonUtil.saveAutoLogtoLocal("自动打卡", "网络未连接");
|
|
|
+ CommonUtil.saveAutoLogtoLocal(getString(R.string.auto_sign_failed), getString(R.string.common_notlinknet));
|
|
|
return;
|
|
|
}
|
|
|
MacAndIDUtil util = new MacAndIDUtil();
|
|
|
@@ -111,7 +111,7 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
if (model == null) return;
|
|
|
if (!MyApplication.getInstance().isNetworkActive()) {
|
|
|
notificationManage.sendNotification(ct, R.string.out_net_signin, MissionActivity.class);
|
|
|
- CommonUtil.saveAutoLogtoLocal("自动外勤", "网络未连接");
|
|
|
+ CommonUtil.saveAutoLogtoLocal(getString(R.string.auto_outplan_failed), getString(R.string.common_notlinknet));
|
|
|
return;
|
|
|
}
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
@@ -491,7 +491,7 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
} catch (Exception e) {
|
|
|
if (e != null) {
|
|
|
LogUtil.i("result=" + e.getMessage());
|
|
|
- CommonUtil.saveAutoLogtoLocal("APP监控", e.getMessage());
|
|
|
+ CommonUtil.saveAutoLogtoLocal(getString(R.string.app_monitor_log), e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -504,10 +504,13 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
String msg = null;
|
|
|
if (StringUtils.isInclude(message, MyApplication.getInstance().getString(R.string.is_not_common_device))) {
|
|
|
msg = MyApplication.getInstance().getString(R.string.is_not_common_device_not_signin);
|
|
|
+ CommonUtil.saveAutoLogtoLocal(getString(R.string.auto_sign_failed),msg);
|
|
|
} else if (StringUtils.isInclude(message, "设备正处于申请变更绑定阶段")) {
|
|
|
msg = MyApplication.getInstance().getString(R.string.is_changeing_not_signin);
|
|
|
+ CommonUtil.saveAutoLogtoLocal(getString(R.string.auto_sign_failed),msg);
|
|
|
} else if (StringUtils.isInclude(message, "该设备已被他人绑定")) {
|
|
|
msg = MyApplication.getInstance().getString(R.string.is_binded_other_not_signin);
|
|
|
+ CommonUtil.saveAutoLogtoLocal(getString(R.string.auto_sign_failed),msg);
|
|
|
} else if (what == SIGNIN_MISSION) {
|
|
|
try {
|
|
|
Intent intent = new Intent();
|
|
|
@@ -515,12 +518,12 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
intent.setAction(AutoErpService.CHANGE_MISSION_TASK);
|
|
|
MsgBroadcast.sendLocalBroadcast(intent);
|
|
|
if (!StringUtils.isEmpty(message))
|
|
|
- CommonUtil.saveAutoLogtoLocal("自动外勤", message);
|
|
|
+ CommonUtil.saveAutoLogtoLocal(getString(R.string.auto_outplan_failed), message);
|
|
|
} catch (Exception e) {
|
|
|
}
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(msg))
|
|
|
- CommonUtil.saveAutoLogtoLocal("APP监控", msg);
|
|
|
+ CommonUtil.saveAutoLogtoLocal(getString(R.string.app_monitor_log), msg);
|
|
|
if (!isErrorMac && !StringUtils.isEmpty(msg)) {
|
|
|
isErrorMac = true;
|
|
|
notificationManage.sendNotification(MyApplication.getInstance(), msg, WorkActivity.class);
|
|
|
@@ -819,7 +822,7 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
|
|
|
}
|
|
|
if (saveOk) {
|
|
|
- CommonUtil.saveAutoLogtoLocal("APP启动", "APP外勤任务开启");
|
|
|
+ CommonUtil.saveAutoLogtoLocal(getString(R.string.app_start_log), getString(R.string.app_outplan_running));
|
|
|
//TODO 保存异常数据库
|
|
|
OAHttpHelper.getInstance().post(new Runnable() {
|
|
|
@Override
|