事件评分

This commit is contained in:
高健 2022-02-15 16:37:59 +08:00
parent 10058b4587
commit c5711ccaa3
18 changed files with 211 additions and 9 deletions

View File

@ -2,4 +2,5 @@
### 2022-2-10
> 1 学校重点人员添加网格信息 添加经纬度信息
> 2 学校涉及案件添加网格、经纬度信息
> 2 学校涉及案件添加网格、经纬度信息
> 3 网格员事件核查添加评分

Binary file not shown.

View File

@ -10,8 +10,8 @@
{
"type": "SINGLE",
"filters": [],
"versionCode": 5,
"versionName": "1.0.4",
"versionCode": 6,
"versionName": "1.0.5",
"outputFile": "app-release.apk"
}
]

View File

@ -520,4 +520,5 @@ public class PathConfig {
public static final String PATH_MODULE_SUPERVISION_INCIDENT_CHECK_LIST = "/modulesupervision/activity/incidentDeptList";//事件核查
public static final String PATH_MODULE_SUPERVISION_INCIDENT_CHECK_DETAIL = "/modulesupervision/activity/incidentDeptListDetail";//事件核查详情
public static final String PATH_MODULE_SUPERVISION_ACTIVITY_PETITION_DISPOSE_LIST = "/modulesupervision/activity/petitionDisposeList";//公众信访
}

View File

