function act_iqcCompleteInfo($where, $combine) { if ($combine) { $list = IqcCompleteInfoModel::iqcCompleteInfoCombine($where); } else { $list = IqcCompleteInfoModel::iqcCompleteInfo($where); } if ($list) { return $list; } else { self::$errCode = WhStandardModel::$errCode; self::$errMsg = WhStandardModel::$errMsg; return false; } }
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; } }