Bug #650
[HR-TIME DATA]Generate Personal Work Schedule tidak dapat mengenerate massal. Jika lebih besar maka akan loading terus menerus
0%
Description
Dear Tim Developer mohon supportnya untuk perbaikan pada Generate Personal Workschedule dimana pada saat melakukan generate personal work schedule
tidak keluar data nya dan ada loading terus menerus tanpa henti.
Rohto Development
remote.minovais.com:31119
database sql server 2012
Files
Updated by Muhammad Bintar about 3 years ago
- File CtrlGeneratePersonalWS.js CtrlGeneratePersonalWS.js added
- Status changed from New to Developing
Update:
=========
Perbaikan query pada CtrlGeneratePersonalWS.js di folder UI\app\controller\masterdata\tm\
MinovaUtil.ExecuteParamQuery({
ID: "TM_DeletePWS",
EmployeeIDFrom: EmpStart.getValue(),
EmployeeIDTo: EmpEnd.getValue(),
Year: Year.getValue(),
StartDate: StartDate.getValue(),
EndDate: EndDate.getValue(),
Type: Type,
}, function (s) {
var result = Ext.decode(s.responseText);
var dt = Ext.decode(Ext.decode(result.data));
if (Type == '1') {
Ext.Ajax.request({
method: 'POST',
url: '/TM/GeneratePersonalWS',
params: {
EmployeeIDFrom: EmpStart.getValue(),
EmployeeIDTo: EmpEnd.getValue(),
Year: Year.getValue(),
menuid: "TM07"
},
waitMsg: 'Saving Data...',
success: function (response) {
var result = Ext.decode(response.responseText);
var storeMedClaim = Ext.StoreMgr.lookup("storegeneratePersonalWS");
storeMedClaim.loadData(Ext.decode(result.data));
if (result.success) {
MinovaMessage('', '000006', '', 'S');
form.unmask();
} else {
form.unmask();
MinovaMessage('', '000005', result.message.text, "E")
}
},
failure: function (response) {
var result = Ext.decode(response.responseText);
form.unmask();
MinovaMessage('', '000005', result.message.text, "E")
}
});
} else {
Ext.Ajax.request({
method: 'POST',
url: '/TM/GeneratePersonalWSPeriod',
params: {
EmployeeIDFrom: EmpStart.getValue(),
EmployeeIDTo: EmpEnd.getValue(),
StartDate: StartDate.getValue(),
EndDate: EndDate.getValue(),
menuid: "TM07"
},
waitMsg: 'Saving Data...',
success: function (response) {
var result = Ext.decode(response.responseText);
var storeMedClaim = Ext.StoreMgr.lookup("storegeneratePersonalWS");
storeMedClaim.loadData(Ext.decode(result.data));
if (result.success) {
MinovaMessage('', '000006', '', 'S');
form.unmask();
} else {
form.unmask();
MinovaMessage('', '000005', result.message.text, "E")
}
},
failure: function (response) {
var result = Ext.decode(response.responseText);
form.unmask();
MinovaMessage('', '000005', result.message.text, "E")
}
});
}
}, function (f) {
var result = Ext.decode(response.responseText);
form.unmask();
MinovaMessage('', '000005', result.message.text, "E")
});
}
},
======================================================
Penambahan CUSTPARAM dengan nama TM_DeletePWS
/*DECLARE @StartDate VARCHAR='20211201'
DECLARE @EndDate VARCHAR='20211231'
DECLARE @EmployeeIDFrom VARCHAR='00000001'
DECLARE @EmployeeIDTo VARCHAR='00000002'
DECLARE @Year VARCHAR='2021'
DECLARE @Type VARCHAR='2'*/
IF (@Type = 1)
BEGIN
DELETE FROM PHRPA0125 WHERE EmployeeID BETWEEN @EmployeeIDFrom AND @EmployeeIDTo AND (LEFT = @Year)
END
ELSE
BEGIN
DELETE FROM PHRPA0125 WHERE (EmployeeID BETWEEN @EmployeeIDFrom AND @EmployeeIDTo) AND (StartDate BETWEEN @StartDate AND @EndDate)
END
================================
Jadi konsep nya adalah saat execute generate personal workschedule, aplikasi akan menghapus data pada PHRPA0125 dulu lalu menginsert ulang data nya berdasarkan filter yang telah di pilih pada menu Generate Personal Work Schedule.