@ -7,7 +7,7 @@ package com.tenlionsoft.baselib.core.retrofit_net;
*/
public class BaseUrlApi {
// public static final String IP = "http://192.168.0.155:7011/";/* 测试IP */
// public static final String IP = "http://192.168.0.155:7011/";/* 测试IP */
// public static final String IP = "http://49.233.36.36:58091/";/* 测试IP */
public static final String IP = "http://1.24.238.149:37210/";/* 正式IP */
public static final String SYS_USERCENTER = "usercenter/";

View File

@ -106,7 +106,7 @@ public class AesUtil {
* @throws Exception
*/
public static String aesCommonDecoder(String key, String content) throws Exception {
byte[] encryptedBytes = Base64.decode(content,0);
byte[] encryptedBytes = Base64.decode(content, 0);
byte[] enCodeFormat = key.getBytes();
SecretKeySpec secretKey = new SecretKeySpec(enCodeFormat, "AES");
byte[] initParam = IV_STRING.getBytes();
@ -116,4 +116,26 @@ public class AesUtil {
byte[] result = cipher.doFinal(encryptedBytes);
return new String(result, "UTF-8");
}
// public static final byte[] a = new byte[]{
// 120, 119, 57, 80, 52, 110, 102, 56, 114, 66,
// 75, 75, 65, 110, 119, 53};
public static final byte[] a = new byte[]{
120, 119, 57, 80, 52, 110, 102, 56, 114, 66,
75, 75, 65, 110, 119, 53};
public static String test(String paramString) {
byte[] arrayOfByte = "1234567890123456".getBytes();
SecretKeySpec secretKeySpec = new SecretKeySpec(a, "AES");
try {
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(1, secretKeySpec, new IvParameterSpec(arrayOfByte));
byte[] bytes = cipher.doFinal(paramString.getBytes());
return new String(Base64.encode(bytes, Base64.NO_PADDING), "UTF-8");
} catch (Exception exception) {
exception.printStackTrace();
return null;
}
}
}

View File

@ -55,8 +55,8 @@ ext {
gCompileSdkVersion = 30
gMinSdkVersion = 21
gTargetSdkVersion = 30
gVersionCode = 5
gVersionName = '1.0.4'
gVersionCode = 6
gVersionName = '1.0.5'
gBuildToolsVersion = "29.0.2"
// gVersionCode=26
// gVersionName='1.3.0'

View File

@ -65,6 +65,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import androidx.appcompat.widget.AppCompatRatingBar;
import androidx.appcompat.widget.SwitchCompat;
import androidx.cardview.widget.CardView;
import androidx.core.widget.NestedScrollView;
@ -140,6 +141,8 @@ public class IncidentCheckDetailActivity extends BaseActivity {
RadioGroup mRgWay;
@BindView(R2.id.tmv_map)
TextureMapView mTmvMap;
@BindView(R2.id.rb_star)
AppCompatRatingBar mRbStar;
private Unbinder mBind;
private String mId;
@ -154,6 +157,7 @@ public class IncidentCheckDetailActivity extends BaseActivity {
private String mTaskId;
private IncidentDetailBean mDetailBean;
private String mSelPassType = "approved";//通过 不通过failed
private int mLevel;
@Override
protected int setLayoutId() {
@ -201,7 +205,7 @@ public class IncidentCheckDetailActivity extends BaseActivity {
mRlvHandles.setAdapter(mHandleRecordAdapter);
mSrlContent.setOnLoadMoreListener(refreshLayout -> doLoadMore());
mSrlContent.setOnRefreshListener(refreshLayout -> doRefresh());
mRbStar.setOnRatingBarChangeListener((ratingBar, rating, fromUser) -> mLevel = (int) rating);
mPhotos.add(new AddPhotoBean());
mAddPhotoAdapter = new AddPhotoAdapter(mActivity, mPhotos);
mRlvCheckPhotos.setLayoutManager(new GridLayoutManager(mActivity, 4));
@ -394,6 +398,7 @@ public class IncidentCheckDetailActivity extends BaseActivity {
String trim = mEtContent.getText().toString().trim();
bean.setCheckContent(trim);
bean.setCheckPhotos(mPhotoIds);
bean.setCheckScore(mLevel + "");
Gson gson = new Gson();
String obj = gson.toJson(bean);
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
@ -415,6 +420,10 @@ public class IncidentCheckDetailActivity extends BaseActivity {
ToastUtils.show("请上传现场照片");
return false;
}
if (mLevel == 0) {
ToastUtils.show("请选择评分");
return false;
}
return true;
}

View File

@ -176,6 +176,8 @@ public class IncidentDetailActivity extends BaseActivity {
CardView mCvDispose;
@BindView(R2.id.tmv_map)
TextureMapView mTmvMap;
@BindView(R2.id.rb_star)
AppCompatRatingBar mRbStar;
private Unbinder mBind;
private String mId;
private int mCurrentPage = 1;
@ -938,6 +940,7 @@ public class IncidentDetailActivity extends BaseActivity {
paths.add(BaseUrlApi.BASE_IMG_URL + doorId);
}
}
mRbStar.setRating(bean.getCheckScope());
mAdapter.setData(paths);
}

View File

@ -16,6 +16,15 @@ public class DisposeDetailBean {
private String creatorName;
private String gmtCreate;
private String reportId;
private int checkScore;
public int getCheckScope() {
return checkScore;
}
public void setCheckScope(int checkScore) {
this.checkScore = checkScore;
}
public String getCheckContent() {
return checkContent;

View File

@ -13,6 +13,15 @@ public class SaveCheckBean {
private String checkStatus;
private String reportId;
private String taskId;
private String checkScore;
public String getCheckScore() {
return checkScore;
}
public void setCheckScore(String checkScore) {
this.checkScore = checkScore;
}
public String getCheckContent() {
return checkContent;

View File

@ -189,7 +189,7 @@
<com.baidu.mapapi.map.TextureMapView
android:id="@+id/tmv_map"
android:layout_width="match_parent"
android:layout_height="200dp"/>
android:layout_height="200dp" />
</LinearLayout>
<LinearLayout style="@style/item_gray_vertical">
@ -364,6 +364,49 @@
android:text="核查内容"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/ll_grade"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="5dp"
android:background="@drawable/shp_rectangle_gray"
android:orientation="horizontal"
android:paddingTop="5dp"
android:paddingBottom="5dp">
<ImageView
style="@style/style_hint_star"
android:visibility="visible" />
<TextView
style="@style/item_title"
android:text="评分" />
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatRatingBar
android:id="@+id/rb_star"
style="?android:attr/ratingBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:isIndicator="false"
android:max="5"
android:numStars="5"
android:progressBackgroundTint="@color/gray_text"
android:progressTint="@color/yellow1"
android:secondaryProgressTint="@color/yellow1"
android:stepSize="1"
tools:rating="2.5" />
</RelativeLayout>
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView
@ -438,6 +481,7 @@
android:layout_height="wrap_content" />
</LinearLayout>
<Button
android:id="@+id/btn_confirm"
android:layout_width="match_parent"

View File

@ -632,6 +632,51 @@
android:hint="未录入" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_grade"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="5dp"
android:background="@drawable/shp_rectangle_gray"
android:orientation="horizontal"
android:paddingTop="5dp"
android:paddingBottom="5dp">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:text="评分" />
<View style="@style/vertical_line" />
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatRatingBar
android:id="@+id/rb_star"
style="?android:attr/ratingBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:isIndicator="true"
android:max="5"
android:numStars="5"
android:progressBackgroundTint="@color/gray_text"
android:progressTint="@color/yellow1"
android:rating="3"
android:secondaryProgressTint="@color/yellow1"
android:stepSize="1" />
</RelativeLayout>
</LinearLayout>
<LinearLayout style="@style/item_gray">
<ImageView

View File

@ -22,6 +22,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
import com.google.gson.Gson;
import com.gyf.immersionbar.ImmersionBar;
import com.hjq.toast.ToastUtils;
import com.tengshisoft.chatmodule.hwclud.utils.LogUtil;
import com.tenlionsoft.baselib.app.BaseAppContext;
import com.tenlionsoft.baselib.constant.BaseConfig;
import com.tenlionsoft.baselib.constant.GlobalProvider;

View File

@ -68,6 +68,7 @@ public class SupervisionMainFragment extends BaseFragment {
"事件核查",
"延期审核",
"督办消息",
"公众信访",
"知识库"};
private int[] mBtnIds = new int[]{
R.drawable.ic_case_accept,
@ -76,6 +77,7 @@ public class SupervisionMainFragment extends BaseFragment {
R.drawable.ic_case_check,
R.drawable.ic_case_examine,
R.drawable.ic_case_supervise,
R.drawable.ic_case_dispatch,
R.drawable.ic_know_ledge};
private FunctionNumAdapter mNumAdapter;
private Disposable mDisposable;
@ -273,6 +275,11 @@ public class SupervisionMainFragment extends BaseFragment {
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_DEPT_SPECIAL)
.navigation();
break;
case "公众信访":
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_SUPERVISION_ACTIVITY_PETITION_DISPOSE_LIST)
.navigation();
break;
default:
break;
}

View File

@ -3,6 +3,7 @@
package="com.tengshisoft.supervisionmodule">
<application>
<activity android:name=".activitys.PetitionDisposeListActivity"></activity>
<activity
android:name=".activitys.IncidentCheckDeptDetailActivity"
android:launchMode="singleTop"

View File

@ -0,0 +1,41 @@
package com.tengshisoft.supervisionmodule.activitys;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.tengshisoft.supervisionmodule.R;
import com.tenlionsoft.baselib.constant.PathConfig;
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import butterknife.ButterKnife;
import butterknife.Unbinder;
/**
* 作者: Adam
* 日期: 2022年02月10日15:46:07
* 邮箱: itgaojian@163.com
* 描述: 信访处理
*/
@Route(path = PathConfig.PATH_MODULE_SUPERVISION_ACTIVITY_PETITION_DISPOSE_LIST)
public class PetitionDisposeListActivity extends BaseActivity {
private Unbinder mBind;
@Override
protected int setLayoutId() {
return R.layout.activity_petition_dispose_list;
}
@Override
public void initData() {
mBind = ButterKnife.bind(this);
}
@Override
protected void doSearchByTitle() {
}
@Override
protected void clearSearch() {
}
}

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activitys.PetitionDisposeListActivity">
</androidx.constraintlayout.widget.ConstraintLayout>