작업 조건 분석 검색 기능 개발

This commit is contained in:
geondo55
2025-03-05 18:49:48 +09:00
parent ef58961c01
commit ea4730f7f5
6 changed files with 5626 additions and 8 deletions

View File

@@ -1,7 +1,9 @@
using CHN;
using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
using UnityEngine;
using UnityEngine.Networking;
@@ -51,6 +53,10 @@ public class HTTPTest : MonoBehaviour
{
WorkTimeInQuiry();
}
if(Input.GetKeyDown(KeyCode.O))
{
FindObjectOfType<Canvas_Popup>().panel_workconditionanalysis.Open();
}
}
IEnumerator HTTPWebRequest()
@@ -122,6 +128,26 @@ public class HTTPTest : MonoBehaviour
StopAllCoroutines();
StartCoroutine(WorkTimePost(path, json));
}
public void WorkTimeInQuiry(string startDate, string endDate, string MCHCD, string WO)
{
testWorkTimeRequest = new WorkTimeRequesttBody
{
startDate = startDate,
endDate = endDate,
MCHCD = MCHCD,
WO = WO
};
var path = httpServer + workingTimeAPI;
var json = JsonUtility.ToJson(testWorkTimeRequest);
StopAllCoroutines();
StartCoroutine(WorkTimePost(path, json));
}
IEnumerator WorkTimePost(string url, string jsonData)
{
var request = new UnityWebRequest(url, "POST");