新增数据上报功能
This commit is contained in:
parent
79ed157dce
commit
3d17dec33f
@ -10,8 +10,8 @@
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 9,
|
||||
"versionName": "1.0.9",
|
||||
"versionCode": 2,
|
||||
"versionName": "1.0.2",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
]
|
||||
|
@ -13,6 +13,7 @@ import com.tenlionsoft.baselib.core.widget.refresh.BezierCircleHeader;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import androidx.multidex.MultiDex;
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
|
||||
@ -49,6 +50,8 @@ public class BaseAppContext extends MultiDexApplication {
|
||||
app = this;
|
||||
ToastUtils.init(this);
|
||||
ToastUtils.setGravity(Gravity.BOTTOM, 0, 100);
|
||||
//暗黑模式-不随系统主题切换
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
|
||||
// setDefaultFont();
|
||||
}
|
||||
|
||||
|
@ -211,6 +211,10 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_OA_ACTIVITY_EMAIL_SEND = "/oamodule/activity/sendEmail";//发送邮件
|
||||
public static final String PATH_MODULE_OA_ACTIVITY_EMAIL_DETAIL = "/oamodule/activity/emailDetail";//邮件详情
|
||||
|
||||
public static final String PATH_MODULE_OA_ACTIVITY_DATA_REPORT = "/oamodule/activity/dataReport";//数据上报记录
|
||||
public static final String PATH_MODULE_OA_ACTIVITY_DATA_REPORT_ADD = "/oamodule/activity/dataReportAdd";//数据上报
|
||||
public static final String PATH_MODULE_OA_ACTIVITY_DATA_REPORT_DETAIL = "/oamodule/activity/dataReportDetail";//数据上报详情
|
||||
|
||||
public static final String PATH_MODULE_OA_ACTIVITY_EMAIL_INBOX_DETAIL = "/oamodule/activity/emailInboxDetail";//收件箱邮件详情
|
||||
public static final String PATH_MODULE_OA_ACTIVITY_EMAIL_SEND_DETAIL = "/oamodule/activity/emailSendDetail";//邮件发送详情
|
||||
public static final String PATH_MODULE_OA_ACTIVITY_EMAIL_DRAFT_DETAIL = "/oamodule/activity/emailDraftDetail";//邮件草稿详情
|
||||
@ -280,6 +284,10 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_MINE_WORKREPORT_LIST = "/oamodule/fragment/padMineWorkreportList";//我上报的工作报告
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_RECIVE_WORKREPORT_LIST = "/oamodule/fragment/padMineReciveWorkreportList";//我接收的工作报告
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_MORE_FUNCTION = "/oamodule/fragment/functionList";//功能列表
|
||||
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_DOCUMENT_ADD = "/oamodule/fragment/documentAdd";//文档添加
|
||||
|
@ -9,7 +9,8 @@ public class BaseUrlApi {
|
||||
|
||||
// public static final String IP = "http://192.168.0.120:8082/";/* 测试IP */
|
||||
// public static final String IP = "http://121.36.71.250/";/* 测试IP */
|
||||
public static final String IP = "http://106.12.218.237:8002/";/* 公司IP */
|
||||
// public static final String IP = "http://106.12.218.237:8002/";/* 公司IP */
|
||||
public static final String IP="http://106.74.34.13:8081/";//* 呼市玉泉区司法 */
|
||||
// public static final String IP = "https://www.xzszwhy.cn/";/* 公司IP */
|
||||
// public static final String IP = "http://www.wlcbsyzl.cn/";/* 正式IP */
|
||||
// public static final String SYS_USERCENTER = "xzszwhy/";//西藏统一用户
|
||||
@ -58,7 +59,8 @@ public class BaseUrlApi {
|
||||
|
||||
public static final String SMART_CONSULT_URL = "https://www.cispirit.com/IntelligentConsulting";
|
||||
|
||||
public static final String APP_VERSION_ID = "2939f6a7-ae98-4e64-8298-200f83523d1a";/*正式App下载码*/
|
||||
// public static final String APP_VERSION_ID = "2939f6a7-ae98-4e64-8298-200f83523d1a";/*正式App下载码*/
|
||||
public static final String APP_VERSION_ID = "d4e5abf6-1958-4c92-9f3a-7fec081fb1c5";/*呼市玉泉司法*/
|
||||
// public static final String APP_VERSION_ID = "b50b3099-70f3-4382-a2e7-a5d2160f41ab";/*西藏App下载码*/
|
||||
|
||||
/*======百度定位city-code=======*/
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.tenlionsoft.baselib.utils;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public final class StringUtils {
|
||||
|
||||
private StringUtils() {
|
||||
@ -182,4 +187,21 @@ public final class StringUtils {
|
||||
}
|
||||
return new String(chars);
|
||||
}
|
||||
|
||||
|
||||
public static Map<String, Object> getParameter(String contents) {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
try {
|
||||
if (TextUtils.isEmpty(contents)) return map;
|
||||
String[] keyValues = contents.split("&");
|
||||
for (int i = 0; i < keyValues.length; i++) {
|
||||
String key = keyValues[i].substring(0, keyValues[i].indexOf("="));
|
||||
String value = keyValues[i].substring(keyValues[i].indexOf("=") + 1);
|
||||
map.put(key, value);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,8 @@ package com.tenlionsoft.baselib.utils;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.tenlionsoft.baselib.constant.TimeConstants;
|
||||
|
||||
import java.text.DateFormat;
|
||||
@ -14,8 +16,6 @@ import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
public final class TimeUtils {
|
||||
|
||||
private static final ThreadLocal<SimpleDateFormat> SDF_THREAD_LOCAL = new ThreadLocal<>();
|
||||
@ -121,6 +121,12 @@ public final class TimeUtils {
|
||||
return format.format(date);
|
||||
}
|
||||
|
||||
public static String getCurrentYear() {
|
||||
Date date = new Date();
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy", Locale.ENGLISH);
|
||||
return format.format(date);
|
||||
}
|
||||
|
||||
public static String getMonthEnd() {
|
||||
Date date = new Date();
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
@ -242,13 +248,14 @@ public final class TimeUtils {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 比较时间的大小,用当前时间与给定时间进行比较
|
||||
*
|
||||
* @param time
|
||||
* @return
|
||||
*/
|
||||
public static boolean compareToCurrent(String time,String fm) {
|
||||
public static boolean compareToCurrent(String time, String fm) {
|
||||
SimpleDateFormat format = new SimpleDateFormat(fm);
|
||||
String nowString = getNowString(format);
|
||||
try {
|
||||
@ -396,6 +403,7 @@ public final class TimeUtils {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public static String dateToStringMonthDayTimeChinese(final String date) {
|
||||
SimpleDateFormat format = new SimpleDateFormat("MM月dd日HH:mm");
|
||||
SimpleDateFormat pars = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@ -2053,7 +2061,7 @@ public final class TimeUtils {
|
||||
}
|
||||
|
||||
private static final String[] CHINESE_ZODIAC =
|
||||
{"猴", "鸡", "狗", "猪", "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊"};
|
||||
{"猴", "鸡", "狗", "猪", "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊"};
|
||||
|
||||
/**
|
||||
* Return the Chinese zodiac.
|
||||
@ -2111,8 +2119,8 @@ public final class TimeUtils {
|
||||
|
||||
private static final int[] ZODIAC_FLAGS = {20, 19, 21, 21, 21, 22, 23, 23, 23, 24, 23, 22};
|
||||
private static final String[] ZODIAC = {
|
||||
"水瓶座", "双鱼座", "白羊座", "金牛座", "双子座", "巨蟹座",
|
||||
"狮子座", "处女座", "天秤座", "天蝎座", "射手座", "魔羯座"
|
||||
"水瓶座", "双鱼座", "白羊座", "金牛座", "双子座", "巨蟹座",
|
||||
"狮子座", "处女座", "天秤座", "天蝎座", "射手座", "魔羯座"
|
||||
};
|
||||
|
||||
/**
|
||||
@ -2170,8 +2178,8 @@ public final class TimeUtils {
|
||||
*/
|
||||
public static String getZodiac(final int month, final int day) {
|
||||
return ZODIAC[day >= ZODIAC_FLAGS[month - 1]
|
||||
? month - 1
|
||||
: (month + 10) % 12];
|
||||
? month - 1
|
||||
: (month + 10) % 12];
|
||||
}
|
||||
|
||||
private static long timeSpan2Millis(final long timeSpan,
|
||||
|
BIN
baselib/src/main/res/drawable-xhdpi/ic_title_data_icon.png
Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_title_data_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 695 B |
BIN
baselib/src/main/res/drawable-xhdpi/ic_title_dept_icon.png
Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_title_dept_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 846 B |
BIN
baselib/src/main/res/drawable-xhdpi/ic_title_period_icon.png
Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_title_period_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
baselib/src/main/res/drawable-xhdpi/ic_title_scope_icon.png
Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_title_scope_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
baselib/src/main/res/drawable-xhdpi/ic_title_year_icon.png
Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_title_year_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
13
build.gradle
13
build.gradle
@ -43,7 +43,7 @@ allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
flatDir{
|
||||
flatDir {
|
||||
dirs '../aars'
|
||||
}
|
||||
maven {
|
||||
@ -59,11 +59,14 @@ ext {
|
||||
gCompileSdkVersion = 30
|
||||
gMinSdkVersion = 19
|
||||
gTargetSdkVersion = 30
|
||||
gVersionCode = 9
|
||||
gVersionName = '1.0.9'
|
||||
//玉泉区司法局
|
||||
gVersionCode = 2
|
||||
gVersionName = '1.0.2'
|
||||
//gVersionCode = 9
|
||||
//gVersionName = '1.0.9'
|
||||
gBuildToolsVersion = "29.0.2"
|
||||
// gVersionCode=26
|
||||
// gVersionName='1.3.0'
|
||||
//gVersionCode=26
|
||||
//gVersionName='1.3.0'
|
||||
//Router编译版本
|
||||
gRouterApiVersion = '1.4.1'
|
||||
gRouterCompileVersion = '1.2.2'
|
||||
|
@ -3,13 +3,27 @@
|
||||
package="com.tenlionsoft.oamodule">
|
||||
|
||||
<application>
|
||||
<activity
|
||||
android:name=".activity.datareport.DataReportDetailActivity"
|
||||
android:configChanges="keyboardHidden|screenSize|orientation"
|
||||
android:launchMode="singleTop"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"/>
|
||||
<activity
|
||||
android:name=".activity.datareport.DataReportAddActivity"
|
||||
android:configChanges="keyboardHidden|screenSize|orientation"
|
||||
android:launchMode="singleTop"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name=".activity.datareport.DataReportActivity"
|
||||
android:configChanges="keyboardHidden|screenSize|orientation"
|
||||
android:launchMode="singleTop"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name=".activity.document.DocumentCategoryActivity"
|
||||
android:configChanges="keyboardHidden|screenSize|orientation"
|
||||
android:exported="false"
|
||||
android:launchMode="singleTop"
|
||||
android:windowSoftInputMode="stateVisible|adjustResize" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.workreports.WorkReportFragmentActivity"
|
||||
android:configChanges="keyboardHidden|screenSize|orientation"
|
||||
|
@ -2,6 +2,9 @@ package com.tenlionsoft.oamodule.activity.common;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
@ -20,8 +23,6 @@ import com.tenlionsoft.oamodule.widget.HandWritingDialog;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
@ -72,10 +73,19 @@ public class FunctionListActivity extends BaseActivity {
|
||||
* 页面跳转
|
||||
*/
|
||||
private void choosePage(FuncBean funcBean) {
|
||||
String path = funcBean.getAppFunctionPath();
|
||||
String[] pathArray = path.split("\\?");
|
||||
String url = pathArray[0];
|
||||
ARouter.getInstance()
|
||||
.build(funcBean.getAppFunctionPath())
|
||||
.withString("id", funcBean.getAppFunctionId())
|
||||
.navigation();
|
||||
.build(url)
|
||||
.withString("title", funcBean.getAppFunctionName())
|
||||
.withString("id", funcBean.getAppFunctionId())
|
||||
.withString("params", pathArray.length > 1 ? pathArray[1] : "")
|
||||
.navigation();
|
||||
// ARouter.getInstance()
|
||||
// .build(funcBean.getAppFunctionPath())
|
||||
// .withString("id", funcBean.getAppFunctionId())
|
||||
// .navigation();
|
||||
}
|
||||
|
||||
private void doRefresh() {
|
||||
@ -89,40 +99,40 @@ public class FunctionListActivity extends BaseActivity {
|
||||
*/
|
||||
private void getMenuTypeList() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMenuTypeList(mId)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<List<FuncBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
.create(OAApi.class)
|
||||
.getMenuTypeList(mId)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<List<FuncBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<FuncBean> funcBeans) {
|
||||
mSrlContent.finishRefresh();
|
||||
if (funcBeans.size() > 0) {
|
||||
for (int i = 0; i < funcBeans.size(); i++) {
|
||||
funcBeans.get(i).setSubList(new ArrayList<>());
|
||||
}
|
||||
getMenuList(funcBeans);
|
||||
} else {
|
||||
refreshView(STATE_LOAD_EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishRefresh();
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
@Override
|
||||
public void onNext(@NonNull List<FuncBean> funcBeans) {
|
||||
mSrlContent.finishRefresh();
|
||||
if (funcBeans.size() > 0) {
|
||||
for (int i = 0; i < funcBeans.size(); i++) {
|
||||
funcBeans.get(i).setSubList(new ArrayList<>());
|
||||
}
|
||||
getMenuList(funcBeans);
|
||||
} else {
|
||||
refreshView(STATE_LOAD_EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishRefresh();
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private int mCount = 0;
|
||||
@ -139,51 +149,51 @@ public class FunctionListActivity extends BaseActivity {
|
||||
}
|
||||
Observable<List<FuncBean>>[] observables1 = requests.toArray(new Observable[requests.size()]);
|
||||
Observable.mergeArrayDelayError(observables1)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<List<FuncBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<List<FuncBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<FuncBean> beans) {
|
||||
++mCount;
|
||||
if (beans.size() > 0) {
|
||||
for (int i = 0; i < funcBeans.size(); i++) {
|
||||
if (beans.get(0).getAppFunctionParentId().equals(funcBeans.get(i).getAppFunctionId())) {
|
||||
funcBeans.get(i).setSubList(beans);
|
||||
break;
|
||||
@Override
|
||||
public void onNext(@NonNull List<FuncBean> beans) {
|
||||
++mCount;
|
||||
if (beans.size() > 0) {
|
||||
for (int i = 0; i < funcBeans.size(); i++) {
|
||||
if (beans.get(0).getAppFunctionParentId().equals(funcBeans.get(i).getAppFunctionId())) {
|
||||
funcBeans.get(i).setSubList(beans);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mCount == funcBeans.size()) {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mCount = 0;
|
||||
mDatas = funcBeans;
|
||||
mAdapter.setData(mDatas);
|
||||
}
|
||||
}
|
||||
if (mCount == funcBeans.size()) {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mCount = 0;
|
||||
mDatas = funcBeans;
|
||||
mAdapter.setData(mDatas);
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mCount = 0;
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Observable<List<FuncBean>> createObservable(String id) {
|
||||
return RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMenuListByPid(id)
|
||||
.compose(RxTransformer.getTransformer());
|
||||
.create(OAApi.class)
|
||||
.getMenuListByPid(id)
|
||||
.compose(RxTransformer.getTransformer());
|
||||
}
|
||||
|
||||
private void onShowSignDialog() {
|
||||
|
@ -0,0 +1,254 @@
|
||||
package com.tenlionsoft.oamodule.activity.datareport;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.tenlionsoft.baselib.constant.LionActions;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
import com.tenlionsoft.baselib.utils.StringUtils;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.adapter.DataReportMineAdapter;
|
||||
import com.tenlionsoft.oamodule.beans.DataReportList;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
@Route(path = PathConfig.PATH_MODULE_OA_ACTIVITY_DATA_REPORT)
|
||||
public class DataReportActivity extends BaseActivity {
|
||||
@BindView(R2.id.rlv_content)
|
||||
RecyclerView mRlvContent;
|
||||
@BindView(R2.id.srl_content)
|
||||
SmartRefreshLayout mSrlContent;
|
||||
@BindView(R2.id.pb_loading)
|
||||
ProgressBar mPbLoading;
|
||||
@BindView(R2.id.iv_empty_data)
|
||||
ImageView mIvEmptyData;
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
@BindView(R2.id.ll_hint)
|
||||
LinearLayout mLlHint;
|
||||
|
||||
private String mId;
|
||||
private DataReportMineAdapter mAdapter;
|
||||
private List<DataReportList.RowsBean> mDatas;
|
||||
private int mCurrentPage = 1;
|
||||
private String mTitle;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_data_report;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
ButterKnife.bind(this);
|
||||
mRlTitleBar.setBackgroundColor(getResources().getColor(R.color.gray_f8));
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("上报");
|
||||
mTitle = getIntent().getStringExtra("title");
|
||||
mTvBaseTitle.setText(TextUtils.isEmpty(mTitle) ? "数据上报" : mTitle);
|
||||
String params = getIntent().getStringExtra("params");
|
||||
LogUtils.e(params);
|
||||
if (!TextUtils.isEmpty(params)) {
|
||||
Map<String, Object> parameter = StringUtils.getParameter(params);
|
||||
LogUtils.e(parameter);
|
||||
mId = (String) parameter.get("id");
|
||||
}
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
ToastUtils.show("数据错误");
|
||||
finish();
|
||||
}
|
||||
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_DATA_REPORT_ADD)
|
||||
.withString("title", mTitle)
|
||||
.withString("id", mId)
|
||||
.navigation(mActivity, 14));
|
||||
initViews();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
mSrlContent.setOnLoadMoreListener(v -> doLoadMore());
|
||||
mSrlContent.setOnRefreshListener(v -> doRefresh());
|
||||
mDatas = new ArrayList<>();
|
||||
mAdapter = new DataReportMineAdapter(mActivity, mDatas);
|
||||
mRlvContent.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvContent.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(rowsBean -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_DATA_REPORT_DETAIL)
|
||||
.withString("id", rowsBean.getIndexTemplateId())
|
||||
.withString("contentId", rowsBean.getIndexTemplateRecordId())
|
||||
.withString("title", TextUtils.isEmpty(mTitle) ? "详情" : mTitle)
|
||||
.withString("type", "mine")
|
||||
.navigation(mActivity, 12));
|
||||
refreshStateView(LionActions.STATE_LOAD);
|
||||
doRefresh();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (RESULT_OK == resultCode) {
|
||||
if (requestCode == 14) {
|
||||
doRefresh();
|
||||
} else if (requestCode == 12) {
|
||||
doRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载更多
|
||||
*/
|
||||
private void doLoadMore() {
|
||||
getDatas(mCurrentPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新
|
||||
*/
|
||||
private void doRefresh() {
|
||||
mDatas.clear();
|
||||
mAdapter.setData(mDatas);
|
||||
getDatas(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表数据
|
||||
*/
|
||||
private void getDatas(int currentPage) {
|
||||
mCurrentPage = currentPage;
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMineDataReportList(mId, mCurrentPage + "")
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<DataReportList>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull DataReportList listBean) {
|
||||
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(listBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(listBean.getRows());
|
||||
}
|
||||
refreshStateView(LionActions.STATE_SUCCESS);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mSrlContent.finishRefresh();
|
||||
if (mDatas.size() >= listBean.getTotal()) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(false);
|
||||
}
|
||||
} else {
|
||||
mSrlContent.finishRefresh();
|
||||
mSrlContent.finishLoadMore();
|
||||
if (currentPage > 1) {
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
if (TextUtils.isEmpty("")) {
|
||||
//无数据
|
||||
refreshStateView(LionActions.STATE_EMPTY);
|
||||
} else {
|
||||
refreshStateView(LionActions.STATE_EMPTY);
|
||||
ToastUtils.show("未查询到相关内容");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
ExceptionHandler.handleException(e);
|
||||
refreshStateView(LionActions.STATE_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void refreshStateView(int state) {
|
||||
switch (state) {
|
||||
case LionActions.STATE_LOAD:
|
||||
mRlvContent.setVisibility(View.GONE);
|
||||
mLlHint.setVisibility(View.VISIBLE);
|
||||
mPbLoading.setVisibility(View.VISIBLE);
|
||||
mIvEmptyData.setVisibility(View.GONE);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("加载中...");
|
||||
break;
|
||||
case LionActions.STATE_EMPTY:
|
||||
mRlvContent.setVisibility(View.GONE);
|
||||
mLlHint.setVisibility(View.VISIBLE);
|
||||
mPbLoading.setVisibility(View.GONE);
|
||||
mIvEmptyData.setVisibility(View.VISIBLE);
|
||||
mIvEmptyData.setImageResource(R.drawable.ic_empty_data);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("暂无数据");
|
||||
break;
|
||||
case LionActions.STATE_ERROR:
|
||||
mRlvContent.setVisibility(View.GONE);
|
||||
mLlHint.setVisibility(View.VISIBLE);
|
||||
mPbLoading.setVisibility(View.GONE);
|
||||
mIvEmptyData.setVisibility(View.VISIBLE);
|
||||
mIvEmptyData.setImageResource(R.drawable.ic_load_error);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("加载失败,请稍后重试");
|
||||
break;
|
||||
case LionActions.STATE_SUCCESS:
|
||||
mRlvContent.setVisibility(View.VISIBLE);
|
||||
mLlHint.setVisibility(View.GONE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doSearchByTitle() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void clearSearch() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,619 @@
|
||||
package com.tenlionsoft.oamodule.activity.datareport;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.graphics.Color;
|
||||
import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.bigkoo.pickerview.view.TimePickerView;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
|
||||
import com.tenlionsoft.baselib.core.beans.UserInfoBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView;
|
||||
import com.tenlionsoft.baselib.utils.ConvertUtils;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.TimeUtils;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.beans.DataReportDateBean;
|
||||
import com.tenlionsoft.oamodule.beans.DataReportDetailBean;
|
||||
import com.tenlionsoft.oamodule.beans.DataReportTemplateBean;
|
||||
import com.tenlionsoft.oamodule.beans.SaveDataReportBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
@Route(path = PathConfig.PATH_MODULE_OA_ACTIVITY_DATA_REPORT_ADD)
|
||||
public class DataReportAddActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R2.id.ll_content)
|
||||
public LinearLayout mLlContent;
|
||||
@BindView(R2.id.btn_confirm)
|
||||
public Button mBtnConfirm;
|
||||
@BindView(R2.id.tv_form_title)
|
||||
public TypeFaceTextView mTvFormTitle;
|
||||
@BindView(R2.id.tv_form_period)
|
||||
public TypeFaceTextView mTvFormPeriod;
|
||||
@BindView(R2.id.tv_form_scope)
|
||||
public TypeFaceTextView mTvFormScope;
|
||||
@BindView(R2.id.tv_form_report_user)
|
||||
public TypeFaceTextView mTvFormReportUser;
|
||||
@BindView(R2.id.tv_form_report_dept)
|
||||
public TypeFaceTextView mTvFormReportDept;
|
||||
@BindView(R2.id.tv_form_year)
|
||||
public TypeFaceTextView mTvFormYear;
|
||||
@BindView(R2.id.tv_form_date)
|
||||
public TypeFaceTextView mTvFormDate;
|
||||
|
||||
private List<View> mAllViews = new ArrayList<>();
|
||||
private String mId;
|
||||
private UserInfoBean.DepartmentsBean mDeptBean;
|
||||
private ArrayList<UserInfoBean.DepartmentsBean> mDepts;
|
||||
private OptionsPickerView<UserInfoBean.DepartmentsBean> mDeptPicker;
|
||||
private OptionsPickerView<DataReportDateBean> mDatePicker;
|
||||
private ArrayList<DataReportDateBean> mDates;
|
||||
private DataReportDateBean mSelDate;
|
||||
private String mContentId;
|
||||
private @NonNull DataReportTemplateBean mTemplateBean;
|
||||
private DataReportDetailBean mDetailBean;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_data_report_add;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
ButterKnife.bind(this);
|
||||
|
||||
mRlTitleBar.setBackgroundColor(getResources().getColor(R.color.gray_f8));
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
String title = getIntent().getStringExtra("title");
|
||||
mTvBaseTitle.setText(TextUtils.isEmpty(title) ? "数据上报" : title);
|
||||
mId = getIntent().getStringExtra("id");
|
||||
mContentId = getIntent().getStringExtra("contentId");
|
||||
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
ToastUtils.show("数据错误");
|
||||
finish();
|
||||
} else {
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
if (TextUtils.isEmpty(mContentId)) {
|
||||
initViews();
|
||||
mBtnConfirm.setText("上报");
|
||||
} else {
|
||||
mBtnConfirm.setText("保存");
|
||||
getDetailData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailData() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getDataReportDetail(mContentId)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<DataReportDetailBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull DataReportDetailBean dataReportDetailBean) {
|
||||
setDataToView(dataReportDetailBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
ExceptionHandler.handleException(e);
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 回显数据
|
||||
*/
|
||||
private void setDataToView(DataReportDetailBean bean) {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTemplateBean = buildTemplateBean(bean);
|
||||
mDetailBean = bean;
|
||||
mTvFormTitle.setText(bean.getIndexTemplateName());//标题
|
||||
mTvFormDate.setText(bean.getRecordDate());
|
||||
mTvFormYear.setText(bean.getRecordYear());
|
||||
mTvFormReportDept.setText(bean.getRecordDeptName());
|
||||
mTvFormReportUser.setText(UserLgUtils.getName());
|
||||
mTvFormPeriod.setText(bean.getRecordTypeText());
|
||||
mTvFormScope.setText(bean.getTemplateReportScopeText());
|
||||
parserList(mTemplateBean, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建模板bean
|
||||
*/
|
||||
private DataReportTemplateBean buildTemplateBean(DataReportDetailBean bean) {
|
||||
DataReportTemplateBean templateBean = new DataReportTemplateBean();
|
||||
templateBean.setIndexTemplateId(bean.getIndexTemplateId());
|
||||
templateBean.setTemplateName(bean.getIndexTemplateName());
|
||||
templateBean.setTemplateReportCycle(bean.getRecordType());
|
||||
templateBean.setTemplateReportCycleText(bean.getRecordTypeText());
|
||||
templateBean.setTemplateReportScope(bean.getTemplateReportScope());
|
||||
templateBean.setTemplateReportScopeText(bean.getTemplateReportScopeText());
|
||||
List<DataReportTemplateBean.IndexListBean> list = new ArrayList<>();
|
||||
for (int i = 0; i < bean.getIndexRecordList().size(); i++) {
|
||||
DataReportDetailBean.IndexRecordListBean indexRecordListBean = bean.getIndexRecordList().get(i);
|
||||
DataReportTemplateBean.IndexListBean listBean = new DataReportTemplateBean.IndexListBean();
|
||||
listBean.setIndexManageId(indexRecordListBean.getIndexManageId());
|
||||
listBean.setIndexManageName(indexRecordListBean.getIndexManageName());
|
||||
listBean.setIndexRepordContent(indexRecordListBean.getIndexRepordContent());
|
||||
listBean.setIndexManageUnit(indexRecordListBean.getIndexManageUnit());
|
||||
list.add(listBean);
|
||||
}
|
||||
templateBean.setIndexList(list);
|
||||
return templateBean;
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
getFormList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取表单字段
|
||||
*/
|
||||
private void getFormList() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getDataReportTemplate(mId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<DataReportTemplateBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull DataReportTemplateBean dataReportTemplateBean) {
|
||||
if (!TextUtils.isEmpty(dataReportTemplateBean.getIndexTemplateId())) {
|
||||
mTemplateBean = dataReportTemplateBean;
|
||||
parserList(dataReportTemplateBean, 1);
|
||||
} else {
|
||||
ToastUtils.show("数据有误");
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
ExceptionHandler.handleException(e);
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 渲染页面
|
||||
*/
|
||||
private void parserList(DataReportTemplateBean bean, int type) {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvFormTitle.setText(bean.getTemplateName());//标题
|
||||
mTvFormPeriod.setText(bean.getTemplateReportCycleText());//周期
|
||||
mTvFormScope.setText(bean.getTemplateReportScopeText());//范围
|
||||
mTvFormReportUser.setText(UserLgUtils.getName());//上报人
|
||||
if (type == 2) {
|
||||
mTvFormYear.setText(mDetailBean.getRecordYear());
|
||||
} else {
|
||||
String year = TimeUtils.getCurrentYear();
|
||||
mTvFormYear.setText(year);
|
||||
}
|
||||
mTvFormYear.setOnClickListener(v -> onShowYear());
|
||||
//部门
|
||||
String userDeptId = UserLgUtils.getUserDeptId();
|
||||
if (!TextUtils.isEmpty(userDeptId)) {
|
||||
Gson gson = new Gson();
|
||||
mDepts = gson.fromJson(userDeptId, new TypeToken<ArrayList<UserInfoBean.DepartmentsBean>>() {
|
||||
}.getType());
|
||||
if (type == 2) {
|
||||
mDeptBean = new UserInfoBean.DepartmentsBean();
|
||||
mDeptBean.setDepartmentName(mDetailBean.getRecordDeptName());
|
||||
mDeptBean.setDepartmentId(mDeptBean.getDepartmentId());
|
||||
mTvFormReportDept.setText(mDetailBean.getRecordDeptName());
|
||||
} else {
|
||||
if (mDepts != null && mDepts.size() > 0) {
|
||||
//上报部门
|
||||
mTvFormReportDept.setText(mDepts.get(0).getDepartmentName());
|
||||
mDeptBean = mDepts.get(0);
|
||||
} else {
|
||||
mTvFormReportDept.setText("暂无部门");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mTvFormReportDept.setText("暂无部门");
|
||||
}
|
||||
if (mDepts != null && mDepts.size() > 0) {
|
||||
mTvFormReportDept.setOnClickListener(v -> showDept());
|
||||
}
|
||||
mDates = new ArrayList<>();
|
||||
if ("MONTH".equals(bean.getTemplateReportCycle())) {
|
||||
//月度
|
||||
for (int i = 1; i < 13; i++) {
|
||||
DataReportDateBean b = new DataReportDateBean();
|
||||
b.setName(i + "月");
|
||||
b.setId(i + "");
|
||||
mDates.add(b);
|
||||
}
|
||||
} else {
|
||||
//季度
|
||||
DataReportDateBean b1 = new DataReportDateBean();
|
||||
b1.setId("1");
|
||||
b1.setName("第一季度");
|
||||
DataReportDateBean b2 = new DataReportDateBean();
|
||||
b2.setId("2");
|
||||
b2.setName("第二季度");
|
||||
DataReportDateBean b3 = new DataReportDateBean();
|
||||
b3.setId("3");
|
||||
b3.setName("第三季度");
|
||||
DataReportDateBean b4 = new DataReportDateBean();
|
||||
b4.setId("4");
|
||||
b4.setName("第四季度");
|
||||
mDates.add(b1);
|
||||
mDates.add(b2);
|
||||
mDates.add(b3);
|
||||
mDates.add(b4);
|
||||
}
|
||||
if (type == 2) {
|
||||
mSelDate = new DataReportDateBean();
|
||||
for (int i = 0; i < mDates.size(); i++) {
|
||||
if (mDetailBean.getRecordDate().equals(mDates.get(i).getId())) {
|
||||
mSelDate = mDates.get(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mSelDate = mDates.get(0);
|
||||
}
|
||||
mTvFormDate.setText(mSelDate.getName());
|
||||
mTvFormDate.setOnClickListener(v -> onShowDate());
|
||||
//构建动态
|
||||
buildList(bean.getIndexList());
|
||||
mBtnConfirm.setOnClickListener(v -> {
|
||||
if (TextUtils.isEmpty(mContentId)) {
|
||||
doSave();
|
||||
} else {
|
||||
doEdit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
private void doSave() {
|
||||
boolean isLegal = checkParams();
|
||||
if (isLegal) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.doSaveDataReport(body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseSuccessBean baseSuccessBean) {
|
||||
if (dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
ToastUtils.show("保存成功");
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
if (dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private RequestBody buildParams() {
|
||||
SaveDataReportBean bean = new SaveDataReportBean();
|
||||
bean.setIndexTemplateId(mTemplateBean.getIndexTemplateId());
|
||||
bean.setRecordType(mTemplateBean.getTemplateReportCycle());
|
||||
String year = mTvFormYear.getText().toString().trim();
|
||||
bean.setRecordYear(year);
|
||||
bean.setRecordDate(mSelDate.getId());
|
||||
bean.setRecordDeptId(mDeptBean.getDepartmentId());
|
||||
List<SaveDataReportBean.IndexBean> listBeans = new ArrayList<>();
|
||||
for (int i = 0; i < mAllViews.size(); i++) {
|
||||
SaveDataReportBean.IndexBean listBean = new SaveDataReportBean.IndexBean();
|
||||
EditText etValue = (EditText) mAllViews.get(i);
|
||||
String value = etValue.getText().toString().trim();
|
||||
DataReportTemplateBean.IndexListBean fieldBean = (DataReportTemplateBean.IndexListBean) etValue.getTag(R.id.tag_bean);
|
||||
listBean.setIndexRepordContent(value);
|
||||
listBean.setIndexManageId(fieldBean.getIndexManageId());
|
||||
listBeans.add(listBean);
|
||||
}
|
||||
bean.setIndexList(listBeans);
|
||||
return RequestBody.create(new Gson().toJson(bean), MediaType.parse("application/json; charset=utf-8"));
|
||||
}
|
||||
|
||||
private boolean checkParams() {
|
||||
if (mDeptBean == null) {
|
||||
ToastUtils.show("请选择上报部门");
|
||||
return false;
|
||||
}
|
||||
String year = mTvFormYear.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(year)) {
|
||||
ToastUtils.show("请选择上报年份");
|
||||
return false;
|
||||
}
|
||||
if (mSelDate == null) {
|
||||
ToastUtils.show("请选择上报周期");
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < mAllViews.size(); i++) {
|
||||
EditText etValue = (EditText) mAllViews.get(i);
|
||||
DataReportTemplateBean.IndexListBean fieldBean = (DataReportTemplateBean.IndexListBean) etValue.getTag(R.id.tag_bean);
|
||||
String value = etValue.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(value)) {
|
||||
ToastUtils.show("请输入" + fieldBean.getIndexManageName());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存修改
|
||||
*/
|
||||
private void doEdit() {
|
||||
boolean isLegal = checkParams();
|
||||
if (isLegal) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.doEditDataReport(mContentId, body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseSuccessBean baseSuccessBean) {
|
||||
if (dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
ToastUtils.show("保存成功");
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
if (dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示年份
|
||||
*/
|
||||
private void onShowYear() {
|
||||
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> {
|
||||
mTvFormYear.setText(TimeUtils.dateToStringYear(date));
|
||||
})
|
||||
.setTitleText("请选时间")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.isDialog(false)
|
||||
.setType(new boolean[]{true, false, false, false, false, false})
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mTimePickerView.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示日期
|
||||
*/
|
||||
private void onShowDate() {
|
||||
hideSoftKeyboard();
|
||||
if (mDates != null && mDates.size() > 0) {
|
||||
if (mDatePicker == null) {
|
||||
mDatePicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
mSelDate = mDates.get(o1);
|
||||
mTvFormDate.setText(mSelDate.getName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mDatePicker.setPicker(mDates);
|
||||
}
|
||||
mDatePicker.show();
|
||||
} else {
|
||||
ToastUtils.show("暂无数据");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 选择上报部门
|
||||
*/
|
||||
private void showDept() {
|
||||
hideSoftKeyboard();
|
||||
if (mDepts != null && mDepts.size() > 0) {
|
||||
if (mDeptPicker == null) {
|
||||
mDeptPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
mDeptBean = mDepts.get(o1);
|
||||
mTvFormReportDept.setText(mDeptBean.getDepartmentName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mDeptPicker.setPicker(mDepts);
|
||||
}
|
||||
mDeptPicker.show();
|
||||
} else {
|
||||
ToastUtils.show("暂无部门数据");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建指标列表
|
||||
*/
|
||||
private void buildList(List<DataReportTemplateBean.IndexListBean> indexList) {
|
||||
if (indexList == null || indexList.size() == 0) return;
|
||||
for (int i = 0; i < indexList.size(); i++) {
|
||||
buildEditView(indexList.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public void buildEditView(DataReportTemplateBean.IndexListBean fieldBean) {
|
||||
|
||||
LinearLayout llItem = getContentLayout(fieldBean);
|
||||
EditText editText = new EditText(mActivity);
|
||||
editText.setTag(R.id.tag_bean, fieldBean);
|
||||
editText.setHint("请输入" + fieldBean.getIndexManageName());
|
||||
editText.setTextSize(14);
|
||||
editText.setTextColor(getResources().getColor(R.color.black));
|
||||
editText.setHintTextColor(getResources().getColor(R.color.gray_text));
|
||||
editText.setBackground(null);
|
||||
editText.setGravity(Gravity.LEFT);
|
||||
editText.setInputType(InputType.TYPE_CLASS_NUMBER);
|
||||
if (!TextUtils.isEmpty(fieldBean.getIndexRepordContent())) {
|
||||
editText.setText(fieldBean.getIndexRepordContent());
|
||||
}
|
||||
editText.setMinLines(2);
|
||||
LinearLayout.LayoutParams contentParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
contentParams.topMargin = ConvertUtils.dp2px(5);
|
||||
contentParams.gravity = Gravity.LEFT;
|
||||
|
||||
editText.setLayoutParams(contentParams);
|
||||
String contentValue = "";
|
||||
if (!TextUtils.isEmpty(contentValue)) {
|
||||
editText.setText(contentValue);
|
||||
}
|
||||
llItem.addView(editText);
|
||||
llItem.setTag(R.id.tag_layout_type, "string");
|
||||
mLlContent.addView(llItem);
|
||||
mAllViews.add(editText);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建条目和标题布局
|
||||
*
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
private LinearLayout getContentLayout(DataReportTemplateBean.IndexListBean bean) {
|
||||
LinearLayout llContent = new LinearLayout(mActivity);
|
||||
llContent.setBackgroundColor(getResources().getColor(R.color.gray_f8));
|
||||
llContent.setPadding(ConvertUtils.dp2px(25), ConvertUtils.dp2px(5), ConvertUtils.dp2px(10), ConvertUtils.dp2px(5));
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
params.gravity = Gravity.CENTER_VERTICAL;
|
||||
llContent.setOrientation(LinearLayout.VERTICAL);
|
||||
llContent.setLayoutParams(params);
|
||||
//创建label
|
||||
LinearLayout.LayoutParams titleParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
TypeFaceTextView tvTitle = new TypeFaceTextView(mActivity);//字段名称
|
||||
titleParams.gravity = Gravity.CENTER_VERTICAL;
|
||||
tvTitle.setTextColor(getResources().getColor(R.color.black));
|
||||
tvTitle.setLayoutParams(titleParams);
|
||||
String unitText = TextUtils.isEmpty(bean.getIndexManageUnit()) ? "" : "(单位:" + bean.getIndexManageUnit() + ")";
|
||||
tvTitle.setText(bean.getIndexManageName() + unitText);
|
||||
tvTitle.setTextSize(14);
|
||||
llContent.addView(tvTitle);
|
||||
return llContent;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doSearchByTitle() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void clearSearch() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,278 @@
|
||||
package com.tenlionsoft.oamodule.activity.datareport;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView;
|
||||
import com.tenlionsoft.baselib.utils.ConvertUtils;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.beans.DataReportDetailBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
@Route(path = PathConfig.PATH_MODULE_OA_ACTIVITY_DATA_REPORT_DETAIL)
|
||||
public class DataReportDetailActivity extends BaseActivity {
|
||||
|
||||
@BindView(R2.id.ll_content)
|
||||
public LinearLayout mLlContent;
|
||||
@BindView(R2.id.tv_form_title)
|
||||
public TypeFaceTextView mTvFormTitle;
|
||||
@BindView(R2.id.tv_form_period)
|
||||
public TypeFaceTextView mTvFormPeriod;
|
||||
@BindView(R2.id.tv_form_scope)
|
||||
public TypeFaceTextView mTvFormScope;
|
||||
@BindView(R2.id.tv_form_report_user)
|
||||
public TypeFaceTextView mTvFormReportUser;
|
||||
@BindView(R2.id.tv_form_report_dept)
|
||||
public TypeFaceTextView mTvFormReportDept;
|
||||
@BindView(R2.id.tv_form_year)
|
||||
public TypeFaceTextView mTvFormYear;
|
||||
@BindView(R2.id.tv_form_date)
|
||||
public TypeFaceTextView mTvFormDate;
|
||||
@BindView(R2.id.btn_del)
|
||||
Button mBtnDel;
|
||||
|
||||
private String mId;
|
||||
private String mContentId;
|
||||
private String mTitle;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_data_report_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
ButterKnife.bind(this);
|
||||
mRlTitleBar.setBackgroundColor(getResources().getColor(R.color.gray_f8));
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
mTitle = getIntent().getStringExtra("title");
|
||||
mTvBaseTitle.setText(TextUtils.isEmpty(mTitle) ? "数据上报" : mTitle);
|
||||
mId = getIntent().getStringExtra("id");
|
||||
mContentId = getIntent().getStringExtra("contentId");
|
||||
if (TextUtils.isEmpty(mContentId)) {
|
||||
ToastUtils.show("数据错误");
|
||||
finish();
|
||||
} else {
|
||||
initViews();
|
||||
}
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
getDetailData();
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("修改");
|
||||
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_DATA_REPORT_ADD)
|
||||
.withString("id", mId)
|
||||
.withString("contentId", mContentId)
|
||||
.withString("title", mTitle)
|
||||
.navigation(mActivity, 15));
|
||||
mBtnDel.setOnClickListener(v -> doConfirmDel());
|
||||
}
|
||||
|
||||
private void doConfirmDel() {
|
||||
new AlertDialog.Builder(mActivity)
|
||||
.setTitle("提示")
|
||||
.setMessage("确定要删除该条数据吗?")
|
||||
.setPositiveButton("确定", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
doDel();
|
||||
})
|
||||
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
|
||||
.create()
|
||||
.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
private void doDel() {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "删除中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.doDelDataReport(mContentId)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull BaseSuccessBean baseSuccessBean) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
setResult(RESULT_OK);
|
||||
ToastUtils.show("删除成功");
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailData() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getDataReportDetail(mContentId)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<DataReportDetailBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull DataReportDetailBean dataReportList) {
|
||||
setDataToView(dataReportList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
ExceptionHandler.handleException(e);
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 回显数据
|
||||
*/
|
||||
private void setDataToView(DataReportDetailBean bean) {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvFormTitle.setText(bean.getIndexTemplateName());//标题
|
||||
mTvFormDate.setText(bean.getRecordDate());
|
||||
mTvFormYear.setText(bean.getRecordYear());
|
||||
mTvFormReportDept.setText(bean.getRecordDeptName());
|
||||
mTvFormReportUser.setText(UserLgUtils.getName());
|
||||
mTvFormPeriod.setText(bean.getRecordTypeText());
|
||||
mTvFormScope.setText(bean.getTemplateReportScopeText());
|
||||
|
||||
//范围
|
||||
for (int i = 0; i < bean.getIndexRecordList().size(); i++) {
|
||||
buildEditView(bean.getIndexRecordList().get(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void buildEditView(DataReportDetailBean.IndexRecordListBean fieldBean) {
|
||||
|
||||
LinearLayout llItem = getContentLayout(fieldBean);
|
||||
TextView editText = new TextView(mActivity);
|
||||
editText.setTag(R.id.tag_bean, fieldBean);
|
||||
editText.setTextSize(14);
|
||||
editText.setTextColor(getResources().getColor(R.color.black));
|
||||
editText.setHintTextColor(getResources().getColor(R.color.gray_text));
|
||||
editText.setBackground(null);
|
||||
editText.setText(fieldBean.getIndexRepordContent());
|
||||
editText.setGravity(Gravity.LEFT);
|
||||
editText.setMinLines(2);
|
||||
LinearLayout.LayoutParams contentParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
contentParams.topMargin = ConvertUtils.dp2px(5);
|
||||
contentParams.gravity = Gravity.LEFT;
|
||||
|
||||
editText.setLayoutParams(contentParams);
|
||||
String contentValue = "";
|
||||
if (!TextUtils.isEmpty(contentValue)) {
|
||||
editText.setText(contentValue);
|
||||
}
|
||||
llItem.addView(editText);
|
||||
llItem.setTag(R.id.tag_layout_type, "string");
|
||||
mLlContent.addView(llItem);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建条目和标题布局
|
||||
*
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
private LinearLayout getContentLayout(DataReportDetailBean.IndexRecordListBean bean) {
|
||||
LinearLayout llContent = new LinearLayout(mActivity);
|
||||
llContent.setBackgroundColor(getResources().getColor(R.color.gray_f8));
|
||||
llContent.setPadding(ConvertUtils.dp2px(25), ConvertUtils.dp2px(5), ConvertUtils.dp2px(10), ConvertUtils.dp2px(5));
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
params.gravity = Gravity.CENTER_VERTICAL;
|
||||
llContent.setOrientation(LinearLayout.VERTICAL);
|
||||
llContent.setLayoutParams(params);
|
||||
//创建label
|
||||
LinearLayout.LayoutParams titleParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
TypeFaceTextView tvTitle = new TypeFaceTextView(mActivity);//字段名称
|
||||
titleParams.gravity = Gravity.CENTER_VERTICAL;
|
||||
tvTitle.setTextColor(getResources().getColor(R.color.black));
|
||||
tvTitle.setLayoutParams(titleParams);
|
||||
String unitText = TextUtils.isEmpty(bean.getIndexManageUnit()) ? "" : "(单位:" + bean.getIndexManageUnit() + ")";
|
||||
tvTitle.setText(bean.getIndexManageName() + unitText);
|
||||
tvTitle.setTextSize(14);
|
||||
llContent.addView(tvTitle);
|
||||
return llContent;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 15) {
|
||||
if (RESULT_OK == resultCode) {
|
||||
mLlContent.removeAllViews();
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
getDetailData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doSearchByTitle() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void clearSearch() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.tenlionsoft.oamodule.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.beans.DataReportList;
|
||||
import com.tenlionsoft.oamodule.holder.DataReportMineHolder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/4/14 - 15:20
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class DataReportMineAdapter extends BaseRecyclerAdapter<DataReportList.RowsBean, DataReportMineHolder> {
|
||||
public DataReportMineAdapter(Context ctx, List<DataReportList.RowsBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataReportMineHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_data_report_mine, parent, false);
|
||||
return new DataReportMineHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(DataReportMineHolder h, int i) {
|
||||
DataReportList.RowsBean bean = mData.get(i);
|
||||
h.mTvTime.setText(bean.getGmtCreate());
|
||||
h.mTvUser.setText(bean.getCreatorName());
|
||||
if ("MONTH".equals(bean.getRecordType())) {
|
||||
h.mTvTitle.setText(bean.getRecordYear() + "年" + bean.getRecordDate() + "月");
|
||||
} else {
|
||||
h.mTvTitle.setText(bean.getRecordYear() + "年" + bean.getRecordDate() + "季度");
|
||||
}
|
||||
if (i == mData.size() - 1) {
|
||||
h.mLine.setVisibility(View.GONE);
|
||||
} else {
|
||||
h.mLine.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
@ -43,6 +43,7 @@ public class WorkReportAdapter extends BaseRecyclerAdapter<WorkReportDetailBean,
|
||||
} else {
|
||||
h.mIvStatus.setVisibility(View.GONE);
|
||||
}
|
||||
h.mTvCreate.setText(mData.get(i).getCreatorName());
|
||||
if (TextUtils.isEmpty(mData.get(i).getReportType())) {
|
||||
h.mTvType.setVisibility(View.GONE);
|
||||
} else {
|
||||
|
@ -0,0 +1,29 @@
|
||||
package com.tenlionsoft.oamodule.beans;
|
||||
|
||||
import com.contrarywind.interfaces.IPickerViewData;
|
||||
|
||||
public class DataReportDateBean implements IPickerViewData {
|
||||
private String name;
|
||||
private String id;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPickerViewText() {
|
||||
return name;
|
||||
}
|
||||
}
|
@ -0,0 +1,190 @@
|
||||
package com.tenlionsoft.oamodule.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DataReportDetailBean {
|
||||
|
||||
private String creator;
|
||||
private String creatorName;
|
||||
private String gmtCreate;
|
||||
private List<IndexRecordListBean> indexRecordList;
|
||||
private String indexTemplateId;
|
||||
private String indexTemplateName;
|
||||
private String indexTemplateRecordId;
|
||||
private String recordDate;
|
||||
private String recordDeptId;
|
||||
private String recordDeptName;
|
||||
private String recordType;
|
||||
private String recordTypeText;
|
||||
private String recordYear;
|
||||
private String templateReportScope;
|
||||
private String templateReportScopeText;
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getCreatorName() {
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName) {
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public List<IndexRecordListBean> getIndexRecordList() {
|
||||
return indexRecordList;
|
||||
}
|
||||
|
||||
public void setIndexRecordList(List<IndexRecordListBean> indexRecordList) {
|
||||
this.indexRecordList = indexRecordList;
|
||||
}
|
||||
|
||||
public String getIndexTemplateId() {
|
||||
return indexTemplateId;
|
||||
}
|
||||
|
||||
public void setIndexTemplateId(String indexTemplateId) {
|
||||
this.indexTemplateId = indexTemplateId;
|
||||
}
|
||||
|
||||
public String getIndexTemplateName() {
|
||||
return indexTemplateName;
|
||||
}
|
||||
|
||||
public void setIndexTemplateName(String indexTemplateName) {
|
||||
this.indexTemplateName = indexTemplateName;
|
||||
}
|
||||
|
||||
public String getIndexTemplateRecordId() {
|
||||
return indexTemplateRecordId;
|
||||
}
|
||||
|
||||
public void setIndexTemplateRecordId(String indexTemplateRecordId) {
|
||||
this.indexTemplateRecordId = indexTemplateRecordId;
|
||||
}
|
||||
|
||||
public String getRecordDate() {
|
||||
return recordDate;
|
||||
}
|
||||
|
||||
public void setRecordDate(String recordDate) {
|
||||
this.recordDate = recordDate;
|
||||
}
|
||||
|
||||
public String getRecordDeptId() {
|
||||
return recordDeptId;
|
||||
}
|
||||
|
||||
public void setRecordDeptId(String recordDeptId) {
|
||||
this.recordDeptId = recordDeptId;
|
||||
}
|
||||
|
||||
public String getRecordDeptName() {
|
||||
return recordDeptName;
|
||||
}
|
||||
|
||||
public void setRecordDeptName(String recordDeptName) {
|
||||
this.recordDeptName = recordDeptName;
|
||||
}
|
||||
|
||||
public String getRecordType() {
|
||||
return recordType;
|
||||
}
|
||||
|
||||
public void setRecordType(String recordType) {
|
||||
this.recordType = recordType;
|
||||
}
|
||||
|
||||
public String getRecordTypeText() {
|
||||
return recordTypeText;
|
||||
}
|
||||
|
||||
public void setRecordTypeText(String recordTypeText) {
|
||||
this.recordTypeText = recordTypeText;
|
||||
}
|
||||
|
||||
public String getRecordYear() {
|
||||
return recordYear;
|
||||
}
|
||||
|
||||
public void setRecordYear(String recordYear) {
|
||||
this.recordYear = recordYear;
|
||||
}
|
||||
|
||||
public String getTemplateReportScope() {
|
||||
return templateReportScope;
|
||||
}
|
||||
|
||||
public void setTemplateReportScope(String templateReportScope) {
|
||||
this.templateReportScope = templateReportScope;
|
||||
}
|
||||
|
||||
public String getTemplateReportScopeText() {
|
||||
return templateReportScopeText;
|
||||
}
|
||||
|
||||
public void setTemplateReportScopeText(String templateReportScopeText) {
|
||||
this.templateReportScopeText = templateReportScopeText;
|
||||
}
|
||||
|
||||
public static class IndexRecordListBean {
|
||||
private String indexManageId;
|
||||
private String indexManageName;
|
||||
private String indexRepordContent;
|
||||
private String indexTemplateRecordId;
|
||||
private String indexManageUnit;
|
||||
|
||||
public String getIndexManageUnit() {
|
||||
return indexManageUnit;
|
||||
}
|
||||
|
||||
public void setIndexManageUnit(String indexManageUnit) {
|
||||
this.indexManageUnit = indexManageUnit;
|
||||
}
|
||||
|
||||
public String getIndexManageId() {
|
||||
return indexManageId;
|
||||
}
|
||||
|
||||
public void setIndexManageId(String indexManageId) {
|
||||
this.indexManageId = indexManageId;
|
||||
}
|
||||
|
||||
public String getIndexManageName() {
|
||||
return indexManageName;
|
||||
}
|
||||
|
||||
public void setIndexManageName(String indexManageName) {
|
||||
this.indexManageName = indexManageName;
|
||||
}
|
||||
|
||||
public String getIndexRepordContent() {
|
||||
return indexRepordContent;
|
||||
}
|
||||
|
||||
public void setIndexRepordContent(String indexRepordContent) {
|
||||
this.indexRepordContent = indexRepordContent;
|
||||
}
|
||||
|
||||
public String getIndexTemplateRecordId() {
|
||||
return indexTemplateRecordId;
|
||||
}
|
||||
|
||||
public void setIndexTemplateRecordId(String indexTemplateRecordId) {
|
||||
this.indexTemplateRecordId = indexTemplateRecordId;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,136 @@
|
||||
package com.tenlionsoft.oamodule.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DataReportList {
|
||||
|
||||
private int page;
|
||||
private List<RowsBean> rows;
|
||||
private int total;
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public List<RowsBean> getRows() {
|
||||
return rows;
|
||||
}
|
||||
|
||||
public void setRows(List<RowsBean> rows) {
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public static class RowsBean {
|
||||
private String creator;
|
||||
private String creatorName;
|
||||
private String gmtCreate;
|
||||
private String indexTemplateId;
|
||||
private String indexTemplateRecordId;
|
||||
private String recordDate;
|
||||
private String recordDeptId;
|
||||
private String recordDeptName;
|
||||
private String recordType;
|
||||
private String recordTypeText;
|
||||
private String recordYear;
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getCreatorName() {
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName) {
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getIndexTemplateId() {
|
||||
return indexTemplateId;
|
||||
}
|
||||
|
||||
public void setIndexTemplateId(String indexTemplateId) {
|
||||
this.indexTemplateId = indexTemplateId;
|
||||
}
|
||||
|
||||
public String getIndexTemplateRecordId() {
|
||||
return indexTemplateRecordId;
|
||||
}
|
||||
|
||||
public void setIndexTemplateRecordId(String indexTemplateRecordId) {
|
||||
this.indexTemplateRecordId = indexTemplateRecordId;
|
||||
}
|
||||
|
||||
public String getRecordDate() {
|
||||
return recordDate;
|
||||
}
|
||||
|
||||
public void setRecordDate(String recordDate) {
|
||||
this.recordDate = recordDate;
|
||||
}
|
||||
|
||||
public String getRecordDeptId() {
|
||||
return recordDeptId;
|
||||
}
|
||||
|
||||
public void setRecordDeptId(String recordDeptId) {
|
||||
this.recordDeptId = recordDeptId;
|
||||
}
|
||||
|
||||
public String getRecordDeptName() {
|
||||
return recordDeptName;
|
||||
}
|
||||
|
||||
public void setRecordDeptName(String recordDeptName) {
|
||||
this.recordDeptName = recordDeptName;
|
||||
}
|
||||
|
||||
public String getRecordType() {
|
||||
return recordType;
|
||||
}
|
||||
|
||||
public void setRecordType(String recordType) {
|
||||
this.recordType = recordType;
|
||||
}
|
||||
|
||||
public String getRecordTypeText() {
|
||||
return recordTypeText;
|
||||
}
|
||||
|
||||
public void setRecordTypeText(String recordTypeText) {
|
||||
this.recordTypeText = recordTypeText;
|
||||
}
|
||||
|
||||
public String getRecordYear() {
|
||||
return recordYear;
|
||||
}
|
||||
|
||||
public void setRecordYear(String recordYear) {
|
||||
this.recordYear = recordYear;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,146 @@
|
||||
package com.tenlionsoft.oamodule.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DataReportTemplateBean {
|
||||
|
||||
private List<IndexListBean> indexList;
|
||||
private String indexTemplateId;
|
||||
private boolean report;
|
||||
private String templateName;
|
||||
private String templateReportCycle;
|
||||
private String templateReportCycleText;
|
||||
private String templateReportScope;
|
||||
private String templateReportScopeText;
|
||||
|
||||
public List<IndexListBean> getIndexList() {
|
||||
return indexList;
|
||||
}
|
||||
|
||||
public void setIndexList(List<IndexListBean> indexList) {
|
||||
this.indexList = indexList;
|
||||
}
|
||||
|
||||
public String getIndexTemplateId() {
|
||||
return indexTemplateId;
|
||||
}
|
||||
|
||||
public void setIndexTemplateId(String indexTemplateId) {
|
||||
this.indexTemplateId = indexTemplateId;
|
||||
}
|
||||
|
||||
public boolean isReport() {
|
||||
return report;
|
||||
}
|
||||
|
||||
public void setReport(boolean report) {
|
||||
this.report = report;
|
||||
}
|
||||
|
||||
public String getTemplateName() {
|
||||
return templateName;
|
||||
}
|
||||
|
||||
public void setTemplateName(String templateName) {
|
||||
this.templateName = templateName;
|
||||
}
|
||||
|
||||
public String getTemplateReportCycle() {
|
||||
return templateReportCycle;
|
||||
}
|
||||
|
||||
public void setTemplateReportCycle(String templateReportCycle) {
|
||||
this.templateReportCycle = templateReportCycle;
|
||||
}
|
||||
|
||||
public String getTemplateReportCycleText() {
|
||||
return templateReportCycleText;
|
||||
}
|
||||
|
||||
public void setTemplateReportCycleText(String templateReportCycleText) {
|
||||
this.templateReportCycleText = templateReportCycleText;
|
||||
}
|
||||
|
||||
public String getTemplateReportScope() {
|
||||
return templateReportScope;
|
||||
}
|
||||
|
||||
public void setTemplateReportScope(String templateReportScope) {
|
||||
this.templateReportScope = templateReportScope;
|
||||
}
|
||||
|
||||
public String getTemplateReportScopeText() {
|
||||
return templateReportScopeText;
|
||||
}
|
||||
|
||||
public void setTemplateReportScopeText(String templateReportScopeText) {
|
||||
this.templateReportScopeText = templateReportScopeText;
|
||||
}
|
||||
|
||||
public static class IndexListBean {
|
||||
private int id;
|
||||
private String indexManageId;
|
||||
private String indexManageName;
|
||||
private String indexManageUnit;
|
||||
private String indexTemplateId;
|
||||
|
||||
private String indexRepordContent;
|
||||
private double orderBy;
|
||||
|
||||
public String getIndexRepordContent() {
|
||||
return indexRepordContent;
|
||||
}
|
||||
|
||||
public void setIndexRepordContent(String indexRepordContent) {
|
||||
this.indexRepordContent = indexRepordContent;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIndexManageId() {
|
||||
return indexManageId;
|
||||
}
|
||||
|
||||
public void setIndexManageId(String indexManageId) {
|
||||
this.indexManageId = indexManageId;
|
||||
}
|
||||
|
||||
public String getIndexManageName() {
|
||||
return indexManageName;
|
||||
}
|
||||
|
||||
public void setIndexManageName(String indexManageName) {
|
||||
this.indexManageName = indexManageName;
|
||||
}
|
||||
|
||||
public String getIndexManageUnit() {
|
||||
return indexManageUnit;
|
||||
}
|
||||
|
||||
public void setIndexManageUnit(String indexManageUnit) {
|
||||
this.indexManageUnit = indexManageUnit;
|
||||
}
|
||||
|
||||
public String getIndexTemplateId() {
|
||||
return indexTemplateId;
|
||||
}
|
||||
|
||||
public void setIndexTemplateId(String indexTemplateId) {
|
||||
this.indexTemplateId = indexTemplateId;
|
||||
}
|
||||
|
||||
public double getOrderBy() {
|
||||
return orderBy;
|
||||
}
|
||||
|
||||
public void setOrderBy(double orderBy) {
|
||||
this.orderBy = orderBy;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
package com.tenlionsoft.oamodule.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/4/19 - 14:48
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class SaveDataReportBean {
|
||||
private String indexTemplateId;// 模板ID
|
||||
private String recordType;// 上报类型
|
||||
private String recordYear;// 上报年份
|
||||
private String recordDate;// 上报日期
|
||||
private String recordDeptId;// 上报部门ID
|
||||
private List<IndexBean> indexList;// 上报指标集和
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SaveDataReportBean{" +
|
||||
"indexTemplateId='" + indexTemplateId + '\'' +
|
||||
", recordType='" + recordType + '\'' +
|
||||
", recordYear='" + recordYear + '\'' +
|
||||
", recordDate='" + recordDate + '\'' +
|
||||
", recordDeptId='" + recordDeptId + '\'' +
|
||||
", indexList=" + indexList +
|
||||
'}';
|
||||
}
|
||||
|
||||
public String getIndexTemplateId() {
|
||||
return indexTemplateId;
|
||||
}
|
||||
|
||||
public void setIndexTemplateId(String indexTemplateId) {
|
||||
this.indexTemplateId = indexTemplateId;
|
||||
}
|
||||
|
||||
public String getRecordType() {
|
||||
return recordType;
|
||||
}
|
||||
|
||||
public void setRecordType(String recordType) {
|
||||
this.recordType = recordType;
|
||||
}
|
||||
|
||||
public String getRecordYear() {
|
||||
return recordYear;
|
||||
}
|
||||
|
||||
public void setRecordYear(String recordYear) {
|
||||
this.recordYear = recordYear;
|
||||
}
|
||||
|
||||
public String getRecordDate() {
|
||||
return recordDate;
|
||||
}
|
||||
|
||||
public void setRecordDate(String recordDate) {
|
||||
this.recordDate = recordDate;
|
||||
}
|
||||
|
||||
public String getRecordDeptId() {
|
||||
return recordDeptId;
|
||||
}
|
||||
|
||||
public void setRecordDeptId(String recordDeptId) {
|
||||
this.recordDeptId = recordDeptId;
|
||||
}
|
||||
|
||||
public List<IndexBean> getIndexList() {
|
||||
return indexList;
|
||||
}
|
||||
|
||||
public void setIndexList(List<IndexBean> indexList) {
|
||||
this.indexList = indexList;
|
||||
}
|
||||
|
||||
public static class IndexBean {
|
||||
|
||||
private String indexManageId;// 指标ID
|
||||
private String indexRepordContent;// 填报值
|
||||
|
||||
public String getIndexManageId() {
|
||||
return indexManageId;
|
||||
}
|
||||
|
||||
public void setIndexManageId(String indexManageId) {
|
||||
this.indexManageId = indexManageId;
|
||||
}
|
||||
|
||||
public String getIndexRepordContent() {
|
||||
return indexRepordContent;
|
||||
}
|
||||
|
||||
public void setIndexRepordContent(String indexRepordContent) {
|
||||
this.indexRepordContent = indexRepordContent;
|
||||
}
|
||||
}
|
||||
}
|
@ -8,47 +8,24 @@ package com.tenlionsoft.oamodule.beans;
|
||||
*/
|
||||
public class WorkReportDetailBean {
|
||||
|
||||
private String creatorName;
|
||||
private String reportContent;
|
||||
private String reportEgress;
|
||||
private String reportFiles;
|
||||
private String reportTitle;
|
||||
private String reportType;
|
||||
private String workReportId;
|
||||
private String reprotDate;
|
||||
private String reprotState;
|
||||
private String reprotUserIds;
|
||||
private String reprotUserNames;
|
||||
private String reprotState;
|
||||
private String workReportId;
|
||||
|
||||
public String getReprotDate() {
|
||||
return reprotDate;
|
||||
public String getCreatorName() {
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setReprotDate(String reprotDate) {
|
||||
this.reprotDate = reprotDate;
|
||||
}
|
||||
|
||||
public String getReprotUserIds() {
|
||||
return reprotUserIds;
|
||||
}
|
||||
|
||||
public void setReprotUserIds(String reprotUserIds) {
|
||||
this.reprotUserIds = reprotUserIds;
|
||||
}
|
||||
|
||||
public String getReprotUserNames() {
|
||||
return reprotUserNames;
|
||||
}
|
||||
|
||||
public void setReprotUserNames(String reprotUserNames) {
|
||||
this.reprotUserNames = reprotUserNames;
|
||||
}
|
||||
|
||||
public String getReprotState() {
|
||||
return reprotState;
|
||||
}
|
||||
|
||||
public void setReprotState(String reprotState) {
|
||||
this.reprotState = reprotState;
|
||||
public void setCreatorName(String creatorName) {
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getReportContent() {
|
||||
@ -91,6 +68,38 @@ public class WorkReportDetailBean {
|
||||
this.reportType = reportType;
|
||||
}
|
||||
|
||||
public String getReprotDate() {
|
||||
return reprotDate;
|
||||
}
|
||||
|
||||
public void setReprotDate(String reprotDate) {
|
||||
this.reprotDate = reprotDate;
|
||||
}
|
||||
|
||||
public String getReprotState() {
|
||||
return reprotState;
|
||||
}
|
||||
|
||||
public void setReprotState(String reprotState) {
|
||||
this.reprotState = reprotState;
|
||||
}
|
||||
|
||||
public String getReprotUserIds() {
|
||||
return reprotUserIds;
|
||||
}
|
||||
|
||||
public void setReprotUserIds(String reprotUserIds) {
|
||||
this.reprotUserIds = reprotUserIds;
|
||||
}
|
||||
|
||||
public String getReprotUserNames() {
|
||||
return reprotUserNames;
|
||||
}
|
||||
|
||||
public void setReprotUserNames(String reprotUserNames) {
|
||||
this.reprotUserNames = reprotUserNames;
|
||||
}
|
||||
|
||||
public String getWorkReportId() {
|
||||
return workReportId;
|
||||
}
|
||||
|
@ -428,10 +428,14 @@ public class OaMainFragment extends BaseFragment {
|
||||
* 功能跳转
|
||||
*/
|
||||
private void choosePage(FuncBean funcBean) {
|
||||
String path = funcBean.getAppFunctionPath();
|
||||
String[] pathArray = path.split("\\?");
|
||||
String url = pathArray[0];
|
||||
ARouter.getInstance()
|
||||
.build(funcBean.getAppFunctionPath())
|
||||
.build(url)
|
||||
.withString("title", funcBean.getAppFunctionName())
|
||||
.withString("id", funcBean.getAppFunctionId())
|
||||
.withString("params", pathArray.length > 1 ? pathArray[1] : "")
|
||||
.navigation();
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.tenlionsoft.oamodule.holder;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseViewHolder;
|
||||
import com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import butterknife.BindView;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/4/14 - 15:15
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class DataReportMineHolder extends BaseViewHolder {
|
||||
@BindView(R2.id.tv_time)
|
||||
public TextView mTvTime;
|
||||
@BindView(R2.id.tv_title)
|
||||
public TextView mTvTitle;
|
||||
@BindView(R2.id.tv_user)
|
||||
public TextView mTvUser;
|
||||
@BindView(R2.id.line)
|
||||
public View mLine;
|
||||
|
||||
public DataReportMineHolder(@NonNull @NotNull View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
}
|
@ -31,6 +31,8 @@ public class WorkReportHolder extends BaseViewHolder {
|
||||
public TypeFaceTextView mTvDate;
|
||||
@BindView(R2.id.iv_status)
|
||||
public ImageView mIvStatus;
|
||||
@BindView(R2.id.tv_create)
|
||||
public TypeFaceTextView mTvCreate;
|
||||
|
||||
public WorkReportHolder(@NonNull @NotNull View itemView) {
|
||||
super(itemView);
|
||||
|
@ -9,6 +9,9 @@ import com.tenlionsoft.oamodule.beans.ByCarRecordListBean;
|
||||
import com.tenlionsoft.oamodule.beans.BySuperviseListBean;
|
||||
import com.tenlionsoft.oamodule.beans.CarBean;
|
||||
import com.tenlionsoft.oamodule.beans.ChoosePersonListBean;
|
||||
import com.tenlionsoft.oamodule.beans.DataReportDetailBean;
|
||||
import com.tenlionsoft.oamodule.beans.DataReportList;
|
||||
import com.tenlionsoft.oamodule.beans.DataReportTemplateBean;
|
||||
import com.tenlionsoft.oamodule.beans.DepartmentListBean;
|
||||
import com.tenlionsoft.oamodule.beans.DocTypeBean;
|
||||
import com.tenlionsoft.oamodule.beans.DocTypeTreeListBean;
|
||||
@ -1106,4 +1109,56 @@ public interface OAApi {
|
||||
@Headers({"Content-Type: application/json", "need_token:true", "Accept: application/json"})
|
||||
@GET("app/department/user/list-with-user")
|
||||
Observable<List<UserDatabaseBean>> getAllUserList();
|
||||
|
||||
//============数据上报==============
|
||||
|
||||
/**
|
||||
* 获取上报模板详情
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Headers({"base_url_name:oa", "Content-Type: application/json", "need_token:true", "Accept: application/json"})
|
||||
@GET("app/indextemplate/get-info/{indexTemplateId}")
|
||||
Observable<DataReportTemplateBean> getDataReportTemplate(@Path("indexTemplateId") String id);
|
||||
|
||||
/**
|
||||
* 保存数据指标
|
||||
*
|
||||
* @param body
|
||||
* @return
|
||||
*/
|
||||
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/indextemplaterecord/save")
|
||||
Observable<BaseSuccessBean> doSaveDataReport(@Body RequestBody body);
|
||||
|
||||
/**
|
||||
* 获取我上报的列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/indextemplaterecord/listpage-me")
|
||||
Observable<DataReportList> getMineDataReportList(@Query("indexTemplateId") String id, @Query("page") String page);
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*/
|
||||
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/indextemplaterecord/get/{indexTemplateRecordId}")
|
||||
Observable<DataReportDetailBean> getDataReportDetail(@Path("indexTemplateRecordId") String id);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
|
||||
@DELETE("app/indextemplaterecord/remove/{ids}")
|
||||
Observable<BaseSuccessBean> doDelDataReport(@Path("ids") String id);
|
||||
|
||||
/**
|
||||
* 编辑保存
|
||||
*/
|
||||
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
|
||||
@PUT("app/indextemplaterecord/update/{indexTemplateRecordId}")
|
||||
Observable<BaseSuccessBean> doEditDataReport(@Path("indexTemplateRecordId") String id, @Body RequestBody body);
|
||||
}
|
||||
|
60
oamodule/src/main/res/layout/activity_data_report.xml
Normal file
60
oamodule/src/main/res/layout/activity_data_report.xml
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="10dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_hint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb_loading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminateBehavior="repeat"
|
||||
android:indeterminateDrawable="@drawable/anim_loading" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty_data"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/ic_empty_data" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_error_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:clickable="true"
|
||||
android:textColor="@color/black"
|
||||
tools:text="加载数据失败" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
274
oamodule/src/main/res/layout/activity_data_report_add.xml
Normal file
274
oamodule/src/main/res/layout/activity_data_report_add.xml
Normal file
@ -0,0 +1,274 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/gray_f8"
|
||||
android:gravity="center"
|
||||
android:hint="统计名称"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16dp"
|
||||
app:text_type_cus="2" />
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@drawable/ic_title_period_icon" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报周期"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_period"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="上报周期"
|
||||
android:textColor="@color/text_80_gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@drawable/ic_title_scope_icon" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报范围"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_scope"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="上报范围"
|
||||
android:textColor="@color/text_80_gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:src="@drawable/ic_meeting_emcee_icon" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报人"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_report_user"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="上报人"
|
||||
android:textColor="@color/text_80_gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:src="@drawable/ic_title_dept_icon" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报部门"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_report_dept"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="上报部门"
|
||||
android:textColor="@color/text_80_gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@drawable/ic_title_year_icon" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报年份"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_year"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="上报年份"
|
||||
android:textColor="@color/text_80_gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:src="@drawable/ic_title_data_icon" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报日期"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="上报日期"
|
||||
android:textColor="@color/text_80_gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报指标"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="15sp"
|
||||
app:text_type_cus="2" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/sel_btn_submit_no_size"
|
||||
android:text="上报"
|
||||
android:textColor="@color/col_white_gray_press" />
|
||||
</RelativeLayout>
|
270
oamodule/src/main/res/layout/activity_data_report_detail.xml
Normal file
270
oamodule/src/main/res/layout/activity_data_report_detail.xml
Normal file
@ -0,0 +1,270 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/gray_f8"
|
||||
android:gravity="center"
|
||||
android:hint="统计名称"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16dp"
|
||||
app:text_type_cus="2" />
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@drawable/ic_title_period_icon" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报周期"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_period"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/text_80_gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@drawable/ic_title_scope_icon" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报范围"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_scope"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/text_80_gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:src="@drawable/ic_meeting_emcee_icon" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报人"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_report_user"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/text_80_gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:src="@drawable/ic_title_dept_icon" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报部门"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_report_dept"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/text_80_gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@drawable/ic_title_year_icon" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报年份"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_year"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/text_80_gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="17dp"
|
||||
android:layout_height="17dp"
|
||||
android:src="@drawable/ic_title_data_icon" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报日期"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_form_date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/text_80_gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_hor_content_no_margin_padding"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@color/gray_f8">
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="上报指标"
|
||||
android:textColor="@color/black_10"
|
||||
android:textSize="15sp"
|
||||
app:text_type_cus="2" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_del"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/sel_btn_gray_red"
|
||||
android:text="删除"
|
||||
android:textColor="@color/col_white_gray" />
|
||||
</RelativeLayout>
|
74
oamodule/src/main/res/layout/item_data_report_mine.xml
Normal file
74
oamodule/src/main/res/layout/item_data_report_mine.xml
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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="wrap_content"
|
||||
android:layout_marginStart="17dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_meeting_hint"
|
||||
android:layout_width="31dp"
|
||||
android:layout_height="31dp"
|
||||
android:src="@drawable/ic_clock_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="14dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/text_16"
|
||||
app:text_type_cus="2"
|
||||
tools:text="2023年6月" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#89000000"
|
||||
android:textSize="12sp"
|
||||
tools:text="2022-22-22 12:12:12" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=" | "
|
||||
android:textColor="#89000000"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_user"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#89000000"
|
||||
android:textSize="12sp"
|
||||
tools:text="100人" />
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:id="@+id/line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="#F9F9F9" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -64,14 +64,31 @@
|
||||
android:textSize="@dimen/text_14"
|
||||
tools:text="工作内容工作内容工作内容工作内容工作内容工作内容工作内容工作内容工作内容工作内容工作内容工作内容工作内容工作内容工作内容工作内容工作内容工作内容工作内容" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_date"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:gravity="right"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/text_14"
|
||||
tools:text="20022-22-22" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_create"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/gray_80"
|
||||
android:textSize="@dimen/text_12"
|
||||
tools:text="张三" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_date"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="right"
|
||||
android:textColor="@color/gray_80"
|
||||
android:textSize="@dimen/text_12"
|
||||
tools:text="20022-22-22" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user