提交 8e7f3e51 authored 作者: lgd's avatar lgd

1.修改部门账户显示

上级 9e9f9524
...@@ -155,6 +155,15 @@ public class FlowBean { ...@@ -155,6 +155,15 @@ public class FlowBean {
private String targetName; private String targetName;
private String sourceName; private String sourceName;
private String causeText; private String causeText;
private String flowAccountDeptName;
public String getFlowAccountDeptName() {
return flowAccountDeptName;
}
public void setFlowAccountDeptName(String flowAccountDeptName) {
this.flowAccountDeptName = flowAccountDeptName;
}
public String getCauseText() { public String getCauseText() {
return causeText; return causeText;
......
...@@ -59,7 +59,7 @@ public class WorkAccountFlowActivity extends WorkToolBarActivity { ...@@ -59,7 +59,7 @@ public class WorkAccountFlowActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
clientList = new ArrayList<>(); clientList = new ArrayList<>();
clientAdapter = new WorkFlowAdapter(R.layout.item_work_flow, clientList); clientAdapter = new WorkFlowAdapter(R.layout.item_work_flow, clientList,2);
clientAdapter.bindToRecyclerView(rvData); clientAdapter.bindToRecyclerView(rvData);
clientAdapter.setEmptyView(R.layout.view_empty_content,rvData); clientAdapter.setEmptyView(R.layout.view_empty_content,rvData);
param = WorkUtils.pageKey(); param = WorkUtils.pageKey();
......
...@@ -91,7 +91,7 @@ public class UserMoneyDetailActivity extends WorkToolBarActivity { ...@@ -91,7 +91,7 @@ public class UserMoneyDetailActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
clientList = new ArrayList<>(); clientList = new ArrayList<>();
clientAdapter = new WorkFlowAdapter(R.layout.item_work_flow, clientList); clientAdapter = new WorkFlowAdapter(R.layout.item_work_flow, clientList,1);
clientAdapter.bindToRecyclerView(rvData); clientAdapter.bindToRecyclerView(rvData);
clientAdapter.setEmptyView(R.layout.view_empty_content, rvData); clientAdapter.setEmptyView(R.layout.view_empty_content, rvData);
getAccountData(); getAccountData();
......
package com.wd.workoffice.ui.adapter; package com.wd.workoffice.ui.adapter;
import android.text.TextUtils;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder; import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.bean.FlowBean; import com.wd.workoffice.bean.FlowBean;
import com.wd.workoffice.bean.ProPriceBean;
import com.wd.workoffice.util.MathUtils; import com.wd.workoffice.util.MathUtils;
import java.util.List; import java.util.List;
...@@ -17,9 +14,11 @@ import java.util.List; ...@@ -17,9 +14,11 @@ import java.util.List;
*/ */
public class WorkFlowAdapter extends BaseQuickAdapter<FlowBean.RecordsBean, BaseViewHolder> { public class WorkFlowAdapter extends BaseQuickAdapter<FlowBean.RecordsBean, BaseViewHolder> {
int type;//1 我的-部门账户 2 其他
public WorkFlowAdapter(int layoutResId, List data) { public WorkFlowAdapter(int layoutResId, List data,int type) {
super(layoutResId, data); super(layoutResId, data);
this.type=type;
} }
...@@ -29,7 +28,11 @@ public class WorkFlowAdapter extends BaseQuickAdapter<FlowBean.RecordsBean, Base ...@@ -29,7 +28,11 @@ public class WorkFlowAdapter extends BaseQuickAdapter<FlowBean.RecordsBean, Base
helper.setText(R.id.tv_price, MathUtils.converData(item.getMoney(),3)); helper.setText(R.id.tv_price, MathUtils.converData(item.getMoney(),3));
helper.setText(R.id.tv_time, item.getCreatedTime()); helper.setText(R.id.tv_time, item.getCreatedTime());
helper.setText(R.id.tv_desc, item.getDisplayTypeName()); helper.setText(R.id.tv_desc, item.getDisplayTypeName());
helper.setText(R.id.tv_dep, item.getCustomerName()); if (type==1){
helper.setText(R.id.tv_dep, item.getFlowAccountDeptName());
}else {
helper.setText(R.id.tv_dep, item.getReceiveDeptName());
}
} }
} }
...@@ -148,6 +148,7 @@ ...@@ -148,6 +148,7 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data" android:id="@+id/rv_data"
android:layout_marginTop="10mm"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论