Commit 8dcec633 authored by 小费同学阿's avatar 小费同学阿 💬 Committed by 杨秀秀

反馈端解决打开详情崩溃的问题

parent 5098de85
...@@ -20,7 +20,7 @@ class MessageRequest : BaseRespons() { ...@@ -20,7 +20,7 @@ class MessageRequest : BaseRespons() {
/** /**
* 改变消息状态位 * 改变消息状态位
*/ */
fun putMessageStaticUpdate(businessId:String):Observable<BaseResponse<Boolean>> fun putMessageStaticUpdate(businessId:String):Observable<BaseResponse<Number>>
{ {
return apiService.putMessageStaticUpdate(ApiParams<MessageStaticUpdateBody>().setParams(MessageStaticUpdateBody(businessId,"1"))) return apiService.putMessageStaticUpdate(ApiParams<MessageStaticUpdateBody>().setParams(MessageStaticUpdateBody(businessId,"1")))
} }
......
...@@ -9,8 +9,8 @@ data class MessageBean( ...@@ -9,8 +9,8 @@ data class MessageBean(
var messageContent:String, var messageContent:String,
/*messageType string 操作类型*/ /*messageType string 操作类型*/
var messageType:String, var messageType:String,
/*flag Number 消息标记 0-未读 1-已读*/ /*flag String 消息标记 0-未读 1-已读*/
var flag:Number var flag:String
) { ) {
} }
\ No newline at end of file
...@@ -102,9 +102,9 @@ public class MessageViewModel extends ListBaseViewModel<MessageRequest> { ...@@ -102,9 +102,9 @@ public class MessageViewModel extends ListBaseViewModel<MessageRequest> {
@Override @Override
public void accept(Disposable disposable) throws Exception { public void accept(Disposable disposable) throws Exception {
} }
}).subscribe(new ApiDisposableObserver<Boolean>() { }).subscribe(new ApiDisposableObserver<Number>() {
@Override @Override
public void onSuccess(Boolean resultBean) { public void onSuccess(Number resultBean) {
} }
......
...@@ -17,7 +17,7 @@ class MessageRequest : BaseRespons() { ...@@ -17,7 +17,7 @@ class MessageRequest : BaseRespons() {
/** /**
* 改变消息状态位 * 改变消息状态位
*/ */
fun putMessageStaticUpdate(businessId:String):Observable<BaseResponse<Boolean>> fun putMessageStaticUpdate(businessId:String):Observable<BaseResponse<Number>>
{ {
return apiService.putMessageStaticUpdate(ApiParams<MessageStaticUpdateBody>().setParams(MessageStaticUpdateBody(businessId,"1"))) return apiService.putMessageStaticUpdate(ApiParams<MessageStaticUpdateBody>().setParams(MessageStaticUpdateBody(businessId,"1")))
} }
......
...@@ -9,8 +9,8 @@ data class MessageBean( ...@@ -9,8 +9,8 @@ data class MessageBean(
var messageContent:String, var messageContent:String,
/*messageType string 操作类型*/ /*messageType string 操作类型*/
var messageType:String, var messageType:String,
/*flag Number 消息标记 0-未读 1-已读*/ /*flag String 消息标记 0-未读 1-已读*/
var flag:Number var flag:String
) { ) {
} }
\ No newline at end of file
...@@ -95,7 +95,6 @@ public class AppealHandleActivity extends BaseActivity<ActivityAppealHandleBindi ...@@ -95,7 +95,6 @@ public class AppealHandleActivity extends BaseActivity<ActivityAppealHandleBindi
/*单选按钮*/ /*单选按钮*/
// 获取分配信息选择的RadioGroup // 获取分配信息选择的RadioGroup
RadioGroup allocationRadioGroup = findViewById(R.id.radio_group); RadioGroup allocationRadioGroup = findViewById(R.id.radio_group);
viewModel.initAllocationListener(allocationRadioGroup); viewModel.initAllocationListener(allocationRadioGroup);
} }
......
...@@ -23,6 +23,7 @@ import com.xx.hbhbcompany.data.http.respons.Filebean; ...@@ -23,6 +23,7 @@ import com.xx.hbhbcompany.data.http.respons.Filebean;
import com.xx.hbhbcompany.data.local.LocalData; import com.xx.hbhbcompany.data.local.LocalData;
import com.xx.hbhbcompany.app.dialog.AppealDeptListDialog; import com.xx.hbhbcompany.app.dialog.AppealDeptListDialog;
import com.xx.hbhbcompany.app.dialog.data.TextListProvider; import com.xx.hbhbcompany.app.dialog.data.TextListProvider;
import com.xx.hbhbcompany.data.staticdata.StaticData;
import com.xx.hbhbcompany.ui.appeallist.AppealListActivity; import com.xx.hbhbcompany.ui.appeallist.AppealListActivity;
import com.xx.hbhbcompany.ui.home.HomeActivity; import com.xx.hbhbcompany.ui.home.HomeActivity;
import com.xx.xxviewlibrary.base.xxBaseDialog; import com.xx.xxviewlibrary.base.xxBaseDialog;
...@@ -164,14 +165,15 @@ public class AppealHandleViewModel extends BaseViewModel<AppealRequest> { ...@@ -164,14 +165,15 @@ public class AppealHandleViewModel extends BaseViewModel<AppealRequest> {
Log.v("businessId啊啊啊啊", appealId); Log.v("businessId啊啊啊啊", appealId);
/*对于是本部门,延时处理,驳回做判断*/ /*对于是本部门,延时处理,驳回做判断*/
if (allocationValue.equals("0")) { if (StaticData.AppealAllocationData==0) {
type = "0"; type = "0";
} else if (allocationValue.equals("1")) { } else if (StaticData.AppealAllocationData==1) {
type = "1"; type = "1";
} else { } else {
type = "2"; type = "2";
} }
Log.v("类型啊啊啊啊啊啊啊", type);
/*调用反馈接口*/ /*调用反馈接口*/
/*依次传入businessId,描述,图片,类型字段*/ /*依次传入businessId,描述,图片,类型字段*/
/*调用request的添加接口*/ /*调用request的添加接口*/
...@@ -210,10 +212,24 @@ public class AppealHandleViewModel extends BaseViewModel<AppealRequest> { ...@@ -210,10 +212,24 @@ public class AppealHandleViewModel extends BaseViewModel<AppealRequest> {
@Override @Override
public void onCheckedChanged(RadioGroup group, int checkedId) { public void onCheckedChanged(RadioGroup group, int checkedId) {
RadioButton radioButton = group.findViewById(checkedId); RadioButton radioButton = group.findViewById(checkedId);
if (radioButton != null) {
allocation.set(radioButton.getText().toString());
Log.v("分配的值啊啊啊啊", String.valueOf(allocation.get()));
/*分配信息,0=分配,1=驳回*/
/*转换!!!!!!!!!!!!!!!!!!!!*/
allocationValue.setValue(allocation.get());
Log.v("allocationValue刚开始的值", String.valueOf(allocationValue));
if (allocationValue.getValue().equals("本部门处理")) {
StaticData.AppealAllocationData = 0;
} else if(allocationValue.getValue().equals("延时处理")) {
StaticData.AppealAllocationData = 1;
}else {
StaticData.AppealAllocationData = 2;
}
}
} }
}); });
} }
/*上传反馈图片*/ /*上传反馈图片*/
public void openPhoto(AddImgAdapter type, int position) { public void openPhoto(AddImgAdapter type, int position) {
......
...@@ -103,9 +103,9 @@ public class MessageViewModel extends ListBaseViewModel<MessageRequest> { ...@@ -103,9 +103,9 @@ public class MessageViewModel extends ListBaseViewModel<MessageRequest> {
@Override @Override
public void accept(Disposable disposable) throws Exception { public void accept(Disposable disposable) throws Exception {
} }
}).subscribe(new ApiDisposableObserver<Boolean>() { }).subscribe(new ApiDisposableObserver<Number>() {
@Override @Override
public void onSuccess(Boolean resultBean) { public void onSuccess(Number resultBean) {
} }
......
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