Commit 88e88305 by chengxiuhong

test main

parent 8be96b47
......@@ -576,18 +576,18 @@ public class EyeTestActivity extends BaseActivity {
DbManager.getDaoSession(EyeTestActivity.this).insert(measureStudent);
}else{
Map<String, String> map = new HashMap<>();
map.put("sid", measureStudent.getSid());
map.put("uid", measureStudent.getUid());
map.put("sid", !CheckUtil.isEmpty(measureStudent.getSid())?measureStudent.getSid():"");
map.put("uid", !CheckUtil.isEmpty(measureStudent.getUid())?measureStudent.getUid():"");
map.put("eid", "0");
map.put("left_eye", ""+left);
map.put("right_eye", ""+right);
map.put("distance", ""+(mDistance ==EyeConfig.EYE_DISTANCE_5?5:2.5) );
map.put("deviceId", Build.ID);
map.put("pid", measureStudent.getPid());
map.put("pid", !CheckUtil.isEmpty(measureStudent.getPid())?measureStudent.getPid():"");
EyeDataManager.getInstance().postEyeTestData(map).observeOn(AndroidSchedulers.mainThread())
.subscribe(new RxCallback<OldResponseImpl<String>>() {
.subscribe(new RxCallback<OldResponseImpl<Object>>() {
@Override
protected void onSuccess(OldResponseImpl<String> stringOldResponse) {
protected void onSuccess(OldResponseImpl<Object> stringOldResponse) {
ToastUtil.showLongMessage("视力数据保存成功");
}
......
......@@ -66,10 +66,10 @@ public class SinglePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, It
bean.setChick(true);
}
}
if (!bean.getNumber().equals(lastSelectBean.getNumber())) {
if (!CheckUtil.isNull(lastSelectBean) && !bean.getNumber().equals(lastSelectBean.getNumber())) {
lastSelectBean.setChick(false);
lastSelectBean = bean;
}
lastSelectBean = bean;
notifyDataSetChanged();
}
});
......
......@@ -25,7 +25,7 @@ public interface EyeApiService {
*/
@FormUrlEncoded
@POST(NetConfig.ADD_EYE)
Observable<OldResponseImpl<String>> postEyeTestData(@FieldMap Map<String ,String> params);
Observable<OldResponseImpl<Object>> postEyeTestData(@FieldMap Map<String ,String> params);
/**
* 获取学校信息
*/
......
......@@ -39,7 +39,7 @@ public class EyeDataManager {
/**
* 上传视力测试结果
*/
public Observable<OldResponseImpl<String>> postEyeTestData(Map<String ,String> params){
public Observable<OldResponseImpl<Object>> postEyeTestData(Map<String ,String> params){
return EyeNetManager.getInstance().getApiService(EyeApiService.class).postEyeTestData(params)
.subscribeOn(Schedulers.io());
}
......
......@@ -114,6 +114,7 @@
android:orientation="vertical">
<EditText
android:textColor="@color/white"
android:id="@+id/key_test"
android:layout_width="140dip"
android:layout_height="wrap_content"
......
......@@ -195,6 +195,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_6"
android:background="@null"
android:textColor="@color/white"
android:hint="输入学员编号后4位"
android:textColorHint="@color/hint_text_color"
android:textSize="@dimen/sp_16" />
......
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