中建365-优化/bug修复

develop
wlh 1 year ago
parent ddb7b5f2ed
commit bf5eb0aa81

@ -319,6 +319,10 @@
android:launchMode="singleTop"
android:screenOrientation="portrait"/>
<activity android:name="com.zj365.mime.act.EnterpriseInformationAct"
android:launchMode="singleTop"
android:screenOrientation="portrait"/>
<activity android:name="com.xty.base.act.RichTextAct"
android:launchMode="singleTop"
android:screenOrientation="portrait"/>

@ -43,8 +43,8 @@ class DietManagementAct : BaseVmAct<BaseVm>(){
R.id.rx_healthy_diet ->{
bundle.clear()
bundle.putString("web_site_url","http://testbuilt.zhongjian365.com/ ")
// bundle.putString("web_site_url","${BuildConfig.h5url}pages/index/index?pageId=cookbook")
// bundle.putString("web_site_url","http://testbuilt.zhongjian365.com/ ")
bundle.putString("web_site_url","${BuildConfig.h5url}pages/index/index?pageId=cookbook")
RouteManager.goAct(ARouterUrl.H5_ACT,bundle)
// var url = "${BuildConfig.}"

@ -50,6 +50,8 @@ class LoginAct : BaseVmAct<LoginVm>() {
DialogTipNew(this,"温馨提示", "恭喜您成为中健三六五大家庭的医院,为了提供更好的信息服务,请完善您的基本信息。", "前往","取消",false,{
RouteManager.goAct(ARouterUrl.BASE_INFO_CHANGE)
EventBus.getDefault().post(LoginOrRegisterEvent())
finish()
}){
EventBus.getDefault().post(LoginOrRegisterEvent())
finish()
@ -282,6 +284,7 @@ class LoginAct : BaseVmAct<LoginVm>() {
mViewModel.mLogin.observe(this) {
loadingView.dismiss()
if (it.data.isPerfect == 0){
dialogBind.setContentNew("恭喜您成为中健三六五大家庭的医院,为了提供更好的信息服务,请完善您的基本信息。")
dialogBind.show()
}else{
EventBus.getDefault().post(LoginOrRegisterEvent())

@ -96,7 +96,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
}
val dialogInvite by lazy {
DialogTipNew(this, "监护邀请","138****3415用户邀请您成为 监护人", "确认","取消",false,{
DialogTipNew(this, "监护邀请","", "确认","取消",false,{
inviteCustodyBean?.let {
mViewModel.confirmInvite(it.id,"1")
}

@ -166,7 +166,11 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
isShrinkage =
MMkvHelper.getBoolean(Const.Health_Monitoring_Shrinkage + MMkvHelper.getLong(Const.USER_ID))
showIdInfo =if (MMkvHelper.getLong(Const.USER_ID).toString() == "0") {
""
} else {
MMkvHelper.getLong(Const.USER_ID).toString()
}
//家人信息绑定
initFamilyAdapter()
@ -372,6 +376,8 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
}
//设备连接
R.id.mHealthRecords -> {
CommonToastUtils.showToast("敬请期待")
/*val btnStr = binding.mHeader.mWearManager.text
if (btnStr == "佩戴管理") {
if (MMkvHelper.getInt(Const.Watch_Device_Type) == Const.Companion.WatchDevice.LightA3.ordinal) {//4G手表
@ -917,6 +923,9 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
bean.bmiInfo?.let {
binding.mHeader.mBMI.text = "BMI ${it.bmi}"
binding.mHeader.mBMIStatus.text = "${it.levelName}"
}?:{
binding.mHeader.mBMI.text = "BMI --"
binding.mHeader.mBMIStatus.text = "--"
}
@ -954,6 +963,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
//设置健康监测按钮列表数据
healthMonitoringList.clear()
healthMonitoringListExceed.clear()
mHealthAdapter.mainBean.clear()
val healthMonitoringListData = mViewModel.setHealthMonitoringListData(
requireContext(),
bean

@ -53,8 +53,8 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
private val defaultIcon by lazy {
arrayOf(
R.mipmap.ic_default_man,
R.mipmap.ic_default_women
R.mipmap.icon_default_avator,
R.mipmap.icon_default_avator
)
}
var user: SettingBean.User? = null

@ -282,7 +282,8 @@ class DynamicManagementVm : BaseVm() {
contentXL,
R.mipmap.bg_xl,
R.mipmap.ic_xl,
0
0,
calorie = hrData.count
)
)
@ -304,7 +305,8 @@ class DynamicManagementVm : BaseVm() {
contentXY,
R.mipmap.bg_oo,
R.mipmap.ic_oo,
1
1,
calorie = soData.count
)
)
@ -327,7 +329,8 @@ class DynamicManagementVm : BaseVm() {
contentHXL,
R.mipmap.bg_breath,
R.mipmap.ic_h_breath,
2
2,
calorie = respiratoryData.count
)
)
@ -350,7 +353,8 @@ class DynamicManagementVm : BaseVm() {
contentTW,
R.mipmap.bg_temp,
R.mipmap.ic_temp,
3
3,
calorie = tempData.count
)
)
@ -417,7 +421,8 @@ class DynamicManagementVm : BaseVm() {
contentSM,
R.mipmap.bg_h_sleep,
R.mipmap.ic_h_sleep,
5
5,
calorie = sleepData.count
)
)
@ -443,7 +448,8 @@ class DynamicManagementVm : BaseVm() {
contentXYa,
R.mipmap.bg_xya,
R.mipmap.ic_xya,
6
6,
calorie = dbpData.count
)
)
@ -522,7 +528,8 @@ class DynamicManagementVm : BaseVm() {
contentXT,
R.mipmap.bg_bloodsugar,
R.mipmap.ic_bloodsugar,
7
7,
calorie = bloodSugarData.count
)
)
@ -584,7 +591,7 @@ class DynamicManagementVm : BaseVm() {
statusNS = 1
contentNS = "建模中"
mTimeNS = if (uricAcidData.time.isNullOrEmpty()) {
"${RxTimeTool.getCurrentDateTime("yyyy-MM-dd HH")}:00"
"${milliseconds2String(uricAcidData.time)}:00"
} else if (uricAcidData.time.contains("-")) {
uricAcidData.time
} else {
@ -624,7 +631,8 @@ class DynamicManagementVm : BaseVm() {
R.mipmap.bg_niaosuan,
R.mipmap.ic_niaosuan,
9,
sex = user.sex.toString()
sex = user.sex.toString(),
calorie = uricAcidData.count
)
)
@ -637,7 +645,8 @@ class DynamicManagementVm : BaseVm() {
"敬请期待",
R.mipmap.bg_fat,
R.mipmap.ic_fat,
10
10,
calorie = bean.healthCount.toString()
)
)
/*var statusXZ = 0

@ -11,7 +11,9 @@ import com.xty.common.MMkvHelper
import com.xty.common.ReflexUtils
import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager
import com.xty.common.event.LoginOutEvent
import com.xty.common.weight.LoadingView
import org.greenrobot.eventbus.EventBus
abstract class BaseVmAct<V:BaseVm>: IBaseAct() {
@ -30,6 +32,7 @@ abstract class BaseVmAct<V:BaseVm>: IBaseAct() {
mViewModel.nowData.observe(this){
loadingView.dismiss()
MMkvHelper.clearUserInfo()
EventBus.getDefault().post(LoginOutEvent())
/*if(componentName.className!="LoginAct" ){
ToastUtils.show(R.string.again_login)
RxActivityTool.finishAllActivity()

@ -16,6 +16,8 @@ import com.xty.base.refresh.RefreshUtils
import com.xty.common.MMkvHelper
import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager
import com.xty.common.event.LoginOutEvent
import org.greenrobot.eventbus.EventBus
abstract class BaseVmFrag<T : BaseVm> : IBaseFrag() {
lateinit var mViewModel: T
@ -28,8 +30,10 @@ abstract class BaseVmFrag<T : BaseVm> : IBaseFrag() {
mViewModel.nowData.observe(this) {
loadingView.dismiss()
ToastUtils.show(R.string.again_login)
//RxActivityTool.finishAllActivity()
MMkvHelper.clearUserInfo()
EventBus.getDefault().post(LoginOutEvent())
// RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}
observer()

@ -51,9 +51,9 @@ fun ImageView.setImageUser(context: Context, string: String?) {
Glide.with(context).load(string).placeholder(
ContextCompat.getDrawable(
context,
R.mipmap.ic_default_man
R.mipmap.icon_default_avator
)
).error(R.mipmap.ic_default_man).into(this)
).error(R.mipmap.icon_default_avator).into(this)
}
/**
@ -61,9 +61,9 @@ fun ImageView.setImageUser(context: Context, string: String?) {
*/
fun ImageView.setImageUser(context: Context, string: String?, sex: String) {
val userHeadImg = if (sex == "1") {
R.mipmap.ic_default_man
R.mipmap.icon_default_avator
} else {
R.mipmap.ic_default_women
R.mipmap.icon_default_avator
}
Glide.with(context).load(string).placeholder(
ContextCompat.getDrawable(

@ -359,10 +359,10 @@ class TimeSelect(var context: Context, var select: (String) -> Unit) {
showSec
)
)// 显示需要的时间
.setOutSideCancelable(true)//点击屏幕,点在控件外部范围时,是否取消显示
.setOutSideCancelable(false)//点击屏幕,点在控件外部范围时,是否取消显示
.isCyclic(false)//是否循环滚动
.setBgColor(Color.WHITE)//滚轮背景颜色 Night mode
.setLineSpacingMultiplier(2.0f)
.setLineSpacingMultiplier(3.0f)
.setTextColorCenter(ContextCompat.getColor(context, R.color.col_313))
.setTextColorOut(ContextCompat.getColor(context, R.color.col_6B6))
.setDividerColor(ContextCompat.getColor(context, R.color.transparent))

@ -122,8 +122,10 @@ class ARouterUrl {
//AI 测肤
const val AI_SKIN_MEASUREMENT_ACTIVITY = "/health/com/zj365/health/act/skin/SkinMeasurementMainAct"
//家人健康
const val ADD_FAMILY_GUARDIAN_ACT = "/health/com/zj365/health/act/familyhealth/AddFamilyGuardianAct"
const val FAMILY_HEALTH_ACT = "/health/com/zj365/health/act/familyhealth/FamilyHealthAct"
const val FAMILY_HEALTH_REAL_TIME_ACT = "/health/com/zj365/health/act/familyhealth/FamilyHealthRealTimeAct"
//设备绑定相关
@ -187,6 +189,7 @@ class ARouterUrl {
const val TEMP_REMIND = "/mine/com/zj365/dc/mime/act/TempRemindAct"
const val PERSON_INFO = "/mine/com/zj365/dc/mime/act/PersonInfoAct"
const val INVITE_FRIENDS = "/mine/com/zj365/dc/mime/act/InviteFriendsAct" //邀请好友
const val ENTERPRISE_INFO = "/mine/com/zj365/dc/mime/act/EnterpriseInformationAct" //企业资料
const val NOTICE_SETTING = "/mine/com/zj365/dc/mime/act/NoticeSettingAct"

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid
android:color="#EBF0F2"/>
<size
android:height="0.5dp"/>
</shape>

@ -1,10 +1,10 @@
<?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="@dimen/dp_270"
android:layout_height="@dimen/dp_300"
android:orientation="vertical"
android:background="@drawable/shape_lt15_rt15_white"
android:paddingBottom="@dimen/dp_27"
android:paddingBottom="@dimen/dp_40"
>
<RelativeLayout
@ -59,7 +59,7 @@
android:layout_height="match_parent"
android:background="@android:color/white"
android:gravity="center"
android:minHeight="150dp"
android:minHeight="@dimen/dp_200"
android:orientation="horizontal">
<com.contrarywind.view.WheelView

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -7,7 +7,7 @@ ext {
minSdk : 23,
targetSdk : 32,
versionCode : 114,
versionName : "1.0.0"
versionName : "1.1.0"
]
@ -103,6 +103,7 @@ ext {
sign : 'com.github.F1ReKing:SignatureView:1.1.0',
gd_location : 'com.amap.api:location:latest.integration',
gd_map : 'com.amap.api:3dmap:8.0.1',
wixin : 'com.tencent.mm.opensdk:wechat-sdk-android:+',
//

@ -0,0 +1,50 @@
package com.zj365.health.act.familyhealth
import android.graphics.Rect
import android.view.View
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.alibaba.android.arouter.facade.annotation.Route
import com.xty.base.act.BaseVmAct
import com.xty.base.vm.BaseVm
import com.xty.common.arouter.ARouterUrl
import com.zj365.health.R
import com.zj365.health.adapter.familyhealth.FamilyHealthRealTimeAdapter
import com.zj365.health.databinding.ActFamilyHealthRealTimeBinding
/**
* 家人健康-实时
*/
@Route(path = ARouterUrl.FAMILY_HEALTH_REAL_TIME_ACT)
class FamilyHealthRealTimeAct : BaseVmAct<BaseVm>() {
val binding by lazy { ActFamilyHealthRealTimeBinding.inflate(layoutInflater) }
val mAdapter by lazy { FamilyHealthRealTimeAdapter() }
override fun liveObserver() {
}
override fun initView() {
super.initView()
statusBar(binding.title.mView)
binding.title.mTvTitle.text ="实时详情"
binding.title.mIvBack.setOnClickListener {
finish()
}
initAdapter()
}
fun initAdapter(){
binding.recycler.layoutManager = LinearLayoutManager(this)
binding.recycler.adapter = mAdapter
var dividerItemDecoration = DividerItemDecoration(this, DividerItemDecoration.VERTICAL)
dividerItemDecoration.setDrawable(resources.getDrawable(R.drawable.shape_ebf_0_5))
binding.recycler.addItemDecoration(dividerItemDecoration)
mAdapter.addChildClickViewIds(R.id.tv_real_time_mearsure)
}
override fun setLayout() = binding.root
}

@ -0,0 +1,11 @@
package com.zj365.health.adapter.familyhealth
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xty.base.adapter.BaseAdapter
import com.zj365.health.R
class FamilyHealthRealTimeAdapter : BaseAdapter<Any>(R.layout.item_family_health_real_time) {
override fun convert(holder: BaseViewHolder, item: Any) {
}
}

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/title_white_bar"
android:id="@+id/title"/>
<com.amap.api.maps.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_317"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:paddingTop="@dimen/dp_27"
android:paddingLeft="@dimen/dp_16"
android:paddingRight="@dimen/dp_16"
android:paddingBottom="@dimen/dp_16"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.ruffian.library.widget.RView
android:id="@+id/view"
android:layout_width="@dimen/dp_4"
android:layout_height="@dimen/dp_18"
app:background_normal="@color/col_02c"
app:corner_radius="2dp"
/>
<TextView
android:id="@+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/col_313"
android:text="详细数值"
android:textStyle="bold"
android:textSize="@dimen/dp_17"
android:paddingHorizontal="@dimen/dp_10"
/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="手环正在测量中需等待1分钟左右"
android:textSize="@dimen/sp_13"
android:textColor="@color/col_c7c"
android:layout_marginTop="@dimen/dp_13"/>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/recycler"/>
</LinearLayout>
</LinearLayout>

@ -26,7 +26,7 @@
android:layout_height="wrap_content"
android:padding="@dimen/dp_10"
android:text="@string/status_3"
android:textColor="@color/col_009"
android:textColor="@color/col_02c"
android:textSize="@dimen/dp_16" />
<androidx.recyclerview.widget.RecyclerView

@ -84,7 +84,7 @@
android:id="@+id/tvXinLv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/col_7CF"
android:textColor="@color/col_02c"
android:textSize="@dimen/dp_35"
android:textStyle="bold"
tools:text="85" />
@ -93,7 +93,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="%"
android:textColor="@color/col_7CF"
android:textColor="@color/col_02c"
android:textSize="@dimen/sp_13"
android:textStyle="bold" />
</LinearLayout>
@ -416,7 +416,7 @@
android:drawableLeft="@drawable/shape_hint_bg"
android:drawablePadding="@dimen/dp_4"
android:gravity="center|right"
android:text="正常心率50-100次/分"
android:text="正常血氧95-100%"
android:textColor="@color/col_c7c"
android:textSize="@dimen/sp_12"
android:textStyle="bold" />

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:gravity="center_vertical"
android:layout_height="@dimen/dp_62">
<ImageView
android:layout_width="@dimen/dp_19"
android:layout_height="@dimen/dp_19"
tools:background="@mipmap/ic_xl"
android:id="@+id/img_body"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_13"
tools:text="心率100次/分"
android:layout_marginLeft="@dimen/dp_7"
android:layout_toRightOf="@+id/img_body"
android:id="@+id/tv_body_name"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/sp_13"
android:textColor="@color/col_c7c"
tools:text="更新时间2002-12-29 03:12:12"
android:id="@+id/tv_update"
android:layout_below="@+id/img_body"/>
<TextView
android:id="@+id/tv_real_time_mearsure"
android:layout_width="@dimen/dp_68"
android:layout_height="@dimen/dp_27"
android:background="@drawable/shape_r25_stroke_02c"
android:text="实时测量"
android:gravity="center"
android:textColor="@color/col_02c"
android:textSize="12sp"
android:layout_alignParentEnd="true"
android:textStyle="bold"/>
</RelativeLayout>

@ -21,6 +21,7 @@ import com.xty.base.act.BaseVmAct
import com.xty.base.weight.GpsToastDialog
import com.xty.base.weight.TipDialog
import com.xty.common.TimeSelect
import com.xty.common.TimeUtils
import com.xty.common.aMapUtils.AmapInit
import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager
@ -265,8 +266,14 @@ class BaseInfoChangeAct : BaseVmAct<BaseInfoVm>() {
provincey = it.province //表示省
district = it.district //区
binding.mArea.text = "${it.province ?: ""} ${it.city ?: ""} ${it.district ?: ""}"
binding.mHeight.setText(it.height.toString())
if (it.height > 0){
binding.mHeight.setText("${it.height}")
}
if (it.weight > 0){
binding.mWeight.setText(it.weight.toString())
}
binding.mAddress.setText(it.area)
val str = StringBuilder()
if (!it.historyName.isNullOrEmpty()) {
@ -342,6 +349,70 @@ class BaseInfoChangeAct : BaseVmAct<BaseInfoVm>() {
binding.mImage.tag.toString()
}
val sexValue = if (binding.checkSex.isChecked) "2" else "1"
if (name.isNullOrEmpty()) {
CommonToastUtils.showToast("请输入姓名")
return
}
if (height.isNullOrEmpty()) {
CommonToastUtils.showToast("请输入身高")
return
}
if (height.toFloat() < 50 || height.toFloat() > 260) {
CommonToastUtils.showToast("请输入正确身高")
return
}
if (wieght.isNullOrEmpty()) {
CommonToastUtils.showToast("请输入体重")
return
}
if (wieght.toFloat() < 3 || wieght.toFloat() > 300) {
CommonToastUtils.showToast("请输入正确体重")
return
}
if (birthDay.isNullOrEmpty()) {
CommonToastUtils.showToast("请选择出生日期")
return
}
if (TimeUtils.getAgeByBirth(birthDay) < 14) {
CommonToastUtils.showToast("需要年满14岁才可使用")
return
}
if (city.isNullOrEmpty()) {
CommonToastUtils.showToast("请选择所属地区")
return
}
if (address.isNullOrEmpty()) {
CommonToastUtils.showToast("请输入详细住址")
return
}
if (medicIds.isNullOrEmpty()) {
CommonToastUtils.showToast("请选择病史")
return
}
if (otherName.isNullOrEmpty()) {
CommonToastUtils.showToast("请输入紧急联系人姓名")
return
}
if (otherPhone.isNullOrEmpty()) {
CommonToastUtils.showToast("请输入紧急联系人联系方式")
return
}
if (otherPhone == binding.mPhone.text.toString()) {
CommonToastUtils.showToast("紧急联系人电话不能与本人电话一致")
return
}
if (rela.isNullOrEmpty()) {
CommonToastUtils.showToast("请输入关系")
return
}
mViewModel.submit(
paht,
name,

@ -150,8 +150,8 @@ class DevInfoAct : BaseVmAct<SettingVm>(),EasyPermissions.PermissionCallbacks {
binding.mNickName.text = "设备名称:${it.data.watchName?:""}"
binding.mNum.text = "设备编码:${it.data.bluetooth?:""}"
binding.mCode.text = "物联网卡:${it.data.deviceCode?:""}"
binding.mActiveCode.text = "流量到期:${it.data.activationTime?:""}"
binding.mCode.text = "物联网卡:${it.data.iccid?:""}"
binding.mActiveCode.text = "流量到期:${it.data.flowExpireTime?:""}"
binding.mActiveCode.visibility = View.VISIBLE
setDevicePic(it.data.deviceType, binding.ivDevice)

@ -0,0 +1,56 @@
package com.zj365.mime.act
import android.graphics.Rect
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.alibaba.android.arouter.facade.annotation.Route
import com.xty.base.act.BaseListAct
import com.xty.base.vm.BaseVm
import com.xty.common.SizeUtil
import com.xty.common.arouter.ARouterUrl
import com.zj365.mime.adapter.EnterpriseInformationAdapter
import com.zj365.mime.databinding.ActEnterpriseInformationBinding
/**
* 企业资料
*/
@Route(path = ARouterUrl.ENTERPRISE_INFO)
class EnterpriseInformationAct : BaseListAct<BaseVm>() {
val binding by lazy { ActEnterpriseInformationBinding.inflate(layoutInflater) }
val mAdapter by lazy { EnterpriseInformationAdapter() }
override fun initAdapter() {
binding.recyclerView.layoutManager = LinearLayoutManager(this)
binding.recyclerView.adapter = mAdapter
setRecycleRefresh(binding.recyclerView,binding.mRefresh,true)
/* binding.recyclerView.addItemDecoration(object : RecyclerView.ItemDecoration() {
override fun getItemOffsets(outRect: Rect, itemPosition: Int, parent: RecyclerView) {
super.getItemOffsets(outRect, itemPosition, parent)
if (itemPosition == 0){
}else{
outRect.set(0, SizeUtil.dp2px(this@EnterpriseInformationAct,12f))
}
}
})*/
}
override fun loadData() {
}
override fun initView() {
super.initView()
statusBar(binding.title.mView)
binding.title.mTvTitle.text = "企业资料"
binding.title.mIvBack.setOnClickListener {
finish()
}
}
override fun liveObserver() {
}
override fun setLayout() = binding.root
}

@ -0,0 +1,21 @@
package com.zj365.mime.adapter
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xty.base.adapter.BaseAdapter
import com.zj365.mime.R
class EnterpriseInformationAdapter : BaseAdapter<Any>(R.layout.item_enterprise_info) {
val mAdapter by lazy { EnterpriseInformationChildAdapter() }
override fun convert(holder: BaseViewHolder, item: Any) {
var recyclerView = holder.getView<RecyclerView>(R.id.recycler)
recyclerView.layoutManager = LinearLayoutManager(context)
recyclerView.adapter = mAdapter
}
}

@ -0,0 +1,11 @@
package com.zj365.mime.adapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xty.base.adapter.BaseAdapter
import com.zj365.mime.R
class EnterpriseInformationChildAdapter : BaseAdapter<Any>(R.layout.item_enterprise_info_child) {
override fun convert(holder: BaseViewHolder, item: Any) {
}
}

@ -58,68 +58,7 @@ class BaseInfoVm : BaseVm() {
// ToastUtils.show("请输入正确的身份证号")
// return
// }
if (name.isEmpty()) {
CommonToastUtils.showToast("请输入姓名")
return
}
if (height.isEmpty()) {
CommonToastUtils.showToast("请输入身高")
return
}
if (height.toFloat() < 50 || height.toFloat() > 260) {
CommonToastUtils.showToast("请输入正确身高")
return
}
if (weight.isEmpty()) {
CommonToastUtils.showToast("请输入体重")
return
}
if (weight.toFloat() < 3 || weight.toFloat() > 300) {
CommonToastUtils.showToast("请输入正确体重")
return
}
if (birthDay.isEmpty()) {
CommonToastUtils.showToast("请选择出生日期")
return
}
if (TimeUtils.getAgeByBirth(birthDay) < 14) {
CommonToastUtils.showToast("需要年满14岁才可使用")
return
}
if (city.isEmpty()) {
CommonToastUtils.showToast("请选择所属地区")
return
}
if (area.isEmpty()) {
CommonToastUtils.showToast("请输入详细住址")
return
}
if (medicIds.isEmpty()) {
CommonToastUtils.showToast("请选择病史")
return
}
if (urgent.isEmpty()) {
CommonToastUtils.showToast("请输入紧急联系人姓名")
return
}
if (urgentPhone.isEmpty()) {
CommonToastUtils.showToast("请输入紧急联系人联系方式")
return
}
if (urgentPhone == mPhone) {
CommonToastUtils.showToast("紧急联系人电话不能与本人电话一致")
return
}
if (urgentRelation.isEmpty()) {
CommonToastUtils.showToast("请输入关系")
return
}
startHttp {
withContext(Dispatchers.IO) {

@ -12,7 +12,7 @@
<com.ruffian.library.widget.RLinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
app:corner_radius="@dimen/dp_8"
app:background_normal="@color/white"
android:layout_margin="@dimen/dp_14"
@ -30,7 +30,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_18"
android:text="中356"
android:text="中356"
android:textColor="@color/col_455"
android:textSize="@dimen/sp_17"
android:textStyle="bold" />
@ -82,13 +82,10 @@
android:layout_marginBottom="@dimen/dp_45"
android:layout_marginStart="@dimen/dp_20"
android:layout_marginEnd="@dimen/dp_20"
android:text="技术支持:湖南安瑜健康科技有限公司"
android:text="技术支持:中健三六五健康科技有限公司"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15" />
</com.ruffian.library.widget.RLinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
@ -125,4 +122,9 @@
android:textSize="@dimen/sp_13" />
</LinearLayout>
</com.ruffian.library.widget.RLinearLayout>
</LinearLayout>

@ -68,7 +68,7 @@
android:layout_height="@dimen/dp_38"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/dp_18"
android:src="@mipmap/ic_default_man" />
android:src="@mipmap/icon_default_avator" />
</RelativeLayout>

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:background="@color/col_6f7"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/title_white_bar"
android:id="@+id/title"/>
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/mRefresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/col_f4f">
<com.scwang.smart.refresh.header.ClassicsHeader
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_14"
android:layout_marginRight="@dimen/dp_14"/>
<com.scwang.smart.refresh.footer.ClassicsFooter
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>

@ -40,7 +40,7 @@
android:paddingTop="@dimen/dp_10"
android:paddingBottom="@dimen/dp_10"
android:text="@string/confirm"
android:textColor="@color/col_455"
android:textColor="@color/col_02c"
android:textSize="@dimen/sp_16"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/mTvCancel"

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/dp_28"
android:paddingLeft="@dimen/dp_16"
android:paddingRight="@dimen/dp_13"
android:paddingBottom="@dimen/dp_20"
android:background="@drawable/shape_round_white">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<com.ruffian.library.widget.RView
android:id="@+id/view"
android:layout_width="@dimen/dp_4"
android:layout_height="@dimen/dp_18"
app:background_normal="@color/col_02c"
app:corner_radius="2dp"
android:layout_centerVertical="true"
/>
<TextView
android:id="@+id/tv_info_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_17"
android:textStyle="bold"
tools:text="企业动态"
android:layout_marginLeft="@dimen/dp_10"/>
<ImageView
android:id="@+id/img_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/icon_arrow_right"
android:layout_marginLeft="@dimen/dp_5"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"/>
<TextView
android:id="@+id/tv_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="更多"
android:layout_toLeftOf="@+id/img_right"
android:layout_centerVertical="true"
android:textSize="@dimen/sp_13"
android:textColor="@color/col_6B6"/>
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_9"
android:id="@+id/recycler"/>
</LinearLayout>

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.ruffian.library.widget.RImageView
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_83"
app:is_circle="false"
android:scaleType="centerCrop"
app:corner_radius="@dimen/dp_5"
android:id="@+id/img_cover"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"/>
<TextView
android:id="@+id/tv_info_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/col_333"
android:textSize="@dimen/sp_14"
android:layout_marginTop="@dimen/dp_7"
android:textStyle="bold"
tools:text="会议全面总结了经济工作,深刻分析了当前的经济形势的深刻分析了当前的经济形势的发深刻分析了当前的经济形势的发发..."
android:maxLines="2"
android:ellipsize="end"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_16"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@+id/img_cover"
app:layout_constraintRight_toRightOf="parent"/>
<TextView
android:id="@+id/mTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:textColor="@color/col_6B6"
android:gravity="center_vertical"
android:textSize="@dimen/sp_11"
android:drawablePadding="@dimen/dp_2"
android:drawableLeft="@mipmap/icon_news_times"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginBottom="@dimen/dp_7"
app:layout_constraintLeft_toRightOf="@+id/img_cover"
app:layout_constraintBottom_toBottomOf="parent"
tools:text="2022-02-03 15:36"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_18"
android:background="@mipmap/icon_link"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/dp_7"
app:layout_constraintLeft_toRightOf="@+id/mTime"
app:layout_constraintBottom_toBottomOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -28,6 +28,7 @@ data class BreathBean(
data class Model(
var respiratory: Float,
var time: String,
var timeValue: Long = 0
)
data class Value(
@ -86,6 +87,7 @@ data class BreathBean(
Model(
Float.NaN,
dateFormat.format(currentTime),
currentTime.time
)
)
calendar.time = currentTime
@ -114,7 +116,31 @@ data class BreathBean(
// calendar.set(Calendar.MILLISECOND, 0)
// 查找对应的时间节点并更新值
val index = mappedData.indexOfFirst {
val time = model.time.toLong() * 1000
var mIndex = -1
run breaking@{
for (i in 0 until mappedData.size) {
if (mappedData[i].timeValue == time) {
mIndex = i
return@breaking
} else if (time >= (mappedData[i].timeValue - 5 * 60 * 1000) && time <= (mappedData[i].timeValue + 4 * 60 * 1000)) {
mIndex = i
return@breaking
}
mIndex = -1
}
}
if (mIndex != -1) {
val time = mappedData[mIndex].time
val lowDbp = model.respiratory
mappedData[mIndex] =
Model(lowDbp, time)
}
/*val index = mappedData.indexOfFirst {
it.time == dateFormat.format(calendar.time)
}
if (index != -1) {
@ -123,7 +149,7 @@ data class BreathBean(
mappedData[index] =
Model(lowDbp, time)
}
}*/
}
return mappedData
}

@ -41,7 +41,8 @@ data class MainBean(
val time: String,
val message: String,
val value: String,
val status: Int
val status: Int,
val count:String,
)
//尿酸
@ -50,7 +51,8 @@ data class MainBean(
val message: String,
val value: String,
val status: Int,
val expireTime: String
val expireTime: String,
val count:String,
)
//血糖数据
@ -62,7 +64,8 @@ data class MainBean(
val max: Float,
val min: Float,
val errorMsg: String,
val expireTime: String
val expireTime: String,
val count:String,
)
//步数
@ -95,7 +98,8 @@ data class MainBean(
val DDbp: Int,
val DbpMessage: String,
val DbpTime: String,
val GDbp: Int
val GDbp: Int,
val count:String,
)
//心电
@ -103,35 +107,40 @@ data class MainBean(
val hrvNorm: String,
val hrData: String,
val heartTime: String,
val heartTimeV2: String
val heartTimeV2: String,
val count:String,
)
//心率
data class HrData(
val hr: Int,
val hrMessage: String,
val hrTime: String
val hrTime: String,
val count:String,
)
//呼吸率
data class RespiratoryData(
val respiratory: Int,
val respiratoryMessage: String,
val respiratoryTime: String
val respiratoryTime: String,
val count:String,
)
//睡眠
data class SleepData(
val sleep: Int,
val sleepMessage: String,
val sleepTime: Int
val sleepTime: Int,
val count:String,
)
//血氧
data class SoData(
val so: Int,
val soMessage: String,
val soTime: String
val soTime: String,
val count:String,
)
//体温
@ -139,7 +148,8 @@ data class MainBean(
val tempFloat: Int,
val tempInt: Int,
val tempMessage: String,
val tempTime: String
val tempTime: String,
val count:String,
)
data class User(

@ -36,6 +36,7 @@ data class TempBean(
var tempInt: Float,
var temp: Float,
var time: String,
var timeValue: Long = 0
)
data class Value(
@ -106,6 +107,7 @@ data class TempBean(
Float.NaN,
Float.NaN,
dateFormat.format(currentTime),
currentTime.time
)
)
calendar.time = currentTime
@ -118,30 +120,27 @@ data class TempBean(
for (model in dataList) {
calendar.timeInMillis = model.time.toLong() * 1000
// val timestamp = model.time.toLong() // 将时间戳字符串转换为长整型
// val time = Date.from(Instant.ofEpochSecond(timestamp)) // 使用 Instant 类转换为 Date 对象
// calendar.time = time
//
//// val timeStr = model.time
//// val time = dateFormat.parse(timeStr) // 将字符串转换为 Date 类型
//// calendar.time = time as Date
//
// // 舍弃分钟数为 10 的倍数以外的部分,进行四舍五入
// val minute = calendar.get(Calendar.MINUTE)
// val roundedMinute = (minute / 10.0).roundToInt() * 10
// calendar.set(Calendar.MINUTE, roundedMinute.toInt())
// calendar.set(Calendar.SECOND, 0)
// calendar.set(Calendar.MILLISECOND, 0)
// 查找对应的时间节点并更新值
val index = mappedData.indexOfFirst {
it.time == dateFormat.format(calendar.time)
val time = model.time.toLong() * 1000
var mIndex = -1
run breaking@{
for (i in 0 until mappedData.size) {
if (mappedData[i].timeValue == time) {
mIndex = i
return@breaking
} else if (time >= (mappedData[i].timeValue - 5 * 60 * 1000) && time <= (mappedData[i].timeValue + 4 * 60 * 1000)) {
mIndex = i
return@breaking
}
if (index != -1) {
val time = dateFormat.format(calendar.time)
mIndex = -1
}
}
if (mIndex != -1) {
val time = mappedData[mIndex].time
val lowDbp = model.temp
mappedData[index] =
mappedData[mIndex] =
Model(
lowDbp,
lowDbp,

@ -14,6 +14,8 @@ data class UserEquipmentInformationizationBean(
val watchType: Int,//设备类型0蓝牙14G
val power: String,//电量
val linkStatus: String,//连接状态
val iccid:String,//物联网卡
val flowExpireTime:String,//流量到期时间
val deviceTotal: DeviceTotal,//物联网设备统计
val adorn: Adorn,//佩戴时长对象
) : Serializable {

@ -21,7 +21,8 @@ data class XlBean(
) {
data class Model(
var hrData: Float,
var time: String
var time: String,
var timeValue: Long = 0
)
data class Value(
@ -78,42 +79,43 @@ data class XlBean(
Model(
Float.NaN,
dateFormat.format(currentTime),
currentTime.time
)
)
calendar.time = currentTime
calendar.add(Calendar.MINUTE, 10)
currentTime = calendar.time
}
// val timestamp = 1688631900L
// val time = Date(timestamp * 1000)
// 将数据集合中的时间映射到时间节点上
for (model in dataList) {
calendar.timeInMillis = model.time.toLong() * 1000
// val timestamp = model.time.toLong() // 将时间戳字符串转换为长整型
// val time = Date.from(Instant.ofEpochSecond(timestamp)) // 使用 Instant 类转换为 Date 对象
// calendar.time = time
//
//// val timeStr = model.time
//// val time = dateFormat.parse(timeStr) // 将字符串转换为 Date 类型
//// calendar.time = time as Date
//
// // 舍弃分钟数为 10 的倍数以外的部分,进行四舍五入
// val minute = calendar.get(Calendar.MINUTE)
// val roundedMinute = (minute / 10.0).roundToInt() * 10
// calendar.set(Calendar.MINUTE, roundedMinute.toInt())
// calendar.set(Calendar.SECOND, 0)
// calendar.set(Calendar.MILLISECOND, 0)
// 查找对应的时间节点并更新值
val index = mappedData.indexOfFirst {
it.time == dateFormat.format(calendar.time)
val time = model.time.toLong() * 1000
var mIndex = -1
run breaking@{
for (i in 0 until mappedData.size) {
if (mappedData[i].timeValue == time) {
mIndex = i
return@breaking
} else if (time >= (mappedData[i].timeValue - 5 * 60 * 1000) && time <= (mappedData[i].timeValue + 4 * 60 * 1000)) {
mIndex = i
return@breaking
}
mIndex = -1
}
if (index != -1) {
val time = dateFormat.format(calendar.time)
}
/* val index = mappedData.indexOfFirst {
it.time == dateFormat.format(calendar.time)
}*/
if (mIndex != -1) {
val time = mappedData[mIndex].time
val lowDbp = model.hrData
mappedData[index] = Model(lowDbp, time)
mappedData[mIndex] = Model(lowDbp, time)
}
}

@ -19,7 +19,8 @@ data class XtNewBean(
data class Model(
var xtDate: Float,
var time: String
var time: String,
var timeValue: Long = 0
)
data class Value(
@ -77,6 +78,7 @@ data class XtNewBean(
XtNewBean.Model(
Float.NaN,
dateFormat.format(currentTime),
currentTime.time
)
)
calendar.time = currentTime

@ -26,6 +26,7 @@ data class XyBean(
data class Model(
var soData: Float,
var time: String,
var timeValue: Long = 0
)
data class Value(
@ -85,6 +86,7 @@ data class XyBean(
Model(
Float.NaN,
dateFormat.format(currentTime),
currentTime.time
)
)
calendar.time = currentTime
@ -113,16 +115,33 @@ data class XyBean(
// calendar.set(Calendar.MILLISECOND, 0)
// 查找对应的时间节点并更新值
val index = mappedData.indexOfFirst {
it.time == dateFormat.format(calendar.time)
val time = model.time.toLong() * 1000
var mIndex = -1
run breaking@{
for (i in 0 until mappedData.size) {
if (mappedData[i].timeValue == time) {
mIndex = i
return@breaking
} else if (time >= (mappedData[i].timeValue - 5 * 60 * 1000) && time <= (mappedData[i].timeValue + 4 * 60 * 1000)) {
mIndex = i
return@breaking
}
mIndex = -1
}
}
if (index != -1) {
val time = dateFormat.format(calendar.time)
/* val index = mappedData.indexOfFirst {
it.time == dateFormat.format(calendar.time)
}*/
if (mIndex != -1) {
val time = mappedData[mIndex].time
val lowDbp = model.soData
mappedData[index] =
mappedData[mIndex] =
Model(lowDbp, time)
}
}
return mappedData

Loading…
Cancel
Save