master
hwf452 2 years ago
parent e50a54f640
commit c4d1c71250

@ -15,20 +15,26 @@ android {
//authorities
resValue "string", "authorities", applicationId
resourceConfigurations += ['zh', 'en', 'hdpi']
ndk {
abiFilters 'armeabi', 'armeabi-v7a','arm64-v8a'
}
}
buildFeatures {
viewBinding = true
buildConfig = true
}
signingConfigs {
release {
keyAlias 'key0'
storeFile file('../key/key_zhdcoa')
storePassword 'abc123123'
keyPassword 'abc123123'
v1SigningEnabled true //V1
v2SigningEnabled true //V2
}
}
/* keypassword:abc123123 alias key0*/
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField("boolean","LOG_ERROR","true");
buildConfigField "boolean", "LOG_ERROR", "true"
}
release {
lintOptions {
@ -46,6 +52,7 @@ android {
outputFileName = "zdxoaapp.apk"
}
}
signingConfig signingConfigs.release //
}
}
sourceSets {
@ -55,8 +62,8 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
namespace 'com.rehome.zhdcoa'
}

@ -25,16 +25,17 @@ public class Contans {
public static String CK_BASE_IP = "http://10.19.0.13:80/";
public static String IP_INTRANET = "http://10.19.0.72:8081/";
public static String BASE_URL_EXTRANET = "http://219.131.195.3:8082/";//app外网服务器对应内网ip: 172.16.25.75
public static String IP_EXTRANET = "http://219.131.195.3:8081/";
//public static String IP_EXTRANET = "http://192.168.2.215:9005/";
// public static String BASE_URL_EXTRANET = "http://192.168.2.215:8082/";//app公司内网开发服务器
// public static String IP_EXTRANET = "http://192.168.2.215:9005/";
//app内网 10.19.0.73
public static String BASE_URL_INTRANET = "http://10.19.0.73:8082/";
//app公司内网开发服务器
//app外网对应内网ip: 172.16.25.75
public static String BASE_URL_EXTRANET = "http://219.131.195.3:8082/";
//public static String BASE_URL_EXTRANET = "http://192.168.2.215:8082/";
//智慧安防平台登录 电厂内网
public static String BASE_URL_COMPANY_SERVER_INTRANET= "http://10.19.0.73:8011/";
//智慧安防平台登录 电厂外网

@ -34,6 +34,7 @@ class AddDagerEnterApplyActivity :
override fun getViewBinding() = ActivityAddDagerEnterApplyBinding.inflate(layoutInflater)
private lateinit var launcherResult: ActivityResultLauncher<Intent>
private lateinit var launcherResultAddList: ActivityResultLauncher<Intent>
override fun getToolbar() = binding.toolbarView.toolbar
@ -41,6 +42,7 @@ class AddDagerEnterApplyActivity :
isEdit = intent.getBooleanExtra("isEdit", false)
id = intent.getStringExtra("id")
launcherResult = createActivityResultLauncher()
launcherResultAddList = createActivityResultLauncherAddList()
initToolbar("危化品入厂申请", "下一步") {
}
@ -72,8 +74,8 @@ class AddDagerEnterApplyActivity :
this,
AddDagerEnterApplyListActivity::class.java
)
// intent.putExtra(Contans.KEY.MODUETYPE, Contans.MODUETYPE.KQ_LEVEKIND)
// startActivityForResult(intent, ApplyLeaveDetailActivity.REQUEST_TYPE)
//intent.putExtra("item", Contans.MODUETYPE.KQ_LEVEKIND)
launcherResultAddList.launch(intent)
})
}
@ -100,6 +102,23 @@ class AddDagerEnterApplyActivity :
}
}
//创建一个ActivityResultLauncher
private fun createActivityResultLauncherAddList(): ActivityResultLauncher<Intent> {
//kotlin写法
return registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
val data = it.data
val resultCode = it.resultCode
if (resultCode == RESULT_OK) {
if (data != null) {
departmentId = data.getStringExtra("departmentId")
departmentName = data.getStringExtra("departmentName")
binding.ilDinnerUnit.content = departmentName
}
}
}
}
//http://192.168.2.215:8082/CBS/WHP/Api/GetHWPSQByID.ashx?ID=6966abb3-8150-4170-9e8a-9e81a6dbe07d
//获取一条危化品数据
private fun getHWPSQByID() {

@ -10,6 +10,9 @@ class AddDagerEnterApplyListActivity : BaseActivityOaToolbarViewBinding<Activity
override fun getToolbar() = binding.toolbarView.toolbar
override fun initView() {
initToolbar("危化品入厂申请", "下一步") {
}
}

@ -148,8 +148,8 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
// 管理员
binding.etUsername.setText("ZHPS_Admin")
binding.etPassword.setText("Rehome.zhps@2020")
// binding.etUsername.setText("ZHPS_Admin")
// binding.etPassword.setText("Rehome.zhps@2020")
//
// binding.etUsername.setText("310665")
// binding.etPassword.setText("ABcd.123")

@ -73,7 +73,7 @@ public class MqttSSLPublishServer {
try {
clientid = (String) SPUtils.get(context, "clientid", String.valueOf(""));
if (clientid.equals("")) {
if (TextUtils.isEmpty(clientid)) {
clientid = UUID.randomUUID().toString();
SPUtils.put(context, "clientid", clientid);
}

@ -23,79 +23,55 @@
android:orientation="vertical">
<com.rehome.zhdcoa.weiget.InputLayout
android:id="@+id/il_DinnerApplyp"
android:id="@+id/il_HSPMC"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:isShowTextView="true"
app:must="true"
app:tv_title="申请人"/>
app:tv_title="危险化学品名称"/>
<com.rehome.zhdcoa.weiget.InputLayout
android:id="@+id/il_TravelAddress"
android:id="@+id/il_WSLB"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:must="true"
app:tv_title="公司名称" />
app:tv_title="危险类别" />
<com.rehome.zhdcoa.weiget.InputLayout
android:id="@+id/il_TravelsRemark"
android:id="@+id/il_SYBM"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:must="true"
app:tv_title="工程项目名称" />
app:tv_title="使用部门" />
<com.rehome.zhdcoa.weiget.InputLayout
android:id="@+id/il_startTime"
android:id="@+id/il_ZRR"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible"
app:hintText="点击选择时间"
app:isShowTextView="true"
app:must="true"
app:tv_title="申请入厂时间" />
app:tv_title="责任人" />
<com.rehome.zhdcoa.weiget.InputLayout
android:id="@+id/il_SRCL"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:must="true"
android:id="@+id/il_DinnerUnit"
app:tv_title="现有储量" />
<com.rehome.zhdcoa.weiget.InputLayout
android:id="@+id/il_CCDD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintText="点击选择责任分部"
app:isShowTextView="true"
app:tv_title="责任分部" />
app:must="true"
app:tv_title="储存地点" />
<com.rehome.zhdcoa.weiget.InputLayout
android:id="@+id/il_add_dager_list"
android:id="@+id/il_RT"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:isShowSelect="true"
app:isShowTextView="true"
app:must="true"
app:tv_title="危化品清单" />
<LinearLayout
app:tv_title="用途" />
<com.rehome.zhdcoa.weiget.InputLayout
android:id="@+id/il_MSDS"
android:layout_width="match_parent"
android:layout_height="120px"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:visibility="gone">
<Button
android:id="@+id/btn_commit"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:layout_weight="1"
android:background="@drawable/btn_blue"
android:text="提交"
android:textColor="@color/white"
android:visibility="gone"/>
<Button
android:id="@+id/btn_save"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:layout_weight="1"
android:background="@drawable/btn_blue"
android:text="保存"
android:textColor="@color/white"/>
</LinearLayout>
android:layout_height="wrap_content"
app:must="true"
app:tv_title="MSDS是否配备" />
</LinearLayout>
</ScrollView>
</LinearLayout>
Loading…
Cancel
Save