|
|
@@ -26,6 +26,8 @@ import com.core.api.wxapi.ApiUtils;
|
|
|
import com.core.app.AppConfig;
|
|
|
import com.core.app.MyApplication;
|
|
|
import com.core.broadcast.MsgBroadcast;
|
|
|
+import com.core.constant.AppConstant;
|
|
|
+import com.core.dao.MessageDao;
|
|
|
import com.core.dao.UserDao;
|
|
|
import com.core.model.MissionModel;
|
|
|
import com.core.model.OAConfig;
|
|
|
@@ -36,13 +38,13 @@ import com.core.net.http.http.OnHttpResultListener;
|
|
|
import com.core.net.http.http.Request;
|
|
|
import com.core.net.location.BdLocationHelper;
|
|
|
import com.core.utils.CommonInterface;
|
|
|
+import com.core.utils.NotificationManage;
|
|
|
import com.core.utils.OnGetDrivingRouteResult;
|
|
|
import com.core.utils.TimeUtils;
|
|
|
import com.core.utils.WorkHandlerUtil;
|
|
|
import com.uas.appworks.OA.erp.activity.MissionActivity;
|
|
|
import com.uas.appworks.OA.erp.activity.WorkActivity;
|
|
|
import com.xzjmyk.pm.activity.R;
|
|
|
-import com.xzjmyk.pm.activity.db.dao.MessageDao;
|
|
|
import com.xzjmyk.pm.activity.db.dao.MissionDao;
|
|
|
import com.xzjmyk.pm.activity.db.dao.WorkModelDao;
|
|
|
import com.xzjmyk.pm.activity.ui.MainActivity;
|
|
|
@@ -55,7 +57,6 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
import static com.core.net.http.ViewUtil.ct;
|
|
|
-import static com.xzjmyk.pm.activity.util.oa.AutoErpService.CHANGE_WORK_TASK;
|
|
|
import static com.xzjmyk.pm.activity.util.oa.CommonUtil.getSharedPreferences;
|
|
|
|
|
|
/**
|
|
|
@@ -520,8 +521,8 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
} else if (what == SIGNIN_MISSION) {
|
|
|
try {
|
|
|
Intent intent = new Intent();
|
|
|
- intent.putExtra(AutoErpService.CHANGE_MISSION_TASK, true);
|
|
|
- intent.setAction(AutoErpService.CHANGE_MISSION_TASK);
|
|
|
+ intent.putExtra(AppConstant.CHANGE_MISSION_TASK, true);
|
|
|
+ intent.setAction(AppConstant.CHANGE_MISSION_TASK);
|
|
|
MsgBroadcast.sendLocalBroadcast(intent);
|
|
|
if (!StringUtil.isEmpty(message))
|
|
|
CommonUtil.saveAutoLogtoLocal(getString(R.string.auto_outplan_failed), message);
|
|
|
@@ -683,8 +684,8 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
if (!b) {
|
|
|
//TODO 关闭任务
|
|
|
Intent intent = new Intent();
|
|
|
- intent.setAction(CHANGE_WORK_TASK);
|
|
|
- intent.putExtra(CHANGE_WORK_TASK, false);
|
|
|
+ intent.setAction(AppConstant.CHANGE_WORK_TASK);
|
|
|
+ intent.putExtra(AppConstant.CHANGE_WORK_TASK, false);
|
|
|
MsgBroadcast.sendLocalBroadcast(intent);
|
|
|
}
|
|
|
} else if (StringUtil.isEmpty(model.getOffSignin()) && model.getOffTime().compareTo(time) <= 0
|
|
|
@@ -697,8 +698,8 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
boolean b = hasMore();
|
|
|
if (!b) {
|
|
|
Intent intent = new Intent();
|
|
|
- intent.setAction(CHANGE_WORK_TASK);
|
|
|
- intent.putExtra(CHANGE_WORK_TASK, false);
|
|
|
+ intent.setAction(AppConstant.CHANGE_WORK_TASK);
|
|
|
+ intent.putExtra(AppConstant.CHANGE_WORK_TASK, false);
|
|
|
MsgBroadcast.sendLocalBroadcast(intent);
|
|
|
}
|
|
|
}
|
|
|
@@ -766,8 +767,8 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
Intent intent = new Intent();
|
|
|
- intent.putExtra(CHANGE_WORK_TASK, true);
|
|
|
- intent.setAction(CHANGE_WORK_TASK);//保存到数据库成功,开启
|
|
|
+ intent.putExtra(AppConstant.CHANGE_WORK_TASK, true);
|
|
|
+ intent.setAction(AppConstant.CHANGE_WORK_TASK);//保存到数据库成功,开启
|
|
|
MsgBroadcast.sendLocalBroadcast(intent);
|
|
|
}
|
|
|
});
|
|
|
@@ -794,8 +795,8 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
Intent intent = new Intent();
|
|
|
- intent.putExtra(AutoErpService.CHANGE_MISSION_TASK, true);
|
|
|
- intent.setAction(AutoErpService.CHANGE_MISSION_TASK);
|
|
|
+ intent.putExtra(AppConstant.CHANGE_MISSION_TASK, true);
|
|
|
+ intent.setAction(AppConstant.CHANGE_MISSION_TASK);
|
|
|
MsgBroadcast.sendLocalBroadcast(intent);
|
|
|
}
|
|
|
});
|
|
|
@@ -834,8 +835,8 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
Intent intent = new Intent();
|
|
|
- intent.putExtra(AutoErpService.CHANGE_MISSION_TASK, true);
|
|
|
- intent.setAction(AutoErpService.CHANGE_MISSION_TASK);
|
|
|
+ intent.putExtra(AppConstant.CHANGE_MISSION_TASK, true);
|
|
|
+ intent.setAction(AppConstant.CHANGE_MISSION_TASK);
|
|
|
MsgBroadcast.sendLocalBroadcast(intent);
|
|
|
LogUtil.i("发送广播成功");
|
|
|
}
|
|
|
@@ -878,8 +879,8 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
|
|
|
|
|
|
private void endOfMission() {
|
|
|
Intent intent = new Intent();
|
|
|
- intent.setAction(AutoErpService.CHANGE_MISSION_TASK);
|
|
|
- intent.putExtra(AutoErpService.CHANGE_MISSION_TASK, false);
|
|
|
+ intent.setAction(AppConstant.CHANGE_MISSION_TASK);
|
|
|
+ intent.putExtra(AppConstant.CHANGE_MISSION_TASK, false);
|
|
|
MsgBroadcast.sendLocalBroadcast(intent);
|
|
|
}
|
|
|
|