提交 7ef0710f authored 作者: lgd's avatar lgd

1.mes审核,差两个产品关联

2.//TODO ,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes其他页面,mes质量反馈,编辑任务担当无法修改.
上级 0ddfe742
......@@ -1708,8 +1708,14 @@
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
WorkOrderActivity
<activity
android:name=".ui.activity.mes.quality.MesChooseMangerActivity"
android:configChanges="keyboardHidden|orientation"
android:label=" "
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.wd.workoffice.fileprovider"
......
package com.wd.workoffice.bean.mesBean;
import java.util.List;
/**
* author : flexible
* email : lgd19940421@163.com
......@@ -128,23 +130,23 @@ public class FeedbackDetailBean {
private Object defectMudId;
private Object defectMudCode;
private String defectMudName;
private Object rapidResponse;
private Object customerResponse;
private Object relatedRecord;
private String rapidResponse;
private String customerResponse;
private String relatedRecord;
private Object seriesName;
private Object seriesType;
private Object severity;
private String treatRectPlan;
private String status;
private Object attachments;
private List<ImageBean> attachments;
private Object responsibleUserId;
private Object responsibleUserName;
private String responsibleUserName;
private String factoryTreatmentDateTime;
private Object verifyUserId;
private Object verifyUserName;
private String verifyUserName;
private Object verifyUserDate;
private Object recordUserId;
private Object recorUserName;
private String recorUserName;
private Object recorUserDate;
private Object responsibleDealId;
private String responsibleDealName;
......@@ -499,27 +501,27 @@ public class FeedbackDetailBean {
this.defectMudName = defectMudName;
}
public Object getRapidResponse() {
public String getRapidResponse() {
return rapidResponse;
}
public void setRapidResponse(Object rapidResponse) {
public void setRapidResponse(String rapidResponse) {
this.rapidResponse = rapidResponse;
}
public Object getCustomerResponse() {
public String getCustomerResponse() {
return customerResponse;
}
public void setCustomerResponse(Object customerResponse) {
public void setCustomerResponse(String customerResponse) {
this.customerResponse = customerResponse;
}
public Object getRelatedRecord() {
public String getRelatedRecord() {
return relatedRecord;
}
public void setRelatedRecord(Object relatedRecord) {
public void setRelatedRecord(String relatedRecord) {
this.relatedRecord = relatedRecord;
}
......@@ -563,11 +565,11 @@ public class FeedbackDetailBean {
this.status = status;
}
public Object getAttachments() {
public List<ImageBean> getAttachments() {
return attachments;
}
public void setAttachments(Object attachments) {
public void setAttachments( List<ImageBean> attachments) {
this.attachments = attachments;
}
......@@ -579,11 +581,11 @@ public class FeedbackDetailBean {
this.responsibleUserId = responsibleUserId;
}
public Object getResponsibleUserName() {
public String getResponsibleUserName() {
return responsibleUserName;
}
public void setResponsibleUserName(Object responsibleUserName) {
public void setResponsibleUserName(String responsibleUserName) {
this.responsibleUserName = responsibleUserName;
}
......@@ -603,11 +605,11 @@ public class FeedbackDetailBean {
this.verifyUserId = verifyUserId;
}
public Object getVerifyUserName() {
public String getVerifyUserName() {
return verifyUserName;
}
public void setVerifyUserName(Object verifyUserName) {
public void setVerifyUserName(String verifyUserName) {
this.verifyUserName = verifyUserName;
}
......@@ -627,11 +629,11 @@ public class FeedbackDetailBean {
this.recordUserId = recordUserId;
}
public Object getRecorUserName() {
public String getRecorUserName() {
return recorUserName;
}
public void setRecorUserName(Object recorUserName) {
public void setRecorUserName(String recorUserName) {
this.recorUserName = recorUserName;
}
......
package com.wd.workoffice.bean.mesBean;
import com.wd.workoffice.app.BaseMesPageBean;
import java.util.List;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class ManagerUserBean extends BaseMesPageBean {
/**
* pageNum : 1
* pageSize : 10
* size : 10
* startRow : 1
* endRow : 10
* total : 335
* pages : 34
* list : [{"id":"9bb509e98f4811ea8334fa163e1166bd","createDateTime":1588735260000,"updateDateTime":null,"userCode":"A1580","name":"小A","sex":1,"email":"A@163.com","mobile":"17777777777","tel":"12345678","status":1,"siteId":"053910b6311511ea8334fa163e1166bd","siteCode":"ZWXS02","siteDesc":"销售二公司(GK)","orgId":"5ac6962d9ed911e8b81100163e049447","orgCode":"00001","orgDesc":"正望集团","employmentDate":1588694400000,"expiryDate":1620230400000,"birthday":946656000000,"address":"山东青岛","remarks":"测试","createBy":null,"loginName":null,"createByName":"hello","idcard":null,"delete":null},{"id":"ab883735794211ea8334fa163e1166bd","createDateTime":1586313784000,"updateDateTime":null,"userCode":"BM003","name":"测试部门3","sex":null,"email":null,"mobile":null,"tel":null,"status":1,"siteId":"1c37c889ffa211e98334fa163e1166bd","siteCode":"ZWLT","siteDesc":"铝碳厂","orgId":"5ac6962d9ed911e8b81100163e049447","orgCode":"00001","orgDesc":"正望集团","employmentDate":null,"expiryDate":null,"birthday":null,"address":null,"remarks":null,"createBy":null,"loginName":null,"createByName":"hello","idcard":null,"delete":null},{"id":"91c7f1d7722d11ea8334fa163e1166bd","createDateTime":1585535063000,"updateDateTime":null,"userCode":"wtd","name":"吴同得","sex":1,"email":null,"mobile":"1","tel":null,"status":1,"siteId":"076068cfffa211e98334fa163e1166bd","siteCode":"ZW","siteDesc":"正望钢水集团","orgId":"5ac6962d9ed911e8b81100163e049447","orgCode":"00001","orgDesc":"正望集团","employmentDate":1582992000000,"expiryDate":1679068800000,"birthday":1583078400000,"address":null,"remarks":null,"createBy":null,"loginName":null,"createByName":"hello","idcard":null,"delete":null},{"id":"1c43d8015c4511ea8334fa163e1166bd","createDateTime":1583126248000,"updateDateTime":null,"userCode":"sp001","name":"审批1号","sex":1,"email":"163@163.com","mobile":"1","tel":"1","status":1,"siteId":"1c37c889ffa211e98334fa163e1166bd","siteCode":"ZWLT","siteDesc":"铝碳厂","orgId":"5ac6962d9ed911e8b81100163e049447","orgCode":"00001","orgDesc":"正望集团","employmentDate":1582992000000,"expiryDate":1585584000000,"birthday":1582992000000,"address":"1","remarks":"1","createBy":null,"loginName":null,"createByName":"hua","idcard":null,"delete":null},{"id":"bdfd3c6d497f11ea8334fa163e1166bd","createDateTime":1581062358000,"updateDateTime":null,"userCode":"YW001","name":"业务部经理","sex":1,"email":"163@163.com","mobile":"1","tel":"1","status":1,"siteId":"053910b6311511ea8334fa163e1166bd","siteCode":"ZWXS02","siteDesc":"销售二公司(GK)","orgId":"5ac6962d9ed911e8b81100163e049447","orgCode":"00001","orgDesc":"正望集团","employmentDate":1581091200000,"expiryDate":1643904000000,"birthday":1580486400000,"address":"1","remarks":"1","createBy":null,"loginName":null,"createByName":"hua","idcard":null,"delete":null},{"id":"84b675d7497f11ea8334fa163e1166bd","createDateTime":1581062262000,"updateDateTime":null,"userCode":"ZJ001","name":"质检主任","sex":1,"email":"163@163.com","mobile":"1","tel":"1","status":1,"siteId":"1c37c889ffa211e98334fa163e1166bd","siteCode":"ZWLT","siteDesc":"铝碳厂","orgId":"5ac6962d9ed911e8b81100163e049447","orgCode":"00001","orgDesc":"正望集团","employmentDate":1580486400000,"expiryDate":1676044800000,"birthday":1581004800000,"address":"1","remarks":"1","createBy":null,"loginName":null,"createByName":"hua","idcard":null,"delete":null},{"id":"342a10bd497f11ea8334fa163e1166bd","createDateTime":1581062127000,"updateDateTime":null,"userCode":"SC011","name":"生产员工","sex":1,"email":"163@163.com","mobile":"1","tel":"1","status":1,"siteId":"1c37c889ffa211e98334fa163e1166bd","siteCode":"ZWLT","siteDesc":"铝碳厂","orgId":"5ac6962d9ed911e8b81100163e049447","orgCode":"00001","orgDesc":"正望集团","employmentDate":1581091200000,"expiryDate":1707494400000,"birthday":1580486400000,"address":"1","remarks":"1","createBy":null,"loginName":null,"createByName":"hua","idcard":null,"delete":null},{"id":"130558e6497f11ea8334fa163e1166bd","createDateTime":1581062071000,"updateDateTime":null,"userCode":"SC010","name":"生产厂长","sex":1,"email":"163@163.com","mobile":"1","tel":"1","status":1,"siteId":"1c37c889ffa211e98334fa163e1166bd","siteCode":"ZWLT","siteDesc":"铝碳厂","orgId":"5ac6962d9ed911e8b81100163e049447","orgCode":"00001","orgDesc":"正望集团","employmentDate":1581091200000,"expiryDate":1676044800000,"birthday":1580486400000,"address":"1","remarks":"1","createBy":null,"loginName":null,"createByName":"hua","idcard":null,"delete":null},{"id":"ebd8c3e3497e11ea8334fa163e1166bd","createDateTime":1581062005000,"updateDateTime":null,"userCode":"XS002","name":"销售员工","sex":1,"email":"163@163.com","mobile":"1","tel":"1","status":1,"siteId":"1c37c889ffa211e98334fa163e1166bd","siteCode":"ZWLT","siteDesc":"铝碳厂","orgId":"5ac6962d9ed911e8b81100163e049447","orgCode":"00001","orgDesc":"正望集团","employmentDate":1582905600000,"expiryDate":1676390400000,"birthday":1581436800000,"address":"1","remarks":"1","createBy":null,"loginName":null,"createByName":"hua","idcard":null,"delete":null},{"id":"d0fa5dbd497e11ea8334fa163e1166bd","createDateTime":1581061960000,"updateDateTime":null,"userCode":"XS001","name":"销售经理","sex":1,"email":"163@163.com","mobile":"123456","tel":"1","status":1,"siteId":"1c37c889ffa211e98334fa163e1166bd","siteCode":"ZWLT","siteDesc":"铝碳厂","orgId":"5ac6962d9ed911e8b81100163e049447","orgCode":"00001","orgDesc":"正望集团","employmentDate":1580659200000,"expiryDate":1675440000000,"birthday":1580486400000,"address":"1","remarks":"1","createBy":null,"loginName":null,"createByName":"hua","idcard":null,"delete":null}]
* prePage : 0
* nextPage : 2
* isFirstPage : true
* isLastPage : false
* hasPreviousPage : false
* hasNextPage : true
* navigatePages : 8
* navigatepageNums : [1,2,3,4,5,6,7,8]
* navigateFirstPage : 1
* navigateLastPage : 8
* firstPage : 1
* lastPage : 8
*/
private List<ListBean> list;
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public static class ListBean {
/**
* id : 9bb509e98f4811ea8334fa163e1166bd
* createDateTime : 1588735260000
* updateDateTime : null
* userCode : A1580
* name : 小A
* sex : 1
* email : A@163.com
* mobile : 17777777777
* tel : 12345678
* status : 1
* siteId : 053910b6311511ea8334fa163e1166bd
* siteCode : ZWXS02
* siteDesc : 销售二公司(GK)
* orgId : 5ac6962d9ed911e8b81100163e049447
* orgCode : 00001
* orgDesc : 正望集团
* employmentDate : 1588694400000
* expiryDate : 1620230400000
* birthday : 946656000000
* address : 山东青岛
* remarks : 测试
* createBy : null
* loginName : null
* createByName : hello
* idcard : null
* delete : null
*/
private String id;
private long createDateTime;
private Object updateDateTime;
private String userCode;
private String name;
private int sex;
private String email;
private String mobile;
private String tel;
private int status;
private String siteId;
private String siteCode;
private String siteDesc;
private String orgId;
private String orgCode;
private String orgDesc;
private long employmentDate;
private long expiryDate;
private long birthday;
private String address;
private String remarks;
private Object createBy;
private Object loginName;
private String createByName;
private Object idcard;
private Object delete;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public long getCreateDateTime() {
return createDateTime;
}
public void setCreateDateTime(long createDateTime) {
this.createDateTime = createDateTime;
}
public Object getUpdateDateTime() {
return updateDateTime;
}
public void setUpdateDateTime(Object updateDateTime) {
this.updateDateTime = updateDateTime;
}
public String getUserCode() {
return userCode;
}
public void setUserCode(String userCode) {
this.userCode = userCode;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex = sex;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getSiteId() {
return siteId;
}
public void setSiteId(String siteId) {
this.siteId = siteId;
}
public String getSiteCode() {
return siteCode;
}
public void setSiteCode(String siteCode) {
this.siteCode = siteCode;
}
public String getSiteDesc() {
return siteDesc;
}
public void setSiteDesc(String siteDesc) {
this.siteDesc = siteDesc;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getOrgDesc() {
return orgDesc;
}
public void setOrgDesc(String orgDesc) {
this.orgDesc = orgDesc;
}
public long getEmploymentDate() {
return employmentDate;
}
public void setEmploymentDate(long employmentDate) {
this.employmentDate = employmentDate;
}
public long getExpiryDate() {
return expiryDate;
}
public void setExpiryDate(long expiryDate) {
this.expiryDate = expiryDate;
}
public long getBirthday() {
return birthday;
}
public void setBirthday(long birthday) {
this.birthday = birthday;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public Object getCreateBy() {
return createBy;
}
public void setCreateBy(Object createBy) {
this.createBy = createBy;
}
public Object getLoginName() {
return loginName;
}
public void setLoginName(Object loginName) {
this.loginName = loginName;
}
public String getCreateByName() {
return createByName;
}
public void setCreateByName(String createByName) {
this.createByName = createByName;
}
public Object getIdcard() {
return idcard;
}
public void setIdcard(Object idcard) {
this.idcard = idcard;
}
public Object getDelete() {
return delete;
}
public void setDelete(Object delete) {
this.delete = delete;
}
}
}
......@@ -325,7 +325,15 @@ public interface MesApiService {
*
* @return
*/
@GET("/himes/api/feedback/deal/update.json")
@POST("/himes/api/feedback/deal/update.json")
Observable<BaseMesBean> feedbackCheck( @Query("functionId") String functionId, @Body RequestBody requestBody);
/**
* 销售经理查询
*
* @return
*/
@POST("/himes/api/user/show/page.json")
Observable<BaseMesBean> managerList( @Query("functionId") String functionId, @Body RequestBody requestBody);
}
package com.wd.workoffice.ui.activity.mes.quality;
import android.content.Intent;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.mesBean.ManagerUserBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.MesClientAdapter;
import com.wd.workoffice.ui.adapter.MesManagerAdapter;
import com.wd.workoffice.util.WorkUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* 销售经理查询
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesChooseMangerActivity extends WorkToolBarActivity {
@BindView(R.id.et_key)
EditText etKey;
@BindView(R.id.btn_search)
Button btnSearch;
@BindView(R.id.rv_client)
RecyclerView rvClient;
private Map<String, Object> param;
private List<ManagerUserBean.ListBean> clientList;
private MesManagerAdapter clientAdapter;
private int page = 1;
@Override
protected void initView() {
ButterKnife.bind(this);
rvClient.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
clientList = new ArrayList<>();
clientAdapter = new MesManagerAdapter(R.layout.item_store_client, clientList);
clientAdapter.bindToRecyclerView(rvClient);
clientAdapter.setEmptyView(R.layout.view_empty_content, rvClient);
param = WorkUtils.pageMesKey();
param.put("pageNum", 1);
getData();
}
private void getData() {
RtfUtils.getMesRtf().managerList("1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseMesBean data) {
hideLoading();
if (!data.isSuccess()) {
toast(data.getMsg());
return;
}
List<ManagerUserBean.ListBean> getList = JSON.parseObject(data.getData().toString(), ManagerUserBean.class).getList();
if (page == 1) {
clientList.clear();
clientList.addAll(getList);
clientAdapter.notifyDataSetChanged();
clientAdapter.loadMoreComplete();
} else {
clientAdapter.loadMoreComplete();
clientList.addAll(getList);
clientAdapter.notifyDataSetChanged();
}
if (getList.size() == 0) {
clientAdapter.loadMoreEnd();
} else {
page++;
}
toast("搜索成功");
}
});
}
@Override
protected void initEvent() {
clientAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
@Override
public void onLoadMoreRequested() {
param.put("pageNum", page);
getData();
}
}, rvClient);
clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent();
intent.putExtra("data", JSON.toJSONString(clientList.get(position)));
setResult(10001, intent);
finish();
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_mes_ticket_take_on;
}
@OnClick(R.id.btn_search)
public void onViewClicked() {
param.put("name", etKey.getText().toString());
param.put("pageNum", 1);
page = 1;
getData();
}
}
package com.wd.workoffice.ui.activity.mes.quality;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
......@@ -14,6 +13,7 @@ import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.CheckFeedbackEvent;
import com.wd.workoffice.bean.mesBean.FeedbackBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
......@@ -21,6 +21,9 @@ import com.wd.workoffice.ui.activity.mes.ticket.MesTicketConditionActivity;
import com.wd.workoffice.ui.adapter.MesQualityAdapter;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -160,5 +163,25 @@ public class MesQualityActivity extends WorkToolBarActivity {
@OnClick(R.id.btn_add)
public void onViewClicked() {
startActivity(MesQualityAddActivity.class);
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(CheckFeedbackEvent event) {
page = 1;
param.put("pageNum", page);
getData();
}
}
package com.wd.workoffice.ui.activity.mes.quality;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.ProPriceBean;
import com.wd.workoffice.ui.adapter.MesQualityAdapter;
import com.wd.workoffice.bean.event.CheckFeedbackEvent;
import com.wd.workoffice.bean.mesBean.FeedbackDetailBean;
import com.wd.workoffice.bean.mesBean.ImageBean;
import com.wd.workoffice.bean.mesBean.ManagerUserBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* author : flexible
......@@ -17,11 +40,18 @@ import butterknife.ButterKnife;
**/
public class MesQualityClientActivity extends WorkToolBarActivity {
private Map<String, Object> param;
private List<ProPriceBean.RecordsBean> dataList;
private MesQualityAdapter dataAdapter;
private int page = 1;
@BindView(R.id.tv_client_status)
EditText tvClientStatus;
@BindView(R.id.tv_client_reply)
EditText tvClientReply;
@BindView(R.id.tv_client_record)
EditText tvClientRecord;
@BindView(R.id.tv_client_person)
TextView tvClientPerson;
@BindView(R.id.rl_client_person)
RelativeLayout rlClientPerson;
private Map<String, Object> param;
@Override
protected void initView() {
ButterKnife.bind(this);
......@@ -30,51 +60,57 @@ public class MesQualityClientActivity extends WorkToolBarActivity {
@Override
protected void initData() {
// getData();
}
// private void getData() {
// RtfUtils.getRtf().getProHistoryPrice(param).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
// @Override
// public void doOnSubscribe(Disposable d) {
// }
//
// @Override
// public void onFail(String errorMsg) {
// hideLoading();
// toast(errorMsg);
// }
//
// @Override
// public void onSuccess(BaseBean data) {
// hideLoading();
// if (data.getCode() != 0) {
// toast(data.getMsg());
// return;
// }
// List<ProPriceBean.RecordsBean> getList = JSON.parseObject(data.getData().toString(), ProPriceBean.class).getRecords();
//
// if (page == 1) {
// srlRefresh.finishRefresh();
// dataList.clear();
// dataList.addAll(getList);
// dataAdapter.notifyDataSetChanged();
// dataAdapter.loadMoreComplete();
// } else {
// dataAdapter.loadMoreComplete();
// dataList.addAll(getList);
// dataAdapter.notifyDataSetChanged();
// }
// if (getList.size() == 0) {
// dataAdapter.loadMoreEnd();
// } else {
// page++;
// }
// }
// });
// }
param = WorkUtils.simpleParam();
FeedbackDetailBean data = JSON.parseObject(getIntent().getStringExtra("data"), FeedbackDetailBean.class);
param.put("id",data.getId());
param.put("status",3);
}
private void submit() {
param.put("rapidResponse",tvClientStatus.getText().toString());
param.put("customerResponse",tvClientReply.getText().toString());
param.put("relatedRecord",tvClientRecord.getText().toString());
RtfUtils.getMesRtf().feedbackCheck("1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseMesBean data) {
hideLoading();
if (!data.isSuccess()) {
toast(data.getMsg());
return;
}
EventBus.getDefault().post(new CheckFeedbackEvent());
toast("审核成功");
finish();
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_finish, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.finish:
submit();
break;
}
return super.onOptionsItemSelected(item);
}
@Override
protected void initEvent() {
}
......@@ -85,4 +121,24 @@ public class MesQualityClientActivity extends WorkToolBarActivity {
}
@OnClick(R.id.rl_client_person)
public void onViewClicked() {
startActivityForResult(MesChooseMangerActivity.class,10001);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case 10001:
if (resultCode == 10001) {
ManagerUserBean.ListBean manager = JSON.parseObject(data.getStringExtra("data"), ManagerUserBean.ListBean.class);
param.put("recordUserId",manager.getId());
param.put("recorUserName",manager.getName());
tvClientPerson.setText(manager.getName());
}
break;
}
}
}
......@@ -10,10 +10,21 @@ import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddTicketEvent;
import com.wd.workoffice.bean.event.CheckFeedbackEvent;
import com.wd.workoffice.bean.mesBean.FeedbackDetailBean;
import com.wd.workoffice.bean.mesBean.ImageBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.ImgAdapter;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.List;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
......@@ -101,16 +112,21 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
@BindView(R.id.ll_client)
LinearLayout llClient;
private FeedbackDetailBean detailBean;
private List<ImageBean> imgList;
private ImgAdapter imgAdapter;
@Override
protected void initView() {
ButterKnife.bind(this);
llBottom.setVisibility(View.VISIBLE);
rvImg.setLayoutManager(new GridLayoutManager(this, 3, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
imgList = new ArrayList<>();
imgAdapter = new ImgAdapter(R.layout.item_mes_ticket_img, imgList);
imgAdapter.bindToRecyclerView(rvImg);
detail();
}
......@@ -140,6 +156,9 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
}
private void changeView() {
imgList.clear();
imgList.addAll(detailBean.getAttachments());
imgAdapter.notifyDataSetChanged();
switch (detailBean.getStatus()) {
case "0":
llClient.setVisibility(View.GONE);
......@@ -154,8 +173,8 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
llBottom.setVisibility(View.VISIBLE);
break;
case "2":
llClient.setVisibility(View.VISIBLE);
llCompany.setVisibility(View.GONE);
llClient.setVisibility(View.GONE);
llCompany.setVisibility(View.VISIBLE);
llManager.setVisibility(View.VISIBLE);
llBottom.setVisibility(View.VISIBLE);
break;
......@@ -196,15 +215,15 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
tvFactoryStatus.setText(detailBean.getFactoryImplement());
tvFactorySuggest.setText(detailBean.getFactoryLeaderOpinion());
tvProcess.setText(detailBean.getTreatRectPlan());
tvDutyPerson.setText(detailBean.getResponsibleDealName());
tvVerifyPerson.setText(detailBean.getApprovalUserName());
tvDutyPerson.setText(detailBean.getResponsibleUserName());
tvVerifyPerson.setText(detailBean.getVerifyUserName());
tvQuestion.setText(detailBean.getDefectMudName());
tvTime.setText(detailBean.getFactoryTreatmentDateTime());
//四、客户回馈信息
tvClientStatus.setText(detailBean.getApprovalUserName());
tvClientReply.setText(detailBean.getDefectMudName());
tvClientRecord.setText(detailBean.getFactoryTreatmentDateTime());
tvClientPerson.setText(detailBean.getFactoryTreatmentDateTime());
tvClientStatus.setText(detailBean.getRapidResponse());
tvClientReply.setText(detailBean.getCustomerResponse());
tvClientRecord.setText(detailBean.getRelatedRecord());
tvClientPerson.setText(detailBean.getRecorUserName());
}
@Override
......@@ -219,8 +238,7 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
@OnClick(R.id.btn_reviews)
public void onViewClicked() {
// switch (detailBean.getStatus()) {
switch ("0") {
switch (detailBean.getStatus()) {
case "0":
startActivity(MesQualityManagerActivity.class,"data",JSON.toJSONString(detailBean));
break;
......@@ -232,4 +250,20 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
break;
}
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(CheckFeedbackEvent event) {
finish();
}
}
package com.wd.workoffice.ui.activity.mes.quality;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.bigkoo.pickerview.listener.OnTimeSelectListener;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.ProPriceBean;
import com.wd.workoffice.ui.adapter.MesQualityAdapter;
import com.wd.workoffice.bean.event.CheckFeedbackEvent;
import com.wd.workoffice.bean.mesBean.FeedbackDetailBean;
import com.wd.workoffice.bean.mesBean.ImageBean;
import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.bean.mesBean.ManagerUserBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.util.PickTimeUtils;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import flexible.xd.android_base.utils.TimeUtils;
import io.reactivex.disposables.Disposable;
/**
* author : flexible
......@@ -17,11 +48,34 @@ import butterknife.ButterKnife;
**/
public class MesQualityFactoryActivity extends WorkToolBarActivity {
private Map<String, Object> param;
private List<ProPriceBean.RecordsBean> dataList;
private MesQualityAdapter dataAdapter;
private int page = 1;
@BindView(R.id.tv_factory_reason)
EditText tvFactoryReason;
@BindView(R.id.tv_factory_suggest)
EditText tvFactorySuggest;
@BindView(R.id.tv_factory_status)
EditText tvFactoryStatus;
@BindView(R.id.tv_process)
TextView tvProcess;
@BindView(R.id.rl_process)
RelativeLayout rlProcess;
@BindView(R.id.tv_duty_person)
TextView tvDutyPerson;
@BindView(R.id.rl_duty_person)
RelativeLayout rlDutyPerson;
@BindView(R.id.tv_verify_person)
TextView tvVerifyPerson;
@BindView(R.id.rl_verify_person)
RelativeLayout rlVerifyPerson;
@BindView(R.id.tv_question)
TextView tvQuestion;
@BindView(R.id.rl_question)
RelativeLayout rlQuestion;
@BindView(R.id.tv_time)
TextView tvTime;
@BindView(R.id.rl_time)
RelativeLayout rlTime;
private Map<String, Object> param;
@Override
protected void initView() {
ButterKnife.bind(this);
......@@ -30,50 +84,47 @@ public class MesQualityFactoryActivity extends WorkToolBarActivity {
@Override
protected void initData() {
// getData();
}
// private void getData() {
// RtfUtils.getRtf().getProHistoryPrice(param).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
// @Override
// public void doOnSubscribe(Disposable d) {
// }
//
// @Override
// public void onFail(String errorMsg) {
// hideLoading();
// toast(errorMsg);
// }
//
// @Override
// public void onSuccess(BaseBean data) {
// hideLoading();
// if (data.getCode() != 0) {
// toast(data.getMsg());
// return;
// }
// List<ProPriceBean.RecordsBean> getList = JSON.parseObject(data.getData().toString(), ProPriceBean.class).getRecords();
//
// if (page == 1) {
// srlRefresh.finishRefresh();
// dataList.clear();
// dataList.addAll(getList);
// dataAdapter.notifyDataSetChanged();
// dataAdapter.loadMoreComplete();
// } else {
// dataAdapter.loadMoreComplete();
// dataList.addAll(getList);
// dataAdapter.notifyDataSetChanged();
// }
// if (getList.size() == 0) {
// dataAdapter.loadMoreEnd();
// } else {
// page++;
// }
// }
// });
// }
param = WorkUtils.simpleParam();
FeedbackDetailBean data = JSON.parseObject(getIntent().getStringExtra("data"), FeedbackDetailBean.class);
param.put("id",data.getId());
param.put("status",2);
}
private void submit() {
// tvProcess.setText(detailBean.getTreatRectPlan());
// tvDutyPerson.setText(detailBean.getResponsibleDealName());
// tvVerifyPerson.setText(detailBean.getApprovalUserName());
// tvQuestion.setText(detailBean.getDefectMudName());
// tvTime.setText(detailBean.getFactoryTreatmentDateTime());
param.put("factoryAnalysis",tvFactoryReason.getText().toString());
param.put("factoryImplement",tvFactoryStatus.getText().toString());
param.put("factoryLeaderOpinion",tvFactorySuggest.getText().toString());
RtfUtils.getMesRtf().feedbackCheck("1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseMesBean data) {
hideLoading();
if (!data.isSuccess()) {
toast(data.getMsg());
return;
}
EventBus.getDefault().post(new CheckFeedbackEvent());
toast("审核成功");
finish();
}
});
}
@Override
protected void initEvent() {
......@@ -84,5 +135,66 @@ public class MesQualityFactoryActivity extends WorkToolBarActivity {
return R.layout.activity_mes_quality_factory;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_finish, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.finish:
submit();
break;
}
return super.onOptionsItemSelected(item);
}
@OnClick({R.id.rl_process, R.id.rl_duty_person, R.id.rl_verify_person, R.id.rl_question, R.id.rl_time})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.rl_process:
break;
case R.id.rl_duty_person:
startActivityForResult(MesChooseMangerActivity.class,10001);
break;
case R.id.rl_verify_person:
startActivityForResult(MesChooseMangerActivity.class,10002);
break;
case R.id.rl_question:
break;
case R.id.rl_time:
PickTimeUtils.showPickThree(this, new OnTimeSelectListener() {
@Override
public void onTimeSelect(Date date, View v) {
tvTime.setText(TimeUtils.date2String(date,new SimpleDateFormat("yyyy-MM-dd")));
param.put("factoryTreatmentDateTime",TimeUtils.date2String(date,new SimpleDateFormat("yyyy-MM-dd")));
}
}).show();
break;
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case 10001:
if (resultCode == 10001) {
ManagerUserBean.ListBean manager = JSON.parseObject(data.getStringExtra("data"), ManagerUserBean.ListBean.class);
param.put("responsibleUserId",manager.getId());
param.put("responsibleUserName",manager.getName());
tvDutyPerson.setText(manager.getName());
}
break;
case 10002:
if (resultCode == 10001) {
ManagerUserBean.ListBean manager = JSON.parseObject(data.getStringExtra("data"), ManagerUserBean.ListBean.class);
param.put("verifyUserId",manager.getId());
param.put("verifyUserName",manager.getName());
tvVerifyPerson.setText(manager.getName());
}
break;
}
}
}
......@@ -82,7 +82,7 @@ public class MesQualityManagerActivity extends WorkToolBarActivity {
protected void initData() {
param = WorkUtils.simpleParam();
FeedbackDetailBean data = JSON.parseObject(getIntent().getStringExtra("data"), FeedbackDetailBean.class);
// param.put("id",data.getId());
param.put("id",data.getId());
param.put("status",1);
imgList=new ArrayList<>();
ImageBean imageBean = new ImageBean();
......@@ -121,6 +121,7 @@ public class MesQualityManagerActivity extends WorkToolBarActivity {
}
EventBus.getDefault().post(new CheckFeedbackEvent());
toast("审核成功");
finish();
}
});
}
......
......@@ -306,6 +306,11 @@ public class MesTicketAddSummaryActivity extends WorkToolBarActivity {
}
}
param.put("completionSituation", etClient.getText().toString());
List<ImageBean> uploadImg =new ArrayList<>();
for (int i = 0; i < imgList.size()-1; i++) {
uploadImg.add(imgList.get(i));
}
param.put("attachments",uploadImg);
RtfUtils.getMesRtf().summaryAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
......
......@@ -166,35 +166,6 @@ public class MesTicketDetailActivity extends WorkToolBarActivity {
param.put("jobUserId", data.getJobUserId());
}
private void getData() {
RtfUtils.getRtf().getAccount().compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseBean data) {
hideLoading();
if (data.getCode() != 0) {
toast(data.getMessage());
return;
}
dataBean = JSON.parseObject(data.getData().toString(), AccountBean.class);
// tvName.setText(dataBean.getName());
// tvDpeName.setText(dataBean.getName());
// tvDpePrice.setText(MathUtils.converData(dataBean.getBalance(), 2));
// tvDpeFreezePrice.setText(String.valueOf(dataBean.getFrozenAmount()));
}
});
}
@Override
protected void initEvent() {
......
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.ManagerUserBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class MesManagerAdapter extends BaseQuickAdapter<ManagerUserBean.ListBean, BaseViewHolder> {
public MesManagerAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, ManagerUserBean.ListBean item) {
helper.setText(R.id.tv_name, item.getName());
}
}
......@@ -23,7 +23,7 @@ public class MesQualityAdapter extends BaseQuickAdapter<FeedbackBean.ListBean, B
@Override
protected void convert(BaseViewHolder helper, FeedbackBean.ListBean item) {
helper.setText(R.id.tv_no, item.getFeedbackCode());
helper.setText(R.id.tv_manager, item.getId());
helper.setText(R.id.tv_manager, item.getSaleUserName());
helper.setText(R.id.tv_name, item.getCustomerName());
helper.setText(R.id.tv_phone, item.getPhoneNumber());
helper.setText(R.id.tv_pro, item.getProductName());
......
......@@ -34,6 +34,7 @@
android:textSize="14sp" />
<EditText
android:id="@+id/tv_client_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm"
......@@ -55,6 +56,7 @@
android:textSize="14sp" />
<EditText
android:id="@+id/tv_client_reply"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm"
......@@ -76,6 +78,7 @@
android:textSize="14sp" />
<EditText
android:id="@+id/tv_client_record"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm"
......@@ -90,6 +93,7 @@
<RelativeLayout
android:id="@+id/rl_client_person"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
......@@ -110,6 +114,7 @@
android:gravity="center_vertical">
<TextView
android:id="@+id/tv_client_person"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
......
......@@ -34,6 +34,7 @@
android:textSize="14sp" />
<EditText
android:id="@+id/tv_factory_reason"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm"
......@@ -55,6 +56,7 @@
android:textSize="14sp" />
<EditText
android:id="@+id/tv_factory_suggest"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm"
......@@ -76,6 +78,7 @@
android:textSize="14sp" />
<EditText
android:id="@+id/tv_factory_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm"
......@@ -88,6 +91,7 @@
android:textSize="14sp" />
<RelativeLayout
android:id="@+id/rl_process"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
......@@ -108,6 +112,7 @@
android:gravity="center_vertical">
<TextView
android:id="@+id/tv_process"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
......@@ -125,6 +130,7 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_duty_person"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
......@@ -145,6 +151,7 @@
android:gravity="center_vertical">
<TextView
android:id="@+id/tv_duty_person"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
......@@ -162,6 +169,7 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_verify_person"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
......@@ -182,6 +190,7 @@
android:gravity="center_vertical">
<TextView
android:id="@+id/tv_verify_person"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
......@@ -199,6 +208,7 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_question"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
......@@ -219,6 +229,7 @@
android:gravity="center_vertical">
<TextView
android:id="@+id/tv_question"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
......@@ -236,6 +247,7 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
......@@ -256,6 +268,7 @@
android:gravity="center_vertical">
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论