Compare commits

..

No commits in common. "devqc" and "dev_mashfiq" have entirely different histories.

10 changed files with 54 additions and 85 deletions

View File

@ -49,8 +49,6 @@ namespace HRM.BO
public string EmployeeName { get; set; } public string EmployeeName { get; set; }
public bool IsMobileOfflineData { get; set; } public bool IsMobileOfflineData { get; set; }
public bool isManualEntry { get; set; }
#region AccessCard : AccessCard #region AccessCard : AccessCard
private AccessCard _accessCard; private AccessCard _accessCard;

View File

@ -381,7 +381,7 @@ namespace HRM.DA
try try
{ {
tc = TransactionContext.Begin(true); tc = TransactionContext.Begin(true);
// int nAttnRawDataID = tc.GenerateID("AttnRawData", "ATTNRAWDATAID"); int nAttnRawDataID = tc.GenerateID("AttnRawData", "ATTNRAWDATAID");
if (attnRawDatas != null && attnRawDatas.Count > 0) if (attnRawDatas != null && attnRawDatas.Count > 0)
{ {
foreach (AttnRawData item in attnRawDatas) foreach (AttnRawData item in attnRawDatas)
@ -394,39 +394,27 @@ namespace HRM.DA
AttnRawDataDA.Delete(tc, dMinValue, empIDs); AttnRawDataDA.Delete(tc, dMinValue, empIDs);
DataTable _dtRawData = null; DataTable _dtRawData = null;
_dtRawData = new DataTable("AttnRawData"); _dtRawData = new DataTable("AttnRawData");
// _dtRawData.Columns.Add("ATTNRAWDATAID", typeof(int)); _dtRawData.Columns.Add("ATTNRAWDATAID", typeof(int));
_dtRawData.Columns.Add("CardID", typeof(int)); _dtRawData.Columns.Add("CARDID", typeof(int));
_dtRawData.Columns.Add("EmployeeID", typeof(int)); _dtRawData.Columns.Add("EMPLOYEEID", typeof(int));
_dtRawData.Columns.Add("CardNo", typeof(string)); _dtRawData.Columns.Add("CARDNO", typeof(string));
_dtRawData.Columns.Add("PunchTime", typeof(DateTime)); _dtRawData.Columns.Add("PUNCHTIME", typeof(DateTime));
_dtRawData.Columns.Add("EntryMode", typeof(int)); _dtRawData.Columns.Add("ENTRYMODE", typeof(int));
_dtRawData.Columns.Add("DeviceIPAddress", typeof(string)); _dtRawData.Columns.Add("DEVICEIPADDRESS", typeof(string));
_dtRawData.Columns.Add("DeviceNo", typeof(string)); _dtRawData.Columns.Add("DEVICENO", typeof(string));
_dtRawData.Columns.Add("isManualEntry", typeof(bool)); _dtRawData.Columns.Add("PUNCHDATE", typeof(DateTime));
//_dtRawData.Columns.Add("PUNCHDATE", typeof(DateTime));
foreach (AttnRawData item in attnRawDatas) foreach (AttnRawData item in attnRawDatas)
{ {
//_dtRawData.Rows.Add(nAttnRawDataID++, _dtRawData.Rows.Add(nAttnRawDataID++,
// null, null,
// item.EmployeeID, item.EmployeeID,
// item.CardNo.Trim(), item.CardNo.Trim(),
// item.PunchTime, item.PunchTime,
// (int)item.EntryMode, (int)item.EntryMode,
// item.DeviceIPAddress, item.DeviceIPAddress,
// item.DeviceNo, item.DeviceNo,
// item.PunchTime); item.PunchTime);
_dtRawData.Rows.Add(
null,
item.EmployeeID,
item.CardNo.Trim(),
item.PunchTime,
(int)item.EntryMode,
item.DeviceIPAddress,
item.DeviceNo,
item.isManualEntry
);
} }
using (SqlBulkCopy bulkCopy = new SqlBulkCopy((SqlConnection)tc.Connection, using (SqlBulkCopy bulkCopy = new SqlBulkCopy((SqlConnection)tc.Connection,
@ -435,16 +423,15 @@ namespace HRM.DA
bulkCopy.BulkCopyTimeout = 600; // in seconds bulkCopy.BulkCopyTimeout = 600; // in seconds
bulkCopy.BatchSize = 5000; bulkCopy.BatchSize = 5000;
// bulkCopy.ColumnMappings.Add("ATTNRAWDATAID", "ATTNRAWDATAID"); bulkCopy.ColumnMappings.Add("ATTNRAWDATAID", "ATTNRAWDATAID");
bulkCopy.ColumnMappings.Add("CardID", "CardID"); bulkCopy.ColumnMappings.Add("CARDID", "CARDID");
bulkCopy.ColumnMappings.Add("EmployeeID", "EmployeeID"); bulkCopy.ColumnMappings.Add("EMPLOYEEID", "EMPLOYEEID");
bulkCopy.ColumnMappings.Add("CardNo", "CardNo"); bulkCopy.ColumnMappings.Add("CARDNO", "CARDNO");
bulkCopy.ColumnMappings.Add("PunchTime", "PunchTime"); bulkCopy.ColumnMappings.Add("PUNCHTIME", "PUNCHTIME");
bulkCopy.ColumnMappings.Add("EntryMode", "EntryMode"); bulkCopy.ColumnMappings.Add("ENTRYMODE", "ENTRYMODE");
bulkCopy.ColumnMappings.Add("DeviceIPAddress", "DeviceIPAddress"); bulkCopy.ColumnMappings.Add("DEVICEIPADDRESS", "DEVICEIPADDRESS");
bulkCopy.ColumnMappings.Add("DeviceNo", "DeviceNo"); bulkCopy.ColumnMappings.Add("DEVICENO", "DEVICENO");
bulkCopy.ColumnMappings.Add("isManualEntry", "isManualEntry"); bulkCopy.ColumnMappings.Add("PUNCHDATE", "PUNCHDATE");
// bulkCopy.ColumnMappings.Add("PUNCHDATE", "PUNCHDATE");
bulkCopy.DestinationTableName = "AttnRawData"; bulkCopy.DestinationTableName = "AttnRawData";
bulkCopy.WriteToServer(_dtRawData); bulkCopy.WriteToServer(_dtRawData);

View File

@ -1 +1 @@
{"version":3,"file":"attnRawData.js","sourceRoot":"","sources":["attnRawData.ts"],"names":[],"mappings":";;;AAIA;IAAA;IAgBA,CAAC;IAAD,kBAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,kCAAW"} {"version":3,"file":"attnRawData.js","sourceRoot":"","sources":["attnRawData.ts"],"names":[],"mappings":";;;AAIA;IAAA;IAeA,CAAC;IAAD,kBAAC;AAAD,CAAC,AAfD,IAeC;AAfY,kCAAW"}

View File

@ -15,7 +15,6 @@ export class AttnRawData
deviceIPAddress: string; deviceIPAddress: string;
deviceNo: string; deviceNo: string;
employeeName: string; employeeName: string;
isManualEntry: boolean;
// accessCard: AccessCard[] = []; // accessCard: AccessCard[] = [];
} }

View File

@ -14,7 +14,7 @@ export class ApiService {
public isSSO = false; public isSSO = false;
public versionDeployement = false; public versionDeployement = false;
// public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 1, 25))}-`+"01"; // public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 1, 25))}-`+"01";
public versionNumber = `V-20260514-`+"01"; public versionNumber = `V-20251008-`+"01";
public static BASE_URL = ''; public static BASE_URL = '';
public base_url = ''; public base_url = '';
// public currentLink = ''; // public currentLink = '';

View File

@ -37,7 +37,7 @@ export class ReadAttendanceRawdataComponent {
public employees: Employee[] = []; public employees: Employee[] = [];
selectedCard: any; selectedCard: any;
entryModes: any = EnumExtension.getNamesAndValues(EnumEntryMode); entryModes: any = EnumExtension.getNamesAndValues(EnumEntryMode);
format: string = ".csv (Column Names: EmpNo,PunchTime,CardNo)"; // (Date Time Format: MM/dd/yyyy h:mm) format: string = ".csv (Column Names: EmpNo,PunchTime)"; // (Date Time Format: MM/dd/yyyy h:mm)
public gridView: GridDataResult; public gridView: GridDataResult;
public gridView2: GridDataResult; public gridView2: GridDataResult;
public mandatoryItems: mandatoryData[] = []; public mandatoryItems: mandatoryData[] = [];
@ -67,22 +67,7 @@ export class ReadAttendanceRawdataComponent {
public _attendanceServices: AttendanceServices, public _attendanceServices: AttendanceServices,
public loadingService: loadingPanelService public loadingService: loadingPanelService
) { ) {
debugger;
this._apiService.selectedMenuName = "Read Raw Data"; this._apiService.selectedMenuName = "Read Raw Data";
//this.readAttendanceRawdataService = readAttendanceRawdataServiceFactory();
}
public ngOnInit(): void {
this.rawDataForm = new FormGroup({
type: new FormControl(),
attachment: new FormControl(),
fromDate: new FormControl(),
toDate: new FormControl()
});
this.loadingService.ShowLoadingPanel = true; this.loadingService.ShowLoadingPanel = true;
this._empService.getAllEmployees().subscribe( this._empService.getAllEmployees().subscribe(
(resp: any) => { (resp: any) => {
@ -97,6 +82,18 @@ export class ReadAttendanceRawdataComponent {
} }
); );
//this.readAttendanceRawdataService = readAttendanceRawdataServiceFactory();
}
public ngOnInit(): void {
this.rawDataForm = new FormGroup({
type: new FormControl(),
attachment: new FormControl(),
fromDate: new FormControl(),
toDate: new FormControl()
});
//this.cardFoundForm = new FormGroup({ //this.cardFoundForm = new FormGroup({
// card: new FormControl(), // card: new FormControl(),
// FoundDate: new FormControl(), // FoundDate: new FormControl(),
@ -117,7 +114,6 @@ export class ReadAttendanceRawdataComponent {
} }
fileUpload(event) { fileUpload(event) {
debugger;
this.loadingService.ShowLoadingPanel = true; this.loadingService.ShowLoadingPanel = true;
this.file = undefined; this.file = undefined;
this.attnRawDatas = []; this.attnRawDatas = [];
@ -134,7 +130,7 @@ export class ReadAttendanceRawdataComponent {
} }
performReading(reader: any) { performReading(reader: any) {
debugger;
var text = undefined; var text = undefined;
//this.attnRawDatas = []; //this.attnRawDatas = [];
//this.mandatoryItems = []; //this.mandatoryItems = [];
@ -164,13 +160,13 @@ export class ReadAttendanceRawdataComponent {
this.uploadeddata.rowNo = i.toString(); this.uploadeddata.rowNo = i.toString();
this.uploadeddata.employeeNo = temp[0].replace(/^"(.*)"$/, '$1'); this.uploadeddata.employeeNo = temp[0].replace(/^"(.*)"$/, '$1');
this.uploadeddata.punchTime = temp[1].replace(/^"(.*)"$/, '$1'); this.uploadeddata.punchTime = temp[1].replace(/^"(.*)"$/, '$1');
this.uploadeddata.cardNo = temp[2].replace(/^"(.*)"$/, '$1'); //this.uploadeddata.punchTime = temp[2].replace(/^"(.*)"$/, '$1');
//this.uploadeddata.deviceNo = temp[3].replace(/^"(.*)"$/, '$1'); //this.uploadeddata.deviceNo = temp[3].replace(/^"(.*)"$/, '$1');
//this.uploadeddata.deviceIPAddress = temp[4].replace(/^"(.*)"$/, '$1'); //this.uploadeddata.deviceIPAddress = temp[4].replace(/^"(.*)"$/, '$1');
//this.uploadeddata.entryMode = temp[5].replace(/^"(.*)"$/, '$1'); //this.uploadeddata.entryMode = temp[5].replace(/^"(.*)"$/, '$1');
this.uploadeddata.employeeNo = this.uploadeddata.employeeNo.replace(/\s/g, ''); this.uploadeddata.employeeNo = this.uploadeddata.employeeNo.replace(/\s/g, '');
this.uploadeddata.cardNo = this.uploadeddata.cardNo.replace(/\s/g, ''); //this.uploadeddata.cardNo = this.uploadeddata.cardNo.replace(/\s/g, '');
//this.uploadeddata.entryMode = this.uploadeddata.entryMode.replace(/\s/g, ''); //this.uploadeddata.entryMode = this.uploadeddata.entryMode.replace(/\s/g, '');
////console.log(this.uploadeddata.EmpID); ////console.log(this.uploadeddata.EmpID);
this.uploadeddatas.push(this.uploadeddata); this.uploadeddatas.push(this.uploadeddata);
@ -192,8 +188,6 @@ export class ReadAttendanceRawdataComponent {
} }
fileUploadChange(event) { fileUploadChange(event) {
debugger;
this.loadingService.ShowLoadingPanel = true; this.loadingService.ShowLoadingPanel = true;
this.file = undefined; this.file = undefined;
this.attnRawDatas = []; this.attnRawDatas = [];
@ -219,7 +213,7 @@ export class ReadAttendanceRawdataComponent {
this._notificationService.showError("Employee No not Found"); this._notificationService.showError("Employee No not Found");
return; return;
} }
debugger;
if (this.mandatoryItems.length <= 0) { if (this.mandatoryItems.length <= 0) {
this.attnRawDatas = []; this.attnRawDatas = [];
this.uploadeddatas.forEach(x => { this.uploadeddatas.forEach(x => {
@ -242,17 +236,16 @@ export class ReadAttendanceRawdataComponent {
//item.punchTime = fromdt; //item.punchTime = fromdt;
////// working if the format is dd/mm/yyyy hh:mm:ss ////// working if the format is dd/mm/yyyy hh:mm:ss
debugger;
item.punchTime = new Date; // otherwise error item.punchTime = new Date; // otherwise error
item.punchTimeDateString = x.punchTime; item.punchTimeDateString = x.punchTime;
//console.log(item.punchTime); //console.log(item.punchTime);
item.employeeID = this.employees.find(e => e.employeeNo.trim().toLowerCase() == x.employeeNo.trim().toLowerCase()) == undefined ? 0 : this.employees.find(e => e.employeeNo.trim().toLowerCase() == x.employeeNo.trim().toLowerCase()).id; item.employeeID = this.employees.find(e => e.employeeNo.trim().toLowerCase() == x.employeeNo.trim().toLowerCase()) == undefined ? 0 : this.employees.find(e => e.employeeNo.trim().toLowerCase() == x.employeeNo.trim().toLowerCase()).id;
item.employeeNo = x.employeeNo, item.employeeNo = x.employeeNo,
item.entryMode = (x.entryMode == undefined || x.entryMode.length <= 0) ? 0 : this.entryModes.find(e => e.name.trim().toLowerCase() == x.entryMode.trim().toLowerCase()).value, item.entryMode = (x.entryMode == undefined || x.entryMode.length <= 0) ? 0 : this.entryModes.find(e => e.name.trim().toLowerCase() == x.entryMode.trim().toLowerCase()).value,
item.cardNo = (x.cardNo == undefined || x.cardNo == "" || x.cardNo == null) ? item.employeeNo : x.cardNo, item.cardNo = (x.cardNo !== undefined || x.cardNo !== "" || x.cardNo !== null) ? item.employeeNo : item.cardNo,
item.deviceNo = (x.deviceNo !== undefined || x.deviceNo !== "" || x.deviceNo !== null) ? "" : item.deviceNo, item.deviceNo = (x.deviceNo !== undefined || x.deviceNo !== "" || x.deviceNo !== null) ? null : item.deviceNo,
item.deviceIPAddress = (x.deviceIPAddress !== undefined || x.deviceIPAddress !== "" || x.deviceIPAddress !== null) ? "" : item.deviceIPAddress item.deviceIPAddress = (x.deviceIPAddress !== undefined || x.deviceIPAddress !== "" || x.deviceIPAddress !== null) ? null : item.deviceIPAddress
item.isManualEntry = true;
this.attnRawDatas.push(item); this.attnRawDatas.push(item);
}); });
//console.log(this.attnRawDatas); //console.log(this.attnRawDatas);

View File

@ -378,7 +378,6 @@ var DynamicPicker = /** @class */ (function () {
this.selectedIDs = []; this.selectedIDs = [];
this.selecteditemText = ''; this.selecteditemText = '';
this.multiSelect = Multiselect; this.multiSelect = Multiselect;
this.checkChildren = this.multiSelect ? true : false;
this.pickerType = PickerType; this.pickerType = PickerType;
this.payrollTypeID = undefined; this.payrollTypeID = undefined;
new DynamicPickerTypeDefination(PickerType, this, Multiselect); new DynamicPickerTypeDefination(PickerType, this, Multiselect);

File diff suppressed because one or more lines are too long

View File

@ -230,6 +230,7 @@ export class EmployeePickerComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.checkLive = true; this.checkLive = true;
this.loadingService.ShowLoadingPanel = false;
this.setSelectableSettings(); this.setSelectableSettings();
this.valueChangedSubscription == this.pickerService.dataChanged.subscribe( this.valueChangedSubscription == this.pickerService.dataChanged.subscribe(
x => { x => {

View File

@ -2429,14 +2429,6 @@ namespace HRM.UI.Controllers.Attendance
{ {
//List<AttnRawData> items = new List<AttnRawData>(); //List<AttnRawData> items = new List<AttnRawData>();
//items = JsonConvert.DeserializeObject<List<AttnRawData>>(data.dataList.ToString()); //items = JsonConvert.DeserializeObject<List<AttnRawData>>(data.dataList.ToString());
//DataTable accessCards = new AccessCardService().getCardInformation((int)EnumCardStatus.Attached);
foreach (AttnRawData item in items)
{
if (item.CardID == 0)
{
}
}
_attnRawDataService.SaveAuto(items); _attnRawDataService.SaveAuto(items);
} }
catch (Exception e) catch (Exception e)