diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/BaseUrlApi.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/BaseUrlApi.java
index a1a6a06..971fa18 100755
--- a/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/BaseUrlApi.java
+++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/BaseUrlApi.java
@@ -7,9 +7,9 @@ package com.tenlionsoft.baselib.core.retrofit_net;
*/
public class BaseUrlApi {
- // public static final String IP = "http://192.168.0.3:8080/";/* 测试IP */
-// /systemoa/
- public static final String IP = "http://121.36.71.250/";/* 测试IP */
+ public static final String IP = "http://192.168.0.3:8080/";/* 测试IP */
+ // /systemoa/
+// public static final String IP = "http://121.36.71.250/";/* 测试IP */
// public static final String IP = "http://www.wlcbsyzl.cn/";/* 正式IP */
public static final String SYS_USERCENTER = "usercenter/";
public static final String SYS_POPULATION = "population/";/*人口系统*/
diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/widget/base/BaseFragment.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/widget/base/BaseFragment.java
index 9581612..96dac19 100755
--- a/baselib/src/main/java/com/tenlionsoft/baselib/core/widget/base/BaseFragment.java
+++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/widget/base/BaseFragment.java
@@ -183,6 +183,10 @@ public abstract class BaseFragment extends Fragment {
}
+ protected void setReLoEnable(boolean isRefresh, boolean isLoadMore) {
+ mSrlView.setEnableRefresh(isRefresh);
+ mSrlView.setEnableLoadMore(isLoadMore);
+ }
/**
* 选择加载状态
@@ -254,6 +258,17 @@ public abstract class BaseFragment extends Fragment {
}
}
+ protected void hideSoftInput() {
+ View v = mActivity.getCurrentFocus();
+ if (v != null && v.getWindowToken() != null) {
+ InputMethodManager manager = (InputMethodManager) mActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
+ boolean active = manager.isActive();
+ if (active) {
+ manager.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
+ }
+ }
+ }
+
public Context getApplicationContext() {
return context;
}
diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/widget/views/TypeFaceTextView.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/widget/views/TypeFaceTextView.java
index aa21c0d..b57537f 100644
--- a/baselib/src/main/java/com/tenlionsoft/baselib/core/widget/views/TypeFaceTextView.java
+++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/widget/views/TypeFaceTextView.java
@@ -21,15 +21,14 @@ import androidx.annotation.Nullable;
*/
public class TypeFaceTextView extends androidx.appcompat.widget.AppCompatTextView {
private boolean mIsShowLine;//是否显示标题
+ private boolean mIsShowHint;//是否显示必填提示
public TypeFaceTextView(Context context) {
this(context, null);
- init(context);
}
public TypeFaceTextView(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
- init(context);
}
public TypeFaceTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
@@ -37,6 +36,7 @@ public class TypeFaceTextView extends androidx.appcompat.widget.AppCompatTextVie
TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.TypeFaceTextView, defStyleAttr, 0);
int type = a.getInteger(R.styleable.TypeFaceTextView_text_type_cus, 0);
mIsShowLine = a.getBoolean(R.styleable.TypeFaceTextView_text_show_line, false);
+ mIsShowHint = a.getBoolean(R.styleable.TypeFaceTextView_text_show_hint, false);
if (type == 2) {
TextPaint paint = getPaint();
paint.setFakeBoldText(true);
@@ -47,14 +47,17 @@ public class TypeFaceTextView extends androidx.appcompat.widget.AppCompatTextVie
private void init(Context ctx) {
Typeface typeface = FontCache.getTypeface("fonts/pingfang.ttf", ctx);
setTypeface(typeface);
+ if (mIsShowHint) {
+ setText(getText(), null);
+ }
}
@Override
public void setText(CharSequence text, BufferType type) {
- if (mIsShowLine) {
- String content = " " + text;
+ if (mIsShowHint) {
+ String content = " " + text;
SpannableString as = new SpannableString(content);
- ImageSpan is = new ImageSpan(getContext(), R.drawable.ic_oa_flow_title_icon);
+ ImageSpan is = new ImageSpan(getContext(), R.drawable.ic_text_hint_must);
as.setSpan(is, 0, 1, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
super.setText(as, type);
} else {
diff --git a/baselib/src/main/res/drawable-xhdpi/ic_text_hint_must.png b/baselib/src/main/res/drawable-xhdpi/ic_text_hint_must.png
new file mode 100644
index 0000000..ce9639e
Binary files /dev/null and b/baselib/src/main/res/drawable-xhdpi/ic_text_hint_must.png differ
diff --git a/baselib/src/main/res/values/attrs.xml b/baselib/src/main/res/values/attrs.xml
index 7685b0d..0ffb715 100755
--- a/baselib/src/main/res/values/attrs.xml
+++ b/baselib/src/main/res/values/attrs.xml
@@ -22,6 +22,7 @@
+
@@ -34,6 +35,7 @@
+
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/record/UserRecordDetailActivity.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/record/UserRecordDetailActivity.java
index 98a771c..970ccd6 100644
--- a/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/record/UserRecordDetailActivity.java
+++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/record/UserRecordDetailActivity.java
@@ -2,6 +2,7 @@ package com.tenlionsoft.oamodule.activity.record;
import android.app.AlertDialog;
import android.content.Intent;
+import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
@@ -148,8 +149,44 @@ public class UserRecordDetailActivity extends BaseActivity {
public void onNext(@NonNull List userRecordTypeLists) {
mRecordTypeLists = userRecordTypeLists;
if (mRecordTypeLists.size() > 0) {
+ getUserRecordId();
+ } else {
+ refreshView(STATE_LOAD_EMPTY);
+ }
+ }
+
+ @Override
+ public void onError(@NonNull Throwable e) {
+ ExceptionHandler.handleException(e);
+ refreshView(STATE_LOAD_ERROR);
+ }
+
+ @Override
+ public void onComplete() {
+
+ }
+ });
+ }
+
+ /**
+ * 获取个人档案ID
+ */
+ private void getUserRecordId() {
+ RetrofitManager.getInstance()
+ .create(OAApi.class)
+ .getUserRecordId()
+ .compose(RxTransformer.getTransformer())
+ .subscribe(new Observer() {
+ @Override
+ public void onSubscribe(@NonNull Disposable d) {
+
+ }
+
+ @Override
+ public void onNext(@NonNull String bean) {
+ if (!TextUtils.isEmpty(bean)) {
refreshView(STATE_LOAD_SUCCESS);
- initView();
+ initView(bean);
} else {
refreshView(STATE_LOAD_EMPTY);
}
@@ -171,27 +208,31 @@ public class UserRecordDetailActivity extends BaseActivity {
/**
* 初始化视图
*/
- private void initView() {
+ private void initView(String id) {
mFragments = new ArrayList<>();
for (int i = 0; i < mRecordTypeLists.size(); i++) {
UserRecordTypeList bean = mRecordTypeLists.get(i);
if ("基本信息".equals(bean.getTypeName())) {
- BaseFragment fragment = FragmentUtils.getFragment(PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_BASE, "base");
+ BaseFragment fragment = FragmentUtils.getFragmentOne(PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_BASE, "id", id);
+ fragment.setCustomTag("base");
mFragments.add(fragment);
mLlTypeBase.setVisibility(View.VISIBLE);
}
if ("教育经历".equals(bean.getTypeName())) {
- BaseFragment fragment = FragmentUtils.getFragment(PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_EDU, "edu");
+ BaseFragment fragment = FragmentUtils.getFragmentOne(PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_EDU, "id", id);
+ fragment.setCustomTag("edu");
mFragments.add(fragment);
mLlTypeEdu.setVisibility(View.VISIBLE);
}
if ("工作简历".equals(bean.getTypeName())) {
- BaseFragment fragment = FragmentUtils.getFragment(PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_WORK, "work");
+ BaseFragment fragment = FragmentUtils.getFragmentOne(PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_WORK, "id", id);
+ fragment.setCustomTag("work");
mFragments.add(fragment);
mLlTypeWork.setVisibility(View.VISIBLE);
}
if ("个人荣誉".equals(bean.getTypeName())) {
- BaseFragment fragment = FragmentUtils.getFragment(PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_HONOUR, "honour");
+ BaseFragment fragment = FragmentUtils.getFragmentOne(PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_HONOUR, "id", id);
+ fragment.setCustomTag("honour");
mFragments.add(fragment);
mLlTypeHonour.setVisibility(View.VISIBLE);
}
@@ -280,143 +321,7 @@ public class UserRecordDetailActivity extends BaseActivity {
// .build(PathConfig.PATH_MODULE_OA_ACTIVITY_RECORD_USER_EDIT)
// .withString("id", b.getUserArchivesId())
// .navigation(mActivity, 12));
-// mTvName.setText(b.getName());
-// mTvGender.setText(b.getSexName());
-// mTvBirthday.setText(b.getBirthday());
-// mTvIdCard.setText(b.getIdCard());
-// mTvPolitical.setText(b.getPoliticalOutlookName());
-// mTvMarital.setText(b.getMaritalStatusName());
-// mTvNationality.setText(b.getNationality());
-// mTvNativePlace.setText(b.getNativeAddress());
-// mTvPassport.setText(b.getResidence());
-// mTvPassportType.setText(b.getResidenceNatureName());
-// mTvAddress.setText(b.getAddress());
-// mTvEmail.setText(b.getEmail());
-// mTvPhone.setText(b.getPhone());
-// mTvSchool.setText(b.getGraduation());
-// mTvSpecialty.setText(b.getMajorName());
-// mTvDegree.setText(b.getHighestDegree());
-// mTvGraduateDate.setText(b.getGraduationDate());
-// mTvLinkMan.setText(b.getEmergencyContact());
-// mEtLinkPhone.setText(b.getEmergencyContactPhone());
-// mTvObtainDate.setText(b.getJoinTime());
-// mTvPositiveDate.setText(b.getCeremonialTime());
-// mTvDept.setText(b.getDeptName());
-// mTvPost.setText(b.getPostName());
-// mTvLeader.setText(b.getDirectSuperiorName());
-// mTvBankNum.setText(b.getBankAccount());
-// mTvFundNum.setText(b.getFundAccount());
-// mTvSocialNum.setText(b.getSecurityAccount());
-// mTvJobTitle.setText(b.getTitleName());
-// mTvJobLevel.setText(b.getTitleGradeName());
-// mTvPersionType.setText(b.getUserTypeName());
-// if (b.getEducationList() != null && b.getEducationList().size() > 0) {
-// EducateAdapter adapter = new EducateAdapter(mActivity, b.getEducationList(), 1);
-// mRlvTeach.setLayoutManager(new LinearLayoutManager(mActivity));
-// mRlvTeach.setAdapter(adapter);
-// mRlvTeach.setVisibility(View.VISIBLE);
-// mRlvTeach.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1, Color.parseColor("#BFBFBF")));
-// mTvEducateHint.setVisibility(View.GONE);
-// } else {
-// mRlvTeach.setVisibility(View.GONE);
-// mTvEducateHint.setVisibility(View.VISIBLE);
-// }
-// if (b.getWorkList() != null && b.getWorkList().size() > 0) {
-// ResumeAdapter adapter = new ResumeAdapter(mActivity, b.getWorkList(), 1);
-// mRlvResume.setLayoutManager(new LinearLayoutManager(mActivity));
-// mRlvResume.setAdapter(adapter);
-// mRlvResume.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1, Color.parseColor("#BFBFBF")));
-// mRlvResume.setVisibility(View.VISIBLE);
-// mTvResumeHint.setVisibility(View.GONE);
-// } else {
-// mRlvResume.setVisibility(View.GONE);
-// mTvResumeHint.setVisibility(View.VISIBLE);
-// }
-// //证件照
-// if (!TextUtils.isEmpty(b.getPhoto())) {
-// mRlvImgs.setVisibility(View.VISIBLE);
-// List files = new ArrayList<>();
-// String[] split = b.getPhoto().split(",");
-// for (int i = 0; i < split.length; i++) {
-// AddFileBean bean = new AddFileBean();
-// bean.setId(split[i]);
-// bean.setPath(BaseUrlApi.BASE_IMG_URL + split[i]);
-// files.add(bean);
-// }
-// doGetFileInfos(b.getPhoto(), files, 2);
-// } else {
-// mRlvImgs.setVisibility(View.GONE);
-// }
-// //简历附件
-// if (!TextUtils.isEmpty(b.getResume())) {
-// mRlvResumeFile.setVisibility(View.VISIBLE);
-// List files = new ArrayList<>();
-// String[] split = b.getResume().split(",");
-// for (int i = 0; i < split.length; i++) {
-// AddFileBean bean = new AddFileBean();
-// bean.setId(split[i]);
-// bean.setPath(BaseUrlApi.BASE_IMG_URL + split[i]);
-// files.add(bean);
-// }
-// doGetFileInfos(b.getResume(), files, 1);
-// } else {
-// mRlvResumeFile.setVisibility(View.GONE);
-// }
-// }
-// private void doGetFileInfos(String fileId, List files, int type) {
-// ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
-// dialog.show();
-// RetrofitManager.getInstance()
-// .create(BaseApiService.class)
-// .getFileInfoList(fileId)
-// .compose(RxTransformer.getTransformer())
-// .subscribe(new Observer>() {
-// @Override
-// public void onSubscribe(@NonNull Disposable d) {
-//
-// }
-//
-// @Override
-// public void onNext(@NonNull List fileInfoBeans) {
-// if (dialog.isShowing()) dialog.dismiss();
-// if (fileInfoBeans.size() > 0) {
-// for (int i = 0; i < files.size(); i++) {
-// for (int j = 0; j < fileInfoBeans.size(); j++) {
-// if (files.get(i).getId().equals(fileInfoBeans.get(j).getFileId())) {
-// files.get(i).setFileName(fileInfoBeans.get(j).getFileName());
-// files.get(i).setFileType(FileUtils.getFileType(fileInfoBeans.get(j).getFileName()));
-// }
-// }
-// }
-// if (type == 2) {
-// AddFileAdapter adapter = new AddFileAdapter(mActivity, files);
-// mRlvImgs.setLayoutManager(new GridLayoutManager(mActivity, 5));
-// mRlvImgs.setAdapter(adapter);
-// adapter.addOnItemClickListener(addFileBean -> previewFile(addFileBean, files));
-// } else {
-// AddFileAdapter adapter = new AddFileAdapter(mActivity, files);
-// mRlvResumeFile.setLayoutManager(new LinearLayoutManager(mActivity));
-// mRlvResumeFile.setAdapter(adapter);
-// adapter.addOnItemClickListener(addFileBean -> previewFile(addFileBean, files));
-// }
-//
-// } else {
-// ToastUtils.show("未找到文档信息");
-// }
-// }
-//
-// @Override
-// public void onError(@NonNull Throwable e) {
-// if (dialog.isShowing()) dialog.dismiss();
-// ExceptionHandler.handleException(e);
-// }
-//
-// @Override
-// public void onComplete() {
-//
-// }
-// });
// }
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable @org.jetbrains.annotations.Nullable Intent data) {
@@ -428,41 +333,6 @@ public class UserRecordDetailActivity extends BaseActivity {
}
}
- /**
- * 预览文件
- */
-// private void previewFile(AddFileBean addFileBean, List mFiles) {
-// if (addFileBean.getFileType() == 1) {
-// //文档
-// ARouter.getInstance()
-// .build(PathConfig.PATH_MODULE_BASELIB_ACTIVITY_PREVIEW_FILE)
-// .withString("fileName", addFileBean.getFileName())
-// .withString("fileId", addFileBean.getId())
-// .navigation();
-// } else if (2 == addFileBean.getFileType()) {
-// //图片预览
-// //遍历文件获取所有图片文件
-// ArrayList imgUrls = new ArrayList<>();
-// for (int i = 0; i < mFiles.size(); i++) {
-// if (mFiles.get(i).getFileType() == 2) {
-// AddFileBean fileBean = mFiles.get(i);
-// String url = BaseUrlApi.BASE_IMG_URL + fileBean.getId();
-// imgUrls.add(url);
-// }
-// }
-// ARouter.getInstance()
-// .build(PathConfig.PATH_MODULE_BASELIB_SHOW_IMG)
-// .withStringArrayList(TAG_IMGURL, imgUrls)
-// .navigation();
-// } else if (3 == addFileBean.getFileType() || 4 == addFileBean.getFileType()) {
-// ARouter.getInstance()
-// .build(PathConfig.PATH_MODULE_PLAYER_SIMPLE_VIDEO)
-// .withString("title", addFileBean.getFileName().substring(0, addFileBean.getFileName().lastIndexOf(".")))
-// .withString("url", BaseUrlApi.BASE_IMG_URL + addFileBean.getId())
-// .withString("type", addFileBean.getFileType() == 4 ? "audio" : "video")
-// .navigation();
-// }
-// }
@Override
protected void doSearchByTitle() {
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/record/UserRecordEditActivity.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/record/UserRecordEditActivity.java
index a331e0c..8b30877 100644
--- a/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/record/UserRecordEditActivity.java
+++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/record/UserRecordEditActivity.java
@@ -7,13 +7,9 @@ import android.graphics.Color;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
-import android.widget.EditText;
-import android.widget.ImageView;
import android.widget.LinearLayout;
-import android.widget.TextView;
import com.alibaba.android.arouter.facade.annotation.Route;
-import com.alibaba.android.arouter.launcher.ARouter;
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
import com.bigkoo.pickerview.builder.TimePickerBuilder;
import com.bigkoo.pickerview.view.OptionsPickerView;
@@ -39,10 +35,11 @@ import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
import com.tenlionsoft.baselib.core.widget.base.AddFileAdapter;
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import com.tenlionsoft.baselib.core.widget.chat.GlideEngine;
-import com.tenlionsoft.baselib.core.widget.views.ItemSplitDivider;
+import com.tenlionsoft.baselib.core.widget.views.TypeFaceEditText;
import com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.FileUtils;
+import com.tenlionsoft.baselib.utils.LogUtils;
import com.tenlionsoft.baselib.utils.RegexUtils;
import com.tenlionsoft.baselib.utils.TimeUtils;
import com.tenlionsoft.baselib.utils.UIUtil;
@@ -51,15 +48,11 @@ import com.tenlionsoft.oamodule.R;
import com.tenlionsoft.oamodule.R2;
import com.tenlionsoft.oamodule.adapter.EducateAdapter;
import com.tenlionsoft.oamodule.adapter.ResumeAdapter;
-import com.tenlionsoft.oamodule.beans.ChoosePersonListBean;
-import com.tenlionsoft.oamodule.beans.DepartmentListBean;
import com.tenlionsoft.oamodule.beans.SaveEducateBean;
import com.tenlionsoft.oamodule.beans.SaveResumeBean;
import com.tenlionsoft.oamodule.beans.SaveUserRecordBean;
import com.tenlionsoft.oamodule.beans.UserRecordDetailBean;
import com.tenlionsoft.oamodule.net.OAApi;
-import com.tenlionsoft.oamodule.widget.EducateDialog;
-import com.tenlionsoft.oamodule.widget.ResumeDialog;
import org.jetbrains.annotations.NotNull;
@@ -92,101 +85,78 @@ import okhttp3.RequestBody;
public class UserRecordEditActivity extends BaseActivity {
+ @BindView(R2.id.rlv_imgs)
+ RecyclerView mRlvImgs;
+ @BindView(R2.id.tv_number)
+ TypeFaceTextView mTvNumber;
@BindView(R2.id.et_name)
- EditText mEtName;
+ TypeFaceEditText mEtName;
@BindView(R2.id.tv_gender)
- TextView mTvGender;
+ TypeFaceTextView mTvGender;
@BindView(R2.id.tv_birthday)
- TextView mTvBirthday;
+ TypeFaceTextView mTvBirthday;
@BindView(R2.id.et_id_card)
- EditText mEtIdCard;
+ TypeFaceEditText mEtIdCard;
@BindView(R2.id.tv_political)
- TextView mTvPolitical;
+ TypeFaceTextView mTvPolitical;
@BindView(R2.id.tv_marital)
- TextView mTvMarital;
+ TypeFaceTextView mTvMarital;
@BindView(R2.id.et_nationality)
- EditText mEtNationality;
+ TypeFaceEditText mEtNationality;
@BindView(R2.id.et_native_place)
- EditText mEtNativePlace;
+ TypeFaceEditText mEtNativePlace;
@BindView(R2.id.et_passport)
- EditText mEtPassport;
+ TypeFaceEditText mEtPassport;
@BindView(R2.id.tv_passport_type)
- TextView mTvPassportType;
+ TypeFaceTextView mTvPassportType;
@BindView(R2.id.et_address)
- EditText mEtAddress;
+ TypeFaceEditText mEtAddress;
@BindView(R2.id.et_email)
- EditText mEtEmail;
+ TypeFaceEditText mEtEmail;
@BindView(R2.id.et_phone)
- EditText mEtPhone;
+ TypeFaceEditText mEtPhone;
@BindView(R2.id.et_school)
- EditText mEtSchool;
+ TypeFaceEditText mEtSchool;
@BindView(R2.id.tv_specialty)
- TextView mTvSpecialty;
+ TypeFaceTextView mTvSpecialty;
@BindView(R2.id.et_degree)
- EditText mEtDegree;
+ TypeFaceEditText mEtDegree;
@BindView(R2.id.tv_graduate_date)
- TextView mTvGraduateDate;
+ TypeFaceTextView mTvGraduateDate;
@BindView(R2.id.et_link_man)
- EditText mEtLinkMan;
+ TypeFaceEditText mEtLinkMan;
@BindView(R2.id.et_link_phone)
- EditText mEtLinkPhone;
+ TypeFaceEditText mEtLinkPhone;
@BindView(R2.id.ll_base)
LinearLayout mLlBase;
@BindView(R2.id.tv_obtain_date)
- TextView mTvObtainDate;
+ TypeFaceTextView mTvObtainDate;
@BindView(R2.id.tv_positive_date)
- TextView mTvPositiveDate;
- @BindView(R2.id.tv_dept)
- TextView mTvDept;
- @BindView(R2.id.tv_post)
- TextView mTvPost;
- @BindView(R2.id.tv_leader)
- TextView mTvLeader;
+ TypeFaceTextView mTvPositiveDate;
+ @BindView(R2.id.tv_leave_date)
+ TypeFaceTextView mTvLeaveDate;
@BindView(R2.id.et_bank_num)
- EditText mEtBankNum;
+ TypeFaceEditText mEtBankNum;
@BindView(R2.id.et_fund_num)
- EditText mEtFundNum;
+ TypeFaceEditText mEtFundNum;
@BindView(R2.id.et_social_num)
- EditText mEtSocialNum;
+ TypeFaceEditText mEtSocialNum;
@BindView(R2.id.tv_job_title)
- TextView mTvJobTitle;
+ TypeFaceTextView mTvJobTitle;
@BindView(R2.id.tv_job_level)
- TextView mTvJobLevel;
+ TypeFaceTextView mTvJobLevel;
@BindView(R2.id.tv_persion_type)
- TextView mTvPersionType;
- @BindView(R2.id.rlv_resume)
- RecyclerView mRlvResume;
- @BindView(R2.id.rlv_resume_file)
- RecyclerView mRlvResumeFile;
- @BindView(R2.id.ll_job)
- LinearLayout mLlJob;
- @BindView(R2.id.btn_del)
- Button mBtnDel;
- @BindView(R2.id.rlv_imgs)
- RecyclerView mRlvImgs;
- @BindView(R2.id.btn_add_educate)
- Button mBtnAddEducate;
- @BindView(R2.id.rlv_educate)
- RecyclerView mRlvEducate;
- @BindView(R2.id.tv_educate_int)
- TextView mTvEducateInt;
+ TypeFaceTextView mTvPersionType;
@BindView(R2.id.btn_add_resume)
Button mBtnAddResume;
+ @BindView(R2.id.rlv_resume_file)
+ RecyclerView mRlvResumeFile;
@BindView(R2.id.tv_resume_int)
- TextView mTvResumeInt;
- @BindView(R2.id.tv_type_base)
- TypeFaceTextView mTvTypeBase;
- @BindView(R2.id.iv_type_base)
- ImageView mIvTypeBase;
- @BindView(R2.id.ll_type_base)
- LinearLayout mLlTypeBase;
- @BindView(R2.id.tv_type_job)
- TypeFaceTextView mTvTypeJob;
- @BindView(R2.id.iv_type_job)
- ImageView mIvTypeJob;
- @BindView(R2.id.ll_type_job)
- LinearLayout mLlTypeJob;
-
+ TypeFaceTextView mTvResumeInt;
+ @BindView(R2.id.ll_job)
+ LinearLayout mLlJob;
+ @BindView(R2.id.btn_confirm)
+ Button mBtnConfirm;
//性别
private List mGenderList;
private DicBean mSelGender;
@@ -205,7 +175,7 @@ public class UserRecordEditActivity extends BaseActivity {
private OptionsPickerView mSpecialtyPicker;
//岗位
private List mPostList;
- private DicBean mSelPost;
+ // private DicBean mSelPost;
private OptionsPickerView mPostPicker;
//职称
private List mJobTitleList;
@@ -224,8 +194,8 @@ public class UserRecordEditActivity extends BaseActivity {
private DicBean mSelPolitical;
private OptionsPickerView mPoliticalPicker;
//所在部门
- private DepartmentListBean mSelDept;
- private ChoosePersonListBean mSelLeader;
+// private DepartmentListBean mSelDept;
+// private ChoosePersonListBean mSelLeader;
private String mId;
private List mEducateDetailBeans;
@@ -240,6 +210,7 @@ public class UserRecordEditActivity extends BaseActivity {
private List mFileBeans;//简历
private AddFileAdapter mFileAdapter;//简历
private String[] fileFilter = new String[]{".doc", ".docx", ".xls", ".xlsx", ".pptx", ".ppt", ".txt", ".pdf"};
+ private UserRecordDetailBean mDBean;
@Override
protected int setLayoutId() {
@@ -252,6 +223,7 @@ public class UserRecordEditActivity extends BaseActivity {
mTvBaseTitle.setText("个人档案编辑");
initView();
mId = getIntent().getStringExtra("id");
+ LogUtils.e(mId);
if (TextUtils.isEmpty(mId)) {
ToastUtils.show("数据有误");
finish();
@@ -273,11 +245,14 @@ public class UserRecordEditActivity extends BaseActivity {
@Override
public void onNext(@NonNull UserRecordDetailBean userRecordDetailBean) {
- if (!TextUtils.isEmpty(userRecordDetailBean.getUserArchivesId())) {
+ mTvNumber.setText(userRecordDetailBean.getArchivesNum());
+ mDBean = userRecordDetailBean;
+ if (!TextUtils.isEmpty(userRecordDetailBean.getSex())) {
+ mTvResumeInt.setVisibility(View.VISIBLE);
setDataToView(userRecordDetailBean);
} else {
- ToastUtils.show("数据有误");
- finish();
+ mTvResumeInt.setVisibility(View.GONE);
+ refreshView(STATE_LOAD_SUCCESS);
}
}
@@ -338,25 +313,12 @@ public class UserRecordEditActivity extends BaseActivity {
mEtDegree.setText(b.getHighestDegree());
mTvGraduateDate.setText(b.getGraduationDate());
+ mTvLeaveDate.setText(b.getQuitTime());
mEtLinkMan.setText(b.getEmergencyContact());
mEtLinkPhone.setText(b.getEmergencyContactPhone());
mTvObtainDate.setText(b.getJoinTime());
mTvPositiveDate.setText(b.getCeremonialTime());
- mTvDept.setText(b.getDeptName());
- mSelDept = new DepartmentListBean();
- mSelDept.setDepartmentId(b.getDept());
- mSelDept.setDepartmentName(b.getDeptName());
-
- mTvPost.setText(b.getPostName());
- mSelPost = new DicBean();
- mSelPost.setDataId(b.getPost());
- mSelPost.setDataName(b.getPostName());
-
- mTvLeader.setText(b.getDirectSuperiorName());
- mSelLeader = new ChoosePersonListBean();
- mSelLeader.setUserName(b.getDirectSuperiorName());
- mSelLeader.setUserId(b.getDirectSuperior());
mEtBankNum.setText(b.getBankAccount());
mEtFundNum.setText(b.getFundAccount());
@@ -376,32 +338,20 @@ public class UserRecordEditActivity extends BaseActivity {
mSelPersonType.setDataName(b.getUserTypeName());
mSelPersonType.setDataId(b.getUserType());
- //教育经历
- if (b.getEducationList() != null && b.getEducationList().size() > 0) {
- mTvEducateInt.setVisibility(View.GONE);
- mRlvEducate.setVisibility(View.VISIBLE);
- mEducateDetailBeans = b.getEducationList();
- mEducateAdapter.setData(mEducateDetailBeans);
- } else {
- mTvEducateInt.setVisibility(View.VISIBLE);
- mRlvEducate.setVisibility(View.GONE);
- }
- //工作简历
- if (b.getWorkList() != null && b.getWorkList().size() > 0) {
- mResumeBeans = b.getWorkList();
- mResumeAdapter.setData(mResumeBeans);
- mRlvResume.setVisibility(View.VISIBLE);
- mTvResumeInt.setVisibility(View.GONE);
- } else {
- mRlvResume.setVisibility(View.GONE);
- mTvResumeInt.setVisibility(View.VISIBLE);
- }
//证件照
if (!TextUtils.isEmpty(b.getPhoto())) {
doGetFileInfos(b.getPhoto(), null, 2);
+ } else {
+ if (mImgList != null && mImgList.size() > 0) {
+ mImgList.clear();
+ mImgAdapter.setData(mImgList);
+ }
}
//简历附件
if (!TextUtils.isEmpty(b.getResume())) {
+
+ mRlvResumeFile.setVisibility(View.VISIBLE);
+ mTvResumeInt.setVisibility(View.GONE);
List files = new ArrayList<>();
String[] split = b.getResume().split(",");
for (int i = 0; i < split.length; i++) {
@@ -411,6 +361,13 @@ public class UserRecordEditActivity extends BaseActivity {
files.add(bean);
}
doGetFileInfos(b.getResume(), files, 1);
+ } else {
+ if (mFileBeans != null && mFileBeans.size() > 0) {
+ mFileBeans.clear();
+ mFileAdapter.setData(mFileBeans);
+ }
+ mRlvResumeFile.setVisibility(View.GONE);
+ mTvResumeInt.setVisibility(View.VISIBLE);
}
}
@@ -472,35 +429,19 @@ public class UserRecordEditActivity extends BaseActivity {
mTvObtainDate.setText(currentDate);
mTvGraduateDate.setText(currentDate);
mEtName.setText(UserLgUtils.getName());
+ mBtnAddResume.setVisibility(View.GONE);
+
+
+// mTvPublish.setVisibility(View.VISIBLE);
+// mTvPublish.setText("保存");
+// mTvPublish.setOnClickListener(v -> doSaveRecord());
- mTvPublish.setVisibility(View.VISIBLE);
- mTvPublish.setText("保存");
- mTvPublish.setOnClickListener(v -> doSaveRecord());
- //个人简历
- mLlTypeBase.setOnClickListener(v -> {
- mLlBase.setVisibility(View.VISIBLE);
- mLlJob.setVisibility(View.GONE);
- mTvTypeBase.setTextColor(getResources().getColor(R.color.black_10));
- mTvTypeJob.setTextColor(getResources().getColor(R.color.gray_a9));
- mIvTypeBase.setVisibility(View.VISIBLE);
- mIvTypeJob.setVisibility(View.INVISIBLE);
- });
- //工作简历
- mLlTypeJob.setOnClickListener(v -> {
- mLlBase.setVisibility(View.GONE);
- mLlJob.setVisibility(View.VISIBLE);
- mTvTypeBase.setTextColor(getResources().getColor(R.color.gray_a9));
- mTvTypeJob.setTextColor(getResources().getColor(R.color.black_10));
- mIvTypeBase.setVisibility(View.INVISIBLE);
- mIvTypeJob.setVisibility(View.VISIBLE);
- });
mTvGender.setOnClickListener(v -> onShowGender());
mTvPolitical.setOnClickListener(v -> onShowPolitical());
mTvMarital.setOnClickListener(v -> onShowMarital());
mTvPassportType.setOnClickListener(v -> onShowPassportType());
mTvSpecialty.setOnClickListener(v -> onShowSpecialty());
- mTvPost.setOnClickListener(v -> onShowPost());
mTvJobTitle.setOnClickListener(v -> onShowJobTitle());
mTvJobLevel.setOnClickListener(v -> onShowJobLevel());
mTvPersionType.setOnClickListener(v -> onShowPersonType());
@@ -508,69 +449,8 @@ public class UserRecordEditActivity extends BaseActivity {
mTvGraduateDate.setOnClickListener(v -> onShowDate(2));
mTvObtainDate.setOnClickListener(v -> onShowDate(3));
mTvPositiveDate.setOnClickListener(v -> onShowDate(4));
- mTvDept.setOnClickListener(v -> ARouter.getInstance()
- .build(PathConfig.PATH_MODULE_OA_ACTIVITY_SEL_DEPT)
- .navigation(mActivity, 12));
- mTvLeader.setOnClickListener(v -> {
- if (mSelDept == null) {
- ToastUtils.show("请选择所在部门");
- } else {
- ARouter.getInstance()
- .build(PathConfig.PATH_MODULE_OA_ACTIVITY_SEL_PERSON)
- .withBoolean("isSingle", true)
- .withString("deptName", mSelDept.getDepartmentName())
- .withString("deptId", mSelDept.getDepartmentId())
- .navigation(mActivity, 13);
- }
- });
- //教育经历
- mEducateDetailBeans = new ArrayList<>();
- mEducateAdapter = new EducateAdapter(mActivity, mEducateDetailBeans, 2);
- mRlvEducate.setLayoutManager(new LinearLayoutManager(mActivity));
- mRlvEducate.setAdapter(mEducateAdapter);
- mRlvEducate.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1, Color.parseColor("#BFBFBF")));
- mBtnAddEducate.setOnClickListener(v -> showAddEducateDialog(null, 1, 0));
- mEducateAdapter.addOnDelOrEditListener(new EducateAdapter.OnDelOrEditListener() {
- @Override
- public void onDelBean(SaveEducateBean bean, int i) {
- mEducateDetailBeans.remove(i);
- mEducateAdapter.setData(mEducateDetailBeans);
- if (mEducateDetailBeans.size() > 0) {
- mTvEducateInt.setVisibility(View.GONE);
- } else {
- mTvEducateInt.setVisibility(View.VISIBLE);
- }
- }
-
- @Override
- public void onEditBean(SaveEducateBean bean, int i) {
- showAddEducateDialog(bean, 2, i);
- }
- });
- //工作简历
- mResumeBeans = new ArrayList<>();
- mResumeAdapter = new ResumeAdapter(mActivity, mResumeBeans, 2);
- mRlvResume.setLayoutManager(new LinearLayoutManager(mActivity));
- mRlvResume.setAdapter(mResumeAdapter);
- mRlvResume.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1, Color.parseColor("#BFBFBF")));
- mBtnAddResume.setOnClickListener(v -> showAddResumeDialog(null, 1, 0));
- mResumeAdapter.addOnDelOrEditListener(new ResumeAdapter.OnDelOrEditListener() {
- @Override
- public void onDel(SaveResumeBean bean, int i) {
- mResumeBeans.remove(i);
- mResumeAdapter.setData(mResumeBeans);
- if (mResumeBeans.size() > 0) {
- mTvResumeInt.setVisibility(View.GONE);
- } else {
- mTvResumeInt.setVisibility(View.VISIBLE);
- }
- }
-
- @Override
- public void onEdit(SaveResumeBean bean, int i) {
- showAddResumeDialog(bean, 2, i);
- }
- });
+ mTvLeaveDate.setOnClickListener(v -> onShowDate(5));
+ mBtnConfirm.setOnClickListener(v -> doSaveRecord());
//证件照
@@ -612,9 +492,6 @@ public class UserRecordEditActivity extends BaseActivity {
.withFileFilter(fileFilter)
.start();
}
- } else {
-
-
}
});
//删除上传的文件
@@ -626,88 +503,85 @@ public class UserRecordEditActivity extends BaseActivity {
});
mRlvResumeFile.setLayoutManager(new LinearLayoutManager(mActivity));
mRlvResumeFile.setAdapter(mFileAdapter);
- mBtnDel.setOnClickListener(v -> onShowConfirm());
}
- private void showAddResumeDialog(SaveResumeBean bean, int type, int pos) {
- ResumeDialog dialog = new ResumeDialog.Builder(mActivity)
- .setType(type)
- .setBean(bean)
- .build();
- dialog.addOnChangeListener(new ResumeDialog.OnChangeListener() {
- @Override
- public void doSave(SaveResumeBean bean) {
- //新增教育经历
- dialog.dismiss();
- mResumeBeans.add(bean);
- mResumeAdapter.setData(mResumeBeans);
- if (mResumeBeans.size() > 0) {
- mTvResumeInt.setVisibility(View.GONE);
- mRlvResume.setVisibility(View.VISIBLE);
- } else {
- mTvResumeInt.setVisibility(View.VISIBLE);
- mRlvResume.setVisibility(View.GONE);
- }
- }
-
- @Override
- public void doEdit(SaveResumeBean bean) {
- dialog.dismiss();
- //编辑
- SaveResumeBean bean1 = mResumeBeans.get(pos);
- bean1.setWorkUnit(bean.getWorkUnit());
- bean1.setDept(bean.getDept());
- bean1.setWorkContent(bean.getWorkContent());
- bean.setQuitReason(bean.getQuitReason());
- bean1.setStartTime(bean.getStartTime());
- bean1.setEndTime(bean.getEndTime());
- mResumeAdapter.setData(mResumeBeans);
- }
- });
- dialog.show();
- }
+// private void showAddResumeDialog(SaveResumeBean bean, int type, int pos) {
+// ResumeDialog dialog = new ResumeDialog.Builder(mActivity)
+// .setType(type)
+// .setBean(bean)
+// .build();
+// dialog.addOnChangeListener(new ResumeDialog.OnChangeListener() {
+// @Override
+// public void doSave(SaveResumeBean bean) {
+// //新增教育经历
+// dialog.dismiss();
+// mResumeBeans.add(bean);
+// mResumeAdapter.setData(mResumeBeans);
+// if (mResumeBeans.size() > 0) {
+// mTvResumeInt.setVisibility(View.GONE);
+// mRlvResume.setVisibility(View.VISIBLE);
+// } else {
+// mTvResumeInt.setVisibility(View.VISIBLE);
+// mRlvResume.setVisibility(View.GONE);
+// }
+// }
+//
+// @Override
+// public void doEdit(SaveResumeBean bean) {
+// dialog.dismiss();
+// //编辑
+// SaveResumeBean bean1 = mResumeBeans.get(pos);
+// bean1.setWorkUnit(bean.getWorkUnit());
+// bean1.setDept(bean.getDept());
+// bean1.setWorkContent(bean.getWorkContent());
+// bean.setQuitReason(bean.getQuitReason());
+// bean1.setStartTime(bean.getStartTime());
+// bean1.setEndTime(bean.getEndTime());
+// mResumeAdapter.setData(mResumeBeans);
+// }
+// });
+// dialog.show();
+// }
/**
* 显示添加 或 编辑
*/
- private void showAddEducateDialog(SaveEducateBean bean, int type, int pos) {
- EducateDialog dialog = new EducateDialog.Builder(mActivity)
- .setType(type)
- .setBean(bean)
- .build();
- dialog.addOnChangeListener(new EducateDialog.OnChangeListener() {
- @Override
- public void doSave(SaveEducateBean bean) {
- //新增教育经历
- dialog.dismiss();
- mEducateDetailBeans.add(bean);
- mEducateAdapter.setData(mEducateDetailBeans);
- if (mEducateDetailBeans.size() > 0) {
- mRlvEducate.setVisibility(View.VISIBLE);
- mTvEducateInt.setVisibility(View.GONE);
- } else {
- mRlvEducate.setVisibility(View.GONE);
- mTvEducateInt.setVisibility(View.VISIBLE);
- }
- }
-
- @Override
- public void doEdit(SaveEducateBean bean) {
- dialog.dismiss();
- //编辑
- SaveEducateBean bean1 = mEducateDetailBeans.get(pos);
- bean1.setSchoolName(bean.getSchoolName());
- bean1.setEducation(bean.getEducation());
- bean1.setMajor(bean.getMajor());
- bean1.setStartTime(bean.getStartTime());
- bean1.setEndTime(bean.getEndTime());
- mEducateAdapter.setData(mEducateDetailBeans);
- }
- });
- dialog.show();
- }
-
-
+// private void showAddEducateDialog(SaveEducateBean bean, int type, int pos) {
+// EducateDialog dialog = new EducateDialog.Builder(mActivity)
+// .setType(type)
+// .setBean(bean)
+// .build();
+// dialog.addOnChangeListener(new EducateDialog.OnChangeListener() {
+// @Override
+// public void doSave(SaveEducateBean bean) {
+// //新增教育经历
+// dialog.dismiss();
+// mEducateDetailBeans.add(bean);
+// mEducateAdapter.setData(mEducateDetailBeans);
+// if (mEducateDetailBeans.size() > 0) {
+// mRlvEducate.setVisibility(View.VISIBLE);
+// mTvEducateInt.setVisibility(View.GONE);
+// } else {
+// mRlvEducate.setVisibility(View.GONE);
+// mTvEducateInt.setVisibility(View.VISIBLE);
+// }
+// }
+//
+// @Override
+// public void doEdit(SaveEducateBean bean) {
+// dialog.dismiss();
+// //编辑
+// SaveEducateBean bean1 = mEducateDetailBeans.get(pos);
+// bean1.setSchoolName(bean.getSchoolName());
+// bean1.setEducation(bean.getEducation());
+// bean1.setMajor(bean.getMajor());
+// bean1.setStartTime(bean.getStartTime());
+// bean1.setEndTime(bean.getEndTime());
+// mEducateAdapter.setData(mEducateDetailBeans);
+// }
+// });
+// dialog.show();
+// }
private void onShowConfirm() {
new AlertDialog.Builder(mActivity)
.setTitle("提示")
@@ -847,26 +721,26 @@ public class UserRecordEditActivity extends BaseActivity {
}
//岗位 5
- private void onShowPost() {
- hideSoftKeyboard();
- if (mPostList != null && mPostList.size() > 0) {
- if (mPostPicker == null) {
- mPostPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
- mSelPost = mPostList.get(o1);
- mTvPost.setText(mSelPost.getDataName());
- })
- .setTitleText("请选择")
- .setCancelColor(Color.parseColor("#1189FF"))
- .setSubmitColor(Color.parseColor("#1189FF"))
- .setTitleColor(Color.parseColor("#1189FF"))
- .build();
- mPostPicker.setPicker(mPostList);
- }
- mPostPicker.show();
- } else {
- getDicListByType(DicIds.DIC_POST, 5);
- }
- }
+// private void onShowPost() {
+// hideSoftKeyboard();
+// if (mPostList != null && mPostList.size() > 0) {
+// if (mPostPicker == null) {
+// mPostPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
+// mSelPost = mPostList.get(o1);
+// mTvPost.setText(mSelPost.getDataName());
+// })
+// .setTitleText("请选择")
+// .setCancelColor(Color.parseColor("#1189FF"))
+// .setSubmitColor(Color.parseColor("#1189FF"))
+// .setTitleColor(Color.parseColor("#1189FF"))
+// .build();
+// mPostPicker.setPicker(mPostList);
+// }
+// mPostPicker.show();
+// } else {
+// getDicListByType(DicIds.DIC_POST, 5);
+// }
+// }
//职称 6
private void onShowJobTitle() {
@@ -976,6 +850,8 @@ public class UserRecordEditActivity extends BaseActivity {
case 4://转正日期
mTvPositiveDate.setText(TimeUtils.dateToString(date));
break;
+ case 5://离职日期
+ mTvLeaveDate.setText(TimeUtils.dateToString(date));
}
})
.setTitleText("请选日期")
@@ -1028,7 +904,7 @@ public class UserRecordEditActivity extends BaseActivity {
break;
case 5://岗位
mPostList = beans;
- onShowPost();
+// onShowPost();
break;
case 6://职称
mJobTitleList = beans;
@@ -1070,11 +946,11 @@ public class UserRecordEditActivity extends BaseActivity {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
if (requestCode == 12) {
- mSelDept = (DepartmentListBean) data.getSerializableExtra("bean");
- mTvDept.setText(mSelDept.getDepartmentName());
+// mSelDept = (DepartmentListBean) data.getSerializableExtra("bean");
+// mTvDept.setText(mSelDept.getDepartmentName());
} else if (requestCode == 13) {
- mSelLeader = (ChoosePersonListBean) data.getSerializableExtra("bean");
- mTvLeader.setText(mSelLeader.getUserName());
+// mSelLeader = (ChoosePersonListBean) data.getSerializableExtra("bean");
+// mTvLeader.setText(mSelLeader.getUserName());
} else if (requestCode == 123) {
// 图片选择结果回调
List selectList = PictureSelector.obtainMultipleResult(data);
@@ -1256,11 +1132,11 @@ public class UserRecordEditActivity extends BaseActivity {
ToastUtils.show("请输入姓名");
return false;
}
- String birthday = mTvBirthday.getText().toString().trim();
- if (TextUtils.isEmpty(birthday)) {
- ToastUtils.show("请选择出生日期");
- return false;
- }
+// String birthday = mTvBirthday.getText().toString().trim();
+// if (TextUtils.isEmpty(birthday)) {
+// ToastUtils.show("请选择出生日期");
+// return false;
+// }
if (mSelGender == null) {
ToastUtils.show("请选择性别");
return false;
@@ -1291,18 +1167,7 @@ public class UserRecordEditActivity extends BaseActivity {
ToastUtils.show("请选择专业");
return false;
}
- if (mSelDept == null) {
- ToastUtils.show("请选择所在部门");
- return false;
- }
- if (mSelPost == null) {
- ToastUtils.show("请选择岗位");
- return false;
- }
- if (mSelLeader == null) {
- ToastUtils.show("请选择直接上级");
- return false;
- }
+
if (mSelJobTitle == null) {
ToastUtils.show("请选择职称");
return false;
@@ -1321,6 +1186,7 @@ public class UserRecordEditActivity extends BaseActivity {
private RequestBody buildParams() {
SaveUserRecordBean bean = new SaveUserRecordBean();
String name = mEtName.getText().toString().trim();
+ bean.setArchivesNum(mDBean.getArchivesNum());//档案编号
bean.setName(name);//姓名
bean.setSex(mSelGender.getDataId());//性别
String birthday = mTvBirthday.getText().toString().trim();
@@ -1357,9 +1223,11 @@ public class UserRecordEditActivity extends BaseActivity {
bean.setJoinTime(obtainDate);//入职日期
String posDate = mTvPositiveDate.getText().toString().trim();
bean.setCeremonialTime(posDate);//转正日期
- bean.setDept(mSelDept.getDepartmentId());//所在部门
- bean.setPost(mSelPost.getDataId());//岗位
- bean.setDirectSuperior(mSelLeader.getUserId());//领导
+ String leaveDate = mTvLeaveDate.getText().toString().trim();
+ bean.setQuitTime(leaveDate);//离职日期
+// bean.setDept(mSelDept.getDepartmentId());//所在部门
+// bean.setPost(mSelPost.getDataId());//岗位
+// bean.setDirectSuperior(mSelLeader.getUserId());//领导
String bankNum = mEtBankNum.getText().toString().trim();
bean.setBankAccount(bankNum);//银行账号
String fundNum = mEtFundNum.getText().toString().trim();//公积金
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/adapter/EducateAdapter.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/adapter/EducateAdapter.java
index b7d193f..32dcfd9 100644
--- a/oamodule/src/main/java/com/tenlionsoft/oamodule/adapter/EducateAdapter.java
+++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/adapter/EducateAdapter.java
@@ -51,6 +51,11 @@ public class EducateAdapter extends BaseRecyclerAdapter educationList;
private List workList;
-
public String getAddress() {
return address;
}
@@ -518,6 +517,4 @@ public class UserRecordDetailBean {
}
-
-
}
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordBaseFragment.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordBaseFragment.java
index be62e8e..e70ebc8 100644
--- a/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordBaseFragment.java
+++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordBaseFragment.java
@@ -1,11 +1,51 @@
package com.tenlionsoft.oamodule.fragments;
+import android.app.ProgressDialog;
+import android.content.Intent;
+import android.os.Bundle;
+import android.text.TextUtils;
import android.view.View;
+import android.widget.Button;
+import android.widget.LinearLayout;
import com.alibaba.android.arouter.facade.annotation.Route;
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.hjq.toast.ToastUtils;
import com.tenlionsoft.baselib.constant.PathConfig;
+import com.tenlionsoft.baselib.core.beans.AddFileBean;
+import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
+import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
+import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
+import com.tenlionsoft.baselib.core.retrofit_net.bean.FileInfoBean;
+import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
+import com.tenlionsoft.baselib.core.widget.base.AddFileAdapter;
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
+import com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView;
+import com.tenlionsoft.baselib.utils.ExceptionHandler;
+import com.tenlionsoft.baselib.utils.FileUtils;
+import com.tenlionsoft.baselib.utils.UIUtil;
import com.tenlionsoft.oamodule.R;
+import com.tenlionsoft.oamodule.R2;
+import com.tenlionsoft.oamodule.activity.record.UserRecordEditActivity;
+import com.tenlionsoft.oamodule.beans.UserRecordDetailBean;
+import com.tenlionsoft.oamodule.net.OAApi;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import androidx.activity.result.ActivityResultLauncher;
+import androidx.activity.result.contract.ActivityResultContracts;
+import androidx.recyclerview.widget.GridLayoutManager;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import io.reactivex.rxjava3.annotations.NonNull;
+import io.reactivex.rxjava3.core.Observer;
+import io.reactivex.rxjava3.disposables.Disposable;
+
+import static android.app.Activity.RESULT_OK;
+import static com.tenlionsoft.baselib.core.widget.PhotoActivity.TAG_IMGURL;
/**
* 作者: adam
@@ -16,6 +56,87 @@ import com.tenlionsoft.oamodule.R;
@Route(path = PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_BASE)
public class UserRecordBaseFragment extends BaseFragment {
+ @BindView(R2.id.rlv_imgs)
+ RecyclerView mRlvImgs;
+ @BindView(R2.id.tv_number)
+ TypeFaceTextView mTvNumber;
+ @BindView(R2.id.tv_name)
+ TypeFaceTextView mTvName;
+ @BindView(R2.id.tv_gender)
+ TypeFaceTextView mTvGender;
+ @BindView(R2.id.tv_birthday)
+ TypeFaceTextView mTvBirthday;
+ @BindView(R2.id.tv_id_card)
+ TypeFaceTextView mTvIdCard;
+ @BindView(R2.id.tv_political)
+ TypeFaceTextView mTvPolitical;
+ @BindView(R2.id.tv_marital)
+ TypeFaceTextView mTvMarital;
+ @BindView(R2.id.tv_nationality)
+ TypeFaceTextView mTvNationality;
+ @BindView(R2.id.tv_native_place)
+ TypeFaceTextView mTvNativePlace;
+ @BindView(R2.id.tv_passport)
+ TypeFaceTextView mTvPassport;
+ @BindView(R2.id.tv_passport_type)
+ TypeFaceTextView mTvPassportType;
+ @BindView(R2.id.tv_address)
+ TypeFaceTextView mTvAddress;
+ @BindView(R2.id.tv_email)
+ TypeFaceTextView mTvEmail;
+ @BindView(R2.id.tv_phone)
+ TypeFaceTextView mTvPhone;
+ @BindView(R2.id.tv_school)
+ TypeFaceTextView mTvSchool;
+ @BindView(R2.id.tv_specialty)
+ TypeFaceTextView mTvSpecialty;
+ @BindView(R2.id.tv_degree)
+ TypeFaceTextView mTvDegree;
+ @BindView(R2.id.tv_graduate_date)
+ TypeFaceTextView mTvGraduateDate;
+ @BindView(R2.id.tv_link_man)
+ TypeFaceTextView mTvLinkMan;
+ @BindView(R2.id.et_link_phone)
+ TypeFaceTextView mEtLinkPhone;
+ @BindView(R2.id.ll_base)
+ LinearLayout mLlBase;
+ @BindView(R2.id.tv_obtain_date)
+ TypeFaceTextView mTvObtainDate;
+ @BindView(R2.id.tv_positive_date)
+ TypeFaceTextView mTvPositiveDate;
+ @BindView(R2.id.tv_leave_date)
+ TypeFaceTextView mTvLeaveDate;
+ @BindView(R2.id.tv_bank_num)
+ TypeFaceTextView mTvBankNum;
+ @BindView(R2.id.tv_fund_num)
+ TypeFaceTextView mTvFundNum;
+ @BindView(R2.id.tv_social_num)
+ TypeFaceTextView mTvSocialNum;
+ @BindView(R2.id.tv_job_title)
+ TypeFaceTextView mTvJobTitle;
+ @BindView(R2.id.tv_job_level)
+ TypeFaceTextView mTvJobLevel;
+ @BindView(R2.id.tv_persion_type)
+ TypeFaceTextView mTvPersionType;
+ @BindView(R2.id.rlv_resume_file)
+ RecyclerView mRlvResumeFile;
+ @BindView(R2.id.tv_resume_hint)
+ TypeFaceTextView mTvResumeHint;
+ @BindView(R2.id.ll_job)
+ LinearLayout mLlJob;
+ @BindView(R2.id.btn_edit)
+ Button mBtnEdit;
+ private String mId;
+ private UserRecordDetailBean mDetailBean;
+ private ActivityResultLauncher mLauncher = registerForActivityResult(
+ new ActivityResultContracts.StartActivityForResult(),
+ result -> {
+ if (result.getResultCode() == RESULT_OK) {
+ setStateView(STATE_LOAD);
+ getUserRecordDetail();
+ }
+ });
+
@Override
protected int getContentViewId() {
return R.layout.fragment_user_record_base_phone;
@@ -23,7 +144,215 @@ public class UserRecordBaseFragment extends BaseFragment {
@Override
protected void setDataToView(View dataView) {
- setStateView(STATE_SUCCESS);
+ ButterKnife.bind(this, dataView);
+ Bundle bundle = getArguments();
+ if (bundle != null) {
+ mId = bundle.getString("id");
+ }
+ if (!TextUtils.isEmpty(mId)) {
+ getUserRecordDetail();
+ } else {
+ ToastUtils.show("数据有误");
+ setStateView(STATE_ERROR);
+ }
+ }
+
+ /**
+ * 获取档案基础信息详情
+ */
+ private void getUserRecordDetail() {
+ RetrofitManager.getInstance()
+ .create(OAApi.class)
+ .getUserRecordDetailById()
+ .compose(RxTransformer.getTransformer())
+ .subscribe(new Observer() {
+ @Override
+ public void onSubscribe(@NonNull Disposable d) {
+
+ }
+
+ @Override
+ public void onNext(@NonNull UserRecordDetailBean userRecordDetailBean) {
+ setData(userRecordDetailBean);
+ setStateView(STATE_SUCCESS);
+ setReLoEnable(false, false);
+ }
+
+ @Override
+ public void onError(@NonNull Throwable e) {
+ ExceptionHandler.handleException(e);
+ setStateView(STATE_ERROR);
+ setReLoEnable(false, false);
+ }
+
+ @Override
+ public void onComplete() {
+
+ }
+ });
+ }
+
+
+ private void setData(UserRecordDetailBean b) {
+ mBtnEdit.setOnClickListener(v -> {
+ Intent intent = new Intent(mActivity, UserRecordEditActivity.class);
+ intent.putExtra("id", mId);
+ mLauncher.launch(intent);
+ });
+ mDetailBean = b;
+ mTvNumber.setText(b.getArchivesNum());
+ mTvName.setText(b.getName());
+ mTvGender.setText(b.getSexName());
+ mTvBirthday.setText(b.getBirthday());
+ mTvIdCard.setText(b.getIdCard());
+ mTvPolitical.setText(b.getPoliticalOutlookName());
+ mTvMarital.setText(b.getMaritalStatusName());
+ mTvNationality.setText(b.getNationality());
+ mTvNativePlace.setText(b.getNativeAddress());
+ mTvPassport.setText(b.getResidence());
+ mTvPassportType.setText(b.getResidenceNatureName());
+ mTvAddress.setText(b.getAddress());
+ mTvEmail.setText(b.getEmail());
+ mTvPhone.setText(b.getPhone());
+ mTvSchool.setText(b.getGraduation());
+ mTvSpecialty.setText(b.getMajorName());
+ mTvDegree.setText(b.getHighestDegree());
+ mTvGraduateDate.setText(b.getGraduationDate());
+ mTvLinkMan.setText(b.getEmergencyContact());
+ mEtLinkPhone.setText(b.getEmergencyContactPhone());
+ mTvObtainDate.setText(b.getJoinTime());
+ mTvPositiveDate.setText(b.getCeremonialTime());
+ mTvLeaveDate.setText(b.getQuitTime());
+ mTvBankNum.setText(b.getBankAccount());
+ mTvFundNum.setText(b.getFundAccount());
+ mTvSocialNum.setText(b.getSecurityAccount());
+ mTvJobTitle.setText(b.getTitleName());
+ mTvJobLevel.setText(b.getTitleGradeName());
+ mTvPersionType.setText(b.getUserTypeName());
+ //证件照
+ if (!TextUtils.isEmpty(b.getPhoto())) {
+ mRlvImgs.setVisibility(View.VISIBLE);
+ List files = new ArrayList<>();
+ String[] split = b.getPhoto().split(",");
+ for (int i = 0; i < split.length; i++) {
+ AddFileBean bean = new AddFileBean();
+ bean.setId(split[i]);
+ bean.setPath(BaseUrlApi.BASE_IMG_URL + split[i]);
+ files.add(bean);
+ }
+ doGetFileInfos(b.getPhoto(), files, 2);
+ } else {
+ mRlvImgs.setVisibility(View.GONE);
+ }
+ //简历附件
+ if (!TextUtils.isEmpty(b.getResume())) {
+ mRlvResumeFile.setVisibility(View.VISIBLE);
+ mTvResumeHint.setVisibility(View.GONE);
+ List files = new ArrayList<>();
+ String[] split = b.getResume().split(",");
+ for (int i = 0; i < split.length; i++) {
+ AddFileBean bean = new AddFileBean();
+ bean.setId(split[i]);
+ bean.setPath(BaseUrlApi.BASE_IMG_URL + split[i]);
+ files.add(bean);
+ }
+ doGetFileInfos(b.getResume(), files, 1);
+ } else {
+ mRlvResumeFile.setVisibility(View.GONE);
+ mTvResumeHint.setVisibility(View.VISIBLE);
+ }
+ }
+
+ private void doGetFileInfos(String fileId, List files, int type) {
+ ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
+ dialog.show();
+ RetrofitManager.getInstance()
+ .create(BaseApiService.class)
+ .getFileInfoList(fileId)
+ .compose(RxTransformer.getTransformer())
+ .subscribe(new Observer>() {
+ @Override
+ public void onSubscribe(@NonNull Disposable d) {
+
+ }
+
+ @Override
+ public void onNext(@NonNull List fileInfoBeans) {
+ if (dialog.isShowing()) dialog.dismiss();
+ if (fileInfoBeans.size() > 0) {
+ for (int i = 0; i < files.size(); i++) {
+ for (int j = 0; j < fileInfoBeans.size(); j++) {
+ if (files.get(i).getId().equals(fileInfoBeans.get(j).getFileId())) {
+ files.get(i).setFileName(fileInfoBeans.get(j).getFileName());
+ files.get(i).setFileType(FileUtils.getFileType(fileInfoBeans.get(j).getFileName()));
+ }
+ }
+ }
+ if (type == 2) {
+ AddFileAdapter adapter = new AddFileAdapter(mActivity, files);
+ mRlvImgs.setLayoutManager(new GridLayoutManager(mActivity, 5));
+ mRlvImgs.setAdapter(adapter);
+ adapter.addOnItemClickListener(addFileBean -> previewFile(addFileBean, files));
+ } else {
+ AddFileAdapter adapter = new AddFileAdapter(mActivity, files);
+ mRlvResumeFile.setLayoutManager(new LinearLayoutManager(mActivity));
+ mRlvResumeFile.setAdapter(adapter);
+ adapter.addOnItemClickListener(addFileBean -> previewFile(addFileBean, files));
+ }
+
+ } else {
+ ToastUtils.show("未找到文档信息");
+ }
+ }
+
+ @Override
+ public void onError(@NonNull Throwable e) {
+ if (dialog.isShowing()) dialog.dismiss();
+ ExceptionHandler.handleException(e);
+ }
+
+ @Override
+ public void onComplete() {
+
+ }
+ });
+ }
+
+
+ /**
+ * 预览文件
+ */
+ private void previewFile(AddFileBean addFileBean, List mFiles) {
+ if (addFileBean.getFileType() == 1) {
+ //文档
+ ARouter.getInstance()
+ .build(PathConfig.PATH_MODULE_BASELIB_ACTIVITY_PREVIEW_FILE)
+ .withString("fileName", addFileBean.getFileName())
+ .withString("fileId", addFileBean.getId())
+ .navigation();
+ } else if (2 == addFileBean.getFileType()) {
+ //图片预览
+ //遍历文件获取所有图片文件
+ ArrayList imgUrls = new ArrayList<>();
+ for (int i = 0; i < mFiles.size(); i++) {
+ if (mFiles.get(i).getFileType() == 2) {
+ AddFileBean fileBean = mFiles.get(i);
+ String url = BaseUrlApi.BASE_IMG_URL + fileBean.getId();
+ imgUrls.add(url);
+ }
+ }
+ ARouter.getInstance()
+ .build(PathConfig.PATH_MODULE_BASELIB_SHOW_IMG)
+ .withStringArrayList(TAG_IMGURL, imgUrls)
+ .navigation();
+ } else if (3 == addFileBean.getFileType() || 4 == addFileBean.getFileType()) {
+ ARouter.getInstance()
+ .build(PathConfig.PATH_MODULE_PLAYER_SIMPLE_VIDEO)
+ .withString("title", addFileBean.getFileName().substring(0, addFileBean.getFileName().lastIndexOf(".")))
+ .withString("url", BaseUrlApi.BASE_IMG_URL + addFileBean.getId())
+ .withString("type", addFileBean.getFileType() == 4 ? "audio" : "video")
+ .navigation();
+ }
}
@Override
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordEduFragment.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordEduFragment.java
index 04dd47a..ac48770 100644
--- a/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordEduFragment.java
+++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordEduFragment.java
@@ -1,11 +1,42 @@
package com.tenlionsoft.oamodule.fragments;
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.os.Bundle;
+import android.text.TextUtils;
import android.view.View;
+import android.widget.Button;
import com.alibaba.android.arouter.facade.annotation.Route;
+import com.google.gson.Gson;
+import com.hjq.toast.ToastUtils;
import com.tenlionsoft.baselib.constant.PathConfig;
+import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
+import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
+import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
+import com.tenlionsoft.baselib.core.widget.views.CustomStateView;
+import com.tenlionsoft.baselib.utils.ExceptionHandler;
+import com.tenlionsoft.baselib.utils.UIUtil;
import com.tenlionsoft.oamodule.R;
+import com.tenlionsoft.oamodule.R2;
+import com.tenlionsoft.oamodule.adapter.EducateAdapter;
+import com.tenlionsoft.oamodule.beans.SaveEducateBean;
+import com.tenlionsoft.oamodule.net.OAApi;
+import com.tenlionsoft.oamodule.widget.EducateDialog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import io.reactivex.rxjava3.annotations.NonNull;
+import io.reactivex.rxjava3.core.Observer;
+import io.reactivex.rxjava3.disposables.Disposable;
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
/**
* 作者: adam
@@ -15,6 +46,17 @@ import com.tenlionsoft.oamodule.R;
*/
@Route(path = PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_EDU)
public class UserRecordEduFragment extends BaseFragment {
+ @BindView(R2.id.rlv_edu)
+ RecyclerView mRlvEdu;
+ @BindView(R2.id.csv_state)
+ CustomStateView mCsvState;
+ @BindView(R2.id.btn_confirm)
+ Button mBtnConfirm;
+ private String mId;
+ private int mCurrentPage = 1;
+ private List mDatas = new ArrayList<>();
+ private EducateAdapter mAdapter;
+
@Override
protected int getContentViewId() {
return R.layout.fragment_user_record_edu_phone;
@@ -22,7 +64,198 @@ public class UserRecordEduFragment extends BaseFragment {
@Override
protected void setDataToView(View dataView) {
+ ButterKnife.bind(this, dataView);
setStateView(STATE_SUCCESS);
+ setReLoEnable(false, false);
+ Bundle bundle = getArguments();
+ if (bundle != null) {
+ mId = bundle.getString("id");
+ }
+ mRlvEdu.setLayoutManager(new LinearLayoutManager(mActivity));
+ mAdapter = new EducateAdapter(mActivity, mDatas, 2);
+ mAdapter.addOnDelOrEditListener(new EducateAdapter.OnDelOrEditListener() {
+ @Override
+ public void onDelBean(SaveEducateBean bean, int i) {
+ doDelEdu(bean, i);
+ }
+
+ @Override
+ public void onEditBean(SaveEducateBean bean, int i) {
+ doEditEdu(bean, i);
+ }
+ });
+ mRlvEdu.setAdapter(mAdapter);
+ if (!TextUtils.isEmpty(mId)) {
+ getEduList();
+ } else {
+ mCsvState.setState(CustomStateView.STATE_ERROR);
+ }
+ mBtnConfirm.setOnClickListener(v -> showAddEducateDialog(null, 1, 0));
+ }
+
+ /**
+ * 编辑
+ */
+ private void doEditEdu(SaveEducateBean bean, int i) {
+ showAddEducateDialog(bean, 2, i);
+ }
+
+ /**
+ * 删除
+ */
+ private void doDelEdu(SaveEducateBean bean, int i) {
+ new AlertDialog.Builder(mActivity)
+ .setTitle("警告")
+ .setMessage("确定要删除该条教育经历吗?")
+ .setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
+ .setPositiveButton("确定", (dialog, which) -> {
+ dialog.dismiss();
+ doDelEduNet(bean);
+ })
+ .create()
+ .show();
+ }
+
+ /**
+ * 删除教育经历
+ */
+ private void doDelEduNet(SaveEducateBean bean) {
+ ProgressDialog dialog = UIUtil.initDialog(mActivity, "删除中...");
+ dialog.show();
+ RetrofitManager.getInstance()
+ .create(OAApi.class)
+ .doDelEducate(bean.getUserEducationId())
+ .compose(RxTransformer.getTransformer())
+ .subscribe(new Observer() {
+ @Override
+ public void onSubscribe(@NonNull Disposable d) {
+
+ }
+
+ @Override
+ public void onNext(@NonNull BaseSuccessBean bean) {
+ if (dialog.isShowing()) dialog.dismiss();
+ getEduList();
+ }
+
+ @Override
+ public void onError(@NonNull Throwable e) {
+ if (dialog.isShowing()) dialog.dismiss();
+ ExceptionHandler.handleException(e);
+ }
+
+ @Override
+ public void onComplete() {
+
+ }
+ });
+ }
+
+ /**
+ * 显示添加 或 编辑
+ */
+ private void showAddEducateDialog(SaveEducateBean bean, int type, int pos) {
+ EducateDialog dialog = new EducateDialog.Builder(mActivity)
+ .setType(type)
+ .setBean(bean)
+ .build();
+ dialog.addOnChangeListener(new EducateDialog.OnChangeListener() {
+ @Override
+ public void doSave(SaveEducateBean bean) {
+ //新增教育经历
+ dialog.dismiss();
+ hideSoftInput();
+ doAddEdu(bean);
+ }
+
+ @Override
+ public void doEdit(SaveEducateBean bean) {
+ //编辑
+ dialog.dismiss();
+ hideSoftInput();
+ doEditEduNet(bean, pos);
+ }
+ });
+ dialog.show();
+ }
+
+ /**
+ * 保存编辑
+ *
+ * @param bean
+ * @param pos
+ */
+ private void doEditEduNet(SaveEducateBean bean, int pos) {
+ ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
+ dialog.show();
+ bean.setUserArchivesId(mId);
+ RequestBody body = RequestBody.create(new Gson().toJson(bean), MediaType.parse("application/json; charset=utf-8"));
+ RetrofitManager.getInstance()
+ .create(OAApi.class)
+ .doEditEducate(bean.getUserEducationId(), body)
+ .compose(RxTransformer.getTransformer())
+ .subscribe(new Observer() {
+ @Override
+ public void onSubscribe(@NonNull Disposable d) {
+
+ }
+
+ @Override
+ public void onNext(@NonNull BaseSuccessBean bean) {
+ if (dialog.isShowing()) dialog.dismiss();
+ ToastUtils.show("保存成功");
+ getEduList();
+ }
+
+ @Override
+ public void onError(@NonNull Throwable e) {
+ if (dialog.isShowing()) dialog.dismiss();
+ ExceptionHandler.handleException(e);
+ }
+
+ @Override
+ public void onComplete() {
+
+ }
+ });
+ }
+
+ /**
+ * 添加
+ */
+ private void doAddEdu(SaveEducateBean bean) {
+ ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
+ dialog.show();
+ bean.setUserArchivesId(mId);
+ RequestBody body = RequestBody.create(new Gson().toJson(bean), MediaType.parse("application/json; charset=utf-8"));
+ RetrofitManager.getInstance()
+ .create(OAApi.class)
+ .doSaveEducate(body)
+ .compose(RxTransformer.getTransformer())
+ .subscribe(new Observer() {
+ @Override
+ public void onSubscribe(@NonNull Disposable d) {
+
+ }
+
+ @Override
+ public void onNext(@NonNull BaseSuccessBean bean) {
+ if (dialog.isShowing()) dialog.dismiss();
+ ToastUtils.show("保存成功");
+ getEduList();
+ }
+
+ @Override
+ public void onError(@NonNull Throwable e) {
+ if (dialog.isShowing()) dialog.dismiss();
+ ExceptionHandler.handleException(e);
+ }
+
+ @Override
+ public void onComplete() {
+
+ }
+ });
}
@Override
@@ -30,8 +263,47 @@ public class UserRecordEduFragment extends BaseFragment {
}
+ /**
+ * 获取教育经历列表
+ */
+ private void getEduList() {
+ mDatas.clear();
+ mAdapter.setData(mDatas);
+ RetrofitManager.getInstance()
+ .create(OAApi.class)
+ .getUserEducateList(mId)
+ .compose(RxTransformer.getTransformer())
+ .subscribe(new Observer>() {
+ @Override
+ public void onSubscribe(@NonNull Disposable d) {
+
+ }
+
+ @Override
+ public void onNext(@NonNull List educateDetailBeans) {
+ if (educateDetailBeans.size() > 0) {
+ mCsvState.setState(CustomStateView.STATE_SUCCESS);
+ mDatas = educateDetailBeans;
+ mAdapter.setData(mDatas);
+ } else {
+ mCsvState.setState(CustomStateView.STATE_EMPTY);
+ }
+ }
+
+ @Override
+ public void onError(@NonNull Throwable e) {
+ ExceptionHandler.handleException(e);
+ mCsvState.setState(CustomStateView.STATE_ERROR);
+ }
+
+ @Override
+ public void onComplete() {
+
+ }
+ });
+ }
+
@Override
protected void loadMoreData() {
-
}
}
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordResumeFragment.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordResumeFragment.java
new file mode 100644
index 0000000..58c2633
--- /dev/null
+++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordResumeFragment.java
@@ -0,0 +1,303 @@
+package com.tenlionsoft.oamodule.fragments;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.os.Bundle;
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.Button;
+import android.widget.RelativeLayout;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.google.gson.Gson;
+import com.hjq.toast.ToastUtils;
+import com.tenlionsoft.baselib.constant.PathConfig;
+import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
+import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
+import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
+import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
+import com.tenlionsoft.baselib.core.widget.views.CustomStateView;
+import com.tenlionsoft.baselib.utils.ExceptionHandler;
+import com.tenlionsoft.baselib.utils.UIUtil;
+import com.tenlionsoft.oamodule.R;
+import com.tenlionsoft.oamodule.R2;
+import com.tenlionsoft.oamodule.adapter.ResumeAdapter;
+import com.tenlionsoft.oamodule.beans.SaveResumeBean;
+import com.tenlionsoft.oamodule.net.OAApi;
+import com.tenlionsoft.oamodule.widget.ResumeDialog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import io.reactivex.rxjava3.annotations.NonNull;
+import io.reactivex.rxjava3.core.Observer;
+import io.reactivex.rxjava3.disposables.Disposable;
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
+
+/**
+ * 作者: adam
+ * 日期: 2022/7/1 - 17:17
+ * 邮箱: itgaojian@163.com
+ * 描述: 个人档案---工作简历
+ */
+@Route(path = PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_WORK)
+public class UserRecordResumeFragment extends BaseFragment {
+
+ @BindView(R2.id.rlv_resume)
+ RecyclerView mRlvResume;
+ @BindView(R2.id.csv_state)
+ CustomStateView mCsvState;
+ @BindView(R2.id.rl_content)
+ RelativeLayout mRlContent;
+ @BindView(R2.id.btn_confirm)
+ Button mBtnConfirm;
+ private String mId;
+ private List mDatas = new ArrayList<>();
+ private ResumeAdapter mAdapter;
+
+ @Override
+ protected int getContentViewId() {
+ return R.layout.fragment_user_record_resume_phone;
+ }
+
+ @Override
+ protected void setDataToView(View dataView) {
+ ButterKnife.bind(this, dataView);
+ setStateView(STATE_SUCCESS);
+ setReLoEnable(false, false);
+ Bundle bundle = getArguments();
+ if (bundle != null) {
+ mId = bundle.getString("id");
+ }
+ mAdapter = new ResumeAdapter(mActivity, mDatas, 2);
+ mRlvResume.setLayoutManager(new LinearLayoutManager(mActivity));
+ mRlvResume.setAdapter(mAdapter);
+ mAdapter.addOnDelOrEditListener(new ResumeAdapter.OnDelOrEditListener() {
+ @Override
+ public void onDel(SaveResumeBean bean, int i) {
+ new AlertDialog.Builder(mActivity)
+ .setTitle("警告")
+ .setMessage("确定要删除该条记录吗?")
+ .setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
+ .setPositiveButton("确定", (dialog, which) -> {
+ dialog.dismiss();
+ doDelNet(bean);
+ })
+ .create()
+ .show();
+ }
+
+ @Override
+ public void onEdit(SaveResumeBean bean, int i) {
+ showAddResumeDialog(bean, 2, i);
+ }
+ });
+ if (!TextUtils.isEmpty(mId)) {
+ getUserResume();
+ } else {
+ mCsvState.setState(CustomStateView.STATE_ERROR);
+ }
+ mBtnConfirm.setOnClickListener(v -> showAddResumeDialog(null, 1, 0));
+ }
+
+ /**
+ * 新增或删除
+ *
+ * @param bean
+ * @param type
+ * @param pos
+ */
+ private void showAddResumeDialog(SaveResumeBean bean, int type, int pos) {
+ ResumeDialog dialog = new ResumeDialog.Builder(mActivity)
+ .setType(type)
+ .setBean(bean)
+ .build();
+ dialog.addOnChangeListener(new ResumeDialog.OnChangeListener() {
+ @Override
+ public void doSave(SaveResumeBean bean) {
+ //新增教育经历
+ dialog.dismiss();
+ hideSoftInput();
+ doSaveNet(bean);
+ }
+
+ @Override
+ public void doEdit(SaveResumeBean bean) {
+ dialog.dismiss();
+ hideSoftInput();
+ doEditNet(bean);
+ }
+ });
+ dialog.show();
+ }
+
+ /**
+ * 编辑保存
+ *
+ * @param bean
+ */
+ private void doEditNet(SaveResumeBean bean) {
+ ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
+ dialog.show();
+ bean.setUserArchivesId(mId);
+ RequestBody body = RequestBody.create(new Gson().toJson(bean), MediaType.parse("application/json; charset=utf-8"));
+ RetrofitManager.getInstance()
+ .create(OAApi.class)
+ .doEditWork(bean.getUserWorkId(), body)
+ .compose(RxTransformer.getTransformer())
+ .subscribe(new Observer() {
+ @Override
+ public void onSubscribe(@NonNull Disposable d) {
+
+ }
+
+ @Override
+ public void onNext(@NonNull BaseSuccessBean bean) {
+ if (dialog.isShowing()) dialog.dismiss();
+ ToastUtils.show("保存成功");
+ getUserResume();
+ }
+
+ @Override
+ public void onError(@NonNull Throwable e) {
+ if (dialog.isShowing()) dialog.dismiss();
+ ExceptionHandler.handleException(e);
+ }
+
+ @Override
+ public void onComplete() {
+
+ }
+ });
+ }
+
+ /**
+ * 新增
+ *
+ * @param bean
+ */
+ private void doSaveNet(SaveResumeBean bean) {
+ ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
+ dialog.show();
+ bean.setUserArchivesId(mId);
+ RequestBody body = RequestBody.create(new Gson().toJson(bean), MediaType.parse("application/json; charset=utf-8"));
+ RetrofitManager.getInstance()
+ .create(OAApi.class)
+ .doSaveWork(body)
+ .compose(RxTransformer.getTransformer())
+ .subscribe(new Observer() {
+ @Override
+ public void onSubscribe(@NonNull Disposable d) {
+
+ }
+
+ @Override
+ public void onNext(@NonNull BaseSuccessBean bean) {
+ if (dialog.isShowing()) dialog.dismiss();
+ ToastUtils.show("保存成功");
+ getUserResume();
+ }
+
+ @Override
+ public void onError(@NonNull Throwable e) {
+ if (dialog.isShowing()) dialog.dismiss();
+ ExceptionHandler.handleException(e);
+ }
+
+ @Override
+ public void onComplete() {
+
+ }
+ });
+ }
+
+ /**
+ * 删除
+ */
+ private void doDelNet(SaveResumeBean bean) {
+ ProgressDialog dialog = UIUtil.initDialog(mActivity, "删除中...");
+ dialog.show();
+ RetrofitManager.getInstance()
+ .create(OAApi.class)
+ .doDelWork(bean.getUserWorkId())
+ .compose(RxTransformer.getTransformer())
+ .subscribe(new Observer() {
+ @Override
+ public void onSubscribe(@NonNull Disposable d) {
+
+ }
+
+ @Override
+ public void onNext(@NonNull BaseSuccessBean bean) {
+ if (dialog.isShowing()) dialog.dismiss();
+ getUserResume();
+ }
+
+ @Override
+ public void onError(@NonNull Throwable e) {
+ if (dialog.isShowing()) dialog.dismiss();
+ ExceptionHandler.handleException(e);
+ }
+
+ @Override
+ public void onComplete() {
+
+ }
+ });
+ }
+
+ /**
+ * 获取用户工作简历
+ */
+ private void getUserResume() {
+ mDatas.clear();
+ mAdapter.setData(mDatas);
+ RetrofitManager.getInstance()
+ .create(OAApi.class)
+ .getUserWorkList(mId)
+ .compose(RxTransformer.getTransformer())
+ .subscribe(new Observer>() {
+ @Override
+ public void onSubscribe(@NonNull Disposable d) {
+
+ }
+
+ @Override
+ public void onNext(@NonNull List saveResumeBeans) {
+ if (saveResumeBeans.size() > 0) {
+ mCsvState.setState(CustomStateView.STATE_SUCCESS);
+ mDatas = saveResumeBeans;
+ mAdapter.setData(mDatas);
+ } else {
+ mCsvState.setState(CustomStateView.STATE_EMPTY);
+ }
+ }
+
+ @Override
+ public void onError(@NonNull Throwable e) {
+ ExceptionHandler.handleException(e);
+ mCsvState.setState(CustomStateView.STATE_ERROR);
+ }
+
+ @Override
+ public void onComplete() {
+
+ }
+ });
+ }
+
+ @Override
+ protected void refreshView() {
+
+ }
+
+ @Override
+ protected void loadMoreData() {
+
+ }
+}
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordWorkFragment.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordWorkFragment.java
deleted file mode 100644
index 03deec1..0000000
--- a/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/UserRecordWorkFragment.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.tenlionsoft.oamodule.fragments;
-
-import android.view.View;
-
-import com.alibaba.android.arouter.facade.annotation.Route;
-import com.tenlionsoft.baselib.constant.PathConfig;
-import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
-import com.tenlionsoft.oamodule.R;
-
-/**
- * 作者: adam
- * 日期: 2022/7/1 - 17:17
- * 邮箱: itgaojian@163.com
- * 描述: 个人档案---工作简历
- */
-@Route(path = PathConfig.PATH_MODULE_OA_FRAGMENT_USER_RECORD_WORK)
-public class UserRecordWorkFragment extends BaseFragment {
- @Override
- protected int getContentViewId() {
- return R.layout.fragment_user_record_work_phone;
- }
-
- @Override
- protected void setDataToView(View dataView) {
- setStateView(STATE_SUCCESS);
- }
-
- @Override
- protected void refreshView() {
-
- }
-
- @Override
- protected void loadMoreData() {
-
- }
-}
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/EducateHolder.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/EducateHolder.java
index 5c8d1e4..672503d 100644
--- a/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/EducateHolder.java
+++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/EducateHolder.java
@@ -33,6 +33,8 @@ public class EducateHolder extends BaseViewHolder {
public Button mBtnDel;
@BindView(R2.id.btn_edit)
public Button mBtnEdit;
+ @BindView(R2.id.line)
+ public View mLine;
public EducateHolder(@NonNull @NotNull View itemView) {
super(itemView);
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/HonourHolder.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/HonourHolder.java
new file mode 100644
index 0000000..a6e8342
--- /dev/null
+++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/HonourHolder.java
@@ -0,0 +1,21 @@
+package com.tenlionsoft.oamodule.holder;
+
+import android.view.View;
+
+import org.jetbrains.annotations.NotNull;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+/**
+ * 作者: adam
+ * 日期: 2022/7/4 - 16:13
+ * 邮箱: itgaojian@163.com
+ * 描述:
+ */
+public class HonourHolder extends RecyclerView.ViewHolder {
+
+ public HonourHolder(@NonNull @NotNull View itemView) {
+ super(itemView);
+ }
+}
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/ResumeHolder.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/ResumeHolder.java
index e2fba2d..95dd906 100644
--- a/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/ResumeHolder.java
+++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/ResumeHolder.java
@@ -35,6 +35,8 @@ public class ResumeHolder extends BaseViewHolder {
public Button mBtnDel;
@BindView(R2.id.btn_edit)
public Button mBtnEdit;
+ @BindView(R2.id.line)
+ public View mLine;
public ResumeHolder(@NonNull @NotNull View itemView) {
super(itemView);
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/net/OAApi.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/net/OAApi.java
index 787440d..e80415c 100644
--- a/oamodule/src/main/java/com/tenlionsoft/oamodule/net/OAApi.java
+++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/net/OAApi.java
@@ -16,7 +16,6 @@ import com.tenlionsoft.oamodule.beans.DocumentDetailBean;
import com.tenlionsoft.oamodule.beans.DocumentListBean;
import com.tenlionsoft.oamodule.beans.DocumentTypeList;
import com.tenlionsoft.oamodule.beans.DriverBean;
-import com.tenlionsoft.oamodule.beans.EducateDetailBean;
import com.tenlionsoft.oamodule.beans.EmailDraftDetailBean;
import com.tenlionsoft.oamodule.beans.EmailDraftListBean;
import com.tenlionsoft.oamodule.beans.EmailInboxDetailBean;
@@ -43,6 +42,9 @@ import com.tenlionsoft.oamodule.beans.OaFlowLogBean;
import com.tenlionsoft.oamodule.beans.RoutineAcceptListBean;
import com.tenlionsoft.oamodule.beans.RoutineBean;
import com.tenlionsoft.oamodule.beans.RoutineListBean;
+import com.tenlionsoft.oamodule.beans.SaveEducateBean;
+import com.tenlionsoft.oamodule.beans.SaveHonourBean;
+import com.tenlionsoft.oamodule.beans.SaveResumeBean;
import com.tenlionsoft.oamodule.beans.ScheduleDetailBean;
import com.tenlionsoft.oamodule.beans.ScheduleListBean;
import com.tenlionsoft.oamodule.beans.ScheduleTypeBean;
@@ -750,6 +752,13 @@ public interface OAApi {
Observable doSaveScheduleType(@Body RequestBody body);
/*==========人员档案========*/
+ /**
+ * 获取个人档案ID
+ */
+ @Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
+ @GET("app/userarchives/pageTurnTo")
+ Observable getUserRecordId();
+
/**
* 根据UserID获取个人档案详情
*/
@@ -793,22 +802,22 @@ public interface OAApi {
* 修改工作简历
*/
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
- @PUT("app/usereducation/updateusereducation/{userEducationId}")
- Observable doEditWork(@Path("userEducationId") String id, @Body RequestBody body);
+ @PUT("app/userwork/updateuserwork/{userWorkId}")
+ Observable doEditWork(@Path("userWorkId") String id, @Body RequestBody body);
/**
* 删除工作简历
*/
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
- @DELETE("app/usereducation/remove/{ids}")
+ @DELETE("app/userwork/remove/{ids}")
Observable doDelWork(@Path("ids") String id);
/**
* 获取工作简历列表
*/
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
- @GET("app/usereducation/list")
- Observable> getUserWorkList();
+ @GET("app/userwork/list")
+ Observable> getUserWorkList(@Query("userArchivesId") String id);
@@ -840,7 +849,7 @@ public interface OAApi {
*/
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
@GET("app/usereducation/list")
- Observable> getUserEducateList();
+ Observable> getUserEducateList(@Query("userArchivesId") String id);
/**
* 获取人力档案类型
@@ -849,6 +858,37 @@ public interface OAApi {
@GET("app/userarchivestype/list")
Observable> getUserRecordTypeList();
+ /*个人荣誉*/
+
+ /**
+ * 新增个人荣誉
+ */
+ @Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
+ @POST("app/userhonor/save")
+ Observable doSaveUserHonour(@Body RequestBody body);
+
+ /**
+ * 修改个人荣誉
+ */
+ @Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
+ @PUT("app/userhonor/updateuserhonor/{userHonorId}")
+ Observable doEditUserHonour(@Path("userHonorId") String id, @Body RequestBody body);
+
+ /**
+ * 删除个人荣誉
+ */
+ @Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
+ @DELETE("app/userhonor/remove/{ids}")
+ Observable doDelHonour(@Path("ids") String id);
+
+ /**
+ * 获取个人荣誉列表
+ */
+ @Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
+ @GET("app/userhonor/list")
+ Observable> getUserHonourList(@Query("userArchivesId") String id);
+
+
/*==============新闻=========================*/
/**
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/widget/EducateDialog.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/widget/EducateDialog.java
index 3866321..470a7ce 100644
--- a/oamodule/src/main/java/com/tenlionsoft/oamodule/widget/EducateDialog.java
+++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/widget/EducateDialog.java
@@ -87,6 +87,7 @@ public class EducateDialog extends Dialog {
private void doConfirm() {
if (checkParams()) {
+ HideSoftKeyBoardDialog();
if (mChangeListener != null) {
String name = mEtName.getText().toString().trim();
String specialty = mEtSpecialty.getText().toString().trim();
@@ -102,6 +103,7 @@ public class EducateDialog extends Dialog {
if (mType == 1) {
mChangeListener.doSave(bean);
} else {
+ bean.setUserEducationId(mBean.getUserEducationId());
mChangeListener.doEdit(bean);
}
}
@@ -180,6 +182,15 @@ public class EducateDialog extends Dialog {
}
}
+ public void HideSoftKeyBoardDialog() {
+ try {
+ InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Activity.INPUT_METHOD_SERVICE);
+ imm.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
+ } catch (Exception ex) {
+
+ }
+ }
+
public static class Builder {
private Context mContext;
private int mType;
diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/widget/ResumeDialog.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/widget/ResumeDialog.java
index 4112c90..4eedc86 100644
--- a/oamodule/src/main/java/com/tenlionsoft/oamodule/widget/ResumeDialog.java
+++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/widget/ResumeDialog.java
@@ -90,6 +90,7 @@ public class ResumeDialog extends Dialog {
private void doConfirm() {
if (checkParams()) {
+ HideSoftKeyBoardDialog();
if (mChangeListener != null) {
String name = mEtName.getText().toString().trim();
String dept = mEtDept.getText().toString().trim();
@@ -107,6 +108,8 @@ public class ResumeDialog extends Dialog {
if (mType == 1) {
mChangeListener.doSave(bean);
} else {
+ bean.setUserArchivesId(mBean.getUserArchivesId());
+ bean.setUserWorkId(mBean.getUserWorkId());
mChangeListener.doEdit(bean);
}
}
@@ -181,12 +184,20 @@ public class ResumeDialog extends Dialog {
void doEdit(SaveResumeBean bean);
}
+ public void HideSoftKeyBoardDialog() {
+ try {
+ InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Activity.INPUT_METHOD_SERVICE);
+ imm.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
+ } catch (Exception ex) {
+
+ }
+ }
+
public void HideSoftKeyBoardDialog(Activity activity) {
try {
InputMethodManager imm = (InputMethodManager) activity.getSystemService(activity.INPUT_METHOD_SERVICE);
- imm.toggleSoftInput(InputMethodManager.HIDE_NOT_ALWAYS, 0);
+ imm.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
} catch (Exception ex) {
-
}
}
diff --git a/oamodule/src/main/res/layout/activity_user_record_edit.xml b/oamodule/src/main/res/layout/activity_user_record_edit.xml
index f2d6a03..18faf05 100644
--- a/oamodule/src/main/res/layout/activity_user_record_edit.xml
+++ b/oamodule/src/main/res/layout/activity_user_record_edit.xml
@@ -1,5 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ android:layout_height="wrap_content"
+ tools:itemCount="1"
+ tools:listitem="@layout/item_show_photo" />
+
+
+
+
+
+
+
@@ -139,7 +98,8 @@
android:layout_gravity="center_vertical"
android:text="姓名"
android:textColor="@color/black"
- android:textSize="14sp" />
+ android:textSize="14sp"
+ app:text_show_hint="true" />
+ android:textSize="14sp"
+ app:text_show_hint="true" />
+ android:textSize="14sp"
+ app:text_show_hint="true" />
+ android:textSize="14sp"
+ app:text_show_hint="true" />
+ android:textSize="14sp"
+ app:text_show_hint="true" />
+ android:textSize="14sp"
+ app:text_show_hint="true" />
+ android:textSize="14sp"
+ app:text_show_hint="true" />
+ android:textSize="14sp"
+ app:text_show_hint="true" />
+
@@ -637,18 +613,19 @@
android:textSize="14sp" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -786,7 +714,8 @@
android:layout_gravity="center_vertical"
android:text="职称"
android:textColor="@color/black"
- android:textSize="14sp" />
+ android:textSize="14sp"
+ app:text_show_hint="true" />
+ android:textSize="14sp"
+ app:text_show_hint="true" />
+ android:textSize="14sp"
+ app:text_show_hint="true" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
@@ -964,15 +838,21 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:padding="20dp"
- android:text="未录入工作简历" />
+ android:text="未录入简历" />
-
+
+
\ No newline at end of file
diff --git a/oamodule/src/main/res/layout/fragment_user_record_base_phone.xml b/oamodule/src/main/res/layout/fragment_user_record_base_phone.xml
index ce33bd2..399fd8a 100644
--- a/oamodule/src/main/res/layout/fragment_user_record_base_phone.xml
+++ b/oamodule/src/main/res/layout/fragment_user_record_base_phone.xml
@@ -1,11 +1,785 @@
+ android:layout_height="wrap_content"
+ android:background="@color/gray_f7"
+ android:orientation="vertical">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/oamodule/src/main/res/layout/fragment_user_record_edu_phone.xml b/oamodule/src/main/res/layout/fragment_user_record_edu_phone.xml
index c060c9a..3375bed 100644
--- a/oamodule/src/main/res/layout/fragment_user_record_edu_phone.xml
+++ b/oamodule/src/main/res/layout/fragment_user_record_edu_phone.xml
@@ -1,11 +1,39 @@
+ android:layout_height="match_parent"
+ android:background="@color/gray_f7"
+ android:orientation="vertical">
-
+
+
+
+
+
+
+
-
+ android:layout_below="@id/rl_content"
+ android:layout_alignParentBottom="true"
+ android:layout_margin="10dp"
+ android:background="@drawable/sel_btn_submit"
+ android:text="新增"
+ android:textColor="@color/col_white_gray_press" />
\ No newline at end of file
diff --git a/oamodule/src/main/res/layout/fragment_user_record_resume_phone.xml b/oamodule/src/main/res/layout/fragment_user_record_resume_phone.xml
new file mode 100644
index 0000000..cd415fc
--- /dev/null
+++ b/oamodule/src/main/res/layout/fragment_user_record_resume_phone.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/oamodule/src/main/res/layout/fragment_user_record_work_phone.xml b/oamodule/src/main/res/layout/fragment_user_record_work_phone.xml
deleted file mode 100644
index cb2c51f..0000000
--- a/oamodule/src/main/res/layout/fragment_user_record_work_phone.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/oamodule/src/main/res/layout/item_educate.xml b/oamodule/src/main/res/layout/item_educate.xml
index a0ae215..a23a6e4 100644
--- a/oamodule/src/main/res/layout/item_educate.xml
+++ b/oamodule/src/main/res/layout/item_educate.xml
@@ -1,149 +1,169 @@
+ android:orientation="vertical">
+ android:layout_margin="3dp"
+ android:orientation="horizontal"
+ android:padding="5dp">
-
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+
+ android:textStyle="bold"
+ app:text_type_cus="2" />
+
+
+
+
-
+ android:layout_weight="1"
+ android:orientation="horizontal">
-
+
+
+
+
+
+ android:layout_weight="1"
+ android:orientation="horizontal">
+
+
+
+
+
+
+
+ android:orientation="vertical">
-
-
-
+ android:minWidth="0dp"
+ android:minHeight="0dp"
+ android:paddingLeft="10dp"
+ android:paddingRight="10dp"
+ android:text="删除"
+ android:textColor="@color/col_white_gray_press" />
-
-
-
+ android:minWidth="0dp"
+ android:minHeight="0dp"
+ android:paddingLeft="10dp"
+ android:paddingRight="10dp"
+ android:text="编辑"
+ android:textColor="@color/col_white_gray_press" />
+
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/oamodule/src/main/res/layout/item_resume.xml b/oamodule/src/main/res/layout/item_resume.xml
index c9252ba..1e898b5 100644
--- a/oamodule/src/main/res/layout/item_resume.xml
+++ b/oamodule/src/main/res/layout/item_resume.xml
@@ -1,172 +1,189 @@
+
+ android:orientation="vertical">
+ android:layout_margin="3dp"
+ android:orientation="horizontal"
+ android:padding="5dp">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:layout_weight="1"
+ android:orientation="vertical">
-
-
+ android:textSize="@dimen/text_15"
+ android:textStyle="bold"
+ tools:text="单位名称" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:orientation="vertical">
-
-
-
+ android:minWidth="0dp"
+ android:minHeight="0dp"
+ android:paddingLeft="10dp"
+ android:paddingTop="3dp"
+ android:paddingRight="10dp"
+ android:paddingBottom="3dp"
+ android:text="删除"
+ android:textColor="@color/col_white_gray_press" />
-
-
-
+ android:minWidth="0dp"
+ android:minHeight="0dp"
+ android:paddingLeft="10dp"
+ android:paddingTop="3dp"
+ android:paddingRight="10dp"
+ android:paddingBottom="3dp"
+ android:text="编辑"
+ android:textColor="@color/col_white_gray_press" />
+
+
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/oamodule/src/main/res/layout/item_user_honour.xml b/oamodule/src/main/res/layout/item_user_honour.xml
new file mode 100644
index 0000000..d17803c
--- /dev/null
+++ b/oamodule/src/main/res/layout/item_user_honour.xml
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file