<?php
//共通
require_once '../../base/common.php';

/**
 * af266x1共通カスタム関数
 */

/*
reCheck
全行AFW63.errをNULLに更新
*/
function reCheck($dbutil, $data){
  $logger = new logger(basename(__FILE__));
    global $stringUtil;
$logger->info("reCheck>>",$data);
    $ret_array = array(
      "ret" => "0", //0:OK,
      "msg" => "",
      "wseq" => "",
    );
    $ret = '0';

    try {

      $sql = file_get_contents("./sql/reCheck.sql");
      $whereParams = array();
      $whereParams["obat"] = $data["obat"];
      $whereParams["cucd"] = $data["cucd"];
      $whereParams["rcvdst"] = $data["rcvdst"];
    $logger->info("reCheck>> \n".$sql,$whereParams);
      $result = $dbutil->update($sql,$whereParams);

        
    } catch(userException $ue) {
      $ret = '-999';
      $msg = $ue->getErrorMessage();
    } catch(Exception $e) {
      $ret = '-999';
      $msg = $e->getMessage();
    }

    return $ret_array;
  }


?>
