git-svn-id: http://192.168.1.226/svn/proxy@432 454eff88-639b-444f-9e54-f578c98de674
| | |
| | | import com.camnter.easyrecyclerview.holder.EasyRecyclerViewHolder;
|
| | | import com.facebook.drawee.view.SimpleDraweeView;
|
| | |
|
| | | import cn.com.basic.face.base.MainActivity;
|
| | | import cn.com.basic.face.discern.query.item.CheckInQueryItem;
|
| | | import cn.com.basic.face.util.AppApi;
|
| | |
|
| | |
| | |
|
| | | public static class CheckInLeftIntervieweeAdapter extends EasyRecyclerViewAdapter {
|
| | |
|
| | | private boolean isSortByDept;
|
| | |
|
| | | @Override
|
| | | public int[] getItemLayouts() {
|
| | | return new int[]{R.layout.fragment_check_in_left_interviewee_row, R.layout.fragment_check_in_left_first_letter_row};
|
| | |
| | | TextView fragment_check_in_left_interviewee_row_name = viewHolder.findViewById(R.id.fragment_check_in_left_interviewee_row_name);
|
| | | TextView fragment_check_in_left_interviewee_row_dept = viewHolder.findViewById(R.id.fragment_check_in_left_interviewee_row_dept);
|
| | | SimpleDraweeView fragment_check_in_left_interviewee_row_photo = viewHolder.findViewById(R.id.fragment_check_in_left_interviewee_row_photo);
|
| | |
|
| | | if (isSortByDept) {
|
| | | fragment_check_in_left_interviewee_row_name.setTextColor(MainActivity.getInstance().getResources().getColor(R.color.colorText_b));
|
| | | fragment_check_in_left_interviewee_row_dept.setTextColor(MainActivity.getInstance().getResources().getColor(R.color.colorText_5));
|
| | | } else {
|
| | | fragment_check_in_left_interviewee_row_name.setTextColor(MainActivity.getInstance().getResources().getColor(R.color.colorText_5));
|
| | | fragment_check_in_left_interviewee_row_dept.setTextColor(MainActivity.getInstance().getResources().getColor(R.color.colorText_b));
|
| | | }
|
| | |
|
| | | Object data = getList().get(position);
|
| | | if (data instanceof CheckInQueryItem) {
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public void setSortByDept(boolean isSortByDept) {
|
| | | this.isSortByDept = isSortByDept;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package cn.com.basic.face.discern.query.condition;
|
| | |
|
| | |
|
| | | public class CheckInQueryCondition extends BaseCondition {
|
| | |
|
| | | public static final class FieldNames {
|
| | | /**
|
| | | *
|
| | | */
|
| | | public static final String employeeCompanyId = "employeeCompanyId";
|
| | | /**
|
| | | *
|
| | | */
|
| | | public static final String visitorCompanyId = "visitorCompanyId";
|
| | | /**
|
| | | * 人员名字
|
| | | */
|
| | | public static final String username = "username";
|
| | | }
|
| | |
|
| | | //
|
| | | private String employeeCompanyId;
|
| | | //
|
| | | private String visitorCompanyId;
|
| | | // 人员名字
|
| | | private String username;
|
| | |
|
| | | /**
|
| | | * Get
|
| | | */
|
| | | public String getEmployeeCompanyId() {
|
| | | return employeeCompanyId;
|
| | | }
|
| | |
|
| | | /**
|
| | | * Set
|
| | | */
|
| | | public void setEmployeeCompanyId(String employeeCompanyId) {
|
| | | this.employeeCompanyId = employeeCompanyId;
|
| | | }
|
| | |
|
| | | /**
|
| | | * Get
|
| | | */
|
| | | public String getVisitorCompanyId() {
|
| | | return visitorCompanyId;
|
| | | }
|
| | |
|
| | | /**
|
| | | * Set
|
| | | */
|
| | | public void setVisitorCompanyId(String visitorCompanyId) {
|
| | | this.visitorCompanyId = visitorCompanyId;
|
| | | }
|
| | |
|
| | | /**
|
| | | * Get 人员名字
|
| | | */
|
| | | public String getUsername() {
|
| | | return username;
|
| | | }
|
| | |
|
| | | /**
|
| | | * Set 人员名字
|
| | | */
|
| | | public void setUsername(String username) {
|
| | | this.username = username;
|
| | | }
|
| | |
|
| | | public String toString() {
|
| | | return
|
| | | ", =" + employeeCompanyId + ", =" + visitorCompanyId + ",人员名字 =" + username
|
| | | ;
|
| | | }
|
| | | }
|
| | |
| | | private String postName;
|
| | | // 移动电话
|
| | | private String mobilePhone;
|
| | | // |
| | | private String type;
|
| | |
|
| | | /**
|
| | | * Get 人员主键
|
| | |
| | | public String getRegisterId() {
|
| | | return registerId;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * Set 人员主键
|
| | | */
|
| | |
| | | public String getUsername() {
|
| | | return username;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * Set 人员名字
|
| | | */
|
| | |
| | | public String getImagePath() {
|
| | | return imagePath;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * Set 图片地址
|
| | | */
|
| | |
| | | public String getCompanyName() {
|
| | | return companyName;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * Set 公司名称
|
| | | */
|
| | |
| | | public String getTel() {
|
| | | return tel;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * Set 座机电话
|
| | | */
|
| | |
| | | public String getIdentifyNum() {
|
| | | return identifyNum;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * Set 证件编号
|
| | | */
|
| | |
| | | public String getDeptName() {
|
| | | return deptName;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * Set 部门名称
|
| | | */
|
| | |
| | | public String getCompanyId() {
|
| | | return companyId;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * Set 公司主键
|
| | | */
|
| | |
| | | public String getPostName() {
|
| | | return postName;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * Set 职位名称
|
| | | */
|
| | |
| | | public String getMobilePhone() {
|
| | | return mobilePhone;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * Set 移动电话
|
| | | */
|
| | |
| | | this.mobilePhone = mobilePhone;
|
| | | }
|
| | |
|
| | | /**
|
| | | * Get |
| | | */
|
| | | public String getType() {
|
| | | return type;
|
| | | }
|
| | | |
| | | /**
|
| | | * Set |
| | | */
|
| | | public void setType(String type) {
|
| | | this.type = type;
|
| | | }
|
| | |
|
| | | public String toString() {
|
| | | return |
| | | ",人员主键 =" + registerId + ",人员名字 =" + username + ",图片地址 =" + imagePath + |
| | | ",公司名称 =" + companyName + ",座机电话 =" + tel + ",证件编号 =" + identifyNum + |
| | | ",部门名称 =" + deptName + ",公司主键 =" + companyId + ",职位名称 =" + postName + |
| | | ",移动电话 =" + mobilePhone + ", =" + type ;
|
| | | return
|
| | | ",人员主键 =" + registerId + ",人员名字 =" + username + ",图片地址 =" + imagePath +
|
| | | ",公司名称 =" + companyName + ",座机电话 =" + tel + ",证件编号 =" + identifyNum +
|
| | | ",部门名称 =" + deptName + ",公司主键 =" + companyId + ",职位名称 =" + postName +
|
| | | ",移动电话 =" + mobilePhone;
|
| | | }
|
| | | }
|
| | |
| | | import android.widget.Toast;
|
| | |
|
| | | import cn.com.basic.face.base.BaseApplication;
|
| | | import cn.com.basic.face.discern.query.condition.CheckInQueryCondition;
|
| | | import cn.com.basic.face.discern.query.item.PhoneCallQueryItem;
|
| | | import cn.com.basic.face.fragment.CheckInFragment;
|
| | | import cn.com.basic.face.util.AppApi;
|
| | |
| | | }
|
| | |
|
| | | public void findCheckInLeftList(final boolean isVisitorList, final boolean isSortByDept, String searchText) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.REGISTER_QUERY);
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.CHECK_IN_QUERY);
|
| | | if (isVisitorList) {
|
| | | params.addBodyParameter(VisitorQueryCondition.FieldNames.notCompanyId, BaseApplication.getInstance().getDevice().getCompanyId());
|
| | | params.addBodyParameter(CheckInQueryCondition.FieldNames.visitorCompanyId, BaseApplication.getInstance().getDevice().getCompanyId());
|
| | | } else {
|
| | | params.addBodyParameter(VisitorQueryCondition.FieldNames.companyId, BaseApplication.getInstance().getDevice().getCompanyId());
|
| | | params.addBodyParameter(CheckInQueryCondition.FieldNames.employeeCompanyId, BaseApplication.getInstance().getDevice().getCompanyId());
|
| | | }
|
| | | params.addBodyParameter(VisitorQueryCondition.FieldNames.name, searchText);
|
| | | params.addBodyParameter(CheckInQueryCondition.FieldNames.username, searchText);
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<CheckInQueryItem> list = getList(CheckInQueryItem.class);
|
| | |
| | | if (isVisitorList) {
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_visitor().show(allItems);
|
| | | } else {
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_interviewee().show(allItems);
|
| | | CheckInFragment.getInstance().get_fragment_check_in_left_interviewee().show(allItems, isSortByDept);
|
| | | }
|
| | | }
|
| | | });
|
| | |
| | | public final static String IMAGE_URL_BASE = "http://192.168.1.27:8080/ssm/img/";
|
| | | public final static String BASE_URL = "http://192.168.1.27:8080/ssm/";
|
| | |
|
| | | public final static String VISITOR_TYPE_LIST = "VisitorType/v_list.do";
|
| | |
|
| | | public final static String DICTIONARY_TYPE_LIST = "Dictionary/v_list.do";
|
| | |
|
| | | public static final String REGISTER_ADD = "Register/o_add.do";
|
| | |
|
| | | public static final String VISIT_ADD = "Visit/o_add.do";
|
| | |
| | | setAdapter(context);
|
| | | }
|
| | |
|
| | | public void show(List list) {
|
| | | refresh(list);
|
| | | public void show(List list, boolean isSortByDept) {
|
| | | refresh(list, isSortByDept);
|
| | | }
|
| | |
|
| | | public void refresh(List list) {
|
| | | public void refresh(List list, boolean isSortByDept) {
|
| | | this.list.clear();
|
| | | this.list.addAll(list);
|
| | | mAdapter.setList(this.list);
|
| | | mAdapter.setSortByDept(isSortByDept);
|
| | | this.setAdapter(mAdapter);
|
| | | }
|
| | |
|