public void handleMessage(Message msg) { if (!Thread.currentThread().isInterrupted()) { switch (msg.what) { case 1234: String str_content = ""; File file = new File(zw_path); if (file.exists()) { byte[] bytes = null; try { bytes = FileUtil.getBytesFromFile(file); } catch (IOException e) { e.printStackTrace(); } str_content = Base64.encodeToString(bytes, Base64.DEFAULT); getFlowFormElements.SaveArchiveData( Detail_xzfwsh_chakantabs_MainActivity.this, 3000, ArcStepID, infofile.WFID().get(), infofile.WFStepID().get(), infoFile.infoUsername().get(), infofile.infoUserType().get(), str_content); } break; default: break; } } }
@Override protected void handlerLoginInfo(Context context, HandleResult handleResult, int paramInt) { switch (paramInt) { case 1: // if (handleResult.getiSuccess() != null // && handleResult.getiSuccess().equals("success")) { getBrowseUser.getBrowseUser(Detail_xzfwsh_chakantabs_MainActivity.this, 1, WFID); // } if (handleResult.isSelPeople()) { ll_checkpeople.setVisibility(View.VISIBLE); ll_checkpeople1.setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { Detail_xzfwsh_chakantabs_MainActivity.this.startActivityForResult( new Intent( Detail_xzfwsh_chakantabs_MainActivity.this, PeopleCheck_Activity.class), 3000); } }); } break; case 1000: if (handleResult.getiSuccess() != null && handleResult.getiSuccess().equals("success")) { datas = handleResult.getDatas(); infoFile.edit().TypeOfLast().put(1000).apply(); if (!datas.getFlowAction().equals("BranchSel")) { Intent intent = new Intent(); intent.setClass( Detail_xzfwsh_chakantabs_MainActivity.this, FirstNextStepActivity.class); Bundle bundle = new Bundle(); bundle.putString("stepName", datas.getFlowDescript()); bundle.putString("checkCode", datas.getCheckCode()); bundle.putString("checkName", datas.getCheckName()); bundle.putString("NextStepID", datas.getNextStepID()); intent.putExtras(bundle); startActivity(intent); // Detail_xzfwsh_chakantabs_MainActivity.this.finish(); } else { Intent intent = new Intent(); intent.setClass( Detail_xzfwsh_chakantabs_MainActivity.this, SecondNextStepActivity.class); infofile .edit() .FlowStepID() .put(Integer.valueOf(datas.getNextStepID()).intValue()) .apply(); startActivity(intent); // Detail_xzfwsh_chakantabs_MainActivity.this.finish(); } } break; case 2000: if (handleResult.getiSuccess() != null && handleResult.getiSuccess().equals("success")) { FileUtil.writeBase64StringToFile(handleResult.getContent(), zw_path); hasDownZW = true; if (iAppOffice != null) { IAppOfficeUtil.OpenOfficeFile(iAppOffice, zw_path); } } break; case 3000: if (handleResult.getiSuccess() != null && handleResult.getiSuccess().equals("success")) { ArcStepID = handleResult.getArcStepID(); infoFile.edit().ArcStepID().put(ArcStepID).apply(); } break; default: break; } }