Compare commits
No commits in common. "devqc" and "dev_mashfiq" have entirely different histories.
devqc
...
dev_mashfi
|
|
@ -49,8 +49,6 @@ namespace HRM.BO
|
|||
|
||||
public string EmployeeName { get; set; }
|
||||
public bool IsMobileOfflineData { get; set; }
|
||||
public bool isManualEntry { get; set; }
|
||||
|
||||
#region AccessCard : AccessCard
|
||||
|
||||
private AccessCard _accessCard;
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ namespace HRM.DA
|
|||
try
|
||||
{
|
||||
tc = TransactionContext.Begin(true);
|
||||
// int nAttnRawDataID = tc.GenerateID("AttnRawData", "ATTNRAWDATAID");
|
||||
int nAttnRawDataID = tc.GenerateID("AttnRawData", "ATTNRAWDATAID");
|
||||
if (attnRawDatas != null && attnRawDatas.Count > 0)
|
||||
{
|
||||
foreach (AttnRawData item in attnRawDatas)
|
||||
|
|
@ -394,39 +394,27 @@ namespace HRM.DA
|
|||
AttnRawDataDA.Delete(tc, dMinValue, empIDs);
|
||||
DataTable _dtRawData = null;
|
||||
_dtRawData = new DataTable("AttnRawData");
|
||||
// _dtRawData.Columns.Add("ATTNRAWDATAID", typeof(int));
|
||||
_dtRawData.Columns.Add("CardID", typeof(int));
|
||||
_dtRawData.Columns.Add("EmployeeID", typeof(int));
|
||||
_dtRawData.Columns.Add("CardNo", typeof(string));
|
||||
_dtRawData.Columns.Add("PunchTime", typeof(DateTime));
|
||||
_dtRawData.Columns.Add("EntryMode", typeof(int));
|
||||
_dtRawData.Columns.Add("DeviceIPAddress", typeof(string));
|
||||
_dtRawData.Columns.Add("DeviceNo", typeof(string));
|
||||
_dtRawData.Columns.Add("isManualEntry", typeof(bool));
|
||||
|
||||
//_dtRawData.Columns.Add("PUNCHDATE", typeof(DateTime));
|
||||
_dtRawData.Columns.Add("ATTNRAWDATAID", typeof(int));
|
||||
_dtRawData.Columns.Add("CARDID", typeof(int));
|
||||
_dtRawData.Columns.Add("EMPLOYEEID", typeof(int));
|
||||
_dtRawData.Columns.Add("CARDNO", typeof(string));
|
||||
_dtRawData.Columns.Add("PUNCHTIME", typeof(DateTime));
|
||||
_dtRawData.Columns.Add("ENTRYMODE", typeof(int));
|
||||
_dtRawData.Columns.Add("DEVICEIPADDRESS", typeof(string));
|
||||
_dtRawData.Columns.Add("DEVICENO", typeof(string));
|
||||
_dtRawData.Columns.Add("PUNCHDATE", typeof(DateTime));
|
||||
|
||||
foreach (AttnRawData item in attnRawDatas)
|
||||
{
|
||||
//_dtRawData.Rows.Add(nAttnRawDataID++,
|
||||
// null,
|
||||
// item.EmployeeID,
|
||||
// item.CardNo.Trim(),
|
||||
// item.PunchTime,
|
||||
// (int)item.EntryMode,
|
||||
// item.DeviceIPAddress,
|
||||
// item.DeviceNo,
|
||||
// item.PunchTime);
|
||||
_dtRawData.Rows.Add(
|
||||
null,
|
||||
item.EmployeeID,
|
||||
item.CardNo.Trim(),
|
||||
item.PunchTime,
|
||||
(int)item.EntryMode,
|
||||
item.DeviceIPAddress,
|
||||
item.DeviceNo,
|
||||
item.isManualEntry
|
||||
);
|
||||
_dtRawData.Rows.Add(nAttnRawDataID++,
|
||||
null,
|
||||
item.EmployeeID,
|
||||
item.CardNo.Trim(),
|
||||
item.PunchTime,
|
||||
(int)item.EntryMode,
|
||||
item.DeviceIPAddress,
|
||||
item.DeviceNo,
|
||||
item.PunchTime);
|
||||
}
|
||||
|
||||
using (SqlBulkCopy bulkCopy = new SqlBulkCopy((SqlConnection)tc.Connection,
|
||||
|
|
@ -435,16 +423,15 @@ namespace HRM.DA
|
|||
bulkCopy.BulkCopyTimeout = 600; // in seconds
|
||||
bulkCopy.BatchSize = 5000;
|
||||
|
||||
// bulkCopy.ColumnMappings.Add("ATTNRAWDATAID", "ATTNRAWDATAID");
|
||||
bulkCopy.ColumnMappings.Add("CardID", "CardID");
|
||||
bulkCopy.ColumnMappings.Add("EmployeeID", "EmployeeID");
|
||||
bulkCopy.ColumnMappings.Add("CardNo", "CardNo");
|
||||
bulkCopy.ColumnMappings.Add("PunchTime", "PunchTime");
|
||||
bulkCopy.ColumnMappings.Add("EntryMode", "EntryMode");
|
||||
bulkCopy.ColumnMappings.Add("DeviceIPAddress", "DeviceIPAddress");
|
||||
bulkCopy.ColumnMappings.Add("DeviceNo", "DeviceNo");
|
||||
bulkCopy.ColumnMappings.Add("isManualEntry", "isManualEntry");
|
||||
// bulkCopy.ColumnMappings.Add("PUNCHDATE", "PUNCHDATE");
|
||||
bulkCopy.ColumnMappings.Add("ATTNRAWDATAID", "ATTNRAWDATAID");
|
||||
bulkCopy.ColumnMappings.Add("CARDID", "CARDID");
|
||||
bulkCopy.ColumnMappings.Add("EMPLOYEEID", "EMPLOYEEID");
|
||||
bulkCopy.ColumnMappings.Add("CARDNO", "CARDNO");
|
||||
bulkCopy.ColumnMappings.Add("PUNCHTIME", "PUNCHTIME");
|
||||
bulkCopy.ColumnMappings.Add("ENTRYMODE", "ENTRYMODE");
|
||||
bulkCopy.ColumnMappings.Add("DEVICEIPADDRESS", "DEVICEIPADDRESS");
|
||||
bulkCopy.ColumnMappings.Add("DEVICENO", "DEVICENO");
|
||||
bulkCopy.ColumnMappings.Add("PUNCHDATE", "PUNCHDATE");
|
||||
|
||||
bulkCopy.DestinationTableName = "AttnRawData";
|
||||
bulkCopy.WriteToServer(_dtRawData);
|
||||
|
|
|
|||
|
|
@ -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"}
|
||||
|
|
@ -15,7 +15,6 @@ export class AttnRawData
|
|||
deviceIPAddress: string;
|
||||
deviceNo: string;
|
||||
employeeName: string;
|
||||
isManualEntry: boolean;
|
||||
// accessCard: AccessCard[] = [];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export class ApiService {
|
|||
public isSSO = false;
|
||||
public versionDeployement = false;
|
||||
// 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 base_url = '';
|
||||
// public currentLink = '';
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export class ReadAttendanceRawdataComponent {
|
|||
public employees: Employee[] = [];
|
||||
selectedCard: any;
|
||||
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 gridView2: GridDataResult;
|
||||
public mandatoryItems: mandatoryData[] = [];
|
||||
|
|
@ -61,28 +61,13 @@ export class ReadAttendanceRawdataComponent {
|
|||
//constructor(@Inject(ReadAttendanceRawdataService) readAttendanceRawdataServiceFactory: any) {
|
||||
// this.readAttendanceRawdataService = readAttendanceRawdataServiceFactory();
|
||||
//}
|
||||
constructor(public _apiService: ApiService,
|
||||
constructor(public _apiService: ApiService,
|
||||
public _notificationService: HRMNotificationService,
|
||||
public _empService: EmployeeServices,
|
||||
public _attendanceServices: AttendanceServices,
|
||||
public loadingService: loadingPanelService
|
||||
) {
|
||||
debugger;
|
||||
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._empService.getAllEmployees().subscribe(
|
||||
(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({
|
||||
// card: new FormControl(),
|
||||
// FoundDate: new FormControl(),
|
||||
|
|
@ -117,7 +114,6 @@ export class ReadAttendanceRawdataComponent {
|
|||
}
|
||||
|
||||
fileUpload(event) {
|
||||
debugger;
|
||||
this.loadingService.ShowLoadingPanel = true;
|
||||
this.file = undefined;
|
||||
this.attnRawDatas = [];
|
||||
|
|
@ -134,7 +130,7 @@ export class ReadAttendanceRawdataComponent {
|
|||
}
|
||||
|
||||
performReading(reader: any) {
|
||||
debugger;
|
||||
|
||||
var text = undefined;
|
||||
//this.attnRawDatas = [];
|
||||
//this.mandatoryItems = [];
|
||||
|
|
@ -164,13 +160,13 @@ export class ReadAttendanceRawdataComponent {
|
|||
this.uploadeddata.rowNo = i.toString();
|
||||
this.uploadeddata.employeeNo = temp[0].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.deviceIPAddress = temp[4].replace(/^"(.*)"$/, '$1');
|
||||
//this.uploadeddata.entryMode = temp[5].replace(/^"(.*)"$/, '$1');
|
||||
|
||||
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, '');
|
||||
////console.log(this.uploadeddata.EmpID);
|
||||
this.uploadeddatas.push(this.uploadeddata);
|
||||
|
|
@ -192,8 +188,6 @@ export class ReadAttendanceRawdataComponent {
|
|||
}
|
||||
|
||||
fileUploadChange(event) {
|
||||
debugger;
|
||||
|
||||
this.loadingService.ShowLoadingPanel = true;
|
||||
this.file = undefined;
|
||||
this.attnRawDatas = [];
|
||||
|
|
@ -219,7 +213,7 @@ export class ReadAttendanceRawdataComponent {
|
|||
this._notificationService.showError("Employee No not Found");
|
||||
return;
|
||||
}
|
||||
debugger;
|
||||
|
||||
if (this.mandatoryItems.length <= 0) {
|
||||
this.attnRawDatas = [];
|
||||
this.uploadeddatas.forEach(x => {
|
||||
|
|
@ -242,17 +236,16 @@ export class ReadAttendanceRawdataComponent {
|
|||
//item.punchTime = fromdt;
|
||||
////// working if the format is dd/mm/yyyy hh:mm:ss
|
||||
|
||||
debugger;
|
||||
|
||||
item.punchTime = new Date; // otherwise error
|
||||
item.punchTimeDateString = x.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.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.cardNo = (x.cardNo == undefined || x.cardNo == "" || x.cardNo == null) ? item.employeeNo : x.cardNo,
|
||||
item.deviceNo = (x.deviceNo !== undefined || x.deviceNo !== "" || x.deviceNo !== null) ? "" : item.deviceNo,
|
||||
item.deviceIPAddress = (x.deviceIPAddress !== undefined || x.deviceIPAddress !== "" || x.deviceIPAddress !== null) ? "" : item.deviceIPAddress
|
||||
item.isManualEntry = true;
|
||||
item.cardNo = (x.cardNo !== undefined || x.cardNo !== "" || x.cardNo !== null) ? item.employeeNo : item.cardNo,
|
||||
item.deviceNo = (x.deviceNo !== undefined || x.deviceNo !== "" || x.deviceNo !== null) ? null : item.deviceNo,
|
||||
item.deviceIPAddress = (x.deviceIPAddress !== undefined || x.deviceIPAddress !== "" || x.deviceIPAddress !== null) ? null : item.deviceIPAddress
|
||||
this.attnRawDatas.push(item);
|
||||
});
|
||||
//console.log(this.attnRawDatas);
|
||||
|
|
|
|||
|
|
@ -378,7 +378,6 @@ var DynamicPicker = /** @class */ (function () {
|
|||
this.selectedIDs = [];
|
||||
this.selecteditemText = '';
|
||||
this.multiSelect = Multiselect;
|
||||
this.checkChildren = this.multiSelect ? true : false;
|
||||
this.pickerType = PickerType;
|
||||
this.payrollTypeID = undefined;
|
||||
new DynamicPickerTypeDefination(PickerType, this, Multiselect);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -230,6 +230,7 @@ export class EmployeePickerComponent implements OnInit {
|
|||
|
||||
ngOnInit() {
|
||||
this.checkLive = true;
|
||||
this.loadingService.ShowLoadingPanel = false;
|
||||
this.setSelectableSettings();
|
||||
this.valueChangedSubscription == this.pickerService.dataChanged.subscribe(
|
||||
x => {
|
||||
|
|
|
|||
|
|
@ -2429,14 +2429,6 @@ namespace HRM.UI.Controllers.Attendance
|
|||
{
|
||||
//List<AttnRawData> items = new List<AttnRawData>();
|
||||
//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);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user