add project adins

This commit is contained in:
Alfrid Sanjaya Leo Putra 2024-07-25 14:44:22 +07:00
commit f8f85d679d
5299 changed files with 625430 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -0,0 +1,124 @@
package com.adins.mss.dao;
import android.database.Cursor;
import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.Property;
import de.greenrobot.dao.internal.DaoConfig;
import de.greenrobot.dao.database.Database;
import de.greenrobot.dao.database.DatabaseStatement;
import com.adins.mss.dao.Theme;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "TR_THEME".
*/
public class ThemeDao extends AbstractDao<Theme, String> {
public static final String TABLENAME = "TR_THEME";
/**
* Properties of entity Theme.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property Uuid_theme = new Property(0, String.class, "uuid_theme", true, "UUID_THEME");
public final static Property Application_type = new Property(1, String.class, "application_type", false, "APPLICATION_TYPE");
public final static Property Version = new Property(2, String.class, "version", false, "VERSION");
};
private DaoSession daoSession;
public ThemeDao(DaoConfig config) {
super(config);
}
public ThemeDao(DaoConfig config, DaoSession daoSession) {
super(config, daoSession);
this.daoSession = daoSession;
}
/** Creates the underlying database table. */
public static void createTable(Database db, boolean ifNotExists) {
String constraint = ifNotExists? "IF NOT EXISTS ": "";
db.execSQL("CREATE TABLE " + constraint + "\"TR_THEME\" (" + //
"\"UUID_THEME\" TEXT PRIMARY KEY NOT NULL ," + // 0: uuid_theme
"\"APPLICATION_TYPE\" TEXT NOT NULL ," + // 1: application_type
"\"VERSION\" TEXT);"); // 2: version
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TR_THEME\"";
db.execSQL(sql);
}
/** @inheritdoc */
@Override
protected void bindValues(DatabaseStatement stmt, Theme entity) {
stmt.clearBindings();
stmt.bindString(1, entity.getUuid_theme());
stmt.bindString(2, entity.getApplication_type());
String version = entity.getVersion();
if (version != null) {
stmt.bindString(3, version);
}
}
@Override
protected void attachEntity(Theme entity) {
super.attachEntity(entity);
entity.__setDaoSession(daoSession);
}
/** @inheritdoc */
@Override
public String readKey(Cursor cursor, int offset) {
return cursor.getString(offset + 0);
}
/** @inheritdoc */
@Override
public Theme readEntity(Cursor cursor, int offset) {
Theme entity = new Theme( //
cursor.getString(offset + 0), // uuid_theme
cursor.getString(offset + 1), // application_type
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2) // version
);
return entity;
}
/** @inheritdoc */
@Override
public void readEntity(Cursor cursor, Theme entity, int offset) {
entity.setUuid_theme(cursor.getString(offset + 0));
entity.setApplication_type(cursor.getString(offset + 1));
entity.setVersion(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
}
/** @inheritdoc */
@Override
protected String updateKeyAfterInsert(Theme entity, long rowId) {
return entity.getUuid_theme();
}
/** @inheritdoc */
@Override
public String getKey(Theme entity) {
if(entity != null) {
return entity.getUuid_theme();
} else {
return null;
}
}
/** @inheritdoc */
@Override
protected boolean isEntityUpdateable() {
return true;
}
}

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_marginLeft="5dp"
android:gravity="center_vertical"
android:padding="10dp"
android:textColor="#FFFFFF"
android:textSize="20sp"
android:textStyle="bold"
android:background="#46F"/>

View file

@ -0,0 +1,24 @@
package com.adins.mss.odr.model;
import com.adins.mss.dao.TaskD;
import com.adins.mss.foundation.http.MssResponseType;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class JsonGetVerification extends MssResponseType {
@SerializedName("listTaskD")
private List<TaskD> listTaskD;
public List<TaskD> getListTaskD() {
return listTaskD;
}
public void setListTaskD(List<TaskD> listTaskD) {
this.listTaskD = listTaskD;
}
}

View file

@ -0,0 +1,62 @@
package com.adins.mss.dao;
import com.adins.mss.base.util.ExcludeFromGson;
import com.google.gson.annotations.SerializedName;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
/**
* Entity mapped to table "TR_LOGO_PRINT".
*/
public class LogoPrint {
/** Not-null value. */
@SerializedName("uuid_logo_print")
private String uuid_logo_print;
/** Not-null value. */
@SerializedName("tenant")
private String tenant;
@SerializedName("image_bitmap")
private byte[] image_bitmap;
public LogoPrint() {
}
public LogoPrint(String uuid_logo_print) {
this.uuid_logo_print = uuid_logo_print;
}
public LogoPrint(String uuid_logo_print, String tenant, byte[] image_bitmap) {
this.uuid_logo_print = uuid_logo_print;
this.tenant = tenant;
this.image_bitmap = image_bitmap;
}
/** Not-null value. */
public String getUuid_logo_print() {
return uuid_logo_print;
}
/** Not-null value; ensure this value is available before it is saved to the database. */
public void setUuid_logo_print(String uuid_logo_print) {
this.uuid_logo_print = uuid_logo_print;
}
/** Not-null value. */
public String getTenant() {
return tenant;
}
/** Not-null value; ensure this value is available before it is saved to the database. */
public void setTenant(String tenant) {
this.tenant = tenant;
}
public byte[] getImage_bitmap() {
return image_bitmap;
}
public void setImage_bitmap(byte[] image_bitmap) {
this.image_bitmap = image_bitmap;
}
}

View file

@ -0,0 +1,18 @@
package com.adins.mss.base.todolist;
import com.adins.mss.foundation.http.MssRequestType;
import com.google.gson.annotations.SerializedName;
public class RequestTaskListBean extends MssRequestType {
@SerializedName("userId")
String userId;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View file

@ -0,0 +1,32 @@
package com.adins.mss.base.depositreport;
import com.adins.mss.foundation.http.MssRequestType;
import com.google.gson.annotations.SerializedName;
/**
* Created by angga.permadi on 8/30/2016.
*/
public class GetImageRequest extends MssRequestType {
@SerializedName("uuid_task_h")
String uuidTaskH;
@SerializedName("question_id")
String questionId;
public String getUuidTaskH() {
return uuidTaskH;
}
public void setUuidTaskH(String uuidTaskH) {
this.uuidTaskH = uuidTaskH;
}
public String getQuestionId() {
return questionId;
}
public void setQuestionId(String questionId) {
this.questionId = questionId;
}
}

View file

@ -0,0 +1,138 @@
package com.adins.mss.base.dynamicform.form.questions.viewholder;
import android.content.Intent;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.adins.mss.base.R;
import com.adins.mss.base.crashlytics.FireCrash;
import com.adins.mss.base.dynamicform.DynamicFormActivity;
import com.adins.mss.base.dynamicform.form.questions.OnQuestionClickListener;
import com.adins.mss.base.timeline.MapsViewer;
import com.adins.mss.constant.Global;
import com.adins.mss.dao.LocationInfo;
import com.adins.mss.foundation.dialog.DialogManager;
import com.adins.mss.foundation.location.LocationTrackingManager;
import com.adins.mss.foundation.questiongenerator.QuestionBean;
import com.adins.mss.foundation.questiongenerator.form.LocationTagingView;
import com.adins.mss.foundation.questiongenerator.form.QuestionView;
/**
* Created by gigin.ginanjar on 31/08/2016.
*/
public class LocationQuestionViewHolder extends RecyclerView.ViewHolder {
public QuestionView mView;
public TextView mQuestionLabel;
public TextView mQuestionAnswer;
public Button mButtonSetLocation;
public ImageView mImageAnswer;
public QuestionBean bean;
public FragmentActivity mActivity;
public OnQuestionClickListener mListener;
private int group;
private int position;
public LocationQuestionViewHolder(View itemView) {
super(itemView);
mView = (QuestionView) itemView.findViewById(R.id.questionLocationLayout);
mQuestionLabel = (TextView) itemView.findViewById(R.id.questionLocationLabel);
mQuestionAnswer = (TextView) itemView.findViewById(R.id.questionLocationAnswer);
mButtonSetLocation = (Button) itemView.findViewById(R.id.btnSetLocation);
mImageAnswer = (ImageView) itemView.findViewById(R.id.imgLocationAnswer);
}
public LocationQuestionViewHolder(View itemView, FragmentActivity activity, OnQuestionClickListener listener) {
super(itemView);
mView = (QuestionView) itemView.findViewById(R.id.questionLocationLayout);
mQuestionLabel = (TextView) itemView.findViewById(R.id.questionLocationLabel);
mQuestionAnswer = (TextView) itemView.findViewById(R.id.questionLocationAnswer);
mButtonSetLocation = (Button) itemView.findViewById(R.id.btnSetLocation);
mImageAnswer = (ImageView) itemView.findViewById(R.id.imgLocationAnswer);
mActivity = activity;
mListener = listener;
}
public void bind(final QuestionBean item, final int group, int number) {
bean = item;
this.group = group;
position = number - 1;
String qLabel = number + ". " + bean.getQuestion_label();
mQuestionLabel.setText(qLabel);
View.OnClickListener listener = null;
if (Global.AT_GPS.equals(bean.getAnswer_type())) {
listener = new View.OnClickListener() {
public void onClick(View v) {
LocationInfo info = Global.LTM.getCurrentLocation(Global.FLAG_LOCATION_CAMERA);
bean.setLocationInfo(info);
bean.setLocationInfo(info);
mQuestionAnswer.setVisibility(View.VISIBLE);
mQuestionAnswer.setText(LocationTrackingManager.toAnswerString(info));
}
};
} else {
listener = new View.OnClickListener() {
public void onClick(View v) {
mListener.onSetLocationClick(bean, group, position);
Intent intent = new Intent(mActivity, LocationTagingView.class);
mActivity.startActivityForResult(intent, Global.REQUEST_LOCATIONTAGGING);
}
};
}
mImageAnswer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (bean.getAnswer() != null && bean.getAnswer().length() > 0) {
try {
String lat = bean.getLocationInfo().getLatitude();
String lng = bean.getLocationInfo().getLongitude();
int acc = bean.getLocationInfo().getAccuracy();
Intent intent = new Intent(mActivity, MapsViewer.class);
intent.putExtra("latitude", lat);
intent.putExtra("longitude", lng);
intent.putExtra("accuracy", acc);
mActivity.startActivity(intent);
} catch (Exception e) {
FireCrash.log(e);
String lat = bean.getLatitude();
String lng = bean.getLongitude();
Intent intent = new Intent(mActivity, MapsViewer.class);
intent.putExtra("latitude", lat);
intent.putExtra("longitude", lng);
mActivity.startActivity(intent);
}
} else {
Toast.makeText(mActivity, mActivity.getString(R.string.set_location),
Toast.LENGTH_LONG).show();
}
}
});
if (bean.getAnswer() != null && !bean.getAnswer().isEmpty()) {
mQuestionAnswer.setVisibility(View.VISIBLE);
mQuestionAnswer.setText(bean.getAnswer());
}
mButtonSetLocation.setEnabled(true);
if (bean.isReadOnly())
mButtonSetLocation.setEnabled(false);
mButtonSetLocation.setOnClickListener(listener);
if (DynamicFormActivity.getIsVerified() || DynamicFormActivity.getIsApproval())
mButtonSetLocation.setVisibility(View.GONE);
else
mButtonSetLocation.setVisibility(View.VISIBLE);
try {
DialogManager.showGPSAlert(mActivity);
}catch (Exception e){
FireCrash.log(e);
e.printStackTrace();
}
}
}