package jp.co.gunmabank.minefocus.accountApp
import android.content.Intent
import android.graphics.Color
import android.os.Bundle
import android.util.Base64
import android.view.KeyEvent
import android.view.View
import android.widget.Button
import android.widget.ImageView
import android.widget.RelativeLayout
import android.widget.TextView
import com.squareup.okhttp.Request
import io.realm.Realm
import jp.co.gunmabank.common.*
import jp.co.gunmabank.common.Common.encryptDnp
import jp.co.gunmabank.db.DBRealm
import jp.co.gunmabank.entity.*
import jp.co.gunmabank.minefocus.BuildConfig
import jp.co.gunmabank.minefocus.R
import jp.co.gunmabank.minefocus.mainTab.MainTabActivity
import jp.co.gunmabank.util.*
import jp.co.gunmabank.view.AccountConfirmDialog
import jp.co.gunmabank.view.AccountProgressDialogLayout
import jp.co.gunmabank.view.ProgressBarView
import jp.co.gunmabank.view.VerticalProgressBar
import org.json.JSONObject
import java.nio.charset.Charset
import java.util.*
import java.util.regex.Pattern
class KozaKaisetsu_06008 : AccountActivity() {
// 口座開設Doc
private var accountApplication: KozaKaisetsuBean? = null
//カードローン情報
private var cardloanInfoBean: CardloanAccountInfoBean? = null
//カード再発行Doc
var cardReissueApplication: CardReissueBean? = null
// 次へ
private var next: Button? = null
// アプリ名;アプリバージョン;機種名;OSバージョン;言語設定
var appUserAgentUtil = AppUserAgentUtil()
// 戻る
private var titleBack: ImageView? = null
// 中断する
private var openAccountClose: TextView? = null
// Title
private var progressBarview: ProgressBarView? = null
// ノード
private var vpProgressBar: VerticalProgressBar? = null
// 始めノード
private var progressStartNumber: Int = 0
// 終瞭ノード
private var progressEndNumber: Int = 40
// 区分 口座 1 カードローン 2 再発行 3
private var values: String? = ""
// データ
private var dataAddUtil = DataAddUtil(this@KozaKaisetsu_06008)
//インターネット支店フラーグ
private var internetFlg: String? = ""
private var textRelativeLayout: RelativeLayout? = null
//申込データ作成
private var applicationData: TextView? = null
//本人確認証書データ送信
private var dnpSendTextview: TextView? = null
//申込データ送信
private var dataSeng: TextView? = null
//申込完了
private var applyOk: TextView? = null
//Send Failed Bean
private var list: List<AccountBankName>? = null
companion object {
var sendSuccessH: Int? = 0
// 口座開設 データ
var jsonDataDetail = StringBuilder()
var jsonDataDetailAddress = StringBuilder()
// 再発行 データ
var jsonReDataDetail = StringBuilder()
var jsonReDataDetailAddress = StringBuilder()
// realmDb
var realm: Realm? = null
// 勤務
var kinmuJson: String? = ""
// 主婦
var shufuJson: String? = ""
// DNP send
var dnpSendJson: String? = ""
// 店舗マスタから取得 データ OLD
var storeMasterNewUpgradeDataDetailBean = StoreMasterNewUpgradeDataDetailBean()
// 店舗マスタから取得 データ NEW
var storeMasterBean = StoreMasterNewUpgradeDataDetailBean()
// 抽出条件でマスタから取得した母店のコード
var motherStoreMasterBean = StoreMasterNewUpgradeDataDetailBean()
//
var detailStoreMasterBean = StoreMasterNewUpgradeDataDetailBean()
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity\_koza\_kaisetsu\_06008)
ActivityCollector.addAccountActivity(this@KozaKaisetsu\_06008)
// realmDb
realm = Realm.getDefaultInstance()
// 検索口座開設データ
accountApplication = DBRealm.seachAccountSendComplete(realm!!)
// カードローン情報
cardloanInfoBean = DBRealm.seachCardLoanAccountApplication(realm!!)
// カード再発行Doc
cardReissueApplication = DBRealm.seachCardReissueBean(realm!!)
// values取得
val getValue = intent
values = getValue.getStringExtra("mode")
// 画面UI初期化
activityInit()
// 次へ
next!!.setClickable(false)
// 中断する 隠す
openAccountClose!!.visibility = View.INVISIBLE
}
/\*\*
\* 禁止戻りキー
\*/
// override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
// if (keyCode == KeyEvent.KEYCODE_BACK)
// return true
// return super.onKeyDown(keyCode, event)
// }
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
if (openAccountClose!!.visibility == View.VISIBLE) {
if (keyCode == KeyEvent.KEYCODE\_BACK) {
//ダイアログ
val confirmDialog = AccountConfirmDialog(this@KozaKaisetsu\_06008, "お申込みの手続きを中断してポータル画面に戻りますか?", "", "はい", "いいえ", true)
//ダイアログ
confirmDialog.setClicklistener(object : AccountConfirmDialog.ClickListenerInterface {
//はい
override fun doConfirm() {
//MainTab画面遷移
val intent = Intent(this@KozaKaisetsu\_06008, MainTabActivity::class.java);
startActivity(intent)
ActivityCollector.accountFinishAll()
confirmDialog.dismiss()
}
//いいえ
override fun doCancel() {
confirmDialog.dismiss()
}
})
confirmDialog.show()
}
}
return false
}
override fun onDestroy() {
super.onDestroy();
if (realm != null) {
realm!!.close();
}
accountApplication = null
cardloanInfoBean = null
cardReissueApplication = null
ActivityCollector.removeAccountActivity(this@KozaKaisetsu\_06008)
}
/\*\*
\* 画面UI初期化
\*/
fun activityInit() {
//画面タイトル初期化
activityTitleInit()
//画面UI初期化
activityIdInit()
//口座開設送信
sendKozakaiseInit()
//画面UI初期表示
activityPageInit()
//画面UI事件初期化
activityIdEventInit(values)
}
fun getTempSend(temp: Int) {
when (temp) {
0, 1 -> {
if (values == "1") {
var netStoreNoStr = ""
if (accountApplication!!.goodsTypeSafeCustody == "1") {
if (accountApplication!!.chooseStore == "0") {
//インターネット支店に開設
netStoreNoStr = "270"
} else {
if (accountApplication!!.havenBankAccount == "0") {
//普通預金口座を開設
netStoreNoStr = accountApplication!!.choiceStoreCode!!
} else {
if (accountApplication!!.hasNetAccount == "0") {
netStoreNoStr = accountApplication!!.depositStoreNo!!
} else {
netStoreNoStr = accountApplication!!.netStoreNo!!
}
}
}
var strTable = ""
if (accountApplication!!.goodsTypeGeneralPay == "1") {
if (netStoreNoStr == accountApplication!!.choiceStoreCode!!) {
strTable = Common.TENPOMASTER\_NEW
} else {
strTable = Common.TENPOMASTER
}
} else {
strTable = Common.TENPOMASTER
}
storeMasterNewApi(netStoreNoStr, strTable)
} else {
var detailStoreStr = ""
if (accountApplication!!.havenBankAccount == "0") {
if (accountApplication!!.chooseStore == "0") {
//インターネットバンキング契約あり
detailStoreStr = "270"
} else {
detailStoreStr = accountApplication!!.choiceStoreCode!!
}
} else {
if (accountApplication!!.hasNetAccount == "1") {
//インターネットバンキング契約あり
detailStoreStr = accountApplication!!.netStoreNo!!
} else {
detailStoreStr = accountApplication!!.depositStoreNo!!
}
}
detailStoreMasterApi(detailStoreStr, Common.TENPOMASTER)
}
} else if (values == "2") {
sendJsonData(DateUtils.convertDate2String(Date(), Common.DATE)!!, DateUtils.convertDate2String(Date(), Common.TIMES)!!)
} else if (values == "3") {
storeMasterNewApi(cardReissueApplication!!.storeNo!!, Common.TENPOMASTER)
}
}
2 -> {
accountImageDNPSendFun()
}
3 -> {
// DNPシステム送信更新
sbcfDnpDataUpdateFun()
}
4 -> {
dataAppend(DateUtils.convertDate2String(Date(), Common.DATE)!!, DateUtils.convertDate2String(Date(), Common.TIMES)!!)
}
5 -> {
// 口座開設情報DATA送信
sbcfMailSendUpdataFun()
}
6 -> {
completeSendDnpModifyFun()
}
}
}
/\*
\* 口座開設送信
\*/
fun sendKozakaiseInit() {
var step = "0"
if (values == "1") {
if (!accountApplication!!.sendStep.isNullOrEmpty()) {
step = accountApplication!!.sendStep!!
}
} else if (values == "2") {
if (!cardloanInfoBean!!.sendStep.isNullOrEmpty()) {
step = cardloanInfoBean!!.sendStep!!
}
} else if (values == "3") {
if (!cardReissueApplication!!.sendStep.isNullOrEmpty()) {
step = cardReissueApplication!!.sendStep!!
}
}
when (step.toInt()) {
0, 1 -> {
}
2 -> {
vpProgressBar!!.setImage(1)
progressEndNumber = 40
}
3 -> {
}
4 -> {
vpProgressBar!!.setImage(2)
progressEndNumber = 70
progressRun()
}
5 -> {
}
6 -> {
vpProgressBar!!.setImage(3)
progressEndNumber = 100
progressRun()
}
}
getTempSend(step.toInt())
}
/\*\*
\* 支店電話番号
\* 支店住所
\* 店舗マスタから取得
\*/
fun storeMasterNewApi(str: String, tableName: String) {
// 実の店舗請求Request
val param = getStoreMasterNewParam(str, tableName)
storeMasterNewUpgradeDataDetailBean = StoreMasterNewUpgradeDataDetailBean()
object : Thread() {
override fun run() {
try {
// url
val url = Common.gunmaToApiUrl + "rs/schemaless\_data\_search"
// POST請求API
val content = CommonCurl.postUrlData(url, param, this@KozaKaisetsu\_06008)
runOnUiThread {
// 請求API成功
if (!content.isNullOrEmpty()) {
//ResultResponse
val resultResponse = JsonUtil.jsonToBean(content, StoreMasterNewResultResponse::class.java)
//エラー一覧
if (resultResponse != null && resultResponse.response!!.responseHeader!!.errorList != null) {
sendJsonData(DateUtils.convertDate2String(Date(), Common.DATE)!!, DateUtils.convertDate2String(Date(), Common.TIMES)!!)
} else {
var list = resultResponse!!.response!!.dataList!!
if (list.isNotEmpty()) {
storeMasterNewUpgradeDataDetailBean.teleNumber = resultResponse.response!!.dataList!!\[0\].jsonData!!.teleNumber
storeMasterNewUpgradeDataDetailBean.address2 = resultResponse.response!!.dataList!!\[0\].jsonData!!.address2
storeMasterNewUpgradeDataDetailBean.prefectures = resultResponse.response!!.dataList!!\[0\].jsonData!!.prefectures
storeMasterNewUpgradeDataDetailBean.depositAccountNumber = resultResponse.response!!.dataList!!\[0\].jsonData!!.depositAccountNumber
storeMasterNewUpgradeDataDetailBean.storeName = resultResponse.response!!.dataList!!\[0\].jsonData!!.storeName
storeMasterNewUpgradeDataDetailBean.storeNumber = resultResponse.response!!.dataList!!\[0\].jsonData!!.storeNumber
}
storeMasterApi(storeMasterNewUpgradeDataDetailBean.depositAccountNumber!!, tableName)
}
} else {
errorNextButtonUpdate(1)
}
}
} catch (e: Exception) {
}
}
}.start()
}
fun errorNextButtonUpdate(step: Int) {
openAccountClose!!.setVisibility(View.VISIBLE)
next!!.setBackgroundColor(Color.parseColor("#00A56F"))
next!!.setClickable(true)
next!!.setText(R.string.account\_send\_button)
next!!.setOnClickListener(View.OnClickListener {
getTempSend(step)
openAccountClose!!.setVisibility(View.INVISIBLE)
next!!.setBackgroundColor(Color.parseColor("#cccccc"))
next!!.setClickable(false)
next!!.setText(R.string.activity\_card\_reissue3\_1\_next\_btn)
})
if (values == "1") {
realm!!.beginTransaction()
accountApplication!!.sendStep = step.toString()
realm!!.commitTransaction()
} else if (values == "2") {
realm!!.beginTransaction()
cardloanInfoBean!!.sendStep = step.toString()
realm!!.commitTransaction()
} else if (values == "3") {
realm!!.beginTransaction()
cardReissueApplication!!.sendStep = step.toString()
realm!!.commitTransaction()
}
}
/\*\*
\* 支店電話番号
\* 支店住所
\* 店舗マスタから取得
\*/
fun storeMasterApi(str: String, tableName: String) {
// 実の店舗請求Request
val param = getStoreMasterNewParam(str, tableName)
storeMasterBean = StoreMasterNewUpgradeDataDetailBean()
object : Thread() {
override fun run() {
try {
// url
val url = Common.gunmaToApiUrl + "rs/schemaless\_data\_search"
// POST請求API
val content = CommonCurl.postUrlData(url, param, this@KozaKaisetsu\_06008)
runOnUiThread {
// 請求API成功
if (!content.isNullOrEmpty()) {
//ResultResponse
val resultResponse = JsonUtil.jsonToBean(content, StoreMasterNewResultResponse::class.java)
//エラー一覧
if (resultResponse != null && resultResponse.response!!.responseHeader!!.errorList != null) {
sendJsonData(DateUtils.convertDate2String(Date(), Common.DATE)!!, DateUtils.convertDate2String(Date(), Common.TIMES)!!)
} else {
var list = resultResponse!!.response!!.dataList!!
if (list.isNotEmpty()) {
storeMasterBean.teleNumber = resultResponse.response!!.dataList!!\[0\].jsonData!!.teleNumber
storeMasterBean.address2 = resultResponse.response!!.dataList!!\[0\].jsonData!!.address2
storeMasterBean.prefectures = resultResponse.response!!.dataList!!\[0\].jsonData!!.prefectures
storeMasterBean.depositAccountNumber = resultResponse.response!!.dataList!!\[0\].jsonData!!.depositAccountNumber
storeMasterBean.storeName = resultResponse.response!!.dataList!!\[0\].jsonData!!.storeName
storeMasterBean.storeNumber = resultResponse.response!!.dataList!!\[0\].jsonData!!.storeNumber
}
var detailStoreStr = ""
if (accountApplication!!.havenBankAccount == "0") {
if (accountApplication!!.chooseStore == "0") {
//インターネットバンキング契約あり
detailStoreStr = "270"
} else {
detailStoreStr = accountApplication!!.choiceStoreCode!!
}
} else {
if (accountApplication!!.hasNetAccount == "1") {
//インターネットバンキング契約あり
detailStoreStr = accountApplication!!.netStoreNo!!
} else {
detailStoreStr = accountApplication!!.depositStoreNo!!
}
}
detailStoreMasterApi(detailStoreStr, Common.TENPOMASTER)
}
} else {
errorNextButtonUpdate(1)
}
}
} catch (e: Exception) {
}
}
}.start()
}
/\*\*
\* 住所変更master
\*/
fun detailStoreMasterApi(str: String, detailMaster: String) {
// 実の店舗請求Request
val param = getStoreMasterNewParam(str, detailMaster)
detailStoreMasterBean = StoreMasterNewUpgradeDataDetailBean()
object : Thread() {
override fun run() {
try {
// url
val url = Common.gunmaToApiUrl + "rs/schemaless\_data\_search"
// POST請求API
val content = CommonCurl.postUrlData(url, param, this@KozaKaisetsu\_06008)
runOnUiThread {
// 請求API成功
if (!content.isNullOrEmpty()) {
//ResultResponse
val resultResponse = JsonUtil.jsonToBean(content, StoreMasterNewResultResponse::class.java)
//エラー一覧
if (resultResponse != null && resultResponse.response!!.responseHeader!!.errorList != null) {
sendJsonData(DateUtils.convertDate2String(Date(), Common.DATE)!!, DateUtils.convertDate2String(Date(), Common.TIMES)!!)
} else {
var list = resultResponse!!.response!!.dataList!!
if (list.isNotEmpty()) {
detailStoreMasterBean.teleNumber = resultResponse.response!!.dataList!!\[0\].jsonData!!.teleNumber
detailStoreMasterBean.address2 = resultResponse.response!!.dataList!!\[0\].jsonData!!.address2
detailStoreMasterBean.prefectures = resultResponse.response!!.dataList!!\[0\].jsonData!!.prefectures
detailStoreMasterBean.depositAccountNumber = resultResponse.response!!.dataList!!\[0\].jsonData!!.depositAccountNumber
detailStoreMasterBean.storeName = resultResponse.response!!.dataList!!\[0\].jsonData!!.storeName
detailStoreMasterBean.storeNumber = resultResponse.response!!.dataList!!\[0\].jsonData!!.storeNumber
}
sendJsonData(DateUtils.convertDate2String(Date(), Common.DATE)!!, DateUtils.convertDate2String(Date(), Common.TIMES)!!)
}
} else {
errorNextButtonUpdate(1)
}
}
} catch (e: Exception) {
}
}
}.start()
}
/\*\*
\*
\*/
fun getStoreMasterNewParam(str: String, tableName: String): String {
var requestBean = StoreMasterNewRequestBean()
var dataBean = StoreMasterNewRequestData()
var resultRequest = StoreMasterNewResultRequest()
var jsonData = StoreMasterNewDataJson()
var storeCom = ArrayList<String>()
storeCom.add(str)
jsonData.storeNumber.put("\\$in", storeCom)
//データクラス
dataBean.dataClass = tableName
dataBean.query = jsonData
requestBean.requestHeader = Common.getRequestHeader()
requestBean.data = dataBean
resultRequest.request = requestBean
val jsonStr = JsonUtil.beanTojson(resultRequest)
return jsonStr
}
/\*\*
\*口座開設の情報を送信する.
\*
\* @param 申込み日
\* @param 申込み時刻
\*/
fun sendJsonData(appDay: String, appTime: String) {
// 取引情報保存Oid発行
val jsonParam = getOidJsonParam()
object : Thread() {
override fun run() {
try {
// テータ登録url
val urlOld = Common.gunmaToApiUrl + "rs/schemaless\_data\_regist"
val contentOid = CommonCurl.postUrlData(urlOld, jsonParam, this@KozaKaisetsu\_06008)
runOnUiThread {
Common.cancelLoadingDialog()
if (!contentOid.isNullOrEmpty()) {
// ResultResponse
val resultResponse = JsonUtil.jsonToBean(contentOid, OidRegistResponse::class.java)
// エラー一覧
if (resultResponse != null && resultResponse!!.response!!.responseHeader!!.errorList != null) {
// エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
errorNextButtonUpdate(1)
} else {
if (values == "1") {
// DBに口座情報Oid等を登録
DBRealm.saveKozaInfo(realm!!, resultResponse!!.response!!.data)
} else if (values == "2") {
DBRealm.saveCardLonaInfo(realm!!, resultResponse!!.response!!.data)
} else if (values == "3") {
DBRealm.saveCardReissueInfo(realm!!, resultResponse!!.response!!.data)
}
vpProgressBar!!.setImage(1)
progressEndNumber = 40
// DNP send
accountImageDNPSendFun()
}
} else {
errorNextButtonUpdate(1)
}
}
} catch (e: Exception) {
}
}
}.start()
}
fun updataSbcfFail(step: Int) {
runOnUiThread {
// 口座開設情報DATA送信
val param = getDataRegistParam()
object : Thread() {
override fun run() {
try {
// データ更新url
val url = Common.gunmaToApiUrl + "/rs/schemaless\_data\_modify"
val content = CommonCurl.postUrlData(url, param, this@KozaKaisetsu\_06008)
runOnUiThread {
if (content != null) {
//ResultResponse
val resultResponse = JsonUtil.jsonToBean(content, OidModifyResponse::class.java)
//エラー一覧
if (resultResponse != null && resultResponse!!.response!!.responseHeader!!.errorList != null) {
//エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
errorNextButtonUpdate(step)
} else {
}
} else {
errorNextButtonUpdate(step)
}
}
} catch (e: Exception) {
}
}
}.start()
}
}
/\*\*
\* 口座開設情報DATA送信
\*/
fun sbcfMailSendUpdataFun() {
val param = getDataRegistParam()
object : Thread() {
override fun run() {
try {
// データ更新url
val url = Common.gunmaToApiUrl + "/rs/schemaless\_data\_modify"
val content = CommonCurl.postUrlData(url, param, this@KozaKaisetsu\_06008)
runOnUiThread {
if (content != null) {
//ResultResponse
val resultResponse = JsonUtil.jsonToBean(content, OidModifyResponse::class.java)
//エラー一覧
if (resultResponse != null && resultResponse!!.response!!.responseHeader!!.errorList != null) {
//エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
errorNextButtonUpdate(5)
updateSendStatus("2")
} else {
updateSendStatus("1")
vpProgressBar!!.setImage(3)
progressStartNumber = 70
progressEndNumber = 100
progressRun()
completeSendDnpModifyFun()
}
} else {
errorNextButtonUpdate(5)
}
}
} catch (e: Exception) {
}
}
}.start()
}
/\*\*
\* dev CSV + LinkCSV
\*/
var callback = object : OkHttpUtil.ResultCallback<String>() {
override fun onResponse(str: String) {
var xml = ReadXML()
if (BuildConfig.FLAVOR == "dev") {
} else {
if (values == "1" || values == "3") {
if (xml.getDetail(str).sendFailedCode != "0") {
//エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
sendSuccessH = 2
updateDataSendStatus("2", "送信データ異常。Message:" + xml.getDetail(str).sendFailedMsg)
errorNextButtonUpdate(4)
updataSbcfFail(4)
return
}
} else if (values == "2") {
var json = JSONObject(str).get("response")
if (json != "0") {
//エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
sendSuccessH = 2
updateDataSendStatus("2", "送信データ異常。Message:" + str)
errorNextButtonUpdate(4)
updataSbcfFail(4)
return
}
}
}
updateDataSendStatus("1", "")
runOnUiThread {
// 口座開設情報DATA送信
sbcfMailSendUpdataFun()
}
}
override fun onError(mailSendmsg: String, request: Request, e: Exception) {
var xml = ReadXML()
if (values == "1" || values == "3") {
if (xml.getDetail(mailSendmsg).sendFailedCode != "0") {
var str = ""
if (mailSendmsg.indexOf("Result") != -1 && mailSendmsg.indexOf("error") != -1) {
str = xml.getDetail(mailSendmsg).sendFailedMsg
}
//エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
sendSuccessH = 2
updateDataSendStatus("2", "送信データ異常。Message:" + str)
errorNextButtonUpdate(4)
updataSbcfFail(4)
return
}
} else if (values == "2") {
var json = JSONObject(mailSendmsg).get("response")
if (json != "0") {
//エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
sendSuccessH = 2
updateDataSendStatus("2", "送信データ異常。Message:" + resources.getString(R.string.cardloan\_visitor\_info\_bad\_send\_faild))
errorNextButtonUpdate(4)
updataSbcfFail(4)
return
}
}
}
}
/\*\*
\* dev CSV
\*/
var linkcsvNoCallback = object : OkHttpLinkCSVUtil.ResultCallback<String>() {
override fun onResponse(str: String) {
updateDataSendStatus("1", "")
runOnUiThread {
// 口座開設情報DATA送信
sbcfMailSendUpdataFun()
}
}
override fun onError(request: Request, e: Exception) {
//エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
sendSuccessH = 2
updateDataSendStatus("2", resources.getString(R.string.account\_visitor\_info\_bad\_network))
errorNextButtonUpdate(4)
updataSbcfFail(4)
}
}
/\*\*
\* stg CSV + LinkCSV Shift\_JIS
\*/
var callbackShift = object : OkHttpShiteJisUtil.ResultCallback<String>() {
override fun onResponse(str: String) {
if (values == "1") {
if (str.indexOf("fields count1: 211") != -1 && str.indexOf("fields count2: 58") != -1) {
stgLinkCsvJisSuccessFun()
} else {
val regEx = "\[^0-9\]"
val p = Pattern.compile(regEx)
val m = p.matcher(str)
val magStr = m.replaceAll("").trim()
val subMagStr = magStr.substring(1, 4)
val sybMagstr58 = magStr.substring(5, 7)
Common.sendAlertMsg(this@KozaKaisetsu\_06008, "送信処理に失敗しました。通信環境の良い場所でご利用ください。")
sendSuccessH = 2
updateDataSendStatus("2", "送信データと受取データの項目数が一致しません。送信データ項目数:" + subMagStr + "と" + sybMagstr58)
errorNextButtonUpdate(4)
updataSbcfFail(4)
}
} else if (values == "2") {
} else if (values == "3") {
if (str.indexOf("fields count1: 58") != -1 && str.indexOf("fields count2: 58") != -1) {
stgLinkCsvJisSuccessFun()
} else {
val regEx = "\[^0-9\]"
val p = Pattern.compile(regEx)
val m = p.matcher(str)
val magStr = m.replaceAll("").trim()
val subMagStr = magStr.substring(1, 4)
val sybMagstr58 = magStr.substring(5, 7)
Common.sendAlertMsg(this@KozaKaisetsu\_06008, "送信処理に失敗しました。通信環境の良い場所でご利用ください。")
sendSuccessH = 2
updateDataSendStatus("2", "送信データと受取データの項目数が一致しません。送信データ項目数:" + subMagStr + "と" + sybMagstr58)
errorNextButtonUpdate(4)
updataSbcfFail(4)
}
}
}
override fun onError(errorCode: Int, request: Request, e: Exception) {
//エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
sendSuccessH = 2
if (errorCode == 200) {
updateDataSendStatus("2", resources.getString(R.string.account\_visitor\_info\_bad\_network))
} else {
updateDataSendStatus("2", "ネットワークもしくは送信先システムの障害により、正常に送信できませんでした。Code:" + errorCode.toString())
}
errorNextButtonUpdate(4)
updataSbcfFail(4)
}
}
fun stgLinkCsvJisSuccessFun() {
updateDataSendStatus("1", "")
runOnUiThread {
// 口座開設情報DATA送信
sbcfMailSendUpdataFun()
}
}
/\*\*
\* stg CSV Shift\_JIS
\*/
var callbackNoLinkCsvShift = object : OkHttpNoLinkCSVShiftJisUtil.ResultCallback<String>() {
override fun onResponse(str: String, codeStr: String) {
if (values == "1") {
if (str.indexOf("fields count1: 211") != -1) {
stgSendSuccessFun()
} else {
stgSendFaildFun(str)
}
} else if (values == "2") {
} else if (values == "3") {
if (str.indexOf("fields count1: 58") != -1) {
stgSendSuccessFun()
} else {
stgSendFaildFun(str)
}
}
}
override fun onError(codeFaild: Int, request: Request, e: Exception) {
//エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
sendSuccessH = 2
if (codeFaild == 200) {
updateDataSendStatus("2", resources.getString(R.string.account\_visitor\_info\_bad\_network))
} else {
updateDataSendStatus("2", "ネットワークもしくは送信先システムの障害により、正常に送信できませんでした。Code:" + codeFaild.toString())
}
errorNextButtonUpdate(4)
updataSbcfFail(4)
}
}
fun stgSendSuccessFun() {
updateDataSendStatus("1", "")
runOnUiThread {
// 口座開設情報DATA送信
sbcfMailSendUpdataFun()
}
}
fun stgSendFaildFun(str: String) {
val regEx = "\[^0-9\]"
val p = Pattern.compile(regEx)
val m = p.matcher(str)
val magStr = m.replaceAll("").trim()
val subMagStr = magStr.substring(1, 4)
Common.sendAlertMsg(this@KozaKaisetsu\_06008, "送信処理に失敗しました。通信環境の良い場所でご利用ください。")
sendSuccessH = 2
updateDataSendStatus("2", "送信データと受取データの項目数が一致しません。送信データ項目数:" + subMagStr + "と" + "")
errorNextButtonUpdate(4)
updataSbcfFail(4)
}
/\*\*
\* DNPシステム送信
\*/
var dnpSendCallback = object : OkHttpUtil.ResultCallback<String>() {
override fun onResponse(str: String) {
var xml = ReadXML()
if (BuildConfig.FLAVOR == "dev") {
} else {
if (xml.getDetail(str).sendFailedCode != "0") {
dnpErrorFun(xml.getDetail(str).sendFailedMsg)
return
}
}
updateDnpSendStatus("1", "")
runOnUiThread {
sendSuccessH = 3
// DNPシステム送信更新
sbcfDnpDataUpdateFun()
}
}
override fun onError(dnpSendmsg: String, request: Request, e: Exception) {
var xml = ReadXML()
var str = ""
if (dnpSendmsg.indexOf("Result") != -1 && dnpSendmsg.indexOf("error") != -1) {
str = xml.getDetail(dnpSendmsg).sendFailedMsg
}
//エラー時の処理
dnpErrorFun(dnpSendmsg)
}
}
fun dnpErrorFun(str: String) {
runOnUiThread {
sendSuccessH = 4
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
updateDnpSendStatus("2", "送信データ異常。Message:" + str)
errorNextButtonUpdate(2)
updataSbcfFail(2)
}
}
/\*\*
\* DNPシステム送信更新
\*/
fun sbcfDnpDataUpdateFun() {
// DNPシステム送信更新
val imageDnpModifyParam = getDnpModifyParam()
object : Thread() {
override fun run() {
try {
// データ更新url
val url = Common.gunmaToApiUrl + "/rs/schemaless\_data\_modify"
val content = CommonCurl.postUrlData(url, imageDnpModifyParam, this@KozaKaisetsu\_06008)
runOnUiThread {
if (content != null) {
//ResultResponse
val resultResponse = JsonUtil.jsonToBean(content, OidModifyResponse::class.java)
//エラー一覧
if (resultResponse != null && resultResponse.response!!.responseHeader!!.errorList != null) {
//エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
errorNextButtonUpdate(3)
} else {
vpProgressBar!!.setImage(2)
progressStartNumber = 40
progressEndNumber = 70
progressRun()
dataAppend(DateUtils.convertDate2String(Date(), Common.DATE)!!, DateUtils.convertDate2String(Date(), Common.TIMES)!!)
}
} else {
errorNextButtonUpdate(3)
}
}
} catch (e: Exception) {
}
}
}.start()
}
// DNPシステム送信更新
fun imageSendDnpModifyFun() {
runOnUiThread {
// DNPシステム送信更新
val imageDnpModifyParam = getDnpModifyParam()
object : Thread() {
override fun run() {
try {
// データ更新url
val url = Common.gunmaToApiUrl + "/rs/schemaless\_data\_modify"
val content = CommonCurl.postUrlData(url, imageDnpModifyParam, this@KozaKaisetsu\_06008)
runOnUiThread {
if (content != null) {
//ResultResponse
val resultResponse = JsonUtil.jsonToBean(content, OidModifyResponse::class.java)
//エラー一覧
if (resultResponse != null && resultResponse!!.response!!.responseHeader!!.errorList != null) {
//エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
openAccountClose!!.setVisibility(View.VISIBLE)
updateSendStatus("2")
errorNextButtonUpdate(5)
} else {
updateSendStatus("1")
progressStartNumber = 70
progressEndNumber = 100
progressRun()
vpProgressBar!!.setImage(4)
completeSendDnpModifyFun()
}
}
}
} catch (e: Exception) {
}
}
}.start()
}
}
/\*\*
\* 更新
\* 銀行システム送信結果(口座)
\* 銀行システム送信結果(住所)
\* 銀行システム送信時間(口座)
\* 銀行システム送信時間(住所)
\*/
fun updateDataSendStatus(dataSendStatus: String, errorMessage: String) {
var comDate = DateUtils.convertDate2String(Date(), Common.DATE\_TIME)
if (values == "1") {
val datas = DBRealm.seachAccountSendComplete(realm!!)
realm!!.beginTransaction()
datas!!.bankAccountSendStatus = dataSendStatus
datas.bankAddressSendStatus = dataSendStatus
datas.bankAccountSendDate = comDate
datas.bankAddressSendDate = comDate
datas.errorMsg = errorMessage
realm!!.commitTransaction()
} else if (values == "2") {
val cardLoandatas = DBRealm.seachCardLoanAccountApplication(realm!!)
realm!!.beginTransaction()
cardLoandatas!!.acomSendStatus = dataSendStatus
cardLoandatas.acomSendDate = comDate
cardLoandatas.errorMsg = errorMessage
realm!!.commitTransaction()
} else if (values == "3") {
val cardRedatas = DBRealm.seachCardReissueBean(realm!!)
realm!!.beginTransaction()
cardRedatas!!.bankAccountSendStatus = dataSendStatus
cardRedatas.bankAddressSendStatus = dataSendStatus
cardRedatas.bankAccountSendDate = comDate
cardRedatas.bankAddressSendDate = comDate
cardRedatas.errorMsg = errorMessage
realm!!.commitTransaction()
}
}
// DNPシステム送信更新
fun completeSendDnpModifyFun() {
runOnUiThread {
// DNPシステム送信更新
val imageDnpModifyParam = getDnpModifyParam()
object : Thread() {
override fun run() {
try {
// データ更新url
val url = Common.gunmaToApiUrl + "/rs/schemaless\_data\_modify"
val content = CommonCurl.postUrlData(url, imageDnpModifyParam, this@KozaKaisetsu\_06008)
runOnUiThread {
if (content != null) {
//ResultResponse
val resultResponse = JsonUtil.jsonToBean(content, OidModifyResponse::class.java)
//エラー一覧
if (resultResponse != null && resultResponse!!.response!!.responseHeader!!.errorList != null) {
//エラー時の処理
Common.sendAlertMsg(this@KozaKaisetsu\_06008, resources.getString(R.string.account\_visitor\_info\_bad\_send\_faild))
errorNextButtonUpdate(6)
} else {
updateSendComplete()
vpProgressBar!!.setImage(4)
next!!.setBackgroundColor(Color.parseColor("#00A56F"))
next!!.setClickable(true)
activityIdEventInit(values)
}
} else {
errorNextButtonUpdate(6)
}
}
} catch (e: Exception) {
}
}
}.start()
}
}
/\*\*
\* 更新
\* DNPシステム送信結果
\* DNPシステム送信時間
\*/
fun updateDnpSendStatus(dnpSendStatus: String, errorMessage: String) {
val comDate = DateUtils.convertDate2String(Date(), Common.DATE\_TIME)
if (values == "1") {
val datas = DBRealm.seachAccountSendComplete(realm!!)
realm!!.beginTransaction()
datas!!.dnpSendStatus = dnpSendStatus
datas.dnpSendDate = comDate
datas.errorMsg = errorMessage
realm!!.commitTransaction()
} else if (values == "2") {
val cardLonadatas = DBRealm.seachCardLoanAccountApplication(realm!!)
realm!!.beginTransaction()
cardLonadatas!!.dnpSendStatus = dnpSendStatus
cardLonadatas.dnpSendDate = comDate
cardLonadatas.errorMsg = errorMessage
realm!!.commitTransaction()
} else if (values == "3") {
val cardRedatas = DBRealm.seachCardReissueBean(realm!!)
realm!!.beginTransaction()
cardRedatas!!.dnpSendStatus = dnpSendStatus
cardRedatas.dnpSendDate = comDate
cardRedatas.errorMsg = errorMessage
realm!!.commitTransaction()
}
}
/\*\*
\* 更新
\* 送付状況
\* 完了日時
\*/
fun updateSendStatus(sendStatus: String) {
val datas = DBRealm.seachAccountSendComplete(realm!!)
val cardLonadatas = DBRealm.seachCardLoanAccountApplication(realm!!)
val cardRedatas = DBRealm.seachCardReissueBean(realm!!)
val compDate = DateUtils.convertDate2String(Date(), Common.DATE\_TIME)
if (values == "1") {
realm!!.beginTransaction()
datas!!.sendStatus = sendStatus
datas.compDate = compDate
realm!!.commitTransaction()
} else if (values == "2") {
realm!!.beginTransaction()
cardLonadatas!!.sendStatus = sendStatus
cardLonadatas.compDate = compDate
realm!!.commitTransaction()
} else if (values == "3") {
realm!!.beginTransaction()
cardRedatas!!.sendStatus = sendStatus
cardRedatas.compDate = compDate
realm!!.commitTransaction()
}
}
/\*\*
\* 更新
\* 送付状況
\* 完了日時
\*/
fun updateSendComplete() {
var tmpData = DBRealm.seachAccountSendComplete(realm!!)
var reissueTmpData = DBRealm.seachCardReissueBean(realm!!)
if (values == "1") {
//Delete 商品Data
realm!!.beginTransaction()
deleteStoreData(tmpData)
realm!!.commitTransaction()
var tmpDataOth = DBRealm.seachAccountSendCompleteOth(realm!!)
if (tmpDataOth != null) {
realm!!.beginTransaction()
tmpDataOth.deleteFromRealm()
realm!!.commitTransaction()
}
} else if (values == "2") {
var cardLonaTmpDataOth = DBRealm.seachCardLoanAccountApplication(realm!!)
if (cardLonaTmpDataOth != null) {
realm!!.beginTransaction()
cardLonaTmpDataOth.deleteFromRealm()
realm!!.commitTransaction()
}
} else if (values == "3") {
var reissueTmpDataOth = DBRealm.seachCardReissueBeanSendComplete(realm!!)
if (reissueTmpDataOth != null) {
realm!!.beginTransaction()
reissueTmpDataOth.deleteFromRealm()
realm!!.commitTransaction()
}
}
realm!!.beginTransaction()
if (values == "1") {
tmpData!!.sendComplete = "1"
internetFlg = tmpData.chooseStore
} else if (values == "3") {
reissueTmpData!!.sendComplete = "1"
}
realm!!.commitTransaction()
//TODO
var data = DBRealm.seachAccountSendCompleteOth(realm!!)
realm!!.beginTransaction()
data?.deleteFromRealm()
realm!!.commitTransaction()
var cardReissue = DBRealm.seachCardReissueBeanSendComplete(realm!!)
realm!!.beginTransaction()
cardReissue?.deleteFromRealm()
realm!!.commitTransaction()
//TODO
//送信完了 中断するGone
openAccountClose!!.visibility = View.INVISIBLE
}
/\*\*
\* Delete 商品Data
\*/
fun deleteStoreData(data: KozaKaisetsuBean?) {
// 定期預金
if (data!!.goodsTypeSavePay == "0") {
data.expirationRemind = ""
data.choosedStoreCode = ""
data.choosedStoreName = ""
data.choicedReason = ""
}
// 投資信託振替決済(保護預り)口座
if (data.goodsTypeSafeCustody == "0") {
data.preventionError = ""
data.tradeMotive = ""
data.tradeThought = ""
data.ivExpCredit = ""
data.ivExpStk = ""
data.ivExpLetter = ""
data.ivExpForLifeFC = ""
data.ivExpFC = ""
data.ivExpPubDebt = ""
data.ivExpOther = ""
data.ivExpOtherInput = ""
data.ivKnowlPubDebt = ""
data.ivKnowlInvTrust = ""
data.ivKnowlLifeInsure = ""
data.ivKnowlFCSave = ""
data.ivKnowlFromNews = ""
data.ivKnowlFromTV = ""
data.ivKnowlFromSmnar = ""
data.ivKnowlFromOther = ""
data.faAssetsTotal = ""
data.ivInfoincome = ""
data.withHoldingTax = ""
data.specificAddressChangeFlag = ""
data.specificPrefecturesChange = ""
data.specificPrefecturesCode = ""
}
// NISA(少額投資非課税制度)
if (data.goodsTypeNisa == "0") {
data.residence = ""
data.authority = ""
data.transferencePostCode = ""
data.transferencePrefecturesCode = ""
data.transferenceAddress = ""
data.transferenceDate = ""
data.overseasPostCode = ""
data.overseasPrefecturesCode = ""
data.overseasAddress = ""
}
// 内容を確認しました
if (data.goodsTypeForeignCurrencyA == "0") {
data.agreeForAdvice = ""
}
// 商品名:ユーロ建外貨普通預金
if (data.goodsTypeForeignCurrencyE == "0") {
data.agreeForEUNormalAdvice = ""
}
// 商品名:米ドル建オーブン型外貨定期預金(自動継続)
if (data.goodsTypeOpenForeignCurrencyA == "0") {
data.agreeForUSDAdvice = ""
}
// 商品名:ユーロ建オーブン型外貨定期預金(自動継続)
if (data.goodsTypeOpenForeignCurrencyE == "0") {
data.agreeForEUOpenAdvice = ""
}
// 以上
if (data.goodsTypeForeignCurrencyA == "0" && data.goodsTypeForeignCurrencyE == "0" && data.goodsTypeOpenForeignCurrencyA == "0" && data.goodsTypeOpenForeignCurrencyE == "0") {
data.agreeForForeignCurrency = ""
data.agreeForForeignPeriodic = ""
data.report = ""
data.enFirstName = ""
data.enLastName = ""
data.enAddress = ""
data.enCity = ""
data.enPrefectures = ""
data.enCountry = ""
data.investThought = ""
data.creditAcceptanceExp = ""
data.strainExp = ""
data.investmentTrustExp = ""
data.lifeInsuranceExp = ""
data.foreignCurrencyExp = ""
data.debtSocialDebtExp = ""
data.othersExp = ""
data.othersContentsExp = ""
data.debtKnowledge = ""
data.investmentTrustKnowledge = ""
data.lifeInsuranceKnowledge = ""
data.foreignCurrencyKnowledge = ""
data.newsWay = ""
data.tvWay = ""
data.seminarWay = ""
data.otherWay = ""
data.totalFinancialAssets = ""
data.incomeAndTax = ""
data.transactionsMotive = ""
}
}
/\*\*
\* Oidを取得
\*/
fun getOidJsonParam(): String {
var requestBean = OidRequestBean()
var dataBean = OidRequestData()
var resultRequest = OidResultRequest()
var detailRequestData = OidDetailRequestData()
requestBean.requestHeader = Common.getRequestHeader()
var datas = DBRealm.seachAccountSendComplete(realm!!)
var cardRedatas = DBRealm.seachCardReissueBean(realm!!)
var cardReissuedatas = DBRealm.seachCardReissueBean(realm!!)
if (values == "1") {
if (datas!!.addressChangeFlag == "1") {
detailRequestData.applicationType = "11"
} else {
detailRequestData.applicationType = "10"
}
detailRequestData.appVer = appUserAgentUtil.getVersionName(this@KozaKaisetsu\_06008)
detailRequestData.applicationDate = datas.applicationDate
detailRequestData.deviceIdentification = AppUserAgentUtil.device\_model + AppUserAgentUtil.version\_release + AppUserAgentUtil.version\_language
detailRequestData.revisionOid = datas.sendedOid
detailRequestData.bankAccountSendStatus = "0"
detailRequestData.bankAccountSendDate = ""
detailRequestData.bankAddressSendStatus = "0"
detailRequestData.bankAddressSendDate = ""
detailRequestData.dnpSendStatus = "0"
detailRequestData.dnpSendDate = ""
detailRequestData.sendStatus = "0"
detailRequestData.errorMsg = ""
detailRequestData.compDate = ""
} else if (values == "2") {
detailRequestData.applicationType = "30"
detailRequestData.appVer = appUserAgentUtil.getVersionName(this@KozaKaisetsu\_06008)
detailRequestData.applicationDate = DateUtils.convertDate2String(Date(), Common.DATE)!! + DateUtils.convertDate2String(Date(), Common.TIMES)!!
detailRequestData.deviceIdentification = AppUserAgentUtil.device\_model + AppUserAgentUtil.version\_release + AppUserAgentUtil.version\_language
detailRequestData.dnpSendDate = ""
detailRequestData.dnpSendStatus = "0"
detailRequestData.sendStatus = "0"
detailRequestData.errorMsg = ""
detailRequestData.compDate = ""
detailRequestData.acomSendStatus = "0"
detailRequestData.acomSendDate = ""
} else if (values == "3") {
if (cardReissuedatas!!.addressChangeFlag == "0") {
detailRequestData.applicationType = "21"
} else {
detailRequestData.applicationType = "20"
}
detailRequestData.appVer = appUserAgentUtil.getVersionName(this@KozaKaisetsu\_06008)
detailRequestData.applicationDate = cardReissuedatas.applicationDate
detailRequestData.deviceIdentification = AppUserAgentUtil.device\_model + AppUserAgentUtil.version\_release + AppUserAgentUtil.version\_language
detailRequestData.revisionOid = cardRedatas!!.sendedOid
detailRequestData.bankAccountSendStatus = "0"
detailRequestData.bankAccountSendDate = ""
detailRequestData.bankAddressSendStatus = "0"
detailRequestData.bankAddressSendDate = ""
detailRequestData.dnpSendStatus = "0"
detailRequestData.dnpSendDate = ""
detailRequestData.sendStatus = "0"
detailRequestData.errorMsg = ""
detailRequestData.compDate = ""
}
dataBean.jsonData = detailRequestData
dataBean.adminName = "群馬銀行口座開設申込情報"
dataBean.dataClass = "GUNMABANK\_ACCOUNT\_APPLICATION"
requestBean.data = dataBean
resultRequest.request = requestBean
val jsonStr = JsonUtil.beanTojson(resultRequest)
return jsonStr
}
/\*\*
\*JSONデータを作成
\* @param 申込み日
\* @param 申込み時刻
\*/
fun getDataRegistParam(): String {
var requestBean = KozaKaisetsuRequestBean()
var data = KozaKaisetsuRequestData()
var resultRequest = KozaKaisetsuResultRequest()
var jsonData = KozakesetsuDetailData()
if (values == "1") {
var kozaOid = DBRealm.seachAccountApplication(realm!!)
// oid
data.oid = kozaOid!!.oid
} else if (values == "2") {
var cardLoanOid = DBRealm.seachCardLoanAccountApplication(realm!!)
// oid
data.oid = cardLoanOid!!.oid
} else if (values == "3") {
var cardReissueOid = DBRealm.seachcardReApplication(realm!!)
// oid
data.oid = cardReissueOid!!.oid
}
requestBean.requestHeader = Common.getRequestHeader()
// データクラス
data.dataClass = "GUNMABANK\_ACCOUNT\_APPLICATION"
// 管理名称
data.adminName = "群馬銀行口座開設申込情報"
var datas: KozaKaisetsuBean? = null
var cardLonsdatas: CardloanAccountInfoBean? = null
var cardReissuedatas: CardReissueBean? = null
if (values == "1") {
datas = DBRealm.seachAccountSendComplete(realm!!)!!
} else if (values == "2") {
cardLonsdatas = DBRealm.seachCardLoanAccountApplication(realm!!)
} else if (values == "3") {
cardReissuedatas = DBRealm.seachCardReissueBean(realm!!)
}
if (values == "1") {
if (datas!!.addressChangeFlag == "1") {
jsonData.applicationType = "11"
} else {
jsonData.applicationType = "10"
}
jsonData.appVer = appUserAgentUtil.getVersionName(this@KozaKaisetsu\_06008)
jsonData.applicationDate = datas.applicationDate
jsonData.deviceIdentification = AppUserAgentUtil.device\_model + AppUserAgentUtil.version\_release + AppUserAgentUtil.version\_language
jsonData.revisionOid = datas.sendedOid
jsonData.bankAccountSendStatus = datas.bankAccountSendStatus
jsonData.bankAccountSendDate = datas.bankAccountSendDate
jsonData.bankAddressSendStatus = datas.bankAddressSendStatus
jsonData.bankAddressSendDate = datas.bankAddressSendDate
jsonData.dnpSendStatus = datas.dnpSendStatus
jsonData.dnpSendDate = datas.dnpSendDate
jsonData.sendStatus = datas.sendStatus
jsonData.errorMsg = datas.errorMsg
jsonData.compDate = datas.compDate
} else if (values == "2") {
jsonData.applicationType = "30"
jsonData.appVer = appUserAgentUtil.getVersionName(this@KozaKaisetsu\_06008)
jsonData.applicationDate = DateUtils.convertDate2String(Date(), Common.DATE)!! + DateUtils.convertDate2String(Date(), Common.TIMES)!!
jsonData.deviceIdentification = AppUserAgentUtil.device\_model + AppUserAgentUtil.version\_release + AppUserAgentUtil.version\_language
jsonData.dnpSendStatus = cardLonsdatas!!.dnpSendStatus
jsonData.dnpSendDate = cardLonsdatas.dnpSendDate
jsonData.sendStatus = cardLonsdatas.sendStatus
jsonData.errorMsg = cardLonsdatas.errorMsg
jsonData.compDate = cardLonsdatas.compDate
jsonData.acomSendStatus = cardLonsdatas.acomSendStatus
jsonData.acomSendDate = DateUtils.convertDate2String(Date(), Common.DATE)!! + DateUtils.convertDate2String(Date(), Common.TIMES)!!
} else if (values == "3") {
if (cardReissuedatas!!.addressChangeFlag == "0") {
jsonData.applicationType = "21"
} else {
jsonData.applicationType = "20"
}
jsonData.appVer = appUserAgentUtil.getVersionName(this@KozaKaisetsu\_06008)
jsonData.applicationDate = cardReissuedatas.applicationDate
jsonData.deviceIdentification = AppUserAgentUtil.device\_model + AppUserAgentUtil.version\_release + AppUserAgentUtil.version\_language
jsonData.revisionOid = cardReissuedatas.sendedOid
jsonData.bankAccountSendStatus = cardReissuedatas.bankAccountSendStatus
jsonData.bankAccountSendDate = cardReissuedatas.bankAccountSendDate
jsonData.bankAddressSendStatus = cardReissuedatas.bankAddressSendStatus
jsonData.bankAddressSendDate = cardReissuedatas.bankAddressSendDate
jsonData.dnpSendStatus = cardReissuedatas.dnpSendStatus
jsonData.dnpSendDate = cardReissuedatas.dnpSendDate
jsonData.sendStatus = cardReissuedatas.sendStatus
jsonData.errorMsg = cardReissuedatas.errorMsg
jsonData.compDate = cardReissuedatas.compDate
}
data.jsonData = jsonData
requestBean.data = data
resultRequest.request = requestBean
val jsonStr = JsonUtil.beanTojson(resultRequest)
return jsonStr
}
/\*\*
\* 口座開設アプリ
\*/
fun getImageSendParam(): String {
var requestBean = ImageSendRequestBean()
var data = ImageSendRequestData()
var resultRequest = ImageSendResultRequest()
var jsonData = ImageSendDataJson()
var kozakaiseBean = DBRealm.seachAccountApplication(realm!!)
var cardLoanOid = DBRealm.seachCardLoanAccountApplication(realm!!)
var cardReissueOid = DBRealm.seachCardReissueBean(realm!!)
requestBean.requestHeader = Common.getDnpRequestHeader()
// データクラス
data.dataClass = "GUNMABANK\_ACCOUNT\_APPLICATION"
// 管理名称
data.adminName = "群馬銀行口座開設申込情報"
if (values == "1") {
// koza oid
data.oid = kozakaiseBean!!.oid
} else if (values == "2") {
// cardlona oid
data.oid = cardLoanOid!!.oid
} else if (values == "3") {
// reissue oid
data.oid = cardReissueOid!!.oid
}
var appDay = DateUtils.convertDate2String(Date(), Common.DATE)!!
var appTime = DateUtils.convertDate2String(Date(), Common.TIMES)!!
if (values == "1") {
jsonData.uk = kozakaiseBean!!.oid
} else if (values == "2") {
jsonData.uk = cardLoanOid!!.oid
} else if (values == "3") {
jsonData.uk = cardReissueOid!!.oid
}
jsonData.ak = Common.dnpKey
jsonData.type = "01"
jsonData.reg\_date = appDay + appTime
if (values == "1") {
val lastNameCount = kozakaiseBean!!.lastName!!.length
var firstNameStr = ""
var firstNameCount = 0
if (lastNameCount < 20) {
if (kozakaiseBean.firstName!!.length < 20 - lastNameCount) {
firstNameCount = kozakaiseBean.firstName!!.length
} else {
firstNameCount = 20 - lastNameCount
}
firstNameStr = kozakaiseBean.firstName!!.substring(0, firstNameCount)
}
jsonData.name = kozakaiseBean.lastName + firstNameStr
} else if (values == "2") {
val lastNameCount = cardloanInfoBean!!.pNameF!!.length
var firstNameStr = ""
var firstNameCount = 0
if (lastNameCount < 20) {
if (cardloanInfoBean!!.pNameN!!.length < 20 - lastNameCount) {
firstNameCount = cardloanInfoBean!!.pNameN!!.length
} else {
firstNameCount = 20 - lastNameCount
}
firstNameStr = cardloanInfoBean!!.pNameN!!.substring(0, firstNameCount)
}
jsonData.name = cardLoanOid!!.pNameF + firstNameStr
} else if (values == "3") {
val lastNameCount = cardReissueOid!!.lastName!!.length
var firstNameStr = ""
var firstNameCount = 0
if (lastNameCount < 20) {
if (cardReissueOid.firstName!!.length < 20 - lastNameCount) {
firstNameCount = cardReissueOid.firstName!!.length
} else {
firstNameCount = 20 - lastNameCount
}
firstNameStr = cardReissueOid.firstName!!.substring(0, firstNameCount)
}
jsonData.name = cardReissueOid.lastName + firstNameStr
}
if (values == "1") {
if (BuildConfig.FLAVOR == "dev") {
// 免許書画像(表)
jsonData.image\_1 = Base64.encodeToString(bitmapPostScale(kozakaiseBean!!.driverLicenseFront), Base64.NO\_WRAP)
// 免許書画像(裏)
jsonData.image\_2 = Base64.encodeToString(bitmapPostScale(kozakaiseBean.driverLicenseBack), Base64.NO\_WRAP)
// 健康保険書(表)
if (kozakaiseBean.insuranceFront != null) {
jsonData.health\_image1 = Base64.encodeToString(bitmapPostScale(kozakaiseBean.insuranceFront), Base64.NO\_WRAP)
}
// 健康保険書(裏)
if (kozakaiseBean.insuranceBack != null) {
jsonData.health\_image2 = Base64.encodeToString(bitmapPostScale(kozakaiseBean.insuranceBack), Base64.NO\_WRAP)
}
// オリジナル券面
if (kozakaiseBean.cardImage != null) {
jsonData.original\_image = Base64.encodeToString(kozakaiseBean.cardImage, Base64.NO\_WRAP)
}
} else {
// 免許書画像(表)
jsonData.image\_1 = encryptDnp(bitmapPostScale(kozakaiseBean!!.driverLicenseFront))
// 免許書画像(裏)
jsonData.image\_2 = encryptDnp(bitmapPostScale(kozakaiseBean.driverLicenseBack))
// 健康保険書(表)
if (kozakaiseBean.insuranceFront != null) {
jsonData.health\_image1 = encryptDnp(bitmapPostScale(kozakaiseBean.insuranceFront))
}
// 健康保険書(裏)
if (kozakaiseBean.insuranceBack != null) {
jsonData.health\_image2 = encryptDnp(bitmapPostScale(kozakaiseBean.insuranceBack))
}
// オリジナル券面
if (kozakaiseBean.cardImage != null) {
jsonData.original\_image = encryptDnp(kozakaiseBean.cardImage)
}
}
} else if (values == "2") {
if (BuildConfig.FLAVOR == "dev") {
// 免許書画像(表)
jsonData.image\_1 = Base64.encodeToString(bitmapPostScale(cardLoanOid!!.driverLicenseFront), Base64.NO\_WRAP)
// 免許書画像(裏)
jsonData.image\_2 = Base64.encodeToString(bitmapPostScale(cardLoanOid.driverLicenseBack), Base64.NO\_WRAP)
} else {
// 免許書画像(表)
jsonData.image\_1 = encryptDnp(bitmapPostScale(cardLoanOid!!.driverLicenseFront))
// 免許書画像(裏)
jsonData.image\_2 = encryptDnp(bitmapPostScale(cardLoanOid.driverLicenseBack))
}
} else if (values == "3") {
if (BuildConfig.FLAVOR == "dev") {
// 免許書画像(表)
jsonData.image\_1 = Base64.encodeToString(bitmapPostScale(cardReissueOid!!.driverLicenseFront), Base64.NO\_WRAP)
// 免許書画像(裏)
jsonData.image\_2 = Base64.encodeToString(bitmapPostScale(cardReissueOid.driverLicenseBack), Base64.NO\_WRAP)
// 健康保険書(表)
if (cardReissueOid.insuranceFront != null) {
jsonData.health\_image1 = Base64.encodeToString(bitmapPostScale(cardReissueOid.insuranceFront), Base64.NO\_WRAP)
}
// 健康保険書(裏)
if (cardReissueOid.insuranceBack != null) {
jsonData.health\_image2 = Base64.encodeToString(bitmapPostScale(cardReissueOid.insuranceBack), Base64.NO\_WRAP)
}
// オリジナル券面
if (cardReissueOid.cardImage != null) {
jsonData.original\_image = Base64.encodeToString(cardReissueOid.cardImage, Base64.NO\_WRAP)
}
} else {
// 免許書画像(表)
jsonData.image\_1 = encryptDnp(bitmapPostScale(cardReissueOid!!.driverLicenseFront))
// 免許書画像(裏)
jsonData.image\_2 = encryptDnp(bitmapPostScale(cardReissueOid.driverLicenseBack))
// 健康保険書(表)
if (cardReissueOid.insuranceFront != null) {
jsonData.health\_image1 = encryptDnp(bitmapPostScale(cardReissueOid.insuranceFront))
}
// 健康保険書(裏)
if (cardReissueOid.insuranceBack != null) {
jsonData.health\_image2 = encryptDnp(bitmapPostScale(cardReissueOid.insuranceBack))
}
// オリジナル券面
if (cardReissueOid.cardImage != null) {
jsonData.original\_image = encryptDnp(cardReissueOid.cardImage)
}
}
}
var imageFlg: String? = ""
if (jsonData.image\_1 != null && jsonData.image\_2 != null && jsonData.health\_image1 == null && jsonData.health\_image2 == null && jsonData.original\_image == null) {
imageFlg = "1"
} else if (jsonData.image\_1 != null && jsonData.image\_2 != null && jsonData.health\_image1 != null && jsonData.health\_image2 != null && jsonData.original\_image == null) {
imageFlg = "2"
} else if (jsonData.image\_1 != null && jsonData.image\_2 != null && jsonData.health\_image1 == null && jsonData.health\_image2 == null && jsonData.original\_image != null) {
imageFlg = "3"
} else if (jsonData.image\_1 != null && jsonData.image\_2 != null && jsonData.health\_image1 != null && jsonData.health\_image2 != null && jsonData.original\_image != null) {
imageFlg = "4"
}
jsonData.image\_flg = imageFlg
jsonData.device\_os\_version = AppUserAgentUtil.version\_release
jsonData.device\_name = android.os.Build.MODEL
if (values == "1") {
jsonData.tokenkey = SecureHashAlgorithmUTF8.getSHA256StrJava(kozakaiseBean!!.oid + "invest\_trust" + appDay + appTime + "openaccount")
} else if (values == "2") {
jsonData.tokenkey = SecureHashAlgorithmUTF8.getSHA256StrJava(cardLoanOid!!.oid + "invest\_trust" + appDay + appTime + "openaccount")
} else if (values == "3") {
jsonData.tokenkey = SecureHashAlgorithmUTF8.getSHA256StrJava(cardReissueOid!!.oid + "invest\_trust" + appDay + appTime + "openaccount")
}
jsonData.tokendate = appDay + appTime
data.jsonData = jsonData
requestBean.data = data
resultRequest.request = requestBean
val jsonStr = JsonUtil.beanTojson(resultRequest)
return jsonStr
}
/\*
\* DNPシステム送信結果state
\* \*/
fun getDnpModifyParam(): String {
var requestBean = KozaKaisetsuRequestBean()
var data = KozaKaisetsuRequestData()
var resultRequest = KozaKaisetsuResultRequest()
var jsonData = KozakesetsuDetailData()
if (values == "1") {
var kozaOid = DBRealm.seachAccountApplication(realm!!)
// oid
data.oid = kozaOid!!.oid
} else if (values == "2") {
var cardLoanOid = DBRealm.seachCardLoanAccountApplication(realm!!)
// oid
data.oid = cardLoanOid!!.oid
} else if (values == "3") {
var cardReissueOid = DBRealm.seachCardReissueBean(realm!!)
// oid
data.oid = cardReissueOid!!.oid
}
requestBean.requestHeader = Common.getRequestHeader()
// データクラス
data.dataClass = "GUNMABANK\_ACCOUNT\_APPLICATION"
// 管理名称
data.adminName = "群馬銀行口座開設申込情報"
var datas: KozaKaisetsuBean? = null
var cardLonsdatas: CardloanAccountInfoBean? = null
var cardReissuedatas: CardReissueBean? = null
if (values == "1") {
datas = DBRealm.seachAccountSendComplete(realm!!)!!
} else if (values == "2") {
cardLonsdatas = DBRealm.seachCardLoanAccountApplication(realm!!)
} else if (values == "3") {
cardReissuedatas = DBRealm.seachCardReissueBean(realm!!)
}
if (values == "1") {
if (datas!!.addressChangeFlag == "1") {
jsonData.applicationType = "11"
} else {
jsonData.applicationType = "10"
}
jsonData.appVer = appUserAgentUtil.getVersionName(this@KozaKaisetsu\_06008)
jsonData.applicationDate = datas.applicationDate
jsonData.deviceIdentification = AppUserAgentUtil.device\_model + AppUserAgentUtil.version\_release + AppUserAgentUtil.version\_language
jsonData.revisionOid = datas.sendedOid
jsonData.bankAccountSendStatus = datas.bankAccountSendStatus
jsonData.bankAccountSendDate = datas.bankAccountSendDate
jsonData.bankAddressSendStatus = datas.bankAddressSendStatus
jsonData.bankAddressSendDate = datas.bankAddressSendDate
jsonData.dnpSendStatus = datas.dnpSendStatus
jsonData.dnpSendDate = datas.dnpSendDate
jsonData.sendStatus = datas.sendStatus
jsonData.errorMsg = datas.errorMsg
jsonData.compDate = DateUtils.convertDate2String(Date(), Common.DATE)!! + DateUtils.convertDate2String(Date(), Common.TIMES)!!
} else if (values == "2") {
jsonData.applicationType = "30"
jsonData.appVer = appUserAgentUtil.getVersionName(this@KozaKaisetsu\_06008)
jsonData.applicationDate = DateUtils.convertDate2String(Date(), Common.DATE)!! + DateUtils.convertDate2String(Date(), Common.TIMES)!!
jsonData.deviceIdentification = AppUserAgentUtil.device\_model + AppUserAgentUtil.version\_release + AppUserAgentUtil.version\_language
jsonData.dnpSendStatus = cardLonsdatas!!.dnpSendStatus
jsonData.dnpSendDate = cardLonsdatas.dnpSendDate
jsonData.sendStatus = cardLonsdatas.sendStatus
jsonData.errorMsg = cardLonsdatas.errorMsg
jsonData.compDate = cardLonsdatas.compDate
jsonData.acomSendStatus = cardLonsdatas.acomSendStatus
jsonData.acomSendDate = DateUtils.convertDate2String(Date(), Common.DATE)!! + DateUtils.convertDate2String(Date(), Common.TIMES)!!
} else if (values == "3") {
if (cardReissuedatas!!.addressChangeFlag == "0") {
jsonData.applicationType = "21"
} else {
jsonData.applicationType = "20"
}
jsonData.appVer = appUserAgentUtil.getVersionName(this@KozaKaisetsu\_06008)
jsonData.applicationDate = cardReissuedatas.applicationDate
jsonData.deviceIdentification = AppUserAgentUtil.device\_model + AppUserAgentUtil.version\_release + AppUserAgentUtil.version\_language
jsonData.revisionOid = cardReissuedatas.sendedOid
jsonData.bankAccountSendStatus = cardReissuedatas.bankAccountSendStatus
jsonData.bankAccountSendDate = cardReissuedatas.bankAccountSendDate
jsonData.bankAddressSendStatus = cardReissuedatas.bankAddressSendStatus
jsonData.bankAddressSendDate = cardReissuedatas.bankAddressSendDate
jsonData.dnpSendStatus = cardReissuedatas.dnpSendStatus
jsonData.dnpSendDate = cardReissuedatas.dnpSendDate
jsonData.sendStatus = cardReissuedatas.sendStatus
jsonData.errorMsg = cardReissuedatas.errorMsg
jsonData.compDate = DateUtils.convertDate2String(Date(), Common.DATE)!! + DateUtils.convertDate2String(Date(), Common.TIMES)!!
}
data.jsonData = jsonData
requestBean.data = data
resultRequest.request = requestBean
val jsonStr = JsonUtil.beanTojson(resultRequest)
return jsonStr
}
/\*\*
\* 画面タイトル初期化
\*/
fun activityTitleInit() {
//title name
val titleText = findViewById(R.id.open\_account\_title\_name) as TextView
if (values == Common.ACCOUNT\_SEND) {
titleText.setText(R.string.kozakaisetsu\_title\_10)
} else if (values == Common.CARDLOAN\_SEND) {
titleText.setText(R.string.card\_title\_10)
} else if (values == Common.CARD\_REISSUE\_SEND) {
titleText.setText(R.string.card\_reissue\_title\_10)
}
}
/\*\*
\* 画面UI初期化
\*/
fun activityIdInit() {
// 次へ
next = findViewById(R.id.next) as Button
// Title
progressBarview = findViewById(R.id.pro\_bar\_view) as ProgressBarView
// 戻る
titleBack = findViewById(R.id.open\_account\_title\_back) as ImageView
// 隠す
titleBack!!.setVisibility(View.INVISIBLE)
//中断する
openAccountClose = findViewById(R.id.open\_account\_close) as TextView
vpProgressBar = findViewById(R.id.vp\_progress) as VerticalProgressBar
progressRun()
textRelativeLayout = findViewById(R.id.text\_relative\_layout) as RelativeLayout
//申込データ作成
applicationData = findViewById(R.id.application\_data) as TextView
//本人確認証書データ送信
dnpSendTextview = findViewById(R.id.dnp\_send\_textview) as TextView
//申込データ送信
dataSeng = findViewById(R.id.data\_seng) as TextView
//申込完了
applyOk = findViewById(R.id.apply\_ok) as TextView
textRelativeLayout!!.post(Runnable {
val lp1 = RelativeLayout.LayoutParams(applicationData!!.layoutParams)
lp1.setMargins(0, 0, 0, 0)
//申込データ作成
applicationData!!.setLayoutParams(lp1)
val lp2 = RelativeLayout.LayoutParams(dnpSendTextview!!.layoutParams)
lp2.setMargins(0, (textRelativeLayout!!.measuredHeight!! - 1) / 3, 0, 0)
//本人確認証書データ送信
dnpSendTextview!!.setLayoutParams(lp2)
val lp3 = RelativeLayout.LayoutParams(dataSeng!!.layoutParams)
lp3.setMargins(0, (textRelativeLayout!!.measuredHeight!! - 1) / 3 \* 2 - 10, 0, 0)
//申込データ送信
dataSeng!!.setLayoutParams(lp3)
val lp4 = RelativeLayout.LayoutParams(applyOk!!.layoutParams)
lp4.setMargins(0, (textRelativeLayout!!.measuredHeight!! - 1) / 3 \* 3 - 63, 0, 0)
applyOk!!.setLayoutParams(lp4)
})
}
/\*\*
\* 進捗条
\*/
private fun progressRun() {
object : Thread() {
override fun run() {
try {
for (i in progressStartNumber..progressEndNumber) {
Thread.sleep(20)
vpProgressBar!!.setProgress(i)
}
} catch (e: InterruptedException) {
e.printStackTrace()
}
}
}.start()
}
fun sendProgressH(strNo: String?) {
intent.setClass(this@KozaKaisetsu\_06008, AccountProgressDialogLayout::class.java)
intent.putExtra("sendProgressText", strNo);
startActivity(intent)
}
//画面UI初期表示
fun activityPageInit() {
progressBarview!!.setbar(4)
}
/\*\*
\* 画面UI事件初期化
\*/
fun activityIdEventInit(str: String?) {
next!!.setOnClickListener {
// 画面遷移
intent.setClass(this@KozaKaisetsu\_06008, KozaKaisetsu\_06008\_1::class.java)
intent.putExtra("mode", str)
intent.putExtra("internetflg", internetFlg)
startActivity(intent)
ActivityCollector.accountFinishAll()
}
}
fun dataAppend(appDay: String, appTime: String) {
sendProgressH("2")
if (values == "1") {
dataAddUtil.accountData(appDay, appTime)
val jsonDataDetailStr = String(jsonDataDetail.toString().toByteArray(Charset.forName(Common.SHIFTJIS)), Charset.forName(Common.SHIFTJIS))
val jsonDataDetailAddressStr = String(jsonDataDetailAddress.toString().toByteArray(Charset.forName(Common.SHIFTJIS)), Charset.forName(Common.SHIFTJIS))
if (BuildConfig.FLAVOR == "dev") {
if (accountApplication!!.addressChangeFlag == "1") {
OkHttpUtil.postFormAsyn(Common.accountApiUrl, callback, jsonDataDetail.toString(), jsonDataDetailAddress.toString(), Common.CSV, Common.LINKCSV)
} else {
OkHttpLinkCSVUtil.postFormAsyn(Common.accountApiUrl, linkcsvNoCallback, jsonDataDetail.toString(), Common.CSV)
}
} else {
if (accountApplication!!.addressChangeFlag == "1") {
OkHttpShiteJisUtil.postFormAsyn(Common.accountApiUrl, callbackShift, jsonDataDetailStr, jsonDataDetailAddressStr, Common.CSV, Common.LINKCSV)
} else {
OkHttpNoLinkCSVShiftJisUtil.postFormAsyn(Common.accountApiUrl, callbackNoLinkCsvShift, jsonDataDetailStr, Common.CSV)
}
}
} else if (values == "2") {
if (cardloanInfoBean!!.workType == "1") {
dataAddUtil.cardLoanKinmuData()
val kinmuEncryJson = Common.encrypt(kinmuJson!!)
if (BuildConfig.FLAVOR == "dev") {
OkHttpUtil.postFormAsynForAUth(Common.cardloanApiUrl, callback, kinmuJson!!, Common.ivKey!!, Common.JSONDATA, Common.IV, Common.VERIFICATIONUSER, Common.VERIFICATIONPWD)
} else {
OkHttpUtil.postFormAsynForAUth(Common.cardloanApiUrl, callback, kinmuEncryJson!!, Common.ivKey!!, Common.JSONDATA, Common.IV, Common.VERIFICATIONUSER, Common.VERIFICATIONPWD)
}
} else if (cardloanInfoBean!!.workType == "3") {
dataAddUtil.cardLoanshufuData()
val shufuEncryJson = Common.encrypt(shufuJson!!)
if (BuildConfig.FLAVOR == "dev") {
OkHttpUtil.postFormAsynForAUth(Common.cardloanApiUrl, callback, shufuJson!!, Common.ivKey!!, Common.JSONDATA, Common.IV, Common.VERIFICATIONUSER, Common.VERIFICATIONPWD)
} else {
OkHttpUtil.postFormAsynForAUth(Common.cardloanApiUrl, callback, shufuEncryJson!!, Common.ivKey!!, Common.JSONDATA, Common.IV, Common.VERIFICATIONUSER, Common.VERIFICATIONPWD)
}
}
} else if (values == "3") {
dataAddUtil.cardReissueData(appDay, appTime)
val jsonReDataDetailStr = String(jsonReDataDetail.toString().toByteArray(Charset.forName(Common.SHIFTJIS)), Charset.forName(Common.SHIFTJIS))
val jsonReDataDetailAddressStr = String(jsonReDataDetailAddress.toString().toByteArray(Charset.forName(Common.SHIFTJIS)), Charset.forName(Common.SHIFTJIS))
if (BuildConfig.FLAVOR == "dev") {
if (cardReissueApplication!!.addressChangeFlag == "1") {
OkHttpUtil.postFormAsyn(Common.accountApiUrl, callback, jsonReDataDetail.toString(), jsonReDataDetailAddress.toString(), Common.CSV, Common.LINKCSV)
} else {
OkHttpLinkCSVUtil.postFormAsyn(Common.accountApiUrl, linkcsvNoCallback, jsonReDataDetail.toString(), Common.CSV)
}
} else {
if (cardReissueApplication!!.addressChangeFlag == "1") {
OkHttpShiteJisUtil.postFormAsyn(Common.accountApiUrl, callbackShift, jsonReDataDetailStr, jsonReDataDetailAddressStr, Common.CSV, Common.LINKCSV)
} else {
OkHttpNoLinkCSVShiftJisUtil.postFormAsyn(Common.accountApiUrl, callbackNoLinkCsvShift, jsonReDataDetailStr, Common.CSV)
}
}
}
}
/\*\*
\* 口座開設 DNPシステム送信Data
\*/
fun accountImageDNPSendFun() {
sendSuccessH = 0
sendProgressH("1")
if (values == "1") {
if (BuildConfig.FLAVOR == "dev") {
val param = getImageSendParam()
OkHttpUtil.postJsonAsynForAUth(Common.dnpSendApiUrl, dnpSendCallback, param, Common.IMAGETESTDPOSTUSER, Common.IMAGETESTDPOSTPWD)
} else if (BuildConfig.FLAVOR == "stg" || BuildConfig.FLAVOR == "jp") {
val param = getImageSendParam()
OkHttpUtil.postJsonAsynForAUth(Common.dnpSendApiUrl, dnpSendCallback, param, Common.IMAGETESTDPOSTUSER, Common.IMAGETESTDPOSTPWD)
} else if (BuildConfig.FLAVOR == "pro") {
val param = getImageSendParam()
OkHttpUtil.postJsonAsynForAUth(Common.dnpSendApiUrl, dnpSendCallback, param, Common.IMAGETESTDPOSTUSER, Common.IMAGETESTDPOSTPWD)
}
} else if (values == "2") {
if (BuildConfig.FLAVOR == "dev") {
val param = getImageSendParam()
OkHttpUtil.postJsonAsynForAUth(Common.dnpSendApiUrl, dnpSendCallback, param, Common.IMAGETESTDPOSTUSER, Common.IMAGETESTDPOSTPWD)
} else if (BuildConfig.FLAVOR == "stg" || BuildConfig.FLAVOR == "jp") {
val param = getImageSendParam()
OkHttpUtil.postJsonAsynForAUth(Common.dnpSendApiUrl, dnpSendCallback, param, Common.IMAGETESTDPOSTUSER, Common.IMAGETESTDPOSTPWD)
} else if (BuildConfig.FLAVOR == "pro") {
val param = getImageSendParam()
OkHttpUtil.postJsonAsynForAUth(Common.dnpSendApiUrl, dnpSendCallback, param, Common.IMAGETESTDPOSTUSER, Common.IMAGETESTDPOSTPWD)
}
} else if (values == "3") {
if (BuildConfig.FLAVOR == "dev") {
val param = getImageSendParam()
OkHttpUtil.postJsonAsynForAUth(Common.dnpSendApiUrl, dnpSendCallback, param, Common.IMAGETESTDPOSTUSER, Common.IMAGETESTDPOSTPWD)
} else if (BuildConfig.FLAVOR == "stg" || BuildConfig.FLAVOR == "jp") {
val param = getImageSendParam()
OkHttpUtil.postJsonAsynForAUth(Common.dnpSendApiUrl, dnpSendCallback, param, Common.IMAGETESTDPOSTUSER, Common.IMAGETESTDPOSTPWD)
} else if (BuildConfig.FLAVOR == "pro") {
val param = getImageSendParam()
OkHttpUtil.postJsonAsynForAUth(Common.dnpSendApiUrl, dnpSendCallback, param, Common.IMAGETESTDPOSTUSER, Common.IMAGETESTDPOSTPWD)
}
}
}
}
手机扫一扫
移动阅读更方便
你可能感兴趣的文章