Bug #2873
[ESS-AttendanceMobile] perbaikan pada jarak yang tidak sesuai dengan jarak kantor
Description
dear tim developer mohon support nya untuk perbaikan pada ess attendance di mobile IOS dimana pada saat absen untuk jarak nya tidak sesuai dan meleset jauh dari jarak kantor. sedangkan versi android tidak ada masalah dan jarak nya sesuai.
activation code BBG
Files
Updated by Kezia Pawitra Yulianti 5 months ago
- Status changed from New to Assigned
- Priority changed from Normal to Urgent
Updated by shofwan shiddiq 5 months ago
- Status changed from Assigned to QA Test
- Assignee changed from shofwan shiddiq to Muhammad Bintar
Dear Mas Bintar, sudah di perbaiki yah, tolong di UPDATE SP nya GETDISTANCE dengan ini
ALTER PROCEDURE [dbo].[GETDISTANCE]
(
@locStarLat FLOAT,
@locStartLong FLOAT,
@Employee varchar (max)
)
AS
--DECLARE @locStarLat FLOAT = -6.3147526
--DECLARE @locStartLong FLOAT = 106.6450365
--DECLARE @MetersPerMile FLOAT = 1000
--DECLARE @Employee varchar (max)='00000952'
declare @empoffice VARCHAR
DECLARE @now VARCHAR
DECLARE @distance FLOAT;
DECLARE @distDiff FLOAT;
DECLARE @unit VARCHAR;
SELECT
@distDiff = Value1,
@unit = Value2
FROM
dbo.PCMEPGENPARAM
WHERE
Parameter = 'WFATTDISTANCE';
SET @now = dbo.fn_formatdatetime(GETDATE, 'yyyymmdd')
set @empoffice =(select top (1) EmployeeOffice from PHRPA0002 pa2 where EmployeeID= @Employee and pa2.StartDate <= @now
AND pa2.EndDate >= @now )
SELECT
TOP @distance = tbl1.JarakKM
FROM
(
SELECT
EmployeeOffice,
EmployeeOfficeDesc,
LintangSelatan,
LintangUtara,
ROUND(
(
6371 * ACOS(
COS) * COS) * COS - RADIANS)
+ SIN) * SIN)
)
),
2
) AS JarakKM,
''WarningType
FROM
dbo.PCMEPEMPOFF
) AS tbl1
WHERE
tbl1.JarakKM IS NOT NULL and EmployeeOffice = @empoffice
ORDER BY
tbl1.JarakKM ASC
--select @unit
IF BEGIN
SET
@distance = @distance * 1000;
END;
SELECT
EmployeeOffice,
EmployeeOfficeDesc,
LintangSelatan,
LintangUtara,
@distDiff/1000 AS JarakKM,
@distDiff AS JarakM,
--ROUND(
-- (
-- 6371 * ACOS(
-- COS) * COS) * COS - RADIANS)
-- + SIN) * SIN)
-- )
-- ),
-- 0
-- ) AS JarakOfficeM,
ROUND(6371000.0 * 2 * ATN2(
SQRT(
SIN / 2) * SIN / 2) +
COS) * COS) *
SIN / 2) * SIN / 2)
),
SQRT(
1 - (
SIN / 2) * SIN / 2) +
COS) * COS) *
SIN / 2) * SIN / 2)
)
)
),0) AS JarakOfficeM,
''WarningType,
'' WarningId,
'2000;4000' AS AnywhereAttendance
FROM
dbo.PCMEPEMPOFF
where EmployeeOffice = @empoffice
Updated by Muhammad Bintar 5 months ago
- Status changed from QA Test to Closed
- Assignee changed from Muhammad Bintar to shofwan shiddiq
sudah di deploy ke cient BBG