function act_getCurrentPosition() { $info = array(); $where['x_alixs'] = intval($_POST['axis_x']); $where['y_alixs'] = intval($_POST['axis_y']); $where['floor'] = intval($_POST['floor']); $where['storeId'] = intval($_POST['storeid']); $where['areaId'] = intval($_POST['areaId']); $where['storey'] = intval($_POST['storey']); //$list = PositionModel::getPositionList("*","where x_alixs='$x_alixs' and y_alixs='$y_alixs' and floor='$floor' and storeId={$storeid}"); $list = WhPositionDistributionModel::select($where, 'pName, is_enable, type, z_alixs'); //print_r($list);exit; if ($list) { foreach ($list as $l) { $info[$l['z_alixs']][] = array('name' => $l['pName'], 'enable' => $l['is_enable'], 'type' => $l['type']); } $new_info = array(); foreach ($info as $key => $v) { $pNames = get_filed_array('name', $v); $new_info[$key]['name'] = implode(',', $pNames); $new_info[$key]['enable'] = $v[0]['is_enable']; $new_info[$key]['type'] = $v[0]['type']; } //print_r($new_info);exit; unset($info); return $new_info; } else { self::$errCode = PositionModel::$errCode; self::$errMsg = PositionModel::$errMsg; return false; } }
private function buildWhereSql() { $sql_where_storeId = ''; $storeId = isset($_GET['storeId']) ? intval($_GET['storeId']) : 0; if ($storeId != 0) { $sql_where_storeId = " and po.storeId={$storeId}"; } $this->smarty->assign('storeId', $storeId); $keywords = isset($_GET['keywords']) ? trim($_GET['keywords']) : ''; //关键字 $sql_where_keywords = ''; $keytype = isset($_GET['keytype']) ? intval($_GET['keytype']) : ''; //关键字类型 //echo $keytype;exit; if (!empty($keywords) && $keytype != 0) { //有关键字搜索条件 $keywords = mysql_real_escape_string($keywords); if ($keytype == 1) { //按订单号搜索 $sql_where_keywords = " and por.originOrderId='{$keywords}'"; } elseif ($keytype == 2) { //按配货单号搜索 $sql_where_keywords = " and po.id='{$keywords}'"; } elseif ($keytype == 3) { //按sku搜索 $sql_where_keywords = " and pd.sku='{$keywords}'"; } elseif ($keytype == 4) { $sql_where_keywords = " and ot.tracknumber='{$keywords}'"; } else { if ($keytype == 5) { //按配货单号搜索 $wave = WhBaseModel::number_decode($keywords); //获取配货单ID $shipOrderIds = WhWaveShippingRelationModel::getShippingOrderIdsByWaveId($wave); //获取发货单ID $orderIds = array(); if (!empty($shipOrderIds)) { $orderIds = get_filed_array('shipOrderId', $shipOrderIds); } else { $orderIds = array(0); } $orderIds = implode(',', $orderIds); $sql_where_keywords = " and po.id in ({$orderIds})"; } } } $this->smarty->assign('keywords', $keywords); $this->smarty->assign('keytype', $keytype); $sql_where_status = ''; $status = intval($_GET['status']); //订单状态 if (!isset($_GET['status'])) { $status = PKS_WGETGOODS; } if ($status != 0) { //状态 $sql_where_status = " and po.orderStatus={$status}"; } $this->smarty->assign('status', $status); $sql_where_orderstarttime = ''; $ordertimestart = isset($_GET['startdate']) ? trim($_GET['startdate']) : ''; //下单日期 开始 if ($ordertimestart != 0) { //开始时间 $ordertimestart_int = strtotime($ordertimestart); $sql_where_orderstarttime = " and po.createdTime >= {$ordertimestart_int}"; } $this->smarty->assign('ordertimestart', $ordertimestart); $sql_where_orderendtime = ''; $ordertimeend = isset($_GET['enddate']) ? trim($_GET['enddate']) : ''; //下单日期 结束 if ($ordertimeend != 0) { //结束时间 $ordertimeend_int = strtotime($ordertimeend); //$ordertimeend_int += 86400; $sql_where_orderendtime = " and po.createdTime < {$ordertimeend_int}"; } $this->smarty->assign('ordertimeend', $ordertimeend); $sql_where_goodsoutstarttime = ''; $goodsouttimestart = isset($_GET['goodsouttimestart']) ? trim($_GET['goodsouttimestart']) : ''; //出库日期 开始 if ($goodsouttimestart != 0) { //出库开始时间 $goodsouttimestart_int = strtotime($goodsouttimestart); $sql_where_goodsoutstarttime = " and po.weighTime >= {$goodsouttimestart_int}"; } $this->smarty->assign('goodsouttimestart', $goodsouttimestart); $sql_where_goodsoutendtime = ''; $goodsouttimeend = isset($_GET['goodsouttimeend']) ? trim($_GET['goodsouttimeend']) : ''; //出库日期 结束 if ($goodsouttimeend != 0) { //出库结束时间 $goodsouttimeend_int = strtotime($goodsouttimeend); //$goodsouttimeend += 86400; $sql_where_goodsoutstarttime = " and po.weighTime < {$goodsouttimeend_int}"; } $this->smarty->assign('goodsouttimeend', $goodsouttimeend); $sql_where_isnote = ''; $isNote = intval($_GET['isNote']); if ($isNote) { //echo $isNote;exit; switch ($isNote) { case 1: //有留言 $sql_where_isnote = ' and po.isNote=1'; break; case 2: //没留言 $sql_where_isnote = ' and po.isNote=0'; break; } } $this->smarty->assign('isNote', $isNote); $sql_where_orderTypeId = ''; /* $orderTypeId = intval($_GET['orderTypeId']); if(!isset($_GET['orderTypeId'])){ $orderTypeId = 1; } switch ($orderTypeId){ case 1: //有留言 $sql_where_orderTypeId = ' and po.orderTypeId=1'; break; case 2: //没留言 $sql_where_orderTypeId = ' and po.orderTypeId=2'; break; } $this->smarty->assign('orderTypeId', $orderTypeId);*/ $sql_where_shiptype = ''; $shiptype = trim($_GET['shiptype']); //运输方式 if ($shiptype != 0) { //运输方式 if ($shiptype == 200) { $nshiptype = "1,2,3"; } else { if ($shiptype == 300) { $nshiptype = "6,10,52,53"; } else { $nshiptype = $shiptype; } } $sql_where_shiptype = " and po.transportId in({$nshiptype})"; } else { if (!empty($_SESSION['shippingList'])) { $nshiptype = implode(',', $_SESSION['shippingList']); $sql_where_shiptype = " and po.transportId in({$nshiptype})"; } } $this->smarty->assign('shiptype', $shiptype); $sql_where_clientname = ''; $client_name = trim($_GET['clientname']); if ($client_name != '') { //按客户id搜索 $sql_where_clientname = " and po.platformUsername='******'"; } $this->smarty->assign('clientname', $client_name); $sql_where_salesaccount = ''; $salesaccount = trim($_GET['salesaccount']); if ($salesaccount != '') { //按客户id搜索 $sql_where_salesaccount = " and po.accountId='{$salesaccount}'"; } else { if (!empty($_SESSION['accountList'])) { $accountInfo = implode(',', $_SESSION['accountList']); $sql_where_salesaccount = " and po.accountId in({$accountInfo})"; } } $this->smarty->assign('salesaccount', $salesaccount); $sql_where_hunhe = ''; $hunhe = intval($_GET['hunhe']); //echo $hunhe;exit; switch ($hunhe) { case 2: //单料号 $sql_where_hunhe = ' and po.orderAttributes=' . SOA_SINGLE; break; case 1: //多料号 $sql_where_hunhe = ' and po.orderAttributes=' . SOA_MULTIY; break; case 3: //组合订单 $sql_where_hunhe = ' and po.orderAttributes=' . SOA_COMBIN; break; } $this->smarty->assign('hunhe', $hunhe); $sql_where_platformName = ''; $platformName = trim($_GET['platformName']); if ($platformName != '') { //平台 $sql_where_platformName = " and po.platformId= {$platformName}"; } else { if (!empty($_SESSION['platformList'])) { $platformInfo = implode(',', $_SESSION['platformList']); $sql_where_platformName = " and po.platformId in({$platformInfo})"; } } $this->smarty->assign('platformName', $platformName); return $sql_where_storeId . $sql_where_keywords . $sql_where_status . $sql_where_orderstarttime . $sql_where_orderendtime . $sql_where_goodsoutstarttime . $sql_where_goodsoutendtime . $sql_where_isnote . $sql_where_orderTypeId . $sql_where_shiptype . $sql_where_clientname . $sql_where_salesaccount . $sql_where_hunhe . $sql_where_platformName; }
} $receive_info = trim($receive_info, '=>'); }*/ $page_num = 35; $scan_record = WhWaveScanRecordModel::get_scan_record_union_area($wave['id']); //获取配货记录及区域负责人id //print_r($scan_record);exit; $area_info = array_unique(get_filed_array('area', $scan_record)); $area_user = WhWaveAreaUserRelationModel::get_user_by_areaName($area_info); $area_user = reverse_array($area_user, 'user', 'area'); $note = ''; /** 获取单发货单配货备注**/ if ($wave['waveType'] == 1) { $note = WhShippingOrderNoteRecordModel::get_order_note_by_waveId($wave['id']); if (!empty($note)) { $note = get_filed_array('content', $note); $note = implode("<br />", $note); } else { $note = ''; } } /** **/ //print_r($area_info);exit; $receive_info = implode(' =>', $area_info); $count = count($scan_record); $pages = ceil($count / $page_num); for ($i = 1; $i <= $pages; $i++) { $j = 1; ?> <div style="margin-left:10px;width:700px; min-height:400px; border: 1px solid;"> <div style="margin-left: 170px; width:auto;margin-top:5px;">
/** * WaveInfoManageView::makeSingleWave() * 生成单料号及单发货单配货单 * @author Gary * @return void */ public function makeSingleWave($time) { $update = array('createUserId' => $_SESSION['userId'], 'createTime' => time(), 'waveStatus' => 1); $where = array('waveType in' => array(1, 2), 'createTime <=' => $time, 'createUserId' => 0, 'is_delete' => 0); $waveinfo = WhWaveInfoModel::get_wave_info('id', $where); //获取所有符合条件的配货单号 WhBaseModel::begin(); //更新配货单状态 $info = WhWaveInfoModel::update_wave_info($update, $where); if (!$info) { WhBaseModel::rollback(); return $info; } $waveIds = get_filed_array('id', $waveinfo); $waveIds = empty($waveIds) ? array(0) : $waveIds; $shipOrderIds = WhWaveShippingRelationModel::select(array('waveId in' => $waveIds), 'shipOrderId'); //print_r($waveIds);exit; $shipOrderIds = get_filed_array('shipOrderId', $shipOrderIds); $shipOrderIds = empty($shipOrderIds) ? array(0) : $shipOrderIds; $info = WhShippingOrderModel::update(array('orderStatus' => PKS_PROCESS_GET_GOODS), array('id in' => $shipOrderIds)); if (!$info) { WhBaseModel::rollback(); return $info; } $info = WhBaseModel::affected_rows(); WhBaseModel::commit(); return $info; }