작업 조건 분석 검색 기능 개발
This commit is contained in:
5546
Assets/Prefabs/UI/PGD/Panel_WorkConditionAnalysis.prefab
Normal file
5546
Assets/Prefabs/UI/PGD/Panel_WorkConditionAnalysis.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3393321349d594e41b256a50faa5ec53
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -106,10 +106,10 @@ public class UI_Calendar : UIBase
|
|||||||
}
|
}
|
||||||
else // ÀÌÀü ´Þ
|
else // ÀÌÀü ´Þ
|
||||||
{
|
{
|
||||||
DateTime dayInLastMonth = new DateTime(lastMonth.Year, lastMonth.Month, lastMonthDaysCount - (weekIndex - i - 1));
|
DateTime LastMonthDate = new DateTime(lastMonth.Year, lastMonth.Month, lastMonthDaysCount - (weekIndex - i - 1));
|
||||||
calendarItemList[i].SetDate(dayInLastMonth, Color.gray);
|
calendarItemList[i].SetDate(LastMonthDate, Color.gray);
|
||||||
|
|
||||||
if (today == dayInLastMonth)
|
if (today == LastMonthDate)
|
||||||
{
|
{
|
||||||
calendarItemList[i].ShowTodayUI();
|
calendarItemList[i].ShowTodayUI();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,11 +17,6 @@ public class UI_CalendarItem : UIBase, IPointerEnterHandler, IPointerExitHandler
|
|||||||
public Image TodayUI;
|
public Image TodayUI;
|
||||||
public TextMeshProUGUI Text_Day;
|
public TextMeshProUGUI Text_Day;
|
||||||
|
|
||||||
public void OnDisable()
|
|
||||||
{
|
|
||||||
Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Init()
|
private void Init()
|
||||||
{
|
{
|
||||||
HoverUI.gameObject.SetActive(false);
|
HoverUI.gameObject.SetActive(false);
|
||||||
@@ -41,6 +36,7 @@ public class UI_CalendarItem : UIBase, IPointerEnterHandler, IPointerExitHandler
|
|||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
SetActive(false);
|
SetActive(false);
|
||||||
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowSelectUI()
|
public void ShowSelectUI()
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ using WI;
|
|||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using System;
|
using System;
|
||||||
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Menu;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
namespace CHN
|
namespace CHN
|
||||||
{
|
{
|
||||||
@@ -21,12 +23,15 @@ namespace CHN
|
|||||||
|
|
||||||
private UI_Calendar ui_Calendar;
|
private UI_Calendar ui_Calendar;
|
||||||
|
|
||||||
|
HTTPTest hTTPTest;
|
||||||
|
|
||||||
public override void AfterAwake()
|
public override void AfterAwake()
|
||||||
{
|
{
|
||||||
ui_Calendar = transform.GetComponentInChildren<UI_Calendar>();
|
ui_Calendar = transform.GetComponentInChildren<UI_Calendar>();
|
||||||
Button_Close.onClick.AddListener(() => SetActive(false));
|
Button_Close.onClick.AddListener(() => SetActive(false));
|
||||||
Button_StartDay.onClick.AddListener(OnClickStartDayBtn);
|
Button_StartDay.onClick.AddListener(OnClickStartDayBtn);
|
||||||
Button_EndDay.onClick.AddListener(OnClickEndDayBtn);
|
Button_EndDay.onClick.AddListener(OnClickEndDayBtn);
|
||||||
|
Button_Search.onClick.AddListener(OnClickSearchBtn);
|
||||||
|
|
||||||
ui_Calendar.Close();
|
ui_Calendar.Close();
|
||||||
|
|
||||||
@@ -36,6 +41,30 @@ namespace CHN
|
|||||||
SetActive(false);
|
SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SetFacilityDropDown()
|
||||||
|
{
|
||||||
|
hTTPTest = FindObjectOfType<HTTPTest>();
|
||||||
|
|
||||||
|
if (hTTPTest == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Dropdown_Facility.ClearOptions();
|
||||||
|
|
||||||
|
string[] data = hTTPTest.workConditionFacilityData.data;
|
||||||
|
|
||||||
|
List<TMP_Dropdown.OptionData> optionList = new List<TMP_Dropdown.OptionData>();
|
||||||
|
|
||||||
|
foreach (string str in data)
|
||||||
|
{
|
||||||
|
optionList.Add(new TMP_Dropdown.OptionData(str));
|
||||||
|
}
|
||||||
|
|
||||||
|
Dropdown_Facility.AddOptions(optionList);
|
||||||
|
Dropdown_Facility.value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void OnClickStartDayBtn()
|
private void OnClickStartDayBtn()
|
||||||
{
|
{
|
||||||
ui_Calendar.Open(Text_StartDay);
|
ui_Calendar.Open(Text_StartDay);
|
||||||
@@ -44,10 +73,24 @@ namespace CHN
|
|||||||
private void OnClickEndDayBtn()
|
private void OnClickEndDayBtn()
|
||||||
{
|
{
|
||||||
ui_Calendar.Open(Text_EndDay);
|
ui_Calendar.Open(Text_EndDay);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnClickSearchBtn()
|
||||||
|
{
|
||||||
|
DateTime startDate = Convert.ToDateTime(Text_StartDay.text);
|
||||||
|
DateTime endDate = Convert.ToDateTime(Text_EndDay.text);
|
||||||
|
|
||||||
|
string startDateString = startDate.ToString("yyyy-MM-ddTHH:mm:ssZ");
|
||||||
|
string endDateString = endDate.ToString("yyyy-MM-ddTHH:mm:ssZ");
|
||||||
|
string MCHCD = Dropdown_Facility.options[Dropdown_Facility.value].text;
|
||||||
|
string WO = InputField_WorkOrderNumber.text;
|
||||||
|
|
||||||
|
hTTPTest.WorkTimeInQuiry(startDateString, endDateString, MCHCD, WO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Open()
|
public void Open()
|
||||||
{
|
{
|
||||||
|
SetFacilityDropDown();
|
||||||
SetActive(true);
|
SetActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
using CHN;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
@@ -51,6 +53,10 @@ public class HTTPTest : MonoBehaviour
|
|||||||
{
|
{
|
||||||
WorkTimeInQuiry();
|
WorkTimeInQuiry();
|
||||||
}
|
}
|
||||||
|
if(Input.GetKeyDown(KeyCode.O))
|
||||||
|
{
|
||||||
|
FindObjectOfType<Canvas_Popup>().panel_workconditionanalysis.Open();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator HTTPWebRequest()
|
IEnumerator HTTPWebRequest()
|
||||||
@@ -122,6 +128,26 @@ public class HTTPTest : MonoBehaviour
|
|||||||
StopAllCoroutines();
|
StopAllCoroutines();
|
||||||
StartCoroutine(WorkTimePost(path, json));
|
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)
|
IEnumerator WorkTimePost(string url, string jsonData)
|
||||||
{
|
{
|
||||||
var request = new UnityWebRequest(url, "POST");
|
var request = new UnityWebRequest(url, "POST");
|
||||||
|
|||||||
Reference in New Issue
Block a user