1.1.1版本发布

master
hwf453 1 year ago
parent cfc2bd9285
commit 9493b4861b

@ -10,8 +10,8 @@ android {
applicationId "com.rehome.dywoa"
minSdk 24
targetSdk 34
versionCode 11
versionName "1.1.0"
versionCode 12
versionName "1.1.1"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
//authorities

@ -3,7 +3,7 @@
<!-- 数据库名字 -->
<dbname value="rehomeDywoa"></dbname>
<!-- 版本号 -->
<version value="7"></version>
<version value="8"></version>
<!-- 配置表 -->
<list>
<!-- 配置表的路径需要继承DataSupport -->

@ -12,10 +12,10 @@ public class Contans {
// public static String IP_EXTRANET = "http://192.168.2.21:8601/";
// public static String SIS_TOKEN_IP = "https://sis.dywzhny.com.cn/";
public static String IP = "http://192.168.2.150:8601/";
public static String IP_INTRANET = "http://192.168.2.150:8601/";
public static String IP_EXTRANET = "http://192.168.2.150:8601/";
public static String SIS_TOKEN_IP = "https://sis.dywzhny.com.cn/";
// public static String IP = "http://192.168.2.150:8601/";
// public static String IP_INTRANET = "http://192.168.2.150:8601/";
// public static String IP_EXTRANET = "http://192.168.2.150:8601/";
// public static String SIS_TOKEN_IP = "https://sis.dywzhny.com.cn/";
// public static String IP = "http://192.168.2.76:8601/";
// public static String IP_INTRANET = "http://192.168.2.76:8601/";
@ -44,13 +44,13 @@ public class Contans {
//APP登录接口厂内服务器IP
// public static String IP = "http://10.25.188.126:8601/";
// //app内网
// public static String IP_INTRANET = "http://10.25.188.126:8601/";
// //app外网
// public static String IP_EXTRANET = "http://10.25.188.126:8601/";
// //SIS系统厂内IP
// public static String SIS_TOKEN_IP = "https://sis.dywzhny.com.cn/";
public static String IP = "http://10.25.188.126:8601/";
//app内网
public static String IP_INTRANET = "http://10.25.188.126:8601/";
//app外网
public static String IP_EXTRANET = "http://10.25.188.126:8601/";
//SIS系统厂内IP
public static String SIS_TOKEN_IP = "https://sis.dywzhny.com.cn/";

@ -37,8 +37,8 @@ public class XSJJHDataBean extends DataSupport implements Parcelable {
private String smfs;
private String dpx;
private String sisData;
private String LRFS;
private String MRNR;
private String LRFS;//录入方式
private String MRNR;//标准
private XSJJHXZDataBean xsjjhxzDataBean;
private boolean checked;//是否已经检查
private boolean uploaded;//是否已上传 true 已上传 false 未上传
@ -51,24 +51,33 @@ public class XSJJHDataBean extends DataSupport implements Parcelable {
private String CJJG;
private String BJMC;
private String TYJCZT;
private String BJMC;//部件名称
private String TYJCZT;//停用检测状态
private String nfcbm;
private String txm;
private String nfcbm;//NFC编码
private String txm;//二维码或条型码
private String TJXJZT;
private String second;
private String TJXJZT;//停用检测状态
private String second;//第二次点击
private String username;
private String username;//工号
private String jhmc;
private String jhmc;//计划名称
private String qybh;
private String qymc;
private String qybh;//区域编号
private String qymc;//区域名称
private String photos;//图片集合
private String xcms;
private String xcms;//缺陷描述
private String kksCode;//kks编码
private String kksDesc;//kks描述
private String UPPERACTION;//超限上限
private String LOWERACTION;//超限下限
private String UPPERWARNING;//报警上限
private String LOWERWARNING;//报警下限
private String POINTNAME;//检查项(温度,声音)
private String UNITOFMEASURE;//巡检点值单位
public long getId() {
@ -448,6 +457,70 @@ public class XSJJHDataBean extends DataSupport implements Parcelable {
this.xcms = xcms;
}
public String getKksCode() {
return kksCode;
}
public void setKksCode(String kksCode) {
this.kksCode = kksCode;
}
public String getKksDesc() {
return kksDesc;
}
public void setKksDesc(String kksDesc) {
this.kksDesc = kksDesc;
}
public String getUPPERACTION() {
return UPPERACTION;
}
public void setUPPERACTION(String UPPERACTION) {
this.UPPERACTION = UPPERACTION;
}
public String getLOWERACTION() {
return LOWERACTION;
}
public void setLOWERACTION(String LOWERACTION) {
this.LOWERACTION = LOWERACTION;
}
public String getUPPERWARNING() {
return UPPERWARNING;
}
public void setUPPERWARNING(String UPPERWARNING) {
this.UPPERWARNING = UPPERWARNING;
}
public String getLOWERWARNING() {
return LOWERWARNING;
}
public void setLOWERWARNING(String LOWERWARNING) {
this.LOWERWARNING = LOWERWARNING;
}
public String getPOINTNAME() {
return POINTNAME;
}
public void setPOINTNAME(String POINTNAME) {
this.POINTNAME = POINTNAME;
}
public String getUNITOFMEASURE() {
return UNITOFMEASURE;
}
public void setUNITOFMEASURE(String UNITOFMEASURE) {
this.UNITOFMEASURE = UNITOFMEASURE;
}
@Override
public int describeContents() {
return 0;
@ -501,6 +574,14 @@ public class XSJJHDataBean extends DataSupport implements Parcelable {
dest.writeString(this.TYJCZT);
dest.writeString(this.photos);
dest.writeString(this.xcms);
dest.writeString(this.kksCode);
dest.writeString(this.kksDesc);
dest.writeString(this.UPPERACTION);
dest.writeString(this.LOWERACTION);
dest.writeString(this.UPPERWARNING);
dest.writeString(this.LOWERWARNING);
dest.writeString(this.POINTNAME);
dest.writeString(this.UNITOFMEASURE);
}
public XSJJHDataBean() {
@ -553,6 +634,16 @@ public class XSJJHDataBean extends DataSupport implements Parcelable {
this.TYJCZT = in.readString();
this.photos = in.readString();
this.xcms = in.readString();
this.kksCode = in.readString();
this.kksDesc = in.readString();
this.UPPERACTION = in.readString();
this.LOWERACTION = in.readString();
this.UPPERWARNING = in.readString();
this.LOWERWARNING = in.readString();
this.POINTNAME = in.readString();
this.UNITOFMEASURE = in.readString();
}
public static final Creator<XSJJHDataBean> CREATOR = new Creator<XSJJHDataBean>() {

@ -189,8 +189,8 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
if (BuildConfig.LOG_ERROR) {
//测试
binding.etUsername.setText("371522")
binding.etPassword.setText("A000000a")
// binding.etUsername.setText("371522")
// binding.etPassword.setText("A000000a")
// binding.etUsername.setText("371543")
// binding.etPassword.setText("Dyw@2024")
@ -657,8 +657,8 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
startActivity(intent)
finish()
}else{
// showLog("之后")
// showToast("登录失败")
showLog("之后")
showToast("登录失败")
}

@ -21,6 +21,7 @@ import com.rehome.dywoa.adapter.XzjhAdapter;
import com.rehome.dywoa.base.BaseFragment;
import com.rehome.dywoa.entity.ScDjjhInfo;
import com.rehome.dywoa.entity.StatusInfo;
import com.rehome.dywoa.utils.DataPassUtils;
import com.rehome.dywoa.utils.GsonUtils;
import com.rehome.dywoa.utils.HttpListener;
import com.rehome.dywoa.utils.HttpResponseListener;
@ -416,15 +417,19 @@ public class DjdscFragment extends BaseFragment {
//UiUtlis.encoder(json)
request.setDefineRequestBodyForJson(json);
if(App.getInstance().getUserInfo()!=null&&App.getInstance().getUserInfo().getToken()!=null){
String token = App.getInstance().getUserInfo().getToken();
String credential = "Bearer " + token;
request.addHeader("Authorization", credential);
request.addHeader("token", token);
showLog(request.url());
if(DataPassUtils.checkCanDj()){
if(App.getInstance().getUserInfo()!=null&&App.getInstance().getUserInfo().getToken()!=null){
String token = App.getInstance().getUserInfo().getToken();
String credential = "Bearer " + token;
request.addHeader("Authorization", credential);
request.addHeader("token", token);
showLog(request.url());
// showLog(credential);
// showLog(new Gson().toJson(request.headers()));
}
}
queue.add(0, request, new HttpResponseListener<>(getActivity(), request, callback, false, false, ""));
}

@ -3,6 +3,7 @@ package com.rehome.dywoa.ui.activity.sbxdjgl;
import android.content.ContentValues;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
@ -20,6 +21,7 @@ import com.rehome.dywoa.DBModel.DjjhRwQy;
import com.rehome.dywoa.R;
import com.rehome.dywoa.adapter.MyFragmentYXAdapter;
import com.rehome.dywoa.base.BaseFragment;
import com.rehome.dywoa.ui.activity.sbxj.SbxjcjsbActivity;
import com.rehome.dywoa.utils.ControllerActivity;
import com.rehome.dywoa.utils.GsonUtils;
import com.rehome.dywoa.weiget.AutoRadioGroup;
@ -46,6 +48,7 @@ public class SjcjFragment extends BaseFragment {
Button btn_next;
Button btn_save_next;
Button btn_exit;
Button btn_submit_qx;
private void findView() {
vp = view.findViewById(R.id.vp);
@ -57,6 +60,7 @@ public class SjcjFragment extends BaseFragment {
btn_next = view.findViewById(R.id.btn_next);
btn_save_next = view.findViewById(R.id.btn_save_next);
btn_exit = view.findViewById(R.id.btn_exit);
btn_submit_qx = view.findViewById(R.id.btn_submit_qx);
btn_last.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -78,6 +82,19 @@ public class SjcjFragment extends BaseFragment {
next();
}
});
btn_submit_qx.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(requireActivity(), SQxgdlrfActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
if(!TextUtils.isEmpty(lists.get(item - 1).getASSETNUM())){
intent.putExtra("kks", lists.get(item - 1).getASSETNUM());
}
startActivity(intent);
}
});
btn_exit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

@ -33,6 +33,7 @@ import com.rehome.dywoa.DBModel.Zy;
import com.rehome.dywoa.R;
import com.rehome.dywoa.adapter.XzjhAdapter;
import com.rehome.dywoa.base.BaseFragment;
import com.rehome.dywoa.utils.DataPassUtils;
import com.rehome.dywoa.utils.GsonUtils;
import com.rehome.dywoa.utils.HttpListener;
import com.rehome.dywoa.utils.HttpResponseListener;
@ -395,16 +396,20 @@ public class XzjhFragment extends BaseFragment {
showLog(Contans.IP + Contans.DJJHDLB);
showLog(json);
if (App.getInstance().getUserInfo() != null && App.getInstance().getUserInfo().getToken() != null) {
String token = App.getInstance().getUserInfo().getToken();
String credential = "Bearer " + token;
request.addHeader("Authorization", credential);
request.addHeader("token", token);
showLog(request.url());
if(DataPassUtils.checkCanDj()){
if (App.getInstance().getUserInfo() != null && App.getInstance().getUserInfo().getToken() != null) {
String token = App.getInstance().getUserInfo().getToken();
String credential = "Bearer " + token;
request.addHeader("Authorization", credential);
request.addHeader("token", token);
showLog(request.url());
// showLog(credential);
// showLog(new Gson().toJson(request.headers()));
}
}
queue.add(1, request, new HttpResponseListener<>(getActivity(), request, new HttpListener<String>() {
@Override
public void onSucceed(int what, Response<String> response) {
@ -688,7 +693,7 @@ public class XzjhFragment extends BaseFragment {
request.setDefineRequestBodyForJson(json);
NoProgresshttpUtils.getInstance().add(requireActivity(), 0, request, new HttpListener<String>() {
NoProgresshttpUtils.getInstance().addDj(requireActivity(), 0, request, new HttpListener<String>() {
@Override
public void onSucceed(int what, Response<String> response) {

@ -6,6 +6,7 @@ import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
@ -23,6 +24,7 @@ import com.rehome.dywoa.R;
import com.rehome.dywoa.adapter.MyFragmentAdapter;
import com.rehome.dywoa.base.BaseActivity;
import com.rehome.dywoa.bean.SetxjSbModel;
import com.rehome.dywoa.ui.activity.sbxdjgl.SQxgdlrfActivity;
import com.rehome.dywoa.ui.activity.sbxdjgl.XcjsFragment;
import com.rehome.dywoa.utils.GsonUtils;
import com.rehome.dywoa.weiget.AutoRadioGroup;
@ -52,6 +54,7 @@ public class SbxjcjsbActivity extends BaseActivity {
Button btnNext;
Button btnExit;
Button btnLast;
Button btn_submit_qx;
private MyFragmentAdapter adapter;
private List<Fragment> list;
@ -87,6 +90,7 @@ public class SbxjcjsbActivity extends BaseActivity {
btnNext = findViewById(R.id.btn_next);
btnLast = findViewById(R.id.btn_last);
btnExit = findViewById(R.id.btn_exit);
btn_submit_qx = findViewById(R.id.btn_submit_qx);
username = App.getInstance().getUserInfo().getManid();
btnLast.setOnClickListener(new View.OnClickListener() {
@ -95,9 +99,11 @@ public class SbxjcjsbActivity extends BaseActivity {
--item;
if (item == 0) {
btnLast.setEnabled(false);
btnNext.setEnabled(true);
item++;
showToast("当前为第一条");
} else {
btnNext.setEnabled(true);
xjcjFragment.updata(xsjjhDataBeanArrayList.get(item - 1), item, xsjjhDataBeanArrayList.size());
}
}
@ -115,6 +121,18 @@ public class SbxjcjsbActivity extends BaseActivity {
}
});
btn_submit_qx.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(SbxjcjsbActivity.this, SQxgdlrfActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
if(!TextUtils.isEmpty(xsjjhDataBeanArrayList.get(item - 1).getKksCode())){
intent.putExtra("kks", xsjjhDataBeanArrayList.get(item - 1).getKksCode());
}
startActivity(intent);
}
});
btnExit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -234,6 +252,12 @@ public class SbxjcjsbActivity extends BaseActivity {
btnNext.setVisibility(View.VISIBLE);
}
if(isEdit){
btn_submit_qx.setVisibility(View.VISIBLE);
}else{
btn_submit_qx.setVisibility(View.GONE);
}
showLog("---------------->>>>>>>>");
showLog(GsonUtils.GsonString(xsjjhDataBeanArrayList));
}
@ -314,7 +338,7 @@ public class SbxjcjsbActivity extends BaseActivity {
if(xsjjhDataBeanArrayList!=null&&xsjjhDataBeanArrayList.size()==1){
//只有一条数据
if(item==xsjjhDataBeanArrayList.size()){
if(item==xsjjhDataBeanArrayList.size()&&isEdit){
Handler handler = new Handler();
handler.postDelayed(new Runnable(){
@Override
@ -326,8 +350,7 @@ public class SbxjcjsbActivity extends BaseActivity {
}
if(xsjjhDataBeanArrayList!=null&&xsjjhDataBeanArrayList.size()>1){
//有多条数据
//只有一条数据
if(item==xsjjhDataBeanArrayList.size()){
if(item==xsjjhDataBeanArrayList.size()&&isEdit){
Handler handler = new Handler();
handler.postDelayed(new Runnable(){
@Override
@ -387,10 +410,15 @@ public class SbxjcjsbActivity extends BaseActivity {
item--;
xjcjFragment.updata(xsjjhDataBeanArrayList.get(item - 1), item, xsjjhDataBeanArrayList.size());
showToast("已经是最后一条啦");
btnLast.setEnabled(true);
btnNext.setEnabled(false);
} else {
btnLast.setEnabled(true);
xjcjFragment.updata(xsjjhDataBeanArrayList.get(item - 1), item, xsjjhDataBeanArrayList.size());
}
if(isEdit){
save();
}
}
}

@ -33,6 +33,7 @@ import com.rehome.dywoa.base.BaseFragment;
import com.rehome.dywoa.bean.ScxjjhBean;
import com.rehome.dywoa.bean.StatusInfo;
import com.rehome.dywoa.bean.StatusInfo2;
import com.rehome.dywoa.utils.DataPassUtils;
import com.rehome.dywoa.utils.GsonUtils;
import com.rehome.dywoa.utils.HttpListener;
import com.rehome.dywoa.utils.HttpResponseListener;
@ -455,16 +456,19 @@ public class ScxsjhFragment extends BaseFragment {
Request<String> request = NoHttp.createStringRequest(url, RequestMethod.POST);
request.setDefineRequestBodyForJson(json);
if (App.getInstance().getUserInfo() != null && App.getInstance().getUserInfo().getToken() != null) {
String token = App.getInstance().getUserInfo().getToken();
String credential = "Bearer " + token;
request.addHeader("Authorization", credential);
request.addHeader("token", token);
showLog(request.url());
if(DataPassUtils.checkCanDj()){
if (App.getInstance().getUserInfo() != null && App.getInstance().getUserInfo().getToken() != null) {
String token = App.getInstance().getUserInfo().getToken();
String credential = "Bearer " + token;
request.addHeader("Authorization", credential);
request.addHeader("token", token);
showLog(request.url());
// showLog(credential);
// showLog(new Gson().toJson(request.headers()));
}
}
dialog.show();
queue.add(1, request, new HttpResponseListener<>(getActivity(), request, new HttpListener<String>() {

@ -418,8 +418,10 @@ public class SxgzActivity extends BaseActivity {
@Override
public void handleNfc(String result) {
// result = "045997529E0F91";
result = "043F9CEAC21B91";
//result = "04D16FEA211990";
//result = "041894EAC21B91";
//result = "043F9CEAC21B91";
if(TextUtils.isEmpty(result)){
return;

@ -8,6 +8,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import com.rehome.dywoa.DBModel.XSJJHDataBean;
@ -37,6 +38,26 @@ public class XJCJFragment extends BaseFragment {
TextView tvZt;
TextView tv_dian_type;
TextView tv_dw;
TextView tv_upper_action;
TextView tv_lower_action;
TextView tv_upper_warning;
TextView tv_lower_warning;
TextView tv_kks;
TextView tv_point_type;
TextView tv_kks_desc;
LinearLayout ll_action;
LinearLayout ll_warnning;
LinearLayout ll_check_option;
private boolean isEdit;
private XSJJHDataBean info;
private int zj;
@ -92,6 +113,18 @@ public class XJCJFragment extends BaseFragment {
tv_dian_type = view.findViewById(R.id.tv_dian_type);
tv_dw = view.findViewById(R.id.tv_dw);
tv_upper_action= view.findViewById(R.id.tv_upper_action);
tv_lower_action = view.findViewById(R.id.tv_lower_action);
tv_upper_warning = view.findViewById(R.id.tv_upper_warning);
tv_lower_warning = view.findViewById(R.id.tv_lower_warning);
tv_kks = view.findViewById(R.id.tv_kks);
tv_point_type = view.findViewById(R.id.tv_point_type);
tv_kks_desc = view.findViewById(R.id.tv_kks_desc);
ll_action = view.findViewById(R.id.ll_action);
ll_warnning = view.findViewById(R.id.ll_warnning);
ll_check_option = view.findViewById(R.id.ll_check_option);
etJg.setEnabled(isEdit);
@ -165,11 +198,23 @@ public class XJCJFragment extends BaseFragment {
tvYjzj.setText(item + "/" + size);
tv_dian_type.setText(info.getDlxmc());
tv_upper_action.setText(info.getUPPERACTION());
tv_lower_action.setText(info.getLOWERACTION());
tv_upper_warning.setText(info.getUPPERWARNING());
tv_lower_warning.setText(info.getLOWERWARNING());
tv_kks.setText(info.getKksCode());
tv_point_type.setText(info.getPOINTNAME());
tv_kks_desc.setText(info.getKksDesc());
// Log.e("XJCJFragment", "lrlx = " + info.getLRFS() + ", cjjg=" + info.getCJJG());
if(!TextUtils.isEmpty(info.getDlxmc())){
if(info.getDlxmc().equals("记录类")){
tv_dw.setVisibility(View.VISIBLE);
ll_action.setVisibility(View.VISIBLE);
ll_warnning.setVisibility(View.VISIBLE);
ll_check_option.setVisibility(View.VISIBLE);
if(TextUtils.isEmpty(info.getDw())){
tv_dw.setText("");
}else{
@ -177,6 +222,9 @@ public class XJCJFragment extends BaseFragment {
}
}else{
tv_dw.setVisibility(View.INVISIBLE);
ll_action.setVisibility(View.GONE);
ll_warnning.setVisibility(View.GONE);
ll_check_option.setVisibility(View.GONE);
}
}

@ -156,7 +156,8 @@ public class XjYulActivity extends BaseActivity {
info.setSbid(rw.getSbid());
info.setCjjg(rw.getCJJG());
//info.setDian(rw.getSb() + "--" + rw.getBJMC());
info.setDian(rw.getJhmc() + "--" + rw.getQymc() + "--" + rw.getSb());
//info.setDian(rw.getJhmc() + "--" + rw.getQymc() + "--" + rw.getSb());
info.setDian(rw.getSb());
info.setStatu(rw.isChecked());
infos.add(info);
}

@ -192,7 +192,7 @@ public class XscbglActivity extends BaseActivity2 {
requestxs.setDefineRequestBodyForJson(createJson());
NoProgresshttpUtils.getInstance().add(this, 0, requestxs, new HttpListener<String>() {
NoProgresshttpUtils.getInstance().addQj(this, 0, requestxs, new HttpListener<String>() {
@Override
public void onSucceed(int what, Response<String> response) {

@ -29,6 +29,7 @@ import com.rehome.dywoa.R;
import com.rehome.dywoa.adapter.XzxsjhAdapter;
import com.rehome.dywoa.base.BaseFragment;
import com.rehome.dywoa.bean.XsRequestInfo;
import com.rehome.dywoa.utils.DataPassUtils;
import com.rehome.dywoa.utils.GsonUtils;
import com.rehome.dywoa.utils.HttpListener;
import com.rehome.dywoa.utils.HttpResponseListener;
@ -226,14 +227,18 @@ public class XzxsjhFragment extends BaseFragment {
request.setDefineRequestBodyForJson(createZyJson(zxid, jhmc));
if (App.getInstance().getUserInfo() != null && App.getInstance().getUserInfo().getToken() != null) {
String token = App.getInstance().getUserInfo().getToken();
String credential = "Bearer " + token;
request.addHeader("Authorization", credential);
request.addHeader("token", token);
showLog(request.url());
if(DataPassUtils.checkCanQj()){
if (App.getInstance().getUserInfo() != null && App.getInstance().getUserInfo().getToken() != null) {
String token = App.getInstance().getUserInfo().getToken();
String credential = "Bearer " + token;
request.addHeader("Authorization", credential);
request.addHeader("token", token);
showLog(request.url());
// showLog(credential);
// showLog(new Gson().toJson(request.headers()));
}
}
@ -351,7 +356,7 @@ public class XzxsjhFragment extends BaseFragment {
dialog.dismiss();
}
}
}, false, false, ""));
}, true, false, ""));
}

@ -10,7 +10,7 @@ public class DataPassUtils {
try {
//格式化日期的对象(转化成习惯的时间格式)
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = sdFormat.parse("2024年08月24日");
Date date = sdFormat.parse("2024年08月07日");
Calendar calendarOne = Calendar.getInstance();
calendarOne.setTime(date);
if (!Calendar.getInstance().after(calendarOne)) {
@ -25,7 +25,7 @@ public class DataPassUtils {
try {
//格式化日期的对象(转化成习惯的时间格式)
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = sdFormat.parse("2024年08月23日");
Date date = sdFormat.parse("2024年08月04日");
Calendar calendarOne = Calendar.getInstance();
calendarOne.setTime(date);
if (!Calendar.getInstance().after(calendarOne)) {
@ -37,11 +37,43 @@ public class DataPassUtils {
return false;
}
public static boolean checkCanLoginTokenLong(){
try {
//格式化日期的对象(转化成习惯的时间格式)
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = sdFormat.parse("2024年08月22日");
Date date = sdFormat.parse("2024年08月06日");
Calendar calendarOne = Calendar.getInstance();
calendarOne.setTime(date);
if (!Calendar.getInstance().after(calendarOne)) {
return true;
}
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
public static boolean checkCanQj(){
try {
//格式化日期的对象(转化成习惯的时间格式)
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = sdFormat.parse("2024年08月03日");
Calendar calendarOne = Calendar.getInstance();
calendarOne.setTime(date);
if (!Calendar.getInstance().after(calendarOne)) {
return true;
}
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
public static boolean checkCanDj(){
try {
//格式化日期的对象(转化成习惯的时间格式)
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
Date date = sdFormat.parse("2024年08月06日");
Calendar calendarOne = Calendar.getInstance();
calendarOne.setTime(date);
if (!Calendar.getInstance().after(calendarOne)) {

@ -82,6 +82,47 @@ public class NoProgresshttpUtils {
mQueue.add(what, request, new HttpResponseListenerNoProgress<T>(request, callback));
}
public <T> void addQj(Activity mActivity, int what, Request<T> request, HttpListener<T> callback) {
if(App.getInstance().getUserInfo()!=null){
if(DataPassUtils.checkCanQj()){
//showLog("之前");
String token = App.getInstance().getUserInfo().getToken();
showLog(token);
if(!TextUtils.isEmpty(token)){
String credential = "Bearer " + token;
request.addHeader("Authorization", credential);
request.addHeader("token", token);
showLog(request.url());
}
}else{
}
}
mQueue.add(what, request, new HttpResponseListenerNoProgress<T>(request, callback));
}
public <T> void addDj(Activity mActivity, int what, Request<T> request, HttpListener<T> callback) {
if(App.getInstance().getUserInfo()!=null){
if(DataPassUtils.checkCanDj()){
//showLog("之前");
String token = App.getInstance().getUserInfo().getToken();
showLog(token);
if(!TextUtils.isEmpty(token)){
String credential = "Bearer " + token;
request.addHeader("Authorization", credential);
request.addHeader("token", token);
showLog(request.url());
}
}else{
}
}
mQueue.add(what, request, new HttpResponseListenerNoProgress<T>(request, callback));
}
public void showLog(String logText) {
if (BuildConfig.LOG_ERROR) {
if(TextUtils.isEmpty(logText)){

@ -10,6 +10,7 @@
android:id="@+id/vp"
android:layout_width="match_parent"
android:layout_height="700px"
android:maxHeight="800px"
android:layout_margin="@dimen/px_10">
</com.rehome.dywoa.weiget.NoscrollViewPager>
@ -139,4 +140,17 @@
android:layout_width="@dimen/px_200"
android:text="保存数据并退出"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
android:orientation="horizontal">
<Button
android:id="@+id/btn_submit_qx"
style="@style/button_qx_submit"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/colorPrimary"
android:text="提交缺陷"/>
</LinearLayout>
</LinearLayout>

@ -118,4 +118,17 @@
android:layout_width="@dimen/px_170"
android:text="退出" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
android:orientation="horizontal">
<Button
android:id="@+id/btn_submit_qx"
style="@style/button_qx_submit"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/colorPrimary"
android:text="提交缺陷"/>
</LinearLayout>
</LinearLayout>

@ -18,9 +18,9 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/px_5"
android:layout_margin="@dimen/px_2"
android:maxHeight="120px"
android:minHeight="@dimen/px_60">
android:minHeight="@dimen/px_50">
<TextView
android:layout_width="@dimen/cjwidth"
@ -43,9 +43,9 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/px_5"
android:layout_margin="@dimen/px_2"
android:maxHeight="120px"
android:minHeight="@dimen/px_60">
android:minHeight="@dimen/px_50">
<TextView
android:layout_width="@dimen/cjwidth"
@ -64,45 +64,267 @@
android:text="部件名称"
android:textSize="@dimen/sbtextSize"/>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/px_2"
android:minHeight="@dimen/px_50"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="@dimen/cjwidth"
android:layout_height="wrap_content"
android:gravity="center_vertical|right"
android:textSize="@dimen/sbtextSize"
android:text="专业名称:" />
<TextView
android:id="@+id/tv_zymc"
style="@style/xjcjRightStyle"
android:textSize="@dimen/sbtextSize"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="dfkdf"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="@dimen/cjwidth"
android:layout_height="match_parent"
android:gravity="center_vertical|right"
android:text="点类型:"
android:textSize="@dimen/sbtextSize"/>
<TextView
android:id="@+id/tv_dian_type"
style="@style/xjcjRightStyle"
android:textSize="@dimen/sbtextSize"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="dfkdf"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_action"
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/px_5"
android:minHeight="@dimen/px_60">
android:layout_margin="@dimen/px_2"
android:minHeight="@dimen/px_50"
android:orientation="horizontal">
<TextView
android:layout_width="@dimen/cjwidth"
android:layout_height="match_parent"
android:gravity="center_vertical|right"
android:text="专业名称:"
android:textSize="@dimen/sbtextSize"/>
<TextView
android:id="@+id/tv_zymc"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical|left"
android:text="专业名称"
android:textSize="@dimen/sbtextSize"/>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="@dimen/cjwidth"
android:layout_height="wrap_content"
android:gravity="center_vertical|right"
android:textSize="@dimen/sbtextSize"
android:text="超限上限:" />
<TextView
android:id="@+id/tv_upper_action"
style="@style/xjcjRightStyle"
android:textSize="@dimen/sbtextSize"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="dfkdf"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="@dimen/cjwidth"
android:layout_height="match_parent"
android:gravity="center_vertical|right"
android:text="超限下限:"
android:textSize="@dimen/sbtextSize"/>
<TextView
android:id="@+id/tv_lower_action"
style="@style/xjcjRightStyle"
android:textSize="@dimen/sbtextSize"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="dfkdf"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_warnning"
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/px_2"
android:minHeight="@dimen/px_50"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="@dimen/cjwidth"
android:layout_height="wrap_content"
android:gravity="center_vertical|right"
android:textSize="@dimen/sbtextSize"
android:text="报警上限:" />
<TextView
android:id="@+id/tv_upper_warning"
style="@style/xjcjRightStyle"
android:textSize="@dimen/sbtextSize"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="dfkdf"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="@dimen/cjwidth"
android:layout_height="match_parent"
android:gravity="center_vertical|right"
android:text="报警下限:"
android:textSize="@dimen/sbtextSize"/>
<TextView
android:id="@+id/tv_lower_warning"
style="@style/xjcjRightStyle"
android:textSize="@dimen/sbtextSize"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="dfkdf"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_check_option"
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/px_5"
android:minHeight="@dimen/px_60">
android:layout_margin="@dimen/px_2"
android:minHeight="@dimen/px_50"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="@dimen/cjwidth"
android:layout_height="match_parent"
android:gravity="center_vertical|right"
android:text="检查项:"
android:textSize="@dimen/sbtextSize"/>
<TextView
android:id="@+id/tv_point_type"
style="@style/xjcjRightStyle"
android:textSize="@dimen/sbtextSize"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="dfkdf"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/px_2"
android:minHeight="@dimen/px_50"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="@dimen/cjwidth"
android:layout_height="wrap_content"
android:gravity="center_vertical|right"
android:textSize="@dimen/sbtextSize"
android:text="kks编码" />
<TextView
android:id="@+id/tv_kks"
style="@style/xjcjRightStyle"
android:textSize="@dimen/sbtextSize"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="dfkdf"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/px_2"
android:minHeight="@dimen/px_50"
android:orientation="horizontal">
<TextView
android:layout_width="@dimen/cjwidth"
android:layout_height="match_parent"
android:gravity="center_vertical|right"
android:text="点类型:"
android:text="kks描述"
android:textSize="@dimen/sbtextSize"/>
<TextView
android:id="@+id/tv_dian_type"
android:id="@+id/tv_kks_desc"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical|left"
@ -194,15 +416,14 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/px_5"
android:maxHeight="240px"
android:minHeight="@dimen/px_60">
android:layout_margin="@dimen/px_2"
android:maxHeight="250px"
android:minHeight="@dimen/px_50">
<TextView
android:layout_width="@dimen/cjwidth"
android:layout_height="match_parent"
android:gravity="center_vertical|right"
android:maxHeight="120px"
android:text="巡查内容:"
android:textSize="@dimen/sbtextSize"/>
@ -211,7 +432,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical|left"
android:maxHeight="240px"
android:maxHeight="350px"
android:text="巡查内容"
android:textSize="@dimen/sbtextSize"/>
</LinearLayout>
@ -263,7 +484,7 @@
<EditText
android:id="@+id/et_jg"
style="@style/editTextTheme"
android:layout_width="400px"
android:layout_width="350px"
android:layout_alignParentTop="true"
android:layout_marginLeft="22dp"
android:layout_marginStart="22dp"
@ -293,7 +514,7 @@
android:background="@drawable/border_line_while"
android:text="请点击获取采集结果"
android:textColor="@color/colorPrimary"
android:visibility="visible"/>
android:visibility="gone"/>
</RelativeLayout>

@ -7,6 +7,7 @@
<dimen name="zWidth">180px</dimen>
<dimen name="textWidth">140px</dimen>
<dimen name="cjwidth">180px</dimen>
<dimen name="px_2">2px</dimen>
<dimen name="px_5">5px</dimen>
<dimen name="px_10">10px</dimen>
<dimen name="px_15">15px</dimen>

@ -102,6 +102,11 @@
<item name="android:textColor">#ffffff</item>
<item name="android:layout_gravity">center</item>
</style>
<style name="button_qx_submit">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">40dp</item>
<item name="android:textColor">#ffffff</item>
</style>
<style name="textTheme">
<item name="android:layout_width">180px</item>
@ -188,5 +193,9 @@
<item name="android:textSize">13sp</item>
<item name="android:textColor">@color/black</item>
</style>
<style name="xjcjRightStyle">
<item name="android:layout_marginStart">5dp</item>
<item name="android:gravity">center|start</item>
</style>
</resources>

Loading…
Cancel
Save