call, Throwable t);
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/rehome/meetingbook/base/BaseFragment.java b/app/src/main/java/com/rehome/meetingbook/base/BaseFragment.java
new file mode 100644
index 0000000..f2b04bc
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/base/BaseFragment.java
@@ -0,0 +1,54 @@
+package com.rehome.meetingbook.base;
+
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Toast;
+
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+/**
+ * Created by Rehome-rjb1 on 2017/5/8.
+ * fragment的基类,所有的fragment都继承它
+ */
+
+public abstract class BaseFragment extends Fragment {
+
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+
+ View view = inflater.inflate(getLayoutId(), container, false);
+ initData();
+ return view;
+ }
+
+ public abstract int getLayoutId();
+
+ public abstract void initData();
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ }
+
+ public void showToast(String msg) {
+ Toast.makeText(getContext(), msg, Toast.LENGTH_SHORT).show();
+ }
+
+ public void showToast(int strId) {
+ Toast.makeText(getContext(), strId, Toast.LENGTH_SHORT).show();
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ }
+
+ @Override
+ public void onDetach() {
+ super.onDetach();
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/base/BaseFragment2.java b/app/src/main/java/com/rehome/meetingbook/base/BaseFragment2.java
new file mode 100644
index 0000000..4ef945c
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/base/BaseFragment2.java
@@ -0,0 +1,76 @@
+package com.rehome.meetingbook.base;
+
+import android.app.Activity;
+import android.content.Context;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Toast;
+
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+
+/**
+ * Created by ruihong on 2017/10/28.
+ */
+
+public abstract class BaseFragment2 extends Fragment {
+
+ public static final int CX_FLAG = 0;//查询的状态码
+ public static final int SC_FLAG = 1;//上传的状态码
+
+ public abstract int getContentViewId();
+
+ public Activity mActivity;
+ public View view;
+
+ public Context context;
+
+
+ @Override
+ public void onAttach(Context context) {
+ super.onAttach(context);
+ this.context = context;
+ mActivity = getActivity();
+ }
+
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ view = inflater.inflate(getContentViewId(), container, false);
+ //Logger.v("fragment:" + getClass().getSimpleName());
+ initView();
+ return view;
+ }
+
+ @Override
+ public void onActivityCreated(@Nullable Bundle savedInstanceState) {
+ super.onActivityCreated(savedInstanceState);
+ initData();
+ }
+
+ /**
+ * 初始化视图
+ */
+ protected abstract void initView();
+
+ /**
+ * 初始化数据
+ */
+ public void initData() {
+
+ }
+
+ public void showToast(String text) {
+ if (text != null && !text.trim().equals("")) {
+ Toast.makeText(getActivity(), text, Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/base/BaseLazyFragment.java b/app/src/main/java/com/rehome/meetingbook/base/BaseLazyFragment.java
new file mode 100644
index 0000000..c52513f
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/base/BaseLazyFragment.java
@@ -0,0 +1,198 @@
+package com.rehome.meetingbook.base;
+
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+
+/**
+ * Created by ruihong on 2018/4/20.
+ */
+
+public abstract class BaseLazyFragment extends Fragment {
+
+ private boolean isPrepared;
+
+ protected View mRootView;
+
+
+
+ @Override
+ public void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ }
+
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ mRootView = inflater.inflate(getContentViewId(), container, false);
+ //绑定到butterKnife
+ return mRootView;
+ }
+
+ @Override
+ public void onActivityCreated(@Nullable Bundle savedInstanceState) {
+ super.onActivityCreated(savedInstanceState);
+ //如果要使用eventBus请将此方法返回true
+
+ initPrepare();
+ }
+
+ @Override
+ public void onViewStateRestored(@Nullable Bundle savedInstanceState) {
+ super.onViewStateRestored(savedInstanceState);
+
+ }
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ this.mRootView = null;
+ }
+
+
+ /**
+ * 初始化视图
+ *
+ * @return the int
+ */
+ protected abstract int getContentViewId();
+
+ /**
+ * 初始化控件
+ */
+ protected abstract void initView();
+
+
+ /**
+ * 初始话数据
+ */
+ protected abstract void initData();
+
+ /**
+ * 初始化监听
+ */
+ protected abstract void initListener();
+
+
+ /**
+ * 此方法是让外部调用使fragment做一些操作的,比如说外部的activity想让fragment对象执行一些方法,
+ * 建议在有多个需要让外界调用的方法时,统一传bundle,里面存一个what字段,来区分不同的方法,在setData
+ * 方法中就可以switch做不同的操作,这样就可以用统一的入口方法做不同的事,和message同理
+ *
+ * 使用此方法时请注意调用时fragment的生命周期,如果调用此setData方法时onActivityCreated
+ * 还没执行,setData里调用presenter的方法时,是会报空的,因为dagger注入是在onActivityCreated
+ * 方法中执行的,如果要做一些初始化操作,可以不必让外部调setData,在内部onActivityCreated中
+ * 初始化就可以了
+ *
+ * @param data
+ */
+ public void setData(Object data) {
+
+ }
+
+ /**
+ * 使用此方法时请注意调用时fragment的生命周期,如果调用此setData方法时onActivityCreated
+ * 还没执行,setData里调用presenter的方法时,是会报空的,因为dagger注入是在onActivityCreated
+ * 方法中执行的,如果要做一些初始化操作,可以不必让外部调setData,在内部onActivityCreated中
+ * 初始化就可以了
+ */
+ public void setData() {
+
+ }
+
+ /**
+ * 第一次onResume中的调用onUserVisible避免操作与onFirstUserVisible操作重复
+ */
+ private boolean isFirstResume = true;
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ if (isFirstResume) {
+ isFirstResume = false;
+ return;
+ }
+ if (getUserVisibleHint()) {
+ onUserVisible();
+ }
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+ if (getUserVisibleHint()) {
+ onUserInvisible();
+ }
+ }
+
+ private boolean isFirstVisible = true;
+ private boolean isFirstInvisible = true;
+
+ @Override
+ public void setUserVisibleHint(boolean isVisibleToUser) {
+ super.setUserVisibleHint(isVisibleToUser);
+ if (isVisibleToUser) {
+ if (isFirstVisible) {
+ isFirstVisible = false;
+ initPrepare();
+ } else {
+ onUserVisible();
+ }
+ } else {
+ if (isFirstInvisible) {
+ isFirstInvisible = false;
+ onFirstUserInvisible();
+ } else {
+ onUserInvisible();
+ }
+ }
+ }
+
+ public synchronized void initPrepare() {
+ if (isPrepared) {
+ onFirstUserVisible();
+ } else {
+ isPrepared = true;
+ }
+ }
+
+ /**
+ * 第一次fragment可见(进行初始化工作)
+ */
+ public void onFirstUserVisible() {
+ initView();
+ initData();
+ initListener();
+ }
+
+ /**
+ * fragment可见(切换回来或者onResume)
+ */
+ public void onUserVisible() {
+
+ }
+
+ /**
+ * 第一次fragment不可见(不建议在此处理事件)
+ */
+ public void onFirstUserInvisible() {
+
+ }
+
+ /**
+ * fragment不可见(切换掉或者onPause)
+ */
+ public void onUserInvisible() {
+
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/AppointmentDateDetailListBean.java b/app/src/main/java/com/rehome/meetingbook/bean/AppointmentDateDetailListBean.java
new file mode 100644
index 0000000..00f2a40
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/AppointmentDateDetailListBean.java
@@ -0,0 +1,94 @@
+package com.rehome.meetingbook.bean;
+
+import java.util.List;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-20 17:16
+ * 描述:
+ */
+
+public class AppointmentDateDetailListBean {
+ private String Total;
+ private List Rows;
+
+ public String getTotal() {
+ return Total;
+ }
+
+ public void setTotal(String Total) {
+ this.Total = Total;
+ }
+
+ public List getRows() {
+ return Rows;
+ }
+
+ public void setRows(List Rows) {
+ this.Rows = Rows;
+ }
+
+ public static class RowsBean {
+
+ //培训考试模式(20001:日常培训考试,20002:集中培训考试)
+ private String psmodel;
+ //预约日期(格式:HH:mm)
+ private String yyrq;
+ //培训考试起始时间(格式:HH:mm)
+ private String pskssj_s;
+ //培训考试结束时间(格式:HH:mm)
+ private String pskssj_e;
+ //预约总人数
+ private String rs;
+ //还可预约人数
+ private String kyyrs;
+
+ public String getPsmodel() {
+ return psmodel;
+ }
+
+ public void setPsmodel(String psmodel) {
+ this.psmodel = psmodel;
+ }
+
+ public String getYyrq() {
+ return yyrq;
+ }
+
+ public void setYyrq(String yyrq) {
+ this.yyrq = yyrq;
+ }
+
+ public String getPskssj_s() {
+ return pskssj_s;
+ }
+
+ public void setPskssj_s(String pskssj_s) {
+ this.pskssj_s = pskssj_s;
+ }
+
+ public String getPskssj_e() {
+ return pskssj_e;
+ }
+
+ public void setPskssj_e(String pskssj_e) {
+ this.pskssj_e = pskssj_e;
+ }
+
+ public String getRs() {
+ return rs;
+ }
+
+ public void setRs(String rs) {
+ this.rs = rs;
+ }
+
+ public String getKyyrs() {
+ return kyyrs;
+ }
+
+ public void setKyyrs(String kyyrs) {
+ this.kyyrs = kyyrs;
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/AppointmentDateListBean.java b/app/src/main/java/com/rehome/meetingbook/bean/AppointmentDateListBean.java
new file mode 100644
index 0000000..dda9132
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/AppointmentDateListBean.java
@@ -0,0 +1,64 @@
+package com.rehome.meetingbook.bean;
+
+import java.util.List;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-20 16:48
+ * 描述:
+ */
+
+public class AppointmentDateListBean {
+ private String Total;
+ private List Rows;
+
+ public String getTotal() {
+ return Total;
+ }
+
+ public void setTotal(String Total) {
+ this.Total = Total;
+ }
+
+ public List getRows() {
+ return Rows;
+ }
+
+ public void setRows(List Rows) {
+ this.Rows = Rows;
+ }
+
+ public static class RowsBean {
+
+ //预约日期(格式:yyyy-MM-dd)
+ private String yyrq;
+ //预约日期(格式:yyyy-M-d)
+ private String yyrq2;
+ //预约总人数
+ private String rs;
+
+ public String getYyrq() {
+ return yyrq;
+ }
+
+ public void setYyrq(String yyrq) {
+ this.yyrq = yyrq;
+ }
+
+ public String getYyrq2() {
+ return yyrq2;
+ }
+
+ public void setYyrq2(String yyrq2) {
+ this.yyrq2 = yyrq2;
+ }
+
+ public String getRs() {
+ return rs;
+ }
+
+ public void setRs(String rs) {
+ this.rs = rs;
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/AppointmentLevelBean.java b/app/src/main/java/com/rehome/meetingbook/bean/AppointmentLevelBean.java
new file mode 100644
index 0000000..bdbfa95
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/AppointmentLevelBean.java
@@ -0,0 +1,51 @@
+package com.rehome.meetingbook.bean;
+
+import java.util.List;
+
+/**
+ * 预约等级
+ */
+public class AppointmentLevelBean {
+ private String Total;
+ private List Rows;
+
+ public String getTotal() {
+ return Total;
+ }
+
+ public void setTotal(String Total) {
+ this.Total = Total;
+ }
+
+ public List getRows() {
+ return Rows;
+ }
+
+ public void setRows(List Rows) {
+ this.Rows = Rows;
+ }
+
+ public static class RowsBean {
+
+ //id
+ private String id;
+ //预约等级
+ private String text;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/AppointmentMemberBean.java b/app/src/main/java/com/rehome/meetingbook/bean/AppointmentMemberBean.java
new file mode 100644
index 0000000..5310abc
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/AppointmentMemberBean.java
@@ -0,0 +1,154 @@
+package com.rehome.meetingbook.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-10 14:27
+ * 描述:
+ */
+public class AppointmentMemberBean {
+ private String mainid;
+ private List Rows = new ArrayList<>();
+
+ public String getMainid() {
+ return mainid;
+ }
+
+ public void setMainid(String mainid) {
+ this.mainid = mainid;
+ }
+
+ public List getRows() {
+ return Rows;
+ }
+
+ public void setRows(List Rows) {
+ this.Rows = Rows;
+ }
+
+ public static class RowsBean {
+
+ //预约时间(格式:yyyy-MM-dd HH:mm)
+ private String yyrq="";
+ //预约等级ID
+ private String pszb="";
+ //预约等级名称
+ private String pszbName="";
+ //预约部门ID
+ private String psbm="";
+ //预约部门名称
+ private String psbmName="";
+ //预约班组ID
+ private String psbz="";
+ //预约班组名称
+ private String psbzName="";
+ //姓名
+ private String xm="";
+ //身份证号
+ private String sfzh="";
+ //是否为工作票负责人培训(厂级:0否,1是,部门或班组级:空值)
+ private String iszzpfzr="";
+ //是否特种作业人员
+ private String istzzy="";
+ //备注(三种人授权类型或特种作业工种)
+ private String bz="";
+
+ public String getYyrq() {
+ return yyrq;
+ }
+
+ public void setYyrq(String yyrq) {
+ this.yyrq = yyrq;
+ }
+
+ public String getPszb() {
+ return pszb;
+ }
+
+ public void setPszb(String pszb) {
+ this.pszb = pszb;
+ }
+
+ public String getPsbm() {
+ return psbm;
+ }
+
+ public void setPsbm(String psbm) {
+ this.psbm = psbm;
+ }
+
+ public String getPsbz() {
+ return psbz;
+ }
+
+ public void setPsbz(String psbz) {
+ this.psbz = psbz;
+ }
+
+ public String getXm() {
+ return xm;
+ }
+
+ public void setXm(String xm) {
+ this.xm = xm;
+ }
+
+ public String getSfzh() {
+ return sfzh;
+ }
+
+ public void setSfzh(String sfzh) {
+ this.sfzh = sfzh;
+ }
+
+ public String getIszzpfzr() {
+ return iszzpfzr;
+ }
+
+ public void setIszzpfzr(String iszzpfzr) {
+ this.iszzpfzr = iszzpfzr;
+ }
+
+ public String getIstzzy() {
+ return istzzy;
+ }
+
+ public void setIstzzy(String istzzy) {
+ this.istzzy = istzzy;
+ }
+
+ public String getBz() {
+ return bz;
+ }
+
+ public void setBz(String bz) {
+ this.bz = bz;
+ }
+
+ public String getPszbName() {
+ return pszbName;
+ }
+
+ public void setPszbName(String pszbName) {
+ this.pszbName = pszbName;
+ }
+
+ public String getPsbmName() {
+ return psbmName;
+ }
+
+ public void setPsbmName(String psbmName) {
+ this.psbmName = psbmName;
+ }
+
+ public String getPsbzName() {
+ return psbzName;
+ }
+
+ public void setPsbzName(String psbzName) {
+ this.psbzName = psbzName;
+ }
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/AppointmentMemberCount.java b/app/src/main/java/com/rehome/meetingbook/bean/AppointmentMemberCount.java
new file mode 100644
index 0000000..952380d
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/AppointmentMemberCount.java
@@ -0,0 +1,52 @@
+package com.rehome.meetingbook.bean;
+
+/**
+ * 可预约人数
+ */
+public class AppointmentMemberCount {
+ private boolean isyy;
+ private int rs;
+ private String msg;
+ private String times;
+ private String timee;
+
+ public boolean isIsyy() {
+ return isyy;
+ }
+
+ public void setIsyy(boolean isyy) {
+ this.isyy = isyy;
+ }
+
+ public int getRs() {
+ return rs;
+ }
+
+ public void setRs(int rs) {
+ this.rs = rs;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+
+ public String getTimes() {
+ return times;
+ }
+
+ public void setTimes(String times) {
+ this.times = times;
+ }
+
+ public String getTimee() {
+ return timee;
+ }
+
+ public void setTimee(String timee) {
+ this.timee = timee;
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/AppointmentResultBean.java b/app/src/main/java/com/rehome/meetingbook/bean/AppointmentResultBean.java
new file mode 100644
index 0000000..96ef1a6
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/AppointmentResultBean.java
@@ -0,0 +1,240 @@
+package com.rehome.meetingbook.bean;
+
+import java.util.List;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-01 14:57
+ * 描述:
+ */
+public class AppointmentResultBean {
+ private String Total;
+ private List Rows;
+
+ public String getTotal() {
+ return Total;
+ }
+
+ public void setTotal(String Total) {
+ this.Total = Total;
+ }
+
+ public List getRows() {
+ return Rows;
+ }
+
+ public void setRows(List Rows) {
+ this.Rows = Rows;
+ }
+
+ public static class RowsBean {
+
+ private String yylx;
+ private String cbsname;
+ private String shstate;
+ private String xxfzrname;
+ private String psmodelname;
+ private String yyrq;
+ private String pszb;
+ private String psbm;
+ private String psbz;
+ private String xm;
+ private String sfzh;
+ private String iszzpfzr;
+ private String istzzy;
+ private String bz;
+ private String sszt;
+ private String ps_ssjd;
+ private String ks_istg;
+ private String ks_ksfs;
+ private String ks_ykscs;
+ private String issendrl;
+ private String isys;
+ private String shsj;
+ private String yyrxm;
+
+ public String getYylx() {
+ return yylx;
+ }
+
+ public void setYylx(String yylx) {
+ this.yylx = yylx;
+ }
+
+ public String getCbsname() {
+ return cbsname;
+ }
+
+ public void setCbsname(String cbsname) {
+ this.cbsname = cbsname;
+ }
+
+ public String getShstate() {
+ return shstate;
+ }
+
+ public void setShstate(String shstate) {
+ this.shstate = shstate;
+ }
+
+ public String getXxfzrname() {
+ return xxfzrname;
+ }
+
+ public void setXxfzrname(String xxfzrname) {
+ this.xxfzrname = xxfzrname;
+ }
+
+ public String getPsmodelname() {
+ return psmodelname;
+ }
+
+ public void setPsmodelname(String psmodelname) {
+ this.psmodelname = psmodelname;
+ }
+
+ public String getYyrq() {
+ return yyrq;
+ }
+
+ public void setYyrq(String yyrq) {
+ this.yyrq = yyrq;
+ }
+
+ public String getPszb() {
+ return pszb;
+ }
+
+ public void setPszb(String pszb) {
+ this.pszb = pszb;
+ }
+
+ public String getPsbm() {
+ return psbm;
+ }
+
+ public void setPsbm(String psbm) {
+ this.psbm = psbm;
+ }
+
+ public String getPsbz() {
+ return psbz;
+ }
+
+ public void setPsbz(String psbz) {
+ this.psbz = psbz;
+ }
+
+ public String getXm() {
+ return xm;
+ }
+
+ public void setXm(String xm) {
+ this.xm = xm;
+ }
+
+ public String getSfzh() {
+ return sfzh;
+ }
+
+ public void setSfzh(String sfzh) {
+ this.sfzh = sfzh;
+ }
+
+ public String getIszzpfzr() {
+ return iszzpfzr;
+ }
+
+ public void setIszzpfzr(String iszzpfzr) {
+ this.iszzpfzr = iszzpfzr;
+ }
+
+ public String getIstzzy() {
+ return istzzy;
+ }
+
+ public void setIstzzy(String istzzy) {
+ this.istzzy = istzzy;
+ }
+
+ public String getBz() {
+ return bz;
+ }
+
+ public void setBz(String bz) {
+ this.bz = bz;
+ }
+
+ public String getSszt() {
+ return sszt;
+ }
+
+ public void setSszt(String sszt) {
+ this.sszt = sszt;
+ }
+
+ public String getPs_ssjd() {
+ return ps_ssjd;
+ }
+
+ public void setPs_ssjd(String ps_ssjd) {
+ this.ps_ssjd = ps_ssjd;
+ }
+
+ public String getKs_istg() {
+ return ks_istg;
+ }
+
+ public void setKs_istg(String ks_istg) {
+ this.ks_istg = ks_istg;
+ }
+
+ public String getKs_ksfs() {
+ return ks_ksfs;
+ }
+
+ public void setKs_ksfs(String ks_ksfs) {
+ this.ks_ksfs = ks_ksfs;
+ }
+
+ public String getKs_ykscs() {
+ return ks_ykscs;
+ }
+
+ public void setKs_ykscs(String ks_ykscs) {
+ this.ks_ykscs = ks_ykscs;
+ }
+
+ public String getIssendrl() {
+ return issendrl;
+ }
+
+ public void setIssendrl(String issendrl) {
+ this.issendrl = issendrl;
+ }
+
+ public String getIsys() {
+ return isys;
+ }
+
+ public void setIsys(String isys) {
+ this.isys = isys;
+ }
+
+ public String getShsj() {
+ return shsj;
+ }
+
+ public void setShsj(String shsj) {
+ this.shsj = shsj;
+ }
+
+ public String getYyrxm() {
+ return yyrxm;
+ }
+
+ public void setYyrxm(String yyrxm) {
+ this.yyrxm = yyrxm;
+ }
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/CbsBaseBean.java b/app/src/main/java/com/rehome/meetingbook/bean/CbsBaseBean.java
new file mode 100644
index 0000000..6017bdc
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/CbsBaseBean.java
@@ -0,0 +1,76 @@
+package com.rehome.meetingbook.bean;
+
+import java.util.List;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-09 11:33
+ * 描述:
+ */
+
+public class CbsBaseBean {
+ //姓名
+ private String xm;
+ //身份证号码
+ private String zjhm;
+ //承包商名称
+ private String cbsname;
+ //承包商人员集合
+ private List listcbsusers;
+
+ public String getXm() {
+ return xm;
+ }
+
+ public void setXm(String xm) {
+ this.xm = xm;
+ }
+
+ public String getZjhm() {
+ return zjhm;
+ }
+
+ public void setZjhm(String zjhm) {
+ this.zjhm = zjhm;
+ }
+
+ public String getCbsname() {
+ return cbsname;
+ }
+
+ public void setCbsname(String cbsname) {
+ this.cbsname = cbsname;
+ }
+
+ public List getListcbsusers() {
+ return listcbsusers;
+ }
+
+ public void setListcbsusers(List listcbsusers) {
+ this.listcbsusers = listcbsusers;
+ }
+
+ public static class RowsBean {
+
+ //姓名
+ private String xm;
+ //身份证号码
+ private String zjhm;
+
+ public String getXm() {
+ return xm;
+ }
+
+ public void setXm(String xm) {
+ this.xm = xm;
+ }
+
+ public String getZjhm() {
+ return zjhm;
+ }
+
+ public void setZjhm(String zjhm) {
+ this.zjhm = zjhm;
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/CbsCanAppointmentBean.java b/app/src/main/java/com/rehome/meetingbook/bean/CbsCanAppointmentBean.java
new file mode 100644
index 0000000..c8ad84c
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/CbsCanAppointmentBean.java
@@ -0,0 +1,59 @@
+package com.rehome.meetingbook.bean;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-12 11:18
+ * 描述:
+ */
+public class CbsCanAppointmentBean {
+ //是否可以预约(true:可以预约,false:不可以预约)
+ private Boolean isyy;
+ //可以预约的人数
+ private String rs;
+ //信息提示
+ private String msg;
+ //占用时间起始
+ private String times;
+ //占用时间结束
+ private String timee;
+
+ public Boolean isIsyy() {
+ return isyy;
+ }
+
+ public void setIsyy(Boolean isyy) {
+ this.isyy = isyy;
+ }
+
+ public String getRs() {
+ return rs;
+ }
+
+ public void setRs(String rs) {
+ this.rs = rs;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+
+ public String getTimes() {
+ return times;
+ }
+
+ public void setTimes(String times) {
+ this.times = times;
+ }
+
+ public String getTimee() {
+ return timee;
+ }
+
+ public void setTimee(String timee) {
+ this.timee = timee;
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/CbsYYUsersResultBean.java b/app/src/main/java/com/rehome/meetingbook/bean/CbsYYUsersResultBean.java
new file mode 100644
index 0000000..ce8947e
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/CbsYYUsersResultBean.java
@@ -0,0 +1,29 @@
+package com.rehome.meetingbook.bean;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-13 11:11
+ * 描述:保存预约人员数据
+ */
+public class CbsYYUsersResultBean {
+ //执行结果 (1成功,0失败,2发生异常)
+ private String result;
+ //提示信息
+ private String msg;
+
+ public String getResult() {
+ return result;
+ }
+
+ public void setResult(String result) {
+ this.result = result;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/ContactListBean.java b/app/src/main/java/com/rehome/meetingbook/bean/ContactListBean.java
new file mode 100644
index 0000000..de61893
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/ContactListBean.java
@@ -0,0 +1,131 @@
+package com.rehome.meetingbook.bean;
+
+
+import java.util.List;
+
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-08 14:27
+ * 描述:通讯录
+ */
+
+public class ContactListBean {
+
+
+ private List Rows;
+
+ public List getRows() {
+ return Rows;
+ }
+
+ public void setRows(List Rows) {
+ this.Rows = Rows;
+ }
+
+ public static class RowsBean {
+ /**
+ * DeptName : 厂领导
+ * orderlist : [{"name":"高苑辉","telephone":"","address_tel":""},{"name":"张洪刚","telephone":"","address_tel":""},{"name":"石喜光","telephone":"","address_tel":""},{"name":"齐晓波","telephone":"","address_tel":""},{"name":"陈运强","telephone":"","address_tel":""}]
+ */
+
+ private String DeptName;
+ private List orderlist;
+
+ public String getDeptName() {
+ return DeptName;
+ }
+
+ public void setDeptName(String DeptName) {
+ this.DeptName = DeptName;
+ }
+
+ public List getOrderlist() {
+ return orderlist;
+ }
+
+ public void setOrderlist(List orderlist) {
+ this.orderlist = orderlist;
+ }
+
+ public static class OrderlistBean {
+ /**
+ * name : 高苑辉
+ * telephone :
+ * address_tel :
+ */
+
+ private String name;
+ private String telephone;
+ private String address_tel;
+ private String groupName;
+ private String man_id;
+ private String account_head;
+
+ public OrderlistBean(String name, String telephone, String address_tel, String groupName, String man_id, String account_head) {
+ this.name = name;
+ this.telephone = telephone;
+ this.address_tel = address_tel;
+ this.groupName = groupName;
+ this.man_id = man_id;
+ this.account_head = account_head;
+ }
+
+ public OrderlistBean(String groupName) {
+ this.groupName = groupName;
+ }
+
+ public OrderlistBean() {
+
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getTelephone() {
+ return telephone;
+ }
+
+ public void setTelephone(String telephone) {
+ this.telephone = telephone;
+ }
+
+ public String getAddress_tel() {
+ return address_tel;
+ }
+
+ public void setAddress_tel(String address_tel) {
+ this.address_tel = address_tel;
+ }
+
+ public String getGroupName() {
+ return groupName;
+ }
+
+ public void setGroupName(String groupName) {
+ this.groupName = groupName;
+ }
+
+ public String getMan_id() {
+ return man_id;
+ }
+
+ public void setMan_id(String man_id) {
+ this.man_id = man_id;
+ }
+
+ public String getAccount_head() {
+ return account_head;
+ }
+
+ public void setAccount_head(String account_head) {
+ this.account_head = account_head;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/DeptBean.java b/app/src/main/java/com/rehome/meetingbook/bean/DeptBean.java
new file mode 100644
index 0000000..80ebe79
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/DeptBean.java
@@ -0,0 +1,50 @@
+package com.rehome.meetingbook.bean;
+
+import java.util.List;
+
+/**
+ * 部门
+ */
+public class DeptBean {
+ private String Total;
+ private List Rows;
+
+ public String getTotal() {
+ return Total;
+ }
+
+ public void setTotal(String Total) {
+ this.Total = Total;
+ }
+
+ public List getRows() {
+ return Rows;
+ }
+
+ public void setRows(List Rows) {
+ this.Rows = Rows;
+ }
+
+ public static class RowsBean {
+
+
+ private String deptname;
+ private String deptcode;
+
+ public String getDeptname() {
+ return deptname;
+ }
+
+ public void setDeptname(String deptname) {
+ this.deptname = deptname;
+ }
+
+ public String getDeptcode() {
+ return deptcode;
+ }
+
+ public void setDeptcode(String deptcode) {
+ this.deptcode = deptcode;
+ }
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/DeptBzBean.java b/app/src/main/java/com/rehome/meetingbook/bean/DeptBzBean.java
new file mode 100644
index 0000000..51f1ed8
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/DeptBzBean.java
@@ -0,0 +1,50 @@
+package com.rehome.meetingbook.bean;
+
+import java.util.List;
+
+/**
+ * 班组
+ */
+public class DeptBzBean {
+ private String Total;
+ private List Rows;
+
+ public String getTotal() {
+ return Total;
+ }
+
+ public void setTotal(String Total) {
+ this.Total = Total;
+ }
+
+ public List getRows() {
+ return Rows;
+ }
+
+ public void setRows(List Rows) {
+ this.Rows = Rows;
+ }
+
+ public static class RowsBean {
+
+
+ private String deptname;
+ private String deptcode;
+
+ public String getDeptname() {
+ return deptname;
+ }
+
+ public void setDeptname(String deptname) {
+ this.deptname = deptname;
+ }
+
+ public String getDeptcode() {
+ return deptcode;
+ }
+
+ public void setDeptcode(String deptcode) {
+ this.deptcode = deptcode;
+ }
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/GridViewBean.java b/app/src/main/java/com/rehome/meetingbook/bean/GridViewBean.java
new file mode 100644
index 0000000..2e4bec1
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/GridViewBean.java
@@ -0,0 +1,47 @@
+package com.rehome.meetingbook.bean;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-11-25 19:35
+ * 描述:
+ */
+public class GridViewBean {
+
+ private String title;
+ private int imageid;
+ private int backgroup;
+ private boolean isShow;
+
+ public int getImageid() {
+ return imageid;
+ }
+
+ public void setImageid(int imageid) {
+ this.imageid = imageid;
+ }
+
+ public int getBackgroup() {
+ return backgroup;
+ }
+
+ public void setBackgroup(int backgroup) {
+ this.backgroup = backgroup;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+
+ public boolean isShow() {
+ return isShow;
+ }
+
+ public void setShow(boolean show) {
+ isShow = show;
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/UploadCbsMainDataBean.java b/app/src/main/java/com/rehome/meetingbook/bean/UploadCbsMainDataBean.java
new file mode 100644
index 0000000..8c1761a
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/UploadCbsMainDataBean.java
@@ -0,0 +1,79 @@
+package com.rehome.meetingbook.bean;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-12 17:17
+ * 描述:
+ */
+public class UploadCbsMainDataBean {
+ //承包商名称(全称)
+ private String cbsname;
+ //预约人手机号
+ private String yyrdh;
+ //预约人姓名
+ private String yyrxm;
+ //厂内项目负责人工号
+ private String xxfzrid;
+ //厂内项目负责人姓名
+ private String xxfzrname;
+ //培训考试模式ID
+ private String psmodel;
+ //是否为常委承包商(0否,1是)
+ private String iscw="0";
+
+ public String getCbsname() {
+ return cbsname;
+ }
+
+ public void setCbsname(String cbsname) {
+ this.cbsname = cbsname;
+ }
+
+ public String getYyrdh() {
+ return yyrdh;
+ }
+
+ public void setYyrdh(String yyrdh) {
+ this.yyrdh = yyrdh;
+ }
+
+ public String getYyrxm() {
+ return yyrxm;
+ }
+
+ public void setYyrxm(String yyrxm) {
+ this.yyrxm = yyrxm;
+ }
+
+ public String getXxfzrid() {
+ return xxfzrid;
+ }
+
+ public void setXxfzrid(String xxfzrid) {
+ this.xxfzrid = xxfzrid;
+ }
+
+ public String getXxfzrname() {
+ return xxfzrname;
+ }
+
+ public void setXxfzrname(String xxfzrname) {
+ this.xxfzrname = xxfzrname;
+ }
+
+ public String getPsmodel() {
+ return psmodel;
+ }
+
+ public void setPsmodel(String psmodel) {
+ this.psmodel = psmodel;
+ }
+
+ public String getIscw() {
+ return iscw;
+ }
+
+ public void setIscw(String iscw) {
+ this.iscw = iscw;
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/UploadCbsMainDataResultBean.java b/app/src/main/java/com/rehome/meetingbook/bean/UploadCbsMainDataResultBean.java
new file mode 100644
index 0000000..8f90eb2
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/UploadCbsMainDataResultBean.java
@@ -0,0 +1,39 @@
+package com.rehome.meetingbook.bean;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-13 10:58
+ * 描述:保存主数据
+ */
+public class UploadCbsMainDataResultBean {
+ //执行结果 (1成功,0失败,2发生异常)
+ private String result;
+ //主数据ID
+ private String mainid;
+ //提示信息
+ private String msg;
+
+ public String getResult() {
+ return result;
+ }
+
+ public void setResult(String result) {
+ this.result = result;
+ }
+
+ public String getMainid() {
+ return mainid;
+ }
+
+ public void setMainid(String mainid) {
+ this.mainid = mainid;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/WorkMemberBean.java b/app/src/main/java/com/rehome/meetingbook/bean/WorkMemberBean.java
new file mode 100644
index 0000000..5a3b05d
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/WorkMemberBean.java
@@ -0,0 +1,69 @@
+package com.rehome.meetingbook.bean;
+
+import java.util.List;
+
+/**
+ * 厂内人员信息
+ */
+public class WorkMemberBean {
+ private String Total;
+ private List Rows;
+
+ public String getTotal() {
+ return Total;
+ }
+
+ public void setTotal(String Total) {
+ this.Total = Total;
+ }
+
+ public List getRows() {
+ return Rows;
+ }
+
+ public void setRows(List Rows) {
+ this.Rows = Rows;
+ }
+
+ public static class RowsBean {
+
+
+ private String man_id;
+ private String name;
+ private String deptname;
+ private String deptcode;
+
+ public String getMan_id() {
+ return man_id;
+ }
+
+ public void setMan_id(String man_id) {
+ this.man_id = man_id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDeptname() {
+ return deptname;
+ }
+
+ public void setDeptname(String deptname) {
+ this.deptname = deptname;
+ }
+
+ public String getDeptcode() {
+ return deptcode;
+ }
+
+ public void setDeptcode(String deptcode) {
+ this.deptcode = deptcode;
+ }
+
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/bean/YunQingExalBean.java b/app/src/main/java/com/rehome/meetingbook/bean/YunQingExalBean.java
new file mode 100644
index 0000000..f90c077
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/bean/YunQingExalBean.java
@@ -0,0 +1,73 @@
+package com.rehome.meetingbook.bean;
+
+import java.util.List;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-21 11:17
+ * 描述:
+ */
+public class YunQingExalBean {
+ private String Total;
+ private List Rows;
+
+ public String getTotal() {
+ return Total;
+ }
+
+ public void setTotal(String Total) {
+ this.Total = Total;
+ }
+
+ public List getRows() {
+ return Rows;
+ }
+
+ public void setRows(List Rows) {
+ this.Rows = Rows;
+ }
+
+ public static class RowsBean {
+
+ //预约日期(格式:HH:mm)
+ private String rq;
+ //培训考试起始时间(格式:HH:mm)
+ private String times;
+ //培训考试结束时间(格式:HH:mm)
+ private String timee;
+ //预约总人数
+ private String department_name;
+
+ public String getRq() {
+ return rq;
+ }
+
+ public void setRq(String rq) {
+ this.rq = rq;
+ }
+
+ public String getTimes() {
+ return times;
+ }
+
+ public void setTimes(String times) {
+ this.times = times;
+ }
+
+ public String getTimee() {
+ return timee;
+ }
+
+ public void setTimee(String timee) {
+ this.timee = timee;
+ }
+
+ public String getDepartment_name() {
+ return department_name;
+ }
+
+ public void setDepartment_name(String department_name) {
+ this.department_name = department_name;
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/rehome/meetingbook/ui/activity/LoginActivity.java b/app/src/main/java/com/rehome/meetingbook/ui/activity/LoginActivity.java
new file mode 100644
index 0000000..b8c392e
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/ui/activity/LoginActivity.java
@@ -0,0 +1,192 @@
+package com.rehome.meetingbook.ui.activity;
+
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.graphics.Bitmap;
+import android.hardware.usb.UsbDevice;
+import android.hardware.usb.UsbManager;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.WindowManager;
+import android.view.inputmethod.InputMethodManager;
+import com.rehome.meetingbook.MainActivity;
+import com.rehome.meetingbook.R;
+import com.rehome.meetingbook.ZKUSBManager.ZKUSBManager;
+import com.rehome.meetingbook.ZKUSBManager.ZKUSBManagerListener;
+import com.rehome.meetingbook.base.BaseActivity2;
+import com.rehome.meetingbook.databinding.ActivityLoginBinding;
+import com.rehome.meetingbook.utils.ControllerActivity;
+import com.rehome.meetingbook.weiget.CustomLoadingDialog;
+import com.zkteco.android.biometric.core.device.ParameterHelper;
+import com.zkteco.android.biometric.core.device.TransportType;
+import com.zkteco.android.biometric.core.utils.LogHelper;
+import com.zkteco.android.biometric.module.idcard.IDCardReader;
+import com.zkteco.android.biometric.module.idcard.IDCardReaderFactory;
+import com.zkteco.android.biometric.module.idcard.IDCardType;
+import com.zkteco.android.biometric.module.idcard.exception.IDCardReaderException;
+import com.zkteco.android.biometric.module.idcard.meta.IDCardInfo;
+import com.zkteco.android.biometric.module.idcard.meta.IDPRPCardInfo;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import androidx.activity.result.ActivityResult;
+import androidx.activity.result.ActivityResultCallback;
+import androidx.activity.result.ActivityResultLauncher;
+import androidx.activity.result.contract.ActivityResultContracts;
+import androidx.appcompat.widget.Toolbar;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-11-29 10:44
+ * 描述:登录界面
+ */
+public class LoginActivity extends BaseActivity2 {
+
+ private long exitTime = 0;
+
+ private String lastBtnCkick = "appointment"; // appointment search
+
+
+
+
+ private CustomLoadingDialog customDialog;
+ private String xm;
+
+
+ private final ActivityResultLauncher mAppointmentSearchStartActivityForResult = registerForActivityResult(
+ new ActivityResultContracts.StartActivityForResult(),
+ new ActivityResultCallback() {
+ @Override
+ public void onActivityResult(ActivityResult result) {
+ // 处理 result
+// Intent data = result.getData();
+// if (data != null) {
+// String idCardNo = data.getStringExtra("sfzh");
+// if (idCardNo != null) {
+// Intent intent = new Intent();
+// intent.setClass(LoginActivity.this, AppointmentListActivity.class);
+// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+// intent.putExtra("idCardNo", idCardNo);
+// startActivity(intent);
+// }
+// }
+ }
+ }
+ );
+
+
+ //隐藏
+ @Override
+ protected void initView() {
+
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
+ getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
+ binding.tvVersion.setText("版本号:" + getVersionName());
+
+
+ binding.llCloseKey.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ hideKeyBoard(LoginActivity.this);
+ }
+ });
+
+
+
+ }
+
+ @Override
+ protected void initData() {
+
+ }
+
+ @Override
+ protected ActivityLoginBinding getBinding() {
+ return ActivityLoginBinding.inflate(LayoutInflater.from(this));
+ }
+
+ @Override
+ protected Toolbar getToolbar() {
+ return binding.toolbarView.toolbar;
+ }
+
+
+ public void setBack() {
+ mToolbar.setNavigationIcon(R.mipmap.back);
+ mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ finish();
+ }
+ });
+ }
+
+ public static void hideKeyBoard(Activity activity) {
+ InputMethodManager imm = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
+ //Find the currently focused view, so we can grab the correct window token from it.
+ View view = activity.getCurrentFocus();
+ //If no view currently has focus, create a new one, just so we can grab a window token from it
+ if (view == null) {
+ view = new View(activity);
+ }
+ imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
+ }
+
+
+ //身份证号码格式校验
+ public boolean checkIdCardNoFormat(String idCardNo) {
+ String reg = "^\\d{15}$|^\\d{17}[0-9Xx]$";
+ return idCardNo.matches(reg);
+ }
+
+
+ // 按两次返回键退出程序
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
+ if (keyCode == KeyEvent.KEYCODE_BACK
+ && event.getAction() == KeyEvent.ACTION_DOWN) {
+ if ((System.currentTimeMillis() - exitTime) > 2000) {
+ showToast("再按一次退出程序");
+ exitTime = System.currentTimeMillis();
+ } else {
+ ControllerActivity.getAppManager().finishAllActivity();
+ finish();
+ System.exit(0);
+ //NohttpUtils.getInstance().cancelAll();
+ }
+ return true;
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+
+ /**
+ * 获取版本名称:清单文件中
+ *
+ * @return 应用版本名称 返回null代表异常
+ */
+ private String getVersionName() {
+ //1,包管理者对象packageManager
+ PackageManager pm = getPackageManager();
+ //2,从包的管理者对象中,获取指定包名的基本信息(版本名称,版本号),传0代表获取基本信息
+ try {
+ PackageInfo packageInfo = pm.getPackageInfo(getPackageName(), 0);
+ //3,获取版本名称
+ return packageInfo.versionName;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/rehome/meetingbook/ui/activity/SimpleActivity.java b/app/src/main/java/com/rehome/meetingbook/ui/activity/SimpleActivity.java
new file mode 100644
index 0000000..0bf529d
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/ui/activity/SimpleActivity.java
@@ -0,0 +1,341 @@
+package com.rehome.meetingbook.ui.activity;
+
+import androidx.appcompat.widget.Toolbar;
+
+import android.graphics.Color;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.WindowManager;
+
+import com.haibin.calendarview.Calendar;
+import com.haibin.calendarview.CalendarView;
+import com.rehome.meetingbook.Contans;
+import com.rehome.meetingbook.R;
+import com.rehome.meetingbook.adapter.AppointmentDateAdapter;
+import com.rehome.meetingbook.adapter.YunQingExalAdapter;
+import com.rehome.meetingbook.base.BaseActivity2;
+import com.rehome.meetingbook.bean.AppointmentDateDetailListBean;
+import com.rehome.meetingbook.bean.AppointmentDateListBean;
+import com.rehome.meetingbook.bean.AppointmentLevelBean;
+import com.rehome.meetingbook.bean.YunQingExalBean;
+import com.rehome.meetingbook.databinding.ActivitySimpleBinding;
+import com.rehome.meetingbook.utils.GsonUtils;
+import com.rehome.meetingbook.utils.HttpListener;
+import com.rehome.meetingbook.utils.NoProgresshttpUtils;
+import com.rehome.meetingbook.utils.StatusBarUtil;
+import com.yolanda.nohttp.NoHttp;
+import com.yolanda.nohttp.RequestMethod;
+import com.yolanda.nohttp.rest.Request;
+import com.yolanda.nohttp.rest.Response;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class SimpleActivity extends BaseActivity2implements
+ CalendarView.OnCalendarSelectListener,
+ CalendarView.OnYearChangeListener{
+
+ private int mYear;
+
+ //培训考试模式
+ private List appointmentExamModel;
+ //日常培训考试
+ private List daylyExamList;
+ private AppointmentDateAdapter daylyAdapter;
+ //运行部考试
+ private List yqExalList;
+ private YunQingExalAdapter yqExalAdapter;
+
+ @Override
+ protected ActivitySimpleBinding getBinding() {
+ return ActivitySimpleBinding.inflate(LayoutInflater.from(this));
+ }
+
+ @Override
+ protected Toolbar getToolbar() {
+ return binding.toolbarView.toolbar;
+ }
+
+ @Override
+ protected void initView() {
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
+ StatusBarUtil.setColor(SimpleActivity.this, Color.parseColor("#138CF2"));
+ binding.toolbarView.title.setText("预约一览");
+ setExitZx();
+
+ appointmentExamModel = new ArrayList<>();
+ daylyExamList = new ArrayList<>();
+ yqExalList = new ArrayList<>();
+ daylyAdapter = new AppointmentDateAdapter(SimpleActivity.this,daylyExamList);
+ yqExalAdapter = new YunQingExalAdapter(SimpleActivity.this,yqExalList);
+ binding.lvAppointmentDayly.setAdapter(daylyAdapter);
+ binding.lvAppointmentYy.setAdapter(yqExalAdapter);
+
+
+ mYear = binding.calendarView.getCurYear();
+ binding.tvYear.setText(String.valueOf(binding.calendarView.getCurYear()));
+ binding.flCurrent.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ binding.calendarView.scrollToCurrent();
+ }
+ });
+
+ binding.tvMonthDay.setText(binding.calendarView.getCurMonth() + "月" + binding.calendarView.getCurDay() + "日");
+ binding.tvLunar.setText("今日");
+ binding.tvCurrentDay.setText(String.valueOf(binding.calendarView.getCurDay()));
+
+ binding.calendarView.setOnYearChangeListener(this);
+ binding.calendarView.setOnCalendarSelectListener(this);
+ }
+
+ @Override
+ protected void initData() {
+
+// int year = binding.calendarView.getCurYear();
+// int month = binding.calendarView.getCurMonth();
+//
+// Map map = new HashMap<>();
+// map.put(getSchemeCalendar(year, month, 3, 0xFF40db25, "假").toString(),
+// getSchemeCalendar(year, month, 3, 0xFF40db25, "假"));
+// map.put(getSchemeCalendar(year, month, 6, 0xFF40db25, "事").toString(),
+// getSchemeCalendar(year, month, 6, 0xFF40db25, "事"));
+// map.put(getSchemeCalendar(year, month, 9, 0xFF40db25, "议").toString(),
+// getSchemeCalendar(year, month, 9, 0xFF40db25, "议"));
+// map.put(getSchemeCalendar(year, month, 13, 0xFF40db25, "记").toString(),
+// getSchemeCalendar(year, month, 13, 0xFF40db25, "记"));
+// map.put(getSchemeCalendar(year, month, 14, 0xFF40db25, "记").toString(),
+// getSchemeCalendar(year, month, 14, 0xFF40db25, "记"));
+// map.put(getSchemeCalendar(year, month, 15, 0xFF40db25, "假").toString(),
+// getSchemeCalendar(year, month, 15, 0xFF40db25, "假"));
+// map.put(getSchemeCalendar(year, month, 18, 0xFF40db25, "记").toString(),
+// getSchemeCalendar(year, month, 18, 0xFF40db25, "记"));
+// map.put(getSchemeCalendar(year, month, 25, 0xFF40db25, "假").toString(),
+// getSchemeCalendar(year, month, 25, 0xFF40db25, "假"));
+// map.put(getSchemeCalendar(year, month, 27, 0xFF40db25, "多").toString(),
+// getSchemeCalendar(year, month, 27, 0xFF40db25, "多"));
+// //此方法在巨大的数据量上不影响遍历性能,推荐使用
+// binding.calendarView.setSchemeDate(map);
+
+ //获取培训考试模式
+ getExamModel();
+ }
+
+ private Calendar getSchemeCalendar(int year, int month, int day, int color, String text) {
+ Calendar calendar = new Calendar();
+ calendar.setYear(year);
+ calendar.setMonth(month);
+ calendar.setDay(day);
+ calendar.setSchemeColor(color);//如果单独标记颜色、则会使用这个颜色
+ calendar.setScheme(text);
+ return calendar;
+ }
+
+ private void setExitZx() {
+ mToolbar.setNavigationIcon(R.mipmap.back);
+ mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ finish();
+ }
+ });
+ }
+
+ @Override
+ public void onCalendarOutOfRange(Calendar calendar) {
+
+ }
+
+ @Override
+ public void onCalendarSelect(Calendar calendar, boolean isClick) {
+ binding.tvLunar.setVisibility(View.VISIBLE);
+ binding.tvYear.setVisibility(View.VISIBLE);
+ binding.tvMonthDay.setText(calendar.getMonth() + "月" + calendar.getDay() + "日");
+ binding.tvYear.setText(String.valueOf(calendar.getYear()));
+ binding.tvLunar.setText(calendar.getLunar());
+ mYear = calendar.getYear();
+ Log.i("app","onCalendarSelect");
+ Log.i("app",String.valueOf(calendar.getYear())+"-"+String.valueOf(calendar.getMonth())+"-"+calendar.getDay());
+
+ getDateDetailList(String.valueOf(calendar.getYear())+"-"+String.format("%02d", calendar.getMonth())+"-"+String.format("%02d", calendar.getDay()));
+ //获取生产岗位培训室使用时间
+ getScgwDateDetailList(String.valueOf(calendar.getYear())+"-"+String.format("%02d", calendar.getMonth())+"-"+String.format("%02d", calendar.getDay()));
+
+
+ }
+
+ @Override
+ public void onYearChange(int year) {
+ binding.tvMonthDay.setText(String.valueOf(year));
+ }
+
+ private void getExamModel() {
+
+ String url = Contans.BASE_URL + Contans.GET_YYTYPEANDEXAMMODEL_URL + "PSKSMS";
+ Log.i("app", url);
+ Request request = NoHttp.createStringRequest(url, RequestMethod.GET);
+
+ NoProgresshttpUtils.getInstance().add(0, request, new HttpListener() {
+
+ @Override
+ public void onSucceed(int what, Response response) {
+
+ Log.i("app", "----------------");
+ String result = response.get();
+ Log.i("app", result);
+
+ AppointmentLevelBean bean = GsonUtils.GsonToBean(result, AppointmentLevelBean.class);
+ if (bean != null && bean.getRows() != null && bean.getRows().size() > 0) {
+ appointmentExamModel.clear();
+ appointmentExamModel.addAll(bean.getRows());
+ //获取有预约的日期(从当前时间起)
+ getDateList();
+ }
+ }
+
+ @Override
+ public void onFailed(int what, Response response) {
+
+ }
+ });
+ }
+ //获取有预约的日期(从当前时间起)
+ private void getDateList() {
+
+ String url = Contans.BASE_URL + Contans.GET_YYDATE_URL;
+ Log.i("app", url);
+ Request request = NoHttp.createStringRequest(url, RequestMethod.GET);
+
+ NoProgresshttpUtils.getInstance().add(0, request, new HttpListener() {
+
+ @Override
+ public void onSucceed(int what, Response response) {
+
+ Log.i("app", "----------------");
+ String result = response.get();
+ Log.i("app", result);
+
+ AppointmentDateListBean bean = GsonUtils.GsonToBean(result, AppointmentDateListBean.class);
+ if (bean != null) {
+ if (bean.getRows() != null && bean.getRows().size() > 0) {
+ Map map = new HashMap<>();
+ for (AppointmentDateListBean.RowsBean item:bean.getRows()) {
+ if(!TextUtils.isEmpty(item.getYyrq())){
+ String year = item.getYyrq().substring(0,4);
+ String month = item.getYyrq().substring(5,7);
+ String day = item.getYyrq().substring(8,10);
+ map.put(getSchemeCalendar(Integer.parseInt(year),Integer.parseInt(month),Integer.parseInt(day),0xFF40db25,"假").toString(),
+ getSchemeCalendar(Integer.parseInt(year),Integer.parseInt(month),Integer.parseInt(day),0xFF40db25,"假"));
+ }
+ }
+ //此方法在巨大的数据量上不影响遍历性能,推荐使用
+ binding.calendarView.setSchemeDate(map);
+// //获取每天预约详细
+// getDateDetailList(bean.getRows().get(0).getYyrq());
+// //获取生产岗位培训室使用时间
+// getScgwDateDetailList(bean.getRows().get(0).getYyrq());
+
+ binding.calendarView.scrollToCurrent();
+ }
+ } else {
+ showToast("预约数据");
+ }
+ }
+
+ @Override
+ public void onFailed(int what, Response response) {
+
+ }
+ });
+ }
+
+ //获取每天预约详细
+ private void getDateDetailList(String dateStr) {
+
+ binding.tvTimeDay1.setText(dateStr+":");
+ binding.tvTimeDay3.setText(dateStr+":");
+ String url = Contans.BASE_URL + Contans.GET_YYDATEDETAILLIST_URL+dateStr;
+ Log.i("app", url);
+ Request request = NoHttp.createStringRequest(url, RequestMethod.GET);
+
+ NoProgresshttpUtils.getInstance().add(0, request, new HttpListener() {
+
+ @Override
+ public void onSucceed(int what, Response response) {
+
+ Log.i("app", "----------------");
+ String result = response.get();
+ Log.i("app", result);
+
+ AppointmentDateDetailListBean bean = GsonUtils.GsonToBean(result, AppointmentDateDetailListBean.class);
+ if (bean != null) {
+ if (bean.getRows() != null && bean.getRows().size() > 0) {
+ if(appointmentExamModel.size()>0){
+ String idDayly = "";
+ daylyExamList.clear();
+ for (AppointmentLevelBean.RowsBean modelItem:appointmentExamModel) {
+ if(modelItem.getText().equals("日常培训考试")){
+ idDayly = modelItem.getId();
+ }
+ }
+ for (AppointmentDateDetailListBean.RowsBean item:bean.getRows()) {
+ if(item.getPsmodel().equals(idDayly)){
+ daylyExamList.add(item);
+ }
+ }
+ daylyAdapter.notifyDataSetChanged();
+ }
+ }else{
+ daylyExamList.clear();
+ daylyAdapter.notifyDataSetChanged();
+ }
+ }
+ }
+
+ @Override
+ public void onFailed(int what, Response response) {
+
+ }
+ });
+ }
+ //获取每天预约详细
+ private void getScgwDateDetailList(String dateStr) {
+
+ String url = Contans.BASE_URL + Contans.GET_YYDATESCGW_URL+dateStr;
+ Log.i("app", url);
+ Request request = NoHttp.createStringRequest(url, RequestMethod.GET);
+
+ NoProgresshttpUtils.getInstance().add(0, request, new HttpListener() {
+
+ @Override
+ public void onSucceed(int what, Response response) {
+
+ Log.i("app", "----------------");
+ String result = response.get();
+ Log.i("app", result);
+
+ YunQingExalBean bean = GsonUtils.GsonToBean(result, YunQingExalBean.class);
+ if (bean != null) {
+ if (bean.getRows() != null && bean.getRows().size() > 0) {
+ yqExalList.clear();
+ yqExalList.addAll(bean.getRows());
+ yqExalAdapter.notifyDataSetChanged();
+ }else{
+ yqExalList.clear();
+ yqExalAdapter.notifyDataSetChanged();
+ }
+ }
+ }
+
+ @Override
+ public void onFailed(int what, Response response) {
+
+ }
+ });
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/rehome/meetingbook/ui/fragment/BaseFragment.java b/app/src/main/java/com/rehome/meetingbook/ui/fragment/BaseFragment.java
new file mode 100644
index 0000000..4a55750
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/ui/fragment/BaseFragment.java
@@ -0,0 +1,52 @@
+package com.rehome.meetingbook.ui.fragment;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.viewbinding.ViewBinding;
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-06 17:36
+ * 描述:
+ */
+public abstract class BaseFragment extends Fragment {
+
+ protected Context context;
+
+ protected T binding;
+
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
+ @Nullable Bundle savedInstanceState) {
+ binding = getBinding(inflater, container);
+ return binding.getRoot();
+ }
+
+ protected abstract T getBinding(LayoutInflater inflater, ViewGroup container);
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ binding = null;
+ }
+
+ @Override
+ public void onAttach(@NonNull Context context) {
+ super.onAttach(context);
+ this.context = context;
+ }
+
+ @Override
+ public void onDetach() {
+ super.onDetach();
+ this.context = null;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/rehome/meetingbook/utils/ContactDatas.java b/app/src/main/java/com/rehome/meetingbook/utils/ContactDatas.java
new file mode 100644
index 0000000..cabbaee
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/utils/ContactDatas.java
@@ -0,0 +1,47 @@
+package com.rehome.meetingbook.utils;
+
+
+
+import com.rehome.meetingbook.bean.ContactListBean;
+
+import java.util.ArrayList;
+import java.util.List;
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-08 15:38
+ * 描述:
+ */
+public class ContactDatas {
+
+ public static List getContanctList(ContactListBean bean) {
+
+ List orderlistBeanListEnd = new ArrayList<>();
+
+ List rowsBeanList = bean.getRows();
+
+ for (int i = 0; i < rowsBeanList.size(); i++) {
+
+ ContactListBean.RowsBean rowsBean = rowsBeanList.get(i);
+
+ if (rowsBean.getOrderlist() != null) {
+
+ List orderlistBeanList = rowsBean.getOrderlist();
+
+ if (orderlistBeanList.size() != 0) {
+
+ orderlistBeanListEnd.add(new ContactListBean.RowsBean.OrderlistBean("", "", "", rowsBean.getDeptName(),"",""));
+
+ for (ContactListBean.RowsBean.OrderlistBean orderlistBean : orderlistBeanList) {
+
+ orderlistBean.setGroupName(rowsBean.getDeptName());
+
+ }
+
+ orderlistBeanListEnd.addAll(orderlistBeanList);
+ }
+ }
+ }
+ return orderlistBeanListEnd;
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/rehome/meetingbook/utils/ControllerActivity.java b/app/src/main/java/com/rehome/meetingbook/utils/ControllerActivity.java
new file mode 100644
index 0000000..d383f64
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/utils/ControllerActivity.java
@@ -0,0 +1,113 @@
+package com.rehome.meetingbook.utils;
+
+
+import android.app.Activity;
+import android.app.ActivityManager;
+import android.content.Context;
+
+import java.util.Stack;
+
+/**
+ * Created by ruihong on 2017/10/28.
+ */
+
+public class ControllerActivity {
+ //activity栈
+ private static Stack activityStack;
+ //使用单例模式
+ private static ControllerActivity instance;
+
+ private ControllerActivity() {
+ }
+
+
+ public static ControllerActivity getAppManager() {
+ if (instance == null) {
+ instance = new ControllerActivity();
+ }
+ return instance;
+ }
+
+ /***
+ * 添加Activity到栈
+ * @param activity
+ */
+ public void addActivity(Activity activity) {
+ if (activityStack == null) {
+ activityStack = new Stack();
+ }
+ activityStack.add(activity);
+ }
+
+ /**
+ * 获取当前Activity(堆栈中最后一个压入的)
+ */
+ public Activity currentActivity() {
+
+ if (activityStack.size() == 0) {
+ return null;
+ } else {
+ Activity activity = activityStack.lastElement();
+ return activity;
+ }
+ }
+
+ /**
+ * 结束当前Activity(堆栈中最后一个压入的)
+ */
+ public void finishActivity() {
+ Activity activity = activityStack.lastElement();
+ finishActivity(activity);
+ }
+
+ /**
+ * 结束指定的Activity
+ */
+ public void finishActivity(Activity activity) {
+ if (activity != null) {
+ activityStack.remove(activity);
+ activity.finish();
+ activity = null;
+ }
+ }
+
+ /**
+ * 结束指定类名的Activity
+ */
+ public void finishActivity(Class> cls) {
+ for (Activity activity : activityStack) {
+ if (activity.getClass().equals(cls)) {
+ finishActivity(activity);
+ break;
+ }
+ }
+ }
+
+ /**
+ * 结束所有Activity
+ */
+ public void finishAllActivity() {
+ for (int i = 0; i < activityStack.size(); i++) {
+ if (null != activityStack.get(i)) {
+ activityStack.get(i).finish();
+ }
+ }
+ activityStack.clear();
+ }
+
+ /**
+ * 退出程序
+ *
+ * @param context
+ */
+ public void AppExit(Context context) {
+ try {
+ finishAllActivity();
+ ActivityManager activityMgr = (ActivityManager) context
+ .getSystemService(Context.ACTIVITY_SERVICE);
+ activityMgr.killBackgroundProcesses(context.getPackageName());
+ System.exit(0);
+ } catch (Exception e) {
+ }
+ }
+}
diff --git a/app/src/main/java/com/rehome/meetingbook/utils/GsonUtils.java b/app/src/main/java/com/rehome/meetingbook/utils/GsonUtils.java
new file mode 100644
index 0000000..ff7199f
--- /dev/null
+++ b/app/src/main/java/com/rehome/meetingbook/utils/GsonUtils.java
@@ -0,0 +1,134 @@
+package com.rehome.meetingbook.utils;
+
+
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonParser;
+import com.google.gson.reflect.TypeToken;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+
+
+/**
+ * Create By HuangWenFei
+ * 创建日期:2022-12-01 15:36
+ * 描述:gson工具类,封装GSON
+ */
+public class GsonUtils {
+
+ private static Gson gson = null;
+
+ static {
+ if (gson == null) {
+ gson = new Gson();
+ }
+ }
+
+ private GsonUtils() {
+ }
+
+ /**
+ * 转成json
+ *
+ * @param object
+ * @return
+ */
+ public static String GsonString(Object object) {
+ String gsonString = null;
+ if (gson != null) {
+ gsonString = gson.toJson(object);
+ }
+ return gsonString;
+ }
+
+ /**
+ * 转成bean
+ *
+ * @param gsonString
+ * @param cls
+ * @return
+ */
+ public static T GsonToBean(String gsonString, Class cls) {
+ T t = null;
+ if (gson != null) {
+ try {
+ t = gson.fromJson(gsonString, cls);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ return t;
+ }
+
+ /**
+ * 转成list
+ * 泛型在编译期类型被擦除导致报错
+ *
+ * @param gsonString
+ * @param cls
+ * @return
+ */
+ public static List GsonToList(String gsonString, Class cls) {
+ List list = null;
+ if (gson != null) {
+ list = gson.fromJson(gsonString, new TypeToken>() {
+ }.getType());
+ }
+ return list;
+ }
+
+ /**
+ * 转成list
+ * 解决泛型问题
+ *
+ * @param json
+ * @param cls
+ * @param
+ * @return
+ */
+ public List jsonToList(String json, Class cls) {
+ Gson gson = new Gson();
+ List list = new ArrayList();
+ JsonArray array = new JsonParser().parse(json).getAsJsonArray();
+ for (final JsonElement elem : array) {
+ list.add(gson.fromJson(elem, cls));
+ }
+ return list;
+ }
+
+
+ /**
+ * 转成list中有map的
+ *
+ * @param gsonString
+ * @return
+ */
+ public static List