mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-06-30 21:04:16 +00:00
add project adins
This commit is contained in:
parent
ad06ac5505
commit
f8f85d679d
5299 changed files with 625430 additions and 0 deletions
|
@ -0,0 +1,512 @@
|
|||
package com.services;
|
||||
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
|
||||
import com.adins.mss.base.GlobalData;
|
||||
import com.adins.mss.base.NewMainActivity;
|
||||
import com.adins.mss.base.R;
|
||||
import com.adins.mss.base.crashlytics.FireCrash;
|
||||
import com.adins.mss.base.dynamicform.JsonRequestTaskD;
|
||||
import com.adins.mss.base.dynamicform.JsonResponseTaskD;
|
||||
import com.adins.mss.base.timeline.TimelineManager;
|
||||
import com.adins.mss.base.timeline.activity.Timeline_Activity;
|
||||
import com.adins.mss.base.todolist.ToDoList;
|
||||
import com.adins.mss.base.util.GsonHelper;
|
||||
import com.adins.mss.base.util.Utility;
|
||||
import com.adins.mss.constant.Global;
|
||||
import com.adins.mss.dao.Scheme;
|
||||
import com.adins.mss.dao.TaskD;
|
||||
import com.adins.mss.dao.TaskH;
|
||||
import com.adins.mss.dao.Timeline;
|
||||
import com.adins.mss.foundation.db.dataaccess.GeneralParameterDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.SchemeDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.TaskDDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.TaskHDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.TimelineDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.TimelineTypeDataAccess;
|
||||
import com.adins.mss.foundation.formatter.Tool;
|
||||
import com.adins.mss.foundation.http.HttpConnectionResult;
|
||||
import com.adins.mss.foundation.http.HttpCryptedConnection;
|
||||
import com.adins.mss.foundation.notification.Notification;
|
||||
import com.adins.mss.main.MSMApplication;
|
||||
import com.adins.mss.svy.SurveyVerificationListTask;
|
||||
import com.adins.mss.svy.models.JsonRequestTaskWithMode;
|
||||
import com.adins.mss.svy.tool.Constants;
|
||||
import com.google.firebase.perf.FirebasePerformance;
|
||||
import com.google.firebase.perf.metrics.HttpMetric;
|
||||
|
||||
import org.acra.ACRA;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
//import com.adins.mss.foundation.notification.Notification;
|
||||
//import com.adins.mss.foundation.notification.Notification.Tone;
|
||||
//import com.adins.mss.foundation.notification.Notification.Vibrate;
|
||||
|
||||
public class SurveyVerificationThread extends Thread {
|
||||
public static final String VERIFICATIONLIST_NOTIFICATION_KEY = "VERIFICATIONLIST_NOTIFICATION_KEY";
|
||||
public static final String VERIFICATIONBRANCHLIST_NOTIFICATION_KEY = "VERIFICATIONBRANCHLIST_NOTIFICATION_KEY";
|
||||
private Context context;
|
||||
private int interval; // in miliseconds
|
||||
private volatile boolean keepRunning = true;
|
||||
private volatile boolean isWait = false;
|
||||
public static long lastAssigmentDate = 0;
|
||||
String sentStatus = "";
|
||||
public static List<TaskH> taskHList = new ArrayList<TaskH>();
|
||||
public static int notifCount = 0;
|
||||
public String uuidUser ;
|
||||
|
||||
public boolean firstNotif = true;
|
||||
|
||||
// public Class mss;
|
||||
|
||||
public SurveyVerificationThread(Context context) {
|
||||
// TODO Auto-generated constructor stub
|
||||
this.context = context;
|
||||
interval = Global.MINUTE * 10;
|
||||
try {
|
||||
uuidUser = GlobalData.getSharedGlobalData().getUser()
|
||||
.getUuid_user();
|
||||
if(uuidUser!=null){
|
||||
if (GeneralParameterDataAccess.getOne(context, uuidUser, "PRM04_F5IN")
|
||||
.getGs_value() != null
|
||||
&& !GeneralParameterDataAccess
|
||||
.getOne(context, uuidUser, "PRM04_F5IN").getGs_value()
|
||||
.isEmpty()) {
|
||||
interval = Integer.parseInt(GeneralParameterDataAccess.getOne(
|
||||
context, uuidUser, "PRM04_F5IN").getGs_value()) * 1000; // from
|
||||
// milisecond
|
||||
// to
|
||||
// second
|
||||
}
|
||||
}else{
|
||||
keepRunning = false;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
if(Global.user!=null){
|
||||
uuidUser = Global.user.getUuid_user();
|
||||
if(uuidUser!=null){
|
||||
if (GeneralParameterDataAccess.getOne(context, uuidUser, "PRM04_F5IN")
|
||||
.getGs_value() != null
|
||||
&& !GeneralParameterDataAccess
|
||||
.getOne(context, uuidUser, "PRM04_F5IN").getGs_value()
|
||||
.isEmpty()) {
|
||||
interval = Integer.parseInt(GeneralParameterDataAccess.getOne(
|
||||
context, uuidUser, "PRM04_F5IN").getGs_value()) * 1000; // from
|
||||
// milisecond
|
||||
// to
|
||||
// second
|
||||
}
|
||||
}
|
||||
}else{
|
||||
keepRunning = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
while (keepRunning) {
|
||||
try {
|
||||
synchronized (this) {
|
||||
if (isWait) {
|
||||
this.wait();
|
||||
}
|
||||
}
|
||||
|
||||
if (Tool.isInternetconnected(context)) {
|
||||
if(NewMainActivity.mnSurveyVerif!=null){
|
||||
notifCount = 0;
|
||||
taskHList = getServerNewTask(false);
|
||||
notifCount = taskHList.size();
|
||||
// save to local
|
||||
if(taskHList!=null &&taskHList.size()>0)
|
||||
ProcessTaskList(notifCount, taskHList, false);
|
||||
}
|
||||
|
||||
if(NewMainActivity.mnVerifByBranch !=null){
|
||||
notifCount = 0;
|
||||
taskHList = getServerNewTask(true);
|
||||
notifCount = taskHList.size();
|
||||
// save to local
|
||||
if(taskHList!=null &&taskHList.size()>0)
|
||||
ProcessTaskList(notifCount, taskHList, true);
|
||||
}
|
||||
}
|
||||
|
||||
// bong 10 apr 15 - Gigin request penjagaan jika PRM F5IN dari
|
||||
// server = 0
|
||||
// minimal notif jalan satu kali
|
||||
if (interval == 0) {
|
||||
keepRunning = false;
|
||||
}
|
||||
/*Handler handler = new Handler(Looper.getMainLooper());
|
||||
handler.post(new Runnable() {
|
||||
public void run() {
|
||||
// UI code goes here
|
||||
try {
|
||||
if (MainMenuActivity.mnSVYVerify != null)
|
||||
MainMenuActivity.mnSVYVerify.setCounter(String.valueOf(Constants.getCounterVerificationTask(context)));
|
||||
if (MainMenuActivity.mnSVYVerifyByBranch != null)
|
||||
MainMenuActivity.mnSVYVerifyByBranch.setCounter(String.valueOf(Constants.getCounterVerificationTaskByBranch(context)));
|
||||
if (MainMenuActivity.menuAdapter != null)
|
||||
MainMenuActivity.menuAdapter.notifyDataSetChanged();
|
||||
if (Timeline_Activity.getTimelineHandler() != null)
|
||||
Timeline_Activity.getTimelineHandler().sendEmptyMessage(0);
|
||||
// long taskListCounter = ToDoList.getAllCounter(context);
|
||||
// if(Timeline_Activity.query!=null)
|
||||
// Timeline_Activity.query.id(R.id.txtJumlahOutstanding).text(String.valueOf(taskListCounter));
|
||||
} catch (Exception e) { FireCrash.log(e);
|
||||
// TODO: handle exception
|
||||
}
|
||||
}
|
||||
});*/
|
||||
try {
|
||||
// MainMenuActivity.setDrawerCounter();
|
||||
NewMainActivity.setCounter();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
sleep(interval);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ProcessTaskList(int notifCount, List<TaskH> taskHList, boolean isBranch) {
|
||||
// List<String> listUuidTaskH = null;
|
||||
if (taskHList.size() > 0) {
|
||||
// listUuidTaskH = new ArrayList<>();
|
||||
for (TaskH taskH : taskHList) {
|
||||
// listUuidTaskH.add(taskH.getUuid_task_h());
|
||||
taskH.setUser(GlobalData.getSharedGlobalData()
|
||||
.getUser());
|
||||
taskH.setUuid_user(GlobalData
|
||||
.getSharedGlobalData().getUser()
|
||||
.getUuid_user());
|
||||
if (isBranch)
|
||||
taskH.setAccess_mode(TaskHDataAccess.ACCESS_MODE_BRANCH);
|
||||
else
|
||||
taskH.setAccess_mode(TaskHDataAccess.ACCESS_MODE_USER);
|
||||
taskH.setIs_verification(Global.TRUE_STRING);
|
||||
String uuid_timelineType = TimelineTypeDataAccess
|
||||
.getTimelineTypebyType(context,
|
||||
Global.TIMELINE_TYPE_VERIFICATION)
|
||||
.getUuid_timeline_type();
|
||||
boolean wasInTimeline = TimelineDataAccess
|
||||
.getOneTimelineByTaskH(context,
|
||||
GlobalData
|
||||
.getSharedGlobalData()
|
||||
.getUser()
|
||||
.getUuid_user(),
|
||||
taskH.getUuid_task_h(),
|
||||
uuid_timelineType) != null;
|
||||
|
||||
String uuid_scheme = taskH.getUuid_scheme();
|
||||
Scheme scheme = SchemeDataAccess.getOne(
|
||||
context, uuid_scheme);
|
||||
if (scheme != null) {
|
||||
taskH.setScheme(scheme);
|
||||
TaskH h = TaskHDataAccess.getOneTaskHeader(
|
||||
context, taskH.getTask_id());
|
||||
if (h != null && h.getStatus() != null) {
|
||||
if (!ToDoList.isOldTask(h)) {
|
||||
TaskHDataAccess.addOrReplace(
|
||||
context, taskH);
|
||||
if (!wasInTimeline)
|
||||
TimelineManager.insertTimeline(
|
||||
context, taskH);
|
||||
} else {
|
||||
if (h.getAccess_mode() != null && h.getAccess_mode().length() > 0) {
|
||||
if (!isBranch && h.getAccess_mode()
|
||||
.equals(TaskHDataAccess.ACCESS_MODE_BRANCH)) {
|
||||
h.setAccess_mode(TaskHDataAccess.ACCESS_MODE_HYBRID);
|
||||
TaskHDataAccess
|
||||
.addOrReplace(
|
||||
context, h);
|
||||
} else if (isBranch && h.getAccess_mode()
|
||||
.equals(TaskHDataAccess.ACCESS_MODE_USER)) {
|
||||
h.setAccess_mode(TaskHDataAccess.ACCESS_MODE_HYBRID);
|
||||
TaskHDataAccess
|
||||
.addOrReplace(
|
||||
context, h);
|
||||
}
|
||||
}
|
||||
notifCount--;
|
||||
}
|
||||
} else {
|
||||
TaskHDataAccess.addOrReplace(context,
|
||||
taskH);
|
||||
if (!wasInTimeline)
|
||||
TimelineManager.insertTimeline(
|
||||
context, taskH);
|
||||
}
|
||||
|
||||
//TODO : tambahin buat get answer
|
||||
TaskD d = TaskDDataAccess.getOneByTaskH(context, taskH.getUuid_task_h());
|
||||
boolean isHaveAnswer = d != null;
|
||||
if (!isHaveAnswer) {
|
||||
JsonRequestTaskD request = new JsonRequestTaskD();
|
||||
request.setAudit(GlobalData.getSharedGlobalData().getAuditData());
|
||||
request.setuuid_task_h(taskH.getUuid_task_h());
|
||||
String json = GsonHelper.toJson(request);
|
||||
String url = GlobalData.getSharedGlobalData().getURL_GET_VERIFICATION();
|
||||
boolean encrypt = GlobalData.getSharedGlobalData().isEncrypt();
|
||||
boolean decrypt = GlobalData.getSharedGlobalData().isDecrypt();
|
||||
HttpCryptedConnection httpConn = new HttpCryptedConnection(context, encrypt, decrypt);
|
||||
HttpConnectionResult serverResult = null;
|
||||
|
||||
//Firebase Performance Trace HTTP Request
|
||||
HttpMetric networkMetric =
|
||||
FirebasePerformance.getInstance().newHttpMetric(url, FirebasePerformance.HttpMethod.POST);
|
||||
Utility.metricStart(networkMetric, json);
|
||||
|
||||
try {
|
||||
serverResult = httpConn.requestToServer(url, json, Global.DEFAULTCONNECTIONTIMEOUT);
|
||||
Utility.metricStop(networkMetric, serverResult);
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (serverResult != null && serverResult.isOK()) {
|
||||
try {
|
||||
String result = serverResult.getResult();
|
||||
|
||||
JsonResponseTaskD response = GsonHelper.fromJson(result, JsonResponseTaskD.class);
|
||||
if (response.getStatus().getCode() == 0) {
|
||||
List<TaskD> taskDs = response.getListTask();
|
||||
|
||||
if (taskDs.size() > 0) {
|
||||
|
||||
TaskH h2 = TaskHDataAccess.getOneTaskHeader(
|
||||
context, taskH.getTask_id());
|
||||
if (h2 != null && h2.getStatus() != null) {
|
||||
if (!ToDoList.isOldTask(h2)) {
|
||||
taskH.setScheme(scheme);
|
||||
taskH.setStatus(TaskHDataAccess.STATUS_TASK_VERIFICATION_DOWNLOAD);
|
||||
TaskHDataAccess.addOrReplace(context, taskH);
|
||||
for (TaskD taskD : taskDs) {
|
||||
taskD.setTaskH(taskH);
|
||||
TaskDDataAccess.addOrReplace(context, taskD);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
taskH.setScheme(scheme);
|
||||
taskH.setStatus(TaskHDataAccess.STATUS_TASK_VERIFICATION_DOWNLOAD);
|
||||
TaskHDataAccess.addOrReplace(context, taskH);
|
||||
for (TaskD taskD : taskDs) {
|
||||
taskD.setTaskH(taskH);
|
||||
TaskDDataAccess.addOrReplace(context, taskD);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (Global.IS_DEV)
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
notifCount--;
|
||||
}
|
||||
}
|
||||
String notifTitle = notifCount + " Verification Tasks";
|
||||
String message = "You have " + notifCount
|
||||
+ " Verification Tasks to do.";
|
||||
Intent resultIntent;
|
||||
|
||||
resultIntent = new Intent(context, MSMApplication.getInstance().getHomeClass());
|
||||
|
||||
|
||||
/*Vibrate vibrate = null;
|
||||
try {
|
||||
vibrate = Vibrate
|
||||
.valueOf(GeneralParameterDataAccess.getOne(
|
||||
context, uuidUser, "PRM14_VIB")
|
||||
.getGs_value());
|
||||
} catch (Exception ex) {
|
||||
vibrate = Vibrate.OFF;
|
||||
}
|
||||
|
||||
Tone tone = null;
|
||||
try {
|
||||
tone = Tone.valueOf(GeneralParameterDataAccess
|
||||
.getOne(context, uuidUser, "PRM15_TON")
|
||||
.getGs_value());
|
||||
} catch (Exception ex) {
|
||||
tone = Tone.OFF;
|
||||
}*/
|
||||
// boolean autoClear = true;
|
||||
// try {
|
||||
// autoClear = Boolean
|
||||
// .parseBoolean(GeneralParameterDataAccess
|
||||
// .getOne(context, uuidUser,
|
||||
// "PRM16_ACN").getGs_value());
|
||||
// } catch (Exception ex) {
|
||||
// autoClear = true;
|
||||
// }
|
||||
|
||||
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
|
||||
builder.setSmallIcon(NotificationThread.getNotificationIcon());
|
||||
builder.setContentTitle(notifTitle);
|
||||
builder.setContentText(message).setNumber(notifCount);
|
||||
builder.setPriority(NORM_PRIORITY);
|
||||
// Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
|
||||
// builder.setSound(alarmSound);
|
||||
// builder.setVibrate(new long[] { 1000});
|
||||
// builder.setLights(Color.RED, 3000, 3000);
|
||||
|
||||
NotificationCompat.BigTextStyle inboxStyle =
|
||||
new NotificationCompat.BigTextStyle();
|
||||
inboxStyle.setBigContentTitle(notifTitle);
|
||||
if (isBranch) {
|
||||
inboxStyle.bigText(message + " " + context.getString(R.string.click_to_open_verification_branch));
|
||||
resultIntent.setAction(VERIFICATIONBRANCHLIST_NOTIFICATION_KEY);
|
||||
} else {
|
||||
inboxStyle.bigText(message + " " + context.getString(R.string.click_to_open_verification));
|
||||
resultIntent.setAction(VERIFICATIONLIST_NOTIFICATION_KEY);
|
||||
}
|
||||
builder.setDefaults(android.app.Notification.DEFAULT_ALL);
|
||||
builder.setStyle(inboxStyle);
|
||||
builder.setAutoCancel(true);
|
||||
|
||||
|
||||
PendingIntent pendingIntent = PendingIntent
|
||||
.getActivity(context, 0, resultIntent, 0);
|
||||
// Notification.getSharedNotification().setDefaultIcon(
|
||||
// R.drawable.icon_notif_new);
|
||||
|
||||
builder.setContentIntent(pendingIntent);
|
||||
|
||||
if (notifCount > 0) {
|
||||
NotificationManager mNotificationManager =
|
||||
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
mNotificationManager.notify(2, builder.build());
|
||||
notifCount = 0;
|
||||
}
|
||||
}
|
||||
//check for changed task in result(local db) data
|
||||
List<TaskH> localTaskHs = TaskHDataAccess.getAllVerified(context,GlobalData.getSharedGlobalData().getUser().getUuid_user());
|
||||
if(localTaskHs != null && localTaskHs.size() > 0){
|
||||
for (int i= 0; i<localTaskHs.size(); i++) {
|
||||
boolean taskNotfound = false;
|
||||
TaskH taskh_local = localTaskHs.get(i);
|
||||
if(taskh_local == null)
|
||||
continue;
|
||||
if(taskHList != null && taskHList.size() > 0){
|
||||
//delete taskh_local
|
||||
for(TaskH taskHServer :taskHList){
|
||||
if(taskHServer != null && taskHServer.getTask_id().equals(taskh_local.getTask_id())){
|
||||
taskNotfound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!taskNotfound){
|
||||
taskh_local.setStatus(TaskHDataAccess.STATUS_TASK_CHANGED);
|
||||
taskh_local.setIs_prepocessed(Global.FORM_TYPE_VERIFICATION);
|
||||
taskh_local.setMessage(context.getString(com.adins.mss.svy.R.string.taskChanged));
|
||||
TaskHDataAccess.addOrReplace(context,taskh_local);
|
||||
TimelineManager.insertTimeline(context,taskh_local);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// List<TaskH> taskHs = TaskHDataAccess.getAllTaskByStatus(context, GlobalData.getSharedGlobalData().getUser().getUuid_user(), TaskHDataAccess.STATUS_TASK_VERIFICATION_DOWNLOAD);
|
||||
// if (listUuidTaskH != null) {
|
||||
// if (taskHs != null) {
|
||||
// for (TaskH h : taskHs) {
|
||||
// String uuid_task_h = h.getUuid_task_h();
|
||||
// boolean isSame = false;
|
||||
// for (String uuid_from_server : listUuidTaskH) {
|
||||
// if (uuid_task_h.equals(uuid_from_server)) {
|
||||
// isSame = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (!isSame) {
|
||||
// TaskHDataAccess.deleteWithRelation(context, h);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
public synchronized void requestWait() {
|
||||
isWait = true;
|
||||
}
|
||||
|
||||
public synchronized void stopWaiting() {
|
||||
isWait = false;
|
||||
synchronized (this) {
|
||||
this.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void requestStop() {
|
||||
Notification.getSharedNotification().clearNotifAll(context);
|
||||
keepRunning = false;
|
||||
}
|
||||
|
||||
public List<TaskH> getServerNewTask(boolean isBranch) {
|
||||
JsonRequestTaskWithMode requestType = new JsonRequestTaskWithMode();
|
||||
requestType.setAudit(GlobalData.getSharedGlobalData().getAuditData());
|
||||
requestType.addImeiAndroidIdToUnstructured();
|
||||
if(isBranch)
|
||||
requestType.setMode(SurveyVerificationListTask.KEY_BRANCH);
|
||||
|
||||
String json = GsonHelper.toJson(requestType);
|
||||
String url = GlobalData.getSharedGlobalData().getURL_GET_LIST_VERIFICATION();
|
||||
boolean encrypt = GlobalData.getSharedGlobalData().isEncrypt();
|
||||
boolean decrypt = GlobalData.getSharedGlobalData().isDecrypt();
|
||||
HttpCryptedConnection httpConn = new HttpCryptedConnection(context, encrypt, decrypt);
|
||||
HttpConnectionResult serverResult = null;
|
||||
|
||||
//Firebase Performance Trace HTTP Request
|
||||
HttpMetric networkMetric =
|
||||
FirebasePerformance.getInstance().newHttpMetric(url, FirebasePerformance.HttpMethod.POST);
|
||||
Utility.metricStart(networkMetric, json);
|
||||
|
||||
try {
|
||||
serverResult = httpConn.requestToServer(url, json, Global.DEFAULTCONNECTIONTIMEOUT);
|
||||
Utility.metricStop(networkMetric, serverResult);
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
sentStatus = serverResult.getResult();
|
||||
|
||||
if(Global.IS_DEV)
|
||||
System.out.println("Here is sent status from notif Verify : " + sentStatus);
|
||||
|
||||
// need object to get json reply from server
|
||||
JsonResponseRetrieveTaskList jrsrtl = new JsonResponseRetrieveTaskList();
|
||||
jrsrtl = GsonHelper.fromJson(sentStatus, JsonResponseRetrieveTaskList.class);
|
||||
|
||||
// new task must be saved to database
|
||||
if (jrsrtl.getListTaskList() != null)
|
||||
return jrsrtl.getListTaskList();
|
||||
else
|
||||
return new ArrayList<TaskH>();
|
||||
}
|
||||
|
||||
|
||||
public static List<TaskH> getTaskHList() {
|
||||
return taskHList;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid
|
||||
android:color="@color/slaGreen" />
|
||||
<corners
|
||||
android:radius="5dp" />
|
||||
</shape>
|
|
@ -0,0 +1,340 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/bg_grayscale"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/buttons"
|
||||
android:layout_below="@+id/actionbar">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="13dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtTypeDeposit"
|
||||
style="@style/FieldLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_type_deposit" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
android:id="@+id/spinnerTypeDeposit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/dropdown_background"
|
||||
android:padding="5dp"
|
||||
android:spinnerMode="dropdown" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/spinnerTypeDeposit"
|
||||
android:layout_alignEnd="@+id/spinnerTypeDeposit"
|
||||
android:layout_alignBottom="@+id/spinnerTypeDeposit"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:tint="@color/colorMC"
|
||||
app:srcCompat="@drawable/ic_expand" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/FieldLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="@string/label_branch_payment" />
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/textWithSuggestionBranch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:hint="@string/branch_payment_hint"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtTransferTo"
|
||||
style="@style/FieldLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="@string/label_transfer_to" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
android:id="@+id/spinnerBankAccount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/dropdown_background"
|
||||
android:padding="5dp"
|
||||
android:spinnerMode="dropdown" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_expand_bank_account"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/spinnerBankAccount"
|
||||
android:layout_alignEnd="@+id/spinnerBankAccount"
|
||||
android:layout_alignBottom="@+id/spinnerBankAccount"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:tint="@color/colorMC"
|
||||
app:srcCompat="@drawable/ic_expand" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/questionDropdownEmpty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lookup_not_found"
|
||||
android:textSize="15dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtBuktiTransfer"
|
||||
style="@style/FieldLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="@string/label_transfer_evidence_pc" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageBukti"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@android:drawable/ic_menu_gallery" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonSelectPhoto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/button_background"
|
||||
android:text="@string/take_a_photo"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/fontColorWhite" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:text="@string/label_form"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
android:id="@+id/priorityViewByForm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/dropdown_background"
|
||||
android:padding="5dp"
|
||||
android:spinnerMode="dropdown" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_expand_by_form_ac"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/priorityViewByForm"
|
||||
android:layout_alignEnd="@+id/priorityViewByForm"
|
||||
android:layout_alignBottom="@+id/priorityViewByForm"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:tint="@color/colorMC"
|
||||
app:srcCompat="@drawable/ic_expand" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/FieldLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/label_info_batch" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
android:id="@+id/priorityViewByBatch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/dropdown_background"
|
||||
android:padding="5dp"
|
||||
android:spinnerMode="dropdown" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/priorityViewByBatch"
|
||||
android:layout_alignEnd="@+id/priorityViewByBatch"
|
||||
android:layout_alignBottom="@+id/priorityViewByBatch"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:tint="@color/colorMC"
|
||||
app:srcCompat="@drawable/ic_expand" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="4dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/formBatch"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_info_form"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/divider_colon"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/formBatchValue"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:textSize="15dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="4dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dateBatch"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_info_submitdate"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/divider_colon"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dateBatchValue"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="right"
|
||||
android:textSize="15dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="4dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalDep"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_info_total"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/divider_colon"
|
||||
android:textSize="15dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/totalDepValue"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="right"
|
||||
android:textSize="15dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatSpinner
|
||||
android:id="@+id/priorityViewByUser"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/dropdown_background"
|
||||
android:padding="5dp"
|
||||
android:spinnerMode="dropdown" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_expand_by_user_ac"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/priorityViewByUser"
|
||||
android:layout_alignEnd="@+id/priorityViewByUser"
|
||||
android:layout_alignBottom="@+id/priorityViewByUser"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:tint="@color/colorMC"
|
||||
app:srcCompat="@drawable/ic_expand" />
|
||||
</RelativeLayout>
|
||||
|
||||
<ExpandableListView
|
||||
android:id="@+id/expandableListView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="140dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:divider="@android:color/darker_gray"
|
||||
android:dividerHeight="0.5dp"
|
||||
android:indicatorLeft="?android:attr/expandableListPreferredItemIndicatorLeft"
|
||||
android:nestedScrollingEnabled="true" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="right"
|
||||
android:padding="5dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/transferButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/button_background"
|
||||
android:enabled="true"
|
||||
android:text="@string/btnSend"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/fontColorWhite" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
|
@ -0,0 +1,36 @@
|
|||
package com.adins.mss.base.depositreport;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class DepositReportBatchIdBean {
|
||||
@SerializedName("taskID")
|
||||
private String taskId;
|
||||
@SerializedName("batchID")
|
||||
private String batchId;
|
||||
@SerializedName("flagDeposit")
|
||||
private String flagDeposit;
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getBatchId() {
|
||||
return batchId;
|
||||
}
|
||||
|
||||
public void setBatchId(String batchId) {
|
||||
this.batchId = batchId;
|
||||
}
|
||||
|
||||
public String getFlagDeposit() {
|
||||
return flagDeposit;
|
||||
}
|
||||
|
||||
public void setFlagDeposit(String flagDeposit) {
|
||||
this.flagDeposit = flagDeposit;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,185 @@
|
|||
package com.adins.mss.odr.news;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.adins.mss.base.GlobalData;
|
||||
import com.adins.mss.base.NewMainActivity;
|
||||
import com.adins.mss.base.crashlytics.FireCrash;
|
||||
import com.adins.mss.base.errorhandler.ErrorMessageHandler;
|
||||
import com.adins.mss.base.errorhandler.IShowError;
|
||||
import com.adins.mss.base.util.GsonHelper;
|
||||
import com.adins.mss.base.util.Utility;
|
||||
import com.adins.mss.constant.Global;
|
||||
import com.adins.mss.dao.MobileContentH;
|
||||
import com.adins.mss.foundation.db.dataaccess.MobileContentDDataAccess;
|
||||
import com.adins.mss.foundation.db.dataaccess.MobileContentHDataAccess;
|
||||
import com.adins.mss.foundation.dialog.NiftyDialogBuilder;
|
||||
import com.adins.mss.foundation.formatter.Tool;
|
||||
import com.adins.mss.foundation.http.HttpConnectionResult;
|
||||
import com.adins.mss.foundation.http.HttpCryptedConnection;
|
||||
import com.adins.mss.odr.R;
|
||||
import com.adins.mss.odr.tool.Constants;
|
||||
import com.google.firebase.perf.FirebasePerformance;
|
||||
import com.google.firebase.perf.metrics.HttpMetric;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class NewsHeaderTask extends AsyncTask<Void, Void, Integer>{
|
||||
private ProgressDialog progressDialog;
|
||||
private String errMsg = null;
|
||||
private News news;
|
||||
List<MobileContentH> tempNews;
|
||||
private String messageWait;
|
||||
private String messageEmpty;
|
||||
private int contentFrame;
|
||||
JsonResponseNewsHeader newsHeader;
|
||||
String result;
|
||||
private ErrorMessageHandler errorMessageHandler;
|
||||
NiftyDialogBuilder dialogBuilder;
|
||||
private WeakReference<FragmentActivity> activity;
|
||||
public NewsHeaderTask(final FragmentActivity mainActivity, String messageWait, String messageEmpty, int contentFrame) {
|
||||
this.activity = new WeakReference<FragmentActivity>(mainActivity);
|
||||
this.messageWait = messageWait;
|
||||
this.messageEmpty = messageEmpty;
|
||||
this.contentFrame = contentFrame;
|
||||
errorMessageHandler = new ErrorMessageHandler(new IShowError() {
|
||||
@Override
|
||||
public void showError(String errorSubject, String errorMsg, int notifType) {
|
||||
if(notifType == ErrorMessageHandler.DIALOG_TYPE){
|
||||
dialogBuilder = NiftyDialogBuilder.getInstance(mainActivity);
|
||||
dialogBuilder.withTitle(errorSubject)
|
||||
.withMessage(errorMsg)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
this.progressDialog = ProgressDialog.show(activity.get(), "", this.messageWait, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Integer doInBackground(Void... params) {
|
||||
int code = 999;
|
||||
JsonRequestNews requestType = new JsonRequestNews();
|
||||
requestType.setAudit(GlobalData.getSharedGlobalData().getAuditData());
|
||||
requestType.addImeiAndroidIdToUnstructured();
|
||||
try {
|
||||
news = new News(activity.get());
|
||||
tempNews = news.getAllNews();
|
||||
if(tempNews==null)
|
||||
tempNews = new ArrayList<MobileContentH>();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(Tool.isInternetconnected(activity.get())){
|
||||
String json = GsonHelper.toJson(requestType);
|
||||
String url = GlobalData.getSharedGlobalData().getURL_GET_NEWSHEADER();
|
||||
|
||||
boolean encrypt = GlobalData.getSharedGlobalData().isEncrypt();
|
||||
boolean decrypt = GlobalData.getSharedGlobalData().isDecrypt();
|
||||
HttpCryptedConnection httpConn = new HttpCryptedConnection(activity.get(), encrypt, decrypt);
|
||||
HttpConnectionResult serverResult = null;
|
||||
|
||||
//Firebase Performance Trace HTTP Request
|
||||
HttpMetric networkMetric =
|
||||
FirebasePerformance.getInstance().newHttpMetric(url, FirebasePerformance.HttpMethod.POST);
|
||||
Utility.metricStart(networkMetric, json);
|
||||
|
||||
try {
|
||||
serverResult = httpConn.requestToServer(url, json, Global.DEFAULTCONNECTIONTIMEOUT);
|
||||
Utility.metricStop(networkMetric, serverResult);
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (serverResult != null && serverResult.isOK()) {
|
||||
result = serverResult.getResult();
|
||||
try {
|
||||
newsHeader = GsonHelper.fromJson(result, JsonResponseNewsHeader.class);
|
||||
if (newsHeader.getStatus().getCode() == 0) {
|
||||
List<MobileContentH> listHeaderSVR = newsHeader.getListHeader();
|
||||
if (listHeaderSVR != null) {
|
||||
MobileContentDDataAccess.clean(activity.get());
|
||||
MobileContentHDataAccess.clean(activity.get());
|
||||
if (listHeaderSVR.size() > 0) {
|
||||
for (MobileContentH contentP : listHeaderSVR) {
|
||||
contentP.setUser(GlobalData.getSharedGlobalData().getUser());
|
||||
if (contentP.getUuid_parent_content().length() == 0) {
|
||||
contentP.setUuid_parent_content(null);
|
||||
}
|
||||
MobileContentHDataAccess.addOrReplace(activity.get(), contentP);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
} else if (serverResult != null) {
|
||||
result = serverResult.getResult();
|
||||
} else {
|
||||
errMsg = activity.get().getString(R.string.no_promo_try_again);
|
||||
}
|
||||
try {
|
||||
code = newsHeader.getStatus().getCode();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
code=0;
|
||||
}
|
||||
}else{
|
||||
code = 0;
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Integer code) {
|
||||
if (progressDialog.isShowing()){
|
||||
try {
|
||||
progressDialog.dismiss();
|
||||
} catch (Exception e) {
|
||||
FireCrash.log(e);
|
||||
}
|
||||
}
|
||||
Bundle bundle = new Bundle();
|
||||
if(errMsg!=null){
|
||||
bundle.putBoolean(Constants.BUND_KEY_NEWS_ERROR, true);
|
||||
bundle.putString(Constants.BUND_KEY_NEWS_ERROR_MESSAGE, errMsg);
|
||||
}else {
|
||||
|
||||
if(code!=0) {
|
||||
bundle.putBoolean(Constants.BUND_KEY_NEWS_ERROR, true);
|
||||
if(newsHeader.getStatus().getMessage()!=null)
|
||||
bundle.putString(Constants.BUND_KEY_NEWS_ERROR_MESSAGE, newsHeader.getStatus().getMessage());
|
||||
else
|
||||
bundle.putString(Constants.BUND_KEY_NEWS_ERROR_MESSAGE, String.valueOf(newsHeader.getStatus().getCode()));
|
||||
|
||||
}else{
|
||||
bundle.putBoolean(Global.BUND_KEY_SURVEY_ERROR, false);
|
||||
}
|
||||
}
|
||||
Fragment fragment1 = new NewsActivity();
|
||||
fragment1.setArguments(bundle);
|
||||
|
||||
FragmentTransaction transaction = NewMainActivity.fragmentManager.beginTransaction();
|
||||
transaction.setCustomAnimations(R.anim.activity_open_translate,R.anim.activity_close_scale,R.anim.activity_open_scale,R.anim.activity_close_translate);
|
||||
transaction.replace(this.contentFrame, fragment1);
|
||||
transaction.addToBackStack(null);
|
||||
transaction.commit();
|
||||
}
|
||||
// }
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 893 B |
|
@ -0,0 +1,135 @@
|
|||
package com.adins.mss.base.loyalti.mypointdashboard;
|
||||
|
||||
import com.adins.mss.foundation.http.MssResponseType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class DetailKompetisiResponse extends MssResponseType {
|
||||
|
||||
@SerializedName("resultList")
|
||||
public ArrayList<MemberShipData> resultList;
|
||||
|
||||
public ArrayList<MemberShipData> getResultList() {
|
||||
return resultList;
|
||||
}
|
||||
|
||||
public void setResultList(ArrayList<MemberShipData> resultList) {
|
||||
this.resultList = resultList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class MemberShipData {
|
||||
|
||||
public String getMEMBERSHIP_PROGRAM_CODE() {
|
||||
return MEMBERSHIP_PROGRAM_CODE;
|
||||
}
|
||||
|
||||
public void setMEMBERSHIP_PROGRAM_CODE(String MEMBERSHIP_PROGRAM_CODE) {
|
||||
this.MEMBERSHIP_PROGRAM_CODE = MEMBERSHIP_PROGRAM_CODE;
|
||||
}
|
||||
|
||||
public String getINFORMATION_TYPE() {
|
||||
return INFORMATION_TYPE;
|
||||
}
|
||||
|
||||
public void setINFORMATION_TYPE(String INFORMATION_TYPE) {
|
||||
this.INFORMATION_TYPE = INFORMATION_TYPE;
|
||||
}
|
||||
|
||||
public ArrayList<TeamMember> getTEAM_MEMBER() {
|
||||
return TEAM_MEMBER;
|
||||
}
|
||||
|
||||
public void setTEAM_MEMBER(ArrayList<TeamMember> TEAM_MEMBER) {
|
||||
this.TEAM_MEMBER = TEAM_MEMBER;
|
||||
}
|
||||
public String getLOGO() {
|
||||
return LOGO;
|
||||
}
|
||||
|
||||
public void setLOGO(String LOGO) {
|
||||
this.LOGO = LOGO;
|
||||
}
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_CODE")
|
||||
protected String MEMBERSHIP_PROGRAM_CODE;
|
||||
|
||||
@SerializedName("INFORMATION_TYPE")
|
||||
protected String INFORMATION_TYPE;
|
||||
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_NAME")
|
||||
protected String MEMBERSHIP_PROGRAM_NAME;
|
||||
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_DESCRIPTION")
|
||||
protected String MEMBERSHIP_PROGRAM_DESCRIPTION;
|
||||
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_STATUS")
|
||||
protected String MEMBERSHIP_PROGRAM_STATUS;
|
||||
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_START_DATE")
|
||||
protected String MEMBERSHIP_PROGRAM_START_DATE;
|
||||
|
||||
@SerializedName("GRACE_PERIODE")
|
||||
protected String GRACE_PERIODE;
|
||||
|
||||
@SerializedName("MEMBERSHIP_PROGRAM_EXPIRED_DATE")
|
||||
protected String MEMBERSHIP_PROGRAM_EXPIRED_DATE;
|
||||
|
||||
public String getMEMBERSHIP_PROGRAM_NAME() {
|
||||
return MEMBERSHIP_PROGRAM_NAME;
|
||||
}
|
||||
|
||||
public void setMEMBERSHIP_PROGRAM_NAME(String MEMBERSHIP_PROGRAM_NAME) {
|
||||
this.MEMBERSHIP_PROGRAM_NAME = MEMBERSHIP_PROGRAM_NAME;
|
||||
}
|
||||
|
||||
public String getMEMBERSHIP_PROGRAM_DESCRIPTION() {
|
||||
return MEMBERSHIP_PROGRAM_DESCRIPTION;
|
||||
}
|
||||
|
||||
public void setMEMBERSHIP_PROGRAM_DESCRIPTION(String MEMBERSHIP_PROGRAM_DESCRIPTION) {
|
||||
this.MEMBERSHIP_PROGRAM_DESCRIPTION = MEMBERSHIP_PROGRAM_DESCRIPTION;
|
||||
}
|
||||
|
||||
public String getMEMBERSHIP_PROGRAM_STATUS() {
|
||||
return MEMBERSHIP_PROGRAM_STATUS;
|
||||
}
|
||||
|
||||
public void setMEMBERSHIP_PROGRAM_STATUS(String MEMBERSHIP_PROGRAM_STATUS) {
|
||||
this.MEMBERSHIP_PROGRAM_STATUS = MEMBERSHIP_PROGRAM_STATUS;
|
||||
}
|
||||
|
||||
public String getMEMBERSHIP_PROGRAM_START_DATE() {
|
||||
return MEMBERSHIP_PROGRAM_START_DATE;
|
||||
}
|
||||
|
||||
public void setMEMBERSHIP_PROGRAM_START_DATE(String MEMBERSHIP_PROGRAM_START_DATE) {
|
||||
this.MEMBERSHIP_PROGRAM_START_DATE = MEMBERSHIP_PROGRAM_START_DATE;
|
||||
}
|
||||
|
||||
public String getGRACE_PERIODE() {
|
||||
return GRACE_PERIODE;
|
||||
}
|
||||
|
||||
public void setGRACE_PERIODE(String GRACE_PERIODE) {
|
||||
this.GRACE_PERIODE = GRACE_PERIODE;
|
||||
}
|
||||
|
||||
public String getMEMBERSHIP_PROGRAM_EXPIRED_DATE() {
|
||||
return MEMBERSHIP_PROGRAM_EXPIRED_DATE;
|
||||
}
|
||||
|
||||
public void setMEMBERSHIP_PROGRAM_EXPIRED_DATE(String MEMBERSHIP_PROGRAM_EXPIRED_DATE) {
|
||||
this.MEMBERSHIP_PROGRAM_EXPIRED_DATE = MEMBERSHIP_PROGRAM_EXPIRED_DATE;
|
||||
}
|
||||
|
||||
@SerializedName("TEAM_MEMBER")
|
||||
protected ArrayList<TeamMember> TEAM_MEMBER;
|
||||
|
||||
|
||||
@SerializedName("LOGO")
|
||||
protected String LOGO;
|
||||
|
||||
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 4 KiB |
Loading…
Add table
Add a link
Reference in a new issue