() {
+// @Override
+// public void onError(@NonNull Call call, @NonNull Exception e) {
+// UiUtils.toast(e.getMessage());
+// activity.loadingNone();
+// }
+//
+// @Override
+// public void onSuccess(ApplyDetail value) {
+// activity.applyDetail(value);
+// activity.loadingNone();
+// }
+// });
+// }
+}
diff --git a/app/src/main/java/com/police/union/personal/fragment/MineFragment.java b/app/src/main/java/com/police/union/personal/fragment/MineFragment.java
new file mode 100644
index 0000000..2d10108
--- /dev/null
+++ b/app/src/main/java/com/police/union/personal/fragment/MineFragment.java
@@ -0,0 +1,33 @@
+package com.police.union.personal.fragment;
+
+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 com.police.base.BaseFragment;
+import com.police.network.Constants;
+import com.police.union.databinding.FragmentMineBinding;
+
+public class MineFragment extends BaseFragment {
+ private FragmentMineBinding binding;
+
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ binding = FragmentMineBinding.inflate(inflater);
+ initView();
+ return binding.getRoot();
+ }
+
+ private void initView() {
+ binding.tvUserName.setText(Constants.XM);
+ binding.tvUserPhone.setText(Constants.USER_ID);
+ binding.ivMineQuery.setOnClickListener(view -> {
+ //点击了切换所属组织功能
+ });
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/police/union/widget/WaterMarkInfo.java b/app/src/main/java/com/police/union/widget/WaterMarkInfo.java
new file mode 100644
index 0000000..b6cc943
--- /dev/null
+++ b/app/src/main/java/com/police/union/widget/WaterMarkInfo.java
@@ -0,0 +1,208 @@
+package com.police.union.widget;
+
+import android.graphics.Color;
+import android.graphics.Paint;
+
+/**
+ * @author Leon (wshk729@163.com)
+ * @date 2018/8/24
+ *
+ */
+public class WaterMarkInfo {
+
+ private int mDegrees;
+ private int mTextColor;
+ private int mTextSize;
+ private boolean mTextBold;
+ private int mDx;
+ private int mDy;
+ private Paint.Align mAlign;
+
+ private WaterMarkInfo(int degrees, int textColor, int textSize, boolean textBold, int dx, int dy, Paint.Align align) {
+ mDegrees = degrees;
+ mTextColor = textColor;
+ mTextSize = textSize;
+ mTextBold = textBold;
+ mDx = dx;
+ mDy = dy;
+ mAlign = align;
+ }
+
+ public int getDegrees() {
+ return mDegrees;
+ }
+
+ public int getTextColor() {
+ return mTextColor;
+ }
+
+ public int getTextSize() {
+ return mTextSize;
+ }
+
+ public int getDx() {
+ return mDx;
+ }
+
+ public int getDy() {
+ return mDy;
+ }
+
+ public Paint.Align getAlign() {
+ return mAlign;
+ }
+
+ public int getAlignInt() {
+ switch (mAlign) {
+ case LEFT:
+ return 0;
+ case RIGHT:
+ return 2;
+ default:
+ return 1;
+ }
+ }
+
+ public boolean isTextBold() {
+ return mTextBold;
+ }
+
+ void setDegrees(int degrees) {
+ mDegrees = degrees;
+ }
+
+ void setTextColor(int textColor) {
+ mTextColor = textColor;
+ }
+
+ void setTextSize(int textSize) {
+ mTextSize = textSize;
+ }
+
+ void setTextBold(boolean textBold) {
+ mTextBold = textBold;
+ }
+
+ void setDx(int dx) {
+ mDx = dx;
+ }
+
+ void setDy(int dy) {
+ mDy = dy;
+ }
+
+ void setAlign(Paint.Align align) {
+ this.mAlign = align;
+ }
+
+ public static Builder create() {
+ return new Builder();
+ }
+
+ public static class Builder {
+ private int mDegrees;
+ private int mTextColor;
+ private int mTextSize;
+ private boolean mTextBold;
+ private int mDx;
+ private int mDy;
+ private Paint.Align mAlign;
+
+ private Builder() {
+ mDegrees = -30;
+ mTextColor = Color.parseColor("#33000000");
+ mTextSize = 35;
+ mTextBold = false;
+ mDx = 100;
+ mDy = 240;
+ mAlign = Paint.Align.CENTER;
+ }
+
+ /**
+ * 设置水印文字倾斜度
+ *
+ * @param degrees 文字倾斜度(默认:-30)
+ * @return Builder
+ */
+ public Builder setDegrees(int degrees) {
+ mDegrees = degrees;
+ return this;
+ }
+
+ /**
+ * 设置水印文字颜色
+ *
+ * @param textColor 文字颜色(默认:#33000000)
+ * @return Builder
+ */
+ public Builder setTextColor(int textColor) {
+ mTextColor = textColor;
+ return this;
+ }
+
+ /**
+ * 设置水印文字大小(单位:px)
+ *
+ * @param textSize 文字大小(默认:42px)
+ * @return Builder
+ */
+ public Builder setTextSize(int textSize) {
+ mTextSize = textSize;
+ return this;
+ }
+
+ /**
+ * 设置水印文字是否加粗
+ *
+ * @param textBold 文字加粗(默认:false)
+ * @return Builder
+ */
+ public Builder setTextBold(boolean textBold) {
+ mTextBold = textBold;
+ return this;
+ }
+
+ /**
+ * 设置水印文字X轴间距(单位:px)
+ *
+ * @param dx 文字X轴间距(默认:100px)
+ * @return Builder
+ */
+ public Builder setDx(int dx) {
+ mDx = dx;
+ return this;
+ }
+
+ /**
+ * 设置水印文字Y轴间距(单位:px)
+ *
+ * @param dy 文字Y轴间距(默认:240px)
+ * @return Builder
+ */
+ public Builder setDy(int dy) {
+ mDy = dy;
+ return this;
+ }
+
+ /**
+ * 设置水印文字对齐方式
+ *
+ * @param align 对齐方式(默认:Center)
+ * @return Builder
+ */
+ public Builder setAlign(Paint.Align align) {
+ mAlign = align;
+ return this;
+ }
+
+ /**
+ * 生成水印全局配置信息
+ *
+ * @return 配置信息
+ */
+ public WaterMarkInfo generate() {
+ return new WaterMarkInfo(mDegrees, mTextColor, mTextSize, mTextBold, mDx, mDy, mAlign);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/police/union/widget/WaterMarkManager.java b/app/src/main/java/com/police/union/widget/WaterMarkManager.java
new file mode 100644
index 0000000..a51fb1e
--- /dev/null
+++ b/app/src/main/java/com/police/union/widget/WaterMarkManager.java
@@ -0,0 +1,188 @@
+package com.police.union.widget;
+
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.graphics.Paint;
+import android.view.LayoutInflater;
+
+
+import com.police.union.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Leon (wshk729@163.com)
+ * @date 2018/8/24
+ *
+ */
+public class WaterMarkManager {
+
+ static WaterMarkInfo INFO = null;
+ static String[] CONTENT = null;
+ static List LIST = new ArrayList<>();
+
+ /**
+ * 设置水印全局配置信息
+ *
+ * @param info 配置信息
+ */
+ public static void setInfo(WaterMarkInfo info) {
+ INFO = info;
+ }
+
+ /**
+ * 获取一个满屏水印View
+ *
+ * @param activity activity
+ */
+ @SuppressLint("InflateParams")
+ public static WaterMarkView getView(Activity activity) {
+ return (WaterMarkView) LayoutInflater.from(activity).inflate(R.layout.view_water_mark, null);
+ }
+
+ /**
+ * WaterMarkInfo初始化判断
+ */
+ private static void assertInitialized() {
+ if (INFO == null) {
+ INFO = WaterMarkInfo.create().generate();
+ }
+ }
+
+ /**
+ * 同步设置全部水印文字信息
+ *
+ * @param content 文字信息
+ */
+ public static void setText(String... content) {
+ assertInitialized();
+ CONTENT = content;
+ if (LIST.size() > 0) {
+ for (WaterMarkView view : LIST) {
+ if (view != null) {
+ view.setSyncText(content);
+ }
+ }
+ }
+ }
+
+ /**
+ * 同步设置全部水印倾斜角度
+ *
+ * @param degrees 倾斜角度(默认:-30)
+ */
+ public static void setDegrees(int degrees) {
+ assertInitialized();
+ INFO.setDegrees(degrees);
+ if (LIST.size() > 0) {
+ for (WaterMarkView view : LIST) {
+ if (view != null) {
+ view.setSyncDegrees(degrees);
+ }
+ }
+ }
+ }
+
+ /**
+ * 同步设置全部水印字体颜色
+ *
+ * @param textColor 字体颜色(默认:#33000000)
+ */
+ public static void setTextColor(int textColor) {
+ assertInitialized();
+ INFO.setTextColor(textColor);
+ if (LIST.size() > 0) {
+ for (WaterMarkView view : LIST) {
+ if (view != null) {
+ view.setSyncTextColor(textColor);
+ }
+ }
+ }
+ }
+
+ /**
+ * 同步设置全部水印字体大小(单位:px)
+ *
+ * @param textSize 字体大小(默认:42px)
+ */
+ public static void setTextSize(int textSize) {
+ assertInitialized();
+ INFO.setTextSize(textSize);
+ if (LIST.size() > 0) {
+ for (WaterMarkView view : LIST) {
+ if (view != null) {
+ view.setSyncTextSize(textSize);
+ }
+ }
+ }
+ }
+
+ /**
+ * 同步设置全部水印字体是否粗体
+ *
+ * @param textBold 是否粗体(默认:false)
+ */
+ public static void setTextBold(boolean textBold) {
+ assertInitialized();
+ INFO.setTextBold(textBold);
+ if (LIST.size() > 0) {
+ for (WaterMarkView view : LIST) {
+ if (view != null) {
+ view.setSyncTextBold(textBold);
+ }
+ }
+ }
+ }
+
+ /**
+ * 同步设置全部水印X轴偏移量(单位:px)
+ *
+ * @param dx X轴偏移量(默认:100px)
+ */
+ public static void setDx(int dx) {
+ assertInitialized();
+ INFO.setDx(dx);
+ if (LIST.size() > 0) {
+ for (WaterMarkView view : LIST) {
+ if (view != null) {
+ view.setSyncDx(dx);
+ }
+ }
+ }
+ }
+
+ /**
+ * 同步设置全部水印Y轴偏移量(单位:px)
+ *
+ * @param dy Y轴偏移量(默认:240px)
+ */
+ public static void setDy(int dy) {
+ assertInitialized();
+ INFO.setDy(dy);
+ if (LIST.size() > 0) {
+ for (WaterMarkView view : LIST) {
+ if (view != null) {
+ view.setSignDy(dy);
+ }
+ }
+ }
+ }
+
+ /**
+ * 同步设置全部水印对齐方式
+ *
+ * @param align 对齐方式(默认:Center)
+ */
+ public static void setAlign(Paint.Align align) {
+ assertInitialized();
+ INFO.setAlign(align);
+ if (LIST.size() > 0) {
+ for (WaterMarkView view : LIST) {
+ if (view != null) {
+ view.setSignAlign(align);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/police/union/widget/WaterMarkView.java b/app/src/main/java/com/police/union/widget/WaterMarkView.java
new file mode 100644
index 0000000..f238cf0
--- /dev/null
+++ b/app/src/main/java/com/police/union/widget/WaterMarkView.java
@@ -0,0 +1,335 @@
+package com.police.union.widget;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.graphics.Typeface;
+import android.text.TextPaint;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.view.View;
+
+import com.police.union.R;
+
+
+public class WaterMarkView extends View {
+
+ private static final String DEFAULT_SEPARATOR = "///";
+ private TextPaint mTextPaint = new TextPaint();
+
+ private String[] mText;
+ private int mDegrees;
+ private int mTextColor;
+ private int mTextSize=35;
+ private boolean mTextBold;
+ private int mDx;
+ private int mDy;
+ private Paint.Align mAlign;
+ private boolean mSync;
+ private int textWidth, textHeight;
+
+ public WaterMarkView(Context context) {
+ this(context, null);
+ }
+
+ public WaterMarkView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.WaterMarkView);
+ mDegrees = typedArray.getInt(R.styleable.WaterMarkView_water_mark_degree, WaterMarkManager.INFO != null ? WaterMarkManager.INFO.getDegrees() : -30);
+ String text = typedArray.getString(R.styleable.WaterMarkView_water_mark_text);
+ if (text != null) {
+ mText = text.split(DEFAULT_SEPARATOR);
+ }
+ mTextColor = typedArray.getColor(R.styleable.WaterMarkView_water_mark_textColor, WaterMarkManager.INFO != null ? WaterMarkManager.INFO.getTextColor() : Color.parseColor("#33000000"));
+ mTextSize = typedArray.getDimensionPixelSize(R.styleable.WaterMarkView_water_mark_textSize, WaterMarkManager.INFO != null ? WaterMarkManager.INFO.getTextSize() : 42);
+ mTextBold = typedArray.getBoolean(R.styleable.WaterMarkView_water_mark_textBold, WaterMarkManager.INFO != null && WaterMarkManager.INFO.isTextBold());
+ mDx = typedArray.getDimensionPixelSize(R.styleable.WaterMarkView_water_mark_dx, WaterMarkManager.INFO != null ? WaterMarkManager.INFO.getDx() : 100);
+ mDy = typedArray.getDimensionPixelSize(R.styleable.WaterMarkView_water_mark_dy, WaterMarkManager.INFO != null ? WaterMarkManager.INFO.getDy() : 240);
+ int align = typedArray.getInt(R.styleable.WaterMarkView_water_mark_align, WaterMarkManager.INFO != null ? WaterMarkManager.INFO.getAlignInt() : 1);
+ mAlign = align == 0 ? Paint.Align.LEFT : align == 2 ? Paint.Align.RIGHT : Paint.Align.CENTER;
+ mSync = typedArray.getBoolean(R.styleable.WaterMarkView_water_mark_sync, true);
+ typedArray.recycle();
+
+ setBackgroundColor(Color.TRANSPARENT);
+ mTextPaint.setAntiAlias(true);
+ mTextPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
+ mTextPaint.setColor(mTextColor);
+ mTextPaint.setTextSize(mTextSize);
+ mTextPaint.setTypeface(mTextBold ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
+ mTextPaint.setTextAlign(mAlign);
+
+ mText = mText == null && mSync ? WaterMarkManager.CONTENT : mText;
+
+ textWidth = 0;
+ textHeight = 0;
+ if (mText != null && mText.length > 0) {
+ for (String s : mText) {
+ Rect tvRect = new Rect();
+ mTextPaint.getTextBounds(s, 0, s.length(), tvRect);
+ textWidth = textWidth > tvRect.width() ? textWidth : tvRect.width();
+ textHeight += (tvRect.height() + 10);
+ }
+ }
+
+ if (mSync) {
+ WaterMarkManager.LIST.add(this);
+ }
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+
+ if (mText != null && mText.length > 0) {
+ int measuredWidth = getMeasuredWidth();
+ int measuredHeight = getMeasuredHeight();
+
+ if (measuredWidth == 0 || measuredHeight == 0) {
+ return;
+ }
+
+ int canvasLength = measuredWidth > measuredHeight ? measuredWidth : measuredHeight;
+
+ canvas.save();
+ canvas.rotate(mDegrees, measuredWidth / 2, measuredHeight / 2);
+
+ canvas.save();
+ int y = 0;
+ boolean odd = true;
+ while (y < canvasLength + textHeight) {
+ int x = odd ? 0 : -(textWidth + mDx) / 2;
+ while (x < canvasLength + textWidth) {
+ drawTexts(mText, mTextPaint, canvas, x, y);
+ x = x + textWidth + mDx;
+ }
+ y = y + textHeight + mDy;
+ odd = !odd;
+ }
+ canvas.restore();
+ }
+ }
+
+ private void drawTexts(String[] ss, Paint paint, Canvas canvas, int x, int y) {
+ Paint.FontMetrics fontMetrics = paint.getFontMetrics();
+ float top = fontMetrics.top;
+ float bottom = fontMetrics.bottom;
+ int length = ss.length;
+ float total = (length - 1) * (bottom - top) + (fontMetrics.descent - fontMetrics.ascent);
+ float offset = total / 2 - bottom;
+ for (int i = 0; i < length; i++) {
+ float yAxis = -(length - i - 1) * (bottom - top) + offset;
+ canvas.drawText(ss[i], x, y + yAxis + 10, paint);
+ }
+ }
+
+ /**
+ * 设置水印文字内容
+ *
+ * @param text 文字内容
+ */
+ public void setText(String... text) {
+ mText = text;
+
+ textWidth = 0;
+ textHeight = 0;
+ if (mText != null && mText.length > 0) {
+ for (String s : mText) {
+ Rect tvRect = new Rect();
+ mTextPaint.getTextBounds(s, 0, s.length(), tvRect);
+ textWidth = textWidth > tvRect.width() ? textWidth : tvRect.width();
+ textHeight += (tvRect.height() + 10);
+ }
+ }
+ postInvalidate();
+ }
+
+ /**
+ * 同步设置水印文字内容
+ *
+ * @param text 文字内容
+ */
+ void setSyncText(String... text) {
+ if (mSync) {
+ setText(text);
+ }
+ }
+
+ /**
+ * 设置水印倾斜角度
+ *
+ * @param degrees 倾斜角度(默认:-30)
+ */
+ public void setDegrees(int degrees) {
+ mDegrees = degrees;
+ postInvalidate();
+ }
+
+ /**
+ * 同步设置水印倾斜角度
+ *
+ * @param degrees 倾斜角度(默认:-30)
+ */
+ void setSyncDegrees(int degrees) {
+ if (mSync) {
+ setDegrees(degrees);
+ }
+ }
+
+ /**
+ * 设置水印字体颜色
+ *
+ * @param textColor 字体颜色(默认:#33000000)
+ */
+ public void setTextColor(int textColor) {
+ mTextColor = textColor;
+ mTextPaint.setColor(mTextColor);
+ postInvalidate();
+ }
+
+ /**
+ * 同步设置水印字体颜色
+ *
+ * @param textColor 字体颜色(默认:#33000000)
+ */
+ void setSyncTextColor(int textColor) {
+ if (mSync) {
+ setTextColor(textColor);
+ }
+ }
+
+ /**
+ * 设置水印字体大小(单位:px)
+ *
+ * @param textSize 字体大小(默认:42px)
+ */
+ public void setTextSize(int textSize) {
+ mTextSize = textSize;
+ mTextPaint.setTextSize(mTextSize);
+ postInvalidate();
+ }
+
+ /**
+ * 同步设置水印字体大小(单位:px)
+ *
+ * @param textSize 字体大小(默认:42px)
+ */
+ void setSyncTextSize(int textSize) {
+ if (mSync) {
+ setTextSize(textSize);
+ }
+ }
+
+ /**
+ * 设置水印字体是否粗体
+ *
+ * @param textBold 是否粗体(默认:false)
+ */
+ public void setTextBold(boolean textBold) {
+ mTextBold = textBold;
+ mTextPaint.setTypeface(mTextBold ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
+ postInvalidate();
+ }
+
+ /**
+ * 同步设置水印字体是否粗体
+ *
+ * @param textBold 是否粗体(默认:false)
+ */
+ void setSyncTextBold(boolean textBold) {
+ if (mSync) {
+ setTextBold(textBold);
+ }
+ }
+
+ /**
+ * 设置水印X轴偏移量(单位:px)
+ *
+ * @param dx X轴偏移量(默认:100px)
+ */
+ public void setDx(int dx) {
+ this.mDx = dx;
+ postInvalidate();
+ }
+
+ /**
+ * 同步设置水印X轴偏移量(单位:px)
+ *
+ * @param dx X轴偏移量(默认:100px)
+ */
+ void setSyncDx(int dx) {
+ if (mSync) {
+ setDx(dx);
+ }
+ }
+
+ /**
+ * 设置水印Y轴偏移量(单位:px)
+ *
+ * @param dy Y轴偏移量(默认:240px)
+ */
+ public void setDy(int dy) {
+ this.mDy = dy;
+ postInvalidate();
+ }
+
+ /**
+ * 同步设置水印Y轴偏移量(单位:px)
+ *
+ * @param dy Y轴偏移量(默认:240px)
+ */
+ void setSignDy(int dy) {
+ if (mSync) {
+ setDy(dy);
+ }
+ }
+
+ /**
+ * 设置水印对齐方式
+ *
+ * @param align 对齐方式(默认:Center)
+ */
+ public void setAlign(Paint.Align align) {
+ this.mAlign = align;
+ postInvalidate();
+ }
+
+ /**
+ * 同步设置水印对齐方式
+ *
+ * @param align 对齐方式(默认:Center)
+ */
+ void setSignAlign(Paint.Align align) {
+ if (mSync) {
+ setAlign(align);
+ }
+ }
+
+ /**
+ * 销毁相关页面时调用(切记)
+ */
+ public void onDestroy() {
+ if (mSync) {
+ WaterMarkManager.LIST.remove(this);
+ }
+ }
+
+ @Override
+ public boolean dispatchTouchEvent(MotionEvent event) {
+ return false;
+ }
+
+ @SuppressLint("ClickableViewAccessibility")
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_10_ccc_bg.xml b/app/src/main/res/drawable/all_10_ccc_bg.xml
new file mode 100644
index 0000000..757b52d
--- /dev/null
+++ b/app/src/main/res/drawable/all_10_ccc_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_15_fff_bg.xml b/app/src/main/res/drawable/all_15_fff_bg.xml
new file mode 100644
index 0000000..f1400b6
--- /dev/null
+++ b/app/src/main/res/drawable/all_15_fff_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_2_4b8e01_bg.xml b/app/src/main/res/drawable/all_2_4b8e01_bg.xml
new file mode 100644
index 0000000..257761d
--- /dev/null
+++ b/app/src/main/res/drawable/all_2_4b8e01_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_2_de7900_bg.xml b/app/src/main/res/drawable/all_2_de7900_bg.xml
new file mode 100644
index 0000000..29c0007
--- /dev/null
+++ b/app/src/main/res/drawable/all_2_de7900_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_2_selected_bg.xml b/app/src/main/res/drawable/all_2_selected_bg.xml
new file mode 100644
index 0000000..352767f
--- /dev/null
+++ b/app/src/main/res/drawable/all_2_selected_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_3_ccc_bg.xml b/app/src/main/res/drawable/all_3_ccc_bg.xml
new file mode 100644
index 0000000..a4e3f93
--- /dev/null
+++ b/app/src/main/res/drawable/all_3_ccc_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_7_4b8e01_bg.xml b/app/src/main/res/drawable/all_7_4b8e01_bg.xml
new file mode 100644
index 0000000..3a05311
--- /dev/null
+++ b/app/src/main/res/drawable/all_7_4b8e01_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_7_999_border_bg.xml b/app/src/main/res/drawable/all_7_999_border_bg.xml
new file mode 100644
index 0000000..b45947a
--- /dev/null
+++ b/app/src/main/res/drawable/all_7_999_border_bg.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_7_999_bottom_border_bg.xml b/app/src/main/res/drawable/all_7_999_bottom_border_bg.xml
new file mode 100644
index 0000000..bfae86a
--- /dev/null
+++ b/app/src/main/res/drawable/all_7_999_bottom_border_bg.xml
@@ -0,0 +1,14 @@
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_7_de7900_bg.xml b/app/src/main/res/drawable/all_7_de7900_bg.xml
new file mode 100644
index 0000000..f5329ff
--- /dev/null
+++ b/app/src/main/res/drawable/all_7_de7900_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_7_fff_bg.xml b/app/src/main/res/drawable/all_7_fff_bg.xml
new file mode 100644
index 0000000..65ffac7
--- /dev/null
+++ b/app/src/main/res/drawable/all_7_fff_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_7_line_ccc_bg.xml b/app/src/main/res/drawable/all_7_line_ccc_bg.xml
new file mode 100644
index 0000000..f7fd2cb
--- /dev/null
+++ b/app/src/main/res/drawable/all_7_line_ccc_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/all_7_main_bg.xml b/app/src/main/res/drawable/all_7_main_bg.xml
new file mode 100644
index 0000000..5375343
--- /dev/null
+++ b/app/src/main/res/drawable/all_7_main_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/b6f7e9_10_bg.xml b/app/src/main/res/drawable/b6f7e9_10_bg.xml
new file mode 100644
index 0000000..1eb82cf
--- /dev/null
+++ b/app/src/main/res/drawable/b6f7e9_10_bg.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/border_f7933b_6_bg.xml b/app/src/main/res/drawable/border_f7933b_6_bg.xml
new file mode 100644
index 0000000..388e126
--- /dev/null
+++ b/app/src/main/res/drawable/border_f7933b_6_bg.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/f7eab6_10_bg.xml b/app/src/main/res/drawable/f7eab6_10_bg.xml
new file mode 100644
index 0000000..92f9fcd
--- /dev/null
+++ b/app/src/main/res/drawable/f7eab6_10_bg.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/f7f7f7_top_20_bg.xml b/app/src/main/res/drawable/f7f7f7_top_20_bg.xml
new file mode 100644
index 0000000..e1d5880
--- /dev/null
+++ b/app/src/main/res/drawable/f7f7f7_top_20_bg.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/f9e2e2_10_bg.xml b/app/src/main/res/drawable/f9e2e2_10_bg.xml
new file mode 100644
index 0000000..7934d05
--- /dev/null
+++ b/app/src/main/res/drawable/f9e2e2_10_bg.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/fbe5ca_10_bg.xml b/app/src/main/res/drawable/fbe5ca_10_bg.xml
new file mode 100644
index 0000000..cab79ef
--- /dev/null
+++ b/app/src/main/res/drawable/fbe5ca_10_bg.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/right_7_052eba_bg.xml b/app/src/main/res/drawable/right_7_052eba_bg.xml
new file mode 100644
index 0000000..f3f0ed4
--- /dev/null
+++ b/app/src/main/res/drawable/right_7_052eba_bg.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/top_10_f7_bg.xml b/app/src/main/res/drawable/top_10_f7_bg.xml
new file mode 100644
index 0000000..1939c23
--- /dev/null
+++ b/app/src/main/res/drawable/top_10_f7_bg.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/white_round_bg.xml b/app/src/main/res/drawable/white_round_bg.xml
new file mode 100644
index 0000000..522eb16
--- /dev/null
+++ b/app/src/main/res/drawable/white_round_bg.xml
@@ -0,0 +1,5 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/white_top_20_bg.xml b/app/src/main/res/drawable/white_top_20_bg.xml
new file mode 100644
index 0000000..14a189b
--- /dev/null
+++ b/app/src/main/res/drawable/white_top_20_bg.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_apply.xml b/app/src/main/res/layout/activity_apply.xml
new file mode 100644
index 0000000..88483e0
--- /dev/null
+++ b/app/src/main/res/layout/activity_apply.xml
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_apply_detail.xml b/app/src/main/res/layout/activity_apply_detail.xml
new file mode 100644
index 0000000..fdd58eb
--- /dev/null
+++ b/app/src/main/res/layout/activity_apply_detail.xml
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_data.xml b/app/src/main/res/layout/activity_data.xml
new file mode 100644
index 0000000..889e8d2
--- /dev/null
+++ b/app/src/main/res/layout/activity_data.xml
@@ -0,0 +1,365 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_key_person_detail.xml b/app/src/main/res/layout/activity_key_person_detail.xml
new file mode 100644
index 0000000..c70034f
--- /dev/null
+++ b/app/src/main/res/layout/activity_key_person_detail.xml
@@ -0,0 +1,896 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..9c29cf4
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,154 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_police_emergency_detail.xml b/app/src/main/res/layout/activity_police_emergency_detail.xml
new file mode 100644
index 0000000..3d59080
--- /dev/null
+++ b/app/src/main/res/layout/activity_police_emergency_detail.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_query_apply_result.xml b/app/src/main/res/layout/activity_query_apply_result.xml
new file mode 100644
index 0000000..6d3515c
--- /dev/null
+++ b/app/src/main/res/layout/activity_query_apply_result.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/dialog_dept_selector.xml b/app/src/main/res/layout/dialog_dept_selector.xml
new file mode 100644
index 0000000..ff86b68
--- /dev/null
+++ b/app/src/main/res/layout/dialog_dept_selector.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/dialog_selector.xml b/app/src/main/res/layout/dialog_selector.xml
new file mode 100644
index 0000000..b1e9c58
--- /dev/null
+++ b/app/src/main/res/layout/dialog_selector.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/dropdown_layout.xml b/app/src/main/res/layout/dropdown_layout.xml
new file mode 100644
index 0000000..118fcd8
--- /dev/null
+++ b/app/src/main/res/layout/dropdown_layout.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/dropdown_layout2.xml b/app/src/main/res/layout/dropdown_layout2.xml
new file mode 100644
index 0000000..6cee519
--- /dev/null
+++ b/app/src/main/res/layout/dropdown_layout2.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/dropdown_layout3.xml b/app/src/main/res/layout/dropdown_layout3.xml
new file mode 100644
index 0000000..bdac730
--- /dev/null
+++ b/app/src/main/res/layout/dropdown_layout3.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/dropdown_layout4.xml b/app/src/main/res/layout/dropdown_layout4.xml
new file mode 100644
index 0000000..a9fdb37
--- /dev/null
+++ b/app/src/main/res/layout/dropdown_layout4.xml
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/dropdown_layout5.xml b/app/src/main/res/layout/dropdown_layout5.xml
new file mode 100644
index 0000000..7148c5c
--- /dev/null
+++ b/app/src/main/res/layout/dropdown_layout5.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_chat.xml b/app/src/main/res/layout/fragment_chat.xml
new file mode 100644
index 0000000..5b258e7
--- /dev/null
+++ b/app/src/main/res/layout/fragment_chat.xml
@@ -0,0 +1,16 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml
new file mode 100644
index 0000000..30459d1
--- /dev/null
+++ b/app/src/main/res/layout/fragment_home.xml
@@ -0,0 +1,289 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_mine.xml b/app/src/main/res/layout/fragment_mine.xml
new file mode 100644
index 0000000..cb0c584
--- /dev/null
+++ b/app/src/main/res/layout/fragment_mine.xml
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/include_police_emergency_detail_apply_info.xml b/app/src/main/res/layout/include_police_emergency_detail_apply_info.xml
new file mode 100644
index 0000000..9ff26d4
--- /dev/null
+++ b/app/src/main/res/layout/include_police_emergency_detail_apply_info.xml
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/include_police_emergency_detail_base_info.xml b/app/src/main/res/layout/include_police_emergency_detail_base_info.xml
new file mode 100644
index 0000000..f9e7a60
--- /dev/null
+++ b/app/src/main/res/layout/include_police_emergency_detail_base_info.xml
@@ -0,0 +1,273 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/include_police_emergency_detail_cjya_info.xml b/app/src/main/res/layout/include_police_emergency_detail_cjya_info.xml
new file mode 100644
index 0000000..3d59f1e
--- /dev/null
+++ b/app/src/main/res/layout/include_police_emergency_detail_cjya_info.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/include_police_emergency_detail_person_info.xml b/app/src/main/res/layout/include_police_emergency_detail_person_info.xml
new file mode 100644
index 0000000..0d95c8a
--- /dev/null
+++ b/app/src/main/res/layout/include_police_emergency_detail_person_info.xml
@@ -0,0 +1,268 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/include_police_emergency_detail_query_info.xml b/app/src/main/res/layout/include_police_emergency_detail_query_info.xml
new file mode 100644
index 0000000..ef1a27b
--- /dev/null
+++ b/app/src/main/res/layout/include_police_emergency_detail_query_info.xml
@@ -0,0 +1,154 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_apply_fragment_1.xml b/app/src/main/res/layout/item_apply_fragment_1.xml
new file mode 100644
index 0000000..c30c755
--- /dev/null
+++ b/app/src/main/res/layout/item_apply_fragment_1.xml
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/item_apply_fragment_2.xml b/app/src/main/res/layout/item_apply_fragment_2.xml
new file mode 100644
index 0000000..aae3f12
--- /dev/null
+++ b/app/src/main/res/layout/item_apply_fragment_2.xml
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/item_dialog_selector.xml b/app/src/main/res/layout/item_dialog_selector.xml
new file mode 100644
index 0000000..333cafa
--- /dev/null
+++ b/app/src/main/res/layout/item_dialog_selector.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/item_key_person.xml b/app/src/main/res/layout/item_key_person.xml
new file mode 100644
index 0000000..f0158ab
--- /dev/null
+++ b/app/src/main/res/layout/item_key_person.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_mine_apply.xml b/app/src/main/res/layout/item_mine_apply.xml
new file mode 100644
index 0000000..693fd53
--- /dev/null
+++ b/app/src/main/res/layout/item_mine_apply.xml
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_police_emergency.xml b/app/src/main/res/layout/item_police_emergency.xml
new file mode 100644
index 0000000..f00b7e4
--- /dev/null
+++ b/app/src/main/res/layout/item_police_emergency.xml
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_select_dept.xml b/app/src/main/res/layout/item_select_dept.xml
new file mode 100644
index 0000000..80e1c6b
--- /dev/null
+++ b/app/src/main/res/layout/item_select_dept.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_water_mark.xml b/app/src/main/res/layout/view_water_mark.xml
new file mode 100644
index 0000000..d3fd223
--- /dev/null
+++ b/app/src/main/res/layout/view_water_mark.xml
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-xxhdpi/back.png b/app/src/main/res/mipmap-xxhdpi/back.png
new file mode 100644
index 0000000..76e3e82
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/back.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/baojing.png b/app/src/main/res/mipmap-xxhdpi/baojing.png
new file mode 100644
index 0000000..67744fa
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/baojing.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..33a38f7
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_14.png b/app/src/main/res/mipmap-xxhdpi/icon_14.png
new file mode 100644
index 0000000..9bbeb49
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_14.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_aj.png b/app/src/main/res/mipmap-xxhdpi/icon_aj.png
new file mode 100644
index 0000000..fd0087f
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_aj.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_apply_detail_query.png b/app/src/main/res/mipmap-xxhdpi/icon_apply_detail_query.png
new file mode 100644
index 0000000..5fcffc7
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_apply_detail_query.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_chat_normal.png b/app/src/main/res/mipmap-xxhdpi/icon_chat_normal.png
new file mode 100644
index 0000000..75e6845
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_chat_normal.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_chat_selected.png b/app/src/main/res/mipmap-xxhdpi/icon_chat_selected.png
new file mode 100644
index 0000000..71975d0
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_chat_selected.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_czya.png b/app/src/main/res/mipmap-xxhdpi/icon_czya.png
new file mode 100644
index 0000000..7d551f6
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_czya.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_down_sanjiao.png b/app/src/main/res/mipmap-xxhdpi/icon_down_sanjiao.png
new file mode 100644
index 0000000..9ba30d7
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_down_sanjiao.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_fnsq.png b/app/src/main/res/mipmap-xxhdpi/icon_fnsq.png
new file mode 100644
index 0000000..9907126
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_fnsq.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_home_normal.png b/app/src/main/res/mipmap-xxhdpi/icon_home_normal.png
new file mode 100644
index 0000000..eb3283e
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_home_normal.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_home_selected.png b/app/src/main/res/mipmap-xxhdpi/icon_home_selected.png
new file mode 100644
index 0000000..cd3b6ab
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_home_selected.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_jq.png b/app/src/main/res/mipmap-xxhdpi/icon_jq.png
new file mode 100644
index 0000000..574c4a2
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_jq.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_jq_normal.png b/app/src/main/res/mipmap-xxhdpi/icon_jq_normal.png
new file mode 100644
index 0000000..e38aef1
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_jq_normal.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_jq_selected.png b/app/src/main/res/mipmap-xxhdpi/icon_jq_selected.png
new file mode 100644
index 0000000..9dd0f49
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_jq_selected.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_main_bg.png b/app/src/main/res/mipmap-xxhdpi/icon_main_bg.png
new file mode 100644
index 0000000..7037d46
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_main_bg.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_personal_normal.png b/app/src/main/res/mipmap-xxhdpi/icon_personal_normal.png
new file mode 100644
index 0000000..21c6a21
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_personal_normal.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_personal_selected.png b/app/src/main/res/mipmap-xxhdpi/icon_personal_selected.png
new file mode 100644
index 0000000..b4c7781
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_personal_selected.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_query.png b/app/src/main/res/mipmap-xxhdpi/icon_query.png
new file mode 100644
index 0000000..a0bbb03
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_query.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_right_sanjiao.png b/app/src/main/res/mipmap-xxhdpi/icon_right_sanjiao.png
new file mode 100644
index 0000000..678deb7
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_right_sanjiao.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_selected.png b/app/src/main/res/mipmap-xxhdpi/icon_selected.png
new file mode 100644
index 0000000..192e6a9
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_selected.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_sjtc.png b/app/src/main/res/mipmap-xxhdpi/icon_sjtc.png
new file mode 100644
index 0000000..517870c
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_sjtc.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_unselected.png b/app/src/main/res/mipmap-xxhdpi/icon_unselected.png
new file mode 100644
index 0000000..185a316
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_unselected.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_wdfn.png b/app/src/main/res/mipmap-xxhdpi/icon_wdfn.png
new file mode 100644
index 0000000..d7d5c69
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_wdfn.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_xjxc.png b/app/src/main/res/mipmap-xxhdpi/icon_xjxc.png
new file mode 100644
index 0000000..88a5f8b
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_xjxc.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_xssp.png b/app/src/main/res/mipmap-xxhdpi/icon_xssp.png
new file mode 100644
index 0000000..cc5b549
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_xssp.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_ycyj.png b/app/src/main/res/mipmap-xxhdpi/icon_ycyj.png
new file mode 100644
index 0000000..50aa931
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_ycyj.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_yj.png b/app/src/main/res/mipmap-xxhdpi/icon_yj.png
new file mode 100644
index 0000000..787abd5
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_yj.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/icon_yq.png b/app/src/main/res/mipmap-xxhdpi/icon_yq.png
new file mode 100644
index 0000000..eabed04
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/icon_yq.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/jaintou.png b/app/src/main/res/mipmap-xxhdpi/jaintou.png
new file mode 100644
index 0000000..a4aa741
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/jaintou.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/key_person_icon_normal.png b/app/src/main/res/mipmap-xxhdpi/key_person_icon_normal.png
new file mode 100644
index 0000000..eeb1ae8
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/key_person_icon_normal.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/key_person_icon_selected.png b/app/src/main/res/mipmap-xxhdpi/key_person_icon_selected.png
new file mode 100644
index 0000000..978ed73
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/key_person_icon_selected.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/person.png b/app/src/main/res/mipmap-xxhdpi/person.png
new file mode 100644
index 0000000..5221eb2
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/person.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/photo.png b/app/src/main/res/mipmap-xxhdpi/photo.png
new file mode 100644
index 0000000..a60bd5c
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/photo.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/search.png b/app/src/main/res/mipmap-xxhdpi/search.png
new file mode 100644
index 0000000..f767573
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/search.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/wenjianjia.png b/app/src/main/res/mipmap-xxhdpi/wenjianjia.png
new file mode 100644
index 0000000..5b31629
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/wenjianjia.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/wenjianjia_icon.png b/app/src/main/res/mipmap-xxhdpi/wenjianjia_icon.png
new file mode 100644
index 0000000..0b8183d
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/wenjianjia_icon.png differ
diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml
new file mode 100644
index 0000000..fa379dd
--- /dev/null
+++ b/app/src/main/res/values-night/themes.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
new file mode 100644
index 0000000..05a0ec9
--- /dev/null
+++ b/app/src/main/res/values/attrs.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..c759ae0
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,26 @@
+
+
+ #1E78ED
+ #1E78ED
+ #1E78ED
+ #1E78ED
+ #A7A7A7
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+ #E8EBF2
+ #F9E2E2
+ #999999
+ #FBE5CA
+ #F7EAB6
+ #666
+ #33052EBA
+ #333
+ #F7933B
+ #B6F7E9
+ #052EBA
+ #00000000
+ #9E9Fa1
+ #55cccccc
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..7b1d337
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ 吉林公安警务实战协同系统
+
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
new file mode 100644
index 0000000..fa379dd
--- /dev/null
+++ b/app/src/main/res/values/themes.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/backup_rules.xml b/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 0000000..fa0f996
--- /dev/null
+++ b/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,13 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml
new file mode 100644
index 0000000..9ee9997
--- /dev/null
+++ b/app/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml
new file mode 100644
index 0000000..f18e1f0
--- /dev/null
+++ b/app/src/main/res/xml/network_security_config.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/base/.gitignore b/base/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/base/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/base/build.gradle b/base/build.gradle
new file mode 100644
index 0000000..27a4457
--- /dev/null
+++ b/base/build.gradle
@@ -0,0 +1,32 @@
+plugins {
+ alias(libs.plugins.androidLibrary)
+}
+
+android {
+ namespace 'com.police.base'
+ compileSdk 34
+
+ defaultConfig {
+ minSdk 24
+ consumerProguardFiles "consumer-rules.pro"
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+}
+
+dependencies {
+
+ implementation libs.appcompat
+ implementation libs.material
+ testImplementation libs.junit
+ androidTestImplementation libs.ext.junit
+ androidTestImplementation libs.espresso.core
+}
\ No newline at end of file
diff --git a/base/src/main/AndroidManifest.xml b/base/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..a5918e6
--- /dev/null
+++ b/base/src/main/AndroidManifest.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/base/src/main/java/com/police/base/App.java b/base/src/main/java/com/police/base/App.java
new file mode 100644
index 0000000..14fef5e
--- /dev/null
+++ b/base/src/main/java/com/police/base/App.java
@@ -0,0 +1,26 @@
+package com.police.base;
+
+import android.app.Application;
+import android.os.Handler;
+
+public class App extends Application {
+
+ public static Handler handler;
+ private static App app;
+ public boolean findAddress;
+
+ @Override
+ public void onCreate() {
+ app = this;
+ super.onCreate();
+ handler = new Handler();
+ }
+
+ public static App getApp() {
+ return app;
+ }
+
+ public static Handler getHandler() {
+ return handler;
+ }
+}
diff --git a/base/src/main/java/com/police/base/BaseActivity.java b/base/src/main/java/com/police/base/BaseActivity.java
new file mode 100644
index 0000000..3623944
--- /dev/null
+++ b/base/src/main/java/com/police/base/BaseActivity.java
@@ -0,0 +1,15 @@
+package com.police.base;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.os.PersistableBundle;
+
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+
+public class BaseActivity extends AppCompatActivity {
+ @Override
+ public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) {
+ super.onCreate(savedInstanceState, persistentState);
+ }
+}
diff --git a/base/src/main/java/com/police/base/BaseFragment.java b/base/src/main/java/com/police/base/BaseFragment.java
new file mode 100644
index 0000000..5b23a06
--- /dev/null
+++ b/base/src/main/java/com/police/base/BaseFragment.java
@@ -0,0 +1,6 @@
+package com.police.base;
+
+import androidx.fragment.app.Fragment;
+
+public class BaseFragment extends Fragment {
+}
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..b82031c
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,5 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+plugins {
+alias(libs.plugins.androidApplication) apply false
+ alias(libs.plugins.androidLibrary) apply false
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..4b29016
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,22 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. For more details, visit
+# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true
+android.enableJetifier=true
\ No newline at end of file
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
new file mode 100644
index 0000000..3c1b698
--- /dev/null
+++ b/gradle/libs.versions.toml
@@ -0,0 +1,23 @@
+[versions]
+agp = "8.3.0"
+junit = "4.13.2"
+junitVersion = "1.1.5"
+espressoCore = "3.5.1"
+appcompat = "1.6.1"
+material = "1.10.0"
+activity = "1.8.0"
+constraintlayout = "2.1.4"
+
+[libraries]
+junit = { group = "junit", name = "junit", version.ref = "junit" }
+ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
+espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
+appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
+material = { group = "com.google.android.material", name = "material", version.ref = "material" }
+activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
+constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
+
+[plugins]
+androidApplication = { id = "com.android.application", version.ref = "agp" }
+androidLibrary = { id = "com.android.library", version.ref = "agp" }
+
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..e708b1c
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..152ac3b
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Sun Apr 28 21:16:47 CST 2024
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000..4f906e0
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,185 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..107acd3
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/network/.gitignore b/network/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/network/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/network/build.gradle b/network/build.gradle
new file mode 100644
index 0000000..ffcaecf
--- /dev/null
+++ b/network/build.gradle
@@ -0,0 +1,35 @@
+plugins {
+ alias(libs.plugins.androidLibrary)
+}
+
+android {
+ namespace 'com.police.network'
+ compileSdk 34
+
+ defaultConfig {
+ minSdk 24
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles "consumer-rules.pro"
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+}
+
+dependencies {
+ implementation libs.appcompat
+ implementation libs.material
+ implementation 'com.squareup.okhttp3:okhttp:4.8.1' // OkHttp库
+ implementation 'com.squareup.retrofit2:converter-gson:2.9.0' // 如果你使用 Gson 进行 JSON 转换
+ implementation 'com.squareup.okhttp3:logging-interceptor:4.7.2'
+ implementation project(':base')
+}
\ No newline at end of file
diff --git a/network/src/main/AndroidManifest.xml b/network/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..a5918e6
--- /dev/null
+++ b/network/src/main/AndroidManifest.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/network/src/main/java/com/police/network/BaseRequestClient.java b/network/src/main/java/com/police/network/BaseRequestClient.java
new file mode 100644
index 0000000..466af4b
--- /dev/null
+++ b/network/src/main/java/com/police/network/BaseRequestClient.java
@@ -0,0 +1,244 @@
+package com.police.network;
+
+import static com.police.network.UaCredentialApi.PARAMS_KEY_UA_APP_CREDENTIAL;
+import static com.police.network.UaCredentialApi.PARAMS_KEY_UA_RET_CODE;
+import static com.police.network.UaCredentialApi.PARAMS_KEY_UA_RET_SUCCESS;
+import static com.police.network.UaCredentialApi.PARAMS_KEY_UA_USER_CREDENTIAL;
+
+import android.net.Uri;
+import android.os.Bundle;
+import android.util.Log;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+import com.police.base.App;
+import com.police.network.model.ResourceList;
+import com.police.network.model.UserCredential;
+import com.police.network.requestparams.RequestParams;
+import com.police.network.requestparams.ResponseParams;
+
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
+
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.MediaType;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
+import okhttp3.logging.HttpLoggingInterceptor;
+
+public class BaseRequestClient {
+ private final String TAG = "BaseRequestClient";
+ private OkHttpClient okHttpClient;
+ private FindAddressCallback callback;
+
+ public interface FindAddressCallback {
+ void success();
+ }
+
+ /*
+
+ */
+ private void call(String url, RequestParams params, Callback callback) {
+ try {
+ RequestBody body = RequestBody.create(new Gson().toJson(params), MediaType.parse("application/json; charset=utf-8"));
+ Request request = new Request.Builder()
+ .url(url)
+ .post(body)
+ .addHeader("userCredential", URLEncoder.encode(Constants.USER_CREDENTIAL, "UTF-8"))
+ .addHeader("appCredential", URLEncoder.encode(Constants.APP_CREDENTIAL, "UTF-8"))
+ .build();
+ okHttpClient.newCall(request).enqueue(callback);
+ } catch (Exception e) {
+ Log.e(TAG, e.toString());
+ }
+
+ }
+
+ public void init(FindAddressCallback callback) {
+ this.callback = callback;
+ HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();
+ loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY); // 设置日志级别,例如打印请求和响应的body
+ okHttpClient = new OkHttpClient.Builder()
+ .addInterceptor(loggingInterceptor) // 添加日志拦截器
+ .callTimeout(30, TimeUnit.SECONDS)
+ .connectTimeout(30, TimeUnit.SECONDS)
+ .build();
+ //获取接口需要用到的凭证
+ getInterface();
+ }
+
+ //获取接口需要用到的凭证
+ private void getInterface() {
+ Uri uri = Uri.parse("content://com.ydjw.ua.getCredential");
+ Bundle params = new Bundle();
+ String paramsMessageId = UUID.randomUUID().toString();
+ //构建参数
+ params.putString("messageId", paramsMessageId);//消息id
+ params.putString("version", "1");//接口版本号,当前为1
+ params.putString("appId", Constants.APP_ID);//
+ params.putString("orgId", Constants.ORG_ID);//
+ params.putString("networkAreaCode", "3");//
+ params.putString("packageName", "com.police.policedatasystem");//应用包名,可空
+ //获取票据
+ Bundle bundle = App.getApp().getContentResolver().call(uri, "", null, params);
+ //解析结果
+ if (bundle == null) {
+ toastTip("获取应用凭证失败,bundle为空!");
+ return;
+ }
+ String messageId = bundle.getString("messageId");
+ if (paramsMessageId.equals(messageId)) {
+ int resultCode = bundle.getInt(PARAMS_KEY_UA_RET_CODE);
+ if (PARAMS_KEY_UA_RET_SUCCESS == resultCode) {
+ Constants.APP_CREDENTIAL = bundle.getString(PARAMS_KEY_UA_APP_CREDENTIAL);
+ Constants.USER_CREDENTIAL = bundle.getString(PARAMS_KEY_UA_USER_CREDENTIAL);
+ Constants.setUserId(new Gson().fromJson(Constants.USER_CREDENTIAL, UserCredential.class).getCredential().getLoad().getUserInfo().getJh());
+ Constants.setSFZH(new Gson().fromJson(Constants.USER_CREDENTIAL, UserCredential.class).getCredential().getLoad().getUserInfo().getSfzh());
+ Constants.setORG_ID(new Gson().fromJson(Constants.USER_CREDENTIAL, UserCredential.class).getCredential().getLoad().getUserInfo().getOrgId());
+ Constants.XM = new Gson().fromJson(Constants.USER_CREDENTIAL, UserCredential.class).getCredential().getLoad().getUserInfo().getXm();
+ //根据票据寻址
+ findAddress();
+ } else {
+ toastTip(bundle.getString("message") + ",resultCode:" + resultCode);
+ }
+ } else {
+ toastTip("获取应用凭证失败,messageId不一致!");
+ }
+ }
+
+ //第二步,寻址
+ private void findAddress() {
+ Thread thread = new Thread(() -> {
+ // 在这里执行耗时任务
+ Uri uri = Uri.parse("content://com.ydjw.rsb.getResourceAddress");
+ Bundle bundle = new Bundle();
+ String paramsMessageId = UUID.randomUUID().toString();
+ bundle.putString("appCredential", Constants.APP_CREDENTIAL);//应用凭证,由上一步获得
+ bundle.putString("userCredential", Constants.USER_CREDENTIAL);//用户凭证,由上一步获得
+ bundle.putString("version", "1");//服务总线接口版本号,当前为1
+ bundle.putString("messageId", paramsMessageId);//消息 ID
+ Bundle callBack = App.getApp().getContentResolver().call(uri, "", null, bundle);
+ if (callBack == null) {
+ toastTip("获取应用资源地址失败,bundle为空");
+ return;
+ }
+ String messageId = callBack.getString("messageId");
+ String resourceList = callBack.getString("resourceList");
+ if (paramsMessageId.equals(messageId)) {
+ int resultCode = callBack.getInt("resultCode");
+ if (resultCode == 0) {
+ if (resourceList == null || resourceList.isEmpty()) {
+ toastTip("寻址失败,resourceList为空!");
+ return;
+ }
+ List resourceLists = new Gson().fromJson(resourceList, new TypeToken>() {
+ }.getType());
+ for (ResourceList item : resourceLists) {
+ Constants.resourceListsMap.put(item.getResourceId(), item);
+ }
+ //2.发起请求,获取重点人数据
+ if (callback != null) {
+ callback.success();
+ App.getApp().findAddress = true;
+ }
+ } else {
+ if (resourceList == null || resourceList.isEmpty()) {
+ toastTip("寻址失败,错误码:" + resultCode);
+ }
+ }
+ }
+ });
+ thread.start();
+ }
+
+
+ /**
+ * 基类封装
+ */
+ public void request(String urlKey, String jsonParams, CustomCallBack callBack) {
+ ResourceList resourceList = Constants.resourceListsMap.get(urlKey);
+ if (resourceList == null) {
+ return;
+ }
+ RequestParams.Parameter parameter = getParameter(urlKey, jsonParams);
+ RequestParams requestParams = new RequestParams();
+ requestParams.setMessageId(UUID.randomUUID().toString());
+ requestParams.setVersion("1.0");
+ requestParams.setParameter(parameter);
+ call(resourceList.getResourceAddress(), requestParams, new Callback() {
+ @Override
+ public void onFailure(@NonNull Call call, @NonNull IOException e) {
+ // 请求失败
+ App.getHandler().post(() -> callBack.onError(call, e));
+ }
+
+ @Override
+ public void onResponse(@NonNull Call call, @NonNull Response response) {
+ if (!response.isSuccessful()) {
+ App.getHandler().post(() -> callBack.onError(call, new IOException("Unexpected code " + response)));
+ return;
+ }
+ try {
+ // 请求成功,处理响应数据
+ if (response.body() == null) {
+ App.getHandler().post(() -> callBack.onError(call, new Exception("服务器返回数据异常")));
+ return;
+ }
+ String responseBody = response.body().string();
+ ResponseParams responseParams = new Gson().fromJson(responseBody, ResponseParams.class);
+ if (!"200".equals(responseParams.getCode())) {
+ App.getHandler().post(() -> callBack.onError(call, new Exception("服务器出错,请联系开发人员或稍后重试!")));
+ return;
+ }
+ if (responseParams.getData().getDataList() == null || responseParams.getData().getDataList().isEmpty()) {
+ App.getHandler().post(() -> callBack.onError(call, new Exception("服务器返回数据异常")));
+ return;
+ }
+ ResponseParams.FieldData fieldData = responseParams.getData().getDataList().get(0);
+ if (fieldData.getFieldValues() == null || fieldData.getFieldValues().isEmpty()) {
+ App.getHandler().post(() -> callBack.onError(call, new Exception("服务器返回数据异常")));
+ return;
+ }
+ App.getHandler().post(() -> callBack.onSuccess(fieldData.getFieldValues().get(0).getValue()));
+ } catch (Exception e) {
+ App.getHandler().post(() -> callBack.onError(call, e));
+ }
+ }
+ });
+ }
+
+ private void toastTip(String string) {
+ Toast.makeText(App.getApp(), string, Toast.LENGTH_LONG).show();
+ }
+
+ @NonNull
+ private static RequestParams.Parameter getParameter(String urlKey, String jsonParams) {
+ RequestParams.Condition condition = new RequestParams.Condition();
+ condition.setLogicalOperate("and");
+ RequestParams.KeyValues keyValues = new RequestParams.KeyValues();
+ keyValues.setKey("injson");
+ keyValues.setValue(jsonParams);
+ List keyValuesList = new ArrayList<>();
+ keyValuesList.add(keyValues);
+ condition.setKeyValueList(keyValuesList);
+ RequestParams.Parameter parameter = new RequestParams.Parameter();
+ parameter.setCondition(condition);
+ parameter.setPage(new RequestParams.Page());
+ parameter.setFields("outjson");
+ parameter.setNetworkCode("3");
+ parameter.setOrderBy(null);
+ parameter.setRegionalismCode(Constants.ORG_ID);
+ parameter.setDataObjId(urlKey);
+ return parameter;
+ }
+}
\ No newline at end of file
diff --git a/network/src/main/java/com/police/network/Constants.java b/network/src/main/java/com/police/network/Constants.java
new file mode 100644
index 0000000..59e0565
--- /dev/null
+++ b/network/src/main/java/com/police/network/Constants.java
@@ -0,0 +1,99 @@
+package com.police.network;
+
+
+import com.police.network.model.ResourceList;
+
+import java.util.HashMap;
+
+public final class Constants {
+ /**
+ * 根据警员编号重点人员信息列表
+ */
+ public static final String KEY_PERSON_ID = "220000000000-3-0100-103cab8edd784a688ac3c41476454a3a";
+ /**
+ * 根据组织机构查询辖区重点人
+ */
+ public static final String ORG_KEY_PERSON_ID = "220000000000-3-0100-2faa9acfe614420c8a0c74dbf257d963";
+ /**
+ * 重点人员信息详情
+ */
+ public static final String KEY_PERSON_DETAIL_ID = "220000000000-3-0100-e589d230e71942a3b87f2e050fbd2058";
+ /**
+ * 警情列表
+ */
+ public static final String POLICE_EMERGENCY_ID = "220000000000-3-0100-013e30a83e854b1badc23dd31e7dcfec";
+ /**
+ * 警情详情
+ */
+ public static final String POLICE_EMERGENCY_DETAIL_ID = "220000000000-3-0100-25a416bd99ef4cd19a523715b9612fa1";
+ /**
+ * 重点人消息数量统计
+ */
+ public static final String KEY_PERSON_MESSAGE_COUNT_ID = "220000000000-3-0100-d29a1ec21b9e44dab6e69a26598b8b8e";
+ /**
+ * 申请事由类型获取
+ */
+ public static final String APPLY_TYPE_ID = "220000000000-3-0100-d6893e7ffbf04078817c7fd1b3a6b38b";
+ /**
+ * 申请事由发起申请赋能
+ */
+ public static final String APPLY_COMMIT_ID = "220000000000-3-0100-2271052a92e14a0b952790e97d0f6457";
+ /**
+ * 赋能列表查询
+ */
+ public static final String MINE_LIST_ID = "220000000000-3-0100-1558d4e5f1f149989b67f988fc7cb291";
+ /**
+ * 赋能详情查询
+ */
+ public static final String MINE_DETAIL_ID = "220000000000-3-0100-8c3e36bb5bdb4ee8b55b4ad0c4a83d13";
+ /**
+ * 自助查询
+ */
+ public static final String SELF_QUERY_ID = "220000000000-3-0100-dec70ae1354e4281b6eeced50dc2a7be";
+ /**
+ * 组织机构id
+ */
+ public static final String ORG_ID = "220000000000";
+ /**
+ * 重点人员信息id
+ */
+ public static final String APP_ID = "220000000000-3-1-71d6313523574202bb1f9984b6d95254";
+ public static String APP_CREDENTIAL = "";
+ public static String USER_CREDENTIAL = "";
+ /**
+ * 当前用户警员编号
+ */
+ public static String USER_ID = "100307"; /**
+ * 当前用户警员编号
+ */
+ public static String XM = "100307";
+ /**
+ * 当前用户身份证号
+ */
+ public static String SFZH = "220183197210264653";
+
+ public static void setUserId(String str) {
+// USER_ID = str;
+ }
+
+ public static void setSFZH(String str) {
+// SFZH = str;
+ }
+
+ public static void setORG_ID(String str) {
+// USER_ORG_ID = str;
+ }
+
+ /**
+ * 当前用户警员组织代码
+ */
+ public static String USER_ORG_ID = "220183210000";//22018421000//220106290000
+ /**
+ * 寻址后得到的数据-接口列表
+ */
+ public static final HashMap resourceListsMap = new HashMap<>();
+ /**
+ * 请求分页数据数量
+ */
+ public static int PAGE_SIZE = 10;
+}
\ No newline at end of file
diff --git a/network/src/main/java/com/police/network/CustomCallBack.java b/network/src/main/java/com/police/network/CustomCallBack.java
new file mode 100644
index 0000000..16b4f39
--- /dev/null
+++ b/network/src/main/java/com/police/network/CustomCallBack.java
@@ -0,0 +1,12 @@
+package com.police.network;
+
+import androidx.annotation.NonNull;
+
+import okhttp3.Call;
+
+public abstract class CustomCallBack {
+ public abstract void onError(Call call, @NonNull Exception e);
+
+ public abstract void onSuccess(T value);
+
+}
diff --git a/network/src/main/java/com/police/network/UaCredentialApi.java b/network/src/main/java/com/police/network/UaCredentialApi.java
new file mode 100644
index 0000000..a6543b0
--- /dev/null
+++ b/network/src/main/java/com/police/network/UaCredentialApi.java
@@ -0,0 +1,307 @@
+package com.police.network;
+
+import android.app.Activity;
+import android.content.ActivityNotFoundException;
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.PackageManager;
+import android.content.pm.ProviderInfo;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Bundle;
+import android.text.TextUtils;
+
+import com.police.network.model.ThirdAppInfo;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+public class UaCredentialApi {
+
+
+ /**********************************************以下是统一认证登录时使用的参数字段常量定义*************************************************************/
+
+ /**
+ * 统一认证登录接口(统一认证客户端(UAAC)提供)
+ */
+ public static final String PROVIDER_URI_GET_CREDENTIAL = "content://com.ydjw.ua.getCredential";
+
+ public static final String PARAMS_KEY_UA_VERSION_VALUE = "1";
+
+ public static final String PARAMS_KEY_UA_MESSAGE_ID = "messageId";
+
+ public static final String PARAMS_KEY_UA_VERSION = "version";
+
+ public static final String PARAMS_KEY_UA_APP_ID = "appId";
+
+ public static final String PARAMS_KEY_UA_ORG_ID = "orgId";
+
+ public static final String PARAMS_KEY_UA_NETWORK_AREA_CODE = "networkAreaCode";
+
+ public static final String PARAMS_KEY_UA_PACKAGE_NAME = "packageName";
+
+ public static final String PARAMS_KEY_UA_RET_CODE = "resultCode";
+
+ public static final String PARAMS_KEY_UA_RET_MESSAGE = "message";
+
+ public static final String PARAMS_KEY_THIRD_APP_INFO = "third_app_info";
+
+ public static final int PARAMS_KEY_UA_RET_SUCCESS = 0;
+
+ public static final int PARAMS_KEY_UA_RET_ERROR_PARAMS = -3;
+
+ public static final int PARAMS_KEY_UA_RET_ERROR_NOT_EXISTS = -5;
+
+ public static final int CREDENTIAL_CLIENT_NOT_INSTALLED = -7;
+
+ public static final int PARAMS_KEY_UA_RET_ERROR_OTHER = -99;
+
+ public static final String PARAMS_KEY_UA_APP_CREDENTIAL = "appCredential";
+
+ public static final String PARAMS_KEY_UA_USER_CREDENTIAL = "userCredential";
+
+ public static final String ACTION_SUFFIX_UA_LOGIN = ".ACTION_LOGIN";
+
+ public static final String ACTION_UA_LOGOUT = "com.ydjw.ua.ACTION_LOGOUT";
+
+ /**********************************************以下是统一认证登录时使用的参数字段常量定义*************************************************************/
+
+ private boolean notExists = false;
+
+ public CredentialReqCallBack credentialReqCallBack;
+
+ private String mMessageId;
+
+ private Context mContext;
+ private String version = UaCredentialApi.PARAMS_KEY_UA_VERSION_VALUE;
+ private String appId;
+ private String orgId;
+ private String networkAreaCode;
+
+
+ private static Map packageActivityMap = new HashMap<>();
+
+ /**
+ * 统一认证应用包名(历史原因,统一认证单点登录功能存在多个客户端)
+ */
+ private static String uaacPackageName;
+
+ /**
+ * 统一认证启动Activity类名
+ */
+ private static String uaacLoginActivityName;
+
+ static {
+ //新版统一认证
+ packageActivityMap.put("com.xdja.uaac", "com.xdja.uaac.ui.InitActivity");
+ //旧版统一认证
+ packageActivityMap.put("com.xdja.unifyauthorize", "com.xdja.unifyauthorize.activity.LoginActivity");
+ //安全接入融合版
+ packageActivityMap.put("com.xdja.safeclient", "com.xdja.safeclient.frame.SplashActivity");
+ //警信内部集成的旧版统一认证
+ packageActivityMap.put("com.xdja.jxclient", "com.xdja.unifyauthorize.activity.LoginActivity");
+ }
+
+ public UaCredentialApi(Builder builder) {
+ this.mContext = builder.mContext;
+ this.version = builder.version;
+ this.appId = builder.appId;
+ this.orgId = builder.orgId;
+ this.networkAreaCode = builder.networkAreaCode;
+ }
+
+ public static class Builder {
+ protected Context mContext;
+ protected String version;
+ protected String appId;
+ protected String orgId;
+ protected String networkAreaCode;
+
+ public Builder(Context context) {
+ this.mContext = context;
+ }
+
+ public Builder setAppId(String appId) {
+ this.appId = appId;
+ return this;
+ }
+
+ public Builder setVersion(String version) {
+ this.version = version;
+ return this;
+ }
+
+ public Builder setOrgId(String orgId) {
+ this.orgId = orgId;
+ return this;
+ }
+
+ public Builder setNetworkAreaCode(String networkAreaCode) {
+ this.networkAreaCode = networkAreaCode;
+ return this;
+ }
+
+ public UaCredentialApi build() {
+ return new UaCredentialApi(this);
+ }
+ }
+
+ public void reqCredential(CredentialReqCallBack reqCallBack) {
+ this.credentialReqCallBack = reqCallBack;
+
+ IntentFilter intentFilter = new IntentFilter();
+ String pkgName = mContext.getPackageName();
+ /**添加登录成功事件监听
+ * 当第一次登录,调用【IF-UA-SDK-01】接口可能返回"票据不存在",此时需要注册监听此事件,
+ * 当登录成功后,接收到此事件即可重新调用【IF-UA-SDK-01】获取相关票据
+ * */
+ intentFilter.addAction(pkgName + ACTION_SUFFIX_UA_LOGIN);
+
+ /**增加登出事件监听
+ * 当UA主动账户退出时会发送该事件,此时已经登录应用可以根据自身业务实施退出
+ * */
+ intentFilter.addAction(pkgName + ACTION_UA_LOGOUT);
+ mContext.registerReceiver(uaLoginInReceiver, intentFilter);
+ loginUaForCredential(mContext);
+ }
+
+ public void release() {
+ notExists = false;
+ if (uaLoginInReceiver == null) {
+ return;
+ }
+ mContext.unregisterReceiver(uaLoginInReceiver);
+ }
+
+ private BroadcastReceiver uaLoginInReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String action = intent.getAction();
+ if (TextUtils.isEmpty(action)) {
+ return;
+ }
+
+ if (action.contains(ACTION_SUFFIX_UA_LOGIN) && notExists) {
+ loginUaForCredential(mContext);
+ }
+ }
+ };
+
+ /**
+ * 【步骤1:IF-UA-SDK-01】获取凭证信息
+ *
调用此接口获取用户凭证和应用凭证
+ *
如用户已登录 UA客户端,则直接向应用返回凭证信息
+ *
如未登录,待登录完成后将通过广播的形式向应用发送用户登录成功广播,此时可以监听广播重新获取凭证信息
+ */
+ private void loginUaForCredential(Context context) {
+
+ if (!isCredentialProviderExist(context)) {
+ credentialReqCallBack.onCredentialCallBack(CREDENTIAL_CLIENT_NOT_INSTALLED, "未找到UA客户端", "", "");
+ return;
+ }
+
+ notExists = false;
+ String messageId = UUID.randomUUID().toString().replace("-","");
+ mMessageId = messageId;
+ Uri uri = Uri.parse(PROVIDER_URI_GET_CREDENTIAL);
+ ContentResolver resolver = context.getContentResolver();
+ Bundle params = new Bundle();
+
+ String packageName = context.getPackageName();
+ params.putString(PARAMS_KEY_UA_MESSAGE_ID, messageId);
+ params.putString(PARAMS_KEY_UA_VERSION, version);
+ params.putString(PARAMS_KEY_UA_APP_ID, appId);
+ params.putString(PARAMS_KEY_UA_ORG_ID, orgId);
+ params.putString(PARAMS_KEY_UA_NETWORK_AREA_CODE, networkAreaCode);
+ params.putString(PARAMS_KEY_UA_PACKAGE_NAME, packageName);
+
+ try {
+ Bundle result = resolver.call(uri, "", null, params);
+ if (result == null) {
+ credentialReqCallBack.onCredentialCallBack(PARAMS_KEY_UA_RET_ERROR_OTHER, "获取应用凭证失败,bundle为空", "", "");
+ return;
+ }
+ String messageIdRet = result.getString(PARAMS_KEY_UA_MESSAGE_ID);
+ if (!mMessageId.equals(messageIdRet)) {
+ credentialReqCallBack.onCredentialCallBack(PARAMS_KEY_UA_RET_ERROR_OTHER, "获取应用凭证失败,messageId不对应", "", "");
+ return;
+ }
+
+ receiveCredential(result);
+ } catch (ActivityNotFoundException activityNotFoundException) {
+ activityNotFoundException.printStackTrace();
+ receiveCredentialError(null, activityNotFoundException);
+ } catch (Exception e) {
+ e.printStackTrace();
+ receiveCredentialError(null, e);
+ }
+ }
+
+ private void receiveCredentialError(Bundle result, Exception e) {
+ credentialReqCallBack.onCredentialCallBack(PARAMS_KEY_UA_RET_ERROR_OTHER, "调用UA客户端获取凭证接口异常:" + (e == null ? "" : e.getMessage()), "", "");
+ }
+
+ /**
+ * 【步骤I:IF-UA-SDK-01】处理获取凭证结果
+ *
+ * @param result
+ */
+ private void receiveCredential(Bundle result) {
+
+ int resultCode = result.getInt(PARAMS_KEY_UA_RET_CODE);
+ if (PARAMS_KEY_UA_RET_SUCCESS == resultCode) {
+ String appCredential = result.getString(PARAMS_KEY_UA_APP_CREDENTIAL);
+ String userCredential = result.getString(PARAMS_KEY_UA_USER_CREDENTIAL);
+ credentialReqCallBack.onCredentialCallBack(resultCode, "", userCredential, appCredential);
+ return;
+ }
+
+ if (PARAMS_KEY_UA_RET_ERROR_NOT_EXISTS == resultCode) {
+ notExists = true;
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
+ Intent intent = new Intent();
+ intent.setClassName(uaacPackageName, uaacLoginActivityName);
+ final ThirdAppInfo thirdAppInfo = new ThirdAppInfo();
+ thirdAppInfo.setMessageId(result.getString(PARAMS_KEY_UA_MESSAGE_ID));
+ thirdAppInfo.setPackageName(mContext.getPackageName());
+ thirdAppInfo.setAppId(appId);
+ thirdAppInfo.setOrgId(orgId);
+ thirdAppInfo.setNetworkAreaCode(networkAreaCode);
+ thirdAppInfo.setVersion(version);
+ intent.putExtra(PARAMS_KEY_THIRD_APP_INFO, thirdAppInfo);
+ if (!(mContext instanceof Activity)) {
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ }
+ mContext.startActivity(intent);
+ }
+ return;
+ }
+
+ String message = result.getString(PARAMS_KEY_UA_RET_MESSAGE);
+ credentialReqCallBack.onCredentialCallBack(resultCode, message, "", "");
+ }
+
+ /**
+ * 判断凭证Provider是否存在,如果存在获取Provider所在应用的包名
+ */
+ private static boolean isCredentialProviderExist(Context context) {
+ PackageManager packageManager = context.getPackageManager();
+ ProviderInfo providerInfo = packageManager.resolveContentProvider(Uri.parse(PROVIDER_URI_GET_CREDENTIAL).getAuthority(), PackageManager.GET_META_DATA);
+ if (providerInfo == null) {
+ return false;
+ } else {
+ uaacPackageName = providerInfo.applicationInfo.packageName;
+ uaacLoginActivityName = packageActivityMap.get(uaacPackageName);
+ return true;
+ }
+ }
+
+ public interface CredentialReqCallBack {
+ void onCredentialCallBack(int resultCode, String message, String userCredential, String appCredential);
+ }
+
+}
diff --git a/network/src/main/java/com/police/network/model/ResourceList.java b/network/src/main/java/com/police/network/model/ResourceList.java
new file mode 100644
index 0000000..25097eb
--- /dev/null
+++ b/network/src/main/java/com/police/network/model/ResourceList.java
@@ -0,0 +1,42 @@
+package com.police.network.model;
+
+import java.io.Serializable;
+
+public class ResourceList implements Serializable {
+ private String resourceRegionalismCode;
+ private String resourceAddress;
+ private String resourceId;
+ private String resourceServiceType;
+
+ public String getResourceRegionalismCode() {
+ return resourceRegionalismCode;
+ }
+
+ public void setResourceRegionalismCode(String resourceRegionalismCode) {
+ this.resourceRegionalismCode = resourceRegionalismCode;
+ }
+
+ public String getResourceAddress() {
+ return resourceAddress;
+ }
+
+ public void setResourceAddress(String resourceAddress) {
+ this.resourceAddress = resourceAddress;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getResourceServiceType() {
+ return resourceServiceType;
+ }
+
+ public void setResourceServiceType(String resourceServiceType) {
+ this.resourceServiceType = resourceServiceType;
+ }
+}
diff --git a/network/src/main/java/com/police/network/model/ThirdAppInfo.java b/network/src/main/java/com/police/network/model/ThirdAppInfo.java
new file mode 100644
index 0000000..1821816
--- /dev/null
+++ b/network/src/main/java/com/police/network/model/ThirdAppInfo.java
@@ -0,0 +1,65 @@
+package com.police.network.model;
+
+import java.io.Serializable;
+
+public class ThirdAppInfo implements Serializable {
+ private String messageId;
+
+ private String packageName;
+
+ private String appId;
+
+ private String orgId;
+
+ private String networkAreaCode;
+
+ private String version;
+
+ public String getPackageName() {
+ return packageName;
+ }
+
+ public void setPackageName(String packageName) {
+ this.packageName = packageName;
+ }
+
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getAppId() {
+ return appId;
+ }
+
+ public void setAppId(String appId) {
+ this.appId = appId;
+ }
+
+ public String getOrgId() {
+ return orgId;
+ }
+
+ public void setOrgId(String orgId) {
+ this.orgId = orgId;
+ }
+
+ public String getNetworkAreaCode() {
+ return networkAreaCode;
+ }
+
+ public void setNetworkAreaCode(String networkAreaCode) {
+ this.networkAreaCode = networkAreaCode;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+}
diff --git a/network/src/main/java/com/police/network/model/UserCredential.java b/network/src/main/java/com/police/network/model/UserCredential.java
new file mode 100644
index 0000000..20d5d37
--- /dev/null
+++ b/network/src/main/java/com/police/network/model/UserCredential.java
@@ -0,0 +1,174 @@
+package com.police.network.model;
+
+import java.io.Serializable;
+
+/**
+ * {
+ * "credential":{
+ * "head":{
+ * "credType":"1",
+ * "duration":{
+ * "endTime":"1709387466556",
+ * "startTime":"1709380266556"
+ * },
+ * "token":{
+ * "orgId":"220000000000",
+ * "tokenId":"ff8080818bc29187018dff00ea3d33fb"
+ * },
+ * "version":"1.0"
+ * },
+ * "load":{
+ * "userInfo":{
+ * "jh":"106686",
+ * "orgId":"220100410000",
+ * "sfzh":"220105198602152031",
+ * "userId":"162add958ea344f68d07b6ad2c4b17a7",
+ * "xm":"路瑶"
+ * }
+ * },
+ * "serverSign":{
+ * "alg":"SM3+SM2",
+ * "signature":"2WIjCJ/+94XmtIei2+/8eV40dxfvQGqV4ws7WDA5iNPc//zeZTFNewibqa8OSKprWq2P6mnWHMkVPYP+Qdl7Huc0qHJMVFUovF+mqtO5pSxrngem5kXmVK9v1NV7OMurPpa1FiQc1uU0A4Zae4ZrpynM2+qEck/D8KSvLvsKkCQ\u003d",
+ * "sn":"b11000000000bdc",
+ * "url":"http://192.168.24.108:8080"
+ * }
+ * }
+ * }
+ */
+public class UserCredential implements Serializable {
+ private Credential credential;
+
+ public Credential getCredential() {
+ return credential;
+ }
+
+ public void setCredential(Credential credential) {
+ this.credential = credential;
+ }
+
+ public static class Credential implements Serializable {
+ private Head head;
+ private Load load;
+ private ServerSign serverSign;
+
+ public Head getHead() {
+ return head;
+ }
+
+ public void setHead(Head head) {
+ this.head = head;
+ }
+
+ public Load getLoad() {
+ return load;
+ }
+
+ public void setLoad(Load load) {
+ this.load = load;
+ }
+
+ public ServerSign getServerSign() {
+ return serverSign;
+ }
+
+ public void setServerSign(ServerSign serverSign) {
+ this.serverSign = serverSign;
+ }
+ }
+
+ public static class Head implements Serializable{
+ private Head head;
+ private Load load;
+ private ServerSign serverSign;
+
+ public Head getHead() {
+ return head;
+ }
+
+ public void setHead(Head head) {
+ this.head = head;
+ }
+
+ public Load getLoad() {
+ return load;
+ }
+
+ public void setLoad(Load load) {
+ this.load = load;
+ }
+
+ public ServerSign getServerSign() {
+ return serverSign;
+ }
+
+ public void setServerSign(ServerSign serverSign) {
+ this.serverSign = serverSign;
+ }
+ }
+
+ public static class Load implements Serializable {
+ private UserInfo userInfo;
+
+ public UserInfo getUserInfo() {
+ return userInfo;
+ }
+
+ public void setUserInfo(UserInfo userInfo) {
+ this.userInfo = userInfo;
+ }
+ }
+
+ public static class ServerSign {
+ private Head head;
+ private Load load;
+ private ServerSign serverSign;
+ }
+
+ public static class UserInfo implements Serializable {
+ String jh;//"jh":"106686",
+ String orgId;//"orgId":"220100410000",
+ String sfzh;//"sfzh":"220105198602152031",
+ String userId;//"userId":"162add958ea344f68d07b6ad2c4b17a7",
+ String xm;//"xm":"路瑶"
+
+ public String getJh() {
+ return jh;
+ }
+
+ public void setJh(String jh) {
+ this.jh = jh;
+ }
+
+ public String getOrgId() {
+ return orgId;
+ }
+
+ public void setOrgId(String orgId) {
+ this.orgId = orgId;
+ }
+
+ public String getSfzh() {
+ return sfzh;
+ }
+
+ public void setSfzh(String sfzh) {
+ this.sfzh = sfzh;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ public String getXm() {
+ return xm;
+ }
+
+ public void setXm(String xm) {
+ this.xm = xm;
+ }
+ }
+}
diff --git a/network/src/main/java/com/police/network/requestparams/GetKeyPersonDetailParams.java b/network/src/main/java/com/police/network/requestparams/GetKeyPersonDetailParams.java
new file mode 100644
index 0000000..8847580
--- /dev/null
+++ b/network/src/main/java/com/police/network/requestparams/GetKeyPersonDetailParams.java
@@ -0,0 +1,45 @@
+package com.police.network.requestparams;
+
+import java.io.Serializable;
+
+/**
+ * {"dept" : "220521950000","messageId":"12","version":"1.0"
+ */
+public class GetKeyPersonDetailParams implements Serializable {
+ private String sfzh="222304195909250034";
+ private String messageId;
+ private String version;
+ private String sfhm;
+
+ public String getSfhm() {
+ return sfhm;
+ }
+
+ public void setSfhm(String sfhm) {
+ this.sfhm = sfhm;
+ }
+
+ public String getSfzh() {
+ return sfzh;
+ }
+
+ public void setSfzh(String sfzh) {
+ this.sfzh = sfzh;
+ }
+
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+}
diff --git a/network/src/main/java/com/police/network/requestparams/GetKeyPersonListParams.java b/network/src/main/java/com/police/network/requestparams/GetKeyPersonListParams.java
new file mode 100644
index 0000000..5d34e91
--- /dev/null
+++ b/network/src/main/java/com/police/network/requestparams/GetKeyPersonListParams.java
@@ -0,0 +1,89 @@
+package com.police.network.requestparams;
+
+import java.io.Serializable;
+
+/**
+ * {"jybh" : "840364","messageId":"12","version":"1.0"
+ */
+public class GetKeyPersonListParams implements Serializable {
+ private String jybh;//警员编号
+ private String xm = "";//姓名
+ private String sfzh = "";//身份证号
+ private String messageId;
+ private String version;
+ private String pageNum;
+ private String pageSize;
+ private String sfhm;//当前用户的身份号码
+
+ public String getSfhm() {
+ return sfhm;
+ }
+
+ public void setSfhm(String sfhm) {
+ this.sfhm = sfhm;
+ }
+
+ public String getPageNum() {
+ return pageNum;
+ }
+
+ public void setPageNum(String pageNum) {
+ this.pageNum = pageNum;
+ }
+
+ public String getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(String pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ 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 GetKeyPersonListParams(String jybh) {
+ this.jybh = jybh;
+ }
+
+ public GetKeyPersonListParams() {
+ this.jybh = jybh;
+ }
+
+ public String getJybh() {
+ return jybh;
+ }
+
+ public void setJybh(String jybh) {
+ this.jybh = jybh;
+ }
+
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+}
diff --git a/network/src/main/java/com/police/network/requestparams/GetKeyPersonMessageCountParams.java b/network/src/main/java/com/police/network/requestparams/GetKeyPersonMessageCountParams.java
new file mode 100644
index 0000000..a3dec57
--- /dev/null
+++ b/network/src/main/java/com/police/network/requestparams/GetKeyPersonMessageCountParams.java
@@ -0,0 +1,80 @@
+package com.police.network.requestparams;
+
+import java.io.Serializable;
+
+/**
+ * {"jybh" : "840364","messageId":"12","version":"1.0"
+ */
+public class GetKeyPersonMessageCountParams implements Serializable {
+ private String jybh;//警员编号
+ private String sfhm = "";//身份证号
+ private String dept = "";//组织机构
+ private String messageId;
+ private String version;
+ private String pageNum;
+ private String pageSize;
+
+ public String getSfhm() {
+ return sfhm;
+ }
+
+ public void setSfhm(String sfhm) {
+ this.sfhm = sfhm;
+ }
+
+ public String getPageNum() {
+ return pageNum;
+ }
+
+ public void setPageNum(String pageNum) {
+ this.pageNum = pageNum;
+ }
+
+ public String getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(String pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ public GetKeyPersonMessageCountParams(String jybh) {
+ this.jybh = jybh;
+ }
+
+ public GetKeyPersonMessageCountParams() {
+ this.jybh = jybh;
+ }
+
+ public String getJybh() {
+ return jybh;
+ }
+
+ public String getDept() {
+ return dept;
+ }
+
+ public void setDept(String dept) {
+ this.dept = dept;
+ }
+
+ public void setJybh(String jybh) {
+ this.jybh = jybh;
+ }
+
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+}
diff --git a/network/src/main/java/com/police/network/requestparams/GetOrgKeyPersonListParams.java b/network/src/main/java/com/police/network/requestparams/GetOrgKeyPersonListParams.java
new file mode 100644
index 0000000..9eaf2ad
--- /dev/null
+++ b/network/src/main/java/com/police/network/requestparams/GetOrgKeyPersonListParams.java
@@ -0,0 +1,81 @@
+package com.police.network.requestparams;
+
+import java.io.Serializable;
+
+/**
+ * {"dept" : "220521950000","messageId":"12","version":"1.0"
+ */
+public class GetOrgKeyPersonListParams implements Serializable {
+ private String dept;
+ private String xm;
+ private String sfzh;
+ private String messageId;
+ private String version;
+ private String pageNum;
+ private String pageSize;
+ private String sfhm;
+
+ public String getSfhm() {
+ return sfhm;
+ }
+
+ public void setSfhm(String sfhm) {
+ this.sfhm = sfhm;
+ }
+
+ public String getPageNum() {
+ return pageNum;
+ }
+
+ public void setPageNum(String pageNum) {
+ this.pageNum = pageNum;
+ }
+
+ public String getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(String pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ 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 getDept() {
+ return dept;
+ }
+
+ public void setDept(String dept) {
+ this.dept = dept;
+ }
+
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+}
diff --git a/network/src/main/java/com/police/network/requestparams/GetPoliceEmergencyDetailParams.java b/network/src/main/java/com/police/network/requestparams/GetPoliceEmergencyDetailParams.java
new file mode 100644
index 0000000..692c6b9
--- /dev/null
+++ b/network/src/main/java/com/police/network/requestparams/GetPoliceEmergencyDetailParams.java
@@ -0,0 +1,45 @@
+package com.police.network.requestparams;
+
+import java.io.Serializable;
+
+/**
+ * {"dept" : "220521950000","messageId":"12","version":"1.0"
+ */
+public class GetPoliceEmergencyDetailParams implements Serializable {
+ private String jcjbh="222304195909250034";
+ private String messageId;
+ private String version;
+ private String sfhm;
+
+ public String getSfhm() {
+ return sfhm;
+ }
+
+ public void setSfhm(String sfhm) {
+ this.sfhm = sfhm;
+ }
+
+ public String getJcjbh() {
+ return jcjbh;
+ }
+
+ public void setJcjbh(String jcjbh) {
+ this.jcjbh = jcjbh;
+ }
+
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+}
diff --git a/network/src/main/java/com/police/network/requestparams/GetPoliceEmergencyListParams.java b/network/src/main/java/com/police/network/requestparams/GetPoliceEmergencyListParams.java
new file mode 100644
index 0000000..67b592b
--- /dev/null
+++ b/network/src/main/java/com/police/network/requestparams/GetPoliceEmergencyListParams.java
@@ -0,0 +1,81 @@
+package com.police.network.requestparams;
+
+import java.io.Serializable;
+
+/**
+ * {"jybh" : "840364","messageId":"12","version":"1.0"
+ */
+public class GetPoliceEmergencyListParams implements Serializable {
+ private String sfhm;
+ private String bjjyqk = "";//报警内容
+ private String jcjbh = "";//警情编号
+ private String bjrlxdh = "";//报警电话
+ private String messageId;
+ private String version;
+ private String pageNum;
+ private String pageSize;
+
+ public String getPageNum() {
+ return pageNum;
+ }
+
+ public void setPageNum(String pageNum) {
+ this.pageNum = pageNum;
+ }
+
+ public String getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(String pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ public String getSfhm() {
+ return sfhm;
+ }
+
+ public void setSfhm(String sfhm) {
+ this.sfhm = sfhm;
+ }
+
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getBjjyqk() {
+ return bjjyqk;
+ }
+
+ public void setBjjyqk(String bjjyqk) {
+ this.bjjyqk = bjjyqk;
+ }
+
+ public String getJcjbh() {
+ return jcjbh;
+ }
+
+ public void setJcjbh(String jcjbh) {
+ this.jcjbh = jcjbh;
+ }
+
+ public String getBjrlxdh() {
+ return bjrlxdh;
+ }
+
+ public void setBjrlxdh(String bjrlxdh) {
+ this.bjrlxdh = bjrlxdh;
+ }
+}
diff --git a/network/src/main/java/com/police/network/requestparams/RequestParams.java b/network/src/main/java/com/police/network/requestparams/RequestParams.java
new file mode 100644
index 0000000..0a68499
--- /dev/null
+++ b/network/src/main/java/com/police/network/requestparams/RequestParams.java
@@ -0,0 +1,156 @@
+package com.police.network.requestparams;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class RequestParams implements Serializable {
+ private String messageId;//自定义唯一值,建议 UUID.randomUUID().toString()
+ private String version;//服务总线版本号,目前填写 1.0 即可
+ private Parameter parameter;//结构体中参数释义如下
+
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public Parameter getParameter() {
+ return parameter;
+ }
+
+ public void setParameter(Parameter parameter) {
+ this.parameter = parameter;
+ }
+
+ public static class Page {
+ public int pageSize = 1;
+ public int pageNo = 1;
+ }
+
+ public static class Parameter implements Serializable {
+ private Condition condition;//(条件)结构体释义如下
+ private String dataObjId; //应用商店注册对应的资源 id
+ private String fields;//后台约定字段,可咨询后台开发人员
+ private String networkCode;//网络类型,应用商店注册对应的网络类型
+ private String orderBy;//排序字段,可空
+ private Page page;//页码信息,非空
+ private String regionalismCode; //区域代码 应用商店注册 app 对应的区域代码
+
+ public Condition getCondition() {
+ return condition;
+ }
+
+ public void setCondition(Condition condition) {
+ this.condition = condition;
+ }
+
+ public String getDataObjId() {
+ return dataObjId;
+ }
+
+ public void setDataObjId(String dataObjId) {
+ this.dataObjId = dataObjId;
+ }
+
+ public String getFields() {
+ return fields;
+ }
+
+ public void setFields(String fields) {
+ this.fields = fields;
+ }
+
+ public String getNetworkCode() {
+ return networkCode;
+ }
+
+ public void setNetworkCode(String networkCode) {
+ this.networkCode = networkCode;
+ }
+
+ public String getOrderBy() {
+ return orderBy;
+ }
+
+ public void setOrderBy(String orderBy) {
+ this.orderBy = orderBy;
+ }
+
+ public Page getPage() {
+ return page;
+ }
+
+ public void setPage(Page page) {
+ this.page = page;
+ }
+
+ public String getRegionalismCode() {
+ return regionalismCode;
+ }
+
+ public void setRegionalismCode(String regionalismCode) {
+ this.regionalismCode = regionalismCode;
+ }
+ }
+
+ public static class Condition implements Serializable {
+ private String logicalOperate = "and";//操作符,传值 and
+ private List keyValueList;//集合,里面装的键值对,字段解释如下
+
+ public String getLogicalOperate() {
+ return logicalOperate;
+ }
+
+ public void setLogicalOperate(String logicalOperate) {
+ this.logicalOperate = logicalOperate;
+ }
+
+ public List getKeyValueList() {
+ return keyValueList;
+ }
+
+ public void setKeyValueList(List keyValueList) {
+ this.keyValueList = keyValueList;
+ }
+ }
+
+ public static class KeyValues implements Serializable {
+ private String key;//跟后台约定,你想放在服务总线接口里面入参的 key
+ private String value;//自己后台接口需要的入参实际值,可放自己接口需要的 json 值
+ private String relationOperator = "=";//关系符 传=
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String getRelationOperator() {
+ return relationOperator;
+ }
+
+ public void setRelationOperator(String relationOperator) {
+ this.relationOperator = relationOperator;
+ }
+ }
+}
diff --git a/network/src/main/java/com/police/network/requestparams/ResponseParams.java b/network/src/main/java/com/police/network/requestparams/ResponseParams.java
new file mode 100644
index 0000000..3111c99
--- /dev/null
+++ b/network/src/main/java/com/police/network/requestparams/ResponseParams.java
@@ -0,0 +1,96 @@
+package com.police.network.requestparams;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class ResponseParams implements Serializable {
+ String messageId;//自定义唯一值,建议 UUID.randomUUID().toString()
+ String message;//
+ String version;//服务总线版本号,目前填写 1.0 即可
+ String code;//结构体中参数释义如下
+ Data data;
+ public String getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public Data getData() {
+ return data;
+ }
+
+ public void setData(Data data) {
+ this.data = data;
+ }
+
+ public static class Data implements Serializable {
+ private List dataList;//(条件)结构体释义如下
+
+ public List getDataList() {
+ return dataList;
+ }
+
+ public void setDataList(List dataList) {
+ this.dataList = dataList;
+ }
+ }
+
+ public static class FieldData implements Serializable {
+ private List fieldValues;
+
+ public List getFieldValues() {
+ return fieldValues;
+ }
+
+ public void setFieldValues(List fieldValues) {
+ this.fieldValues = fieldValues;
+ }
+ }
+
+ public static class FieldValues implements Serializable {
+ private String field;
+ private String value;
+
+ public String getField() {
+ return field;
+ }
+
+ public void setField(String field) {
+ this.field = field;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..50d4955
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,43 @@
+pluginManagement {
+ repositories {
+ maven { url "https://maven.aliyun.com/nexus/content/groups/public/" }
+ mavenCentral()
+ maven { url "https://jitpack.io" }
+ maven { url 'https://maven.aliyun.com/repository/releases' }
+ maven { url 'https://maven.aliyun.com/repository/jcenter' }
+ maven { url 'https://maven.aliyun.com/repository/google' }
+ maven { url 'https://maven.aliyun.com/repository/central' }
+ maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
+ maven { url 'https://maven.aliyun.com/repository/public' }
+ gradlePluginPortal()
+ google {
+ content {
+ includeGroupByRegex("com\\.android.*")
+ includeGroupByRegex("com\\.google.*")
+ includeGroupByRegex("androidx.*")
+ }
+ }
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ maven { url "https://maven.aliyun.com/nexus/content/groups/public/" }
+ mavenCentral()
+ maven { url "https://jitpack.io" }
+ maven { url 'https://maven.aliyun.com/repository/releases' }
+ maven { url 'https://maven.aliyun.com/repository/jcenter' }
+ maven { url 'https://maven.aliyun.com/repository/google' }
+ maven { url 'https://maven.aliyun.com/repository/central' }
+ maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
+ maven { url 'https://maven.aliyun.com/repository/public' }
+ gradlePluginPortal()
+ google()
+ }
+}
+
+rootProject.name = "Union"
+include ':app'
+include ':base'
+include ':utils'
+include ':network'
diff --git a/utils/.gitignore b/utils/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/utils/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/utils/build.gradle b/utils/build.gradle
new file mode 100644
index 0000000..eae1683
--- /dev/null
+++ b/utils/build.gradle
@@ -0,0 +1,33 @@
+plugins {
+ alias(libs.plugins.androidLibrary)
+}
+
+android {
+ namespace 'com.police.utils'
+ compileSdk 34
+
+ defaultConfig {
+ minSdk 24
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles "consumer-rules.pro"
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+}
+
+dependencies {
+
+ implementation libs.appcompat
+ implementation libs.material
+ implementation project(':base')
+}
\ No newline at end of file
diff --git a/utils/src/main/AndroidManifest.xml b/utils/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..a5918e6
--- /dev/null
+++ b/utils/src/main/AndroidManifest.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/utils/src/main/java/com/police/utils/UiUtils.java b/utils/src/main/java/com/police/utils/UiUtils.java
new file mode 100644
index 0000000..10c23c5
--- /dev/null
+++ b/utils/src/main/java/com/police/utils/UiUtils.java
@@ -0,0 +1,110 @@
+package com.police.utils;
+
+import android.content.Context;
+import android.net.Uri;
+import android.util.Base64;
+import android.widget.Toast;
+
+
+import com.police.base.App;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.UUID;
+
+public class UiUtils {
+ /**
+ * 将dp值转换为px值,保证尺寸大小不变
+ *
+ * @param dpValue dp值
+ * @return 转换后的px值
+ */
+ public static int dp2Px(int dpValue) {
+ final float scale = App.getApp().getResources().getDisplayMetrics().density;
+ return Math.round((float) dpValue * scale);
+ }
+
+ public static String uuid() {
+ return UUID.randomUUID().toString();
+ }
+
+ public static void toast(String str) {
+ App.getHandler().post(() -> Toast.makeText(App.getApp(), str, Toast.LENGTH_LONG).show());
+ }
+
+ public static boolean isEmpty(String str) {
+ if (str == null) {
+ return true;
+ }
+ return str.isEmpty();
+ }
+
+ public static boolean isNotEmpty(String str) {
+ if (str == null) {
+ return false;
+ }
+ return !str.isEmpty();
+ }
+
+ public static void ui() {
+ App.getHandler().post(new Runnable() {
+ @Override
+ public void run() {
+
+ }
+ });
+ }
+
+
+ public static byte[] base64ToBytes(String base64Str) {
+ return Base64.decode(base64Str, Base64.DEFAULT);
+ }
+
+ public static String formatTime(String str) {
+ if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
+ if (UiUtils.isEmpty(str)) return "";
+ if (str.contains("-")) {
+ return str;
+ }
+ if (str.length() == 8) {
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append(str.substring(0, 4)).append("-" + str.substring(4, 6)).append("-" + str.substring(6, 8));
+ return stringBuilder.toString();
+ }
+ if (str.length() > 8) {
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append(str.substring(0, 4))
+ .append("-" + str.substring(4, 6))
+ .append("-" + str.substring(6, 8))
+ .append(" " + str.substring(8, 10))
+ .append(":" + str.substring(10, 12));
+ return stringBuilder.toString();
+ }
+ }
+ return "";
+ }
+
+ public static String uriToBase64(Context context, Uri uri) {
+ String base64 = null;
+ try (InputStream inputStream = context.getContentResolver().openInputStream(uri);
+ ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
+
+ // 读取输入流的内容到字节数组输出流
+ byte[] buffer = new byte[1024];
+ int bytesRead;
+ while ((bytesRead = inputStream.read(buffer)) != -1) {
+ byteArrayOutputStream.write(buffer, 0, bytesRead);
+ }
+
+ // 将字节数组转换为Base64编码的字符串
+ byte[] byteArray = byteArrayOutputStream.toByteArray();
+ base64 = Base64.encodeToString(byteArray, Base64.DEFAULT);
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ return base64;
+ }
+}