Commit fc4d3d68 by yu

2017/10/11 第二次提交

parent 2d6d1121
Showing with 4328 additions and 919 deletions
......@@ -8,6 +8,14 @@ greendao {
targetGenDir 'src/main/java'
}
android {
signingConfigs {
config {
keyAlias 'app_key'
keyPassword '123456789'
storeFile file('/Users/yu/Desktop/app_key.jks')
storePassword '123456789'
}
}
compileSdkVersion 25
buildToolsVersion "25.0.3"
aaptOptions {
......@@ -21,7 +29,7 @@ android {
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
//Java8
compileOptions {
......@@ -41,15 +49,18 @@ android {
assets.srcDirs = ['src/main/assets', 'src/main/assets/']
}
}
lintOptions{
checkReleaseBuilds false
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:22.0.2'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
testCompile 'junit:junit:4.12'
//网络请求框架 https://github.com/jeasonlzy/okhttp-OkGo
......@@ -62,7 +73,7 @@ dependencies {
//json数据解析的gson,谷歌出品
//注解工具
compile 'com.jakewharton:butterknife:8.1.0'
compile 'com.android.support:cardview-v7:21.0.2'
// compile 'com.android.support:cardview-v7:21.0.2'
apt 'com.jakewharton:butterknife-compiler:8.1.0'
compile 'com.google.code.gson:gson:2.8.1'
//友盟统计
......@@ -75,7 +86,7 @@ dependencies {
//调起相机拍照
//compile 'com.jph.takephoto:takephoto_library:4.0.3'
// compile 'com.jph.takephoto:takephoto_library:4.0.3'
// compile 'com.squareup.picasso:picasso:2.5.2'
// compile 'com.squareup.picasso:picasso:2.5.2'
//上拉加载,下拉刷新
compile 'com.cjj.materialrefeshlayout:library:1.3.0'
//greendao数据库
......@@ -87,9 +98,11 @@ dependencies {
compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
//日期选择器
compile 'com.contrarywind:Android-PickerView:3.2.4'
// 图片压缩
// 图片压缩
compile 'top.zibin:Luban:1.1.3'
//各种工具类 https://github.com/passiontim/AndroidUtilCode
//compile 'com.blankj:utilcode:1.1.5'
compile 'com.afollestad.material-dialogs:core:0.8.5.9'
compile files('libs/xUtils-2.6.14.jar')
// compile project(path: ':easeui')
}
......@@ -44,7 +44,7 @@
android:hardwareAccelerated="true"
/>
//友盟统计相关配置:
<uses-sdk android:minSdkVersion="8"></uses-sdk>
<!--<uses-sdk android:minSdkVersion="8"></uses-sdk>-->
//配置应用Appkey
<meta-data android:value="599a41697f2c743210000990"
android:name="UMENG_APPKEY"/>
......@@ -55,7 +55,7 @@
<!-- 设置环信应用的AppKey -->
<meta-data android:name="EASEMOB_APPKEY" android:value="1116170816115316#dayuai" />
<!-- 声明SDK所需的service SDK核心功能-->
<service android:name="com.hyphenate.chat.EMChatService" android:exported="true"/>
<service android:name="com.hyphenate.chat.EMChatService" android:exported="true"/>
<service android:name="com.hyphenate.chat.EMJobService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="true"
......@@ -66,7 +66,7 @@
<action android:name="android.intent.action.PACKAGE_REMOVED"/>
<data android:scheme="package"/>
</intent-filter>
<!-- 可选filter -->
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.USER_PRESENT" />
......@@ -88,6 +88,7 @@
<activity android:name=".activity.AgainUpDoorActivity"/>
<activity android:name=".activity.AboutUs"/>
<activity android:name=".activity.IdeaActivity"/>
<activity android:name=".activity.WorksheetRecordActivity"/>
</application>
</manifest>
\ No newline at end of file
......@@ -7,39 +7,109 @@ import com.dayu.bigfish.utils.LogUtils;
*/
public class Constants {
//控制Log日志的输出,具体常量控制规则由LogUtils类参数说明
public static final int DEBUGLEVEL = LogUtils.LEVEL_ALL;
/**************************微服务测试路径*******************************/
public static final String BASE_USER = "http://47.94.101.239:7100/";
public static final String BASE_ORDER = "http://47.94.101.239:7200/";
public static final String BASE_OTHER = "http://47.94.101.239:7300/";
public static final String BASE_COUNT = "http://47.94.101.239:7500/";
/**************************正式环境路径*******************************/
public static final String BASE_URL = "http://mobile.dayu.ai";
/**************************测试环境*******************************/
//登录的URL
public static final String LOGIN_URL = "http://47.94.101.239:7100/account/appLogin";
public static final String LOGIN_URL = BASE_USER + "account/appLogin";
//登录时发送验证码的URL
public static final String REGISTER_URL = BASE_USER + "account/loginSms/";
//根据工单状态获取分页工单信息的路径
public static final String ORDER_URL = BASE_ORDER + "orders/findSimpleOrderVOByPage";
//异常单获取
public static final String ERROR_ORDER = BASE_ORDER + "orders/findExceptionSimpleOrderVO";
//再次上门、重新预约时间
public static final String ORDER_DOOR = BASE_ORDER + "orders/bespeakDoor";
//开始出发
public static final String START_ORDER = BASE_ORDER + "orders/onWay/";
//工程师接单
// public static final String ORDER_RECEIVING = BASE_ORDER + "/api-order/" +"orders/";
public static final String ORDER_RECEIVING = BASE_ORDER+"orders/";
//开始服务
public static final String START_SERVE = BASE_ORDER + "orders/onWorking/";
//工单详情信息,包含评价,投诉,服务记录
public static final String ORDER_FINISH = BASE_ORDER + "orders/waitCustomerCheck";
//个人中心
public static final String PERSONAL_CENTER = BASE_USER + "engineerInfo/accountId/";
//单表查询工单记录
public final static String SELECT_ORDER = BASE_ORDER + "orders/";
//根据工程师id和工程师id获取今日业绩(今日收益)
public final static String USER_ORDER_REVENUE = BASE_COUNT + "ordersStatistics/income/";
//根据站点id和工程师id获取工程师今日接单数量
public final static String USER_ORDER_RECEIVING = BASE_COUNT + "ordersStatistics/tasks/";
//服务记录、工程师评价
public final static String USER_REVENUE = BASE_COUNT + "ordersStatistics/total/";
//反馈提交
public final static String SET_IDEA_COMMIT = BASE_OTHER + "suggest";
//版本更新检测
public final static String UPDATA_VERSION = BASE_OTHER + "appVersion/newestVersion/appId/";
//版本更新
public final static String UPGRADE_VERSION = BASE_OTHER + "appVersion/versionInfo";
//第一次使用版本时需要上传的用户信息
public final static String COMMIT_VERSION_INFO = BASE_OTHER + "versionUpgrade";
//工单记录/搜索工单
public final static String WORKSSHEET_RECORD = BASE_ORDER + "orders/findSimpleOrderVOByPage";
//获取首页tab状态的数量
public final static String TAB_NUM = BASE_ORDER + "orders/";
/**************************正式环境*******************************/
/*//登录的URL
public static final String LOGIN_URL = BASE_URL + "/api-user/" + "account/appLogin";
//登录时发送验证码的URL
public static final String REGISTER_URL = "http://47.94.101.239:7100/account/loginSms/";
public static final String PHONTO = "http://47.94.101.239:111//file/uploadOne?targetPath=business/serviceReport";
public static final String REGISTER_URL = BASE_URL + "/api-user/" + "account/loginSms/";
//根据工单状态获取分页工单信息的路径
public static final String ORDER_URL = "http://47.94.101.239:7200/orders/findSimpleOrderVOByPage";
public static final String ORDER_URL = BASE_URL + "/api-order/" + "orders/findSimpleOrderVOByPage";
//异常单获取
public static final String ERROR_ORDER = BASE_URL + "/api-order/" + "orders/findExceptionSimpleOrderVO";
//工程师接单
public static final String ORDER_RECEIVING = "http://47.94.101.239:7200/";
//http://www.dayu.ai:7200/orders/
public static final String ORDER_DOOR = "http://47.94.101.239:7200/orders/bespeakDoor";
public static final String ORDER_RECEIVING = BASE_URL + "/api-order/" + "orders/";
//再次上门、重新预约时间
public static final String ORDER_DOOR = BASE_URL + "/api-order/" + "orders/bespeakDoor";
//开始出发
public static final String START_ORDER = "http://47.94.101.239:7200/orders/onWay/";
public static final String START_ORDER = BASE_URL + "/api-order/" + "orders/onWay/";
//开始服务
public static final String START_SERVE = "http://47.94.101.239:7200/orders/onWorking/";
public static final String START_SERVE = BASE_URL + "/api-order/" + "orders/onWorking/";
//工单详情信息,包含评价,投诉,服务记录
//public static final String ORDER_INFO = "http://www.dayu.ai:7200/orders/9/detail";
public static final String ORDER_FINISH = "http://47.94.101.239:7200/orders/waitCustomerCheck";
public static final String ORDER_FINISH = BASE_URL + "/api-order/" + "orders/waitCustomerCheck";
//个人中心
public static final String PERSONAL_CENTER = "http://47.94.101.239:7100/engineerInfo/accountId/";
public static final String PERSONAL_CENTER = BASE_URL + "/api-user/" + "engineerInfo/accountId/";
//单表查询工单记录
public final static String SELECT_ORDER = BASE_URL + "/api-order/" + "orders/";
//根据工程师id和工程师id获取今日业绩(今日收益)
public final static String USER_ORDER_REVENUE = BASE_URL + "/api-count/" + "ordersStatistics/income/";
//根据站点id和工程师id获取工程师今日接单数量
public final static String USER_ORDER_RECEIVING = BASE_URL + "/api-count/" + "ordersStatistics/tasks/";
//服务记录、工程师评价
public final static String USER_REVENUE = BASE_URL + "/api-count/" + "ordersStatistics/total/";
//反馈提交
public final static String SET_IDEA_COMMIT = BASE_URL + "/api-base/" + "suggest";
//版本更新检测
public final static String UPDATA_VERSION = BASE_URL + "/api-base/" + "appVersion/newestVersion/appId/";
//版本更新、获取新版本信息
public final static String UPGRADE_VERSION = BASE_URL + "/api-base/" + "appVersion/versionInfo";
public final static String COMMIT_VERSION_INFO = BASE_URL + "/api-base/" + "versionUpgrade";
//工单记录/搜索工单
public final static String WORKSSHEET_RECORD = BASE_URL + "/api-order/" + "orders/findSimpleOrderVOByPage";
//获取首页tab状态的数量
public final static String TAB_NUM = BASE_URL + "/api-order/" + "orders/";*/
/***********************其他配置**********************************/
//控制Log日志的输出,具体常量控制规则由LogUtils类参数说明
public static final int DEBUGLEVEL = LogUtils.LEVEL_ALL;
//相册选择照片删除时传递的key
public final static String BUNDLE_KEY_ID = "BUNDLE_KEY_ID";
//处理工单上传照片
public final static String UP_PHOTO = "http://47.94.101.239:3111/file/uploadMore";
//单表查询工单记录
public final static String SELECT_ORDER = "http://47.94.101.239:7200/orders/";
//根据工程师id和工程师id获取今日业绩(今日收益)
public final static String USER_ORDER_REVENUE = "http://47.94.101.239:7500/ordersStatistics/income/engineerId/";
//根据站点id和工程师id获取工程师今日接单
public final static String USER_ORDER_RECEIVING = "http://47.94.101.239: 7500/ordersStatistics/tasks/siteId/38/engineerId/87";
//通用的工程师id
public final static String USER_ID = " /engineerId/";
//通用的站点id
public final static String SITE_ID = "siteId/";
public final static String TAB_NUM_COUNT = "/count";
}
......@@ -2,53 +2,71 @@ package com.dayu.bigfish;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.AlertDialog;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.SystemClock;
import android.support.annotation.RequiresApi;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.app.NotificationCompat;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.dayu.bigfish.activity.HomeActivity;
import com.dayu.bigfish.activity.LoginActivity;
import com.dayu.bigfish.bean.BaseStringBean;
import com.dayu.bigfish.bean.MessageTell;
import com.dayu.bigfish.bean.UserInfo;
import com.dayu.bigfish.bean.VersionBase;
import com.dayu.bigfish.managers.UserManager;
import com.dayu.bigfish.utils.LogUtils;
import com.dayu.bigfish.utils.SPUtils;
import com.dayu.bigfish.utils.ToastUtils;
import com.hyphenate.EMCallBack;
import com.google.gson.Gson;
import com.hyphenate.EMMessageListener;
import com.hyphenate.chat.EMClient;
import com.hyphenate.chat.EMMessage;
import java.util.Iterator;
import com.lidroid.xutils.HttpUtils;
import com.lidroid.xutils.exception.HttpException;
import com.lidroid.xutils.http.ResponseInfo;
import com.lidroid.xutils.http.callback.RequestCallBack;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import okhttp3.Call;
import okhttp3.Response;
import butterknife.ButterKnife;
import static android.R.attr.value;
import static android.R.id.list;
import static com.dayu.bigfish.utils.SPUtils.get;
import static android.os.Build.ID;
public class MainActivity extends AppCompatActivity {
public String name;
public String pwd;
private UserInfo userInfo = new UserInfo();
/* public String name;
public String pwd;*/
/* private UserInfo userInfo = new UserInfo();
private String hxUserId;
private String hxUserPwd;
private Notification notification;
private Notification notification;*/
// private int userId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
private ProgressDialog pd; //进度条对话框
NotificationManager manager;
int ID = 0x123;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// hxUserId = (String) SPUtils.get(this, "big_fish", "HXUSER_ID", "");
// hxUserPwd = (String) SPUtils.get(this, "big_fish", "HXUSER_PWD", "");
// supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
//取消状态栏
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
......@@ -57,13 +75,38 @@ public class MainActivity extends AppCompatActivity {
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_main);
//判断userInfo中是否有数据
System.out.println("---------->" + UserManager.getInstance().hasUserInfo(this));
if (UserManager.getInstance().hasUserInfo(this)) {
//进入主页面,无需登录
startHomeActivity();
//联网检测当前是否为最新版本
OkGo.get(Constants.UPDATA_VERSION + "dayushifua_dayu")
.tag(this)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
BaseStringBean baseStringBean = gson.fromJson(s, BaseStringBean.class);
if (baseStringBean.getCode() == 0) {
if (!(getPackageNum().equals(baseStringBean.getData()))) {
ToastUtils.showShortToast("需要更新");
upgradeVersion(baseStringBean.getData());
} else {
// commitVersionInfo(userId, getIMEI(MainActivity.this), getPackageNum());
ToastUtils.showShortToast("当前是最新版本,无需更新");
startHomeActivity();
}
} else {
ToastUtils.showShortToast("检测更新版本失败");
startHomeActivity();
}
}
@Override
public void onError(Call call, Response response, Exception e) {
ToastUtils.showShortToast("网络或服务器异常,检测版本失败");
startHomeActivity();
}
});
} else {
//userInfo没有找到关于用户的信息,打开登录页面
startLoginActivity();
......@@ -77,7 +120,7 @@ public class MainActivity extends AppCompatActivity {
new Thread(new Runnable() {
@Override
public void run() {
SystemClock.sleep(3000);
SystemClock.sleep(2000);
Intent intent = new Intent(MainActivity.this, HomeActivity.class);
startActivity(intent);
finish();
......@@ -87,43 +130,66 @@ public class MainActivity extends AppCompatActivity {
//注册监听事件
EMMessageListener msgListener = new EMMessageListener() {
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
@Override
public void onMessageReceived(List<EMMessage> messages) {
//收到消息
for (EMMessage list : messages) {
// ToastUtils.showShortToast("收到CMD消息");
System.out.println("收到消息" + list.getBody());
LogUtils.d("收到消息", list.getBody().toString());
//获取PendingIntent
Intent mainIntent = new Intent(MainActivity.this, HomeActivity.class);
PendingIntent mainPendingIntent = PendingIntent.getActivity(MainActivity.this, 0, mainIntent, PendingIntent.FLAG_UPDATE_CURRENT);
//获取NotificationManager实例
NotificationManager notifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
//实例化NotificationCompat.Builde并设置相关属性
NotificationCompat.Builder builder = (NotificationCompat.Builder) new NotificationCompat.Builder(MainActivity.this)
//设置小图标
.setSmallIcon(R.mipmap.logo)
//点击通知后自动清除
System.out.println("----->----->" + list.ext());
Intent intent = new Intent(MainActivity.this, HomeActivity.class);
PendingIntent pi = PendingIntent.getActivity(MainActivity.this,
0, intent, 0);
String str=list.getBody().toString();
str=str.substring(3);
//str=str.Substring(3);
Notification.Builder builder = new Notification.Builder(MainActivity.this);
builder
// 设置打开通知,该通知取消
.setAutoCancel(true)
//设置通知标题
.setContentTitle("最简单的Notification")
//设置通知内容
.setContentText(list.getBody().toString());
//设置通知时间,默认为系统发出通知的时间,通常不用设置
//.setWhen(System.currentTimeMillis());
//通过builder.build()方法生成Notification对象,并发送通知,id=1
notifyManager.notify(1, builder.build());
// 设置通知提示信息
.setTicker("有新消息")
// 设置通知的图标
.setSmallIcon(R.mipmap.logo)
// 设置通知的标题
.setContentTitle(list.getFrom())
// 设置通知的内容
.setContentText(str)
// 设置使用系统默认的声音、LED
.setDefaults(
Notification.DEFAULT_LIGHTS
| Notification.DEFAULT_SOUND)
// 设置通知发布时间
.setWhen(System.currentTimeMillis())
// 设置将要启动的活动
.setContentIntent(pi)
.build();
Notification notification = builder.build();
NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
manager.notify(ID, notification);
MessageTell messageTell = new Gson().fromJson(list.ext().toString(), MessageTell.class);
// if (messageTell.getFunctionType().equals("1")) {
// }else{
// List<MessageTell> messageTells = new ArrayList<>();
// int num = 0;
// for (int i = 0; i < messageTells.size(); i++) {
// if (messageTells.get(i).getFunctionType().equals("2")) {
// num++;
// }
// }
// }
}
}
@Override
public void onCmdMessageReceived(List<EMMessage> messages) {
//收到透传消息
for (EMMessage list : messages) {
// ToastUtils.showShortToast("收到CMD消息");
System.out.println("收到CMD消息"+list.getBody());
// ToastUtils.showShortToast("收到CMD消息");
System.out.println("收到CMD消息" + list.getBody());
LogUtils.d("收到CMD消息", list.getBody().toString());
}
}
......@@ -154,7 +220,7 @@ public class MainActivity extends AppCompatActivity {
new Thread(new Runnable() {
@Override
public void run() {
SystemClock.sleep(3000);
SystemClock.sleep(2000);
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
startActivity(intent);
finish();
......@@ -164,5 +230,109 @@ public class MainActivity extends AppCompatActivity {
}
/**
* 获取当前应用的版本号
*/
public String getPackageNum() {
try {
PackageInfo packageInfo = this.getPackageManager().getPackageInfo(this.getPackageName(), 0);
String packageName = packageInfo.versionName;
return packageName;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
return "解析版本号失败";
}
}
/**
* 获取新版本的信息
*/
public void upgradeVersion(String versionCode) {
//?appId=dayushifua_dayu&versionCode=1.10.1
OkGo.get(Constants.UPGRADE_VERSION)
.tag(this)
.params("appId", "dayushifua_dayu")
.params("versionCode", versionCode)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
VersionBase versionBase = gson.fromJson(s, VersionBase.class);
if (versionBase.getCode() == 0) {
//弹窗
showUpdateDialog(versionBase.getData().getUpgradePrompt(), versionBase.getData().getDownloadUrl());
} else {
ToastUtils.showShortToast("获取新版本信息失败");
startHomeActivity();
//SPUtils.get(MainActivity.this,"big_fish")
}
}
@Override
public void onError(Call call, Response response, Exception e) {
ToastUtils.showShortToast("网络或服务器异常,获取新版本APK失败");
startHomeActivity();
}
});
}
/**
* 弹窗选择是否更新(软更新)
* @param upgradePrompt 提示语
* @param downloadPath 下载的路径
*/
private void showUpdateDialog(String upgradePrompt, String downloadPath) {
AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);
alertDialog.setCancelable(false);//设置点击弹窗外部区域,会话框不能消失
alertDialog.setTitle("有新版本啦");
alertDialog.setMessage(upgradePrompt);
alertDialog.setPositiveButton("下次再说", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
startHomeActivity();
}
});
alertDialog.setNegativeButton("立刻升级", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
pd = new ProgressDialog(MainActivity.this);//创建进度条对话框
pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);//设置进度条样式为水平方向
pd.show();//显示进度条对话框
File sdDir = Environment.getExternalStorageDirectory();
File file = new File(sdDir, SystemClock.uptimeMillis() + ".apk");
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
HttpUtils httpUtils = new HttpUtils();
httpUtils.download(downloadPath, file.getAbsolutePath(), new RequestCallBack<File>() {
@Override
public void onSuccess(ResponseInfo<File> responseInfo) {
pd.dismiss(); //关闭进度条对话框
Toast.makeText(MainActivity.this, "下载成功", Toast.LENGTH_SHORT).show();
/*覆盖安装APK*/
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
intent.addCategory("android.intent.category.DEFAULT");
intent.setDataAndType(Uri.fromFile(responseInfo.result),
"application/vnd.android.package-archive");
startActivity(intent);
}
@Override
public void onFailure(HttpException e, String s) {
pd.dismiss();
Toast.makeText(MainActivity.this, "下载失败", Toast.LENGTH_SHORT).show();
}
@Override
public void onLoading(long total, long current, boolean isUploading) {
super.onLoading(total, current, isUploading);
pd.setMax((int) total); //设置进度条最大值
pd.setProgress((int) current); //设置进度条最小值
}
});
}
}
});
alertDialog.show();
}
}
package com.dayu.bigfish.activity;
/**
* Created by yu on 2017/9/22.
*/
public class CustomHelper {
}
......@@ -16,10 +16,12 @@ import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.adapter.FragmentHomeAdapter;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.bean.LoginBean;
import com.dayu.bigfish.bean.TabBean;
import com.dayu.bigfish.fragment.HomeEndTabFragment;
import com.dayu.bigfish.fragment.HomeOneTabFragment;
import com.dayu.bigfish.fragment.HomeThreeTabFragment;
......@@ -28,9 +30,13 @@ import com.dayu.bigfish.moudle.home.HomePresenter;
import com.dayu.bigfish.moudle.home.HomeView;
import com.dayu.bigfish.moudle.login.LoginPresenter;
import com.dayu.bigfish.utils.DpToPxUtils;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.LogUtils;
import com.dayu.bigfish.utils.SPUtils;
import com.dayu.bigfish.views.CircleImageView;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import java.lang.reflect.Field;
import java.util.ArrayList;
......@@ -39,6 +45,8 @@ import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import okhttp3.Call;
import okhttp3.Response;
import static com.dayu.bigfish.R.id.tabicon;
......@@ -70,6 +78,7 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen
public List<Fragment> list_fragments;
private FragmentHomeAdapter adapter;
private TextView textView_number;
private int userId;
private String imageUrl;//图片的Url
// private LoginBean loginBean = new LoginBean();
......@@ -88,6 +97,7 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen
@Override
public void initData() {
userId= GetUserInfo.getACCOUNT_ID(this);
viewPager.setOffscreenPageLimit(0);
list_fragments = new ArrayList<>();
list_fragments.add(new HomeOneTabFragment());
......@@ -98,10 +108,8 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen
viewPager.setAdapter(adapter);
homeTabLayout.setupWithViewPager(viewPager);
homeTabLayout.removeAllTabs();
homeTabLayout.addTab(homeTabLayout.newTab().setCustomView(tab_icon_one("4", "待预约")));
homeTabLayout.addTab(homeTabLayout.newTab().setCustomView(tab_icon("6", "待服务")));
homeTabLayout.addTab(homeTabLayout.newTab().setCustomView(tab_icon("8", "异常单")));
homeTabLayout.addTab(homeTabLayout.newTab().setCustomView(tab_icon("10", "已取消")));
initNetWorkTabNum(userId);
setTabNum("0","0","0","0");
homeTabLayout.setTabMode(TabLayout.MODE_FIXED);
homeTabLayout.post(new Runnable() {
@Override
......@@ -221,6 +229,38 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen
}
});
}
/**
* 请求服务器tab的
* */
private void initNetWorkTabNum(int userId) {
OkGo.get(Constants.TAB_NUM+userId+Constants.TAB_NUM_COUNT)
.tag(this)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
TabBean tabBean = gson.fromJson(s, TabBean.class);
if (tabBean.getCode()==0){
// tabBean.getData().
}
}
@Override
public void onError(Call call, Response response, Exception e) {
super.onError(call, response, e);
}
});
}
/**
* 动态刷新tab
* */
private void setTabNum(String subscribe,String serve,String error,String cancel) {
homeTabLayout.addTab(homeTabLayout.newTab().setCustomView(tab_icon_one(subscribe, "待预约")));
homeTabLayout.addTab(homeTabLayout.newTab().setCustomView(tab_icon(serve, "待服务")));
homeTabLayout.addTab(homeTabLayout.newTab().setCustomView(tab_icon(error, "异常单")));
homeTabLayout.addTab(homeTabLayout.newTab().setCustomView(tab_icon(cancel,"已取消")));
}
/**
* TabLayout tab的自定义布局
......
package com.dayu.bigfish.activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
......@@ -12,11 +14,19 @@ import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.moudle.idea.IdeaActivityPresenter;
import com.dayu.bigfish.moudle.idea.IdeaActivityView;
import com.dayu.bigfish.utils.DateUtils;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.SPUtils;
import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.views.CustomProgressDialog;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import static android.R.attr.id;
import static com.dayu.bigfish.utils.GetUserInfo.getACCOUNT_ID;
/**
* Created by yu on 2017/9/26.
*/
......@@ -35,12 +45,21 @@ public class IdeaActivity extends BaseActivity<IdeaActivityView, IdeaActivityPre
@BindView(R.id.submit_idea)
Button submitIdea;
private IdeaActivityPresenter ideaActivityPresenter;
private String comment;
private String userName;
private String userPhone;
private int userId;
private DateUtils dateUtils = new DateUtils();
private String systemDate;
private CustomProgressDialog dialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_idea);
ButterKnife.bind(this);
dialog = new CustomProgressDialog(this, R.style.CustomDialog);
initData();
}
@Override
......@@ -50,6 +69,11 @@ public class IdeaActivity extends BaseActivity<IdeaActivityView, IdeaActivityPre
@Override
public void initData() {
userName = GetUserInfo.getUserName(this);
userPhone = GetUserInfo.getUserPhone(this);
// userId = GetUserInfo.getACCOUNT_ID(this);
comment = textContent.getText().toString();
// systemDate = dateUtils.getTodayDateTime();
}
......@@ -66,17 +90,20 @@ public class IdeaActivity extends BaseActivity<IdeaActivityView, IdeaActivityPre
@Override
public void success() {
ToastUtils.showShortToast("提交成功");
dialog.dismiss();
}
@Override
public void failed() {
ToastUtils.showShortToast("提交失败,请稍后重试");
dialog.dismiss();
}
@Override
public void error() {
ToastUtils.showShortToast("网络或服务器异常");
dialog.dismiss();
}
......@@ -87,7 +114,20 @@ public class IdeaActivity extends BaseActivity<IdeaActivityView, IdeaActivityPre
finish();
break;
case R.id.submit_idea:
ideaActivityPresenter.getData();
/*String comment,String createTime,String userName,String userId,String userPhone,
String userName*/
initData();
if (TextUtils.isEmpty(comment)) {
ToastUtils.showShortToast("请输入反馈意见...");
} else {
dialog.show();
if (TextUtils.isEmpty(comment)) {
ToastUtils.showShortToast("请输入反馈意见..");
return;
}
ideaActivityPresenter.getData(comment, userName, userPhone);
}
break;
}
}
......
package com.dayu.bigfish.activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.MainActivity;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.bean.BaseBean;
import com.dayu.bigfish.bean.LoginBean;
import com.dayu.bigfish.bean.RegisterBean;
import com.dayu.bigfish.managers.UserManager;
......@@ -17,16 +24,29 @@ import com.dayu.bigfish.moudle.login.LoginPresenter;
import com.dayu.bigfish.moudle.login.LoginView;
import com.dayu.bigfish.utils.IsPhoneUtils;
import com.dayu.bigfish.utils.LogUtils;
import com.dayu.bigfish.utils.SPUtils;
import com.dayu.bigfish.utils.TimeCountUtil;
import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.views.ClearEditText;
import com.dayu.bigfish.views.CustomProgressDialog;
import com.google.gson.Gson;
import com.hyphenate.EMCallBack;
import com.hyphenate.chat.EMClient;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import org.json.JSONObject;
import java.util.HashMap;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import okhttp3.Call;
import okhttp3.Response;
import static com.umeng.analytics.pro.x.O;
import static java.lang.Integer.parseInt;
/**
......@@ -46,6 +66,12 @@ public class LoginActivity extends BaseActivity<LoginView, LoginPresenter> imple
private LoginPresenter mLoginPresenter;
private CustomProgressDialog dialog;
private String imageUrl;
private String hxUserId;
private String hxUserPwd;
private String token;
private String siteId;
private String accountId;
private int userId;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -81,14 +107,17 @@ public class LoginActivity extends BaseActivity<LoginView, LoginPresenter> imple
dialog.dismiss();
ToastUtils.showShortToast("登录成功");
//取出bean中的值保存到sp中
String accountId = loginBean.getData().getAccountId();
String siteId = loginBean.getData().getSiteId();
String token = loginBean.getData().getAccessToken();
String hxUserId = loginBean.getData().getHxAccount();
String hxUserPwd = loginBean.getData().getHxPwd();
accountId = loginBean.getData().getAccountId();
siteId = loginBean.getData().getSiteId();
token = loginBean.getData().getAccessToken();
hxUserId = loginBean.getData().getHxAccount();
hxUserPwd = loginBean.getData().getHxPwd();
UserManager.getInstance().saveUserInfo(this,accountId,siteId,token,hxUserId,hxUserPwd);
System.out.println("存入的工程师id为----->"+accountId);
System.out.println("存入的站点id为----->"+siteId);
System.out.println("存入的token为----->"+token);
System.out.println("存入的工程师环信账号为----->"+hxUserId);
System.out.println("存入的工程师环信密码为----->"+hxUserPwd);
imageUrl = loginBean.getData().getHeaderImg();
if (TextUtils.isEmpty(imageUrl)) {
ToastUtils.showShortToast("该工程师暂无头像");
......@@ -102,6 +131,31 @@ public class LoginActivity extends BaseActivity<LoginView, LoginPresenter> imple
startActivity(intent);
finish();
}
if (!(TextUtils.isEmpty(hxUserId)) && !(TextUtils.isEmpty(hxUserPwd))) {
EMClient.getInstance().login(hxUserId, hxUserPwd, new EMCallBack() {
@Override
public void onSuccess() {
EMClient.getInstance().groupManager().loadAllGroups();
EMClient.getInstance().chatManager().loadAllConversations();
System.out.println("环信----->登录聊天服务器成功!");
}
@Override
public void onProgress(int progress, String status) {
}
@Override
public void onError(int code, String message) {
System.out.println("环信----->登录聊天服务器失败!");
}
});
}
userId = Integer.parseInt(accountId);
commitVersionInfo(userId,getIMEI(this),getPackageNum());
}
......@@ -186,7 +240,6 @@ public class LoginActivity extends BaseActivity<LoginView, LoginPresenter> imple
}
return "succeed";
}
/**
* 验证码校验
*/
......@@ -196,6 +249,83 @@ public class LoginActivity extends BaseActivity<LoginView, LoginPresenter> imple
}
return "succeed";
}
/**
* 版本第一次使用时要上传的信息
*/
public void commitVersionInfo(int userId, String imei, String versionCode) {
/*{
"accountId": 145,
"createTime": "",
"created": "string",
"id": 0,
"imei": "string",
"platform": 2,
"updateTime": "",
"updated": "string",
"versionCode": "1.10.1",
"versionId": 0
}*/
HashMap<String, Object> params = new HashMap<>();
//工程师Id
params.put("accountId", userId);
params.put("created", "");
params.put("id", 0);
//设备串码
params.put("imei", imei);
params.put("platform", 1);
params.put("updateTime", "");
params.put("updated", "");
//版本号
params.put("versionCode", versionCode);
params.put("versionId", 0);
JSONObject jsonObject = new JSONObject(params);
OkGo.post(Constants.COMMIT_VERSION_INFO)
.tag(this)
.upJson(jsonObject.toString())
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
BaseBean baseBean = gson.fromJson(s, BaseBean.class);
if (baseBean.getCode() == 0) {
//SPUtils.put(LoginActivity.this, "COMMIT", true);
ToastUtils.showShortToast("版本第一次使用时数据提交成功");
}
}
@Override
public void onError(Call call, Response response, Exception e) {
super.onError(call, response, e);
}
});
}
/**
* 获取设备IMEI编号
*/
public static String getIMEI(Context context) {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(context.TELEPHONY_SERVICE);
String imei = telephonyManager.getDeviceId();
return imei;
}
/**
* 获取当前应用的版本号
*/
public String getPackageNum() {
try {
PackageInfo packageInfo = this.getPackageManager().getPackageInfo(this.getPackageName(), 0);
String packageName = packageInfo.versionName;
return packageName;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
return "解析版本号失败";
}
}
}
......
package com.dayu.bigfish.activity;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import com.dayu.bigfish.R;
/**
* 消息列表
*/
public class NotificationActivity extends Activity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_notification);
}
}
......@@ -60,6 +60,8 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailsView, OrderDe
bundle.putInt("orderId",orderId);
orderDatailsFragment.setArguments(bundle);
orderDatailsServeFragment.setArguments(bundle);
}
@Override
public void initListener() {
......@@ -74,7 +76,7 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailsView, OrderDe
@Override
public void initData() {
Intent intent = getIntent();
String orderValue = intent.getStringExtra("orderId");
String orderValue = intent.getStringExtra("orderId");
orderId = Integer.parseInt(orderValue);
System.out.println("此订单的Id为:----->"+orderId);
list = new ArrayList<>();
......
......@@ -184,7 +184,6 @@ public class OrderFinishActivity extends BaseActivity<OrderFinishActivityView, O
public List<String> iamgeUrl = new ArrayList<>();
private List<String> mImageList = new ArrayList<>();
private ImageView[] mIvs;
private String pmName; //产品名称
private String brandName; //品牌名称
private String serveName; //服务类型
private int isPay = 1;//是否支付费用,默认=1 不支付费用
......@@ -197,6 +196,7 @@ public class OrderFinishActivity extends BaseActivity<OrderFinishActivityView, O
private String otherCost;
private String payRemark;
private Boolean isSwitch;
private String categoryName; //产品名称
public void initData() {
Intent intent = getIntent();
......@@ -285,14 +285,14 @@ public class OrderFinishActivity extends BaseActivity<OrderFinishActivityView, O
@Override
public void initDataSuccess(CheckOrderInit checkOrderInit) {
pmName = checkOrderInit.getData().getProductModel();
brandName = checkOrderInit.getData().getBrandName();
serveName = checkOrderInit.getData().getProviderName();
categoryName = checkOrderInit.getData().getCategoryName();
// doorPrice = checkOrderInit.getData().getDoorPrice();
//servicePrice = checkOrderInit.getData().getServicePrice();
//materialCost = checkOrderInit.getData().getMaterialCost();
//otherPrice = checkOrderInit.getData().getOtherPrice();
textOneValue.setText(pmName);
textOneValue.setText(categoryName);
textTwoValue.setText(brandName);
textSixValue.setText(serveName);
dialog.dismiss();
......
......@@ -17,17 +17,26 @@ import com.dayu.bigfish.R;
import com.dayu.bigfish.application.MyApplication;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.bean.PersonalCenterBean;
import com.dayu.bigfish.bean.ReceOrderNum;
import com.dayu.bigfish.bean.ReceUserRevenue;
import com.dayu.bigfish.bean.TodayPerformanceBean;
import com.dayu.bigfish.bean.UserInfo;
import com.dayu.bigfish.moudle.personal.PersonalCenterPresenter;
import com.dayu.bigfish.moudle.personal.PersonalCenterView;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.SPUtils;
import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.views.CircleImageView;
import com.dayu.bigfish.views.CustomProgressDialog;
import java.sql.SQLOutput;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import static com.dayu.bigfish.Constants.USER_REVENUE;
/**
* 个人中心界面 on 2017/8/25.
*/
......@@ -88,17 +97,26 @@ public class PersonalCenterActivity extends BaseActivity<PersonalCenterView, Per
TextView textGongdan;
@BindView(R.id.text_gongdan_num)
TextView textGongdanNum;
@BindView(R.id.rl_gd)
RelativeLayout layout;
private PersonalCenterPresenter personalCenterPresenter;
private CustomProgressDialog dialog;
private int userId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
private int userId;
private int siteId;
private PersonalCenterBean.DataBean data;
private String imageUrl;//头像信息
private String userName;
private String userPhone;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_personal_center);
ButterKnife.bind(this);
userId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
// userId = userInfo.getAccountId();
siteId = GetUserInfo.getSITE_ID(MyApplication.getContext());
dialog = new CustomProgressDialog(this, R.style.CustomDialog);
dialog.show();
initView();
......@@ -120,9 +138,9 @@ public class PersonalCenterActivity extends BaseActivity<PersonalCenterView, Per
textLeijiNum.setTypeface(tf);//设置字体
textGongdanNum.setTypeface(tf);//设置字体
//设置头像
Intent intent = getIntent();
imageUrl = intent.getStringExtra("imageUrl");
System.out.println("个人中心照片的路径为"+imageUrl);
Intent intent = getIntent();
imageUrl = intent.getStringExtra("imageUrl");
System.out.println("个人中心照片的路径为" + imageUrl);
Glide.with(this)
.load(imageUrl)
.placeholder(R.mipmap.user_head)
......@@ -133,7 +151,15 @@ public class PersonalCenterActivity extends BaseActivity<PersonalCenterView, Per
@Override
public void initData() {
//获取工程师信息
personalCenterPresenter.get(userId);
//获取工程师今日收益(业绩)
personalCenterPresenter.getEarnings(siteId,userId);
//获取工程师今日接单数量
personalCenterPresenter.getReceOrder(siteId,userId);
//获取工程师的累计信息 (评分,累计业绩,工单记录)
personalCenterPresenter.getOrderUserInfo(siteId,userId);
}
@Override
......@@ -142,7 +168,7 @@ public class PersonalCenterActivity extends BaseActivity<PersonalCenterView, Per
new PersonalCenterPresenter(this);
}
@OnClick({R.id.person_back, R.id.person_setting})
@OnClick({R.id.person_back, R.id.person_setting,R.id.rl_gd})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.person_back:
......@@ -159,25 +185,34 @@ public class PersonalCenterActivity extends BaseActivity<PersonalCenterView, Per
break;
case R.id.text_leiji_num:
break;
case R.id.text_gongdan_num:
case R.id.rl_gd:
Intent intent= new Intent(PersonalCenterActivity.this, WorksheetRecordActivity.class);
startActivity(intent);
break;
}
}
public void fillData(){
public void fillData() {
//姓名
personName.setText(data.getRealName());
userName = data.getRealName();
personName.setText(userName);
SPUtils.put(this, "USER_NAME", userName);
//性别
if (data.getGender() == 1) {
personSex.setText("男");
personSex.setText("男");
} else if (data.getGender() == 0) {
personSex.setText("女");
personSex.setText("女");
} else {
personSex.setText("未知");}
personSex.setText("未知");
}
//年龄
personAge.setText(data.getAge()+"岁");
personAge.setText(data.getAge() + "岁");
//手机号
personPhone.setText(data.getMobile());
userPhone = data.getMobile();
personPhone.setText(userPhone);
SPUtils.put(this, "USER_PHONE", userPhone);
}
@Override
public void success(PersonalCenterBean personalCenterBean) {
this.data = personalCenterBean.getData();
......@@ -188,48 +223,52 @@ public class PersonalCenterActivity extends BaseActivity<PersonalCenterView, Per
}
@Override
public void failed(String msg) {
public void error(String msg) {
dialog.dismiss();
ToastUtils.showShortToast(msg);
}
//今日接单请求成功
@Override
public void todayOrderSuccess(PersonalCenterBean personalCenterBean) {
}
//今日接单请求异常
@Override
public void todayOrderFailed(PersonalCenterBean personalCenterBean) {
public void failed(String msg) {
dialog.dismiss();
ToastUtils.showShortToast(msg);
}
//今日接单请求异常
//获取工程师今日业绩
@Override
public void orderReceivingSuccess(PersonalCenterBean personalCenterBean) {
public void todayOrderSuccess(TodayPerformanceBean todayPerformanceBean) {
textYejiNum.setText(todayPerformanceBean.getData().get_$208()+"");
}
@Override
public void orderReceivingFailed(PersonalCenterBean personalCenterBean) {
public void todayOrderFailed(String msg) {
ToastUtils.showShortToast(msg);
}
//工程师今日接单
@Override
public void performanceSuccess(PersonalCenterBean personalCenterBean) {
public void orderReceivingSuccess(ReceOrderNum orderNum) {
textJiedanNum.setText(orderNum.getData().get今日接单()+"");
}
@Override
public void performanceFailed(PersonalCenterBean personalCenterBean) {
public void orderReceivingFailed(String msg) {
ToastUtils.showShortToast(msg);
}
//工程师累计信息
@Override
public void recordOrderSuccess(PersonalCenterBean personalCenterBean) {
public void performanceSuccess(ReceUserRevenue receUserRevenue) {
//累计业绩
textLeijiNum.setText(receUserRevenue.getData().get累计收益()+"");
//工单记录
textGongdanNum.setText(receUserRevenue.getData().get工单记录()+"");
//个人评分
personEvaluate.setText(receUserRevenue.getData().get评分()+"分");
}
@Override
public void recordOrderFailed(PersonalCenterBean personalCenterBean) {
public void performanceFailed(String msg) {
ToastUtils.showShortToast(msg);
}
}
......@@ -18,6 +18,7 @@ import com.dayu.bigfish.bean.ReceivingOrderBean;
import com.dayu.bigfish.moudle.receiving.Receiving;
import com.dayu.bigfish.moudle.receiving.ReceivingPresenter;
import com.dayu.bigfish.moudle.receiving.ReceivingView;
import com.dayu.bigfish.tip.TipsHelper;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.SPUtils;
import com.dayu.bigfish.utils.ToastUtils;
......@@ -31,6 +32,7 @@ import butterknife.OnClick;
import static com.dayu.bigfish.utils.GetUserInfo.getACCOUNT_ID;
import static com.dayu.bigfish.utils.SPUtils.get;
import static com.umeng.analytics.pro.x.G;
import static com.umeng.analytics.pro.x.S;
/**
......@@ -52,7 +54,10 @@ public class ReceivingActivity extends BaseActivity<ReceivingView, ReceivingPres
SwipeRefreshLayout receivingRefersh;
@BindView(R.id.order_title_num)
TextView orderTitleNum;
@BindView(R.id.image)
ImageView view;
private CustomProgressDialog dialog;
TipsHelper mTipsHelper;
// private Boolean refershState;;
// public LayoutInflater inflater; //加载更多的布局
// private View loadmoreView;//用来接收加载更多的布局
......@@ -77,16 +82,12 @@ public class ReceivingActivity extends BaseActivity<ReceivingView, ReceivingPres
@Override
public void initListener() {
receivingRefersh.setOnRefreshListener(
new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
initNetWork(1, 1, 10,GetUserInfo.getSITE_ID(ReceivingActivity.this));
}
});
() -> initNetWork(1, 1, 10,GetUserInfo.getSITE_ID(ReceivingActivity.this)));
}
@Override
public void initView() {
mTipsHelper = createTipsHelper(receivingRefersh);
receivingRefersh.setColorSchemeColors(getResources().getColor(R.color.cl_receiving_order_item_data));
/* inflater = LayoutInflater.from(this);
loadmoreView = inflater.inflate(R.layout.listview_bottom_view,null);
......@@ -141,20 +142,28 @@ public class ReceivingActivity extends BaseActivity<ReceivingView, ReceivingPres
@Override
public void refershSuccess(ReceivingBean receivingBean) {
mTipsHelper.hideError();
// int userId = (int) SPUtils.get(this,"ACCOUNTId","");
list = receivingBean.getData().getData();
System.out.println("list集合的大小--->"+list.size());
if (list.size() == 0 || list == null) {
// mTipsHelper.showEmpty();
view.setVisibility(View.VISIBLE);
receivingListview.setVisibility(View.GONE);
dialog.dismiss();
receivingRefersh.post(() -> receivingRefersh.setRefreshing(false));
} else {
// mTipsHelper.hideEmpty();
view.setVisibility(View.GONE);
receivingListview.setVisibility(View.VISIBLE);
System.out.println("list集合的大小--->"+list.size());
orderTitleNum.setText(getResources().getText(R.string.tv_order_list_num) + (String.valueOf(list.size())) + ")");
mReceiviingAdapter = new ReceivingAdapter(ReceivingActivity.this, list, this);
receivingListview.setAdapter(mReceiviingAdapter);
receivingRefersh.post(() -> receivingRefersh.setRefreshing(false));
mReceiviingAdapter.notifyDataSetChanged();
}
//initData();
orderTitleNum.setText(getResources().getText(R.string.tv_order_list_num) + (String.valueOf(list.size())) + ")");
mReceiviingAdapter = new ReceivingAdapter(ReceivingActivity.this, list, this);
receivingListview.setAdapter(mReceiviingAdapter);
receivingRefersh.post(new Runnable() {
@Override
public void run() {
receivingRefersh.setRefreshing(false);
}
});
mReceiviingAdapter.notifyDataSetChanged();
}
......@@ -175,7 +184,12 @@ public class ReceivingActivity extends BaseActivity<ReceivingView, ReceivingPres
@Override
public void refershFailed(String msg) {
dialog.dismiss();
receivingRefersh.post(() -> receivingRefersh.setRefreshing(false));
mTipsHelper.showError(true, msg, v -> {
initNetWork(1, 1, 10, GetUserInfo.getSITE_ID(this));
dialog.show();
});
}
//接单的回调
......
......@@ -15,10 +15,13 @@ import android.widget.TextView;
import com.afollestad.materialdialogs.MaterialDialog;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.bean.BaseBean;
import com.dayu.bigfish.bean.BaseStringBean;
import com.dayu.bigfish.managers.UserManager;
import com.dayu.bigfish.moudle.set.SettingActivityPresenter;
import com.dayu.bigfish.moudle.set.SettingActivityView;
import com.dayu.bigfish.utils.DataCleanManager;
import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.views.CustomProgressDialog;
import com.dayu.bigfish.views.SwitchImage;
......@@ -61,6 +64,9 @@ public class SettingActivity extends BaseActivity<SettingActivityView, SettingAc
TextView tvHc;
private SettingActivityPresenter settingActivityPresenter;
private CustomProgressDialog dialog;
private String userName;
private String userphone;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -68,6 +74,7 @@ public class SettingActivity extends BaseActivity<SettingActivityView, SettingAc
ButterKnife.bind(this);
dialog = new CustomProgressDialog(this, R.style.CustomDialog);
initView();
initData();
}
@Override
......@@ -87,7 +94,6 @@ public class SettingActivity extends BaseActivity<SettingActivityView, SettingAc
@Override
public void initData() {
}
@Override
......@@ -132,6 +138,7 @@ public class SettingActivity extends BaseActivity<SettingActivityView, SettingAc
break;
//更新
case R.id.set_jiance_gengxin:
settingActivityPresenter.updataVersion();
break;
//客服电话
case R.id.set_kefu_phone:
......@@ -162,4 +169,19 @@ public class SettingActivity extends BaseActivity<SettingActivityView, SettingAc
break;
}
}
@Override
public void updata_success(BaseStringBean baseStringBeanBean) {
ToastUtils.showShortToast("新版本号为:"+baseStringBeanBean.getData());
}
@Override
public void updata_failed(String msg) {
ToastUtils.showShortToast(msg);
}
@Override
public void error(String msg) {
ToastUtils.showShortToast(msg);
}
}
package com.dayu.bigfish.adapter;
import android.content.Context;
import android.content.res.AssetManager;
import android.graphics.Typeface;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.dayu.bigfish.R;
import com.dayu.bigfish.bean.OrderFinishBean;
import com.dayu.bigfish.utils.DateUtils;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* 首页Tab 已取消
* 首页Tab 已完成
* on 2017/9/12.
*/
public class HomeEndTabAdapter extends BaseAdapter {
private Context context;
private List<OrderFinishBean.DataBeanX.DataBean> list;
private String dateMD = null;
private String dateTime = null;
private DateUtils dateUtils = new DateUtils();
public HomeEndTabAdapter(Context context) {
public HomeEndTabAdapter(Context context, List<OrderFinishBean.DataBeanX.DataBean> finishBean) {
this.context = context;
this.list = finishBean;
}
@Override
public int getCount() {
return 0;
return list.size();
}
@Override
public Object getItem(int position) {
return null;
return position;
}
@Override
public long getItemId(int position) {
return 0;
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
return null;
View view;
ViewHolder viewHolder;
if (convertView == null) {
view = View.inflate(context, R.layout.fragment_tabend_item, null);
viewHolder = new ViewHolder(view, context);
view.setTag(viewHolder);
} else {
view = convertView;
viewHolder = (ViewHolder) view.getTag();
}
initData(position, viewHolder);
return view;
}
private void initData(int position, ViewHolder viewHolder) {
try {
dateMD = dateUtils.stringDateToDate(list.get(position).getCreateTime());
dateTime = dateUtils.stringTimeToDate(list.get(position).getCreateTime());
} catch (Exception e) {
e.printStackTrace();
}
viewHolder.itemTody.setText(dateMD);
viewHolder.itemTime.setText(dateTime);
//服务类型
viewHolder.itemTextWeixiu.setText(list.get(position).getProviderName());
// 维修类型
viewHolder.itemTextWeixiuLeixing.setText(list.get(position).getCategoryName());
//拼接省市区街道地址
viewHolder.itemTextDizhi.setText(
//省一级城市名称
(String) list.get(position).getProvinceName()
//市一级城市名称
+ list.get(position).getCityName() +
//区/地区一级城市名称
list.get(position).getDistrictName() +
//详细到街道
list.get(position).getAddress());
}
static class ViewHolder {
@BindView(R.id.item_line)
ImageView itemLine;
@BindView(R.id.item_tody)
TextView itemTody;
@BindView(R.id.item_time)
TextView itemTime;
@BindView(R.id.item_image_weixiu)
ImageView itemImageWeixiu;
@BindView(R.id.item_image_dizhi)
ImageView itemImageDizhi;
@BindView(R.id.item_text_weixiu)
TextView itemTextWeixiu;
@BindView(R.id.text_line)
TextView textLine;
@BindView(R.id.item_text_weixiu_leixing)
TextView itemTextWeixiuLeixing;
@BindView(R.id.item_text_dizhi)
TextView itemTextDizhi;
@BindView(R.id.item)
RelativeLayout item;
ViewHolder(View view,Context context) {
ButterKnife.bind(this, view);
ButterKnife.bind(this, view);
AssetManager mgr = context.getAssets();//得到AssetManager
Typeface tf = Typeface.createFromAsset(mgr, "fonts/DIN Alternate Bold.ttf");//根据路径得到Typeface
itemTime.setTypeface(tf);//设置字体
}
}
}
package com.dayu.bigfish.adapter;
import android.content.Context;
import android.content.res.AssetManager;
import android.graphics.Typeface;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.dayu.bigfish.R;
import com.dayu.bigfish.bean.ErrorOrderBean;
import com.dayu.bigfish.utils.DateUtils;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import static com.dayu.bigfish.R.id.error_state;
/**
* 首页Tab 异常单
......@@ -12,28 +28,113 @@ import android.widget.BaseAdapter;
public class HomeThreeTabAdapter extends BaseAdapter {
private Context context;
private List<ErrorOrderBean.DataBean> errorList;
private String dateMD = null;
private String dateTime = null;
private DateUtils dateUtils = new DateUtils();
private int errorState;
public HomeThreeTabAdapter(Context context) {
public HomeThreeTabAdapter(Context context, List<ErrorOrderBean.DataBean> errorList) {
this.context = context;
this.errorList = errorList;
}
@Override
public int getCount() {
return 0;
return errorList.size();
}
@Override
public Object getItem(int position) {
return null;
return position;
}
@Override
public long getItemId(int position) {
return 0;
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
return null;
View view;
ViewHolder viewHolder;
if (convertView == null) {
view = View.inflate(context, R.layout.fragment_tabthree_item, null);
viewHolder = new ViewHolder(view,context);
view.setTag(viewHolder);
} else {
view = convertView;
viewHolder = (ViewHolder) view.getTag();
}
initData(position, viewHolder);
return view;
}
private void initData(int position, ViewHolder viewHolder) {
try {
dateMD = dateUtils.stringDateToDate(errorList.get(position).getCreateTime());
dateTime = dateUtils.stringTimeToDate(errorList.get(position).getCreateTime());
} catch (Exception e) {
e.printStackTrace();
}
viewHolder.itemTody.setText(dateMD);
viewHolder.itemTime.setText(dateTime);
//服务类型
viewHolder.itemTextWeixiu.setText(errorList.get(position).getProviderName());
// 维修类型
viewHolder.itemTextWeixiuLeixing.setText(errorList.get(position).getCategoryName());
//拼接省市区街道地址
viewHolder.itemTextDizhi.setText(
//省一级城市名称
(String) errorList.get(position).getProvinceName()
//市一级城市名称
+ errorList.get(position).getCityName() +
//区/地区一级城市名称
errorList.get(position).getDistrictName() +
//详细到街道
errorList.get(position).getAddress());
errorState = errorList.get(position).getExcptionCode();
if (errorState==1){
viewHolder.errorState.setText("["+"接单超时"+"]");
}else if (errorState == 2){
viewHolder.errorState.setText("["+"预约超时"+"]");
} else if (errorState == 3){
viewHolder.errorState.setText("["+"服务超时"+"]");
}else if (errorState == 4){
viewHolder.errorState.setText("["+"验收超时"+"]");
}
}
static class ViewHolder {
@BindView(R.id.item_line)
ImageView itemLine;
@BindView(R.id.item_tody)
TextView itemTody;
@BindView(R.id.item_time)
TextView itemTime;
@BindView(error_state)
TextView errorState;
@BindView(R.id.item_image_weixiu)
ImageView itemImageWeixiu;
@BindView(R.id.item_image_dizhi)
ImageView itemImageDizhi;
@BindView(R.id.item_text_weixiu)
TextView itemTextWeixiu;
@BindView(R.id.text_line)
TextView textLine;
@BindView(R.id.item_text_weixiu_leixing)
TextView itemTextWeixiuLeixing;
@BindView(R.id.item_text_dizhi)
TextView itemTextDizhi;
@BindView(R.id.item)
RelativeLayout item;
ViewHolder(View view,Context context) {
ButterKnife.bind(this, view);
AssetManager mgr = context.getAssets();//得到AssetManager
Typeface tf = Typeface.createFromAsset(mgr, "fonts/DIN Alternate Bold.ttf");//根据路径得到Typeface
itemTime.setTypeface(tf);//设置字体
}
}
}
package com.dayu.bigfish.adapter;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.dayu.bigfish.R;
import com.dayu.bigfish.bean.ServeDetailsBean;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* Created by yu on 2017/9/30.
*/
public class ServeDatailsAdapter extends BaseAdapter {
public Context context;
private List<ServeDetailsBean.DataBean.RecordBean> recordBeen;
public ServeDatailsAdapter(Context context, List<ServeDetailsBean.DataBean.RecordBean> recordBean) {
this.context = context;
this.recordBeen = recordBean;
}
@Override
public int getCount() {
return recordBeen.size();
}
@Override
public Object getItem(int position) {
return position;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view;
ViewHolder viewHolder;
if (convertView == null) {
view = View.inflate(context, R.layout.serve_datails_item, null);
viewHolder = new ViewHolder(view);
view.setTag(viewHolder);
} else {
view = convertView;
viewHolder = (ViewHolder) view.getTag();
}
viewHolder.itemTime.setText(recordBeen.get(position).getCreateTime());
viewHolder.itemText.setText(recordBeen.get(position).getOperationComment());
return view;
}
static class ViewHolder {
@BindView(R.id.item_time)
TextView itemTime;
@BindView(R.id.item_text)
TextView itemText;
@BindView(R.id.item_layout)
RelativeLayout itemLayout;
ViewHolder(View view) {
ButterKnife.bind(this, view);
}
}
}
......@@ -59,8 +59,6 @@ public class MyApplication extends Application {
// public static void reportError(Context context, String error)
// public static void reportError(Context context, Throwable e)
//上下文
hxUserId = (String) SPUtils.get(this, "big_fish", "HXUSER_ID", "");
hxUserPwd = (String) SPUtils.get(this, "big_fish", "HXUSER_PWD", "");
mContext = getApplicationContext();
// 主线程的Handler
mHandler = new Handler();
......@@ -72,32 +70,8 @@ public class MyApplication extends Application {
//初始化
EMClient.getInstance().init(getContext(), options);
//在做打包混淆时,关闭debug模式,避免消耗不必要的资源
// EMClient.getInstance().setDebugMode(true);
EMClient.getInstance().setDebugMode(true);
initEasemob();
if (!(TextUtils.isEmpty(hxUserId)) && !(TextUtils.isEmpty(hxUserPwd))) {
EMClient.getInstance().login(hxUserId, hxUserPwd, new EMCallBack() {
@Override
public void onSuccess() {
EMClient.getInstance().groupManager().loadAllGroups();
EMClient.getInstance().chatManager().loadAllConversations();
System.out.println("环信----->登录聊天服务器成功!");
}
@Override
public void onProgress(int progress, String status) {
}
@Override
public void onError(int code, String message) {
System.out.println("环信----->登录聊天服务器失败!");
}
});
}
}
private void initEasemob() {
// 获取当前进程 id 并取得进程名
......
......@@ -9,8 +9,11 @@ import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import com.dayu.bigfish.managers.AppManager;
import com.dayu.bigfish.tip.DefaultTipsHelper;
import com.dayu.bigfish.tip.TipsHelper;
import com.dayu.bigfish.utils.LogUtils;
import com.dayu.bigfish.utils.ToastUtils;
import com.lzy.okgo.OkGo;
......@@ -43,7 +46,9 @@ public abstract class BaseActivity<V, T extends BasePresenter<V>> extends AppCom
// MobclickAgent.setDebugMode( true );
}
protected TipsHelper createTipsHelper(View view) {
return new DefaultTipsHelper(this, view);
}
@Override
public void onResume() {
......@@ -73,4 +78,5 @@ public abstract class BaseActivity<V, T extends BasePresenter<V>> extends AppCom
// 强制子类初始化自己的presenter
public abstract T initPresenter();
private long mPressedTime = 0;
}
package com.dayu.bigfish.bean;
import java.io.Serializable;
/**
* Created by yu on 2017/9/29.
*/
public class BaseStringBean implements Serializable {
/**
* code : 0
* data : 1.0.2
* msg : 成功
*/
private int code;
private String data;
private String msg;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
package com.dayu.bigfish.bean;
import java.io.Serializable;
/**
* 登录时携带的账户信息
* on 2017/9/12.
*/
public class EngineerInfoBean implements Serializable {
}
package com.dayu.bigfish.bean;
import java.io.Serializable;
import java.util.List;
/**
* Created by yu on 2017/9/29.
*/
public class ErrorOrderBean implements Serializable {
/**
* code : 0
* data : [{"id":534,"orderNum":"20170929151419511330","createTime":"2017-09-29 15:14:20","confirmDoorTime":"2017-09-29 17:23:00","providerName":"安装","categoryName":"","provinceName":"内蒙古自治区","cityName":"鄂尔多斯市","districtName":"准格尔旗","address":"哈哈哈哈哈","customerType":2,"customerName":"哇哈哈","customerCompany":"王策鱼","customerMobile":"17310890230","customerTelphome":"01056873678","status":6,"excptionCode":3}]
* msg : 成功
*/
private int code;
private String msg;
private List<DataBean> data;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public List<DataBean> getData() {
return data;
}
public void setData(List<DataBean> data) {
this.data = data;
}
public static class DataBean {
/**
* id : 534
* orderNum : 20170929151419511330
* createTime : 2017-09-29 15:14:20
* confirmDoorTime : 2017-09-29 17:23:00
* providerName : 安装
* categoryName :
* provinceName : 内蒙古自治区
* cityName : 鄂尔多斯市
* districtName : 准格尔旗
* address : 哈哈哈哈哈
* customerType : 2
* customerName : 哇哈哈
* customerCompany : 王策鱼
* customerMobile : 17310890230
* customerTelphome : 01056873678
* status : 6
* excptionCode : 3
*/
private int id;
private String orderNum;
private String createTime;
private String confirmDoorTime;
private String providerName;
private String categoryName;
private String provinceName;
private String cityName;
private String districtName;
private String address;
private int customerType;
private String customerName;
private String customerCompany;
private String customerMobile;
private String customerTelphome;
private int status;
private int excptionCode;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getOrderNum() {
return orderNum;
}
public void setOrderNum(String orderNum) {
this.orderNum = orderNum;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getConfirmDoorTime() {
return confirmDoorTime;
}
public void setConfirmDoorTime(String confirmDoorTime) {
this.confirmDoorTime = confirmDoorTime;
}
public String getProviderName() {
return providerName;
}
public void setProviderName(String providerName) {
this.providerName = providerName;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public String getDistrictName() {
return districtName;
}
public void setDistrictName(String districtName) {
this.districtName = districtName;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public int getCustomerType() {
return customerType;
}
public void setCustomerType(int customerType) {
this.customerType = customerType;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerCompany() {
return customerCompany;
}
public void setCustomerCompany(String customerCompany) {
this.customerCompany = customerCompany;
}
public String getCustomerMobile() {
return customerMobile;
}
public void setCustomerMobile(String customerMobile) {
this.customerMobile = customerMobile;
}
public String getCustomerTelphome() {
return customerTelphome;
}
public void setCustomerTelphome(String customerTelphome) {
this.customerTelphome = customerTelphome;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public int getExcptionCode() {
return excptionCode;
}
public void setExcptionCode(int excptionCode) {
this.excptionCode = excptionCode;
}
}
}
package com.dayu.bigfish.bean;
/**
* Created by yu on 2017/9/16.
*/
public class JsonBean {
/**
* customerCheckComment : 0
* doorPrice :
* doorPriceComment : string
* engineerId : 115
* id : 14
* isPay : 0
* materialCost : 0
* materialCostComment : string
* otherPrice : 0
* otherPriceComment : string
* pics : string
* servicePrice : 0
* servicePriceComment : string
*/
private int customerCheckComment;
private String doorPrice;
private String doorPriceComment;
private int engineerId;
private int id;
private int isPay;
private int materialCost;
private String materialCostComment;
private int otherPrice;
private String otherPriceComment;
private String pics;
private int servicePrice;
private String servicePriceComment;
public int getCustomerCheckComment() {
return customerCheckComment;
}
public void setCustomerCheckComment(int customerCheckComment) {
this.customerCheckComment = customerCheckComment;
}
public String getDoorPrice() {
return doorPrice;
}
public void setDoorPrice(String doorPrice) {
this.doorPrice = doorPrice;
}
public String getDoorPriceComment() {
return doorPriceComment;
}
public void setDoorPriceComment(String doorPriceComment) {
this.doorPriceComment = doorPriceComment;
}
public int getEngineerId() {
return engineerId;
}
public void setEngineerId(int engineerId) {
this.engineerId = engineerId;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getIsPay() {
return isPay;
}
public void setIsPay(int isPay) {
this.isPay = isPay;
}
public int getMaterialCost() {
return materialCost;
}
public void setMaterialCost(int materialCost) {
this.materialCost = materialCost;
}
public String getMaterialCostComment() {
return materialCostComment;
}
public void setMaterialCostComment(String materialCostComment) {
this.materialCostComment = materialCostComment;
}
public int getOtherPrice() {
return otherPrice;
}
public void setOtherPrice(int otherPrice) {
this.otherPrice = otherPrice;
}
public String getOtherPriceComment() {
return otherPriceComment;
}
public void setOtherPriceComment(String otherPriceComment) {
this.otherPriceComment = otherPriceComment;
}
public String getPics() {
return pics;
}
public void setPics(String pics) {
this.pics = pics;
}
public int getServicePrice() {
return servicePrice;
}
public void setServicePrice(int servicePrice) {
this.servicePrice = servicePrice;
}
public String getServicePriceComment() {
return servicePriceComment;
}
public void setServicePriceComment(String servicePriceComment) {
this.servicePriceComment = servicePriceComment;
}
}
package com.dayu.bigfish.bean;
/**
* Created by Administrator on 2017/10/9.
*/
public class MessageTell {
private String action ;
private String functionType;
private String customJson;
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
public String getFunctionType() {
return functionType;
}
public void setFunctionType(String functionType) {
this.functionType = functionType;
}
public String getCustomJson() {
return customJson;
}
public void setCustomJson(String customJson) {
this.customJson = customJson;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
private String orderId;
private String title;
}
package com.dayu.bigfish.bean;
import java.io.Serializable;
/**
* Created by MrWang on 2017/8/20.
*/
public class NewsList {
}
package com.dayu.bigfish.bean;
import java.io.Serializable;
import java.util.List;
/**
* Created by yu on 2017/9/30.
*/
public class OrderFinishBean implements Serializable {
/**
* code : 0
* data : {"pageNo":1,"pageSize":10,"totalRows":2,"data":[{"id":529,"orderNum":"20170929132104719015","createTime":"2017-09-29 13:21:04","confirmDoorTime":"2017-09-29 13:21:00","providerName":"安装","categoryName":"","provinceName":"河北省","cityName":"邯郸市","districtName":"大名县","address":"0106868686801068686868","customerType":1,"customerName":"哇哈哈","customerCompany":"哇哈哈","customerMobile":"17310890230","customerTelphome":"01068686868","status":5,"excptionCode":null},{"id":537,"orderNum":"20170929153456084291","createTime":"2017-09-29 15:34:57","confirmDoorTime":"2017-09-29 15:35:00","providerName":"安装","categoryName":"","provinceName":"北京市","cityName":"北京城区","districtName":"东城区","address":"wdqwdqwd","customerType":1,"customerName":"ja","customerCompany":"ja","customerMobile":"17310890230","customerTelphome":"01078456782","status":5,"excptionCode":null}],"previousPageNo":1,"nextPageNo":1,"totalPages":1}
* msg : 成功
*/
private int code;
private DataBeanX data;
private String msg;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public DataBeanX getData() {
return data;
}
public void setData(DataBeanX data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public static class DataBeanX {
/**
* pageNo : 1
* pageSize : 10
* totalRows : 2
* data : [{"id":529,"orderNum":"20170929132104719015","createTime":"2017-09-29 13:21:04","confirmDoorTime":"2017-09-29 13:21:00","providerName":"安装","categoryName":"","provinceName":"河北省","cityName":"邯郸市","districtName":"大名县","address":"0106868686801068686868","customerType":1,"customerName":"哇哈哈","customerCompany":"哇哈哈","customerMobile":"17310890230","customerTelphome":"01068686868","status":5,"excptionCode":null},{"id":537,"orderNum":"20170929153456084291","createTime":"2017-09-29 15:34:57","confirmDoorTime":"2017-09-29 15:35:00","providerName":"安装","categoryName":"","provinceName":"北京市","cityName":"北京城区","districtName":"东城区","address":"wdqwdqwd","customerType":1,"customerName":"ja","customerCompany":"ja","customerMobile":"17310890230","customerTelphome":"01078456782","status":5,"excptionCode":null}]
* previousPageNo : 1
* nextPageNo : 1
* totalPages : 1
*/
private int pageNo;
private int pageSize;
private int totalRows;
private int previousPageNo;
private int nextPageNo;
private int totalPages;
private List<DataBean> data;
public int getPageNo() {
return pageNo;
}
public void setPageNo(int pageNo) {
this.pageNo = pageNo;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalRows() {
return totalRows;
}
public void setTotalRows(int totalRows) {
this.totalRows = totalRows;
}
public int getPreviousPageNo() {
return previousPageNo;
}
public void setPreviousPageNo(int previousPageNo) {
this.previousPageNo = previousPageNo;
}
public int getNextPageNo() {
return nextPageNo;
}
public void setNextPageNo(int nextPageNo) {
this.nextPageNo = nextPageNo;
}
public int getTotalPages() {
return totalPages;
}
public void setTotalPages(int totalPages) {
this.totalPages = totalPages;
}
public List<DataBean> getData() {
return data;
}
public void setData(List<DataBean> data) {
this.data = data;
}
public static class DataBean {
/**
* id : 529
* orderNum : 20170929132104719015
* createTime : 2017-09-29 13:21:04
* confirmDoorTime : 2017-09-29 13:21:00
* providerName : 安装
* categoryName :
* provinceName : 河北省
* cityName : 邯郸市
* districtName : 大名县
* address : 0106868686801068686868
* customerType : 1
* customerName : 哇哈哈
* customerCompany : 哇哈哈
* customerMobile : 17310890230
* customerTelphome : 01068686868
* status : 5
* excptionCode : null
*/
private int id;
private String orderNum;
private String createTime;
private String confirmDoorTime;
private String providerName;
private String categoryName;
private String provinceName;
private String cityName;
private String districtName;
private String address;
private int customerType;
private String customerName;
private String customerCompany;
private String customerMobile;
private String customerTelphome;
private int status;
private Object excptionCode;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getOrderNum() {
return orderNum;
}
public void setOrderNum(String orderNum) {
this.orderNum = orderNum;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getConfirmDoorTime() {
return confirmDoorTime;
}
public void setConfirmDoorTime(String confirmDoorTime) {
this.confirmDoorTime = confirmDoorTime;
}
public String getProviderName() {
return providerName;
}
public void setProviderName(String providerName) {
this.providerName = providerName;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public String getDistrictName() {
return districtName;
}
public void setDistrictName(String districtName) {
this.districtName = districtName;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public int getCustomerType() {
return customerType;
}
public void setCustomerType(int customerType) {
this.customerType = customerType;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerCompany() {
return customerCompany;
}
public void setCustomerCompany(String customerCompany) {
this.customerCompany = customerCompany;
}
public String getCustomerMobile() {
return customerMobile;
}
public void setCustomerMobile(String customerMobile) {
this.customerMobile = customerMobile;
}
public String getCustomerTelphome() {
return customerTelphome;
}
public void setCustomerTelphome(String customerTelphome) {
this.customerTelphome = customerTelphome;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public Object getExcptionCode() {
return excptionCode;
}
public void setExcptionCode(Object excptionCode) {
this.excptionCode = excptionCode;
}
}
}
}
package com.dayu.bigfish.bean;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
/**
* Created by yu on 2017/9/29.
*/
public class ReceOrderBean implements Serializable {
/**
* code : 0
* data : {"今日.....":0}
* msg : 成功
*/
private int code;
private DataBean data;
private String msg;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public static class DataBean {
@SerializedName("今日业绩(元)")
private int _$216; // FIXME check this code
public int get_$216() {
return _$216;
}
public void set_$216(int _$216) {
this._$216 = _$216;
}
}
}
package com.dayu.bigfish.bean;
/**
* Created by yu on 2017/9/29.
*/
public class ReceOrderNum {
/**
* code : 0
* data : {"今日接单":0}
* msg : 成功
*/
private int code;
private DataBean data;
private String msg;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public static class DataBean {
/**
* 今日接单 : 0
*/
private int 今日接单;
public int get今日接单() {
return 今日接单;
}
public void set今日接单(int 今日接单) {
this.今日接单 = 今日接单;
}
}
}
package com.dayu.bigfish.bean;
import java.io.Serializable;
/**
* 获取工程师的累计信息(包含工单记录,评分,和累计收益)
* on 2017/9/29.
*/
public class ReceUserRevenue implements Serializable {
/**
* code : 0
* data : {"评分":0,"累计收益":0,"工单记录":0}
* msg : 成功
*/
private int code;
private DataBean data;
private String msg;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public static class DataBean {
/**
* 评分 : 0
* 累计收益 : 0
* 工单记录 : 0
*/
private int 评分;
private int 累计收益;
private int 工单记录;
public int get评分() {
return 评分;
}
public void set评分(int 评分) {
this.评分 = 评分;
}
public int get累计收益() {
return 累计收益;
}
public void set累计收益(int 累计收益) {
this.累计收益 = 累计收益;
}
public int get工单记录() {
return 工单记录;
}
public void set工单记录(int 工单记录) {
this.工单记录 = 工单记录;
}
}
}
package com.dayu.bigfish.bean;
import java.io.Serializable;
import java.util.List;
/**
* Created by yu on 2017/9/30.
*/
public class ServeDetailsBean implements Serializable {
/**
* code : 0
* data : {"id":560,"orderNum":"20170929195617960721","source":1,"partnerNum":null,"partnerName":null,"status":3,"repairType":1,"customerType":1,"customerName":"王老吉","customerCompany":"王老吉","customerMobile":"17310890230","customerTelphome":"010787878787","provinceId":20359,"provinceName":"河南省","cityId":20677,"cityName":"洛阳市","districtId":20716,"districtName":"吉利区","address":"扶沟县城关镇没毛病村78903号","providerTypeId":194,"providerName":"安装","categoryId":null,"categoryName":"","categorySource":null,"brandId":null,"brandName":"","productModel":"090","createId":145,"created":"王策玉","createTime":"2017-09-29 19:56:17","appointmentTime":"2017-09-30 19:56:12","comment":"扶沟县城关镇没毛病村78903号","confirmDoorTime":"2017-09-29 19:05:00","confirmDoorComment":"","serviceRecordComment":null,"customerCheckComment":null,"isPay":null,"payType":null,"doorPrice":null,"doorPriceComment":null,"servicePrice":null,"servicePriceComment":null,"materialCost":null,"materialCostComment":null,"otherPrice":null,"otherPriceComment":null,"totalPrice":null,"cancelOrderReason":null,"closePhase":null,"siteId":91,"engineerId":145,"feedback":null,"complait":null,"record":[{"id":1706,"orderId":560,"createTime":"2017-09-29 19:56:17","operation":"工单创建","operationComment":"王策玉 通过 新建工单 创建了工单","serviceProgessTime":null,"serviceProgessTimeNum":null,"commentName":"工单备注","commentInfo":"扶沟县城关镇没毛病村78903号"},{"id":1707,"orderId":560,"createTime":"2017-09-29 19:56:26","operation":"工程师接单","operationComment":"工程师王策玉 (17310890230) 接单","serviceProgessTime":"T2","serviceProgessTimeNum":2,"commentName":null,"commentInfo":null},{"id":1708,"orderId":560,"createTime":"2017-09-29 19:56:37","operation":"工程师预约","operationComment":"工程师王策玉进行客户预约","serviceProgessTime":"T3","serviceProgessTimeNum":3,"commentName":"预约时间及备注","commentInfo":"预约时间:2017-09-29 19:05:00 "}],"pic":[]}
* msg : 成功
*/
private int code;
private DataBean data;
private String msg;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public static class DataBean {
/**
* id : 560
* orderNum : 20170929195617960721
* source : 1
* partnerNum : null
* partnerName : null
* status : 3
* repairType : 1
* customerType : 1
* customerName : 王老吉
* customerCompany : 王老吉
* customerMobile : 17310890230
* customerTelphome : 010787878787
* provinceId : 20359
* provinceName : 河南省
* cityId : 20677
* cityName : 洛阳市
* districtId : 20716
* districtName : 吉利区
* address : 扶沟县城关镇没毛病村78903号
* providerTypeId : 194
* providerName : 安装
* categoryId : null
* categoryName :
* categorySource : null
* brandId : null
* brandName :
* productModel : 090
* createId : 145
* created : 王策玉
* createTime : 2017-09-29 19:56:17
* appointmentTime : 2017-09-30 19:56:12
* comment : 扶沟县城关镇没毛病村78903号
* confirmDoorTime : 2017-09-29 19:05:00
* confirmDoorComment :
* serviceRecordComment : null
* customerCheckComment : null
* isPay : null
* payType : null
* doorPrice : null
* doorPriceComment : null
* servicePrice : null
* servicePriceComment : null
* materialCost : null
* materialCostComment : null
* otherPrice : null
* otherPriceComment : null
* totalPrice : null
* cancelOrderReason : null
* closePhase : null
* siteId : 91
* engineerId : 145
* feedback : null
* complait : null
* record : [{"id":1706,"orderId":560,"createTime":"2017-09-29 19:56:17","operation":"工单创建","operationComment":"王策玉 通过 新建工单 创建了工单","serviceProgessTime":null,"serviceProgessTimeNum":null,"commentName":"工单备注","commentInfo":"扶沟县城关镇没毛病村78903号"},{"id":1707,"orderId":560,"createTime":"2017-09-29 19:56:26","operation":"工程师接单","operationComment":"工程师王策玉 (17310890230) 接单","serviceProgessTime":"T2","serviceProgessTimeNum":2,"commentName":null,"commentInfo":null},{"id":1708,"orderId":560,"createTime":"2017-09-29 19:56:37","operation":"工程师预约","operationComment":"工程师王策玉进行客户预约","serviceProgessTime":"T3","serviceProgessTimeNum":3,"commentName":"预约时间及备注","commentInfo":"预约时间:2017-09-29 19:05:00 "}]
* pic : []
*/
private int id;
private String orderNum;
private int source;
private Object partnerNum;
private Object partnerName;
private int status;
private int repairType;
private int customerType;
private String customerName;
private String customerCompany;
private String customerMobile;
private String customerTelphome;
private int provinceId;
private String provinceName;
private int cityId;
private String cityName;
private int districtId;
private String districtName;
private String address;
private int providerTypeId;
private String providerName;
private Object categoryId;
private String categoryName;
private Object categorySource;
private Object brandId;
private String brandName;
private String productModel;
private int createId;
private String created;
private String createTime;
private String appointmentTime;
private String comment;
private String confirmDoorTime;
private String confirmDoorComment;
private Object serviceRecordComment;
private Object customerCheckComment;
private Object isPay;
private Object payType;
private Object doorPrice;
private Object doorPriceComment;
private Object servicePrice;
private Object servicePriceComment;
private Object materialCost;
private Object materialCostComment;
private Object otherPrice;
private Object otherPriceComment;
private Object totalPrice;
private Object cancelOrderReason;
private Object closePhase;
private int siteId;
private int engineerId;
private Object feedback;
private Object complait;
private List<RecordBean> record;
private List<?> pic;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getOrderNum() {
return orderNum;
}
public void setOrderNum(String orderNum) {
this.orderNum = orderNum;
}
public int getSource() {
return source;
}
public void setSource(int source) {
this.source = source;
}
public Object getPartnerNum() {
return partnerNum;
}
public void setPartnerNum(Object partnerNum) {
this.partnerNum = partnerNum;
}
public Object getPartnerName() {
return partnerName;
}
public void setPartnerName(Object partnerName) {
this.partnerName = partnerName;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public int getRepairType() {
return repairType;
}
public void setRepairType(int repairType) {
this.repairType = repairType;
}
public int getCustomerType() {
return customerType;
}
public void setCustomerType(int customerType) {
this.customerType = customerType;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerCompany() {
return customerCompany;
}
public void setCustomerCompany(String customerCompany) {
this.customerCompany = customerCompany;
}
public String getCustomerMobile() {
return customerMobile;
}
public void setCustomerMobile(String customerMobile) {
this.customerMobile = customerMobile;
}
public String getCustomerTelphome() {
return customerTelphome;
}
public void setCustomerTelphome(String customerTelphome) {
this.customerTelphome = customerTelphome;
}
public int getProvinceId() {
return provinceId;
}
public void setProvinceId(int provinceId) {
this.provinceId = provinceId;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public int getCityId() {
return cityId;
}
public void setCityId(int cityId) {
this.cityId = cityId;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public int getDistrictId() {
return districtId;
}
public void setDistrictId(int districtId) {
this.districtId = districtId;
}
public String getDistrictName() {
return districtName;
}
public void setDistrictName(String districtName) {
this.districtName = districtName;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public int getProviderTypeId() {
return providerTypeId;
}
public void setProviderTypeId(int providerTypeId) {
this.providerTypeId = providerTypeId;
}
public String getProviderName() {
return providerName;
}
public void setProviderName(String providerName) {
this.providerName = providerName;
}
public Object getCategoryId() {
return categoryId;
}
public void setCategoryId(Object categoryId) {
this.categoryId = categoryId;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public Object getCategorySource() {
return categorySource;
}
public void setCategorySource(Object categorySource) {
this.categorySource = categorySource;
}
public Object getBrandId() {
return brandId;
}
public void setBrandId(Object brandId) {
this.brandId = brandId;
}
public String getBrandName() {
return brandName;
}
public void setBrandName(String brandName) {
this.brandName = brandName;
}
public String getProductModel() {
return productModel;
}
public void setProductModel(String productModel) {
this.productModel = productModel;
}
public int getCreateId() {
return createId;
}
public void setCreateId(int createId) {
this.createId = createId;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getAppointmentTime() {
return appointmentTime;
}
public void setAppointmentTime(String appointmentTime) {
this.appointmentTime = appointmentTime;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public String getConfirmDoorTime() {
return confirmDoorTime;
}
public void setConfirmDoorTime(String confirmDoorTime) {
this.confirmDoorTime = confirmDoorTime;
}
public String getConfirmDoorComment() {
return confirmDoorComment;
}
public void setConfirmDoorComment(String confirmDoorComment) {
this.confirmDoorComment = confirmDoorComment;
}
public Object getServiceRecordComment() {
return serviceRecordComment;
}
public void setServiceRecordComment(Object serviceRecordComment) {
this.serviceRecordComment = serviceRecordComment;
}
public Object getCustomerCheckComment() {
return customerCheckComment;
}
public void setCustomerCheckComment(Object customerCheckComment) {
this.customerCheckComment = customerCheckComment;
}
public Object getIsPay() {
return isPay;
}
public void setIsPay(Object isPay) {
this.isPay = isPay;
}
public Object getPayType() {
return payType;
}
public void setPayType(Object payType) {
this.payType = payType;
}
public Object getDoorPrice() {
return doorPrice;
}
public void setDoorPrice(Object doorPrice) {
this.doorPrice = doorPrice;
}
public Object getDoorPriceComment() {
return doorPriceComment;
}
public void setDoorPriceComment(Object doorPriceComment) {
this.doorPriceComment = doorPriceComment;
}
public Object getServicePrice() {
return servicePrice;
}
public void setServicePrice(Object servicePrice) {
this.servicePrice = servicePrice;
}
public Object getServicePriceComment() {
return servicePriceComment;
}
public void setServicePriceComment(Object servicePriceComment) {
this.servicePriceComment = servicePriceComment;
}
public Object getMaterialCost() {
return materialCost;
}
public void setMaterialCost(Object materialCost) {
this.materialCost = materialCost;
}
public Object getMaterialCostComment() {
return materialCostComment;
}
public void setMaterialCostComment(Object materialCostComment) {
this.materialCostComment = materialCostComment;
}
public Object getOtherPrice() {
return otherPrice;
}
public void setOtherPrice(Object otherPrice) {
this.otherPrice = otherPrice;
}
public Object getOtherPriceComment() {
return otherPriceComment;
}
public void setOtherPriceComment(Object otherPriceComment) {
this.otherPriceComment = otherPriceComment;
}
public Object getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(Object totalPrice) {
this.totalPrice = totalPrice;
}
public Object getCancelOrderReason() {
return cancelOrderReason;
}
public void setCancelOrderReason(Object cancelOrderReason) {
this.cancelOrderReason = cancelOrderReason;
}
public Object getClosePhase() {
return closePhase;
}
public void setClosePhase(Object closePhase) {
this.closePhase = closePhase;
}
public int getSiteId() {
return siteId;
}
public void setSiteId(int siteId) {
this.siteId = siteId;
}
public int getEngineerId() {
return engineerId;
}
public void setEngineerId(int engineerId) {
this.engineerId = engineerId;
}
public Object getFeedback() {
return feedback;
}
public void setFeedback(Object feedback) {
this.feedback = feedback;
}
public Object getComplait() {
return complait;
}
public void setComplait(Object complait) {
this.complait = complait;
}
public List<RecordBean> getRecord() {
return record;
}
public void setRecord(List<RecordBean> record) {
this.record = record;
}
public List<?> getPic() {
return pic;
}
public void setPic(List<?> pic) {
this.pic = pic;
}
public static class RecordBean {
/**
* id : 1706
* orderId : 560
* createTime : 2017-09-29 19:56:17
* operation : 工单创建
* operationComment : 王策玉 通过 新建工单 创建了工单
* serviceProgessTime : null
* serviceProgessTimeNum : null
* commentName : 工单备注
* commentInfo : 扶沟县城关镇没毛病村78903号
*/
private int id;
private int orderId;
private String createTime;
private String operation;
private String operationComment;
private Object serviceProgessTime;
private Object serviceProgessTimeNum;
private String commentName;
private String commentInfo;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getOrderId() {
return orderId;
}
public void setOrderId(int orderId) {
this.orderId = orderId;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getOperation() {
return operation;
}
public void setOperation(String operation) {
this.operation = operation;
}
public String getOperationComment() {
return operationComment;
}
public void setOperationComment(String operationComment) {
this.operationComment = operationComment;
}
public Object getServiceProgessTime() {
return serviceProgessTime;
}
public void setServiceProgessTime(Object serviceProgessTime) {
this.serviceProgessTime = serviceProgessTime;
}
public Object getServiceProgessTimeNum() {
return serviceProgessTimeNum;
}
public void setServiceProgessTimeNum(Object serviceProgessTimeNum) {
this.serviceProgessTimeNum = serviceProgessTimeNum;
}
public String getCommentName() {
return commentName;
}
public void setCommentName(String commentName) {
this.commentName = commentName;
}
public String getCommentInfo() {
return commentInfo;
}
public void setCommentInfo(String commentInfo) {
this.commentInfo = commentInfo;
}
}
}
}
package com.dayu.bigfish.bean;
import java.io.Serializable;
/**
* Created by yu on 2017/10/10.
*/
public class TabBean implements Serializable {
/**
* code : 0
* data : {"canceled":0,"pendingservice":0,"reservation":1,"error":0}
* msg : 成功
*/
private int code;
private DataBean data;
private String msg;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public static class DataBean {
/**
* canceled : 0
* pendingservice : 0
* reservation : 1
* error : 0
*/
private int canceled;
private int pendingservice;
private int reservation;
private int error;
public int getCanceled() {
return canceled;
}
public void setCanceled(int canceled) {
this.canceled = canceled;
}
public int getPendingservice() {
return pendingservice;
}
public void setPendingservice(int pendingservice) {
this.pendingservice = pendingservice;
}
public int getReservation() {
return reservation;
}
public void setReservation(int reservation) {
this.reservation = reservation;
}
public int getError() {
return error;
}
public void setError(int error) {
this.error = error;
}
}
}
package com.dayu.bigfish.bean;
import com.google.gson.annotations.SerializedName;
/**
* Created by yu on 2017/9/29.
*/
public class TodayPerformanceBean {
/**
* code : 0
* data : {"今日业绩(元)":0}
* msg : 成功
*/
private int code;
private DataBean data;
private String msg;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public static class DataBean {
@SerializedName("今日业绩(元)")
private int _$208; // FIXME check this code
public int get_$208() {
return _$208;
}
public void set_$208(int _$208) {
this._$208 = _$208;
}
}
}
package com.dayu.bigfish.bean;
import java.io.Serializable;
/**
* Created by yu on 2017/9/30.
*/
public class VersionBase implements Serializable {
/**
* code : 0
* data : {"id":2,"appId":"dayushifua_dayu","versionCode":"1.10.1","versionCodeNum":1010001,"type":1,"downloadUrl":"http://dayuoss.oss-cn-beijing.aliyuncs.com/app/test/dayuuf_20170929.apk","upgradePrompt":"版本升级了!","platform":2,"status":1,"createTime":"2017-09-28 17:09:06","created":"admin","updateTime":null,"updated":null}
* msg : 成功
*/
private int code;
private DataBean data;
private String msg;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public static class DataBean {
/**
* id : 2
* appId : dayushifua_dayu
* versionCode : 1.10.1
* versionCodeNum : 1010001
* type : 1
* downloadUrl : http://dayuoss.oss-cn-beijing.aliyuncs.com/app/test/dayuuf_20170929.apk
* upgradePrompt : 版本升级了!
* platform : 2
* status : 1
* createTime : 2017-09-28 17:09:06
* created : admin
* updateTime : null
* updated : null
*/
private int id;
private String appId;
private String versionCode;
private int versionCodeNum;
private int type;
private String downloadUrl;
private String upgradePrompt;
private int platform;
private int status;
private String createTime;
private String created;
private Object updateTime;
private Object updated;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getVersionCode() {
return versionCode;
}
public void setVersionCode(String versionCode) {
this.versionCode = versionCode;
}
public int getVersionCodeNum() {
return versionCodeNum;
}
public void setVersionCodeNum(int versionCodeNum) {
this.versionCodeNum = versionCodeNum;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getDownloadUrl() {
return downloadUrl;
}
public void setDownloadUrl(String downloadUrl) {
this.downloadUrl = downloadUrl;
}
public String getUpgradePrompt() {
return upgradePrompt;
}
public void setUpgradePrompt(String upgradePrompt) {
this.upgradePrompt = upgradePrompt;
}
public int getPlatform() {
return platform;
}
public void setPlatform(int platform) {
this.platform = platform;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public Object getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Object updateTime) {
this.updateTime = updateTime;
}
public Object getUpdated() {
return updated;
}
public void setUpdated(Object updated) {
this.updated = updated;
}
}
}
package com.dayu.bigfish.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
......@@ -12,52 +14,93 @@ import android.widget.Toast;
import com.cjj.MaterialRefreshLayout;
import com.cjj.MaterialRefreshListener;
import com.dayu.bigfish.R;
import com.dayu.bigfish.activity.OrderDetailsActivity;
import com.dayu.bigfish.adapter.HomeEndTabAdapter;
import com.dayu.bigfish.adapter.HomeThreeTabAdapter;
import com.dayu.bigfish.application.MyApplication;
import com.dayu.bigfish.base.BaseFragment;
import com.dayu.bigfish.bean.OrderFinishBean;
import com.dayu.bigfish.moudle.finish.HomeEndTabPresenter;
import com.dayu.bigfish.moudle.finish.HomeEndTabView;
import com.dayu.bigfish.tip.TipsHelper;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.views.CustomProgressDialog;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import static android.R.attr.data;
/**
* Created by yu on 2017/8/31.
* 已完成
* on 2017/8/31.
*/
public class HomeEndTabFragment extends Fragment {
public class HomeEndTabFragment extends BaseFragment<HomeEndTabView, HomeEndTabPresenter> implements HomeEndTabView {
@BindView(R.id.tab_end_list)
ListView tabEndList;
Unbinder unbinder;
@BindView(R.id.refresh)
com.cjj.MaterialRefreshLayout refresh;
private int page;
private boolean hasNextPage=false;
private List<OrderFinishBean.DataBeanX.DataBean> finishList;
private boolean hasNextPage = false;
private CustomProgressDialog dialog;
private TipsHelper mTipsHelper;
private HomeEndTabPresenter homeEndTabPresenter;
private HomeEndTabAdapter homeEndTabAdapter;
private int siteId = GetUserInfo.getSITE_ID(MyApplication.getContext());
private int userId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
private boolean isPrepared;
private int orderId;
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_tab_end, container, false);
unbinder = ButterKnife.bind(this, rootView);
initView();
initData();
dialog = new CustomProgressDialog(getContext(), R.style.CustomDialog);
mTipsHelper = createTipsHelper(tabEndList);
dialog.show();
initRefresh();
isPrepared = true;
initListener();
lazyLoad();
return rootView;
}
public void initView() {
// dialog =new CustomProgressDialog(getContext(), R.style.CustomDialog);
// dialog.show();
// Handler handler = new Handler();
// handler.postDelayed(new Runnable() {
// @Override
// public void run() {
// /**
// *要执行的操作
// */
// dialog.dismiss();
// }
// }, 3000);//3秒后执行Runnable中的run方法
// initRefresh();
// initData(2, 1, userId,10,siteId);
initData();
}
@Override
protected void initData() {
homeEndTabPresenter.getFinishOrder(5, 1, userId, 10, siteId);
}
@Override
protected void lazyLoad() {
if (!isPrepared || !isVisible) {
return;
}
//填充各控件的数据
}
@Override
public HomeEndTabPresenter initPresenter() {
this.homeEndTabPresenter = new HomeEndTabPresenter(this);
return homeEndTabPresenter;
}
private void initData() {
tabEndList.setAdapter(new HomeEndTabAdapter(getContext()));
tabEndList.setEnabled(false);
@Override
public void initListener() {
tabEndList.setOnItemClickListener((parent, view, position, id) -> {
orderId = finishList.get(position).getId();
Intent intent = new Intent(getContext(), OrderDetailsActivity.class);
intent.putExtra("orderId", orderId + "");
startActivity(intent);
});
}
@Override
......@@ -65,8 +108,9 @@ public class HomeEndTabFragment extends Fragment {
super.onDestroyView();
unbinder.unbind();
}
private void initRefresh() {
refresh.setWaveColor(0xffffffff);
refresh.setWaveColor(R.color.cl_tab_init);
refresh.setIsOverLay(false);
refresh.setWaveShow(true);
refresh.setLoadMore(true);
......@@ -74,22 +118,58 @@ public class HomeEndTabFragment extends Fragment {
//下拉刷新
@Override
public void onRefresh(MaterialRefreshLayout materialRefreshLayout) {
// page = 1;
// initData(2, page, userId,10,siteId);
// page = 1;
// initData(2, page, userId,10,siteId);
homeEndTabPresenter.getFinishOrder(5, 1, userId, 10, siteId);
refresh.finishRefresh();
}
@Override
public void onRefreshLoadMore(MaterialRefreshLayout materialRefreshLayout) {
if (hasNextPage == true) {
page++;
// initData(2, page, userId,10,siteId);
} else {
Toast.makeText(getActivity(), "已经到底了", Toast.LENGTH_SHORT).show();
}
refresh.finishRefreshLoadMore();
}
});
}
@Override
public void finishSuccess(OrderFinishBean orderFinishBean) {
mTipsHelper.hideEmpty();
mTipsHelper.hideError();
finishList = orderFinishBean.getData().getData();
if (finishList.size() == 0 || finishList == null) {
mTipsHelper.showEmpty();
dialog.dismiss();
} else {
mTipsHelper.hideEmpty();
homeEndTabAdapter = new HomeEndTabAdapter(getContext(),finishList);
tabEndList.setAdapter(homeEndTabAdapter);
homeEndTabAdapter.notifyDataSetChanged();
dialog.dismiss();
}
}
@Override
public void faliled(String msg) {
dialog.dismiss();
ToastUtils.showShortToast(msg);
}
@Override
public void error(String msg) {
dialog.dismiss();
mTipsHelper.showError(true, msg, v -> {
homeEndTabPresenter.getFinishOrder(5, 1, userId, 10, siteId);
dialog.show();
});
ToastUtils.showShortToast(msg);
ToastUtils.showShortToast(msg);
}
@Override
public void onResume() {
super.onResume();
homeEndTabPresenter.getFinishOrder(5, 1, userId, 10, siteId);
}
}
......@@ -20,8 +20,10 @@ import com.dayu.bigfish.adapter.HomeOneTabAdapter;
import com.dayu.bigfish.application.MyApplication;
import com.dayu.bigfish.base.BaseFragment;
import com.dayu.bigfish.bean.HomeOneTabBean;
import com.dayu.bigfish.fragment.order.OrderDatailsFragment;
import com.dayu.bigfish.moudle.reservation.ReservationPresenter;
import com.dayu.bigfish.moudle.reservation.ReservationView;
import com.dayu.bigfish.tip.TipsHelper;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.views.CustomProgressDialog;
......@@ -53,11 +55,11 @@ public class HomeOneTabFragment extends BaseFragment<ReservationView, Reservatio
private boolean hasNextPage = false;//判断是否有下一页
private int page = 1;
private int siteId = GetUserInfo.getSITE_ID(MyApplication.getContext());
private int userId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
private CustomProgressDialog dialog;
// 标志位,标志已经初始化完成。
private boolean isPrepared;
private TipsHelper mTipsHelper;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
......@@ -65,6 +67,7 @@ public class HomeOneTabFragment extends BaseFragment<ReservationView, Reservatio
unbinder = ButterKnife.bind(this, rootView);
dialog = new CustomProgressDialog(getContext(), R.style.CustomDialog);
dialog.show();
mTipsHelper = createTipsHelper(tabOneList);
initRefresh();
isPrepared = true;
lazyLoad();
......@@ -76,15 +79,11 @@ public class HomeOneTabFragment extends BaseFragment<ReservationView, Reservatio
public void initListener() {
tabOneList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
int orderId = oneTablist.get(position).getId();
ToastUtils.showShortToast("工单详情,敬请期待....");
/* Intent intent = new Intent(getContext(), OrderDetailsActivity.class);
intent.putExtra("orderId", orderId + "");
startActivity(intent);*/
}
tabOneList.setOnItemClickListener((parent, view, position, id) -> {
int orderId = oneTablist.get(position).getId();
Intent intent = new Intent(getContext(), OrderDetailsActivity.class);
intent.putExtra("orderId", orderId + "");
startActivity(intent);
});
}
......@@ -124,7 +123,7 @@ public class HomeOneTabFragment extends BaseFragment<ReservationView, Reservatio
}
private void initRefresh() {
refresh.setWaveColor(0xffffffff);
refresh.setWaveColor(R.color.cl_order_item_date);
refresh.setIsOverLay(false);
refresh.setWaveShow(true);
refresh.setLoadMore(true);
......@@ -156,11 +155,19 @@ public class HomeOneTabFragment extends BaseFragment<ReservationView, Reservatio
//返回数据成功
@Override
public void getDataSuc(HomeOneTabBean data) {
oneTablist = data.getData().getData();
homeOneTabAdapter = new HomeOneTabAdapter(getContext(), oneTablist);
tabOneList.setAdapter(homeOneTabAdapter);
homeOneTabAdapter.notifyDataSetChanged();
dialog.dismiss();
mTipsHelper.hideError();
if (data.getData().getData().size() == 0 || data.getData().getData() == null) {
mTipsHelper.showEmpty();
dialog.dismiss();
} else {
mTipsHelper.hideEmpty();
oneTablist = data.getData().getData();
homeOneTabAdapter = new HomeOneTabAdapter(getContext(), oneTablist);
tabOneList.setAdapter(homeOneTabAdapter);
homeOneTabAdapter.notifyDataSetChanged();
dialog.dismiss();
}
}
......@@ -168,6 +175,10 @@ public class HomeOneTabFragment extends BaseFragment<ReservationView, Reservatio
@Override
public void getDataFail(String data) {
dialog.dismiss();
mTipsHelper.showError(true, data, v -> {
presenter.getData(2, page, userId, 10, siteId);
dialog.show();
});
ToastUtils.showShortToast(data);
}
......
......@@ -18,11 +18,16 @@ import com.dayu.bigfish.R;
import com.dayu.bigfish.activity.OrderDetailsActivity;
import com.dayu.bigfish.adapter.HomeOneTabAdapter;
import com.dayu.bigfish.adapter.HomeThreeTabAdapter;
import com.dayu.bigfish.adapter.HomeTwoTabAdapter;
import com.dayu.bigfish.application.MyApplication;
import com.dayu.bigfish.base.BaseFragment;
import com.dayu.bigfish.bean.ErrorOrderBean;
import com.dayu.bigfish.bean.HomeOneTabBean;
import com.dayu.bigfish.moudle.error.ErrorPresenter;
import com.dayu.bigfish.moudle.error.ErrorView;
import com.dayu.bigfish.moudle.reservation.ReservationPresenter;
import com.dayu.bigfish.moudle.reservation.ReservationView;
import com.dayu.bigfish.tip.TipsHelper;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.views.CustomProgressDialog;
......@@ -33,25 +38,31 @@ import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import static android.R.attr.data;
import static android.R.id.list;
/**
* Created by yu on 2017/8/31.
*/
public class HomeThreeTabFragment extends BaseFragment<ReservationView, ReservationPresenter> implements ReservationView {
public class HomeThreeTabFragment extends BaseFragment<ErrorView, ErrorPresenter> implements ErrorView {
@BindView(R.id.refresh)
com.cjj.MaterialRefreshLayout refresh;
@BindView(R.id.tab_three_list)
ListView tabThreeList;
Unbinder unbinder;
private HomeOneTabAdapter homeOneTabAdapter;
private List<HomeOneTabBean.DataBeanX.DataBean> oneTablist;
private boolean hasNextPage = false;//判断是否有下一页
private int page = 1;
private HomeThreeTabAdapter homeThreeTabAdapter;
private List<ErrorOrderBean.DataBean> errorlist;
// private boolean hasNextPage = false;//判断是否有下一页
private int page ;
private int siteId = GetUserInfo.getSITE_ID(MyApplication.getContext());
private int userId = GetUserInfo.getACCOUNT_ID(MyApplication.getContext());
private CustomProgressDialog dialog;
// 标志位,标志已经初始化完成。
private boolean isPrepared;
private TipsHelper mTipsHelper;
@Nullable
@Override
......@@ -59,25 +70,24 @@ public class HomeThreeTabFragment extends BaseFragment<ReservationView, Reservat
View rootView = inflater.inflate(R.layout.fragment_tab_three, container, false);
unbinder = ButterKnife.bind(this, rootView);
dialog = new CustomProgressDialog(getContext(), R.style.CustomDialog);
//dialog.show();
dialog.dismiss();
// initRefresh();
mTipsHelper = createTipsHelper(tabThreeList);
dialog.show();
// dialog.dismiss();
//initView();
initListener();
isPrepared = true;
initRefresh();
lazyLoad();
return rootView;
}
public void initListener() {
tabThreeList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
int orderId = oneTablist.get(position).getId();
ToastUtils.showShortToast("工单详情,敬请期待....");
/*Intent intent = new Intent(getContext(), OrderDetailsActivity.class);
intent.putExtra("orderId", orderId + "");
startActivity(intent);*/
}
tabThreeList.setOnItemClickListener((parent, view, position, id) -> {
int orderId = errorlist.get(position).getId();
Intent intent = new Intent(getContext(), OrderDetailsActivity.class);
intent.putExtra("orderId", orderId + "");
startActivity(intent);
});
}
......@@ -85,18 +95,17 @@ public class HomeThreeTabFragment extends BaseFragment<ReservationView, Reservat
@Override
public void initView() {
initData();
initListener();
//initListener();
}
@Override
public void initData() {
// presenter.getData(2, 1, userId, 10, siteId);
presenter.getErrorOrder(userId,siteId);
}
@Override
public ReservationPresenter initPresenter() {
return new ReservationPresenter(this);
public ErrorPresenter initPresenter() {
return new ErrorPresenter(this);
}
//判断懒加载操作
......@@ -116,7 +125,7 @@ public class HomeThreeTabFragment extends BaseFragment<ReservationView, Reservat
// }
private void initRefresh() {
refresh.setWaveColor(0xffffffff);
refresh.setWaveColor(R.color.cl_tab_read);
refresh.setIsOverLay(false);
refresh.setWaveShow(true);
refresh.setLoadMore(true);
......@@ -124,10 +133,8 @@ public class HomeThreeTabFragment extends BaseFragment<ReservationView, Reservat
//下拉刷新
@Override
public void onRefresh(MaterialRefreshLayout materialRefreshLayout) {
// page = 1;
//presenter.getData(2, page, userId, 10, siteId);
presenter.getErrorOrder(userId,siteId);
refresh.finishRefresh();
}
@Override
......@@ -135,36 +142,80 @@ public class HomeThreeTabFragment extends BaseFragment<ReservationView, Reservat
/* if (hasNextPage == true) {
page++;
presenter.getData(2, page, userId, 10, siteId);
} else {
} else
{
Toast.makeText(getActivity(), "已经到底了", Toast.LENGTH_SHORT).show();
}*/
} */
refresh.finishRefreshLoadMore();
}
});
}
//返回数据成功
//返回数据失败
/*dialog.dismiss();
mTipsHelper.showError(true, data, v -> {
presenter.getData(2, page, userId, 10, siteId);
dialog.show();
});
ToastUtils.showShortToast(data);*/
@Override
public void getDataSuc(HomeOneTabBean data) {
dialog.dismiss();
oneTablist = data.getData().getData();
homeOneTabAdapter = new HomeOneTabAdapter(getContext(), oneTablist);
tabThreeList.setAdapter(homeOneTabAdapter);
homeOneTabAdapter.notifyDataSetChanged();
public void onResume() {
super.onResume();
presenter.getErrorOrder(userId,siteId);
}
@Override
public void getSuccess(ErrorOrderBean errorOrderBean) {
mTipsHelper.hideEmpty();
mTipsHelper.hideError();
errorlist = errorOrderBean.getData();
if (errorlist.size() == 0 || errorlist == null) {
mTipsHelper.showEmpty();
dialog.dismiss();
} else {
mTipsHelper.hideEmpty();
homeThreeTabAdapter = new HomeThreeTabAdapter(getContext(),errorlist);
tabThreeList.setAdapter(homeThreeTabAdapter);
homeThreeTabAdapter.notifyDataSetChanged();
dialog.dismiss();
}
}
//返回数据失败
@Override
public void getDataFail(String data) {
public void getFailed(String msg) {
dialog.dismiss();
ToastUtils.showShortToast(data);
ToastUtils.showShortToast(msg);
}
@Override
public void onResume() {
super.onResume();
//presenter.getData(2, page, userId, 10, siteId);
public void error(String msg) {
dialog.dismiss();
mTipsHelper.showError(true, msg, v -> {
presenter.getErrorOrder(userId,siteId);
dialog.show();
});
ToastUtils.showShortToast(msg);
}
/* @Override
public void getDataSuc(ErrorOrderBean data) {
dialog.dismiss();
mTipsHelper.hideEmpty();
mTipsHelper.hideError();
errorlist = data.getData();
if (errorlist.size() == 0 || errorlist == null) {
mTipsHelper.showEmpty();
dialog.dismiss();
} else {
mTipsHelper.hideEmpty();
//homeOneTabAdapter = new HomeOneTabAdapter(getContext(), oneTablist);
tabThreeList.setAdapter(homeOneTabAdapter);
homeOneTabAdapter.notifyDataSetChanged();
dialog.dismiss();
}*/
//}
}
......@@ -28,6 +28,7 @@ import com.dayu.bigfish.bean.HomeTwoTabBean;
import com.dayu.bigfish.greendao.MyGreenDaoDao;
import com.dayu.bigfish.moudle.beltservice.BeltServicePresenter;
import com.dayu.bigfish.moudle.beltservice.BeltServiceView;
import com.dayu.bigfish.tip.TipsHelper;
import com.dayu.bigfish.utils.GetUserInfo;
import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.views.CustomProgressDialog;
......@@ -68,12 +69,15 @@ public class HomeTwoTabFragment extends BaseFragment<BeltServiceView, BeltServic
// 标志位,标志已经初始化完成。
private boolean isPrepared;
private MyGreenDao ss;//数据库
private TipsHelper mTipsHelper;
private int orderId;
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_tab_two, container, false);
unbinder = ButterKnife.bind(this, rootView);
dialog = new CustomProgressDialog(getContext(), R.style.CustomDialog);
mTipsHelper = createTipsHelper(tabTwoList);
dialog.show();
initRefresh();
isPrepared = true;
......@@ -108,21 +112,17 @@ public class HomeTwoTabFragment extends BaseFragment<BeltServiceView, BeltServic
}
public void initListener() {
tabTwoList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
int orderId = list.get(position).getId();
ToastUtils.showShortToast("工单详情,敬请期待....");
/* Intent intent = new Intent(getContext(), OrderDetailsActivity.class);
intent.putExtra("orderId", orderId + "");
startActivity(intent);*/
}
tabTwoList.setOnItemClickListener((parent, view, position, id) -> {
orderId = list.get(position).getId();
Intent intent = new Intent(getContext(), OrderDetailsActivity.class);
intent.putExtra("orderId", orderId + "");
startActivity(intent);
});
}
private void initRefresh() {
refresh.setWaveColor(0xffffffff);
refresh.setWaveColor(R.color.cl_tab_yellow);
refresh.setIsOverLay(false);
refresh.setWaveShow(true);
refresh.setLoadMore(true);
......@@ -152,11 +152,19 @@ public class HomeTwoTabFragment extends BaseFragment<BeltServiceView, BeltServic
//获取数据成功
@Override
public void getDataSuc(HomeTwoTabBean data) {
dialog.dismiss();
mTipsHelper.hideEmpty();
mTipsHelper.hideError();
list = data.getData().getData();
homeTwoTabAdapter = new HomeTwoTabAdapter(getContext(), list);
tabTwoList.setAdapter(homeTwoTabAdapter);
homeTwoTabAdapter.notifyDataSetChanged();
if (list.size() == 0 || list == null) {
mTipsHelper.showEmpty();
dialog.dismiss();
} else {
mTipsHelper.hideEmpty();
homeTwoTabAdapter = new HomeTwoTabAdapter(getContext(), list);
tabTwoList.setAdapter(homeTwoTabAdapter);
homeTwoTabAdapter.notifyDataSetChanged();
dialog.dismiss();
}
//查询数据库 当前用户
Query query = myGreenDaoDao().queryBuilder().where(MyGreenDaoDao.Properties.Logid.eq(GetUserInfo.getACCOUNT_ID(getContext())))
.build();
......@@ -191,6 +199,10 @@ public class HomeTwoTabFragment extends BaseFragment<BeltServiceView, BeltServic
@Override
public void getDataFail(String s) {
dialog.dismiss();
mTipsHelper.showError(true, s, v -> {
presenter.getData(110, page, userId, 10, siteId);
dialog.show();
});
ToastUtils.showShortToast(s);
}
......
......@@ -3,24 +3,31 @@ package com.dayu.bigfish.fragment.order;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.R;
import com.dayu.bigfish.bean.OrderDetailsBean;
import com.dayu.bigfish.utils.ToastUtils;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import org.w3c.dom.Text;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import okhttp3.Call;
import okhttp3.Response;
import static com.dayu.bigfish.R.id.four_text_nine_text;
/**
* Created by yu
* on 2017/9/13.
......@@ -41,27 +48,19 @@ public class OrderDatailsFragment extends Fragment {
TextView threeTextTwoText;
@BindView(R.id.three_text_three_text)
TextView threeTextThreeText;
@BindView(R.id.three_text_four_text)
TextView threeTextFourText;
@BindView(R.id.three_text_five_text)
TextView threeTextFiveText;
@BindView(R.id.four_text_one_text)
TextView fourTextOneText;
@BindView(R.id.four_text_two_text)
TextView fourTextTwoText;
@BindView(R.id.four_text_three_text)
TextView fourTextThreeText;
@BindView(R.id.four_text_four_text)
TextView fourTextFourText;
@BindView(R.id.four_text_five_text)
TextView fourTextFiveText;
@BindView(R.id.four_text_six_text)
TextView fourTextSixText;
@BindView(R.id.four_text_seven_text)
TextView fourTextSevenText;
@BindView(R.id.four_text_eight_text)
TextView fourTextEightText;
@BindView(R.id.four_text_nine_text)
@BindView(four_text_nine_text)
TextView fourTextNineText;
@BindView(R.id.text_one_one)
TextView textOneOne;
......@@ -71,14 +70,77 @@ public class OrderDatailsFragment extends Fragment {
TextView textThreeThree;
@BindView(R.id.text_foure_foure)
TextView textFoureFoure;
@BindView(R.id.text_title_order)
TextView textTitleOrder;
@BindView(R.id.text_one)
TextView textOne;
@BindView(R.id.text_two)
TextView textTwo;
@BindView(R.id.text_three)
TextView textThree;
@BindView(R.id.text_foure)
TextView textFoure;
@BindView(R.id.line_one)
ImageView lineOne;
@BindView(R.id.two_text_one)
TextView twoTextOne;
@BindView(R.id.two_text_two)
TextView twoTextTwo;
@BindView(R.id.two_text_three)
TextView twoTextThree;
@BindView(R.id.two_text_four)
TextView twoTextFour;
@BindView(R.id.two_text_five)
TextView twoTextFive;
@BindView(R.id.line_two)
ImageView lineTwo;
@BindView(R.id.three_text_one)
TextView threeTextOne;
@BindView(R.id.three_text_two)
TextView threeTextTwo;
@BindView(R.id.three_two_two)
TextView threeTwoTwo;
@BindView(R.id.three_four_four)
TextView threeFourFour;
@BindView(R.id.line_three)
ImageView lineThree;
@BindView(R.id.four_text_one)
TextView fourTextOne;
@BindView(R.id.four_text_two)
TextView fourTextTwo;
@BindView(R.id.four_text_three)
TextView fourTextThree;
@BindView(R.id.four_text_five)
TextView fourTextFive;
@BindView(R.id.four_text_seven)
TextView fourTextSeven;
@BindView(R.id.four_text_nine)
TextView fourTextNine;
@BindView(R.id.four_text_ten)
TextView fourTextTen;
@BindView(R.id.is_charge)
RelativeLayout isCharge;
@BindView(R.id.no_charge)
RelativeLayout noCharge;
private int orderId;
public OrderDetailsBean.DataBean dataBean;
private int orderStatu;
private int customerType;
private int repairType;
private String comment;
private String otherPrice;
private String materialCost;
private String servicePrice;
private String doorPrice;
private String totalPrice;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
orderId = getArguments().getInt("orderId");
View layout = inflater.inflate(R.layout.fragment_order_datails, container, false);
orderId = getArguments().getInt("orderId");
System.out.println("工单详情页!!!");
initData(orderId);
unbinder = ButterKnife.bind(this, layout);
return layout;
......@@ -87,7 +149,8 @@ public class OrderDatailsFragment extends Fragment {
private void initData(int orderId) {
System.out.println("工单详情的id为---->" + orderId);
OkGo.get("http://www.dayu.ai:7200/orders/" + orderId + "/detail")
//"http://47.94.101.239:7200/orders/" + orderId + "/detail"
OkGo.get(Constants.BASE_URL+"api-order"+"orders/" + orderId + "/detail")
.tag(this)
.execute(new StringCallback() {
@Override
......@@ -96,11 +159,147 @@ public class OrderDatailsFragment extends Fragment {
Gson gson = new Gson();
OrderDetailsBean orderDetailsBean = gson.fromJson(s, OrderDetailsBean.class);
dataBean = orderDetailsBean.getData();
initDataView(dataBean);
}
@Override
public void onError(Call call, Response response, Exception e) {
// System.out.println("");
System.out.println();
}
});
}
public void initDataView(OrderDetailsBean.DataBean dataBean) {
// orderNum 工单编号
textOneOne.setText(dataBean.getOrderNum());
// status 工单状态 1未接单2未预约3已预约4进行中5已完成6已取消7订单关闭
orderStatu = dataBean.getStatus();
if (orderStatu == 1) {
textTwoTwo.setText("未接单");
} else if (orderStatu == 2) {
textTwoTwo.setText("未预约");
} else if (orderStatu == 3) {
textTwoTwo.setText("已预约");
} else if (orderStatu == 4) {
textTwoTwo.setText("进行中");
} else if (orderStatu == 5) {
textTwoTwo.setText("已完成");
} else if (orderStatu == 6) {
textTwoTwo.setText("已取消");
} else if (orderStatu == 7) {
textTwoTwo.setText("订单关闭");
}
//categoryName 产品名称
textThreeThree.setText(dataBean.getCategoryName());
//providerName 工单类型
textFoureFoure.setText(dataBean.getProviderName());
//customerType 客户类型 1个人客户 2企业客户
customerType = dataBean.getCustomerType();
if (customerType == 1) {
twoTextTwoText.setText("个人客户");
} else if (customerType == 2) {
twoTextTwoText.setText("企业客户");
}
//customerName 客户名称
twoTextThreeText.setText(dataBean.getCustomerName());
//customerMobile 客户联系方式
twoTextFourText.setText(dataBean.getCustomerMobile());
//provinceName+cityName+districtName+address 省市区地方
twoTextFiveText.setText(dataBean.getProviderName() + dataBean.getCityName() +
dataBean.getDistrictName() + dataBean.getAddress());
//brandName 产品品牌名称
if (!TextUtils.isEmpty(dataBean.getBrandName())) {
threeTextTwoText.setText(dataBean.getBrandName());
} else {
threeTextTwoText.setText("暂无品牌");
}
//productModel 产品型号
if (!TextUtils.isEmpty(dataBean.getProductModel())) {
threeTextTwoText.setText(dataBean.getProductModel());
} else {
threeTextTwoText.setText("暂无型号");
}
//repairType 保修类型 1保内,2保外
repairType = dataBean.getRepairType();
if (repairType == 1) {
threeTextFiveText.setText("保内");
} else if (repairType == 2) {
threeTextFiveText.setText("保外");
}
//isPay 是否付费 1不付费2付费
dataBean.getIsPay();
String isPay = dataBean.getIsPay() + "";
if (!TextUtils.isEmpty(isPay)) {
if (isPay.equals("2") || isPay.equals("2.0")) {
//totalPrice
totalPrice = dataBean.getTotalPrice() + "";
if (!TextUtils.isEmpty(totalPrice)) {
fourTextOneText.setText(totalPrice + "元");
}
// doorPrice
doorPrice = dataBean.getDoorPrice() + "";
if ("null".equals(doorPrice)) {
fourTextTwoText.setText("0 元");
} else {
fourTextTwoText.setText(doorPrice + "元");
}
//servicePrice
servicePrice = dataBean.getServicePrice() + "";
if ("null".equals(servicePrice)) {
fourTextFourText.setText("0 元");
} else {
fourTextFourText.setText(servicePrice + "元");
}
//materialCost
materialCost = dataBean.getMaterialCost() + "";
if ("null".equals(materialCost)) {
fourTextSixText.setText("0 元");
} else {
fourTextSixText.setText(materialCost + "元");
}
//otherPrice
otherPrice = dataBean.getOtherPrice() + "";
if ("null".equals(otherPrice)) {
fourTextEightText.setText("0 元");
} else {
fourTextEightText.setText(otherPrice + "元");
}
//备注 doorPrice
// Comment
comment = (String) dataBean.getDoorPriceComment();
if (TextUtils.isEmpty(comment)) {
fourTextNineText.setText("暂无备注");
} else {
fourTextNineText.setText(comment);
}
//1付费
noCharge.setVisibility(View.GONE);
isCharge.setVisibility(View.VISIBLE);
}
} else {
//1不付费
noCharge.setVisibility(View.VISIBLE);
isCharge.setVisibility(View.GONE);
}
/* if (isPay.equals("1")) {
//1不付费
noCharge.setVisibility(View.VISIBLE);
isCharge.setVisibility(View.GONE);
} else if (isPay.equals("2")) {
noCharge.setVisibility(View.GONE);
isCharge.setVisibility(View.VISIBLE);
}*/
}
@Override
public void onDestroyView() {
......
......@@ -3,22 +3,35 @@ package com.dayu.bigfish.fragment.order;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import com.dayu.bigfish.R;
import com.dayu.bigfish.adapter.ServeDatailsAdapter;
import com.dayu.bigfish.base.BaseFragment;
import com.dayu.bigfish.bean.OrderDetailsBean;
import com.dayu.bigfish.bean.ServeDetailsBean;
import com.dayu.bigfish.moudle.orderDatailsServe.BaseHolder;
import com.dayu.bigfish.moudle.orderDatailsServe.OrderDatailsServePresenter;
import com.dayu.bigfish.moudle.orderDatailsServe.OrderDatailsServeView;
import com.dayu.bigfish.tip.TipsHelper;
import com.dayu.bigfish.utils.ToastUtils;
import com.dayu.bigfish.views.CustomProgressDialog;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import okhttp3.Call;
import okhttp3.Response;
......@@ -29,12 +42,16 @@ import okhttp3.Response;
*/
public class OrderDatailsServeFragment extends Fragment {
@BindView(R.id.button_look)
Button buttonLook;
@BindView(R.id.text_serve)
TextView textServe;
Unbinder unbinder;
@BindView(R.id.serve_list_view)
ListView serveListView;
private int orderId;
// 标志位,标志已经初始化完成。
/* private boolean isPrepared;
private TipsHelper mTipsHelper;
private CustomProgressDialog dialog;*/
private List<ServeDetailsBean.DataBean.RecordBean> recordBeen;
private ServeDatailsAdapter serveDatailsAdapter;
@Nullable
@Override
......@@ -42,34 +59,48 @@ public class OrderDatailsServeFragment extends Fragment {
View layout = inflater.inflate(R.layout.fragment_order_serve, container, false);
orderId = getArguments().getInt("orderId");
unbinder = ButterKnife.bind(this, layout);
return layout;
}
@Override
public void onDestroyView() {
super.onDestroyView();
unbinder.unbind();
}
@OnClick(R.id.button_look)
public void onViewClicked() {
// dialog=new CustomProgressDialog(getContext(), R.style.CustomDialog);
// dialog.show();
// presenter.get(orderId);
// initRefresh();
// lazyLoad();
// initListener();
initData(orderId);
buttonLook.setVisibility(View.GONE);
return layout;
}
public void initData(int orderId) {
System.out.println("工单服务记录订单的id为---->" + orderId);
OkGo.get("http://www.dayu.ai:7200/orders/" + orderId + "/detail")
public void initData(int orderId){
System.out.println("工单详情的id为---->" + orderId);
OkGo.get("http://47.94.101.239:7200/orders/" + orderId + "/detail")
.tag(this)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
System.out.println("查询工单信息返回的数据--->" + s);
System.out.println("查询服务信息返回的数据--->" + s);
Gson gson = new Gson();
OrderDetailsBean orderDetailsBean = gson.fromJson(s, OrderDetailsBean.class);
String returnValue = orderDetailsBean.getData().getRecord().toString();
//ToastUtils.showShortToast(returnValue);
textServe.setText(returnValue);
ServeDetailsBean serveDetailsBean = gson.fromJson(s, ServeDetailsBean.class);
recordBeen = serveDetailsBean.getData().getRecord();
initDataView(recordBeen);
}
@Override
public void onError(Call call, Response response, Exception e) {
// System.out.println("");
System.out.println();
}
});
}
private void initDataView(List<ServeDetailsBean.DataBean.RecordBean> recordBeen) {
serveDatailsAdapter = new ServeDatailsAdapter(getContext(),recordBeen);
serveListView.setAdapter(serveDatailsAdapter);
//serveDatailsAdapter.notifyDataSetChanged();
}
@Override
public void onDestroyView() {
super.onDestroyView();
unbinder.unbind();
}
}
package com.dayu.bigfish.managers;
import android.content.Context;
/**
* 通知的管理类
* on 2017/9/27.
*/
......@@ -37,12 +37,17 @@ public class BeltServicePresenter extends BasePresenter<BeltServiceView> {
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
HomeTwoTabBean twoTab = gson.fromJson(s, HomeTwoTabBean.class);
mBeltServiceView.getDataSuc(twoTab);
if (twoTab.getCode()==0){
mBeltServiceView.getDataSuc(twoTab);
}else{
ToastUtils.showShortToast("待预约列表请求失败");
}
}
@Override
public void onError(Call call, Response response, Exception e) {
mBeltServiceView.getDataFail(e.toString());
mBeltServiceView.getDataFail("网络或服务器异常");
}
});
......
package com.dayu.bigfish.moudle.error;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.base.BasePresenter;
import com.dayu.bigfish.bean.ErrorOrderBean;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import okhttp3.Call;
import okhttp3.Response;
/**
* Created by yu on 2017/9/17.
......@@ -14,4 +22,27 @@ public class ErrorPresenter extends BasePresenter<ErrorView> {
public ErrorPresenter(ErrorView mErrorView) {
this.mErrorView = mErrorView;
}
public void getErrorOrder(int userId,int userSite){
OkGo.get(Constants.ERROR_ORDER)
.tag(this)
.params("engineerId",userId)
.params("siteId",userSite)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
ErrorOrderBean errorOrderBean = gson.fromJson(s, ErrorOrderBean.class);
if (errorOrderBean.getCode()==0){
mErrorView.getSuccess(errorOrderBean);
}else {
mErrorView.getFailed("异常单请求失败");
}
}
@Override
public void onError(Call call, Response response, Exception e) {
mErrorView.error("网络或服务器异常");
}
});
}
}
package com.dayu.bigfish.moudle.error;
import com.dayu.bigfish.bean.ErrorOrderBean;
/**
* Created by yu on 2017/9/17.
* 异常单V
*/
public interface ErrorView {
void getDataSuc();
void getDataFail(String s);
void getSuccess(ErrorOrderBean errorOrderBean);
void getFailed(String msg);
void error(String msg);
}
package com.dayu.bigfish.moudle.finish;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.base.BasePresenter;
import com.dayu.bigfish.bean.OrderFinishBean;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import okhttp3.Call;
import okhttp3.Response;
/**
* Created by yu on 2017/9/30.
*/
public class HomeEndTabPresenter extends BasePresenter<HomeEndTabView> {
private HomeEndTabView homeEndTabView;
public HomeEndTabPresenter(HomeEndTabView homeEndTabView) {
this.homeEndTabView = homeEndTabView;
}
public void getFinishOrder(int state,int page,int engineerId,int pageSize,int siteId){
OkGo.get(Constants.ORDER_URL)
.tag(this)
.params("state", state)
.params("page", page)
.params("siteId",siteId)
.params("engineerId", engineerId)
.params("pageSize", pageSize)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
OrderFinishBean orderFinishBean = gson.fromJson(s, OrderFinishBean.class);
if (orderFinishBean.getCode()==0){
homeEndTabView.finishSuccess(orderFinishBean);
}else {
homeEndTabView.faliled("请求失败");
}
}
@Override
public void onError(Call call, Response response, Exception e) {
homeEndTabView.error("网络或服务器异常");
}
});
}
}
package com.dayu.bigfish.moudle.finish;
import com.dayu.bigfish.bean.OrderFinishBean;
/**
* Created by yu on 2017/9/30.
*/
public interface HomeEndTabView {
void finishSuccess(OrderFinishBean orderFinishBean);
void faliled(String msg);
void error(String msg);
}
......@@ -10,4 +10,5 @@ public interface HomeView{
void getDateSuccess();
//获取数据失败
void getDateFailed(String msg);
}
package com.dayu.bigfish.moudle.idea;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.activity.IdeaActivity;
import com.dayu.bigfish.base.BasePresenter;
import com.dayu.bigfish.bean.BaseBean;
import com.dayu.bigfish.utils.ToastUtils;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import org.json.JSONObject;
import java.util.HashMap;
import okhttp3.Call;
import okhttp3.Response;
import static android.R.string.ok;
import static cn.finalteam.toolsfinal.DateUtils.date;
/**
......@@ -17,42 +28,44 @@ public class IdeaActivityPresenter extends BasePresenter<IdeaActivityView> {
public IdeaActivityPresenter(IdeaActivityView ideaActivityView) {
this.ideaActivityView = ideaActivityView;
}
public void getData(String comment,String createTime,){
public void getData(String comment,String userName,String mobile){
HashMap<String, Object> params = new HashMap<>();
/* {
"comment": "string",
"createTime": "2017-09-27T03:33:26.859Z",
"created": "string",
"deal": 0,
"id": 0,
"mobile": "string",
"platform": 0,
"status": 0,
"suggestName": "string",
"updateTime": "2017-09-27T03:33:26.860Z",
"updated": "string"
}*/
//建议内容
params.put("comment", "");
params.put("comment",comment);
//创建时间
params.put("createTime", "");
//创建人
params.put("created", "");
params.put("created",userName);
//1已处理 2未处理
params.put("deal",2);
//建议人手机号码
params.put("mobile", "");
params.put("mobile",mobile);
//工程师id
params.put("id", "");
//1App
params.put("platform",1);
params.put("status", 1);
//工程师姓名
params.put("suggestName", "");
//修改时间
params.put("updateTime","");
params.put("updated", "");
params.put("suggestName",userName);
JSONObject jsonObject = new JSONObject(params);
OkGo.post(Constants.SET_IDEA_COMMIT)
.tag(this)
.upJson(jsonObject.toString())
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
System.out.println("问题反馈---->"+s);
BaseBean baseBean = gson.fromJson(s, BaseBean.class);
if (baseBean.getCode()==0){
ideaActivityView.success();
}else{
ideaActivityView.failed();
}
}
@Override
public void onError(Call call, Response response, Exception e) {
ideaActivityView.error();
}
});
}
}
package com.dayu.bigfish.moudle.orderDatailsServe;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.ViewGroup;
/**
* AUTHOR: Yuan.Meng
* E-MAIL: mengyuanzz@126.com
* CREATE-TIME: 16/5/24/下午4:28
* DESC:
*/
public class BaseHolder<T> extends RecyclerView.ViewHolder {
public BaseHolder(int viewId, ViewGroup parent, int viewType) {
super(((LayoutInflater) parent.getContext().getSystemService(parent.getContext().LAYOUT_INFLATER_SERVICE)).inflate(viewId, null,false));
}
public void refreshData(T data, int position) {
}
}
package com.dayu.bigfish.moudle.orderDatailsServe;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.base.BasePresenter;
import com.dayu.bigfish.bean.OrderDetailsBean;
import com.dayu.bigfish.bean.RegisterBean;
import com.dayu.bigfish.bean.ServeDetailsBean;
import com.dayu.bigfish.utils.LogUtils;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import okhttp3.Call;
import okhttp3.Response;
/**
* Created by Administrator on 2017/9/28.
*/
public class OrderDatailsServePresenter extends BasePresenter<OrderDatailsServeView> {
private OrderDatailsServeView orderDatailsServeView;
public OrderDatailsServePresenter(OrderDatailsServeView homeView) {
orderDatailsServeView = homeView;
}
public void get(int id) {
System.out.println("工单详情的id为---->" + id);
OkGo.get("http://47.94.101.239:7200/orders/" + id + "/detail")
.tag(this)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
System.out.println("查询工单信息返回的数据--->" + s);
Gson gson = new Gson();
ServeDetailsBean serveDetailsBean = gson.fromJson(s, ServeDetailsBean.class);
}
@Override
public void onError(Call call, Response response, Exception e) {
super.onError(call, response, e);
orderDatailsServeView.getDateFailed(e.toString());
}
});
}
}
package com.dayu.bigfish.moudle.orderDatailsServe;
import com.dayu.bigfish.bean.OrderDetailsBean;
/**
* Created by Administrator on 2017/9/28.
*/
public interface OrderDatailsServeView {
//获取数据成功
void getDateSuccess(OrderDetailsBean orderDetailsBean);
//获取数据失败
void getDateFailed(String msg);
}
......@@ -3,6 +3,12 @@ package com.dayu.bigfish.moudle.personal;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.base.BasePresenter;
import com.dayu.bigfish.bean.PersonalCenterBean;
import com.dayu.bigfish.bean.ReceOrderBean;
import com.dayu.bigfish.bean.ReceOrderNum;
import com.dayu.bigfish.bean.ReceUserRevenue;
import com.dayu.bigfish.bean.ReceivingOrderBean;
import com.dayu.bigfish.bean.TodayPerformanceBean;
import com.dayu.bigfish.moudle.receiving.Receiving;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
......@@ -10,33 +16,108 @@ import com.lzy.okgo.callback.StringCallback;
import okhttp3.Call;
import okhttp3.Response;
import static com.dayu.bigfish.Constants.USER_ORDER_RECEIVING;
import static com.dayu.bigfish.Constants.USER_REVENUE;
/**
* Created by yu
* on 2017/9/2.
*/
public class PersonalCenterPresenter extends BasePresenter<PersonalCenterView> {
private PersonalCenterView centerView;
private PersonalCenterView centerView;
public PersonalCenterPresenter(PersonalCenterView centerView) {
this.centerView = centerView;
}
public void get(int userId){
OkGo.get(Constants.PERSONAL_CENTER+userId)
public void get(int userId) {
OkGo.get(Constants.PERSONAL_CENTER + userId)
.tag(this)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
Gson gson =new Gson();
Gson gson = new Gson();
PersonalCenterBean personalCenterBean = gson.fromJson(s, PersonalCenterBean.class);
if (personalCenterBean.getCode()==0){
centerView.success(personalCenterBean);
if (personalCenterBean.getCode() == 0) {
centerView.success(personalCenterBean);
} else {
centerView.error("个人信息请求失败");
}
}
@Override
public void onError(Call call, Response response, Exception e) {
centerView.failed("网络异常");
}
});
}
//获取工程师今日业绩
public void getEarnings(int userSite,int userId) {
OkGo.get(Constants.USER_ORDER_REVENUE+Constants.SITE_ID+userSite+Constants.USER_ID+userId)
.tag(this)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
TodayPerformanceBean todayPerformanceBean = gson.fromJson(s,TodayPerformanceBean.class);
System.out.println("今日业绩为"+s);
if (todayPerformanceBean.getCode()==0){
centerView.todayOrderSuccess(todayPerformanceBean);
}else{
centerView.todayOrderFailed("今日业绩获取数据失败");
}
}
@Override
public void onError(Call call, Response response, Exception e) {
centerView.error("网络或服务器异常");
}
});
}
//获取工程师今日接单数量(次)
public void getReceOrder(int siteId, int userId) {
OkGo.get(Constants.USER_ORDER_RECEIVING+Constants.SITE_ID+siteId+Constants.USER_ID+userId)
.tag(this)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
System.out.println("今日接单数"+s);
Gson gson = new Gson();
ReceOrderNum receOrderNum = gson.fromJson(s, ReceOrderNum.class);
if (receOrderNum.getCode()==0){
centerView.orderReceivingSuccess(receOrderNum);
}else {
centerView.orderReceivingFailed("今日接单数据获取失败");
}
}
@Override
public void onError(Call call, Response response, Exception e) {
centerView.error("网络或服务器异常");
}
});
}
//获取工程师的累计信息 (评分,累计业绩,工单记录)
public void getOrderUserInfo(int siteId, int userId) {
OkGo.get(Constants.USER_REVENUE+Constants.SITE_ID+siteId+Constants.USER_ID+userId)
.tag(this)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
System.out.println("工程师累计信息:"+s);
Gson gson = new Gson();
ReceUserRevenue receUserRevenue = gson.fromJson(s, ReceUserRevenue.class);
if (receUserRevenue.getCode()==0){
centerView.performanceSuccess(receUserRevenue);
}else{
centerView.failed("请求失败");
centerView.performanceFailed("工程师累计信息获取失败");
}
}
@Override
public void onError(Call call, Response response, Exception e) {
centerView.failed("服务器异常");
centerView.error("网络或服务器异常");
}
});
}
......
......@@ -2,6 +2,10 @@ package com.dayu.bigfish.moudle.personal;
import com.dayu.bigfish.bean.LoginBean;
import com.dayu.bigfish.bean.PersonalCenterBean;
import com.dayu.bigfish.bean.ReceOrderBean;
import com.dayu.bigfish.bean.ReceOrderNum;
import com.dayu.bigfish.bean.ReceUserRevenue;
import com.dayu.bigfish.bean.TodayPerformanceBean;
/**
* Created by yu on 2017/9/2.
......@@ -10,18 +14,24 @@ import com.dayu.bigfish.bean.PersonalCenterBean;
public interface PersonalCenterView {
//请求成功的回调
void success(PersonalCenterBean personalCenterBean);
//请求失败的回调
void error(String msg);
void failed(String msg);
//工程师今日业绩
void todayOrderSuccess(PersonalCenterBean personalCenterBean);
void todayOrderFailed(PersonalCenterBean personalCenterBean);
void todayOrderSuccess(TodayPerformanceBean todayPerformanceBean);
void todayOrderFailed(String msg);
//工程师今日接单
void orderReceivingSuccess(PersonalCenterBean personalCenterBean);
void orderReceivingFailed(PersonalCenterBean personalCenterBean);
void orderReceivingSuccess(ReceOrderNum orderNum);
void orderReceivingFailed(String msg);
//工程师累计业绩
void performanceSuccess(PersonalCenterBean personalCenterBean);
void performanceFailed(PersonalCenterBean personalCenterBean);
//工程师工单记录(已服务)
void recordOrderSuccess(PersonalCenterBean personalCenterBean);
void recordOrderFailed(PersonalCenterBean personalCenterBean);
void performanceSuccess(ReceUserRevenue receUserRevenue);
void performanceFailed(String msg);
}
......@@ -16,6 +16,8 @@ import com.lzy.okgo.callback.StringCallback;
import okhttp3.Call;
import okhttp3.Response;
import static com.dayu.bigfish.Constants.ORDER_RECEIVING;
/**
* 待接收订单页面的业务逻辑层
* on 2017/8/29.
......@@ -35,7 +37,7 @@ public class ReceivingPresenter extends BasePresenter<ReceivingView> {
* @param
*/
public void get(int state, int pagerId, int pagerSize, int siteId) {
System.out.println("站点---->"+siteId);
System.out.println("站点---->" + siteId);
OkGo.get(Constants.ORDER_URL)
.params("state", state)
.params("page", pagerId)
......@@ -49,11 +51,13 @@ public class ReceivingPresenter extends BasePresenter<ReceivingView> {
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
ReceivingBean receivingBean = gson.fromJson(s, ReceivingBean.class);
if (receivingBean.getCode() == 0) {
receivingView.refershSuccess(receivingBean);
} else {
receivingView.refershFailed("请求失败");
}
System.out.println("待结单列表请求-->" + s);
System.out.println(receivingBean.getData());
System.out.println(receivingBean.getCode());
System.out.println(receivingBean.getMsg());
receivingView.refershSuccess(receivingBean);
//receivingView.loginSuccess(receivingBean);
}
......@@ -71,22 +75,26 @@ public class ReceivingPresenter extends BasePresenter<ReceivingView> {
* @param engineer 工程师的账户id
*/
public void receivingOrder(int orders, int engineer) {
OkGo.get("http://47.94.101.239:7200/orders/"+orders+"/engineer/"+engineer)
OkGo.get(Constants.ORDER_RECEIVING + orders + "/engineer/" + engineer)
.tag(this)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
ReceivingOrderBean receivingOrderBean = gson.fromJson(s, ReceivingOrderBean.class);
System.out.println("接单返回值" + s);
ToastUtils.showShortToast("接单成功请移至待预约列表查看");
receivingView.receivingSuccess();
if (receivingOrderBean.getCode() == 0) {
System.out.println("接单返回值" + s);
ToastUtils.showShortToast("接单成功请移至待预约列表查看");
receivingView.receivingSuccess();
} else {
ToastUtils.showShortToast("接单失败");
}
}
@Override
public void onError(Call call, Response response, Exception e) {
ToastUtils.showShortToast("请求失败" + e);
ToastUtils.showShortToast("请求失败");
}
});
}
......
......@@ -2,6 +2,7 @@ package com.dayu.bigfish.moudle.reservation;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.base.BasePresenter;
import com.dayu.bigfish.bean.HomeOneTabBean;
import com.dayu.bigfish.utils.ToastUtils;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
......@@ -38,12 +39,16 @@ public class ReservationPresenter extends BasePresenter<ReservationView> {
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
HomeOneTabBean ontTab = gson.fromJson(s, HomeOneTabBean.class);
mReservationView.getDataSuc(ontTab);
if (ontTab.getCode() == 0 ) {
mReservationView.getDataSuc(ontTab);
}else{
ToastUtils.showShortToast("请求失败");
}
}
@Override
public void onError(Call call, Response response, Exception e) {
mReservationView.getDataFail(e.toString());
mReservationView.getDataFail("网络或服务器异场");
}
});
}
......
package com.dayu.bigfish.moudle.reservation;
import com.dayu.bigfish.bean.ErrorOrderBean;
import com.dayu.bigfish.bean.HomeOneTabBean;
/**
......@@ -12,4 +13,5 @@ public interface ReservationView {
void getDataSuc(HomeOneTabBean data);
void getDataFail(String data);
}
package com.dayu.bigfish.moudle.set;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.base.BasePresenter;
import com.dayu.bigfish.bean.BaseBean;
import com.dayu.bigfish.bean.BaseStringBean;
import com.dayu.bigfish.bean.LoginBean;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import okhttp3.Call;
import okhttp3.Response;
/**
* Created by yu on 2017/9/2.
......@@ -12,4 +22,25 @@ public class SettingActivityPresenter extends BasePresenter<SettingActivityView>
public SettingActivityPresenter(SettingActivityView settingActivityView) {
this.settingActivityView = settingActivityView;
}
public void updataVersion(){
OkGo.get(Constants.UPDATA_VERSION+"dayushifua_dayu")
.tag(this)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
BaseStringBean baseStringBean = gson.fromJson(s, BaseStringBean.class);
if (baseStringBean.getCode()==0){
settingActivityView.updata_success(baseStringBean);
}else {
settingActivityView.updata_failed("请求失败");
}
}
@Override
public void onError(Call call, Response response, Exception e) {
settingActivityView.error("网络或服务器异常");
}
});
}
}
package com.dayu.bigfish.moudle.set;
import com.dayu.bigfish.bean.BaseBean;
import com.dayu.bigfish.bean.BaseStringBean;
/**
* Created by yu on 2017/9/2.
*/
public interface SettingActivityView {
void updata_success(BaseStringBean baseStringBean);
void updata_failed(String msg);
void error(String msg);
}
package com.dayu.bigfish.moudle.worksheetRecord;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.base.BasePresenter;
import com.dayu.bigfish.bean.WorksheetBean;
import com.dayu.bigfish.utils.LogUtils;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import okhttp3.Call;
import okhttp3.Response;
/**
* Created by Administrator on 2017/9/29.
*/
public class WorksheetRecordPresenter extends BasePresenter<WorksheetRecordView>{
private WorksheetRecordView worksheetRecordView;
public WorksheetRecordPresenter(WorksheetRecordView worksheetRecordView1) {
worksheetRecordView = worksheetRecordView1;
}
public void getDate(String state,int engineerId,String customerMobile,int siteId,String page){
OkGo.get(Constants.WORKSSHEET_RECORD )
.params("state",state)
.params("engineerId",engineerId)
.params("customerMobile",customerMobile)
.params("siteId",siteId)
.params("page",page)
.params("pageSize",10)
.execute(new StringCallback() {
@Override
public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson();
WorksheetBean worksheetBean = gson.fromJson(s, WorksheetBean.class);
LogUtils.i(s);
//回调view层发送验证成功的方法回调,并把解析后的bean类传递过去
worksheetRecordView.getSuccess(worksheetBean);
}
@Override
public void onError(Call call, Response response, Exception e) {
//打印异常信息
worksheetRecordView.getError(response.message());
}
});
}
}
package com.dayu.bigfish.moudle.worksheetRecord;
import com.dayu.bigfish.bean.RegisterBean;
import com.dayu.bigfish.bean.WorksheetBean;
/**
* Created by Administrator on 2017/9/29.
*/
public interface WorksheetRecordView {
void getSuccess(WorksheetBean worksheetBean);
void getError(String msg);
}
......@@ -4,6 +4,7 @@ import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import static cn.finalteam.toolsfinal.DateUtils.date;
......@@ -65,7 +66,7 @@ public class DateUtils {
}
/**
* 转换为字符
* 随机时间字符串转换为标准时间
* 年-月-日
*/
public String stringTimeTo(String time) {
......@@ -77,4 +78,11 @@ public class DateUtils {
three = two.replace("日"," ");
return three;
}
//获取手机系统时间转换为时间戳
public String getTodayDateTime() {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",
Locale.getDefault());
return format.format(new Date());
}
}
......@@ -28,4 +28,18 @@ public class GetUserInfo {
String userId = (String) SPUtils.get(context, "ACCESS_TOKEN", "");
return userId;
}
/**
*获取工程师名字
* */
public static String getUserName(Context context){
String userName = (String) SPUtils.get(context, "USER_NAME", "");
return userName;
}
/**
*获取工程师手机号
* */
public static String getUserPhone(Context context){
String userPhone = (String) SPUtils.get(context, "USER_PHONE", "");
return userPhone;
}
}
package com.dayu.bigfish.utils;
import android.content.Context;
import com.dayu.bigfish.Constants;
import com.dayu.bigfish.bean.BaseStringBean;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import okhttp3.Call;
import okhttp3.Response;
/**
* Created by yu on 2017/9/30.
*/
public class UpdataVersionUtils {
public static void updataVersion(Context context){
}
}
......@@ -76,7 +76,7 @@
<android.support.design.widget.TabLayout
android:id="@+id/home_tabLayout"
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_height="78dp"
app:tabIndicatorColor="@color/cl_tab_line"
app:tabMaxWidth="0dp"
app:tabMode="fixed"
......
......@@ -27,5 +27,4 @@
android:textColor="#8a8a8a"
android:textSize="@dimen/sp_1"
/>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
</LinearLayout>
\ No newline at end of file
......@@ -217,7 +217,7 @@
android:layout_below="@id/text_today_yeji"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_15"
android:text="86"
android:text="0"
android:textColor="@color/cl_tab_yellow"
android:textSize="30sp"
/>
......@@ -245,7 +245,7 @@
android:layout_below="@id/text_today_jiedan"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_15"
android:text="10"
android:text="0"
android:textColor="@color/cl_tab_yellow"
android:textSize="30sp"
/>
......@@ -283,13 +283,14 @@
android:layout_below="@id/text_leiji"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_14.3"
android:text="180"
android:text="0"
android:textColor="@color/cl_tab_yellow"
android:textSize="@dimen/sp_30"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_gd"
android:layout_width="160dp"
android:layout_height="100dp"
android:layout_marginLeft="@dimen/dp_13.3"
......@@ -313,7 +314,7 @@
android:layout_below="@id/text_gongdan"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_14.3"
android:text="180"
android:text="0"
android:textColor="@color/cl_tab_yellow"
android:textSize="@dimen/sp_30"
/>
......
......@@ -29,7 +29,9 @@
android:id="@+id/receiving_refersh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/receiving_listview"
android:layout_width="match_parent"
......@@ -38,5 +40,16 @@
android:divider="@null"
android:scrollbars="none"
/>
<ImageView
android:id="@+id/image"
android:layout_width="90dp"
android:src="@mipmap/yu"
android:layout_height="90dp"
android:layout_marginTop="116dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
......@@ -11,8 +10,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_26"
>
android:layout_marginBottom="@dimen/dp_26">
<TextView
android:id="@+id/text_title_order"
......@@ -22,8 +20,7 @@
android:layout_marginTop="@dimen/dp_10"
android:text="@string/tv_order_eg"
android:textColor="@color/cl_order_text_title"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/text_one"
......@@ -34,8 +31,7 @@
android:layout_marginTop="@dimen/dp_13"
android:text="工单编号"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/text_one_one"
......@@ -47,8 +43,7 @@
android:layout_toRightOf="@id/text_one"
android:text="1235676532"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/text_two"
......@@ -59,8 +54,7 @@
android:layout_marginTop="@dimen/dp_13"
android:text="工单状态"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/text_two_two"
......@@ -72,8 +66,7 @@
android:layout_toRightOf="@id/text_two"
android:text="未预约"
android:textColor="@color/cl_tab_read"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/text_three"
......@@ -84,8 +77,7 @@
android:layout_marginTop="@dimen/dp_13"
android:text="产 品"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/text_three_three"
......@@ -97,8 +89,7 @@
android:layout_toRightOf="@id/text_three"
android:text="智能门锁"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/text_foure"
......@@ -109,8 +100,7 @@
android:layout_marginTop="@dimen/dp_13"
android:text="类 型"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/text_foure_foure"
......@@ -122,8 +112,7 @@
android:layout_toRightOf="@id/text_foure"
android:text="安装"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<ImageView
android:id="@+id/line_one"
......@@ -132,8 +121,7 @@
android:layout_below="@id/text_foure"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_12"
android:background="@color/cl_order_item_line_bg"
/>
android:background="@color/cl_order_item_line_bg" />
<TextView
android:id="@+id/two_text_one"
......@@ -144,8 +132,7 @@
android:layout_marginTop="@dimen/dp_10"
android:text="客户信息"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/two_text_two"
......@@ -156,8 +143,7 @@
android:layout_marginTop="@dimen/dp_13"
android:text="客户类型"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/two_text_two_text"
......@@ -169,8 +155,7 @@
android:layout_toRightOf="@id/two_text_two"
android:text="个人"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/two_text_three"
......@@ -181,8 +166,7 @@
android:layout_marginTop="@dimen/dp_13"
android:text="客户姓名"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/two_text_three_text"
......@@ -194,8 +178,7 @@
android:layout_toRightOf="@id/two_text_three"
android:text="王大锤"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/two_text_four"
......@@ -206,8 +189,7 @@
android:layout_marginTop="@dimen/dp_13"
android:text="联系方式"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/two_text_four_text"
......@@ -219,8 +201,7 @@
android:layout_toRightOf="@id/two_text_four"
android:text="17310890230"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/two_text_five"
......@@ -231,8 +212,7 @@
android:layout_marginTop="@dimen/dp_13"
android:text="客户地址"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/two_text_five_text"
......@@ -244,8 +224,7 @@
android:layout_toRightOf="@id/two_text_five"
android:text="辽宁省铁岭市莲花乡池水沟村"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<ImageView
android:id="@+id/line_two"
......@@ -254,8 +233,7 @@
android:layout_below="@id/two_text_five_text"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_12"
android:background="@color/cl_order_item_line_bg"
/>
android:background="@color/cl_order_item_line_bg" />
<TextView
android:id="@+id/three_text_one"
......@@ -266,8 +244,7 @@
android:layout_marginTop="@dimen/dp_10"
android:text="产品信息"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/three_text_two"
......@@ -278,8 +255,7 @@
android:layout_marginTop="@dimen/dp_13"
android:text="品 牌"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/three_text_two_text"
......@@ -291,8 +267,7 @@
android:layout_toRightOf="@id/three_text_two"
android:text="鸿基"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/three_two_two"
......@@ -303,8 +278,7 @@
android:layout_marginTop="@dimen/dp_13"
android:text="型 号"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/three_text_three_text"
......@@ -316,58 +290,31 @@
android:layout_toRightOf="@id/three_two_two"
android:text="666"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/three_three_three"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/three_two_two"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="序列编号"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/three_text_four_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/three_text_three_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/three_three_three"
android:text="888"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/three_four_four"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/three_three_three"
android:layout_below="@id/three_two_two"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="质保信息"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/three_text_five_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/three_text_four_text"
android:layout_below="@id/three_text_three_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/three_four_four"
android:text="服务就要给钱"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:textSize="@dimen/sp_13.3" />
<ImageView
android:id="@+id/line_three"
......@@ -376,245 +323,183 @@
android:layout_below="@id/three_text_five_text"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_12"
android:background="@color/cl_order_item_line_bg"
/>
android:background="@color/cl_order_item_line_bg" />
<TextView
android:id="@+id/four_text_one"
android:layout_width="wrap_content"
<RelativeLayout
android:id="@+id/is_charge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/line_three"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_10"
android:text="收费记录"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_two"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_one"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="总金额数"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_one_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_one"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_two"
android:text="0元"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_three"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_two"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="上门费用"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_two_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_one_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_three"
android:text="0元"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_four"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_three"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="备 注"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_three_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_two_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_four"
android:text="上门服务"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_five"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_four"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="服务费用"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_four_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_three_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_five"
android:text="0元"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_six"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_four_text"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="备 注"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_five_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_four_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_six"
android:text="上门提供服务"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_seven"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_six"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="材料费用"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_six_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_five_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_seven"
android:text="0元"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_eight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_seven"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="备 注"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_seven_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_six_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_eight"
android:text="上门就要钱"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_nine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_eight"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="其他费用"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_eight_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_seven_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_nine"
android:text="0元"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_ten"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_nine"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="备 注"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/four_text_nine_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_eight_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_ten"
android:text="0元"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
/>
android:visibility="gone"
>
<TextView
android:id="@+id/four_text_one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_10"
android:text="收费记录"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/four_text_two"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_one"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="总金额数"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/four_text_one_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_one"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_two"
android:text="0元"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/four_text_three"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_two"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="上门费用"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/four_text_two_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_one_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_three"
android:text="0元"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/four_text_five"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_three"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="服务费用"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/four_text_four_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_two_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_five"
android:text="0元"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/four_text_seven"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_five"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="材料费用"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/four_text_six_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_four_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_seven"
android:text="0元"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/four_text_nine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_seven"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="其他费用"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/four_text_eight_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_six_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_nine"
android:text="0元"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/four_text_ten"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_nine"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="备 注"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/four_text_nine_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/four_text_eight_text"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/four_text_ten"
android:text="...."
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/no_charge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/line_three"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:text="暂无收费记录"
android:textSize="@dimen/sp_16"
android:textColor="@color/cl_black"
android:textStyle="bold"
/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
</ScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/button_look"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="点击查看服务记录数据"
/>
<TextView
android:id="@+id/text_serve"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cl_home_listview_bg"
android:orientation="vertical">
<ListView
android:id="@+id/serve_list_view"
android:layout_marginTop="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cl_white"
>
</ListView>
</RelativeLayout>
\ No newline at end of file
......@@ -78,6 +78,23 @@
android:textStyle="bold"
/>
<TextView
android:id="@+id/text_line"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:layout_toRightOf="@id/item_text_weixiu"
android:textColor="@color/cl_selector_hui"
android:text=" -- " />
<TextView
android:id="@+id/item_text_weixiu_leixing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:layout_toRightOf="@id/text_line"
android:text="@string/tv_order_item_tool_text_leixing"
android:textColor="@color/cl_selector_hui"
android:textSize="@dimen/size_login_hint_text" />
<TextView
android:id="@+id/item_text_dizhi"
android:layout_toRightOf="@id/item_image_dizhi"
android:layout_marginLeft="@dimen/size_order_item_gpstext_ml"
......
......@@ -16,9 +16,9 @@
<ImageView
android:id="@+id/item_line"
android:layout_width="@dimen/size_order_item_line_width"
android:layout_height="@dimen/size_order_item_line_height"
android:layout_height="@dimen/dp_80"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/size_order_item_line_ml"
android:layout_marginLeft="@dimen/dp_89"
android:background="@color/cl_order_item_line_bg"/>
<TextView
......@@ -45,6 +45,18 @@
android:textSize="@dimen/size_order_item_data_text"
android:textStyle="bold"
/>
<TextView
android:id="@+id/error_state"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="[未按时到达]"
android:textColor="@color/cl_tab_read"
android:layout_below="@id/item_time"
android:textSize="@dimen/sp_10"
android:layout_marginRight="@dimen/size_order_item_data_mr"
android:layout_marginTop="@dimen/dp_9"
android:layout_alignRight="@id/item_line"
/>
<ImageView
android:id="@+id/item_image_weixiu"
......@@ -78,6 +90,23 @@
android:textStyle="bold"
/>
<TextView
android:id="@+id/text_line"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:layout_toRightOf="@id/item_text_weixiu"
android:text=" -- " />
<TextView
android:id="@+id/item_text_weixiu_leixing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:textStyle="bold"
android:layout_toRightOf="@id/text_line"
android:text="@string/tv_order_item_tool_text_leixing"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/size_login_hint_text" />
<TextView
android:id="@+id/item_text_dizhi"
android:layout_toRightOf="@id/item_image_dizhi"
android:layout_marginLeft="@dimen/size_order_item_gpstext_ml"
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_13.3"
android:background="@color/cl_home_listview_bg"
>
<TextView
android:id="@+id/tv_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="2019-12-12"
android:layout_marginBottom="10dp"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/tv_1" />
<RelativeLayout
android:id="@+id/rl"
android:layout_width="226.7dp"
android:layout_height="62.7dp"
android:src="@mipmap/rectangle_3"
android:layout_below="@+id/rl_1"
android:layout_marginRight="10dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true">
<TextView
android:id="@+id/tv_2"
android:text="预约时间为2017/12/12 12:30"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<TextView
android:id="@+id/tv_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="客户非本人接待"
android:gravity="right"
android:layout_alignParentTop="true"
android:layout_marginTop="20dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignLeft="@+id/tv_2"
android:layout_alignStart="@+id/tv_2" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/cl_selector_hui"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_below="@+id/rl"
android:layout_marginTop="10dp"
/>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:padding="@dimen/dp_13.3">
<LinearLayout
android:paddingLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/linearLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<ImageView
android:id="@+id/iv_1"
android:src="@mipmap/oval_11"
android:layout_width="15dp"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/iv_2"
android:layout_width="1dp"
android:background="@color/cl_receiving_order_item_data"
android:layout_marginLeft="7dp"
android:layout_height="20dp" />
<ImageView
android:id="@+id/iv_3"
android:src="@mipmap/oval_11"
android:layout_width="15dp"
android:layout_height="match_parent" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/time"
android:text="19:20"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/linearLayout"
android:layout_toEndOf="@+id/linearLayout"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/des"
android:text="工程师王尼玛进行客户预约"
android:layout_marginLeft="67dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/item_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:background="@color/cl_work_raiod"
>
<TextView
android:id="@+id/item_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_6"
android:textColor="@color/cl_order_text_title"
android:text="2017-9-68 78:90:00"
android:textSize="@dimen/sp_13.3"
/>
<TextView
android:id="@+id/item_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/dp_6"
android:textColor="@color/cl_tab_init"
android:text="2017-9-68 78:90:00"
android:textSize="@dimen/sp_10"
/>
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
......@@ -45,7 +45,7 @@
<dimen name="size_order_item_line_ml">89dp</dimen>
<dimen name="size_order_item_time_mr">12dp</dimen>
<dimen name="size_order_item_time_mt">20dp</dimen>
<dimen name="size_order_item_data_mr">13dp</dimen>
<dimen name="size_order_item_data_mr">12dp</dimen>
<dimen name="size_order_item_tool_ml">14dp</dimen>
<dimen name="size_order_item_tool_mt">23dp</dimen>
<dimen name="size_order_item_gps_ml">14dp</dimen>
......@@ -58,6 +58,7 @@
<dimen name="size_order_item_time_text">12sp</dimen>
<dimen name="sp_30">30sp</dimen>
<dimen name="sp_10">10sp</dimen>
<dimen name="sp_8">8sp</dimen>
<dimen name="dp_0.23">0.23dp</dimen>
<dimen name="dp_0.7">1dp</dimen>
......@@ -107,6 +108,12 @@
<dimen name="dp_197">197dp</dimen>
<dimen name="dp_50">50dp</dimen>
<dimen name="dp_34">34dp</dimen>
<dimen name="dp_60">60dp</dimen>
<dimen name="dp_65">65dp</dimen>
<dimen name="dp_70">70dp</dimen>
<dimen name="dp_9">9dp</dimen>
<dimen name="dp_89">89dp</dimen>
<dimen name="dp_80">80dp</dimen>
</resources>
\ No newline at end of file
......@@ -18,7 +18,9 @@ buildscript {
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
......
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