|
|
@@ -75,6 +75,8 @@ public class WorkPresenter implements HttpHandler.OnResultListener, IWorkPresent
|
|
|
|
|
|
|
|
|
private void loadLog(ArrayList<WorkModel> models, long time) {
|
|
|
+ if (iWorkView != null)
|
|
|
+ iWorkView.showLoading();
|
|
|
String date = TimeUtils.s_long_2_str(time);
|
|
|
//获取网络数据
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
@@ -94,6 +96,7 @@ public class WorkPresenter implements HttpHandler.OnResultListener, IWorkPresent
|
|
|
|
|
|
//判断mac地址是否已经上传
|
|
|
private void getMacByNet() {
|
|
|
+ if (iWorkView!=null)iWorkView.showLoading();
|
|
|
//获取网络数据
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
param.put("macaddress", macAddress);
|
|
|
@@ -104,6 +107,7 @@ public class WorkPresenter implements HttpHandler.OnResultListener, IWorkPresent
|
|
|
|
|
|
|
|
|
private void validatorMac(ArrayList<WorkModel> models, String macAddress) {
|
|
|
+ if (iWorkView != null) iWorkView.showLoading();
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
param.put("macAddress", macAddress);
|
|
|
param.put("emcode", CommonUtil.getSharedPreferences(MyApplication.getInstance(), "erp_username"));
|
|
|
@@ -233,6 +237,8 @@ public class WorkPresenter implements HttpHandler.OnResultListener, IWorkPresent
|
|
|
}
|
|
|
try {
|
|
|
getPoi();
|
|
|
+ if (companyLongitude == 0 || companyLatitude == 0 && iWorkView != null)
|
|
|
+ iWorkView.showToast(R.string.not_addr_message, R.color.load_warning);
|
|
|
PreferenceUtils.putInt("distance", companyDistance);
|
|
|
PreferenceUtils.putInt("innerdistance", innerdistance);
|
|
|
PreferenceUtils.putFloat("longitude", (float) companyLongitude);
|
|
|
@@ -513,6 +519,7 @@ public class WorkPresenter implements HttpHandler.OnResultListener, IWorkPresent
|
|
|
public void result(int what, boolean isJSON, String message, final Bundle bundle) {
|
|
|
try {
|
|
|
ArrayList<WorkModel> models = null;
|
|
|
+ if (iWorkView != null) iWorkView.dimssLoading();
|
|
|
switch (what) {
|
|
|
case WORK_DATA://打卡班次
|
|
|
long time = System.currentTimeMillis();
|
|
|
@@ -576,6 +583,7 @@ public class WorkPresenter implements HttpHandler.OnResultListener, IWorkPresent
|
|
|
public void error(int what, int statuCode, String message, Bundle bundle) {
|
|
|
try {
|
|
|
isSubmiting = false;
|
|
|
+ subMitTime = 0;
|
|
|
if (iWorkView != null) iWorkView.dimssLoading();
|
|
|
|
|
|
if (StringUtils.isInclude(message, "该设备不是考勤打卡常用设备")) {
|