Merge pull request 'Attn raw data upload' (#56) from dev_chapal into devqc
Reviewed-on: http://103.197.204.162:3025/CelHRTeam/EchoTex_Payroll/pulls/56
This commit is contained in:
commit
3e5a97bd8c
|
|
@ -164,13 +164,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.punchTime = temp[2].replace(/^"(.*)"$/, '$1');
|
||||
this.uploadeddata.cardNo = 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);
|
||||
|
|
@ -219,7 +219,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,14 +242,14 @@ 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 : item.cardNo,
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -2429,6 +2429,14 @@ 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