public function act_getGoodsList() { $select = isset($_GET['select']) ? $_GET['select'] : ''; $where = isset($_GET['where']) ? $_GET['where'] : ''; $where = base64_decode($where); if (empty($select)) { //参数不完整 self::$errCode = 301; self::$errMsg = 'select is empty'; return false; } else { $data = OpenapiModel::getGoodsListWhere($select, $where); if ($data) { self::$errCode = 200; self::$errMsg = 'Success'; return $data; } else { self::$errCode = OpenapiModel::$errCode; self::$errMsg = OpenapiModel::$errMsg; } } }
public function act_adjustPrintNum() { $printBatch = isset($_POST['printBatch']) ? $_POST['printBatch'] : ""; $num = isset($_POST['num']) ? $_POST['num'] : ""; if ($printBatch == "") { self::$errCode = 101; self::$errMsg = '批次号不能为空!'; return false; } if (!is_numeric($num) || $num) { self::$errCode = 101; self::$errMsg = '参数num异常!'; return false; } $where = "where printBatch='{$printBatch}'"; $record = OmAvailableModel::getTNameList("qc_sample_info", "*", $where); if ($record[0]['detectStatus'] == 3) { $set = "set printNum=printNum+{$num},ichibanNum=ichibanNum+{$num}"; } $set = "set printNum=printNum+{$num}"; $info = OmAvailableModel::updateTNameRow("qc_sample_info", $set, $where); if (!$info) { self::$errCode = 101; self::$errMsg = '修改失败!'; return false; } else { self::$errCode = 200; self::$errMsg = '修改成功!'; return true; } }
public function act_getLastDetector() { $spuArr = $_GET['spuArr']; $spus = json_decode($spuArr, true); if (empty($spus)) { self::$errCode = 101; self::$errMsg = '未获取spu信息'; return false; } if (!is_array($spus)) { self::$errCode = 102; self::$errMsg = '产品spu不是数组'; return false; } $detectIdArr = array(); foreach ($spus as $spu) { $where = " WHERE sku like '{$spu}%' ORDER BY checkTime DESC "; $detectInfoList = IqcCompleteInfoModel::iqcCompleteInfo($where); if ($detectInfoList) { foreach ($detectInfoList as $detectInfo) { if (preg_match("/^{$spu}(_[0-9A-Z])*\$/", $detectInfo['sku'])) { $detectIdArr[$spu] = $detectInfo['checkUser']; break; } } } } if (!empty($detectIdArr)) { self::$errCode = 200; self::$errMsg = '成功获取检测人'; return $detectIdArr; } else { self::$errCode = 103; self::$errMsg = '未获取检测人信息'; return false; } }