Commit fbdaf7f7 by 刘鹏

feat : 消息未读未更新、通知未接入

parent eed55690
......@@ -198,6 +198,7 @@ dependencies {
api project(':m-home')
api project(':m-confide')
api project(':ydl-medical-pay')
implementation project(':ydl-flutter-base')
......@@ -222,6 +223,7 @@ dependencies {
implementation project(':m-fm')
implementation modularPublication('com.ydl:m-fm-api')
} else {
api project(':ydl-medical-pay')
//发布模式
api 'com.ydl:m-user-module-ydl:0.0.6'
......
......@@ -71,10 +71,24 @@
</activity>
<activity android:name=".TestAppActivity" />
<activity
android:name=".home.HomeActivity"
android:launchMode="singleTask"
android:noHistory="true"></activity>
<!-- 微信配置相关 开始-->
<activity
android:name="${APPLICATIONID}.wxapi.WXEntryActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity
android:name="${APPLICATIONID}.wxapi.WXPayEntryActivity"
android:exported="true"
android:launchMode="singleTop" />
<!-- 微信配置相关 结束-->
</application>
</manifest>
\ No newline at end of file
......@@ -92,10 +92,20 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
tv_user.setOnClickListener {
reLoadData()
}
test_ts.setOnClickListener {
// val alipay: PayTask = PayTask(this@MainActivity)
// val orderInfo = "{\n" +
// " \"code\": \"200\",\n" +
// " \"msg\": \"success\",\n" +
// " \"data\": \"创建支付成功,壹点灵支付系统返回:{\\\"msg\\\":\\\"成功\\\",\\\"code\\\":\\\"200\\\",\\\"data\\\":{\\\"payParams\\\":\\\"alipay_sdk=alipay-sdk-java-dynamicVersionNo&app_id=2021002115687047&biz_content=%7B%22body%22%3A%22%7B%5C%22inquiryOrderId%5C%22%3A11.0%2C%5C%22appId%5C%22%3A%5C%22654020792723443712%5C%22%7D%22%2C%22business_params%22%3A%22%7B%5C%22inquiryOrderId%5C%22%3A11.0%2C%5C%22appId%5C%22%3A%5C%22654020792723443712%5C%22%7D%22%2C%22out_trade_no%22%3A%2221110318491022%22%2C%22product_code%22%3A%22QUICK_MSECURITY_PAY%22%2C%22subject%22%3A%22%E5%9C%A8%E7%BA%BF%E9%97%AE%E8%AF%8A%22%2C%22total_amount%22%3A%22300.00%22%7D&charset=UTF-8&format=json&method=alipay.trade.app.pay&notify_url=https%3A%2F%2Ftestapi.ydl.com%2Fapi%2Fauth%2FcashierV2%2FaliPay%2FpayNotify&return_url=xxxx&sign=G5Fju0Ja%2F%2BS6ceRttIGM3VQc0stRCo5W%2FAQ%2FWbHypCJHRdkKARWFI18eNolQzWBDhA2dvU9vZqqExYaKYx8rGhSHUdbYH8Dy6PjjFAdGXVFmDy0IZv9TxsEDl04hasKdi%2Blxou%2F6GNWg3sxpwKlBxEi8RKvwG7%2F9wQJlz4T1i7ZGm%2FcA2GfcTulHs4istr7Fay5UFJXUsy3CjczqYwS7gee8lQdNjSgh71ms6stM%2FcGP3YlnoPw%2BM2ZPnvYqQ31PnBnTAQwThUtePjOY7%2FRUtrd5DWDERk9av8DZW69HCLf%2BgOuBwXmK%2FmodE3HYtCC0dcTUOuGaNqfJ491ZwbUMvA%3D%3D&sign_type=RSA2&timestamp=2021-11-09+16%3A34%3A18&version=1.0\\\"},\\\"errMsg\\\":\\\"\\\"},壹点灵入参:{\\\"appId\\\":\\\"654020792723443712\\\",\\\"description\\\":\\\"在线问诊\\\",\\\"expend\\\":{\\\"inquiryOrderId\\\":11},\\\"goodsDesc\\\":\\\"在线问诊\\\",\\\"goodsTitle\\\":\\\"在线问诊\\\",\\\"orderNo\\\":\\\"21110318491022\\\",\\\"payAmount\\\":\\\"300.00\\\",\\\"payChannel\\\":1,\\\"sign\\\":\\\"NxaohUfCZOQXCYUeEdV27A==\\\"}\"\n" +
// "}"
// val result: Map<String, String> = alipay.payV2(orderInfo, true)
}
yl_twwz.setOnClickListener {
//医疗图文问诊
GraphicConsultationFlow1Activity.start(this@MainActivity)
GraphicConsultationFlow1Activity.start(this@MainActivity,"10586")
}
yl_yhdangan_list.setOnClickListener {
......@@ -130,6 +140,9 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bt_to_im.setOnClickListener {
FragmentContainerActivity.start(this, "NewMultiMessageFragment")
}
test_im.setOnClickListener {
FragmentContainerActivity.start(this, "MeidicalChatFragment")
}
bt_to_dynamic.setOnClickListener {
FragmentContainerActivity.start(this, "TrendsHomeFragment")
}
......
......@@ -14,6 +14,7 @@ import com.yidianling.home.ui.fragment.YdlHomeFragment
//import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
//import com.yidianling.home.ui.fragment.YdlHomeFragment
import com.yidianling.im.ui.page.NewMultiMessageFragment
import com.yidianling.medical.im.MeidicalChatFragment
import com.yidianling.tests.home.NewTestHomeFragment
import com.yidianling.user.mine.MineFragment
......@@ -84,6 +85,9 @@ class FragmentContainerActivity : BaseLceActivity<DemoContract.View, DemoContrac
if ("NewTestHomeFragment" == fragmentName) {
return NewTestHomeFragment()
}
if ("MeidicalChatFragment" == fragmentName) {
return MeidicalChatFragment()
}
return PlayFragment()
}
}
......@@ -376,7 +376,8 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
@Override
public void back() {
//h5中实现
mContext.finish();
}
@Override
......
package com.ydl.component.wxapi;
import com.umeng.socialize.weixin.view.WXCallbackActivity;
public class WXEntryActivity extends WXCallbackActivity {
}
package com.ydl.component.wxapi;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import androidx.annotation.Nullable;
import com.medical.ydl.medical.pay.bean.MedicalPayStatus;
import com.medical.ydl.medical.pay.bean.MedicalWXPayEvent;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import com.yidianling.ydl_pay.common.bean.WeiXinPayStatusEvent;
import de.greenrobot.event.EventBus;
/**
* author : Zhangwenchao
* e-mail : zhangwch@yidianling.com
* time : 2018/04/18
*/
public class WXPayEntryActivity extends Activity implements IWXAPIEventHandler {
private IWXAPI api;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
api = WXAPIFactory.createWXAPI(this, null);
api.handleIntent(getIntent(), this);
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
api.handleIntent(intent, this);
}
@Override
public void onReq(BaseReq baseReq) {
finish();
}
@Override
public void onResp(BaseResp baseResp) {
Log.e("WXPayEntryActivity","onPayFinish, errCode = " + baseResp.errCode);
EventBus.getDefault().post(new WeiXinPayStatusEvent(baseResp.errCode == 0, baseResp.errStr));
EventBus.getDefault().post(new MedicalWXPayEvent(new MedicalPayStatus(baseResp.errCode == 0)));
finish();
}
}
......@@ -230,7 +230,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginRight="10dp"
android:text="医疗 图文问诊流程" />
android:text="问诊流程" />
<Button
android:id="@+id/yl_yhdangan_list"
......@@ -238,7 +238,23 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginRight="10dp"
android:text="医疗 用户档案列表" />
android:text="档案列表" />
<Button
android:id="@+id/test_ts"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginRight="10dp"
android:text="测试开关" />
<Button
android:id="@+id/test_im"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginRight="10dp"
android:text="im" />
</LinearLayout>
......
......@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.03",
"m-user" : "0.0.61.84",
"m-home" : "0.0.22.70",
"m-im" : "0.0.20.13",
"m-im" : "0.0.20.25",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.10",
......@@ -33,12 +33,13 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.40.51",
"ydl-platform" : "0.0.40.52",
//第二步 若干
"ydl-webview" : "0.0.38.52",
"ydl-webview" : "0.0.38.53",
"ydl-media" : "0.0.21.10",
"ydl-pay" : "0.0.18.19",
"ydl-medical-pay" : "0.0.01.06",
"m-audioim" : "0.0.49.29.37",
"ydl-flutter-base": "0.0.14.26",
......@@ -93,7 +94,7 @@ ext {
"m-fm" : "0.0.30.01",
"m-user" : "0.0.61.84",
"m-home" : "0.0.22.70",
"m-im" : "0.0.20.13",
"m-im" : "0.0.20.25",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.8",
......@@ -115,12 +116,13 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.40.51",
"ydl-platform" : "0.0.40.52",
//第二步 若干
"ydl-webview" : "0.0.38.52",
"ydl-webview" : "0.0.38.53",
"ydl-media" : "0.0.21.10",
"ydl-pay" : "0.0.18.19",
"ydl-medical-pay" : "0.0.01.06",
"m-audioim" : "0.0.49.29.37",
"ydl-flutter-base": "0.0.14.26",
......@@ -138,7 +140,7 @@ ext {
"cardview-v7" : 'androidx.cardview:cardview:1.0.0',
"annotations" : "androidx.annotation:annotation:1.0.0",
"recyclerview-v7" : "androidx.recyclerview:recyclerview:1.0.0",
"constraint-layout" : 'androidx.constraintlayout:constraintlayout:1.1.3',
"constraint-layout" : 'androidx.constraintlayout:constraintlayout:2.0.1',
//network
"retrofit" : "com.squareup.retrofit2:retrofit:${version["retrofitSdkVersion"]}",
......@@ -199,7 +201,7 @@ ext {
"androideventbus" : "org.simple:androideventbus:1.0.5.1",
"otto" : "com.squareup:otto:1.3.8",
"gson" : "com.google.code.gson:gson:2.8.5",
"aliyun" : "com.aliyun.openservices:aliyun-log-android-sdk:2.5.13",
"aliyun" : "com.aliyun.openservices:aliyun-log-android-sdk:2.5.13",
"javax.annotation" : "javax.annotation:jsr250-api:1.0",
"arouter" : "com.alibaba:arouter-api:1.4.1",
"progressmanager" : "me.jessyan:progressmanager:1.5.0",
......@@ -231,7 +233,7 @@ ext {
"androidanimations" : "com.daimajia.androidanimations:library:2.3@aar",
//友盟统计
"umeng-common" : "com.umeng.umsdk:common:9.3.8",
"umeng-asms" :"com.umeng.umsdk:asms:1.2.2",
"umeng-asms" : "com.umeng.umsdk:asms:1.2.2",
//友盟社会化分享
"umeng-share-core" : "com.umeng.umsdk:share-core:7.1.4",
"umeng-share-qq" : "com.umeng.umsdk:share-qq:7.1.4",
......@@ -280,6 +282,7 @@ ext {
"ydl-webview" : "com.ydl:ydl-webview:${ydlCompileVersion["ydl-webview"]}@aar",
"ydl-media" : "com.ydl:ydl-media:${ydlCompileVersion["ydl-media"]}@aar",
"ydl-pay" : "com.ydl:ydl-pay:${ydlCompileVersion["ydl-pay"]}@aar",
"ydl-medical-pay" : "com.ydl:ydl-medical-pay:${ydlCompileVersion["ydl-medical-pay"]}@aar",
"m-audioim" : "com.ydl:m-audioim:${ydlCompileVersion["m-audioim"]}@aar",
//业务组件 <<--- 最后发这些(只发改过的)
......
......@@ -95,6 +95,7 @@ dependencies {
//开发时使用
api project(':ydl-webview')
api project(':ydl-platform')
implementation modularPublication('com.ydl:ydl-medical-pay')
implementation modularPublication('com.ydl:m-im-api')
implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-dynamic-api')
......@@ -102,6 +103,8 @@ dependencies {
implementation modularPublication('com.ydl:m-confide-api')
}else {
//发布时使用
compileOnly rootProject.ext.dependencies["ydl-medical-pay"]
compileOnly rootProject.ext.dependencies["ydl-m-im-api"]
compileOnly rootProject.ext.dependencies["ydl-m-user-api"]
compileOnly rootProject.ext.dependencies["ydl-m-dynamic-api"]
......
package com.yidianling.im.bean
data class DoctorInquIryIngInfoBean(
//问诊订单ID
val inquiryOrderId: String,
//问诊订单状态: 10:待支付、 20:待接诊、 30:待诊断(已接诊、问诊中)、40:已完成、50:已结束、60:已关闭
val status: Int,
//当前用户是否和医生在问诊中0不在问诊中、1在问诊中(问诊中状态包括待诊断和已完成)
val inquiryIng: Int,
//医生ID
val doctorId: String,
//用户ID
val userId: String
)
......@@ -2,6 +2,7 @@ package com.yidianling.im.http
import com.ydl.ydlcommon.base.config.YDL_DOMAIN
import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA_URL
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlcommon.data.http.BaseResponse
import com.ydl.ydlnet.YDLHttpUtils
......@@ -159,4 +160,14 @@ interface ImRetrofitApi {
@Query("ffrom_2") ffrom: String?,
@Query("naviType") naviType: String = "1"
): Observable<BaseAPIResponse<Long>>
//获取医生问诊状态
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA_URL, "Content-Type:application/json")
@GET("ydl-yiliao-api/api/client/inquiry/v1/getInquIryIngInfo")
fun getInquIryIngInfo(
@Query("doctorUid") doctorId: String,
@Query("userUid") userUid: String
): Observable<BaseAPIResponse<DoctorInquIryIngInfoBean>>
}
\ No newline at end of file
......@@ -60,6 +60,9 @@ import com.yidianling.im.session.extension.CustomAttachmentBusinessCard;
import com.yidianling.im.session.extension.CustomAttachmentConfirmOrder;
import com.yidianling.im.session.extension.CustomAttachmentEvaluate;
import com.yidianling.im.session.extension.CustomAttachmentFilter;
import com.yidianling.im.session.extension.CustomAttachmentInquiryEnd;
import com.yidianling.im.session.extension.CustomAttachmentInquiryReceive;
import com.yidianling.im.session.extension.CustomAttachmentInquiryStart;
import com.yidianling.im.session.extension.CustomAttachmentJumpToDaoYi;
import com.yidianling.im.session.extension.CustomAttachmentOrderAlreadyDone;
import com.yidianling.im.session.extension.CustomAttachmentOrderStatus;
......@@ -89,6 +92,9 @@ import com.yidianling.im.session.viewholder.MsgViewHolderCustomTip;
import com.yidianling.im.session.viewholder.MsgViewHolderCustomerServiceCard;
import com.yidianling.im.session.viewholder.MsgViewHolderDefCustom;
import com.yidianling.im.session.viewholder.MsgViewHolderEvaluate;
import com.yidianling.im.session.viewholder.MsgViewHolderInquiryEnd;
import com.yidianling.im.session.viewholder.MsgViewHolderInquiryStart;
import com.yidianling.im.session.viewholder.MsgViewHolderInquiryreceive;
import com.yidianling.im.session.viewholder.MsgViewHolderJumpToDaoYi;
import com.yidianling.im.session.viewholder.MsgViewHolderLingXiJumpConfideList;
import com.yidianling.im.session.viewholder.MsgViewHolderLingxiAnswerQuestion;
......@@ -287,9 +293,9 @@ public class SessionHelper {
actions.add(new OrderAction());
}
//跟ios同步,助理也不展示帮助按钮
if (ImIn.INSTANCE.getUserInfo().getUser_type() != 3) {
actions.add(new HelpAction());
}
// if (ImIn.INSTANCE.getUserInfo().getUser_type() != 3) {
// actions.add(new HelpAction());
// }
if (user_type == 2) {
actions.add(new RedPacketAction());
......@@ -477,7 +483,9 @@ public class SessionHelper {
NimUIKit.registerMsgItemViewHolder(CustomAttachLingxiAnswerQuestion.class, MsgViewHolderLingxiAnswerQuestion.class);//灵犀2.0-回答问题
NimUIKit.registerMsgItemViewHolder(CustomAttachLingxiFirstQuestion.class, MsgViewHolderLingxiFirstQuestion.class);//灵犀2.0-首问语
NimUIKit.registerMsgItemViewHolder(CustomAttachLingXiJumpConfideList.class, MsgViewHolderLingXiJumpConfideList.class);//灵犀2.0-倾诉列表
NimUIKit.registerMsgItemViewHolder(CustomAttachmentInquiryReceive.class, MsgViewHolderInquiryreceive.class);//接诊通知
NimUIKit.registerMsgItemViewHolder(CustomAttachmentInquiryStart.class, MsgViewHolderInquiryStart.class);//问诊订单接诊通知消息提醒类型
NimUIKit.registerMsgItemViewHolder(CustomAttachmentInquiryEnd.class, MsgViewHolderInquiryEnd.class);//问诊订单结束通知消息提醒类型
}
......
......@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.netease.nimlib.sdk.msg.attachment.MsgAttachment;
import com.netease.nimlib.sdk.msg.attachment.MsgAttachmentParser;
import com.ydl.ydlcommon.utils.LogUtil;
/**
* Created by zhoujianghua on 2015/4/9.
......@@ -21,12 +20,22 @@ public class CustomAttachParser implements MsgAttachmentParser {
JSONObject object = JSON.parseObject(json);
int type = object.getInteger(KEY_TYPE);
JSONObject data = object.getJSONObject(KEY_DATA);
// switch (type) {
// case CustomAttachmentType.Guess:
//// attachment = new GuessAttachment();
// break;
attachment = new CustomAttachmentFilter();
switch (type) {
//接诊通知
case CustomAttachmentType.TYPE_INQUIRY_RECEIVE:
attachment = new CustomAttachmentInquiryReceive();
break;
case CustomAttachmentType.TYPE_INQUIRY_START:
attachment = new CustomAttachmentInquiryStart();
break;
case CustomAttachmentType.TYPE_INQUIRY_END:
attachment = new CustomAttachmentInquiryEnd();
break;
//// case CustomAttachmentType.SnapChat:
//// return new SnapChatAttachment(data);
// return new SnapChatAttachment(data);
//// case CustomAttachmentType.Sticker:
//// attachment = new StickerAttachment();
//// break;
......@@ -159,16 +168,16 @@ public class CustomAttachParser implements MsgAttachmentParser {
// case CustomAttachmentType.TYPE_LINGXI_FIRST_QUESTION: //首问语
// attachment = new CustomAttachLingxiFirstQuestion();
// break;
// default:
// attachment = new DefaultCustomAttachment();
// break;
// }
attachment = new CustomAttachmentFilter();
default:
// attachment = new CustomAttachmentFilter();
break;
}
if (attachment != null) {
attachment.fromJson(data);
}
} catch (Exception e) {
e.printStackTrace();
}
return attachment;
......
package com.yidianling.im.session.extension;
import com.alibaba.fastjson.JSONObject;
/**
* 问诊结束通知 消息bean
*/
public class CustomAttachmentInquiryEnd extends CustomAttachment {
private static final String KEY_FROM_ORDERID = "inquiryOrderId";
private static final String KEY_FROM_CONTENT = "userContent";
private String from_orderid = "";
private String from_content = "";
public CustomAttachmentInquiryEnd() {
super(CustomAttachmentType.TYPE_INQUIRY_END);
}
@Override
protected void parseData(JSONObject data) {
from_orderid = data.getString(KEY_FROM_ORDERID);
from_content = data.getString(KEY_FROM_CONTENT);
}
@Override
protected JSONObject packData() {
JSONObject data = new JSONObject();
data.put(KEY_FROM_ORDERID, from_orderid);
data.put(KEY_FROM_CONTENT, from_content);
return data;
}
public String getFromOrderid() {
return from_orderid;
}
public String getFromContent() {
return from_content;
}
}
package com.yidianling.im.session.extension;
import com.alibaba.fastjson.JSONObject;
/**
* 接诊通知 消息bean
*/
public class CustomAttachmentInquiryReceive extends CustomAttachment {
private static final String KEY_FROM_ORDERID = "inquiryOrderId";
private static final String KEY_FROM_MAINSUIT = "mainSuit";
private static final String KEY_FROM_NAME = "name";
private static final String KEY_FROM_GENDERNAME = "genderName";
private static final String KEY_FROM_AGE = "age";
private String from_orderid = "";
private String from_mainSuit = "";
private String from_name = "";
private String from_genderName = "";
private String from_age = "";
public CustomAttachmentInquiryReceive() {
super(CustomAttachmentType.TYPE_INQUIRY_RECEIVE);
}
@Override
protected void parseData(JSONObject data) {
from_orderid = data.getString(KEY_FROM_ORDERID);
from_mainSuit = data.getString(KEY_FROM_MAINSUIT);
from_name = data.getString(KEY_FROM_NAME);
from_genderName = data.getString(KEY_FROM_GENDERNAME);
from_age = data.getString(KEY_FROM_AGE);
}
@Override
protected JSONObject packData() {
JSONObject data = new JSONObject();
data.put(KEY_FROM_ORDERID, from_orderid);
data.put(KEY_FROM_MAINSUIT, from_mainSuit);
data.put(KEY_FROM_NAME, from_name);
data.put(KEY_FROM_GENDERNAME, from_genderName);
data.put(KEY_FROM_AGE, from_age);
return data;
}
public String getKeyFromOrderid() {
return from_orderid;
}
public String getKeyFromMainsuit() {
return from_mainSuit;
}
public String getKeyFromName() {
return from_name;
}
public String getFrom_genderName() {
return from_genderName;
}
public String getKeyFromAge() {
return from_age;
}
}
package com.yidianling.im.session.extension;
import com.alibaba.fastjson.JSONObject;
/**
* 问诊结束通知 消息bean
*/
public class CustomAttachmentInquiryStart extends CustomAttachment {
private static final String KEY_FROM_ORDERID = "inquiryOrderId";
private static final String KEY_FROM_CONTENT = "content";
private String from_orderid = "";
private String from_content = "";
public CustomAttachmentInquiryStart() {
super(CustomAttachmentType.TYPE_INQUIRY_START);
}
@Override
protected void parseData(JSONObject data) {
from_orderid = data.getString(KEY_FROM_ORDERID);
from_content = data.getString(KEY_FROM_CONTENT);
}
@Override
protected JSONObject packData() {
JSONObject data = new JSONObject();
data.put(KEY_FROM_ORDERID, from_orderid);
data.put(KEY_FROM_CONTENT, from_content);
return data;
}
public String getFromOrderid() {
return from_orderid;
}
public String getFromContent() {
return from_content;
}
}
......@@ -35,26 +35,30 @@ public interface CustomAttachmentType {
int TYPE_CUSTOMER_SERVICE = 31; //客服名片
int TYPE_CUSTOMER_CONSULT_CALL_STATUS = 32; //咨询的声网拨打状态的自定义消息
int ASSISTANT_RECEIVEDMONEY = 33;//发起收款
int TYPE_EXPERT_DETAIL_CARD=34;//专家名片
int TYPE_JUMPTO_DAOYI=35;//跳转导医聊天界面
int TYPE_SWITCH_KEFU_TIPS=40;//客服切换第一次提示语
int TYPE_EXPERT_DETAIL_CARD = 34;//专家名片
int TYPE_JUMPTO_DAOYI = 35;//跳转导医聊天界面
int TYPE_SWITCH_KEFU_TIPS = 40;//客服切换第一次提示语
int TYPE_CONFIRM_ORDER=38;//确认订单
int TYPE_ORDER_ALREADY_DONE=39;//已完成订单
int TYPE_CONFIRM_ORDER = 38;//确认订单
int TYPE_ORDER_ALREADY_DONE = 39;//已完成订单
//需要过滤掉的消息
int TYPE_FILTER_41=41;//客服切换过滤41
int TYPE_FILTER_42=42;//客服切换过滤42
int TYPE_FILTER_61=61;
int TYPE_FILTER_70=70;
int TYPE_FILTER_71=71;
int TYPE_FILTER_80=80;//隐藏80的消息
int TYPE_FILTER_41 = 41;//客服切换过滤41
int TYPE_FILTER_42 = 42;//客服切换过滤42
int TYPE_FILTER_61 = 61;
int TYPE_FILTER_70 = 70;
int TYPE_FILTER_71 = 71;
int TYPE_FILTER_80 = 80;//隐藏80的消息
//灵犀2.0问诊数据
int TYPE_LINGXI_FIRST_QUESTION=50;//首问语
int TYPE_LINGXI_WHICH_QUESTION=55;//试卷消息
int TYPE_LINGXI_ANSWER_QUESTION=56;//回答消息
int TYPE_LINGXI_TEST_QUESTION=60;//测评结果
int TYPE_LINGXI_FIRST_QUESTION = 50;//首问语
int TYPE_LINGXI_WHICH_QUESTION = 55;//试卷消息
int TYPE_LINGXI_ANSWER_QUESTION = 56;//回答消息
int TYPE_LINGXI_TEST_QUESTION = 60;//测评结果
int TYPE_LINGXI_JUMP_CONFIDE_LIST = 73; // 跳转倾诉列表
//医疗 消息类型
int TYPE_INQUIRY_RECEIVE = 81;//接诊通知
int TYPE_INQUIRY_START = 82;//问诊订单接诊通知消息提醒类型
int TYPE_INQUIRY_END = 83;//问诊订单结束通知消息提醒类型
}
package com.yidianling.im.session.viewholder
import android.widget.TextView
import com.yidianling.im.R
import com.yidianling.im.session.extension.CustomAttachmentInquiryEnd
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase
/**
* 接诊通知 消息 页面
*/
class MsgViewHolderInquiryEnd(adapter: BaseMultiItemFetchLoadAdapter<*, *>?) :
MsgViewHolderBase(adapter) {
private var content: TextView? = null
var itemBean: CustomAttachmentInquiryEnd? = null
override fun getContentResId(): Int {
return R.layout.im_nim_inquiry_end_layout
}
override fun inflateContentView() {
content = findViewById(R.id.content)
}
override fun bindContentView() {
itemBean = message.attachment as CustomAttachmentInquiryEnd
content?.text = itemBean!!.fromContent
hideItemBg()
setAvatarRightInVisibity()
setAvatarLeftInVisibity()
}
}
\ No newline at end of file
package com.yidianling.im.session.viewholder
import android.widget.TextView
import com.yidianling.im.R
import com.yidianling.im.session.extension.CustomAttachmentInquiryEnd
import com.yidianling.im.session.extension.CustomAttachmentInquiryStart
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase
/**
* 接诊通知 消息 页面
*/
class MsgViewHolderInquiryStart(adapter: BaseMultiItemFetchLoadAdapter<*, *>?) :
MsgViewHolderBase(adapter) {
private var content: TextView? = null
var itemBean: CustomAttachmentInquiryStart? = null
override fun getContentResId(): Int {
return R.layout.im_nim_inquiry_end_layout
}
override fun inflateContentView() {
content = findViewById(R.id.content)
}
override fun bindContentView() {
itemBean = message.attachment as CustomAttachmentInquiryStart
content?.text = itemBean!!.fromContent
hideItemBg()
setAvatarRightInVisibity()
setAvatarLeftInVisibity()
}
}
\ No newline at end of file
package com.yidianling.im.session.viewholder
import android.view.View
import android.widget.TextView
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.config.HttpConfig
import com.yidianling.im.R
import com.yidianling.im.session.extension.CustomAttachmentInquiryReceive
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase
/**
* 接诊结束 消息 页面
*/
class MsgViewHolderInquiryreceive(adapter: BaseMultiItemFetchLoadAdapter<*, *>?) :
MsgViewHolderBase(adapter) {
private var name: TextView? = null
private var gender_name: TextView? = null
private var age: TextView? = null
private var mainSuit: TextView? = null
private var item: View? = null
var itemBean: CustomAttachmentInquiryReceive? = null
override fun getContentResId(): Int {
return R.layout.im_nim_inquiry_receive_layout
}
override fun inflateContentView() {
name = findViewById(R.id.name)
gender_name = findViewById(R.id.gender_name)
age = findViewById(R.id.age)
mainSuit = findViewById(R.id.mainSuit)
item = findViewById(R.id.item)
}
override fun bindContentView() {
itemBean = message.attachment as CustomAttachmentInquiryReceive
name?.text = itemBean!!.keyFromName
gender_name?.text = itemBean!!.from_genderName
age?.text = itemBean!!.keyFromAge
mainSuit?.text = itemBean!!.keyFromMainsuit
item?.setOnClickListener { view: View? ->
NewH5Activity.start(
view!!.context, H5Params(
"${HttpConfig.MEDICAL_H5URL}ct/orderDetails?orderId=${itemBean?.keyFromOrderid}&hideNavBar=1",
null
)
)
}
hideItemBg()
}
}
\ No newline at end of file
......@@ -14,15 +14,28 @@ import com.luck.picture.lib.listener.OnResultCallbackListener
import com.ydl.ydlcommon.actions.imagepicker.YDLImagePicker.startPicker
import com.ydl.ydlcommon.adapter.custom.PublishImageAdapter
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.router.YdlCommonOut.Companion.showToast
import com.ydl.ydlcommon.ui.ParcelableImage
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.view.dialog.NormalDialog
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R
import com.yidianling.medical.pic.MedicalBrowsePicturesActivity
import com.yidianling.medical.pic.MedicalDynamicConstants
import com.yidianling.uikit.custom.http.ServiceImpl
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.im_ui_system_msg_item.*
import kotlinx.android.synthetic.main.medical_graphic_consultation_flow1.*
import kotlinx.coroutines.*
import okhttp3.MediaType
import okhttp3.RequestBody
import java.io.File
import java.lang.Runnable
import java.util.*
/**
......@@ -42,12 +55,15 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
private var publishTrendImgBrows = ArrayList<ParcelableImage>()
private var PUBLISH_PIC_BROW = 21009
private lateinit var mDoctorId: String
private lateinit var mDoctorUid: String
private lateinit var imageAdapter: PublishImageAdapter
private var imgFiles: ArrayList<File>? = null
@JvmStatic
fun start(context: Context, doctorId: String) {
fun start(context: Context, doctorId: String,doctorUid:String) {
val starter = Intent(context, GraphicConsultationFlow1Activity::class.java)
.putExtra("doctorId", doctorId)
.putExtra("doctorUid", doctorUid)
context.startActivity(starter)
}
}
......@@ -59,6 +75,7 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
override fun initDataAndEvent() {
initStatus()
mDoctorId = intent.getStringExtra("doctorId")
mDoctorUid = intent.getStringExtra("doctorUid")
imageAdapter =
PublishImageAdapter(publishTrendImgs, this@GraphicConsultationFlow1Activity);
......@@ -81,16 +98,36 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
}
}
text_service.setOnClickListener {
if (edit_input.text.length < 10) {
ToastUtil.toastShort("请最少填写10个字")
if (Utils.isFastClick()) {
//防止连击
return@setOnClickListener
} else {
//下一步
GraphicConsulttionFlow2Activity.start(
this@GraphicConsultationFlow1Activity,
edit_input.text.toString(), "", mDoctorId
)
}
if (edit_input.text.length < 10) {
ToastUtil.toastShort("请最少填写10个字")
return@setOnClickListener
} else {
if (publishTrendImgs.size > 0) {
var scope = CoroutineScope(Dispatchers.Default + Job())
scope.launch {
val publishImgs: MutableList<ParcelableImage> = ArrayList()
publishImgs.addAll(publishTrendImgs)
if (publishTrendImgs.size > 0) {
if ("default" == publishTrendImgs[0].image_url) {
publishImgs.removeAt(0)
}
}
upFile(publishImgs)
}
} else {
//下一步
GraphicConsulttionFlow2Activity.start(
this@GraphicConsultationFlow1Activity,
edit_input.text.toString(), "", mDoctorId, mDoctorUid
)
}
}
}
edit_input.addTextChangedListener(object : TextWatcher {
......@@ -123,6 +160,121 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
}
@SuppressLint("CheckResult")
private fun upFile(publishTrendImgs: MutableList<ParcelableImage>) {
imgFiles = ArrayList<File>()
Observable.fromIterable(publishTrendImgs)
.subscribeOn(Schedulers.io())
.map<File> { parcelableImage: ParcelableImage ->
LogUtil.d("url: " + parcelableImage.image_url)
DealFile2(parcelableImage.image_url, 1500 / publishTrendImgs.size)
}.subscribe { file ->
if (file != null) {
LogUtil.d(
"xyutest",
"图片压缩后大小: ==>" + file.length() + " file path: " + file.absolutePath
)
imgFiles?.add(file);
if (imgFiles!!.size == publishTrendImgs.size) {
upFileByNet(imgFiles)
}
} else {
runOnUiThread(Runnable() {
kotlin.run {
YdlCommonOut.Companion.showToast("有图片已被删除");
}
})
}
};
}
@SuppressLint("CheckResult")
private fun upFileByNet(imgFiles: ArrayList<File>?) {
val scope = CoroutineScope(Dispatchers.Default + Job())
scope.launch {
var files: Array<File?>? = null
if (imgFiles != null) {
files = arrayOfNulls(imgFiles.size)
for (i in imgFiles.indices) {
files[i] = imgFiles[i]
}
}
var map = TreeMap<String, RequestBody>()
if (files != null && files.isNotEmpty()) {
if (files.size == 1) {
if (files[0] != null) {
val fileBody =
RequestBody.create(MediaType.parse("multipart/form-data"), files[0]);
map["FILE" + "\"; filename=\"" + files[0]?.name + ""] = fileBody;
}
} else {
for (index in files.indices) {
if (files[index] != null) {
val fileBody = RequestBody.create(
MediaType.parse("multipart/form-data"),
files[index]
)
map["FILE" + index + "\"; filename=\"" + files[index]?.name + ""] =
fileBody
}
}
}
}
ServiceImpl.instance.uploadBatch(map)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ response ->
if ("200" == response.code) {
val scope = CoroutineScope(Dispatchers.Default + Job())
scope.launch {
var fileStr = StringBuilder("")
for (file in response.data) {
if (file.upload) {
if (fileStr.isEmpty()) {
fileStr.append(file.url)
} else {
fileStr.append(",${file.url}")
}
}
}
//下一步
GraphicConsulttionFlow2Activity.start(
this@GraphicConsultationFlow1Activity,
edit_input.text.toString(), fileStr.toString(), mDoctorId,mDoctorUid
)
}
ToastUtil.toastShort("成功")
} else {
ToastUtil.toastShort(response.msg)
}
}, { e ->
ToastUtil.toastShort(e.message)
e.printStackTrace()
})
}
}
@Synchronized
private fun DealFile2(path: String, size: Int): File? {
var deal_file: File? = null
deal_file = MedicalImageCompress.scal(this@GraphicConsultationFlow1Activity, path, size)
try {
Thread.sleep(100)
} catch (e: InterruptedException) {
e.printStackTrace()
}
return deal_file
}
private fun backCheck() {
val builder = NormalDialog.Builder(this@GraphicConsultationFlow1Activity, "center", true)
builder.setTitle("")
......@@ -323,4 +475,5 @@ class GraphicConsultationFlow1Activity : BaseActivity() {
StatusBarUtils.setTransparentForImageView(this@GraphicConsultationFlow1Activity, null)
StatusBarUtils.statusBarLightMode(this@GraphicConsultationFlow1Activity)
}
}
\ No newline at end of file
......@@ -5,13 +5,17 @@ import android.content.Context
import android.content.Intent
import android.view.View
import androidx.recyclerview.widget.GridLayoutManager
import com.medical.ydl.medical.pay.MedicalPayActivity
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.Utils
import com.ydl.ydlcommon.view.dialog.NormalDialog
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R
import com.yidianling.medical.archives.MedicalAddNewArchivesActivity
import com.yidianling.medical.archives.adapter.MedicalUserArchivesFlow2Adapter
import com.yidianling.medical.archives.bean.MedicalArchivesListBean
import com.yidianling.medical.popwindow.InformedConsentPopupWindow
import com.yidianling.uikit.custom.http.ServiceImpl
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
......@@ -31,9 +35,11 @@ class GraphicConsulttionFlow2Activity : BaseActivity() {
lateinit var stringExtra: String
lateinit var fileStrExtra: String
lateinit var doctorIdStrExtra: String
lateinit var doctorUidStrExtra: String
private lateinit var mAdapter: MedicalUserArchivesFlow2Adapter
private var mList = ArrayList<MedicalArchivesListBean>()
private var isFirstLoadData = true
private var mFlow1Activity: BaseActivity? = null
//是否是首次问诊
private var isFirst = -1
......@@ -44,11 +50,13 @@ class GraphicConsulttionFlow2Activity : BaseActivity() {
* @param fileStr 图片拼接字符串
* */
@JvmStatic
fun start(context: Context, inputText: String, fileStr: String, doctorId: String) {
fun start(context: Context, inputText: String, fileStr: String, doctorId: String,doctorUid:String) {
mFlow1Activity = context as BaseActivity
val starter = Intent(context, GraphicConsulttionFlow2Activity::class.java)
.putExtra("inputText", inputText)
.putExtra("fileStr", fileStr)
.putExtra("doctorId", doctorId)
.putExtra("doctorUid", doctorUid)
context.startActivity(starter)
}
}
......@@ -62,6 +70,7 @@ class GraphicConsulttionFlow2Activity : BaseActivity() {
stringExtra = intent.getStringExtra("inputText")
fileStrExtra = intent.getStringExtra("fileStr")
doctorIdStrExtra = intent.getStringExtra("doctorId")
doctorUidStrExtra = intent.getStringExtra("doctorUid")
mAdapter = MedicalUserArchivesFlow2Adapter()
rv_people_list.layoutManager = GridLayoutManager(this@GraphicConsulttionFlow2Activity, 3)
......@@ -104,18 +113,61 @@ class GraphicConsulttionFlow2Activity : BaseActivity() {
}
text_service.setOnClickListener {
if (Utils.isFastClick()) {
//防止连击
return@setOnClickListener
}
//保存
toSave()
}
iv_back_flow2.setOnClickListener {
backCheck()
}
iv_back_flow2.setOnClickListener { finish() }
informed_consent_text.setOnClickListener {
//协议内容
var collectOutPop = InformedConsentPopupWindow(this)
collectOutPop?.contentView!!.measure(
View.MeasureSpec.UNSPECIFIED,
View.MeasureSpec.UNSPECIFIED
); //这句代码必须要才能获得正确的popupwindow的宽度
val popupWindowWidth = collectOutPop?.contentView!!.measuredWidth
collectOutPop?.showAsDropDown(
toolbar,
-(popupWindowWidth - toolbar.measuredWidth + 20),
0
)
}
getList()
}
private fun backCheck() {
val builder = NormalDialog.Builder(this@GraphicConsulttionFlow2Activity, "center", true)
builder.setTitle("")
builder.setMessage("\n仅剩一步就可抢到医生的问诊名额,确认放弃吗?\n")
builder.setPositiveButton(
"继续填写"
) { dialog, which ->
dialog.dismiss()
}.setNegativeButton(
"放弃填写"
) { dialog, which ->
//关闭页面
finish()
dialog.dismiss()
}
builder.setRight_color("#3464EC")
builder.setLeft_color("#8595A9")
builder.setContent_color("#10233A")
builder.create().show()
}
/**
* 生成图文订单
* */
......@@ -160,14 +212,23 @@ class GraphicConsulttionFlow2Activity : BaseActivity() {
.subscribe({ response ->
mList.clear()
if ("200" == response.code) {
ToastUtil.toastShort("成功")
MedicalPayActivity.start(
this@GraphicConsulttionFlow2Activity,
response.data.payAmountStr,
response.data.inquiryOrderId,
doctorUidStrExtra
)
mFlow1Activity?.finish()
finish()
} else {
ToastUtil.toastShort("创建订单失败")
ToastUtil.toastShort(response.msg)
}
}, { e ->
e.printStackTrace()
ToastUtil.toastShort("创建订单失败")
e.printStackTrace()
})
}
}
......@@ -188,8 +249,8 @@ class GraphicConsulttionFlow2Activity : BaseActivity() {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ response ->
mList.clear()
if ("200" == response.code) {
mList.clear()
var data = response.data
if (data.size < 8) {
mList = data as ArrayList<MedicalArchivesListBean>
......@@ -214,4 +275,8 @@ class GraphicConsulttionFlow2Activity : BaseActivity() {
StatusBarUtils.statusBarLightMode(this@GraphicConsulttionFlow2Activity)
}
override fun onBackPressed() {
backCheck()
}
}
\ No newline at end of file
package com.yidianling.medical
data class MedicalFileBeanRespose(
var index: Int,
var upload: Boolean,
var url: String
)
package com.yidianling.medical;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Environment;
import android.util.Log;
import androidx.fragment.app.FragmentActivity;
import com.miracle.view.imageeditor.utils.FileUtils;
import com.yidianling.common.tools.RxFileTool;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class MedicalImageCompress {
public static File createImageFile() throws IOException {
// Create an image file name
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
String imageFileName = "JPEG_" + timeStamp + "_";
File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
File image = File.createTempFile(imageFileName, /* prefix */
".jpg", /* suffix */
storageDir /* directory */
);
return image;
}
public static File scal(FragmentActivity activity, String path, int size) {
// String path = fileUri.getPath();
File outputFile = FileUtils.INSTANCE.getFileByUri(activity,path);
if (!outputFile.exists()){
return null;
}
long fileSize = outputFile.length();
final long fileMaxSize = size * 1024;
if (fileSize >= fileMaxSize) {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeFile(path, options);
int height = options.outHeight;
int width = options.outWidth;
double scale = Math.sqrt((float) fileSize / fileMaxSize);
options.outHeight = (int) (height / scale);
options.outWidth = (int) (width / scale);
options.inSampleSize = (int) (scale + 0.5);
options.inJustDecodeBounds = false;
Bitmap bitmap = BitmapFactory.decodeFile(path, options);
outputFile = new File(MedicalPhotoUtil.createImageFile().getPath());
FileOutputStream fos = null;
try {
fos = new FileOutputStream(outputFile);
bitmap.compress(Bitmap.CompressFormat.JPEG, 50, fos);
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
Log.d("", "sss ok " + outputFile.length());
if (!bitmap.isRecycled()) {
bitmap.recycle();
} else {
File tempFile = outputFile;
outputFile = new File(MedicalPhotoUtil.createImageFile().getPath());
MedicalPhotoUtil.copyFileUsingFileChannels(tempFile, outputFile);
}
}
return outputFile;
}
public static File scaln(String path, int size) {
// String path = fileUri.getPath();
File outputFile = new File(path);
// long fileSize = outputFile.length();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Bitmap imagebm = BitmapFactory.decodeFile(path);
imagebm.compress(Bitmap.CompressFormat.JPEG, 100, baos);
// final long fileMaxSize = size * 1024;
// 质量压缩方法,这里100表示不压缩,把压缩后的数据存放到baos中
int options = 100;
while (baos.toByteArray().length / 1024 > size) {
// 循环判断如果压缩后图片是否大于100kb,大于继续压缩
baos.reset();// 重置baos即清空baos
imagebm.compress(Bitmap.CompressFormat.JPEG, options, baos);
// 这里压缩options%,把压缩后的数据存放到baos中
options -= 10;// 每次都减少10
if (options <= 0) {
break;
}
}
ByteArrayInputStream isBm = new ByteArrayInputStream(baos.toByteArray());
// 把压缩后的数据baos存放到ByteArrayInputStream中
// 把ByteArrayInputStream数据生成图片
imagebm = BitmapFactory.decodeStream(isBm, null, null);
FileOutputStream fos = null;
try {
fos = new FileOutputStream(outputFile);
imagebm.compress(Bitmap.CompressFormat.JPEG, 50, fos);
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
if (!imagebm.isRecycled()) {
imagebm.recycle();
} else {
File tempFile = outputFile;
outputFile = new File(MedicalPhotoUtil.createImageFile().getPath());
MedicalPhotoUtil.copyFileUsingFileChannels(tempFile, outputFile);
}
return outputFile;
}
public static File scaln2(String path, int size) {
Bitmap bm = BitmapFactory.decodeFile(path);
bm=cQuality(bm,size);
File outputFile = null;
try {
outputFile = SaveBitmap(bm,path);
} catch (IOException e) {
e.printStackTrace();
}
return outputFile;
}
public static File SaveBitmap(Bitmap mBitmap, String path) throws IOException {
File file;
RxFileTool.fileExists(path);
File f = new File(path);
try {
f.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
FileOutputStream fOut = null;
try {
fOut = new FileOutputStream(f);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
mBitmap.compress(Bitmap.CompressFormat.PNG, 100, fOut);
fOut.flush();
fOut.close();
file=new File(path);
return file;
}
/**
* 根据bitmap压缩图片质量
*
* @param bitmap 未压缩的bitmap
* @return 压缩后的bitmap
*/
public static Bitmap cQuality(Bitmap bitmap,int size) {
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
int beginRate = 100;
//第一个参数 :图片格式 ,第二个参数: 图片质量,100为最高,0为最差 ,第三个参数:保存压缩后的数据的流
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bOut);
while (bOut.size() / 1024 / 1024 > size) { //如果压缩后大于100Kb,则提高压缩率,重新压缩
beginRate -= 10;
bOut.reset();
bitmap.compress(Bitmap.CompressFormat.JPEG, beginRate, bOut);
}
ByteArrayInputStream bInt = new ByteArrayInputStream(bOut.toByteArray());
Bitmap newBitmap = BitmapFactory.decodeStream(bInt);
if (newBitmap != null) {
return newBitmap;
} else {
return bitmap;
}
}
}
package com.yidianling.medical;
import android.net.Uri;
import android.os.Environment;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.channels.FileChannel;
import java.text.SimpleDateFormat;
import java.util.Date;
public class MedicalPhotoUtil {
/**
* 一切都操作uri
* @return
*/
public static Uri createImageFile(){
// Create an image file name
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
String imageFileName = "JPEG_" + timeStamp + "_";
File storageDir = Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_PICTURES);
File image = null;
try {
image = File.createTempFile(
imageFileName, /* prefix */
".jpg", /* suffix */
storageDir /* directory */
);
} catch (IOException e) {
e.printStackTrace();
}
// Save a file: path for use with ACTION_VIEW intents
return Uri.fromFile(image);
}
public static void copyFileUsingFileChannels(File source, File dest){
FileChannel inputChannel = null;
FileChannel outputChannel = null;
try {
try {
inputChannel = new FileInputStream(source).getChannel();
outputChannel = new FileOutputStream(dest).getChannel();
outputChannel.transferFrom(inputChannel, 0, inputChannel.size());
} catch (IOException e) {
e.printStackTrace();
}
} finally {
try {
inputChannel.close();
outputChannel.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
package com.yidianling.medical.archives.bean
data class CreateArchivesRespose(
var inquiryOrderId: String,
var inquiryOrderNo: String,
var orderAmount: Int,
var orderAmountStr: String,
var payAmount: String,
var payAmountStr: String
)
......@@ -3,15 +3,12 @@ package com.yidianling.medical.im.view
import android.content.Context
import android.text.Html
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.RelativeLayout
import com.ydl.ydl_image.module.GlideApp
import com.yidianling.im.R
import com.yidianling.im.helper.MsgReceiveHelper
import com.yidianling.im.preference.ImTempData
import com.yidianling.im.ui.page.fragment.bean.ChatItemBean
import kotlinx.android.synthetic.main.im_chat_item_view.view.*
import kotlinx.android.synthetic.main.medical_im_chat_item_view.view.*
/**
* 互动列表普通itemView
......@@ -41,26 +38,6 @@ class MedicalChatItemView(mContext: Context) : LinearLayout(mContext) {
chat_message_tab.visibility = View.GONE
}
// 咨询优先显示 再倾诉
when {
bean.orderStatus == 1 -> {
chat_message_sub_desc.visibility = View.VISIBLE
chat_message_sub_desc.text = "咨询服务中"
}
bean.listenOrderStatus == 1 -> {
chat_message_sub_desc.visibility = View.VISIBLE
chat_message_sub_desc.text = "倾诉服务中"
}
bean.orderCount != 0 -> {
chat_message_sub_desc.visibility = View.VISIBLE
chat_message_sub_desc.text = "已咨询${bean.orderCount}次"
}
bean.listenOrderCount != 0 -> {
chat_message_sub_desc.visibility = View.VISIBLE
chat_message_sub_desc.text = "已倾诉${bean.listenOrderCount}次"
}
else -> chat_message_sub_desc.visibility = View.GONE
}
chat_message_time.text = bean.timeStr
if (ImTempData.getInstance().getTempMsg(bean.toUid.toString()) != null && ImTempData.getInstance().getTempMsg(
......
package com.yidianling.medical.popwindow
import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import android.widget.PopupWindow
import com.yidianling.im.R
import kotlinx.android.synthetic.main.medical_informed_dialog_layout.view.*
/**
* Created by xj on 2019/10/14.
*/
class InformedConsentPopupWindow(context: Context) :
PopupWindow(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT) {
init {
val view =
LayoutInflater.from(context).inflate(R.layout.medical_informed_dialog_layout, null)
this.contentView = view
this.isFocusable = true
this.isOutsideTouchable = true
view.close.setOnClickListener {
dismiss()
}
}
}
\ No newline at end of file
package com.yidianling.medical.popwindow
import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import android.widget.PopupWindow
import com.yidianling.im.R
import kotlinx.android.synthetic.main.medical_im_chat_popup_window.view.*
/**
* Created by xj on 2019/10/14.
*/
class MedicalChatSettingPopupWindow(
context: Context,
chatSettingClickListener: OnChatSettingClickListener?
) : PopupWindow(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT) {
init {
val view = LayoutInflater.from(context).inflate(R.layout.medical_im_chat_popup_window, null)
this.contentView = view
this.isFocusable = true
this.isOutsideTouchable = true
view.ll_all_read.setOnClickListener {
chatSettingClickListener?.onAllReadClick()
dismiss()
}
view.ll_chat_setting.setOnClickListener {
chatSettingClickListener?.onChatSettingClick()
dismiss()
}
setOnDismissListener {
chatSettingClickListener?.onDismissAction()
}
}
interface OnChatSettingClickListener {
fun onAllReadClick() //全部已读
fun onChatSettingClick() //消息设置
fun onDismissAction() //取消
}
}
\ No newline at end of file
......@@ -4,6 +4,8 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN
import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA_URL
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.yidianling.medical.MedicalFileBeanRespose
import com.yidianling.medical.archives.bean.CreateArchivesRespose
import com.yidianling.medical.archives.bean.MedicalArchivesListBean
import com.yidianling.medical.archives.bean.MedicalUserArchivesBean
import com.yidianling.uikit.custom.http.response.*
......@@ -11,6 +13,8 @@ import com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
import io.reactivex.Observable
import okhttp3.RequestBody
import retrofit2.http.*
import java.util.*
import kotlin.collections.ArrayList
/**
* Created by xj on 2019/6/26.
......@@ -136,10 +140,11 @@ interface ServiceApi {
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA_URL)
fun createArchives(@Body body: RequestBody): Observable<BaseAPIResponse<Any>>
//医疗 创建问诊
//医疗 创建问诊订单
@POST("ydl-yiliao-api/api/client/inquiry/v1/create")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA_URL)
fun createArchivesOrder(@Body body: RequestBody): Observable<BaseAPIResponse<Any>>
fun createArchivesOrder(@Body body: RequestBody): Observable<BaseAPIResponse<CreateArchivesRespose>>
//医疗 删除问诊人
@POST("ydl-yiliao-api/api/client/user/patient/v1/delete")
......@@ -147,4 +152,17 @@ interface ServiceApi {
fun deleteArchives(@Body body: RequestBody): Observable<BaseAPIResponse<Any>>
//上传文件,多文件批量上传
@POST("ydl-yiliao-api/api/client/common/v1/uploadBatch")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA_URL)
@Multipart
fun uploadBatch(@PartMap params: TreeMap<String, RequestBody>): Observable<BaseAPIResponse<List<MedicalFileBeanRespose>>>
//上传文件,单文件上传
@POST("ydl-yiliao-api/api/client/common/v1/upload")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA_URL)
fun upload(@PartMap params: TreeMap<String, RequestBody>): Observable<BaseAPIResponse<MedicalFileBeanRespose>>
}
\ No newline at end of file
......@@ -4,12 +4,19 @@ import com.alibaba.fastjson.JSON
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.im.http.ImRetrofitApi
import com.yidianling.medical.MedicalFileBeanRespose
import com.yidianling.medical.archives.bean.*
import com.yidianling.uikit.custom.http.response.*
import com.yidianling.uikit.custom.http.response.question.QuestionsInfoBean
import io.reactivex.Observable
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import okhttp3.MediaType
import okhttp3.RequestBody
import java.io.File
import java.util.*
/**
* Created by xj on 2019/6/26.
......@@ -233,7 +240,7 @@ class ServiceImpl private constructor() {
mainSuitDisease: String,
patientId: Int,
doctorId: String
): Observable<BaseAPIResponse<Any>> {
): Observable<BaseAPIResponse<CreateArchivesRespose>> {
val body = RequestBody.create(
MediaType.parse("application/json; charset=utf-8"),
JSON.toJSONString(
......@@ -244,7 +251,7 @@ class ServiceImpl private constructor() {
1,
mainSuitDisease,
mainSuit,
1
patientId
)
)
) as RequestBody
......@@ -268,4 +275,9 @@ class ServiceImpl private constructor() {
return YDLHttpUtils.obtainApi(ServiceApi::class.java).deleteArchives(body)
}
fun uploadBatch( map :TreeMap<String, RequestBody>): Observable<BaseAPIResponse<List<MedicalFileBeanRespose>>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java).uploadBatch(map)
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/platform_dp_12"
android:layout_marginRight="8dp"
android:background="#80d7dfea"
android:elevation="0dp"
android:maxWidth="263dp"
android:minWidth="263dp"
app:cardCornerRadius="8dp"
app:cardElevation="0dp">
<TextView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginTop="8dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="8dp"
android:text="本次诊断结束,如有问题可联系客服或再次向医生问诊"
android:textColor="#ff8595a9"
android:textSize="12sp" />
</androidx.cardview.widget.CardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="@dimen/platform_dp_12"
android:layout_marginRight="8dp"
android:background="@color/white"
android:maxWidth="263dp"
app:cardElevation="0dp"
android:elevation="0dp"
android:minWidth="263dp"
app:cardCornerRadius="8dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/platform_dp_12">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="图文问诊"
android:textColor="#ff0c1d31"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="基本信息:"
android:textColor="#ff8595a9"
android:textSize="16sp"
app:layout_constraintLeft_toLeftOf="@id/tv_title"
app:layout_constraintTop_toBottomOf="@id/tv_title" />
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:textColor="#ff0c1d31"
android:textSize="16sp"
app:layout_constraintBaseline_toBaselineOf="@id/tv_info"
app:layout_constraintLeft_toRightOf="@id/tv_info"
tools:text="何照" />
<View
android:id="@+id/name_right"
android:layout_width="1dp"
android:layout_height="12dp"
android:layout_marginStart="8dp"
android:background="@color/medical_color_c0c9d4"
app:layout_constraintBottom_toBottomOf="@id/name"
app:layout_constraintLeft_toRightOf="@id/name"
app:layout_constraintTop_toTopOf="@id/name" />
<TextView
android:id="@+id/gender_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:textColor="#ff0c1d31"
android:textSize="16sp"
app:layout_constraintBaseline_toBaselineOf="@id/tv_info"
app:layout_constraintLeft_toRightOf="@id/name_right"
tools:text="男" />
<View
android:id="@+id/gender_name_right"
android:layout_width="1dp"
android:layout_height="12dp"
android:layout_marginStart="8dp"
android:background="@color/medical_color_c0c9d4"
app:layout_constraintBottom_toBottomOf="@id/gender_name"
app:layout_constraintLeft_toRightOf="@id/gender_name"
app:layout_constraintTop_toTopOf="@id/gender_name" />
<TextView
android:id="@+id/age"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:textColor="#ff0c1d31"
android:textSize="16sp"
app:layout_constraintBaseline_toBaselineOf="@id/tv_info"
app:layout_constraintLeft_toRightOf="@id/gender_name_right"
tools:text="20岁" />
<TextView
android:id="@+id/tv_mainSuit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="问诊描述:"
android:textColor="#ff8595a9"
android:textSize="16sp"
app:layout_constraintLeft_toLeftOf="@id/tv_title"
app:layout_constraintTop_toBottomOf="@id/tv_info" />
<TextView
android:id="@+id/mainSuit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="#ff0c1d31"
android:textSize="16sp"
app:layout_constraintBaseline_toBaselineOf="@id/tv_mainSuit"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@id/tv_mainSuit"
app:layout_constraintRight_toRightOf="parent"
tools:text="经常紧张,全身紧绷,食欲不振,消化不良" />
<View
android:id="@+id/line_center"
android:layout_width="0dp"
android:layout_height="1px"
android:layout_marginTop="12dp"
android:background="@color/medical_color_c0c9d4"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_mainSuit" />
<TextView
android:id="@+id/detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="问诊详情"
android:textColor="#ff8595a9"
android:textSize="16sp"
app:layout_constraintLeft_toLeftOf="@id/tv_title"
app:layout_constraintTop_toBottomOf="@id/line_center" />
<ImageView
android:src="@mipmap/medical_icon_arrow_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@id/detail"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/detail" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
\ No newline at end of file
......@@ -40,6 +40,7 @@
android:textStyle="bold" />
<ImageView
android:id="@+id/ll_more"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignParentRight="true"
......
......@@ -19,11 +19,11 @@
<androidx.cardview.widget.CardView
android:id="@+id/card_img"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_centerInParent="true"
app:cardCornerRadius="24dp"
app:cardElevation="0dp"
app:layout_constraintRight_toLeftOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
......@@ -125,23 +125,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_weight="0"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
android:orientation="horizontal">
</LinearLayout>
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/im_chat_setting_popupwindow_bg"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_all_read"
android:layout_width="150dp"
android:layout_height="51dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_marginRight="9dp"
android:scaleType="fitXY"
android:src="@mipmap/medical_yidu_icon" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全部已读"
android:textColor="#242424"
android:textSize="16dp" />
</LinearLayout>
<View
android:layout_width="150dp"
android:layout_height="0.5dp"
android:background="#EBEBEB" />
<LinearLayout
android:id="@+id/ll_chat_setting"
android:layout_width="150dp"
android:layout_height="51dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_marginRight="9dp"
android:scaleType="fitXY"
android:src="@mipmap/medical_xiaoxi_icon" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="消息设置"
android:textColor="#242424"
android:textSize="16dp" />
</LinearLayout>
</LinearLayout>
<?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_marginTop="96dp"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:text="知情同意书"
android:textColor="#ff0c1d31"
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/close"
android:layout_width="55dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:paddingLeft="20dp"
android:paddingTop="24dp"
android:paddingRight="20dp"
android:src="@mipmap/medical_close_black_icon" />
</RelativeLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:lineSpacingMultiplier="1.1"
android:text="@string/zhiqing"
android:textColor="#ff0c1d31"
android:textSize="16sp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
......@@ -246,5 +246,28 @@
<string name="im_chat_pivate_content">如系统检测到涉黄、涉爆、涉政等信息,可能会封号处理并追究法律责任!</string>
<string name="im_video_play">视频播放</string>
<string name="question_notes">注:描述中请包含问题持续时间、问题发生原因、当前的问题。如何描述?</string>
<string name="zhiqing">尊敬的用户(监护人): <br/>
欢迎您到壹点灵互联网医院就诊,我们愿意为您提供方便快捷的互联网医疗服务。为维护您的合法权益,请您仔细阅读以下内容。<br/>
接受互联网诊疗服务、私人医生服务、远程医疗服务可能出现潜在风险,有些不常见的风险未能一一列出,如果患者有疑问应与医生讨论。<br/>
1、受限于互联网诊疗本身的局限性(如医生不能面诊、触诊等,无法通过相关的诊查手段及检查、检验结果准确判断病情的进展),医生给出的本次诊疗方案、健康管理方案、远程医疗方案依赖于用户所上传的资料和描述的症状,以及既往的病例资料、临床诊断。如前述信息不准确或不全面,将对本次方案的合理制定产生一定的影响。如果您是初次就诊,请到实体医院就诊。<br/>
2、提供互联网诊疗服务、私人医生服务、远程医疗服务的医生,可能来自于实体医疗机构中的不同级别、性质的医院,执业年限及经验不一。互联网医院的分诊主要依赖于用户的需求尽力匹配适合用户的医生为患者进行服务。用户可以自行选择医生,但受限于医生的执业经验及背景,医生给出的方案的合理性和先进性可能存在差异。<br/>
3、由于精神心理疾病本身的特殊性和复杂性,患者本身的体质状况,及现有医疗水平条件的限制等,都存在可能发生各种并发症和危害自身生命健康的意外风险。<br/>
4、由于精神心理疾病本身的复杂性,以及诊疗措施疗效出现的延后性,诊疗方案、健康管理方案、远程医疗方案可能不会达到患者期许的效果,且有些疾病或并发症是不可根治的,需要患者积极配合,长期坚持治疗,才能延缓疾病的进展。医生已经尽力为患者制定合理的方案,致力减少药物治疗不良反应的发生,但不可能完全避免,且不可预测,需要在患者的配合下,并根据临床情况不断调整方案。<br/>
5、未成年人需由监护人陪同下就诊。<br/>
6、疾病的治愈需要患者谨遵医嘱、健康管理方案,并积极配合。如果患者未完全遵守和配合,则可能导致诊疗效果不理想,甚至出现病情反复、恶化等不良后果。<br/>
7、配送药品可能受到物流时效的影响,导致患者延时服用药物;或患者正在用药物或者手术等治疗其他疾病,也可能存在延时用药、联合用药等风险。<br/>
8、医生主要解决本专业领域的医疗问题,非本专业的疾病需要到其它专业科室进行诊治或接受远程医疗服务。<br/>
9、互联网+私人医生服务对持续维护健康具有必要性,如患者难以提供全部既往的诊疗资料,则可能导致健康档案在使用时因资料收集不全而存在潜在风险。<br/>
10、互联网医院对患者信息按要求采取了保密措施,但泄密的可能性依然不能完全消除。<br/>
11、经患者同意后产生的医疗文件和诊疗数据,独立属于医疗机构,匿名化后可能被用于科学研究(包括但不限于大数据研究),患者并不能从中直接受益。<br/>
用户或监护人知情知情同意并确认以下条款:<br/>
a、用户确认在互联网医院上问诊的疾病,已经在实体医疗机构明确诊断,患者已经填写或上传相关的病历资料,愿意互联网诊疗。<br/>
b、用户确认既往发生过与本次发病类似的常见病、慢性病病症,并曾经在实体医院诊疗,但现在无法提供与本次病症相关的检诊资料。<br/>
c、患者愿意接受互联网医院提供的“互联网+”私人医生签约服务,并协助医生完善健康档案,达成互联网诊疗。<br/>
d、用户确认愿意接受医生根据诊疗经验为患者安排的远程医疗服务。<br/>
e、用户确认已经知晓并同意以上1-11款的内容,理解相关的风险,愿意接受互联网医院的服务以及接受疾病诊疗服务,并签署知情同意书。<br/>
f、用户确认从未得到服务结果会百分之百成功的许诺。<br/>
g、用户同意您的诊疗内容在去除姓名、头像、出生日期等信息后将设置为默认展示,医生给您的指导建议同时也会帮助其他相似情况的用户。<br/>
如您对本同意书有任何疑问,可联系客服进行联系。</string>
</resources>
......@@ -6,4 +6,4 @@ include ':app',
":m-im",":m-dynamic","m-article","m-audioim","m-user","m-confide"
include ':ydl_medical_pay'
include ':ydl-medical-pay'
......@@ -47,8 +47,12 @@ dependencies {
//开发时使用
api project(':ydl-platform')
implementation modularPublication('com.ydl:m-im-api')
compileOnly rootProject.ext.dependencies["ydl-m-user-api"]
}else {
compileOnly rootProject.ext.dependencies["ydl-m-im-api"]
compileOnly rootProject.ext.dependencies["ydl-m-user-api"]
//发布时使用
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
......
package com.medical.ydl.medical.modular
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.alibaba.android.arouter.launcher.ARouter
import com.ydl.ydlcommon.bean.GlobalInfo
import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.data.http.GsonProvider
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.yidianling.im.api.bean.ReceiveRedPacketParam
import com.yidianling.im.api.service.IImService
import com.yidianling.user.api.bean.UserResponseBean
import com.yidianling.user.api.service.IAppService
import com.yidianling.user.api.service.IUserService
/**
* 功能输入接口
* 暴漏给app模块使用
* Created by hgw on 2018/3/19.
*/
object MedicalPayIn {
fun getImService(): IImService {
return ModularServiceManager.provide(IImService::class.java)
}
fun getAppService(): IAppService {
return ModularServiceManager.provide(IAppService::class.java)
}
fun getUserService(): IUserService {
return ModularServiceManager.provide(IUserService::class.java)
}
/**
* 是否登录
*/
fun isLogin(activity: Context, flag: Boolean): Boolean {
if (!isLogin() && flag) {
getUserService().loginByOneKeyLogin(activity, true)
return false
} else {
return true
}
}
fun myRedPockIntent(activity: Activity) {
getAppService().myRedPockIntent(activity)
}
fun sendRedPacketIntent(activity: Activity, toUid: String, code: Int) {
ARouter.getInstance().build("/user/sendRedPacket").withString("to_uid", toUid)
.navigation(activity, code)
}
fun receiveRedPacketIntent(activity: Activity, param: ReceiveRedPacketParam) {
getAppService().receiverRedPacketIntent(activity, GsonProvider.getGson().toJson(param))
}
fun inputPhoneIntent(activity: Activity, smsAction: String): Intent? {
return getUserService().inputPhoneIntent(activity, smsAction)
}
fun isLogin(): Boolean {
return getUserService()?.isLogin() ?: false
}
fun getUserInfo(): UserResponseBean.UserInfo? {
return getUserService().getUserInfo()
}
fun getUserResponse(): UserResponseBean? {
return getUserService().getUserResponse()
}
fun getChatTeamHisShow(): Boolean {
return getUserService().getChatTeamHisShow() ?: false
}
fun loginWayIntent(context: Context): Intent? {
return getUserService().loginWayIntent(context)
}
fun mainIntent(context: Context, selectTab: Int) {
getAppService().mainIntent(context, selectTab, false)
}
fun mainIntentMessage(context: Context, docotrUid: String) {
val bundle = Bundle()
bundle.putInt("selectTab", 2)
bundle.putString("docotrUid", docotrUid)
ARouter.getInstance().build("/main/main")
.withBundle("bundle", bundle)
.navigation()
}
fun feedBackIntent(activity: Activity) {
getAppService().feedBackIntent(activity)
}
fun getGlobalInfo(): GlobalInfo? {
return PlatformDataManager.getRam().getGlobalInfo()
}
}
......@@ -11,7 +11,9 @@ import android.util.Log
import com.alipay.sdk.app.PayTask
import com.medical.ydl.medical.bean.CreatePayReqDtoBody
import com.medical.ydl.medical.bean.CreatePayRespose
import com.medical.ydl.medical.dialog.TimeBackDialog
import com.medical.ydl.medical.http.MedicalPayServiceImpl
import com.medical.ydl.medical.modular.MedicalPayIn
import com.medical.ydl.medical.pay.bean.MedicalPayResult
import com.medical.ydl.medical.pay.bean.MedicalPayStatus
import com.medical.ydl.medical.pay.bean.MedicalWXPayEvent
......@@ -22,7 +24,6 @@ import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.data.http.BaseResponse
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.view.dialog.NormalDialog
import com.yidianling.common.tools.ToastUtil
import de.greenrobot.event.EventBus
import io.reactivex.android.schedulers.AndroidSchedulers
......@@ -38,8 +39,10 @@ class MedicalPayActivity : BaseActivity() {
companion object {
private const val PRICE_KEY = "price"
private const val ORDER_KEY = "orderId"
private const val DOCTORUID_KEY = "doctorUid"
private lateinit var mPrice: String
private lateinit var mOrderId: String
private lateinit var mDoctorUid: String
private var timer: CountDownTimer? = null
......@@ -59,10 +62,11 @@ class MedicalPayActivity : BaseActivity() {
* @param orderId 订单id
* */
@JvmStatic
fun start(context: Context, price: String, orderId: String) {
fun start(context: Context, price: String, orderId: String, doctorUid: String) {
val starter = Intent(context, MedicalPayActivity::class.java)
.putExtra(PRICE_KEY, price)
.putExtra(ORDER_KEY, orderId)
.putExtra(DOCTORUID_KEY, doctorUid)
context.startActivity(starter)
}
......@@ -107,6 +111,7 @@ class MedicalPayActivity : BaseActivity() {
initStatus()
mPrice = intent.getStringExtra(PRICE_KEY)
mOrderId = intent.getStringExtra(ORDER_KEY)
mDoctorUid = intent.getStringExtra(DOCTORUID_KEY)
price.text = mPrice
ll_alipay.setOnClickListener {
......@@ -159,7 +164,7 @@ class MedicalPayActivity : BaseActivity() {
}
private fun backCheck() {
val builder = NormalDialog.Builder(this@MedicalPayActivity, "center", true)
val builder = TimeBackDialog.Builder(this@MedicalPayActivity, "center", true)
builder.setTitle("")
builder.setMessage("\n已为您锁定问诊名额,请在24小时59分00秒内完成支付,超时名额自动取消\n")
builder.setPositiveButton(
......@@ -178,7 +183,8 @@ class MedicalPayActivity : BaseActivity() {
builder.setRight_color("#3464EC")
builder.setLeft_color("#8595A9")
builder.setContent_color("#10233A")
builder.create().show()
val dialog = builder.create()
dialog.show()
var timeStamp: Long = 86400000
timer = object : CountDownTimer(timeStamp, 1000) {
......@@ -192,9 +198,7 @@ class MedicalPayActivity : BaseActivity() {
var second =
(millisUntilFinished - hour * (1000 * 60 * 60) - minute * (1000 * 60)) / 1000
builder.setMessage(
"\n已为您锁定问诊名额,请在${hour}小时${minute}分${second}秒内完成支付,超时名额自动取消\n"
)
builder.setMessageToTextView("${hour}小时${minute}分${second}")
}
override fun onFinish() {
......@@ -251,10 +255,15 @@ class MedicalPayActivity : BaseActivity() {
fun onEvent(event: MedicalWXPayEvent) {
if (event.status.success) {
MedicalPayIn.mainIntentMessage(this@MedicalPayActivity, mDoctorUid)
ToastUtil.toastShort("支付成功")
finish()
} else {
ToastUtil.toastShort("支付失败")
}
}
override fun onBackPressed() {
backCheck()
}
}
\ No newline at end of file
......@@ -7,6 +7,8 @@ package com.ydl.ydlcommon.base.config
const val YDL_DOMAIN = "Domain-Name:"
//JAVA Api 地址
const val YDL_DOMAIN_JAVA = "JAVA_BASE_URL"
//网关地址
const val GET_GATEWAY_BASE_URL = "GET_GATEWAY_BASE_URL"
//JAVA 域名
const val YDL_DOMAIN_JAVA_URL = "YDL_DOMAIN_JAVA_URL"
// JAVA Api 登录注册地址
......
......@@ -110,6 +110,7 @@ class GlobalConfig private constructor(var builder: Builder) {
.config()
.setBaseUrl(appBaseURL ?: HttpConfig.PHP_BASE_URL)
.addUrl(YDL_DOMAIN_JAVA, HttpConfig.JAVA_BASE_URL)
.addUrl(GET_GATEWAY_BASE_URL, HttpConfig.GET_GATEWAY_BASE_URL)
.addUrl(YDL_DOMAIN_JAVA_URL, HttpConfig.JAVA_URL)
.addUrl(YDL_DOMAIN_LOGIN_BASE_URL, HttpConfig.JAVA_LOGIN_BASE_URL)
.setMultipleUrlMap(multipleUrl)
......
......@@ -59,6 +59,7 @@ class HttpConfig {
private const val VERSION = "version"
private const val TOKEN = "accessToken"
private val OS_TYPE = "osType"// 1.ios 2.android
private val USER_PORT = "userPort"// 端的类型:1用户端;2专家端
private val APP_NAME =
"appName"//用于标识 是哪个应用 yidianling:用户版 xinlizixun:心理咨询 haoshi:情感壹点灵 zhuanjia:专家版
......@@ -77,6 +78,11 @@ class HttpConfig {
var JAVA_BASE_URL = ""
/**
* 网关 地址
*/
var GET_GATEWAY_BASE_URL = ""
/**
* YDL H5 地址
*/
var YDL_H5 = ""
......@@ -92,6 +98,11 @@ class HttpConfig {
var MH5_URL = ""
/**
* 医疗 地址
*/
var MEDICAL_H5URL = ""
/**
* 新 H5 地址
*/
var WEB_URL = ""
......@@ -112,7 +123,7 @@ class HttpConfig {
var ENCRYPTION_APP_KEY = "" // 接口加密appKey
var ENCRYPTION_APP_SECRET = "" // 接口加密appSecret
var isEncryption = false
var appDebug:Boolean=false
var appDebug: Boolean = false
fun getInstance(): HttpConfig {
return Holder.INSTANCE
......@@ -189,7 +200,7 @@ class HttpConfig {
return Interceptor {
val request: Request = it.request()
val originalResponse: Response = it.proceed(request)
if (!appDebug){
if (!appDebug) {
val code = originalResponse.code()
// 接口返回错误的情况下,埋点告诉服务器原因
if (code != 200) {
......@@ -203,8 +214,11 @@ class HttpConfig {
val api = request.url().encodedPath()
// ActionCountUtils.baiDuCount("ydl_user_error_business","error_log",api,params,message)
//阿里云忽略埋点接口
if (!api.contains("maidian/writeMaiDianData")){
AliYunRichLogsHelper.getInstance().sendRichLog(AliYunLogConfig.API, "error_log---api:$api---params:$params ---- message:$message")
if (!api.contains("maidian/writeMaiDianData")) {
AliYunRichLogsHelper.getInstance().sendRichLog(
AliYunLogConfig.API,
"error_log---api:$api---params:$params ---- message:$message"
)
}
}
}
......@@ -313,13 +327,16 @@ class HttpConfig {
}
if (!paramsName.contains(OS_BUILD)) {
paramsValue[OS_BUILD] =
"""${RxDeviceTool.getBuildBrandModel()},${RxDeviceTool.getSDKVersionName()},${RxAppTool.getAppVersionName(
BaseApp.getApp()
)}"""
"""${RxDeviceTool.getBuildBrandModel()},${RxDeviceTool.getSDKVersionName()},${
RxAppTool.getAppVersionName(
BaseApp.getApp()
)
}"""
}
if (!paramsName.contains(TS)) {
paramsValue[TS] = (System.currentTimeMillis() / 1000).toString()
}
if (!paramsName.contains(VERSION)) {
paramsValue[VERSION] = RxAppTool.getAppVersionName(
BaseApp.getApp()
......@@ -409,6 +426,7 @@ class HttpConfig {
)
)
.addHeader(OS_TYPE, "2")
.addHeader(USER_PORT, "1")
.addHeader(APP_NAME, appName)
val loginBean = ModularServiceManager.getPlatformUserService()?.getUser()
if (loginBean != null) {
......@@ -420,18 +438,22 @@ class HttpConfig {
}
private fun getOldAuth(paramsString: StringBuilder): String {
return "$YDL ${EncryptUtils.encryptMD5ToString(
paramsString.toString() + SESSION_KEY
)}"
return "$YDL ${
EncryptUtils.encryptMD5ToString(
paramsString.toString() + SESSION_KEY
)
}"
}
private fun getNewAuth(paramsString: StringBuilder): String {
//md5({静态秘钥} + {参数} + md5{动态秘钥(明文)}
return "$YDL ${EncryptUtils.encryptMD5ToString(
SESSION_KEY + paramsString.toString() + EncryptUtils.encryptMD5ToString(
DYNAMIC_SESSION_KEY
return "$YDL ${
EncryptUtils.encryptMD5ToString(
SESSION_KEY + paramsString.toString() + EncryptUtils.encryptMD5ToString(
DYNAMIC_SESSION_KEY
)
)
)}"
}"
}
//初始化网络环境
......@@ -451,13 +473,16 @@ class HttpConfig {
PHP_BASE_URL = properties.getProperty("serverurl.$appEnv")
JAVA_BASE_URL = properties.getProperty("javaapi.$appEnv")
JAVA_LOGIN_BASE_URL = JAVA_BASE_URL
JAVA_LOGIN_BASE_URL = JAVA_BASE_URL.replace("api/", "")
GET_GATEWAY_BASE_URL = JAVA_BASE_URL
ENCRYPTION_APP_KEY = properties.getProperty("appKey.$appEnv")
ENCRYPTION_APP_SECRET = properties.getProperty("appSecret.$appEnv")
ACTION_URL = properties.getProperty("actionurl.$appEnv")
H5_URL = properties.getProperty("h5url.$appEnv")
MH5_URL = properties.getProperty("mh5url.$appEnv")
MEDICAL_H5URL = properties.getProperty("medicalh5url.$appEnv")
YDL_H5 = properties.getProperty("ydlh5url.$appEnv")
WEB_URL = properties.getProperty("weburl.$appEnv")
JAVA_URL = properties.getProperty("javaurl.$appEnv")
......@@ -509,6 +534,7 @@ class HttpConfig {
.subscribe({
if (it.baseUrlGatewayDTOList.isNotEmpty()) {
isEncryption = it.baseUrlGatewayDTOList[0].goGateway
GET_GATEWAY_BASE_URL = it.baseUrlGatewayDTOList[0].baseUrl
if (isEncryption) {
JAVA_LOGIN_BASE_URL = it.baseUrlGatewayDTOList[0].baseUrl + "/"
urlMap[YDL_DOMAIN_LOGIN_BASE_URL] = JAVA_LOGIN_BASE_URL
......
package com.ydl.ydlcommon.data.http
import com.ydl.ydlcommon.base.BaseApp
......@@ -16,23 +15,23 @@ import java.net.ConnectException
/**
* author : Zhangwenchao
* e-mail : zhangwch@yidianling.com
*/
*/
object RxUtils {
// 在子线程中把实体参数类转换成 map
@JvmStatic
fun <T> mapObservable(t: T): Observable<HashMap<String, String>> {
return Observable.just(t)
.compose(netCheck())
.subscribeOn(Schedulers.io())
.map { MapUtils.bean2Map(it) }
.compose(netCheck())
.subscribeOn(Schedulers.io())
.map { MapUtils.bean2Map(it) }
}
/**
* 若网络未连接,抛出未连接异常
*/
@JvmStatic
fun <T>netCheck(): ObservableTransformer<T, T> {
fun <T> netCheck(): ObservableTransformer<T, T> {
return ObservableTransformer {
if (RxNetTool.isConnected(BaseApp.getApp())) it
else Observable.error(ConnectException())
......@@ -60,7 +59,7 @@ object RxUtils {
fun <T> resultData(): ObservableTransformer<BaseResponse<T>, T> {
return ObservableTransformer {
it.flatMap {
if (it.code == 0) Observable.just(it.data)
if (it.code == 0 || it.code == 200) Observable.just(it.data)
else Observable.error(Throwable(it.msg, Throwable(it.code.toString())))
}
}
......@@ -120,8 +119,8 @@ object RxUtils {
}
@JvmStatic
fun <T> applySchedulers(iLifecycleable: ILifecycleable<*> ?= null): ObservableTransformer<T, T> {
if (iLifecycleable == null){
fun <T> applySchedulers(iLifecycleable: ILifecycleable<*>? = null): ObservableTransformer<T, T> {
if (iLifecycleable == null) {
return applySchedulers()
}
return ObservableTransformer { observable ->
......
......@@ -51,7 +51,7 @@ interface NetApiStore {
@GET("config/socket-config")
Observable<BaseAPIResponse<JavaGlobalInfo>> getJavaGlobalInfo();
@Headers({YDL_DOMAIN+ YDL_DOMAIN_JAVA,"userPort:1","Content-type:application/json;charset=UTF-8"})
@POST("systemconfig/get_gateway_base_url")
@Headers({YDL_DOMAIN+ YDL_DOMAIN_JAVA_URL,"userPort:1","Content-type:application/json;charset=UTF-8"})
@POST("ydl-yiliao-api/api/client/login/v1/get_gateway_base_url")
Observable<BaseAPIResponse<BaseUrlBean>> getBaseUrl(@Body Map<String, Object> map);
}
......@@ -39,6 +39,12 @@ mh5url.test = https://testnewm.ydl.com/
mh5url.auto_test = https://auto_testnewm.ydl.com/
mh5url.prod = https://m.ydl.com/
# 医疗 H5地址
medicalh5url.new_test = https://ydltestm.yidianling.cn/
medicalh5url.test = https://testnewm.yidianling.cn/
medicalh5url.auto_test = https://auto_testnewm.yidianling.cn/
medicalh5url.prod = https://m.yidianling.cn/
#java服务器域名
javaurl.new_test = https://ydltestapi.ydl.com/
javaurl.test = https://testapi.ydl.com/
......
......@@ -40,6 +40,7 @@ class H5JsBean {
var isFromQingShu = 0//是否是从专家倾述主页跳转私聊界面 0: 不是 1:是
var docHead: String? = null//聊天头像
var doctorId: Int = 0//医生id
var doctorUid: Int = 0//医生用户id
var listenerId: Int = 0
var orderStatus: Int = 0
var orderStatusDesc: String? = null
......
......@@ -102,6 +102,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private String rightText = "";
protected TitleBar tb_title;
protected View tb_topview;
protected View tb_title_cover_v;
protected ImageView backgroundView;
protected ProgressWebView wv_content;
......@@ -539,6 +540,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private void initView() {
tb_title = (TitleBar) findViewById(R.id.tb_title);
tb_topview = findViewById(R.id.topview);
tb_title_cover_v = (View) findViewById(R.id.tb_title_cover_v);
tb_title.setPaddingLeft(10);
wv_content = (ProgressWebView) findViewById(R.id.wv_content);
......@@ -557,6 +559,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
public void hideJavaTitleBar() {
runOnUiThread(() -> {
tb_title.setVisibility(View.GONE);
tb_topview.setVisibility(VISIBLE);
if (null != getStatusView()) {
if (selfPageType == TEST_QUESTIONS_PAGE_TYPE) {
//测评题隐藏标题的时候,不隐藏状态栏
......@@ -576,6 +579,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
public void showTitleBar() {
runOnUiThread(() -> {
tb_title.setVisibility(VISIBLE);
tb_topview.setVisibility(GONE);
if (null != getStatusView()) {
getStatusView().setVisibility(VISIBLE);
}
......
......@@ -8,7 +8,7 @@
<com.ydl.ydlcommon.ui.LogoLoadingView
android:id="@+id/v_loading"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent" />
<LinearLayout
android:id="@+id/ll_web_view"
......@@ -16,22 +16,29 @@
android:layout_height="match_parent"
android:orientation="vertical">
<View
android:id="@+id/topview"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:visibility="gone" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/tb_title"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
android:background="@color/platform_white"
app:pa_title_text="加载中" />
android:id="@+id/tb_title"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
android:background="@color/platform_white"
app:pa_title_text="加载中" />
<View
android:id="@+id/tb_title_cover_v"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="#ffffff"
android:visibility="gone"/>
android:visibility="gone" />
</RelativeLayout>
......@@ -51,7 +58,7 @@
android:id="@+id/wv_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/platform_transparent"/>
android:background="@color/platform_transparent" />
</in.srain.cube.views.ptr.PtrFrameLayout>
</LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.medical.ydl.medical.pay">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.YDLComponent">
<activity android:name=".MedicalPayMainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
package com.medical.ydl.medical.pay
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
class MedicalPayMainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
}
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MedicalPayMainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.YDLComponent" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.YDLComponent" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
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 to comment