<?php
$cate_id = "CNT_CT_WORKER";

/*
* @Overview 작업자별 가공시간
* @History 2024-04-22 / 최승연 / 최초작성
*/

include_once "{$_SERVER['DOCUMENT_ROOT']}/common.inc.php";
include_once _SVC_INC_PATH_ . "/auth_check.php";
include_once _HOME_INC_PATH_ . "/ajax_init.php";

if (!_notAuth("R")) {


  switch ($_REQUEST['mode']) {

    case 'getWoOperList':


      $squl = "USP_P_CNT_CT_WORKER_S10";

      $params = array(
        "P_EMP_NO"   => $_REQUEST["EMP_NO"] ?: "",
        "P_EMP_NM"   => $_REQUEST["EMP_NM"] ?: "",
        "P_ST_DATE"  => $_REQUEST["date_st"],
        "P_ED_DATE"  => $_REQUEST["date_ed"],
        "P_DEPT_CD"  => $_REQUEST["DEPT_CD"] ?: "",
        "P_DEPT_NM"  => $_REQUEST["DEPT_NM"] ?: "",
      );
      $rst = $baseObj->DB->exec($squl, $params);

      $rows = array();
      if ($rst) {
        $retval['code'] = true;
        while ($row = $baseObj->DB->fetch_array($rst)) {
          $rows[] = $row;
        }
        ;
        $retval['data'] = $rows;
        $retval['mesg'] = '정상 동작 되었습니다.';
      } else {
        $retval['code'] = false;
      }

      break;
  }
}

if (!$_REQUEST['no_echo']) {
  echo json_encode($retval);
}