add corporate name
This commit is contained in:
@@ -71,6 +71,25 @@ func (ea *DashboardPicServices) DummyDataTest() ([]models.DashboardPic, error) {
|
||||
return employees, nil
|
||||
}
|
||||
|
||||
func (ea *DashboardPicServices) GetCorporateName(userID string) (string, error) {
|
||||
var corpName string
|
||||
|
||||
q := `
|
||||
SELECT
|
||||
c.CorporateName
|
||||
FROM mgm_mcu mm
|
||||
JOIN corporate c ON c.CorporateID = mm.Mgm_McuCorporateID
|
||||
AND CorporateIsActive = 'Y'
|
||||
WHERE mm.Mgm_McuID = ?
|
||||
AND mm.Mgm_McuIsActive = 'Y'
|
||||
`
|
||||
if err := dbx.Handlex.Get(&corpName, q, userID); err != nil {
|
||||
return "PT. ABC", err
|
||||
}
|
||||
|
||||
return corpName, nil
|
||||
}
|
||||
|
||||
func (ea *DashboardPicServices) ListingDashboardPic(search string, startdate string, enddate string, currentpage int, rowperpage int) ([]models.DashboardPic, int, error) {
|
||||
logger, _ := zap.NewProduction()
|
||||
var ret []models.DashboardPic
|
||||
|
||||
@@ -56,7 +56,7 @@ func (tdps *TabDaftarPesertaServices) GetListMcuDaftarPeserta(id string, current
|
||||
JOIN m_patient ON T_OrderHeaderM_PatientID = M_PatientID
|
||||
AND M_PatientIsActive = 'Y'
|
||||
WHERE T_OrderHeaderIsActive = 'Y' AND T_OrderHeaderMgm_McuID = ?
|
||||
ORDER BY M_PatientName ASC
|
||||
ORDER BY T_OrderHeaderLabNumber ASC
|
||||
LIMIT ? OFFSET ?`
|
||||
|
||||
if err := dbx.Handlex.Select(&listDaftarPeserta, query, id, rowperpage, offset); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user