This commit is contained in:
backuppc
2025-12-05 17:33:12 +09:00
parent 8e8d1f91b4
commit 77f1ddab80
92 changed files with 4878 additions and 20435 deletions

View File

@@ -986,6 +986,171 @@ namespace Project.Web
}
break;
case "MAIL_ADD_DATA":
{
string cate = json.cate ?? "";
string subject = json.subject ?? "";
string fromlist = json.fromlist ?? "";
string tolist = json.tolist ?? "";
string cc = json.cc ?? "";
string bcc = json.bcc ?? "";
string body = json.body ?? "";
string result = _bridge.Mail_AddData(cate, subject, fromlist, tolist, cc, bcc, body);
var response = new { type = "MAIL_ADD_DATA_RESULT", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
case "MAIL_SEND_DIRECT":
{
string cate = json.cate ?? "";
string subject = json.subject ?? "";
string fromlist = json.fromlist ?? "";
string tolist = json.tolist ?? "";
string cc = json.cc ?? "";
string bcc = json.bcc ?? "";
string body = json.body ?? "";
string result = _bridge.Mail_SendDirect(cate, subject, fromlist, tolist, cc, bcc, body);
var response = new { type = "MAIL_SEND_DIRECT_RESULT", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
case "MAIL_SEND_OUTLOOK":
{
string subject = json.subject ?? "";
string tolist = json.tolist ?? "";
string cc = json.cc ?? "";
string bcc = json.bcc ?? "";
string body = json.body ?? "";
string result = _bridge.Mail_SendOutlook(subject, tolist, cc, bcc, body);
var response = new { type = "MAIL_SEND_OUTLOOK_RESULT", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
// ===== License API (라이선스 관리) =====
case "LICENSE_GET_LIST":
{
string result = _bridge.License_GetList();
var response = new { type = "LICENSE_LIST_DATA", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
case "LICENSE_ADD":
{
string name = json.name ?? "";
string version = json.version ?? "";
string meterialNo = json.meterialNo ?? "";
string supply = json.supply ?? "";
int qty = json.qty ?? 0;
string uids = json.uids ?? "";
string serialNo = json.serialNo ?? "";
string remark = json.remark ?? "";
string sdate = json.sdate ?? "";
string edate = json.edate ?? "";
string manu = json.manu ?? "";
bool expire = json.expire ?? false;
string result = _bridge.License_Add(name, version, meterialNo, supply, qty, uids, serialNo, remark, sdate, edate, manu, expire);
var response = new { type = "LICENSE_ADD_RESULT", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
case "LICENSE_UPDATE":
{
int idx = json.idx ?? 0;
string name = json.name ?? "";
string version = json.version ?? "";
string meterialNo = json.meterialNo ?? "";
string supply = json.supply ?? "";
int qty = json.qty ?? 0;
string uids = json.uids ?? "";
string serialNo = json.serialNo ?? "";
string remark = json.remark ?? "";
string sdate = json.sdate ?? "";
string edate = json.edate ?? "";
string manu = json.manu ?? "";
bool expire = json.expire ?? false;
string result = _bridge.License_Update(idx, name, version, meterialNo, supply, qty, uids, serialNo, remark, sdate, edate, manu, expire);
var response = new { type = "LICENSE_UPDATE_RESULT", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
case "LICENSE_DELETE":
{
int idx = json.idx ?? 0;
string result = _bridge.License_Delete(idx);
var response = new { type = "LICENSE_DELETE_RESULT", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
case "LICENSE_OPEN_FOLDER":
{
int idx = json.idx ?? 0;
string result = _bridge.License_OpenFolder(idx);
var response = new { type = "LICENSE_OPEN_FOLDER_RESULT", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
case "LICENSE_EXPORT_CSV":
{
string filePath = json.filePath ?? "";
string result = _bridge.License_ExportCSV(filePath);
var response = new { type = "LICENSE_EXPORT_CSV_RESULT", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
// ===== PartList API (파트리스트) =====
case "PARTLIST_GET_LIST":
{
int projectIdx = json.projectIdx ?? 0;
string result = _bridge.PartList_GetList(projectIdx);
var response = new { type = "PARTLIST_LIST_DATA", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
case "PARTLIST_SAVE":
{
int idx = json.idx ?? 0;
int projectIdx = json.projectIdx ?? 0;
string itemgroup = json.itemgroup ?? "";
string itemname = json.itemname ?? "";
string item = json.item ?? "";
string itemmodel = json.itemmodel ?? "";
string itemscale = json.itemscale ?? "";
string itemunit = json.itemunit ?? "";
double qty = json.qty ?? 0.0;
double price = json.price ?? 0.0;
string itemsupply = json.itemsupply ?? "";
int itemsupplyidx = json.itemsupplyidx ?? 0;
string itemmanu = json.itemmanu ?? "";
string itemsid = json.itemsid ?? "";
string option1 = json.option1 ?? "";
string remark = json.remark ?? "";
int no = json.no ?? 0;
double qtybuy = json.qtybuy ?? 0.0;
string result = _bridge.PartList_Save(idx, projectIdx, itemgroup, itemname, item, itemmodel, itemscale, itemunit, qty, price, itemsupply, itemsupplyidx, itemmanu, itemsid, option1, remark, no, qtybuy);
var response = new { type = "PARTLIST_SAVE_RESULT", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
case "PARTLIST_DELETE":
{
int idx = json.idx ?? 0;
string result = _bridge.PartList_Delete(idx);
var response = new { type = "PARTLIST_DELETE_RESULT", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
// ===== Customs API (업체정보) =====
case "CUSTOMS_GET_LIST":
{
@@ -1295,6 +1460,19 @@ namespace Project.Web
}
break;
case "PROJECT_SAVE_HISTORY":
{
int idx = json.idx ?? 0;
int pidx = json.pidx ?? 0;
string pdate = json.pdate ?? "";
int progress = json.progress ?? 0;
string remark = json.remark ?? "";
string result = _bridge.Project_SaveHistory(idx, pidx, pdate, progress, remark);
var response = new { type = "PROJECT_SAVE_HISTORY_RESULT", data = JsonConvert.DeserializeObject(result) };
await Send(socket, JsonConvert.SerializeObject(response));
}
break;
case "PROJECT_GET_DAILY_MEMO":
{
int projectIdx = json.projectIdx ?? 0;