<activity android:name=".project.ui.activity.ContainerActivity" | <activity android:name=".project.ui.activity.ContainerActivity" | ||||
android:launchMode="singleTop" | android:launchMode="singleTop" | ||||
android:screenOrientation="portrait" /> | android:screenOrientation="portrait" /> | ||||
<activity android:name=".project.ui.activity.after.AfterSaleShDetailActivity" | |||||
android:launchMode="singleTop" | |||||
android:screenOrientation="portrait"/> | |||||
<service android:name="com.amap.api.location.APSService" /> <!-- Since JCore2.0.0 Required SDK核心功能 --> | <service android:name="com.amap.api.location.APSService" /> <!-- Since JCore2.0.0 Required SDK核心功能 --> | ||||
<!-- 可配置android:process参数将Service放在其他进程中;android:enabled属性不能是false --> | <!-- 可配置android:process参数将Service放在其他进程中;android:enabled属性不能是false --> |
public static final String IFCODE_KNOWLEDGE_TYPE = "iaw/knowledgeBase/typeQuery";//枚举类型 | public static final String IFCODE_KNOWLEDGE_TYPE = "iaw/knowledgeBase/typeQuery";//枚举类型 | ||||
public static final String IFCODE_AFTERSALE_SH_DETAIL = "iaw/knowledgeBase/afterSaleAudit/view";//售后审核详情 | |||||
public static final String IFCODE_AFTERSALE_SH = "iaw/knowledgeBase/afterSaleAudit/query"; //售后订单审核知识库查询 | public static final String IFCODE_AFTERSALE_SH = "iaw/knowledgeBase/afterSaleAudit/query"; //售后订单审核知识库查询 | ||||
// public static final String IFCODE_JGQUANYI = "074017442f7d40c4bb63da780c253b55";//加购权益列表暂时不用 | // public static final String IFCODE_JGQUANYI = "074017442f7d40c4bb63da780c253b55";//加购权益列表暂时不用 |
public static class productModel extends Products { | public static class productModel extends Products { | ||||
} | } | ||||
public static class AfterSaleAudit { | |||||
private String applicablePerson; | |||||
private String applicableReason; | |||||
private String auditDeadline; | |||||
private String auditNotice; | |||||
private String auditResult; | |||||
private String category; | |||||
private String id; | |||||
private String insertTime; | |||||
private String level1; | |||||
private String materials; | |||||
private String orderSource; | |||||
private String querySteps; | |||||
private String staff; | |||||
private String status; | |||||
private String updateTime; | |||||
public void setApplicablePerson(String applicablePerson) { | |||||
this.applicablePerson = applicablePerson; | |||||
} | |||||
public String getApplicablePerson() { | |||||
return applicablePerson; | |||||
} | |||||
public void setApplicableReason(String applicableReason) { | |||||
this.applicableReason = applicableReason; | |||||
} | |||||
public String getApplicableReason() { | |||||
return applicableReason; | |||||
} | |||||
public void setAuditDeadline(String auditDeadline) { | |||||
this.auditDeadline = auditDeadline; | |||||
} | |||||
public String getAuditDeadline() { | |||||
return auditDeadline; | |||||
} | |||||
public void setAuditNotice(String auditNotice) { | |||||
this.auditNotice = auditNotice; | |||||
} | |||||
public String getAuditNotice() { | |||||
return auditNotice; | |||||
} | |||||
public void setAuditResult(String auditResult) { | |||||
this.auditResult = auditResult; | |||||
} | |||||
public String getAuditResult() { | |||||
return auditResult; | |||||
} | |||||
public void setCategory(String category) { | |||||
this.category = category; | |||||
} | |||||
public String getCategory() { | |||||
return category; | |||||
} | |||||
public void setId(String id) { | |||||
this.id = id; | |||||
} | |||||
public String getId() { | |||||
return id; | |||||
} | |||||
public void setInsertTime(String insertTime) { | |||||
this.insertTime = insertTime; | |||||
} | |||||
public String getInsertTime() { | |||||
return insertTime; | |||||
} | |||||
public void setLevel1(String level1) { | |||||
this.level1 = level1; | |||||
} | |||||
public String getLevel1() { | |||||
return level1; | |||||
} | |||||
public void setMaterials(String materials) { | |||||
this.materials = materials; | |||||
} | |||||
public String getMaterials() { | |||||
return materials; | |||||
} | |||||
public void setOrderSource(String orderSource) { | |||||
this.orderSource = orderSource; | |||||
} | |||||
public String getOrderSource() { | |||||
return orderSource; | |||||
} | |||||
public void setQuerySteps(String querySteps) { | |||||
this.querySteps = querySteps; | |||||
} | |||||
public String getQuerySteps() { | |||||
return querySteps; | |||||
} | |||||
public void setStaff(String staff) { | |||||
this.staff = staff; | |||||
} | |||||
public String getStaff() { | |||||
return staff; | |||||
} | |||||
public void setStatus(String status) { | |||||
this.status = status; | |||||
} | |||||
public String getStatus() { | |||||
return status; | |||||
} | |||||
public void setUpdateTime(String updateTime) { | |||||
this.updateTime = updateTime; | |||||
} | |||||
public String getUpdateTime() { | |||||
return updateTime; | |||||
} | |||||
} | |||||
public static class BlackCard{ | public static class BlackCard{ | ||||
public String cardId;//卡号 | public String cardId;//卡号 | ||||
package com.huntersun.vkyes.etcopencard.project.ui.activity.after; | |||||
import android.content.Intent; | |||||
import android.net.Uri; | |||||
import android.view.View; | |||||
import com.alibaba.fastjson.JSONObject; | |||||
import com.google.gson.internal.LinkedTreeMap; | |||||
import com.huntersun.vkyes.etcopencard.databinding.ActivityAddObuStep1Binding; | |||||
import com.huntersun.vkyes.etcopencard.databinding.ActivityAftersaleShDetailBinding; | |||||
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||||
import com.huntersun.vkyes.etcopencard.project.api.bean.IFCode; | |||||
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | |||||
import com.huntersun.vkyes.etcopencard.project.utils.FileUtils; | |||||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||||
import java.util.HashMap; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
public class AfterSaleShDetailActivity extends AppActivity { | |||||
ActivityAftersaleShDetailBinding binding; | |||||
String viewId; | |||||
ResultBean.BizContent.AfterSaleAudit afterSaleAudit; | |||||
@Override | |||||
protected View getLayoutView() { | |||||
binding = ActivityAftersaleShDetailBinding.inflate(getLayoutInflater()); | |||||
return binding.getRoot(); | |||||
} | |||||
@Override | |||||
protected void initView() { | |||||
viewId = getIntent().getStringExtra("viewId"); | |||||
binding.upload.setOnClickListener(new View.OnClickListener() { | |||||
@Override | |||||
public void onClick(View view) { | |||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT); | |||||
intent.setType("*/*"); // 设置文件类型 | |||||
intent.addCategory(Intent.CATEGORY_OPENABLE); | |||||
startActivityForResult(Intent.createChooser(intent, "选择文件"), 100); | |||||
} | |||||
}); | |||||
getData(); | |||||
} | |||||
void getData(){ | |||||
Map<String,String> params = new HashMap<>(); | |||||
params.put("viewId",viewId); | |||||
MyRetrofit.newInstanceGZ(IFCode.IFCODE_AFTERSALE_SH_DETAIL, params, new MyRetrofit.ReturnResult() { | |||||
@Override | |||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||||
LinkedTreeMap<String,Object> linkedTreeMap = JSONObject.parseObject(resultBean.getData().toString(),LinkedTreeMap.class); | |||||
afterSaleAudit = JSONObject.parseObject(linkedTreeMap.get("afterSaleAudit").toString(), ResultBean.BizContent.AfterSaleAudit.class); | |||||
setData(); | |||||
} | |||||
} | |||||
); | |||||
} | |||||
void setData(){ | |||||
binding.tvCategory.setText(afterSaleAudit.getCategory()); | |||||
binding.tvPeople.setText(afterSaleAudit.getApplicablePerson()); | |||||
binding.tvLevel1.setText(afterSaleAudit.getLevel1()); | |||||
binding.tvFrom.setText(afterSaleAudit.getOrderSource()); | |||||
binding.tvQueryStep.setText(afterSaleAudit.getQuerySteps()); | |||||
binding.tvZl.setText(afterSaleAudit.getMaterials()); | |||||
binding.tvSh.setText(afterSaleAudit.getAuditResult()); | |||||
binding.tvShjg.setText(afterSaleAudit.getAuditNotice()); | |||||
binding.tvShTime.setText(afterSaleAudit.getAuditDeadline()); | |||||
} | |||||
@Override | |||||
protected void initData() { | |||||
} | |||||
// 处理文件选择结果 | |||||
@Override | |||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) { | |||||
super.onActivityResult(requestCode, resultCode, data); | |||||
if (requestCode == 100 && resultCode == RESULT_OK && data != null) { | |||||
// 获取文件的 URI | |||||
Uri fileUri = data.getData(); | |||||
if (fileUri != null) { | |||||
FileUtils.getInstance(this).uploadFile(fileUri, new FileUtils.OnFileUpLoadCallback() { | |||||
@Override | |||||
public void fileCallback(String url, String fileName) { | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
} | |||||
} |
} | } | ||||
}); | }); | ||||
ContainerActivity.startActivity(this, "售后订单审核查询", AfterSaleShFragment.class.getName()); | |||||
ContainerActivity.startActivity(this, "售后订单审核", AfterSaleShFragment.class.getName()); | |||||
} | } | ||||
/* 获取枚举值 */ | /* 获取枚举值 */ |
import com.huntersun.vkyes.etcopencard.project.api.bean.IFCode; | import com.huntersun.vkyes.etcopencard.project.api.bean.IFCode; | ||||
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | ||||
import com.huntersun.vkyes.etcopencard.project.ui.activity.KnowledgeInfoActivity; | import com.huntersun.vkyes.etcopencard.project.ui.activity.KnowledgeInfoActivity; | ||||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.AfterSaleShDetailActivity; | |||||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.KnowledgeActivity; | import com.huntersun.vkyes.etcopencard.project.ui.activity.after.KnowledgeActivity; | ||||
import com.huntersun.vkyes.etcopencard.project.view.CommonItemDecoration; | import com.huntersun.vkyes.etcopencard.project.view.CommonItemDecoration; | ||||
import com.huntersun.vkyes.etcopencard.src.app.AppFragment; | import com.huntersun.vkyes.etcopencard.src.app.AppFragment; | ||||
import com.scwang.smart.refresh.layout.api.RefreshLayout; | |||||
import com.scwang.smart.refresh.layout.listener.OnRefreshListener; | |||||
import com.scwang.smart.refresh.layout.listener.OnRefreshLoadMoreListener; | |||||
import java.util.Arrays; | import java.util.Arrays; | ||||
import java.util.HashMap; | import java.util.HashMap; | ||||
import java.util.List; | import java.util.List; | ||||
import java.util.Map; | import java.util.Map; | ||||
public class AfterSaleShFragment extends AppFragment { | |||||
public class AfterSaleShFragment extends AppFragment implements OnRefreshLoadMoreListener, OnRefreshListener { | |||||
FragmentAftersaleShBinding binding; | FragmentAftersaleShBinding binding; | ||||
ArrayAdapter<String> categoriesAdapter; | ArrayAdapter<String> categoriesAdapter; | ||||
private int pageNo = 1; | |||||
private int sizeNo = 10; | |||||
@Override | @Override | ||||
protected View getLayoutView(LayoutInflater inflater, ViewGroup container) { | protected View getLayoutView(LayoutInflater inflater, ViewGroup container) { | ||||
binding = FragmentAftersaleShBinding.inflate(inflater); | binding = FragmentAftersaleShBinding.inflate(inflater); | ||||
} | } | ||||
BaseQuickAdapter<ResultBean.BizContent, BaseViewHolder> adapter = new BaseQuickAdapter<ResultBean.BizContent, BaseViewHolder>(R.layout.item_knowledge_1) { | |||||
BaseQuickAdapter<ResultBean.BizContent.AfterSaleAudit, BaseViewHolder> adapter = new BaseQuickAdapter<ResultBean.BizContent.AfterSaleAudit, BaseViewHolder>(R.layout.item_knowledge_1) { | |||||
@Override | @Override | ||||
protected void convert(@NonNull BaseViewHolder holder, ResultBean.BizContent bizContent) { | |||||
holder.setText(R.id.tv_style,bizContent.problemType); | |||||
holder.setText(R.id.tv_question,bizContent.problemName); | |||||
protected void convert(@NonNull BaseViewHolder holder, ResultBean.BizContent.AfterSaleAudit bizContent) { | |||||
holder.setText(R.id.tv_style,bizContent.getCategory()); | |||||
holder.setText(R.id.tv_question,bizContent.getLevel1()); | |||||
holder.setText(R.id.tv_people,bizContent.getStaff()); | |||||
holder.addOnClickListener(R.id.ly_program); | holder.addOnClickListener(R.id.ly_program); | ||||
} | } | ||||
}; | }; | ||||
switch (view.getId()){ | switch (view.getId()){ | ||||
case R.id.ly_program: | case R.id.ly_program: | ||||
Intent intent = new Intent(); | Intent intent = new Intent(); | ||||
intent.putExtra("bizContent", JSON.toJSONString(adapter.getItem(i))); | |||||
intent.setClass(getContext(), KnowledgeInfoActivity.class); | |||||
intent.putExtra("viewId", adapter.getItem(i).getId()); | |||||
intent.setClass(getContext(), AfterSaleShDetailActivity.class); | |||||
startActivity(intent); | startActivity(intent); | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
}); | }); | ||||
binding.mRefresh.setOnRefreshListener(this); | |||||
binding.mRefresh.setOnLoadMoreListener(this); | |||||
binding.btnSearch.setOnClickListener(new View.OnClickListener() { | binding.btnSearch.setOnClickListener(new View.OnClickListener() { | ||||
@Override | @Override | ||||
public void onClick(View view) { | public void onClick(View view) { | ||||
pageNo = 1; | |||||
query(); | query(); | ||||
} | } | ||||
}); | }); | ||||
params.put("other", keyWord); | params.put("other", keyWord); | ||||
params.put("category", category); | params.put("category", category); | ||||
params.put("level1", level1); | params.put("level1", level1); | ||||
params.put("pageNo",pageNo+""); | |||||
params.put("pageSize",sizeNo+""); | |||||
// 调用查询接口 | // 调用查询接口 | ||||
MyRetrofit.newInstanceGZ(IFCode.IFCODE_AFTERSALE_SH, params, new MyRetrofit.ReturnResult() { | MyRetrofit.newInstanceGZ(IFCode.IFCODE_AFTERSALE_SH, params, new MyRetrofit.ReturnResult() { | ||||
@Override | @Override | ||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | ||||
LinkedTreeMap<String,Object> linkedTreeMap = JSONObject.parseObject(resultBean.getData().toString(),LinkedTreeMap.class); | LinkedTreeMap<String,Object> linkedTreeMap = JSONObject.parseObject(resultBean.getData().toString(),LinkedTreeMap.class); | ||||
List<ResultBean.BizContent> result = JSONObject.parseArray(linkedTreeMap.get("result").toString(), ResultBean.BizContent.class); | |||||
List<ResultBean.BizContent.AfterSaleAudit> result = JSONObject.parseArray(linkedTreeMap.get("result").toString(), ResultBean.BizContent.AfterSaleAudit.class); | |||||
if (null!=result&&!result.isEmpty()){ | if (null!=result&&!result.isEmpty()){ | ||||
adapter.replaceData(result); | |||||
if (pageNo==1) { | |||||
adapter.replaceData(result); | |||||
}else { | |||||
adapter.addData(result); | |||||
} | |||||
}else{ | }else{ | ||||
binding.mRefresh.finishLoadMoreWithNoMoreData(); | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@Override | |||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) { | |||||
pageNo =1; | |||||
// initData(); | |||||
query(); | |||||
binding.mRefresh.finishRefresh(); | |||||
} | |||||
@Override | |||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) { | |||||
pageNo++; | |||||
// initData(); | |||||
query(); | |||||
binding.mRefresh.finishLoadMore(); | |||||
} | |||||
} | } |
<TextView | <TextView | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:text="问题:" | |||||
android:text="一级:" | |||||
style="@style/blackTextStyleBold16" | style="@style/blackTextStyleBold16" | ||||
android:layout_below="@+id/line" | android:layout_below="@+id/line" | ||||
android:id="@+id/tv2" | android:id="@+id/tv2" | ||||
android:id="@+id/tv_question" | android:id="@+id/tv_question" | ||||
style="@style/blackTextStyleBold16" | style="@style/blackTextStyleBold16" | ||||
android:layout_marginLeft="@dimen/dp_5"/> | android:layout_marginLeft="@dimen/dp_5"/> | ||||
<View | |||||
style="@style/MatchOne.HorLine" | |||||
android:layout_below="@+id/tv2" | |||||
android:layout_marginTop="@dimen/dp_5" | |||||
android:id="@+id/line2"/> | |||||
<TextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:text="涉及人员:" | |||||
style="@style/blackTextStyleBold16" | |||||
android:layout_below="@+id/line2" | |||||
android:id="@+id/tv3" | |||||
android:layout_marginTop="@dimen/dp_5"/> | |||||
<TextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_toRightOf="@+id/tv3" | |||||
android:layout_alignTop="@+id/tv3" | |||||
android:id="@+id/tv_people" | |||||
style="@style/blackTextStyleBold16" | |||||
android:layout_marginLeft="@dimen/dp_5"/> | |||||
</com.ruffian.library.widget.RRelativeLayout> | </com.ruffian.library.widget.RRelativeLayout> |
android:padding="@dimen/dp_10" | android:padding="@dimen/dp_10" | ||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:id="@+id/tv_people" | android:id="@+id/tv_people" | ||||
android:gravity="center" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:textColor="@color/black" /> | android:textColor="@color/black" /> | ||||
android:padding="@dimen/dp_10" | android:padding="@dimen/dp_10" | ||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:id="@+id/tv_category" | android:id="@+id/tv_category" | ||||
android:gravity="center" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:textColor="@color/black" /> | android:textColor="@color/black" /> | ||||
<TextView | <TextView | ||||
android:padding="@dimen/dp_10" | android:padding="@dimen/dp_10" | ||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:gravity="center" | |||||
android:id="@+id/tv_level1" | android:id="@+id/tv_level1" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:padding="@dimen/dp_10" | android:padding="@dimen/dp_10" | ||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:id="@+id/tv_from" | android:id="@+id/tv_from" | ||||
android:gravity="center" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:textColor="@color/black" /> | android:textColor="@color/black" /> | ||||
android:padding="@dimen/dp_10" | android:padding="@dimen/dp_10" | ||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:id="@+id/tv_zl" | android:id="@+id/tv_zl" | ||||
android:gravity="center" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:textColor="@color/black" /> | android:textColor="@color/black" /> | ||||
android:padding="@dimen/dp_10" | android:padding="@dimen/dp_10" | ||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:id="@+id/tv_sh" | android:id="@+id/tv_sh" | ||||
android:gravity="center" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:textColor="@color/black" /> | android:textColor="@color/black" /> | ||||
android:padding="@dimen/dp_10" | android:padding="@dimen/dp_10" | ||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:id="@+id/tv_shjg" | android:id="@+id/tv_shjg" | ||||
android:gravity="center" | |||||
android:layout_gravity="center_vertical" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:textColor="@color/black" /> | android:textColor="@color/black" /> | ||||
android:padding="@dimen/dp_10" | android:padding="@dimen/dp_10" | ||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:id="@+id/tv_sh_time" | android:id="@+id/tv_sh_time" | ||||
android:gravity="center" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:textColor="@color/black" /> | android:textColor="@color/black" /> |
android:layout_alignParentRight="true" | android:layout_alignParentRight="true" | ||||
android:textSize="@dimen/sp_14" /> | android:textSize="@dimen/sp_14" /> | ||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:id="@+id/rv_problem" | |||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent"/> | |||||
android:layout_height="match_parent" | |||||
android:id="@+id/mRefresh"> | |||||
<com.huntersun.vkyes.etcopencard.src.widget.StatusLayout | |||||
android:id="@+id/hl_status_hint" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent"> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:id="@+id/rvProblem"/> | |||||
</com.huntersun.vkyes.etcopencard.src.widget.StatusLayout> | |||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout> | |||||
</LinearLayout> | </LinearLayout> |