근태(Holyday) API 추가 및 일별/업무형태별 집계 다이얼로그 구현, OT 시작/종료시간 필드 추가
This commit is contained in:
@@ -646,7 +646,9 @@ namespace Project.Web
|
||||
double ot = json.ot ?? 0.0;
|
||||
string jobgrp = json.jobgrp ?? "";
|
||||
string tag = json.tag ?? "";
|
||||
string result = _bridge.Jobreport_Add(pdate, projectName, pidx, requestpart, package, jobType, process, status, description, hrs, ot, jobgrp, tag);
|
||||
string otStart = json.otStart ?? "00:00";
|
||||
string otEnd = json.otEnd ?? "00:00";
|
||||
string result = _bridge.Jobreport_Add(pdate, projectName, pidx, requestpart, package, jobType, process, status, description, hrs, ot, jobgrp, tag, otStart, otEnd);
|
||||
var response = new { type = "JOBREPORT_ADDED", data = JsonConvert.DeserializeObject(result) };
|
||||
await Send(socket, JsonConvert.SerializeObject(response));
|
||||
}
|
||||
@@ -668,7 +670,9 @@ namespace Project.Web
|
||||
double ot = json.ot ?? 0.0;
|
||||
string jobgrp = json.jobgrp ?? "";
|
||||
string tag = json.tag ?? "";
|
||||
string result = _bridge.Jobreport_Edit(idx, pdate, projectName, pidx, requestpart, package, jobType, process, status, description, hrs, ot, jobgrp, tag);
|
||||
string otStart = json.otStart ?? "00:00";
|
||||
string otEnd = json.otEnd ?? "00:00";
|
||||
string result = _bridge.Jobreport_Edit(idx, pdate, projectName, pidx, requestpart, package, jobType, process, status, description, hrs, ot, jobgrp, tag, otStart, otEnd);
|
||||
var response = new { type = "JOBREPORT_EDITED", data = JsonConvert.DeserializeObject(result) };
|
||||
await Send(socket, JsonConvert.SerializeObject(response));
|
||||
}
|
||||
@@ -729,6 +733,99 @@ namespace Project.Web
|
||||
}
|
||||
break;
|
||||
|
||||
// ===== Holyday (근태) API =====
|
||||
case "HOLYDAY_GET_LIST":
|
||||
{
|
||||
string sd = json.sd ?? "";
|
||||
string ed = json.ed ?? "";
|
||||
string uid = json.uid ?? "%";
|
||||
string result = _bridge.Holyday_GetList(sd, ed, uid);
|
||||
var response = new { type = "HOLYDAY_LIST_DATA", data = JsonConvert.DeserializeObject(result) };
|
||||
await Send(socket, JsonConvert.SerializeObject(response));
|
||||
}
|
||||
break;
|
||||
|
||||
case "HOLYDAY_GET_DETAIL":
|
||||
{
|
||||
int idx = json.idx ?? 0;
|
||||
string result = _bridge.Holyday_GetDetail(idx);
|
||||
var response = new { type = "HOLYDAY_DETAIL_DATA", data = JsonConvert.DeserializeObject(result) };
|
||||
await Send(socket, JsonConvert.SerializeObject(response));
|
||||
}
|
||||
break;
|
||||
|
||||
case "HOLYDAY_ADD":
|
||||
{
|
||||
string cate = json.cate ?? "";
|
||||
string sdate = json.sdate ?? "";
|
||||
string edate = json.edate ?? "";
|
||||
double term = json.term ?? 0.0;
|
||||
double crtime = json.crtime ?? 0.0;
|
||||
double termDr = json.termDr ?? 0.0;
|
||||
double drTime = json.drTime ?? 0.0;
|
||||
string contents = json.contents ?? "";
|
||||
string uid = json.uid ?? "";
|
||||
string result = _bridge.Holyday_Add(cate, sdate, edate, term, crtime, termDr, drTime, contents, uid);
|
||||
var response = new { type = "HOLYDAY_ADDED", data = JsonConvert.DeserializeObject(result) };
|
||||
await Send(socket, JsonConvert.SerializeObject(response));
|
||||
}
|
||||
break;
|
||||
|
||||
case "HOLYDAY_EDIT":
|
||||
{
|
||||
int idx = json.idx ?? 0;
|
||||
string cate = json.cate ?? "";
|
||||
string sdate = json.sdate ?? "";
|
||||
string edate = json.edate ?? "";
|
||||
double term = json.term ?? 0.0;
|
||||
double crtime = json.crtime ?? 0.0;
|
||||
double termDr = json.termDr ?? 0.0;
|
||||
double drTime = json.drTime ?? 0.0;
|
||||
string contents = json.contents ?? "";
|
||||
string result = _bridge.Holyday_Edit(idx, cate, sdate, edate, term, crtime, termDr, drTime, contents);
|
||||
var response = new { type = "HOLYDAY_EDITED", data = JsonConvert.DeserializeObject(result) };
|
||||
await Send(socket, JsonConvert.SerializeObject(response));
|
||||
}
|
||||
break;
|
||||
|
||||
case "HOLYDAY_DELETE":
|
||||
{
|
||||
int idx = json.idx ?? 0;
|
||||
string result = _bridge.Holyday_Delete(idx);
|
||||
var response = new { type = "HOLYDAY_DELETED", data = JsonConvert.DeserializeObject(result) };
|
||||
await Send(socket, JsonConvert.SerializeObject(response));
|
||||
}
|
||||
break;
|
||||
|
||||
case "HOLYDAY_GET_USERLIST":
|
||||
{
|
||||
string sd = json.sd ?? "";
|
||||
string ed = json.ed ?? "";
|
||||
string result = _bridge.Holyday_GetUserList(sd, ed);
|
||||
var response = new { type = "HOLYDAY_USERLIST_DATA", data = JsonConvert.DeserializeObject(result) };
|
||||
await Send(socket, JsonConvert.SerializeObject(response));
|
||||
}
|
||||
break;
|
||||
|
||||
case "HOLYDAY_GET_PERMISSION":
|
||||
{
|
||||
string result = _bridge.Holyday_GetPermission();
|
||||
var response = new { type = "HOLYDAY_PERMISSION_DATA", data = JsonConvert.DeserializeObject(result) };
|
||||
await Send(socket, JsonConvert.SerializeObject(response));
|
||||
}
|
||||
break;
|
||||
|
||||
case "HOLYDAY_GET_BALANCE":
|
||||
{
|
||||
string year = json.year ?? "";
|
||||
string uid = json.uid ?? "";
|
||||
string result = _bridge.Holyday_GetBalance(year, uid);
|
||||
var response = new { type = "HOLYDAY_BALANCE_DATA", data = JsonConvert.DeserializeObject(result) };
|
||||
await Send(socket, JsonConvert.SerializeObject(response));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
// ===== Holiday API (월별근무표) =====
|
||||
case "HOLIDAY_GET_LIST":
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user