Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d4b0075f
authored
Jan 10, 2021
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
2a3414fc
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
226 additions
and
36 deletions
baseSDK/src/main/java/com/dayu/common/Constants.java
build.gradle
orderCenter/src/main/java/com/dayu/order/api/OrderService.java
orderCenter/src/main/java/com/dayu/order/api/protocol/bean/OrderToolsBean.java
orderCenter/src/main/java/com/dayu/order/ui/fragment/MultiOrderDetailFragment.java
orderCenter/src/main/java/com/dayu/order/ui/view/ToolImageDialog.java
orderCenter/src/main/res/layout/dialog_tool_img.xml
orderCenter/src/main/res/layout/fragment_multi_detail.xml
orderCenter/src/main/res/layout/item_order_tool.xml
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
d4b0075f
...
...
@@ -60,19 +60,19 @@ public class Constants {
/**
* uat测试环境配置.
*/
public
static
String
ENVIROMENT
=
"uat"
;
public
static
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
public
static
String
BASE_URL
=
"http://47.95.223.6:3112"
;
public
static
String
WEB_SOP
=
"http://47.95.223.6:9004/#/sop"
;
public
static
String
WEB_SOP_DETAIL
=
"http://47.95.223.6:9004/#/sopdetail"
;
public
static
String
WEB_ZHI_SHI
=
"http://47.95.223.6:9004/#/detail"
;
public
static
String
CHECK_MULTI_WEB_SOP
=
"http://47.95.223.6:9004/#/manyServiceResult"
;
public
static
String
MULTI_WEB_SOP
=
"http://47.95.223.6:9004/#/manySop"
;
public
static
final
String
UP_PHOTO
=
"/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply"
;
public
static
final
String
UP_VIDEO
=
"/file/uploadVideoOne?targetPath=test/video"
;
public
static
final
boolean
IS_DEBUG
=
false
;
public
static
String
VIDEO_SHARE_URL
=
"http://uat.kf.ai:9099/#/shareVideo?type=_type&id="
;
//uat 学习视频分享链接 type(课程: course 直播: live)
public
static
int
XLR_PID
=
14
;
//小绿人商家id
//
public static String ENVIROMENT = "uat";
//
public static int LOG_LEVEL = LogUtils.LEVEL_ALL;
//
public static String BASE_URL = "http://47.95.223.6:3112";
//
public static String WEB_SOP = "http://47.95.223.6:9004/#/sop";
//
public static String WEB_SOP_DETAIL = "http://47.95.223.6:9004/#/sopdetail";
//
public static String WEB_ZHI_SHI = "http://47.95.223.6:9004/#/detail";
//
public static String CHECK_MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manyServiceResult";
//
public static String MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manySop";
//
public static final String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
//
public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=test/video";
//
public static final boolean IS_DEBUG = false;
//
public static String VIDEO_SHARE_URL = "http://uat.kf.ai:9099/#/shareVideo?type=_type&id="; //uat 学习视频分享链接 type(课程: course 直播: live)
//
public static int XLR_PID = 14; //小绿人商家id
...
...
@@ -80,19 +80,19 @@ public class Constants {
/**
* 正式环境.
*/
//
public static String ENVIROMENT = "release";
//
public static int LOG_LEVEL = LogUtils.LEVEL_OFF;
//
public static String BASE_URL = "https://mobile.kf.ai";
//
public static String WEB_SOP = "https://sop.kf.ai/#/sop";
//
public static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
//
public static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
//
public static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
//
public static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
//
public static final String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
//
public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=online/video";
//
public static final boolean IS_DEBUG = false;
//
public static String VIDEO_SHARE_URL = "http://app.dl.kf.ai/ext/#/shareVideo?type=_type&id="; //学习视频分享链接 type(课程: course 直播: live)
//
public static int XLR_PID = 1936; //小绿人商家id
public
static
String
ENVIROMENT
=
"release"
;
public
static
int
LOG_LEVEL
=
LogUtils
.
LEVEL_OFF
;
public
static
String
BASE_URL
=
"https://mobile.kf.ai"
;
public
static
String
WEB_SOP
=
"https://sop.kf.ai/#/sop"
;
public
static
String
WEB_SOP_DETAIL
=
"https://sop.kf.ai/#/sopdetail"
;
public
static
String
WEB_ZHI_SHI
=
"https://sop.kf.ai/#/detail"
;
public
static
String
CHECK_MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manyServiceResult"
;
public
static
String
MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manySop"
;
public
static
final
String
UP_PHOTO
=
"/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply"
;
public
static
final
String
UP_VIDEO
=
"/file/uploadVideoOne?targetPath=online/video"
;
public
static
final
boolean
IS_DEBUG
=
false
;
public
static
String
VIDEO_SHARE_URL
=
"http://app.dl.kf.ai/ext/#/shareVideo?type=_type&id="
;
//学习视频分享链接 type(课程: course 直播: live)
public
static
int
XLR_PID
=
1936
;
//小绿人商家id
...
...
build.gradle
View file @
d4b0075f
...
...
@@ -5,8 +5,8 @@ buildscript {
ext
.
build_tools_version
=
"27.0.3"
ext
.
min_sdk_version
=
17
ext
.
target_sdk_version
=
26
ext
.
version_code
=
27
3
ext
.
verson_name
=
"2.7.
3
"
ext
.
version_code
=
27
5
ext
.
verson_name
=
"2.7.
5
"
ext
.
gradle_version
=
'3.1.4'
ext
.
isReleaseMinify
=
false
ext
.
isDebugMinify
=
false
...
...
orderCenter/src/main/java/com/dayu/order/api/OrderService.java
View file @
d4b0075f
...
...
@@ -14,6 +14,7 @@ import com.dayu.order.api.protocol.Order;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.api.protocol.OrderPart
;
import
com.dayu.order.api.protocol.bean.CompanyAddressBean
;
import
com.dayu.order.api.protocol.bean.OrderToolsBean
;
import
com.dayu.order.api.protocol.bean.SiteAddressBean
;
import
com.dayu.order.api.protocol.bean.GreenPersionSiteInfo
;
import
com.dayu.order.api.protocol.bean.KnowledgeListBean
;
...
...
@@ -584,6 +585,13 @@ public interface OrderService {
Observable
<
BaseResponse
<
KnowledgeListBean
>>
getKnowledgeDetail
(
@Path
(
"id"
)
int
id
);
/**
* 工具清单
* @return
*/
@GET
(
Constants
.
API_7900
+
"/spuTool/list"
)
Observable
<
BaseResponse
<
List
<
OrderToolsBean
>>>
getTools
(
@Query
(
"kaSpuId"
)
int
kaSpuId
,
@Query
(
"status"
)
int
status
);
/**
* 工单详情是否显示价格
*
* @return
...
...
orderCenter/src/main/java/com/dayu/order/api/protocol/bean/OrderToolsBean.java
0 → 100644
View file @
d4b0075f
package
com
.
dayu
.
order
.
api
.
protocol
.
bean
;
public
class
OrderToolsBean
{
/**
* id : 0
* imgUrl : string
* kaSpuId : 0
* status : 0
* title : string
*/
private
int
id
;
private
String
imgUrl
;
private
int
kaSpuId
;
private
int
status
;
private
String
title
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
String
getImgUrl
()
{
return
imgUrl
;
}
public
void
setImgUrl
(
String
imgUrl
)
{
this
.
imgUrl
=
imgUrl
;
}
public
int
getKaSpuId
()
{
return
kaSpuId
;
}
public
void
setKaSpuId
(
int
kaSpuId
)
{
this
.
kaSpuId
=
kaSpuId
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
}
orderCenter/src/main/java/com/dayu/order/ui/fragment/MultiOrderDetailFragment.java
View file @
d4b0075f
...
...
@@ -25,6 +25,7 @@ import com.dayu.order.api.OrderService;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.api.protocol.bean.GreenPersionSiteInfo
;
import
com.dayu.order.api.protocol.bean.OrderToolsBean
;
import
com.dayu.order.api.protocol.data.AddDialRecordData
;
import
com.dayu.order.common.OperatePhoneEvent
;
import
com.dayu.order.common.OrderConstant
;
...
...
@@ -35,9 +36,11 @@ import com.dayu.order.databinding.ItemDetailDeviceCountBinding;
import
com.dayu.order.databinding.ItemDetailServerInfoBinding
;
import
com.dayu.order.ui.activity.PdfWebViewActivity
;
import
com.dayu.order.ui.activity.QrCodeActivity
;
import
com.dayu.order.ui.view.ToolImageDialog
;
import
com.dayu.provider.event.TakeOrderSuccessEvent
;
import
com.dayu.provider.router.RouterPath
;
import
com.dayu.utils.CommonUtils
;
import
com.dayu.utils.GlideImageLoader
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UIUtils
;
import
com.dayu.utils.UtilsDate
;
...
...
@@ -92,6 +95,9 @@ public class MultiOrderDetailFragment extends BaseFragment<SImplePresenter, Frag
initInfoView
(
detail
);
getShowPriceData
();
}
if
(
detail
.
getSpus
()
!=
null
&&
detail
.
getSpus
().
size
()
>
0
)
{
getToolsData
(
detail
.
getSpus
().
get
(
0
).
getKaSpuId
());
}
mBind
.
tvAlert
.
setText
(
detail
.
getAlerted
()
==
2
?
"紧急"
:
"正常"
);
mServerAdapter
=
new
CoreAdapter
<>(
false
);
mBind
.
rlServerContent
.
setLayoutManager
(
new
LinearLayoutManager
(
mActivity
));
...
...
@@ -280,6 +286,33 @@ public class MultiOrderDetailFragment extends BaseFragment<SImplePresenter, Frag
}));
}
//工具列表
private
void
getToolsData
(
int
kaSpuId
)
{
Api
.
getService
(
OrderService
.
class
).
getTools
(
kaSpuId
,
1
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
results
->
{
if
(
results
!=
null
&&
results
.
size
()
>
0
)
setToolsAdapter
(
results
);
}));
}
private
void
setToolsAdapter
(
List
<
OrderToolsBean
>
results
)
{
BaseQuickAdapter
<
OrderToolsBean
,
BaseViewHolder
>
wrongAdapter
=
new
BaseQuickAdapter
<
OrderToolsBean
,
BaseViewHolder
>(
R
.
layout
.
item_order_tool
,
results
)
{
@Override
protected
void
convert
(
BaseViewHolder
helper
,
OrderToolsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_title
,
item
.
getTitle
());
ImageView
ivPicture
=
helper
.
getView
(
R
.
id
.
iv_picture
);
GlideImageLoader
.
load
(
mContext
,
item
.
getImgUrl
(),
ivPicture
);
ivPicture
.
setOnClickListener
(
v
->{
new
ToolImageDialog
().
show
(
getActivity
(),
item
.
getImgUrl
());
});
}
};
LinearLayoutManager
layoutManager
=
new
LinearLayoutManager
(
getContext
());
mBind
.
rvTools
.
setLayoutManager
(
layoutManager
);
mBind
.
rvTools
.
setAdapter
(
wrongAdapter
);
}
//故障部位
private
void
initWrongView
(
OrderDetail
detail
)
{
if
(
detail
.
getSpus
()
!=
null
&&
detail
.
getSpus
().
size
()
>
0
)
{
...
...
orderCenter/src/main/java/com/dayu/order/ui/view/ToolImageDialog.java
0 → 100644
View file @
d4b0075f
package
com
.
dayu
.
order
.
ui
.
view
;
import
android.app.Activity
;
import
android.app.Dialog
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.widget.ImageView
;
import
com.dayu.order.R
;
import
com.dayu.utils.GlideImageLoader
;
public
class
ToolImageDialog
{
public
void
show
(
Activity
activity
,
String
imgUrl
)
{
View
view
=
View
.
inflate
(
activity
,
R
.
layout
.
dialog_tool_img
,
null
);
Dialog
mDialog
=
new
Dialog
(
activity
,
R
.
style
.
CustomDialog
);
mDialog
.
setContentView
(
view
);
ImageView
ivImg
=
view
.
findViewById
(
R
.
id
.
iv_img
);
GlideImageLoader
.
loadFit
(
activity
,
ivImg
,
imgUrl
,-
1
);
Window
window
=
mDialog
.
getWindow
();
WindowManager
.
LayoutParams
wl
=
window
.
getAttributes
();
wl
.
width
=
ViewGroup
.
LayoutParams
.
MATCH_PARENT
;
wl
.
height
=
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
;
mDialog
.
onWindowAttributesChanged
(
wl
);
mDialog
.
setCanceledOnTouchOutside
(
true
);
mDialog
.
show
();
}
}
orderCenter/src/main/res/layout/dialog_tool_img.xml
0 → 100644
View file @
d4b0075f
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
>
<ImageView
android:id=
"@+id/iv_img"
android:layout_marginLeft=
"30dp"
android:layout_marginRight=
"30dp"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
\ No newline at end of file
orderCenter/src/main/res/layout/fragment_multi_detail.xml
View file @
d4b0075f
...
...
@@ -101,10 +101,10 @@
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_state"
android:layout_marginLeft=
"19dp"
android:textColor=
"@color/common_text_color"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/tv_alert0"
android:text=
"正常"
android:textColor=
"@color/common_text_color"
android:textSize=
"14sp"
/>
<TextView
...
...
@@ -221,6 +221,7 @@
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_wrong_info"
android:layout_width=
"match_parent"
...
...
@@ -228,8 +229,7 @@
android:layout_below=
"@+id/ll_wrong"
android:layout_marginTop=
"15dp"
android:orientation=
"horizontal"
android:visibility=
"gone"
>
android:visibility=
"gone"
>
<TextView
android:layout_width=
"wrap_content"
...
...
@@ -246,10 +246,10 @@
<TextView
android:id=
"@+id/tv_no_wrong_info"
style=
"@style/common_text_style"
android:text=
"@string/no_data"
android:visibility=
"gone"
android:drawableLeft=
"@drawable/ic_wrong_num"
android:textSize=
"14sp"
/>
android:text=
"@string/no_data"
android:textSize=
"14sp"
android:visibility=
"gone"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_wrong_info"
...
...
@@ -260,12 +260,12 @@
</LinearLayout>
<LinearLayout
android:visibility=
"gone"
android:id=
"@+id/ll_site_info"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/ll_wrong_info"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:visibility=
"gone"
>
<LinearLayout
android:layout_width=
"match_parent"
...
...
@@ -776,6 +776,21 @@
</LinearLayout>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"43dp"
android:paddingLeft=
"15dp"
android:paddingTop=
"@dimen/dp_15"
android:text=
"工具装备清单"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rv_tools"
android:background=
"@color/white"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<TextView
android:id=
"@+id/tv_contact_seller"
android:layout_width=
"match_parent"
android:layout_height=
"35dp"
...
...
orderCenter/src/main/res/layout/item_order_tool.xml
0 → 100644
View file @
d4b0075f
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:paddingLeft=
"10dp"
android:paddingRight=
"15dp"
android:layout_marginTop=
"10dp"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_title"
style=
"@style/common_text_style"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:textSize=
"14sp"
android:text=
"1"
/>
<ImageView
android:id=
"@+id/iv_picture"
android:layout_width=
"100dp"
android:layout_marginLeft=
"10dp"
android:layout_height=
"60dp"
/>
</LinearLayout>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment