Commit 6faa6c8a by 罗翻

新增多任务

parent 493772ab
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":10},"path":"app-release.apk","properties":{"packageId":"com.dayu.bigfish","split":"","minSdkVersion":"16"}}]
\ No newline at end of file
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":10},"path":"app-release.apk","properties":{"packageId":"com.dayu.bigfis","split":"","minSdkVersion":"16"}}]
\ No newline at end of file
......@@ -17,8 +17,8 @@ public class Constants {
public static final String BASE_URL = "http://47.94.101.239:3112";
public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
public final static String CHECK_MULTI_WEB_SOP = "http://192.168.2.181:8080/#/manyServiceResult";
public final static String MULTI_WEB_SOP = "http://192.168.2.181:8080/#/manySop";
public final static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
public final static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
public final static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
public final static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
public static final boolean IS_DEBUG = true;
......@@ -45,6 +45,8 @@ public class Constants {
// public final static String WEB_SOP = "https://sop.kf.ai/#/sop";
// public final static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
// public final static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
// public final static String CHECK_MULTI_WEB_SOP = "http://192.168.2.181:8080/#/manyServiceResult";
// public final static String MULTI_WEB_SOP = "http://192.168.2.181:8080/#/manySop";
// public static final boolean IS_DEBUG = false;
/**
......
......@@ -166,6 +166,8 @@ public class MultiProcessOrderPresenter extends MultiProcessOrderContract.Presen
commitOrder(list);
}));
}
}else {
commitOrder(null);
}
}
......
......@@ -15,5 +15,7 @@ public interface ServerListContract {
abstract class Presenter extends BaseListPresenter<View> {
public abstract void getServerList();
public abstract void dumpToProcess();
}
}
package com.dayu.order.presenter.serverlist;
import android.databinding.ObservableField;
import android.os.Bundle;
import com.dayu.common.Constants;
import com.dayu.order.api.OrderApiFactory;
import com.dayu.order.api.protocol.Spu;
import com.dayu.order.common.OrderConstant;
import com.dayu.order.ui.activity.MultipleProcessActivity;
import java.util.ArrayList;
/**
* Created by luofan
......@@ -49,6 +53,13 @@ public class ServerListPresenter extends ServerListContract.Presenter {
}
@Override
public void dumpToProcess() {
Bundle bundle = new Bundle();
bundle.putParcelableArrayList(OrderConstant.SPUS,(ArrayList<Spu>)mDatas.get());
mView.startActivity(MultipleProcessActivity.class,bundle);
}
@Override
public void refresh() {
getServerList();
}
......
......@@ -48,6 +48,7 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailPresenter, Act
@Override
public void setPresenter() {
getPackageName();
}
@Override
......
......@@ -68,6 +68,7 @@ public class ServerListActivity extends BaseActivity<ServerListPresenter, Activi
@Override
public void onResume() {
super.onResume();
showDialog();
mPresenter.getServerList();
}
}
......@@ -359,9 +359,11 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
if (order.getSpus().size() > 1) {
intent = new Intent(mContext, ServerInfoActivity.class);
bundle.putInt(Constants.ID, order.getId());
} else {
} else if (order.getSpus().size() == 1) {
intent = new Intent(mContext, ServerListActivity.class);
bundle.putInt(Constants.ID,order.getSpus().get(0).getId());
bundle.putInt(Constants.ID, order.getSpus().get(0).getId());
} else {
return;
}
intent.putExtra(Constants.BUNDLE, bundle);
mContext.startActivity(intent);
......
......@@ -6,7 +6,9 @@ import android.view.View;
import com.dayu.base.ui.adapter.CoreAdapter;
import com.dayu.order.R;
import com.dayu.order.api.protocol.Order;
import com.dayu.order.api.protocol.Spu;
import com.dayu.order.databinding.FragmentOrderCancleItemBinding;
import com.dayu.utils.UIUtils;
import com.dayu.utils.UtilsDate;
import static com.dayu.utils.UtilsDate.FORMAT_ONE;
......@@ -54,6 +56,27 @@ public class OrderFourTabAdapter extends CoreAdapter<Order, FragmentOrderCancleI
helper.itemTextDizhi.setText(item.getProvinceName() + item.getCityName() +
item.getDistrictName() + item.getAddress());
helper.errorState.setText(mContext.getString(R.string.order_cancle));
if (item.getCreatedSource() == 4) {
if (item.getSpus().size() < 1) {
return;
}
helper.itemTextWeixiu.setText(item.getSpus().get(0).getProviderTypeName());
helper.itemTextWeixiuLeixing.setText(item.getSpus().get(0).getKaSpuName());
Spu spu = item.getSpus().get(0);
if (item.getSpus().size() > 1) {
String str = UIUtils.getString(R.string.server_num);
String result = String.format(str, item.getSpus().size());
helper.serverStyle.setText(result);
} else {
String str = UIUtils.getString(R.string.single_server_num);
String result = String.format(str, spu.getFinNum(), spu.getFinNum());
helper.serverStyle.setText(result);
}
helper.serverStyle.setVisibility(View.VISIBLE);
}else {
helper.serverStyle.setVisibility(View.GONE);
}
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -29,7 +29,7 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE
@Override
protected void onBind(FragmentOrderErrorItemBinding holder, ErrorOrder item, int position) {
super.onBind(holder, item,position);
super.onBind(holder, item, position);
initData(holder, item);
}
......@@ -56,27 +56,29 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE
helper.itemTextWeixiuLeixing.setText(item.getCategoryName());
helper.itemTextDizhi.setText(item.getProvinceName() + item.getCityName() +
item.getDistrictName() + item.getAddress());
int errorState = item.getExcptionCode();
if (errorState == 1) {
helper.errorState.setText(mContext.getString(R.string.receive_time_out));
} else if (errorState == 2) {
helper.errorState.setText(mContext.getString(R.string.appointment_time_out));
} else if (errorState == 3) {
helper.errorState.setText(mContext.getString(R.string.server_time_out));
} else if (errorState == 4) {
helper.errorState.setText(mContext.getString(R.string.delivery_time_out));
}
} catch (Exception e) {
e.printStackTrace();
}
int errorState = item.getExcptionCode();
if (errorState == 1) {
helper.errorState.setText(mContext.getString(R.string.receive_time_out));
} else if (errorState == 2) {
helper.errorState.setText(mContext.getString(R.string.appointment_time_out));
} else if (errorState == 3) {
helper.errorState.setText(mContext.getString(R.string.server_time_out));
} else if (errorState == 4) {
helper.errorState.setText(mContext.getString(R.string.delivery_time_out));
}
if (item.getCreatedSource() == 4) {
if (item.getSpus().size() < 1) {
return;
}
helper.itemTextWeixiu.setText(item.getSpus().get(0).getProviderTypeName());
helper.itemTextWeixiuLeixing.setText(item.getSpus().get(0).getKaSpuName());
Spu spu = item.getSpus().get(0);
Spu spu = item.getSpus().get(0);
if (item.getSpus().size() > 1) {
String str = UIUtils.getString(R.string.server_name);
String str = UIUtils.getString(R.string.server_num);
String result = String.format(str, item.getSpus().size());
helper.serverStyle.setText(result);
} else {
......@@ -84,8 +86,10 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE
String result = String.format(str, spu.getFinNum(), spu.getFinNum());
helper.serverStyle.setText(result);
}
helper.serverStyle.setVisibility(View.VISIBLE);
}else {
helper.serverStyle.setVisibility(View.GONE);
}
}
}
......@@ -46,6 +46,7 @@
android:background="#f5f5f5"
app:itemType="@layout/activity_server_list"
app:needCoreAdapter="true"
android:layout_marginBottom="50dp"
app:needFoot="false" />
</LinearLayout>
......@@ -56,6 +57,7 @@
android:layout_alignParentBottom="true"
android:background='@{presenter.mCanProcess?@color/bg_button:@color/cl_selector_hui}'
android:clickable='@{presenter.mCanProcess?true:true}'
android:onClick="@{()->presenter.dumpToProcess()}"
android:gravity="center"
android:text="提交验收"
android:textColor="@color/white"
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
......@@ -295,6 +294,8 @@
android:layout_marginLeft="19dp"
android:layout_marginTop="@dimen/dp_15"
android:layout_toRightOf="@+id/tv_address"
android:ellipsize="end"
android:maxLines="2"
android:text='@{item.provinceName+item.cityName+item.districtName+item.address}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="14sp" />
......
......@@ -6,6 +6,7 @@
<variable
name="item"
type="com.dayu.order.api.protocol.Order" />
<import type="android.text.TextUtils"/>
</data>
......@@ -66,7 +67,7 @@
android:layout_alignParentRight="true"
android:layout_below="@+id/tv_type"
android:layout_marginTop="14dp"
android:text="@{item.customerName}"
android:text='@{!TextUtils.isEmpty(item.customerName)?item.customerMobile:@string/no_data}'
android:textColor="@color/tv_cl"
android:textSize="14sp" />
......@@ -87,7 +88,7 @@
android:layout_alignParentRight="true"
android:layout_below="@+id/tv_name"
android:layout_marginTop="14dp"
android:text="@{item.customerMobile}"
android:text='@{!TextUtils.isEmpty(item.customerMobile)?item.customerMobile:@string/no_data}'
android:textColor="@color/tv_cl"
android:textSize="14sp" />
......@@ -107,7 +108,7 @@
android:layout_alignParentRight="true"
android:layout_below="@+id/tv_mobile"
android:layout_marginTop="14dp"
android:text="@{item.customerTelphome}"
android:text='@{!TextUtils.isEmpty(item.customerTelphome)?item.customerMobile:@string/no_data}'
android:textColor="@color/tv_cl"
android:textSize="14sp" />
......
......@@ -12,6 +12,8 @@ import com.dayu.usercenter.api.UserApiFactory;
import com.dayu.usercenter.ui.activity.AgreementActivity;
import com.dayu.usercenter.ui.activity.IdentityCertificationActivity;
import com.dayu.utils.LogUtils;
import com.dayu.utils.ToastUtils;
import com.dayu.utils.UIUtils;
import com.dayu.utils.UserManager;
import com.dayu.utils.UtilsUserAccountMatcher;
import com.hyphenate.EMCallBack;
......@@ -79,6 +81,8 @@ public class LoginPresenter extends LoginContract.Presenter {
else if (userInfo.getDetectStatus() == 2 || userInfo.getDetectStatus() == 3) {
showLoginDialog();
UserManager.getInstance().saveUser(userInfo);
}else {
ToastUtils.showShortToast(UIUtils.getString(R.string.login_faile));
}
}));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment