네트워크 설정 DHCP<->STATIC전환 중 크래시 수정.
관리자 지정맥 진입 시 카메라뷰 부분에서 크래시 발생하는 부분 수정. 프로토콜 v3.5 문서 추가 내용 반영 1차 완료.
This commit is contained in:
parent
c2776d0267
commit
78837b7a93
@ -22,6 +22,9 @@ import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
@ -90,6 +93,10 @@ public class GlobalInfo {
|
||||
|
||||
public static final int DEFAULT_MANAGER_LOGIN_CAPTURE_SEND = 0;
|
||||
public static final int DEFAULT_USE_ATTENDANCE = 0;
|
||||
public static final int DEFAULT_USE_ATTENDANCE_AUTO_MODE = 0;
|
||||
public static final int DEFAULT_ATTENDANCE_AUTO_TIME = 30;
|
||||
public static final int DEFAULT_ATTENDANCE_START_TIME = 9 * 60;
|
||||
public static final int DEFAULT_ATTENDANCE_END_TIME = 18 * 60;
|
||||
public static final int DEFAULT_USE_DOOR_CONTROL_TIME = 0;
|
||||
public static final int DEFAULT_DOOR_CONTROL_TIME_START = 9 * 60;
|
||||
public static final int DEFAULT_DOOR_CONTROL_TIME_END = 18 * 60;
|
||||
@ -105,6 +112,8 @@ public class GlobalInfo {
|
||||
public static final String ADMIN_ID = "admin";
|
||||
public static final String ADMIN_PASSWD = "nicom";
|
||||
|
||||
public static final int BLE_RFID_CODE_LENGTH = 16;
|
||||
|
||||
public static final int TARGET_FLAG_SERVER_INFO = 1;
|
||||
public static final int TARGET_FLAG_DEVICE_INFO = 2;
|
||||
|
||||
@ -254,6 +263,10 @@ public class GlobalInfo {
|
||||
public static final int ATTENDANCE_MODE_IN = 1;
|
||||
public static final int ATTENDANCE_MODE_OUT = 2;
|
||||
public static int mAttendanceMode = ATTENDANCE_MODE_NONE; // 근태 관리. 1 : 출근, 2 : 퇴근
|
||||
public static int mUseAttendanceAutoMode = 0; // 근태 관리 자동전환 사용 여부
|
||||
public static int mAttendanceStartTime = DEFAULT_ATTENDANCE_START_TIME;
|
||||
public static int mAttendanceEndTime = DEFAULT_ATTENDANCE_END_TIME;
|
||||
public static int mAttendanceAutoTimeMinute = DEFAULT_ATTENDANCE_AUTO_TIME; // 근태 관리 자동전환 시간. 출근시간전~출근시간, 퇴근시간~퇴근시간후 적용.
|
||||
|
||||
public static int mUseDoorControlTime = 1; // 개방시간 사용 여부
|
||||
public static int mDoorControlTimeStatus = -1; // 개방시간 문 상태 보존. -1 : 미제어, 0 : 닫음, 1 : 열림
|
||||
@ -476,7 +489,8 @@ public class GlobalInfo {
|
||||
"socket_use_encrypt integer, dcu_device_type integer, use_dcu_watchdog integer, use_case_check integer, input_timeout integer, " +
|
||||
"auto_reboot_use integer, auto_reboot_period integer, auto_reboot_hour integer, dcu_watchdog_timeout integer, verify_log_auto_resend integer, verify_activate_method integer," +
|
||||
"auto_forgery integer, auto_mask_wear integer, manager_login_capture_send integer, use_attendance integer, " +
|
||||
"use_door_control_time integer, door_control_time_start integer, door_control_time_end integer" +
|
||||
"use_door_control_time integer, door_control_time_start integer, door_control_time_end integer, " +
|
||||
"attendance_start_time integer, attendance_end_time integer, use_attendance_auto_mode integer, attendance_auto_time integer " +
|
||||
")";
|
||||
try {
|
||||
database.execSQL(sql);
|
||||
@ -486,7 +500,8 @@ public class GlobalInfo {
|
||||
"socket_use_encrypt, dcu_device_type, use_dcu_watchdog, use_case_check, input_timeout, " +
|
||||
"auto_reboot_use, auto_reboot_period, auto_reboot_hour, dcu_watchdog_timeout, verify_log_auto_resend, verify_activate_method, " +
|
||||
"auto_forgery, auto_mask_wear, manager_login_capture_send, use_attendance, " +
|
||||
"use_door_control_time, door_control_time_start, door_control_time_end" +
|
||||
"use_door_control_time, door_control_time_start, door_control_time_end, " +
|
||||
"attendance_start_time, attendance_end_time, use_attendance_auto_mode, attendance_auto_time " +
|
||||
") " +
|
||||
"values (0, '', '', 0, 0, %d, " +
|
||||
"%d, %d, %d, %d, %d, %d, " +
|
||||
@ -495,13 +510,15 @@ public class GlobalInfo {
|
||||
"%d, %d, %d, %d, %d, %d, " +
|
||||
"%d, %d, %d, %d, " +
|
||||
"%d, %d, %d" +
|
||||
"%d, %d, %d, %d" +
|
||||
")",
|
||||
VERIFY_COMBINATION_OR, DEFAULT_VERIFY_PRINTUSERNAME, DEFAULT_VERIFY_POPUPTIME, DEFAULT_LOG_DELETESTATUS , 1, 1, 1,
|
||||
DEFAULT_SERVER_CHECK_TIME_DURATION, DEFAULT_DEVICE_VOLUME, DOOR_USE_ACCESS_CONTROL, DEFAULT_DOOR_CONTROL_MODE, DEFAULT_DOOR_OPEN_TIME,
|
||||
DEFAULT_SOCKET_USE_ENCRYPTION, DEFAULT_DCU_DEVICE_TYPE, DEFAULT_USE_DCU_WATCHDOG, DEFAULT_USE_CASE_CHECK, DEFAULT_INPUT_TIMEOUT_SECONDS,
|
||||
DEFAULT_AUTO_REBOOT_USE, DEFAULT_AUTO_REBOOT_PERIOD, DEFAULT_AUTO_REBOOT_HOUR, DEFAULT_DCU_WATCHDOG_TIME, DEFAULT_VERIFY_LOG_AUTO_RESEND, DEFAULT_VERIFY_ACTIVATE_METHOD,
|
||||
DEFAULT_AUTO_FORGERY, DEFAULT_AUTO_MASK_WEAR, DEFAULT_MANAGER_LOGIN_CAPTURE_SEND, DEFAULT_USE_ATTENDANCE,
|
||||
DEFAULT_USE_DOOR_CONTROL_TIME, DEFAULT_DOOR_CONTROL_TIME_START, DEFAULT_DOOR_CONTROL_TIME_END
|
||||
DEFAULT_USE_DOOR_CONTROL_TIME, DEFAULT_DOOR_CONTROL_TIME_START, DEFAULT_DOOR_CONTROL_TIME_END,
|
||||
DEFAULT_ATTENDANCE_START_TIME, DEFAULT_ATTENDANCE_END_TIME, DEFAULT_USE_ATTENDANCE_AUTO_MODE, DEFAULT_ATTENDANCE_AUTO_TIME
|
||||
);
|
||||
|
||||
database.execSQL(sql);
|
||||
@ -596,6 +613,40 @@ public class GlobalInfo {
|
||||
}
|
||||
}
|
||||
|
||||
if(!columnExists(database, "settings", "attendance_start_time")) {
|
||||
columnAppend(database, "settings", "attendance_start_time", "integer");
|
||||
sql = String.format("update settings set attendance_start_time = %d where idx = 0", DEFAULT_ATTENDANCE_START_TIME);
|
||||
try {
|
||||
database.execSQL(sql);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
if(!columnExists(database, "settings", "attendance_end_time")) {
|
||||
columnAppend(database, "settings", "attendance_end_time", "integer");
|
||||
sql = String.format("update settings set attendance_end_time = %d where idx = 0", DEFAULT_ATTENDANCE_END_TIME);
|
||||
try {
|
||||
database.execSQL(sql);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
if(!columnExists(database, "settings", "use_attendance_auto_mode")) {
|
||||
columnAppend(database, "settings", "use_attendance_auto_mode", "integer");
|
||||
sql = String.format("update settings set use_attendance_auto_mode = %d where idx = 0", DEFAULT_USE_ATTENDANCE_AUTO_MODE);
|
||||
try {
|
||||
database.execSQL(sql);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
if(!columnExists(database, "settings", "attendance_auto_time")) {
|
||||
columnAppend(database, "settings", "attendance_auto_time", "integer");
|
||||
sql = String.format("update settings set attendance_auto_time = %d where idx = 0", DEFAULT_ATTENDANCE_AUTO_TIME);
|
||||
try {
|
||||
database.execSQL(sql);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
/*sql = "create table logging(idx integer PRIMARY KEY AUTOINCREMENT, log_time text, log_id text, log_name text, verify_method integer)";
|
||||
try {
|
||||
database.execSQL(sql);
|
||||
@ -1075,7 +1126,8 @@ public class GlobalInfo {
|
||||
sql = "select device_id, device_name, verify_mode, verify_method, verify_combination, verify_printusername, verify_popuptime, log_delete_status, log_delete_term, log_delete_checkperiod, log_delete_checkperiod_cnt, " +
|
||||
"state_period, volume, use_access_control, door_control_mode, door_control_time, socket_use_encrypt, dcu_device_type, use_dcu_watchdog, use_case_check, input_timeout, auto_reboot_use, auto_reboot_period, auto_reboot_hour, " +
|
||||
"dcu_watchdog_timeout, verify_log_auto_resend, verify_activate_method, auto_forgery, auto_mask_wear, manager_login_capture_send, use_attendance, " +
|
||||
"use_door_control_time, door_control_time_start, door_control_time_end " +
|
||||
"use_door_control_time, door_control_time_start, door_control_time_end, " +
|
||||
"attendance_start_time, attendance_end_time, use_attendance_auto_mode, attendance_auto_time " +
|
||||
" from settings where idx = 0";
|
||||
try {
|
||||
Cursor cursor = database.rawQuery(sql, null);
|
||||
@ -1121,6 +1173,11 @@ public class GlobalInfo {
|
||||
GlobalInfo.mDoorControlTimeStart = cursor.getInt(32);
|
||||
GlobalInfo.mDoorControlTimeEnd = cursor.getInt(33);
|
||||
|
||||
GlobalInfo.mAttendanceStartTime = cursor.getInt(34);
|
||||
GlobalInfo.mAttendanceEndTime = cursor.getInt(35);
|
||||
GlobalInfo.mUseAttendanceAutoMode = cursor.getInt(36);
|
||||
GlobalInfo.mAttendanceAutoTimeMinute = cursor.getInt(37);
|
||||
|
||||
Log.w("RITO", "mAutoForgery : " + GlobalInfo.mAutoForgery);
|
||||
Log.w("RITO", "mAutoMaskWear : " + GlobalInfo.mAutoMaskWear);
|
||||
}
|
||||
@ -1452,7 +1509,7 @@ public class GlobalInfo {
|
||||
}
|
||||
}
|
||||
|
||||
public static ArrayList<LogInfo> queryLogDataDateTime(String from, String to) {
|
||||
public static ArrayList<LogInfo> queryLogDataDateTime(String from, String to, boolean isAttendance) {
|
||||
SQLiteDatabase _database= getLogDatabase();
|
||||
if(_database == null)
|
||||
return null;
|
||||
@ -1461,7 +1518,7 @@ public class GlobalInfo {
|
||||
to = SystemUtil.convertDateTime14ToDateTime19(to);
|
||||
|
||||
ArrayList<LogInfo> logList = new ArrayList<LogInfo>();
|
||||
String sql = "select log_time, log_id, log_name, oprno, johapnum, verify_method, rfid_code from logging";
|
||||
String sql = "select log_time, log_id, log_name, oprno, johapnum, verify_method, rfid_code, attendance_code from logging";
|
||||
if(from != null || to != null) {
|
||||
sql += " where";
|
||||
if(from != null) {
|
||||
@ -1472,6 +1529,12 @@ public class GlobalInfo {
|
||||
sql += " and";
|
||||
sql += String.format(" datetime(log_time, 'localtime') <= datetime('%s', 'localtime')", to);
|
||||
}
|
||||
|
||||
if(isAttendance) {
|
||||
sql += String.format(" and attendance_code >= 1 and attendance_code <= 2");
|
||||
} else {
|
||||
sql += String.format(" and (attendance_code < 1 or attendance_code > 2 or attendance_code IS NULL)");
|
||||
}
|
||||
}
|
||||
|
||||
Log.w(TAG, "Log Query : " + sql);
|
||||
@ -1493,6 +1556,7 @@ public class GlobalInfo {
|
||||
_info.mJohapnum = cursor.getString(4);
|
||||
_info.mMethod = cursor.getInt(5);
|
||||
_info.mRfidCode = cursor.getString(6);
|
||||
_info.mAttendanceCode = cursor.getInt(7);
|
||||
|
||||
if(_info.mRfidCode == null || _info.mRfidCode.length() == 0) {
|
||||
UserInfo _userInfo = scanUserById(_info.mId);
|
||||
@ -1928,6 +1992,52 @@ public class GlobalInfo {
|
||||
return date;
|
||||
}
|
||||
|
||||
public static String convertDateToLonger(String dateStr) {
|
||||
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
LocalDate date = LocalDate.parse(dateStr, inputFormatter);
|
||||
return date.format(outputFormatter);
|
||||
}
|
||||
|
||||
public static String convertDateToSimple(String dateStr) {
|
||||
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||
|
||||
LocalDate date = LocalDate.parse(dateStr, inputFormatter);
|
||||
return date.format(outputFormatter);
|
||||
}
|
||||
|
||||
public static String convertTimeToLonger(String timeStr) {
|
||||
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("HHmm");
|
||||
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("HH:mm");
|
||||
|
||||
LocalTime time = LocalTime.parse(timeStr, inputFormatter);
|
||||
return time.format(outputFormatter);
|
||||
}
|
||||
|
||||
public static String convertTimeToSimple(String timeStr) {
|
||||
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("HH:mm");
|
||||
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("HHmm");
|
||||
|
||||
LocalTime time = LocalTime.parse(timeStr, inputFormatter);
|
||||
return time.format(outputFormatter);
|
||||
}
|
||||
|
||||
public static int convertSimpleTimeToMinutes(String timeStr) {
|
||||
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("HHmm");
|
||||
|
||||
LocalTime time = LocalTime.parse(timeStr, inputFormatter);
|
||||
return time.getHour() * 60 + time.getMinute();
|
||||
}
|
||||
|
||||
public static String convertMinutesToSimpleTime(int dayMinutes) {
|
||||
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("HHmm");
|
||||
|
||||
LocalTime time = LocalTime.of(dayMinutes / 60, dayMinutes % 60);
|
||||
return time.format(outputFormatter);
|
||||
}
|
||||
|
||||
public static void updateDatabase(int targetFlag) {
|
||||
SQLiteDatabase _database= getDatabase();
|
||||
if(_database == null)
|
||||
@ -1952,7 +2062,8 @@ public class GlobalInfo {
|
||||
"socket_use_encrypt = %d, dcu_device_type = %d, use_dcu_watchdog = %d, use_case_check = %d, input_timeout = %d, " +
|
||||
"auto_reboot_use = %d, auto_reboot_period = %d, auto_reboot_hour = %d, dcu_watchdog_timeout = %d, verify_log_auto_resend = %d, verify_activate_method = %d, " +
|
||||
"auto_forgery = %d, auto_mask_wear = %d, manager_login_capture_send = %d, use_attendance = %d, " +
|
||||
"use_door_control_time = %d, door_control_time_start = %d, door_control_time_end = %d " +
|
||||
"use_door_control_time = %d, door_control_time_start = %d, door_control_time_end = %d, " +
|
||||
"attendance_start_time = %d, attendance_end_time = %d, use_attendance_auto_mode = %d, attendance_auto_time = %d " +
|
||||
" where idx = 0",
|
||||
GlobalInfo.mDeviceId, GlobalInfo.mDeviceName, GlobalInfo.mVerifyMode, GlobalInfo.mVerifyMethod, GlobalInfo.mVerifyCombination,
|
||||
GlobalInfo.mVerifyPrintUserName, GlobalInfo.mVerifyPopupTime, GlobalInfo.mLogDeleteStatus, GlobalInfo.mLogDeleteTerm, GlobalInfo.mLogDeleteCheckPeriod, GlobalInfo.mLogDeleteCheckPeriodCnt,
|
||||
@ -1961,7 +2072,8 @@ public class GlobalInfo {
|
||||
GlobalInfo.mUseSocketEncrypt, GlobalInfo.mDcuDeviceType, GlobalInfo.mUseDCUWatchdog, GlobalInfo.mUseCaseCheck, GlobalInfo.mInputTimeout,
|
||||
GlobalInfo.mAutoRebootUse, GlobalInfo.mAutoRebootPeriod, GlobalInfo.mAutoRebootHour, GlobalInfo.mDCUWatchdogTime, GlobalInfo.mVerifyLogAutoResend, GlobalInfo.mVerifyActivateMethod,
|
||||
GlobalInfo.mAutoForgery, GlobalInfo.mAutoMaskWear, GlobalInfo.mManagerLoginCaptureSend, GlobalInfo.mUseAttendance,
|
||||
GlobalInfo.mUseDoorControlTime, GlobalInfo.mDoorControlTimeStart, GlobalInfo.mDoorControlTimeEnd
|
||||
GlobalInfo.mUseDoorControlTime, GlobalInfo.mDoorControlTimeStart, GlobalInfo.mDoorControlTimeEnd,
|
||||
GlobalInfo.mAttendanceStartTime, GlobalInfo.mAttendanceEndTime, GlobalInfo.mUseAttendanceAutoMode, GlobalInfo.mAttendanceAutoTimeMinute
|
||||
);
|
||||
|
||||
try {
|
||||
@ -2166,6 +2278,39 @@ public class GlobalInfo {
|
||||
return tableCount;
|
||||
}
|
||||
|
||||
public static int getCountOfLoggingTableWithAttendance(boolean isAttendance) {
|
||||
int tableCount = 0;
|
||||
SQLiteDatabase _database = getLogDatabase();
|
||||
if(_database == null)
|
||||
return 0;
|
||||
|
||||
try {
|
||||
String sql = String.format("select count(*) from logging");
|
||||
if(isAttendance) {
|
||||
sql += String.format(" where (attendance_code >= 1 and attendance_code <= 2)");
|
||||
} else {
|
||||
sql += String.format(" where (attendance_code < 1 or attendance_code > 2 or attendance_code IS NULL)");
|
||||
}
|
||||
|
||||
Cursor cursor = _database.rawQuery(sql, null);
|
||||
if (cursor != null) {
|
||||
int count = cursor.getCount();
|
||||
Log.d(TAG, "Log Count : " + count);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
cursor.moveToNext();
|
||||
tableCount = cursor.getInt(0);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
_database.close();
|
||||
|
||||
return tableCount;
|
||||
}
|
||||
|
||||
public static void saveStringInfo(String filename, String data) {
|
||||
String _storagePath = Environment.getExternalStorageDirectory().toString();
|
||||
String _acsPath = _storagePath + "/ACS";
|
||||
|
@ -14,10 +14,17 @@ public class MWMessage {
|
||||
public String authCode;
|
||||
public String password;
|
||||
public String rfidCode;
|
||||
public String rfidCode2;
|
||||
public String veinCode;
|
||||
public String veinCode2;
|
||||
public String verifyMethod;
|
||||
public String fingerCode;
|
||||
public String fingerCode2;
|
||||
public byte[] faceCode;
|
||||
public String permitStartDate;
|
||||
public String permitEndDate;
|
||||
public String permitStartTime;
|
||||
public String permitEndTime;
|
||||
|
||||
public String doorControl;
|
||||
|
||||
@ -64,4 +71,14 @@ public class MWMessage {
|
||||
public String powerControlType;
|
||||
|
||||
public String imageKey;
|
||||
|
||||
public String useAttendance;
|
||||
public String attendanceStartTime;
|
||||
public String attendanceEndTime;
|
||||
public String useAttendanceAutoMode;
|
||||
public String attendanceAutoTime;
|
||||
|
||||
public String useDoorControlTime;
|
||||
public String doorControlStartTime;
|
||||
public String doorControlEndTime;
|
||||
}
|
||||
|
@ -107,6 +107,8 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
||||
private boolean mBtnRelay1 = false;
|
||||
private boolean mBtnRelay2 = false;
|
||||
|
||||
private boolean mIsOnRfidVerifyingProcess = false; // RFID 인증 정보 수신 후 처리 진행 중인 지. 중복 처리 방지용
|
||||
|
||||
private int mConsecutiveVeinFailCount = 0;
|
||||
private MainUiHandler mMainUiHandler = null;
|
||||
private ImageView[] mLoginImage = null;
|
||||
@ -694,6 +696,11 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
||||
if(mMainUiStatus == RESULT_SUCCESS || mMainUiStatus == RESULT_FAIL)
|
||||
return;
|
||||
|
||||
if(mIsOnRfidVerifyingProcess)
|
||||
return;
|
||||
|
||||
mIsOnRfidVerifyingProcess = true;
|
||||
|
||||
if(status.equals("success") && mVerifyMethod != GlobalInfo.VERIFY_METHOD_VEIN) {
|
||||
LogInfo _logInfo = new LogInfo();
|
||||
_logInfo.mMethod = GlobalInfo.VERIFY_METHOD_RFID;
|
||||
@ -2025,7 +2032,11 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
||||
|
||||
GlobalInfo.updateLogging(logResult);
|
||||
if(BaseService.mServerManager != null) {
|
||||
BaseService.mServerManager.reportLoggingResult(logResult);
|
||||
if(GlobalInfo.mUseAttendance == 1 && GlobalInfo.mAttendanceMode != GlobalInfo.ATTENDANCE_MODE_NONE) {
|
||||
BaseService.mServerManager.reportAttendanceResult(logResult); // 출퇴근 이력 전송
|
||||
} else {
|
||||
BaseService.mServerManager.reportLoggingResult(logResult);
|
||||
}
|
||||
}
|
||||
|
||||
GlobalInfo.mAttendanceMode = GlobalInfo.ATTENDANCE_MODE_NONE;
|
||||
@ -2448,6 +2459,7 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
||||
mWorkoutButton.setVisibility(View.INVISIBLE);
|
||||
mAttendanceButton.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
mIsOnRfidVerifyingProcess = false;
|
||||
|
||||
waitTimeHandler(RESULT_SUCCESS,GlobalInfo.mVerifyPopupTime * 1000);
|
||||
break;
|
||||
@ -2472,6 +2484,7 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
||||
mWorkoutButton.setVisibility(View.INVISIBLE);
|
||||
mAttendanceButton.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
mIsOnRfidVerifyingProcess = false;
|
||||
|
||||
waitTimeHandler(RESULT_FAIL,GlobalInfo.mVerifyPopupTime * 1000);
|
||||
break;
|
||||
|
@ -157,6 +157,7 @@ public class RfidManager implements SerialInputOutputManager.Listener {
|
||||
mSerialThread = new Thread() {
|
||||
byte[] accData = new byte[128];
|
||||
int accFilled = 0;
|
||||
int PACKET_LENGTH = GlobalInfo.BLE_RFID_CODE_LENGTH + 2;
|
||||
@Override
|
||||
public void run() {
|
||||
byte[] tmpData = new byte[128];
|
||||
@ -179,20 +180,20 @@ public class RfidManager implements SerialInputOutputManager.Listener {
|
||||
accFilled--;
|
||||
}
|
||||
|
||||
if(accFilled >= 9) {
|
||||
if(accData[0] == 0x02 && accData[8] == 0x03) { // 모바일 신분증 데이터 형식 매칭
|
||||
byte[] rfidId = new byte[7];
|
||||
System.arraycopy(accData, 1, rfidId, 0, 7);
|
||||
if(accFilled >= PACKET_LENGTH) {
|
||||
if(accData[0] == 0x02 && accData[GlobalInfo.BLE_RFID_CODE_LENGTH + 1] == 0x03) { // 모바일 신분증 데이터 형식 매칭
|
||||
byte[] rfidId = new byte[GlobalInfo.BLE_RFID_CODE_LENGTH];
|
||||
System.arraycopy(accData, 1, rfidId, 0, GlobalInfo.BLE_RFID_CODE_LENGTH);
|
||||
String rfidHex = byteArrayToHexString(rfidId);
|
||||
|
||||
if(accFilled > 9) {
|
||||
System.arraycopy(accData, 9, tmpData, 0, accFilled - 9);
|
||||
System.arraycopy(tmpData, 0, accData, 0, accFilled - 9);
|
||||
if(accFilled > PACKET_LENGTH) {
|
||||
System.arraycopy(accData, PACKET_LENGTH, tmpData, 0, accFilled - PACKET_LENGTH);
|
||||
System.arraycopy(tmpData, 0, accData, 0, accFilled - PACKET_LENGTH);
|
||||
}
|
||||
Log.d(RfidManager.class.getName(), String.format("BLE Reader Try [%s]", rfidHex));
|
||||
mNotifyTarget.onRfidResult("success", rfidHex);
|
||||
|
||||
accFilled -= 9;
|
||||
accFilled -= PACKET_LENGTH;
|
||||
} else {
|
||||
accFilled = 0;
|
||||
}
|
||||
|
@ -39,6 +39,9 @@ import java.net.URLEncoder;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
@ -465,6 +468,8 @@ public class ServerManager extends Thread {
|
||||
public final static int BASE_DATA_LENGTH = (COMMAND_LENGTH + PACKET_TYPE_LENGTH + DEVICE_ID_LENGTH + STATUS_LENGTH);
|
||||
|
||||
public final static int DATETIME_LENGTH = 14;
|
||||
public final static int DATE_LENGTH = 8;
|
||||
public final static int TIME_LENGTH = 4;
|
||||
public final static int USER_ID_LENGTH = 20;
|
||||
public final static int USER_NAME_LENGTH = 20;
|
||||
public final static int OPRNO_LENGTH = 20;
|
||||
@ -542,6 +547,17 @@ public class ServerManager extends Thread {
|
||||
public final static byte COMMAND_TYPE_VERIFY_SETTING_SET_V2 = 0x33;
|
||||
public final static byte COMMAND_TYPE_VERIFY_SETTING_GET_V2 = 0x34;
|
||||
|
||||
public final static byte COMMAND_TYPE_USER_PERMIT_DATETIME_SET = 0x35; // 32. 이용자 출입기간 저장
|
||||
public final static byte COMMAND_TYPE_USER_PERMIT_DATETIME_GET = 0x36;
|
||||
public final static byte COMMAND_TYPE_ATTENDANCE_SET = 0x37; // 34. 근태관리 설정
|
||||
public final static byte COMMAND_TYPE_ATTENDANCE_GET = 0x38;
|
||||
public final static byte COMMAND_TYPE_ATTENDANCE_NOTIFY = 0x39; // 36. 근태이력 전송(근태 사용 로그인 시 서버로 전송)
|
||||
public final static byte COMMAND_TYPE_DOOR_CONTROL_TIME_SET = 0x40; // 37. 개방시간 설정
|
||||
public final static byte COMMAND_TYPE_DOOR_CONTROL_TIME_GET = 0x41;
|
||||
public final static byte COMMAND_TYPE_USER_INFO_ETC_SAVE = 0x42; // 39. 이용자 기타정보 저장(RFID2, 지정맥2, 지문2)
|
||||
public final static byte COMMAND_TYPE_USER_INFO_ETC_GET = 0x43;
|
||||
public final static byte COMMAND_TYPE_ATTENDANCE_LOG_GET = 0x44; // 41. 근태 이력 로그 요청
|
||||
public final static byte COMMAND_TYPE_DELETE_ATTENDANCE_LOG_ALL = 0x45;
|
||||
|
||||
boolean callback_progress = true;
|
||||
LogInfo result_handler = new LogInfo();
|
||||
@ -755,6 +771,58 @@ public class ServerManager extends Thread {
|
||||
}
|
||||
|
||||
|
||||
public void reportAttendanceResult(LogInfo _result) {
|
||||
boolean result = false;
|
||||
|
||||
String[] dataArray = new String[9];
|
||||
dataArray[0] = getPaddingString(_result.mId, USER_ID_LENGTH);
|
||||
dataArray[1] = getPaddingString(_result.mName, USER_NAME_LENGTH);
|
||||
dataArray[2] = getPaddingString(_result.mOprno, OPRNO_LENGTH);
|
||||
dataArray[3] = getPaddingString(_result.mJohapnum, JOHAPNUM_LENGTH);
|
||||
/*if(_result.mMethod == GlobalInfo.VERIFY_METHOD_RFID) {
|
||||
dataArray[4] = "0001";
|
||||
} else if(_result.mMethod == GlobalInfo.VERIFY_METHOD_VEIN) {
|
||||
dataArray[4] = "0010";
|
||||
} else if(_result.mMethod == GlobalInfo.VERIFY_METHOD_VEIN_COMB_RFID) {
|
||||
dataArray[4] = "0011";
|
||||
}*/
|
||||
dataArray[4] = GlobalInfo.createVerifyMethodCombination(_result.mMethod);
|
||||
dataArray[5] = getPaddingString("" + _result.mResultCode, 1);
|
||||
String dateTime = _result.mDate.replace("-", "") + _result.mTime.replace(":", "");
|
||||
dataArray[6] = getPaddingString(dateTime, DATETIME_LENGTH);
|
||||
dataArray[7] = getPaddingString(_result.mRfidCode, RFID_CODE_LENGTH); // Added by ritoseo - 2021-04-16
|
||||
dataArray[8] = getPaddingString("" + (_result.mAttendanceCode - 1), 1);
|
||||
|
||||
byte[] message = createClientMessage(COMMAND_TYPE_ATTENDANCE_NOTIFY, getMsgDeviceId(), PKT_STATUS_OKAY, dataArray);
|
||||
new Thread("send_logging_attendance") {
|
||||
@Override
|
||||
public void run() {
|
||||
int retry_count = 0;
|
||||
//Log.w(TAG, "[LOGGING] " + RfidManager.byteArrayToHexString(message));
|
||||
while(retry_count < 3) {
|
||||
int ret = sendPushMessage(message);
|
||||
if(ret == 0) {
|
||||
Log.w(TAG, "<SENT> [ATTENDANCE Data]");
|
||||
break;
|
||||
}
|
||||
try {
|
||||
sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
retry_count++;
|
||||
}
|
||||
if(retry_count >= 3) {
|
||||
Log.w(TAG, "<FAILED SENT> [ATTENDANCE Data]");
|
||||
GlobalInfo.insertLogTempInfo(_result); // re-enabled - 2024-01-30. v2.0.3
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private byte[] createClientMessageByte(byte command, String deviceId, String status, byte[][] dataArray) {
|
||||
@ -1498,7 +1566,8 @@ public class ServerManager extends Thread {
|
||||
} else if(commandMsg[1] == COMMAND_TYPE_DELETE_LOG_ALL) { // 로그 전체 삭제
|
||||
if(statusMsgStr.equals(PKT_STATUS_OKAY)) {
|
||||
String replyStatus = PKT_STATUS_OKAY;
|
||||
int totalCount = GlobalInfo.getCountOfTable("logging");
|
||||
//int totalCount = GlobalInfo.getCountOfTable("logging");
|
||||
int totalCount = GlobalInfo.getCountOfLoggingTableWithAttendance(false);
|
||||
|
||||
if(!handleMessage(msg))
|
||||
replyStatus = PKT_STATUS_FAIL;
|
||||
@ -1867,7 +1936,472 @@ public class ServerManager extends Thread {
|
||||
message = createClientMessage(commandMsg[1], getMsgDeviceId(), replyStatus, dataArray);
|
||||
sendPushMessage(message);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ========================================
|
||||
*
|
||||
* 인터페이스 v3.5 처리
|
||||
*
|
||||
* ========================================
|
||||
*/
|
||||
|
||||
|
||||
} else if(commandMsg[1] == COMMAND_TYPE_USER_PERMIT_DATETIME_SET) { // 32. 이용자 출입기간 저장
|
||||
if(statusMsgStr.equals(PKT_STATUS_OKAY)) {
|
||||
int parseLen = USER_ID_LENGTH;
|
||||
byte[] parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
msg.userId = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. UserID : " + msg.userId);
|
||||
|
||||
parseLen = DATE_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
try {
|
||||
msg.permitStartDate = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. permitStartDate : " + msg.permitStartDate);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
parseLen = DATE_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
try {
|
||||
msg.permitEndDate = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. permitEndDate : " + msg.permitEndDate);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
parseLen = TIME_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
try {
|
||||
msg.permitStartTime = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. permitStartTime : " + msg.permitStartTime);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
parseLen = TIME_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
try {
|
||||
msg.permitEndTime = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. permitEndTime : " + msg.permitEndTime);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
|
||||
UserInfo info = GlobalInfo.scanUserById(GlobalInfo.mUserList, msg.userId);
|
||||
String replyStatus = PKT_STATUS_FAIL;
|
||||
if(info != null) {
|
||||
if(msg.permitStartDate != null && msg.permitStartDate.length() > 0) {
|
||||
msg.permitStartDate = GlobalInfo.convertDateToLonger(msg.permitStartDate);
|
||||
msg.permitEndDate = GlobalInfo.convertDateToLonger(msg.permitEndDate);
|
||||
|
||||
info.mPermitDate = msg.permitStartDate + " ~ " + msg.permitEndDate;
|
||||
}
|
||||
if(msg.permitStartTime != null && msg.permitStartTime.length() > 0) {
|
||||
msg.permitStartTime = GlobalInfo.convertTimeToLonger(msg.permitStartTime);
|
||||
msg.permitEndTime = GlobalInfo.convertTimeToLonger(msg.permitEndTime);
|
||||
|
||||
info.mPermitTime = msg.permitStartTime + " ~ " + msg.permitEndTime;
|
||||
}
|
||||
|
||||
boolean result = GlobalInfo.updateUserInfo(info);
|
||||
if(result)
|
||||
replyStatus = PKT_STATUS_OKAY;
|
||||
}
|
||||
String[] dataArray = new String[1];
|
||||
dataArray[0] = getPaddingString(msg.userId, USER_ID_LENGTH);
|
||||
message = createClientMessage(commandMsg[1], getMsgDeviceId(), replyStatus, dataArray);
|
||||
sendPushMessage(message);
|
||||
}
|
||||
} else if(commandMsg[1] == COMMAND_TYPE_USER_PERMIT_DATETIME_GET) { // 이용자 출입기간 조회
|
||||
int parseLen = USER_ID_LENGTH;
|
||||
byte[] parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
msg.userId = new String(parseMsg).trim();
|
||||
|
||||
if(statusMsgStr.equals(PKT_STATUS_OKAY)) {
|
||||
String replyStatus = PKT_STATUS_OKAY;
|
||||
|
||||
UserInfo info = GlobalInfo.scanUserById(GlobalInfo.mUserList, msg.userId);
|
||||
if(info != null) {
|
||||
byte[][] dataArray = new byte[5][];
|
||||
|
||||
dataArray[0] = getPaddingString(info.mID, USER_ID_LENGTH).getBytes();
|
||||
try {
|
||||
if (info.mPermitDate.length() > 0) {
|
||||
String[] split = info.mPermitDate.split("~");
|
||||
|
||||
dataArray[1] = getPaddingString(GlobalInfo.convertDateToSimple(split[0].trim()), DATE_LENGTH).getBytes();
|
||||
dataArray[2] = getPaddingString(GlobalInfo.convertDateToSimple(split[1].trim()), DATE_LENGTH).getBytes();
|
||||
}
|
||||
} catch(Exception e) {
|
||||
replyStatus = PKT_STATUS_FAIL;
|
||||
}
|
||||
|
||||
try {
|
||||
if (info.mPermitTime.length() > 0) {
|
||||
String[] split = info.mPermitTime.split("~");
|
||||
|
||||
dataArray[3] = getPaddingString(GlobalInfo.convertTimeToSimple(split[0].trim()), TIME_LENGTH).getBytes();
|
||||
dataArray[4] = getPaddingString(GlobalInfo.convertTimeToSimple(split[1].trim()), TIME_LENGTH).getBytes();
|
||||
}
|
||||
} catch(Exception e) {
|
||||
replyStatus = PKT_STATUS_FAIL;
|
||||
}
|
||||
|
||||
message = createClientMessageByte(commandMsg[1], getMsgDeviceId(), replyStatus, dataArray);
|
||||
} else {
|
||||
replyStatus = PKT_STATUS_FAIL;
|
||||
message = createClientMessage(commandMsg[1], getMsgDeviceId(), replyStatus, null);
|
||||
}
|
||||
sendPushMessage(message);
|
||||
}
|
||||
} else if(commandMsg[1] == COMMAND_TYPE_ATTENDANCE_SET) { // 34. 근태관리 설정
|
||||
if(statusMsgStr.equals(PKT_STATUS_OKAY)) {
|
||||
int parseLen = 1;
|
||||
byte[] parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
msg.useAttendance = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. useAttendance : " + msg.useAttendance);
|
||||
|
||||
parseLen = TIME_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
try {
|
||||
msg.attendanceStartTime = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. attendanceStartTime : " + msg.attendanceStartTime);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
parseLen = TIME_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
try {
|
||||
msg.attendanceEndTime = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. attendanceEndTime : " + msg.attendanceEndTime);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
parseLen = 1;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
msg.useAttendanceAutoMode = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. useAttendanceAutoMode : " + msg.useAttendanceAutoMode);
|
||||
|
||||
parseLen = TIME_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
try {
|
||||
msg.attendanceAutoTime = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. attendanceAutoTime : " + msg.attendanceAutoTime);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
String replyStatus = PKT_STATUS_FAIL;
|
||||
boolean result = handleMessage(msg);
|
||||
if(result)
|
||||
replyStatus = PKT_STATUS_OKAY;
|
||||
|
||||
message = createClientMessage(COMMAND_TYPE_ATTENDANCE_SET, getMsgDeviceId(), replyStatus, null);
|
||||
sendPushMessage(message);
|
||||
}
|
||||
} else if(commandMsg[1] == COMMAND_TYPE_ATTENDANCE_GET) { // 근태관리 정보 조회
|
||||
String replyStatus = PKT_STATUS_OKAY;
|
||||
if(statusMsgStr.equals(PKT_STATUS_OKAY)) {
|
||||
byte[][] dataArray = new byte[5][];
|
||||
dataArray[0] = getPaddingString(GlobalInfo.mUseAttendance == 1 ? "Y" : "N", 1).getBytes();
|
||||
dataArray[1] = getPaddingString(GlobalInfo.convertMinutesToSimpleTime(GlobalInfo.mAttendanceStartTime), TIME_LENGTH).getBytes();
|
||||
dataArray[2] = getPaddingString(GlobalInfo.convertMinutesToSimpleTime(GlobalInfo.mAttendanceEndTime), TIME_LENGTH).getBytes();
|
||||
dataArray[3] = getPaddingString(GlobalInfo.mUseAttendanceAutoMode == 1 ? "Y" : "N", 1).getBytes();
|
||||
dataArray[4] = getPaddingString(String.format("%04d", GlobalInfo.mAttendanceAutoTimeMinute), TIME_LENGTH).getBytes();
|
||||
|
||||
message = createClientMessageByte(commandMsg[1], getMsgDeviceId(), replyStatus, dataArray);
|
||||
sendPushMessage(message);
|
||||
} else {
|
||||
replyStatus = PKT_STATUS_FAIL;
|
||||
message = createClientMessage(commandMsg[1], getMsgDeviceId(), replyStatus, null);
|
||||
}
|
||||
|
||||
sendPushMessage(message);
|
||||
|
||||
} else if(commandMsg[1] == COMMAND_TYPE_DOOR_CONTROL_TIME_SET) { // 37. 개방시간 설정
|
||||
if(statusMsgStr.equals(PKT_STATUS_OKAY)) {
|
||||
int parseLen = 1;
|
||||
byte[] parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
msg.useDoorControlTime = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. useDoorControlTime : " + msg.useDoorControlTime);
|
||||
|
||||
parseLen = TIME_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
try {
|
||||
msg.doorControlStartTime = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. doorControlStartTime : " + msg.doorControlStartTime);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
parseLen = TIME_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
try {
|
||||
msg.doorControlEndTime = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. doorControlEndTime : " + msg.doorControlEndTime);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
String replyStatus = PKT_STATUS_FAIL;
|
||||
boolean result = handleMessage(msg);
|
||||
if(result)
|
||||
replyStatus = PKT_STATUS_OKAY;
|
||||
|
||||
message = createClientMessage(COMMAND_TYPE_DOOR_CONTROL_TIME_SET, getMsgDeviceId(), replyStatus, null);
|
||||
sendPushMessage(message);
|
||||
}
|
||||
|
||||
} else if(commandMsg[1] == COMMAND_TYPE_DOOR_CONTROL_TIME_GET) { // 개방시간 정보 조회
|
||||
String replyStatus = PKT_STATUS_OKAY;
|
||||
if(statusMsgStr.equals(PKT_STATUS_OKAY)) {
|
||||
byte[][] dataArray = new byte[3][];
|
||||
dataArray[0] = getPaddingString(GlobalInfo.mUseDoorControlTime == 1 ? "Y" : "N", 1).getBytes();
|
||||
dataArray[1] = getPaddingString(GlobalInfo.convertMinutesToSimpleTime(GlobalInfo.mDoorControlTimeStart), TIME_LENGTH).getBytes();
|
||||
dataArray[2] = getPaddingString(GlobalInfo.convertMinutesToSimpleTime(GlobalInfo.mDoorControlTimeEnd), TIME_LENGTH).getBytes();
|
||||
|
||||
message = createClientMessageByte(commandMsg[1], getMsgDeviceId(), replyStatus, dataArray);
|
||||
sendPushMessage(message);
|
||||
} else {
|
||||
replyStatus = PKT_STATUS_FAIL;
|
||||
message = createClientMessage(commandMsg[1], getMsgDeviceId(), replyStatus, null);
|
||||
}
|
||||
|
||||
sendPushMessage(message);
|
||||
} else if(commandMsg[1] == COMMAND_TYPE_USER_INFO_ETC_SAVE) { // 39. 이용자 기타정보 저장
|
||||
if(statusMsgStr.equals(PKT_STATUS_OKAY)) {
|
||||
int bodyLenRemain = bodyLen - BASE_DATA_LENGTH;
|
||||
int parseLen = USER_ID_LENGTH;
|
||||
byte[] parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
bodyLenRemain -= parseLen;
|
||||
msg.userId = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. UserID : " + msg.userId);
|
||||
|
||||
parseLen = VERIFY_METHOD_LENGTH; // 저장할 인증방법
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
bodyLenRemain -= parseLen;
|
||||
msg.verifyMethod = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. VerifyMethod : " + msg.verifyMethod);
|
||||
|
||||
if(msg.verifyMethod.charAt(3) == '1') { // RFID 사용
|
||||
parseLen = RFID_CODE_LENGTH;
|
||||
bodyLenRemain -= parseLen;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
msg.rfidCode2 = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. RFID2 : " + msg.rfidCode2);
|
||||
}
|
||||
|
||||
if(msg.verifyMethod.charAt(2) == '1') { // 지정맥 사용
|
||||
parseLen = VEIN_CODE_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
msg.veinCode2 = new String(parseMsg).trim();
|
||||
try {
|
||||
msg.veinCode2 = URLDecoder.decode(msg.veinCode2, "utf-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (msg.veinCode2.length() != VEIN_CODE_LENGTH) {
|
||||
Log.i(TAG, "parseMessage. VeinCode2 length is not fit! Received Length : " + msg.veinCode2.length());
|
||||
msg.veinCode2 = null;
|
||||
}
|
||||
if (msg.veinCode2 != null) {
|
||||
Log.i(TAG, "parseMessage. VeinCode2 : " + msg.veinCode2 + " LENGTH : " + msg.veinCode2.length());
|
||||
}
|
||||
}
|
||||
|
||||
if(msg.verifyMethod.charAt(1) == '1') { // 지문 사용
|
||||
parseLen = FINGER_CODE_LENGTH;
|
||||
bodyLenRemain -= parseLen;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
msg.fingerCode2 = new String(parseMsg).trim();
|
||||
Log.i(TAG, "parseMessage. FingerPrint2 : " + msg.fingerCode2);
|
||||
}
|
||||
|
||||
UserInfo info = GlobalInfo.scanUserById(GlobalInfo.mUserList, msg.userId);
|
||||
String replyStatus = PKT_STATUS_FAIL;
|
||||
if(info != null) {
|
||||
if(msg.rfidCode2 != null && msg.rfidCode2.length() > 0) {
|
||||
info.mRFIDCode2 = msg.rfidCode2;
|
||||
} else {
|
||||
info.mRFIDCode2 = "";
|
||||
}
|
||||
if(msg.veinCode2 != null && msg.veinCode2.length() > 0) {
|
||||
info.mVeinTemplate2 = msg.veinCode2;
|
||||
} else {
|
||||
info.mVeinTemplate2 = "";
|
||||
}
|
||||
if(msg.fingerCode2 != null && msg.fingerCode2.length() > 0) {
|
||||
info.mFingerTemplate2 = msg.fingerCode2;
|
||||
} else {
|
||||
info.mFingerTemplate2 = "";
|
||||
}
|
||||
|
||||
boolean result = GlobalInfo.updateUserInfo(info);
|
||||
if(result)
|
||||
replyStatus = PKT_STATUS_OKAY;
|
||||
}
|
||||
String[] dataArray = new String[1];
|
||||
dataArray[0] = getPaddingString(msg.userId, USER_ID_LENGTH);
|
||||
message = createClientMessage(commandMsg[1], getMsgDeviceId(), replyStatus, dataArray);
|
||||
sendPushMessage(message);
|
||||
}
|
||||
|
||||
}
|
||||
else if(commandMsg[1] == COMMAND_TYPE_USER_INFO_ETC_GET) { // 40. 사용자 기타정보 조회
|
||||
int parseLen = USER_ID_LENGTH;
|
||||
byte[] parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
msg.userId = new String(parseMsg).trim();
|
||||
|
||||
if (statusMsgStr.equals(PKT_STATUS_OKAY)) {
|
||||
String replyStatus = PKT_STATUS_OKAY;
|
||||
|
||||
UserInfo info = GlobalInfo.scanUserById(GlobalInfo.mUserList, msg.userId);
|
||||
if (info != null) {
|
||||
//String[] dataArray = new String[8];
|
||||
byte[][] dataArray;
|
||||
String _verifyString = "";
|
||||
{
|
||||
int reg_cnt = 0;
|
||||
|
||||
_verifyString += "0"; // 얼굴은 전송 안함
|
||||
|
||||
if (info.mFingerTemplate.length() > 0) {
|
||||
_verifyString += "1";
|
||||
reg_cnt++;
|
||||
} else {
|
||||
_verifyString += "0";
|
||||
}
|
||||
|
||||
if (info.mVeinTemplate.length() > 0) {
|
||||
_verifyString += "1";
|
||||
reg_cnt++;
|
||||
} else {
|
||||
_verifyString += "0";
|
||||
}
|
||||
|
||||
if (info.mRFIDCode.length() > 0) {
|
||||
_verifyString += "1";
|
||||
reg_cnt++;
|
||||
} else {
|
||||
_verifyString += "0";
|
||||
}
|
||||
|
||||
dataArray = new byte[2 + reg_cnt][];
|
||||
}
|
||||
dataArray[0] = getPaddingString(info.mID, USER_ID_LENGTH).getBytes();
|
||||
{
|
||||
int idx_off = 0;
|
||||
dataArray[1] = getPaddingString(_verifyString, VERIFY_METHOD_LENGTH).getBytes();
|
||||
|
||||
if (info.mRFIDCode2.length() > 0) {
|
||||
dataArray[2 + idx_off] = getPaddingString(info.mRFIDCode2, RFID_CODE_LENGTH).getBytes();
|
||||
idx_off++;
|
||||
}
|
||||
|
||||
if (info.mVeinTemplate2.length() > 0) {
|
||||
dataArray[2 + idx_off] = getPaddingString(info.mVeinTemplate2, VEIN_CODE_LENGTH).getBytes();
|
||||
idx_off++;
|
||||
}
|
||||
|
||||
if (info.mFingerTemplate2.length() > 0) {
|
||||
dataArray[2 + idx_off] = getPaddingString(info.mFingerTemplate2, FINGER_CODE_LENGTH).getBytes();
|
||||
idx_off++;
|
||||
}
|
||||
}
|
||||
|
||||
message = createClientMessageByte(commandMsg[1], getMsgDeviceId(), replyStatus, dataArray);
|
||||
} else {
|
||||
replyStatus = PKT_STATUS_FAIL;
|
||||
message = createClientMessage(commandMsg[1], getMsgDeviceId(), replyStatus, null);
|
||||
}
|
||||
sendPushMessage(message);
|
||||
}
|
||||
} else if(commandMsg[1] == COMMAND_TYPE_ATTENDANCE_LOG_GET) { // 41. 근태 이력 정보 읽기
|
||||
int parseLen = DATETIME_LENGTH;
|
||||
byte[] parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
msg.logStartDate = new String(parseMsg).trim();
|
||||
|
||||
parseLen = DATETIME_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
msg.logEndDate = new String(parseMsg).trim();
|
||||
|
||||
parseLen = PAGE_NUMBER_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
Log.w(TAG, "logPageHex : " + RfidManager.byteArrayToHexString(parseMsg));
|
||||
msg.logPage = "" + SystemUtil.fromByteArrayToInt(parseMsg);
|
||||
|
||||
parseLen = DISPLAY_COUNT_LENGTH;
|
||||
parseMsg = new byte[parseLen];
|
||||
System.arraycopy(message, idx, parseMsg, 0, parseLen);
|
||||
idx += parseLen;
|
||||
Log.w(TAG, "logDisplayCntHex : " + RfidManager.byteArrayToHexString(parseMsg));
|
||||
msg.logDisplayCnt = "" + SystemUtil.fromByteArrayToInt(parseMsg);
|
||||
|
||||
Log.w(TAG, "logPage : " + msg.logPage);
|
||||
Log.w(TAG, "logDisplayCnt : " + msg.logDisplayCnt);
|
||||
|
||||
if(statusMsgStr.equals(PKT_STATUS_OKAY)) {
|
||||
handleMessage(msg);
|
||||
}
|
||||
} else if(commandMsg[1] == COMMAND_TYPE_DELETE_ATTENDANCE_LOG_ALL) { // 근태이력 전체 삭제
|
||||
if(statusMsgStr.equals(PKT_STATUS_OKAY)) {
|
||||
String replyStatus = PKT_STATUS_OKAY;
|
||||
int totalCount = GlobalInfo.getCountOfLoggingTableWithAttendance(true);
|
||||
|
||||
if(!handleMessage(msg))
|
||||
replyStatus = PKT_STATUS_FAIL;
|
||||
|
||||
byte[][] dataArray = new byte[1][];
|
||||
dataArray[0] = intTobyte(totalCount, ByteOrder.LITTLE_ENDIAN);
|
||||
message = createClientMessageByte(COMMAND_TYPE_DELETE_ATTENDANCE_LOG_ALL, getMsgDeviceId(), replyStatus, dataArray);
|
||||
|
||||
sendPushMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static String getPaddingString(String origin, int targetLen) {
|
||||
@ -2041,11 +2575,12 @@ public class ServerManager extends Thread {
|
||||
} catch(Exception e) {
|
||||
ret = false;
|
||||
}
|
||||
} else if(msg.command == COMMAND_TYPE_LOG_DATA_GET) { // 이력 로그 요청
|
||||
} else if(msg.command == COMMAND_TYPE_LOG_DATA_GET || msg.command == COMMAND_TYPE_ATTENDANCE_LOG_GET) { // 이력 로그 요청
|
||||
new Thread("log_sender") {
|
||||
@Override
|
||||
public void run() {
|
||||
ArrayList<LogInfo> logList = GlobalInfo.queryLogDataDateTime(msg.logStartDate, msg.logEndDate);
|
||||
boolean isAttendanceLog = msg.command == COMMAND_TYPE_ATTENDANCE_LOG_GET ? true : false;
|
||||
ArrayList<LogInfo> logList = GlobalInfo.queryLogDataDateTime(msg.logStartDate, msg.logEndDate, isAttendanceLog);
|
||||
int dispCount = Integer.parseInt(msg.logDisplayCnt);
|
||||
int dispPage = Integer.parseInt(msg.logPage);
|
||||
int totalCount = logList.size();
|
||||
@ -2060,6 +2595,13 @@ public class ServerManager extends Thread {
|
||||
if(startIdx > targetIdx) {
|
||||
startIdx = targetIdx;
|
||||
}
|
||||
int logDataKinds = 8;
|
||||
byte ackCmd = COMMAND_TYPE_LOG_DATA_GET;
|
||||
if(isAttendanceLog) {
|
||||
logDataKinds = 9;
|
||||
ackCmd = COMMAND_TYPE_ATTENDANCE_LOG_GET;
|
||||
}
|
||||
|
||||
Log.w(TAG, "LogList StartDate : " + msg.logStartDate);
|
||||
Log.w(TAG, "LogList EndDate : " + msg.logEndDate);
|
||||
Log.w(TAG, String.format("startIdx : %d, targetIdx : %d, LogList Size : %d", startIdx, targetIdx, logList.size()));
|
||||
@ -2068,7 +2610,7 @@ public class ServerManager extends Thread {
|
||||
if(GlobalInfo.USE_SEND_ONESHOT_MODE) {
|
||||
int idxCount = targetIdx - startIdx;
|
||||
int idx = 2;
|
||||
byte[][] dataArray = new byte[2 + idxCount * 8][];
|
||||
byte[][] dataArray = new byte[2 + idxCount * logDataKinds][];
|
||||
dataArray[0] = intTobyte(totalCount, ByteOrder.LITTLE_ENDIAN);
|
||||
dataArray[1] = intTobyte(idxCount, ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
@ -2095,9 +2637,12 @@ public class ServerManager extends Thread {
|
||||
String dateTime = info.mDate.replace("-", "") + info.mTime.replace(":", "");
|
||||
dataArray[idx++] = getPaddingString(dateTime, DATETIME_LENGTH).getBytes();
|
||||
dataArray[idx++] = getPaddingString(info.mRfidCode, RFID_CODE_LENGTH).getBytes(); // Added by ritoseo - 2021-04-16
|
||||
if(isAttendanceLog) {
|
||||
dataArray[idx++] = getPaddingString("" + (info.mAttendanceCode - 1), 1).getBytes();
|
||||
}
|
||||
}
|
||||
|
||||
byte[] message = createClientMessageByte(COMMAND_TYPE_LOG_DATA_GET, getMsgDeviceId(), ServerManager.PKT_STATUS_OKAY, dataArray);
|
||||
byte[] message = createClientMessageByte(ackCmd, getMsgDeviceId(), ServerManager.PKT_STATUS_OKAY, dataArray);
|
||||
int retry_count = 0;
|
||||
while (retry_count < 3) {
|
||||
int ret = sendPushMessage(message);
|
||||
@ -2168,7 +2713,18 @@ public class ServerManager extends Thread {
|
||||
}.start();
|
||||
} else if(msg.command == COMMAND_TYPE_DELETE_LOG_ALL) { // 이력 로그 전체 삭제
|
||||
try {
|
||||
/*
|
||||
ret = GlobalInfo.tableCleanup("logging");
|
||||
*/
|
||||
ret = true;
|
||||
GlobalInfo.deleteDataBy("log", "", "");
|
||||
} catch(Exception e) {
|
||||
ret = false;
|
||||
}
|
||||
} else if(msg.command == COMMAND_TYPE_DELETE_ATTENDANCE_LOG_ALL) { // 근태이력 전체 삭제
|
||||
try {
|
||||
ret = true;
|
||||
GlobalInfo.deleteDataBy("attendance", "", "");
|
||||
} catch(Exception e) {
|
||||
ret = false;
|
||||
}
|
||||
@ -2420,8 +2976,27 @@ public class ServerManager extends Thread {
|
||||
}.start();
|
||||
|
||||
|
||||
} else if(msg.command == COMMAND_TYPE_ATTENDANCE_SET) { // 34. 근태관리 설정
|
||||
try {
|
||||
GlobalInfo.mUseAttendance = msg.useAttendance.equals("Y") ? 1 : 0;
|
||||
GlobalInfo.mAttendanceStartTime = GlobalInfo.convertSimpleTimeToMinutes(msg.attendanceStartTime);
|
||||
GlobalInfo.mAttendanceEndTime = GlobalInfo.convertSimpleTimeToMinutes(msg.attendanceEndTime);
|
||||
GlobalInfo.mUseAttendanceAutoMode = msg.useAttendanceAutoMode.equals("Y") ? 1 : 0;
|
||||
GlobalInfo.mAttendanceAutoTimeMinute = Integer.parseInt(msg.attendanceAutoTime);
|
||||
GlobalInfo.updateDatabase(GlobalInfo.TARGET_FLAG_DEVICE_INFO);
|
||||
} catch(Exception e) {
|
||||
ret = false;
|
||||
}
|
||||
|
||||
|
||||
} else if(msg.command == COMMAND_TYPE_DOOR_CONTROL_TIME_SET) { // 37. 개방시간 설정
|
||||
try {
|
||||
GlobalInfo.mUseDoorControlTime = msg.useDoorControlTime.equals("Y") ? 1 : 0;
|
||||
GlobalInfo.mDoorControlTimeStart = GlobalInfo.convertSimpleTimeToMinutes(msg.doorControlStartTime);
|
||||
GlobalInfo.mDoorControlTimeEnd = GlobalInfo.convertSimpleTimeToMinutes(msg.doorControlEndTime);
|
||||
GlobalInfo.updateDatabase(GlobalInfo.TARGET_FLAG_DEVICE_INFO);
|
||||
} catch(Exception e) {
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ public class LogInfo {
|
||||
mJohapnum = "";
|
||||
mRfidCode = "";
|
||||
mCaptureId = "";
|
||||
mAttendanceCode = 0;
|
||||
mAttendanceCode = GlobalInfo.ATTENDANCE_MODE_NONE;
|
||||
mMethod = GlobalInfo.VERIFY_METHOD_VEIN;
|
||||
mResultCode = GlobalInfo.VERIFY_RESULT_FAILED;
|
||||
}
|
||||
|
@ -217,11 +217,12 @@ public class MgtUserInfoActivity extends BaseActivity implements RfidManager.re
|
||||
layoutFinger.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
mDateText = findViewById(R.id.textViewPermitDateValue);
|
||||
mTimeText = findViewById(R.id.textViewPermitTimeValue);
|
||||
|
||||
updateMenuListVisibility();
|
||||
|
||||
|
||||
mDateText = findViewById(R.id.textViewPermitDateValue);
|
||||
mTimeText = findViewById(R.id.textViewPermitTimeValue);
|
||||
|
||||
|
||||
/*
|
||||
@ -481,6 +482,16 @@ public class MgtUserInfoActivity extends BaseActivity implements RfidManager.re
|
||||
|
||||
|
||||
|
||||
imgButton = (ImageButton) findViewById(R.id.buttonDeletePermitDate);
|
||||
imgButton.setOnClickListener(new Button.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
// TODO : click event
|
||||
mDateText.setText("");
|
||||
updateMenuListVisibility();
|
||||
}
|
||||
});
|
||||
|
||||
button = (Button) findViewById(R.id.buttonSetPermitDate);
|
||||
button.setOnClickListener(new Button.OnClickListener() {
|
||||
@Override
|
||||
@ -490,6 +501,18 @@ public class MgtUserInfoActivity extends BaseActivity implements RfidManager.re
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
imgButton = (ImageButton) findViewById(R.id.buttonDeletePermitTime);
|
||||
imgButton.setOnClickListener(new Button.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
// TODO : click event
|
||||
mTimeText.setText("");
|
||||
updateMenuListVisibility();
|
||||
}
|
||||
});
|
||||
|
||||
button = (Button) findViewById(R.id.buttonSetPermitTime);
|
||||
button.setOnClickListener(new Button.OnClickListener() {
|
||||
@Override
|
||||
@ -767,10 +790,14 @@ public class MgtUserInfoActivity extends BaseActivity implements RfidManager.re
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
}catch (Exception e)
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally {
|
||||
updateMenuListVisibility();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -856,6 +883,7 @@ public class MgtUserInfoActivity extends BaseActivity implements RfidManager.re
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
dialog.dismiss();
|
||||
updateMenuListVisibility();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -920,6 +948,19 @@ public class MgtUserInfoActivity extends BaseActivity implements RfidManager.re
|
||||
}
|
||||
}
|
||||
|
||||
if(mDateText.getText().length() > 0) {
|
||||
findViewById(R.id.buttonDeletePermitDate).setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
findViewById(R.id.buttonDeletePermitDate).setVisibility(View.INVISIBLE);
|
||||
}
|
||||
if(mTimeText.getText().length() > 0) {
|
||||
findViewById(R.id.buttonDeletePermitTime).setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
findViewById(R.id.buttonDeletePermitTime).setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
findViewById(R.id.scrollView).postInvalidate();
|
||||
}
|
||||
|
||||
|
@ -372,45 +372,56 @@ public class NetworkSettingActivity extends BaseActivity {
|
||||
mIpConfiguration.ipAssignment = IpAssignment.DHCP;
|
||||
}
|
||||
|
||||
try {
|
||||
if (mTextView[NETWORK_IP] != null) {
|
||||
if(isStatic && staticConfig != null)
|
||||
if (isStatic && staticConfig != null)
|
||||
mTextView[NETWORK_IP].setText(staticConfig.ipAddress.getAddress().getHostAddress());
|
||||
|
||||
}
|
||||
} catch(Exception e) {
|
||||
}
|
||||
|
||||
if (mTextView[NETWORK_SUBNET] != null) {
|
||||
if(isStatic && staticConfig != null) {
|
||||
//edit.setText("" + staticConfig.ipAddress.getNetworkPrefixLength());
|
||||
mTextView[NETWORK_SUBNET].setText(getNetmask());
|
||||
}
|
||||
|
||||
if (mTextView[NETWORK_SUBNET] != null) {
|
||||
if(isStatic && staticConfig != null) {
|
||||
//edit.setText("" + staticConfig.ipAddress.getNetworkPrefixLength());
|
||||
mTextView[NETWORK_SUBNET].setText(getNetmask());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
if (mTextView[NETWORK_GATEWAY] != null) {
|
||||
if(isStatic && staticConfig != null)
|
||||
if (isStatic && staticConfig != null)
|
||||
mTextView[NETWORK_GATEWAY].setText(staticConfig.gateway.getHostAddress());
|
||||
|
||||
}
|
||||
} catch(Exception e) {
|
||||
}
|
||||
|
||||
Iterator<InetAddress> dnsIterator = null;
|
||||
if(isStatic && staticConfig != null)
|
||||
dnsIterator = staticConfig.dnsServers.iterator();
|
||||
Iterator<InetAddress> dnsIterator = null;
|
||||
if(isStatic && staticConfig != null)
|
||||
dnsIterator = staticConfig.dnsServers.iterator();
|
||||
|
||||
try {
|
||||
if (mTextView[NETWORK_DNS1] != null) {
|
||||
if(dnsIterator != null) {
|
||||
if (dnsIterator != null) {
|
||||
if (dnsIterator.hasNext())
|
||||
mTextView[NETWORK_DNS1].setText(dnsIterator.next().getHostAddress());
|
||||
}
|
||||
|
||||
}
|
||||
} catch(Exception e) {
|
||||
}
|
||||
|
||||
try {
|
||||
if (mTextView[NETWORK_DNS2] != null) {
|
||||
if(dnsIterator != null) {
|
||||
if (dnsIterator != null) {
|
||||
if (dnsIterator.hasNext())
|
||||
mTextView[NETWORK_DNS2].setText(dnsIterator.next().getHostAddress());
|
||||
}
|
||||
mTextView[NETWORK_DNS2].setEnabled(isStatic);
|
||||
}
|
||||
} catch(Exception e) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
19
app/src/main/res/drawable/button_shape_attendance.xml
Normal file
19
app/src/main/res/drawable/button_shape_attendance.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
||||
<corners
|
||||
android:radius="10px"
|
||||
/>
|
||||
<solid
|
||||
android:color="#66000000"
|
||||
/>
|
||||
<padding
|
||||
android:left="0dp"
|
||||
android:top="0dp"
|
||||
android:right="0dp"
|
||||
android:bottom="0dp"
|
||||
/>
|
||||
<size
|
||||
android:width="280px"
|
||||
android:height="402px"
|
||||
/>
|
||||
</shape>
|
6
app/src/main/res/drawable/del_trash_btn.xml
Normal file
6
app/src/main/res/drawable/del_trash_btn.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/del_btn_rito" /> <!-- pressed -->
|
||||
<item android:drawable="@drawable/del_btn_rito" /> <!-- default -->
|
||||
</selector>
|
@ -92,12 +92,18 @@
|
||||
android:textSize="56px"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<kr.co.enicom.acs.CameraCaptureView
|
||||
<!-- <kr.co.enicom.acs.CameraCaptureView-->
|
||||
<!-- android:id="@+id/cameraCaptureViewVein"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:alpha="0.01"-->
|
||||
<!-- android:rotation="270" />-->
|
||||
|
||||
<kr.co.enicom.acs.CameraSurfaceView
|
||||
android:id="@+id/cameraCaptureView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.01"
|
||||
android:rotation="270" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.01"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
@ -612,119 +612,6 @@
|
||||
<!-- android:background="#00000000" />-->
|
||||
<!-- </FrameLayout>-->
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="94px"
|
||||
android:background="@drawable/layout_border">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/datarebootimage"
|
||||
android:layout_width="60px"
|
||||
android:layout_height="60px"
|
||||
android:layout_marginStart="40px"
|
||||
android:layout_marginTop="17px"
|
||||
app:srcCompat="@drawable/setting_list_icon_11" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="370px"
|
||||
android:layout_height="425px"
|
||||
android:layout_marginStart="140px"
|
||||
android:layout_marginTop="25px"
|
||||
android:fontFamily="@font/nanumbarungothic"
|
||||
android:text="@string/mgt_system_reboot_text"
|
||||
android:textColor="#333333"
|
||||
android:textSize="42px" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="19px"
|
||||
android:layout_height="38px"
|
||||
android:layout_marginStart="1217px"
|
||||
android:layout_marginTop="27px"
|
||||
app:srcCompat="@drawable/list_arrow_icon" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/datarebootbutton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#00000000" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="94px"
|
||||
android:background="@drawable/layout_border">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dataupdateimage"
|
||||
android:layout_width="60px"
|
||||
android:layout_height="60px"
|
||||
android:layout_marginStart="40px"
|
||||
android:layout_marginTop="17px"
|
||||
app:srcCompat="@drawable/setting_list_icon_12" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="370px"
|
||||
android:layout_height="425px"
|
||||
android:layout_marginStart="140px"
|
||||
android:layout_marginTop="25px"
|
||||
android:fontFamily="@font/nanumbarungothic"
|
||||
android:text="@string/mgt_system_update_text"
|
||||
android:textColor="#333333"
|
||||
android:textSize="42px" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="19px"
|
||||
android:layout_height="38px"
|
||||
android:layout_marginStart="1217px"
|
||||
android:layout_marginTop="27px"
|
||||
app:srcCompat="@drawable/list_arrow_icon" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/dataupdatebutton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#00000000" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="94px"
|
||||
android:background="@drawable/layout_border">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/factoryimage"
|
||||
android:layout_width="60px"
|
||||
android:layout_height="60px"
|
||||
android:layout_marginStart="40px"
|
||||
android:layout_marginTop="17px"
|
||||
app:srcCompat="@drawable/setting_list_icon_13" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="370px"
|
||||
android:layout_height="425px"
|
||||
android:layout_marginStart="140px"
|
||||
android:layout_marginTop="25px"
|
||||
android:fontFamily="@font/nanumbarungothic"
|
||||
android:text="@string/mgt_system_factory"
|
||||
android:textColor="#333333"
|
||||
android:textSize="42px" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="19px"
|
||||
android:layout_height="38px"
|
||||
android:layout_marginStart="1217px"
|
||||
android:layout_marginTop="27px"
|
||||
app:srcCompat="@drawable/list_arrow_icon" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/factorybutton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#00000000" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -1052,6 +939,128 @@
|
||||
app:srcCompat="@drawable/toggle_pressed" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="94px"
|
||||
android:background="@drawable/layout_border">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dataupdateimage"
|
||||
android:layout_width="60px"
|
||||
android:layout_height="60px"
|
||||
android:layout_marginStart="40px"
|
||||
android:layout_marginTop="17px"
|
||||
app:srcCompat="@drawable/setting_list_icon_12" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="370px"
|
||||
android:layout_height="425px"
|
||||
android:layout_marginStart="140px"
|
||||
android:layout_marginTop="25px"
|
||||
android:fontFamily="@font/nanumbarungothic"
|
||||
android:text="@string/mgt_system_update_text"
|
||||
android:textColor="#333333"
|
||||
android:textSize="42px" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="19px"
|
||||
android:layout_height="38px"
|
||||
android:layout_marginStart="1217px"
|
||||
android:layout_marginTop="27px"
|
||||
app:srcCompat="@drawable/list_arrow_icon" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/dataupdatebutton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#00000000" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="94px"
|
||||
android:background="@drawable/layout_border">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/factoryimage"
|
||||
android:layout_width="60px"
|
||||
android:layout_height="60px"
|
||||
android:layout_marginStart="40px"
|
||||
android:layout_marginTop="17px"
|
||||
app:srcCompat="@drawable/setting_list_icon_13" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="370px"
|
||||
android:layout_height="425px"
|
||||
android:layout_marginStart="140px"
|
||||
android:layout_marginTop="25px"
|
||||
android:fontFamily="@font/nanumbarungothic"
|
||||
android:text="@string/mgt_system_factory"
|
||||
android:textColor="#333333"
|
||||
android:textSize="42px" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="19px"
|
||||
android:layout_height="38px"
|
||||
android:layout_marginStart="1217px"
|
||||
android:layout_marginTop="27px"
|
||||
app:srcCompat="@drawable/list_arrow_icon" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/factorybutton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#00000000" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="94px"
|
||||
android:background="@drawable/layout_border">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/datarebootimage"
|
||||
android:layout_width="60px"
|
||||
android:layout_height="60px"
|
||||
android:layout_marginStart="40px"
|
||||
android:layout_marginTop="17px"
|
||||
app:srcCompat="@drawable/setting_list_icon_11" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="370px"
|
||||
android:layout_height="425px"
|
||||
android:layout_marginStart="140px"
|
||||
android:layout_marginTop="25px"
|
||||
android:fontFamily="@font/nanumbarungothic"
|
||||
android:text="@string/mgt_system_reboot_text"
|
||||
android:textColor="#333333"
|
||||
android:textSize="42px" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="19px"
|
||||
android:layout_height="38px"
|
||||
android:layout_marginStart="1217px"
|
||||
android:layout_marginTop="27px"
|
||||
app:srcCompat="@drawable/list_arrow_icon" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/datarebootbutton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#00000000" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
@ -866,6 +866,15 @@
|
||||
android:paddingStart="38px"
|
||||
android:fontFamily="@font/nanumbarungothic"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/buttonDeletePermitDate"
|
||||
android:layout_width="70px"
|
||||
android:layout_height="70px"
|
||||
android:layout_marginLeft="710px"
|
||||
android:layout_marginTop="10px"
|
||||
android:visibility="invisible"
|
||||
android:background="@drawable/del_trash_btn" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonSetPermitDate"
|
||||
android:layout_width="148px"
|
||||
@ -915,6 +924,15 @@
|
||||
android:paddingStart="38px"
|
||||
android:fontFamily="@font/nanumbarungothic"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/buttonDeletePermitTime"
|
||||
android:layout_width="70px"
|
||||
android:layout_height="70px"
|
||||
android:layout_marginLeft="710px"
|
||||
android:layout_marginTop="10px"
|
||||
android:visibility="invisible"
|
||||
android:background="@drawable/del_trash_btn" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonSetPermitTime"
|
||||
android:layout_width="148px"
|
||||
|
Loading…
x
Reference in New Issue
Block a user