本文整理汇总了PHP中OmAvailableModel::getTNameList方法的典型用法代码示例。如果您正苦于以下问题:PHP OmAvailableModel::getTNameList方法的具体用法?PHP OmAvailableModel::getTNameList怎么用?PHP OmAvailableModel::getTNameList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OmAvailableModel
的用法示例。
在下文中一共展示了OmAvailableModel::getTNameList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: orderLog
public static function orderLog($orderid, $ss, $note, $orderType = "")
{
!self::$dbConn ? self::initDB() : null;
$where = "where id={$orderid}";
$orderinfo = OmAvailableModel::getTNameList("om_unshipped_order", "*", $where);
$sql = array();
$sql['operatorId'] = $_SESSION['sysUserId'];
$sql['omOrderId'] = $orderid;
//$sql['note'] = "编辑订单";
$sql['note'] = $note;
$sql['sql'] = mysql_real_escape_string($ss);
$sql['createdTime'] = time();
if (!empty($orderType) && $orderinfo[0]['orderType'] != $orderType) {
$sql['oldStatus'] = $orderinfo[0]['orderType'];
$sql['newStatus'] = $orderType;
$sql['note'] .= "修改订单状态";
}
$strmctime = date('Y_m', time());
$sql = "INSERT INTO om_order_log_" . $strmctime . " set " . array2sql($sql);
$sql = self::$dbConn->query($sql);
if ($sql) {
return true;
} else {
return false;
//echo $sql;
}
}
示例2: act_accountList
public function act_accountList()
{
$select = " id ,account ";
$where = " where is_delete = 0 and token <> '' order by account ";
$accountList = OmAvailableModel::getTNameList("fb_account", $select, $where);
return $accountList;
}
示例3: act_autoCreateSpu
function act_autoCreateSpu()
{
$data = array();
$prefix = trim($_POST['prefix']);
if (!preg_match("/^[A-Z]{2}\$/", $prefix)) {
self::$errCode = 11;
self::$errMsg = 'error';
return false;
}
$prefixList = OmAvailableModel::getTNameList('pc_auto_create_spu_prefix', 'isSingSpu', "WHERE prefix='{$prefix}'");
$isSingSpu = $prefixList[0]['isSingSpu'];
//该prefix下试单还是虚拟料号
$autoSpuList = OmAvailableModel::getTNameList('pc_auto_create_spu', 'sort', "WHERE spu REGEXP '^{$prefix}[0-9]{6}\$' order by sort desc limit 1");
$maxNumberAuto = $autoSpuList[0]['sort'];
//auto表中最大的max
$maxNumberTrue = OmAvailableModel::getMaxSpu($prefix, $isSingSpu);
//对应goods表或combine表中最大的max
$maxNumber = $maxNumberTrue > $maxNumberAuto ? $maxNumberTrue : $maxNumberAuto;
//return $maxNumberTrue;
//$maxNumber = OmAvailableModel::getMaxSpu($prefix, $isSingSpu);
$spu = $prefix . str_pad($maxNumber + 1, 6, '0', STR_PAD_LEFT);
$data = array('spu' => $spu, 'sort' => $maxNumber + 1, 'prefix' => $prefix, 'isSingSpu' => $isSingSpu);
if (!empty($data)) {
return $data;
} else {
self::$errCode = 1;
self::$errMsg = 'error';
return false;
}
}
示例4: act_postsku
public function act_postsku()
{
$sku = isset($_POST['sku']) ? trim($_POST['sku']) : "";
$sku = get_goodsSn($sku);
$position = isset($_POST['position']) ? trim($_POST['position']) : "";
$num = isset($_POST['num']) ? trim($_POST['num']) : "";
$num = intval($num);
if (empty($position)) {
self::$errCode = 502;
self::$errMsg = "仓位不能为空";
return false;
}
if ($num < 1) {
self::$errCode = 502;
self::$errMsg = "{$sku}出库数量{$num}有误!";
return false;
}
$checkonhandle = wrapperSkuOutModel::selectstock($sku);
if (empty($checkonhandle)) {
self::$errCode = 502;
self::$errMsg = "{$sku}材料未导入库存信息表!";
return false;
}
$skuinfo = whShelfModel::selectSku(" where sku = '{$sku}'");
if (empty($skuinfo)) {
self::$errCode = 502;
self::$errMsg = "{$sku}材料没信息!";
return false;
} else {
$skuId = $skuinfo['id'];
$purchaseId = $skuinfo['purchaseId'];
}
$positon_info = OmAvailableModel::getTNameList("wh_position_distribution", "id", "where pName='{$position}' and storeId in(1,2)");
if (empty($positon_info)) {
self::$errCode = 502;
self::$errMsg = "无仓位号信息";
return false;
} else {
$positionId = $positon_info[0]['id'];
}
$relation_info = OmAvailableModel::getTNameList("wh_product_position_relation", "id", "where pId='{$skuId}' and positionId='{$positionId}' and storeId in(1,2)");
if (empty($relation_info)) {
self::$errCode = 502;
self::$errMsg = "包材和仓位不对应";
return false;
}
$paraArr = array('ordersn' => date('YmdHis', time()), 'sku' => $sku, 'amount' => $num, 'purchaseId' => $purchaseId, 'ioType' => 1, 'ioTypeId' => 26, 'userId' => $_SESSION['userId'], 'reason' => '包材出库', 'positionId' => $positionId);
$WhIoRecordsAct = new WhIoRecordsAct();
$tt = $WhIoRecordsAct->act_addIoRecoresForWh($paraArr);
//出库记录
self::$errCode = 200;
self::$errMsg = "{$sku}出库{$num}个成功!";
return true;
}
示例5: act_index
public function act_index()
{
$platformId = $_REQUEST['platformId'];
$account = OmAvailableModel::getTNameList('om_account', 'id,platformId,account', 'WHERE is_delete=0 AND platformId = ' . $platformId);
if ($account) {
return $account;
} else {
self::$errCode = '300';
self::$errMsg = '无法获得对应平台用户名信息';
return false;
}
}
示例6: act_getTNameList
function act_getTNameList($tName, $set, $where)
{
//表名,SET,WHERE
$list = OmAvailableModel::getTNameList($tName, $set, $where);
if (is_array($list)) {
return $list;
} else {
self::$errCode = OmAvailableModel::$errCode;
self::$errMsg = OmAvailableModel::$errMsg;
return false;
}
}
示例7: view_skuInfo
public function view_skuInfo()
{
$sku = isset($_GET['sku']) ? trim($_GET['sku']) : "";
//$spu = ExportsToXlsModel::getGoods($sku);
$spu = GoodsModel::getSkuList($sku);
$spu = $spu['spu'];
$where = "where spu = '{$spu}'";
$skuinfo = OmAvailableModel::getTNameList("pc_goods", "*", $where);
$skuStock = array();
foreach ($skuinfo as $key => $value) {
$sku = $value['sku'];
//获取库存
$skuStock = WarehouseAPIModel::getSkuStock($sku);
//获取料号信息
//$skumsg = ExportsToXlsModel::getGoods($sku);
$skumsg = GoodsModel::getSkuList($sku);
//获取缓存表信息
$where = "where sku='{$sku}'";
$skuStatics = OmAvailableModel::getTNameList("om_sku_daily_status", "*", $where);
$skuStockList = array();
$skuStockList['nums'] = $skuStock;
$skuStockList['sku'] = $skumsg['sku'];
$skuStockList['spu'] = $skumsg['spu'];
$skuStockList['goodsName'] = $skumsg['goodsName'];
$skuStockList['goodsCost'] = $skumsg['goodsCost'];
$skuStockList['goodsWeight'] = $skumsg['goodsWeight'];
$skuStockList['AverageDailyCount'] = $skuStatics['AverageDailyCount'];
$skuStockList['waitingSendCount'] = $skuStatics['waitingSendCount'];
$skuStockList['xuniCount'] = $skuStatics['waitingSendCount'];
$skuStockList['goodsStatus'] = $skumsg['goodsStatus'];
$path = $skumsg['goodsCategory'];
$cateName = GoodsModel::getCategoryInfoByPath($path);
$skuStockList['cateName'] = $cateName['name'];
$skuStockList['isNew'] = $skumsg['isNew'];
$skuStockList['pmId'] = $skumsg['pmId'];
$pmName = GoodsModel::getMaterInfoById($skumsg['pmId']);
$skuStockList['pmName'] = $pmName['pmName'];
//print_r($pmName);
$pName = $skumsg['purchaseId'];
$skuStockList['pName'] = UserModel::getUsernameById($pName);
$skuStockList['isPacking'] = $skumsg['isPacking'];
$skuStockList['whName'] = "深圳A仓";
$skuStock_arr[] = $skuStockList;
}
$this->smarty->assign("skuStockList", $skuStock_arr);
//print_r($skuStockList);
$this->smarty->display("skuInfo.htm");
}
示例8: act_getTNameList
function act_getTNameList()
{
$jsonArr = isset($_GET['jsonArr']) ? $_GET['jsonArr'] : '';
//传过来的base64编码的json字符串
if (empty($jsonArr)) {
self::$errCode = 101;
self::$errMsg = '参数数组为空';
return false;
}
$jsonArr = json_decode(base64_decode($jsonArr), true);
//对base64及json解码
if (!is_array($jsonArr)) {
self::$errCode = 103;
self::$errMsg = '参数数组不是数组格式';
return false;
}
$tName = $jsonArr['tName'];
//表名
$select = $jsonArr['select'];
//select,不用关键字SELECT
$where = $jsonArr['where'];
//where,要带上关键字WHERE
if (empty($tName) || empty($select) || empty($where)) {
self::$errCode = '300';
self::$errMsg = '必要参数不完整';
return false;
}
$list = OmAvailableModel::getTNameList($tName, $select, $where);
if (is_array($list)) {
self::$errCode = '200';
self::$errMsg = '成功';
return $list;
} else {
self::$errCode = '404';
self::$errMsg = '数据库操作错误';
return false;
}
}
示例9: act_pda_ExpressId
/**
* pda_ExpressWeighingAct::act_pda_ExpressId()
* @author cxy
* @return
*/
public function act_pda_ExpressId()
{
$userId = $_SESSION['userId'];
$ebay_id = trim($_POST['ebay_id']);
if (empty($userId)) {
self::$errCode = '0';
self::$errMsg = '系统登录超时,请先关闭浏览器 然后登录扫描!!';
return false;
}
if (empty($ebay_id)) {
self::$errCode = 0;
self::$errMsg = '请填写单号!';
return;
}
$where = "where id={$ebay_id}";
$order = orderPartionModel::selectOrder($where);
if (!$order) {
self::$errCode = 0;
self::$errMsg = $ebay_id . '发货单不存在!';
return false;
}
if ($order[0]['isExpressDelivery'] != 1) {
self::$errCode = 0;
self::$errMsg = $ebay_id . '此发货单不是快递发货单!';
return false;
}
if ($order[0]['orderStatus'] != PKS_WWEIGHING) {
self::$errCode = 0;
self::$errMsg = $ebay_id . '此发货单状态不是在待称重状态!';
return false;
}
$result = OmAvailableModel::getTNameList("wh_shipping_order_note_record ", "content", "where shipOrderId='{$ebay_id}' and is_delete =0 ");
$note = $result[0]['content'];
$res['content'] = $note;
self::$errCode = 200;
self::$errMsg = $ebay_id . "发货单号正确,请填写该发货单的重量,注意填写为的重量单位为KG!";
return $res;
}
示例10: act_getSkuId
function act_getSkuId($sku)
{
$field = ' id ';
$where = " where sku = '{$sku}' limit 0,1 ";
$result = OmAvailableModel::getTNameList('ph_goods', $field, $where);
return $result[0]['id'];
}
示例11: act_updateBatchForSalers
/**
*功能:我自己运行的接口,批量更新数据,根据需求批量更新销售是陈智兴的虚拟料号,将其销售人员改为对应真实SPU的销售人员
* */
public function act_updateBatchForSalers()
{
$tName = 'pc_spu_saler_combine';
$select = 'spu';
$where = "WHERE is_delete=0 and platformId=2 and isAgree=2 and salerId=60";
$combineSpuList = OmAvailableModel::getTNameList($tName, $select, $where);
foreach ($combineSpuList as $value) {
$combineSpu = $value['spu'];
$tName = 'pc_goods_combine';
$select = 'combineSku';
$where = "WHERE is_delete=0 and combineSpu='{$combineSpu}'";
$combineSkuList = OmAvailableModel::getTNameList($tName, $select, $where);
if (!empty($combineSkuList)) {
$tName = 'pc_sku_combine_relation';
$select = 'sku';
$where = "WHERE combineSku='{$combineSkuList[0]['combineSku']}'";
$skuList = OmAvailableModel::getTNameList($tName, $select, $where);
if (!empty($skuList)) {
$tName = 'pc_goods';
$select = 'spu';
$where = "WHERE is_delete=0 and sku='{$skuList[0]['sku']}'";
$spuList = OmAvailableModel::getTNameList($tName, $select, $where);
if (!empty($spuList)) {
$tName = 'pc_spu_saler_single';
$select = 'salerId';
$where = "WHERE is_delete=0 and platformId=2 and isAgree=2 and spu='{$spuList[0]['spu']}'";
$singleSpuSalerIdList = OmAvailableModel::getTNameList($tName, $select, $where);
if (!empty($singleSpuSalerIdList)) {
$salerId = $singleSpuSalerIdList[0]['salerId'];
$saler = getPersonNameById($salerId);
$tName = 'pc_spu_saler_combine';
$where = "WHERE is_delete=0 and spu='{$combineSpu}'";
$dataArr = array();
$dataArr['salerId'] = $salerId;
OmAvailableModel::updateTNameRow2arr($tName, $dataArr, $where);
echo "{$combineSpu} 的原销售是 陈智兴,真实销售是 {$saler} <br />";
} else {
echo "{$combineSpu} 的原销售是 陈智兴,真实销售为空 <br />";
}
}
}
}
}
}
示例12: session_start
<?php
require_once "/data/web/erpNew/pc.valsun.cn/framework.php";
Core::getInstance();
session_start();
header("Content-type:text/html;charset=utf-8");
date_default_timezone_set("Asia/Shanghai");
session_cache_expire(30);
//session有效时间为30分钟
$tName = 'purchase_sku_conversion';
$select = '*';
$where = "WHERE 1=1";
$purchaseSkuConvertionList = OmAvailableModel::getTNameList($tName, $select, $where);
if (!empty($purchaseSkuConvertionList)) {
$tName = 'pc_sku_conversion';
$where = "WHERE 1=1";
OmAvailableModel::deleteTNameRow($tName, $where);
}
foreach ($purchaseSkuConvertionList as $value) {
$id = $value['id'];
$old_sku = $value['old_sku'];
$new_sku = $value['new_sku'];
$user = $value['user'];
$createdtime = $value['createdtime'];
$modifiedtime = $value['modifiedtime'];
$dataConvertion = array();
$dataConvertion['id'] = $id;
$dataConvertion['old_sku'] = $old_sku;
$dataConvertion['new_sku'] = $new_sku;
$dataConvertion['addUserId'] = getPersonIdByName($user);
$dataConvertion['createdTime'] = strtotime($createdtime);
示例13: calcNowOrderShippingFee
public static function calcNowOrderShippingFee($omOrderId)
{
require_once WEB_PATH . "api/include/functions.php";
$shippingFee = 0;
//初始化要返回的订单运费变量
if (intval($omOrderId) == 0) {
//订单号不合法
return false;
}
$tName = 'om_unshipped_order';
$select = '*';
$where = "WHERE is_delete=0 AND id='{$omOrderId}'";
$omOrderList = OmAvailableModel::getTNameList($tName, $select, $where);
if (empty($omOrderList)) {
//没有对应订单号
return false;
}
$isFixed = $omOrderList[0]['isFixed'];
//是最优运输方式还是固定运输方式,默认为2
$calcWeight = $omOrderList[0]['calcWeight'];
//订单估算重量
$transportId = $omOrderList[0]['transportId'];
//运输方式id
$tName = 'om_unshipped_order_userInfo';
$select = '*';
$where = "WHERE omOrderId='{$omOrderId}'";
$omOrderUserInfoList = OmAvailableModel::getTNameList($tName, $select, $where);
if (empty($omOrderUserInfoList)) {
//没有对应订单号的用户信息
return false;
}
$countryName = $omOrderUserInfoList[0]['countryName'];
//国家名称
$shipaddr = 1;
//发货地址id,用来获取最优运输方式
$zipCode = $omOrderUserInfoList[0]['zipCode'];
//邮编
$method = '';
//访问开放系统接口名称,最优还是固定,调用开放系统必填参数
if ($isFixed == 2) {
$method = 'trans.carrier.best.get';
} else {
$method = 'trans.carrier.fix.get';
}
$paramArr = array('method' => $method, 'format' => 'json', 'v' => '1.0', 'username' => C('OPEN_SYS_USER'));
$paramArr['carrier'] = $transportId;
$paramArr['country'] = $countryName;
$paramArr['weight'] = $calcWeight;
$paramArr['shaddr'] = $shipaddr;
$paramArr['postcode'] = $zipCode;
$result = callOpenSystem($paramArr);
$data = json_decode($result, true);
//var_dump($data);
if (empty($data['data'])) {
return false;
}
return $data['data'];
/*$data = UserCacheModel :: getOpenSysApi($method, $paramArr);
if ($isFixed == 2) {
return $data['data'];
} else {
return $data['data'];
}*/
}
示例14: view_printGroupOrder2
public function view_printGroupOrder2()
{
$groupsn = isset($_GET['groupsn']) ? trim($_GET['groupsn']) : 0;
if (empty($groupsn)) {
echo "请指定配货清单!";
exit;
}
$group_list = OmAvailableModel::getTNameList("wh_shipping_order_group", "*", "where shipOrderGroup='{$groupsn}' order by id asc");
if (!$group_list) {
echo "该配货清单不存在!";
exit;
}
$time = time();
$userName = $_SESSION['userName'];
//更新今日清单打印表
OmAvailableModel::updateTNameRow("wh_shipping_order_group_print", "set status='1',orderPrintUser='{$userName}',orderPrintTime='{$time}'", "where shipOrderGroup='{$groupsn}'");
//获取订单对应的车号
$orderids = array();
foreach ($group_list as $group) {
if (!isset($orderids[$group['shipOrderId']])) {
$orderids[$group['shipOrderId']] = $group['carNumber'];
}
}
$o_arr = array();
foreach ($orderids as $order => $car_number) {
$o_arr[] = $order;
}
$oids = implode(',', $o_arr);
$po_obj = new PackingOrderModel();
$ordersinfo = $po_obj->getaSetOfOrderInfo($oids);
if (empty($ordersinfo)) {
$data = array('data' => array('没有可打印内容!'), 'link' => 'index.php?mod=orderWaitforPrint&act=printList');
goErrMsgPage($data);
exit;
}
$sod_obj = new ShipingOrderDetailModel();
$acc_id_arr = array();
foreach ($ordersinfo as &$orinfval) {
$locationinfo = array();
$totalnum = 0;
$package_type = '';
$iscard = '';
$skulisttemp = $sod_obj->getAllSkuListByOrderId($orinfval['id'], "order by pName,combineSku");
$totalnum = $skulisttemp['totalnum'];
$locationinfo = $skulisttemp['skuinfo'];
if (isset($locationinfo['notcombine']) && count($locationinfo['notcombine']['info']) == 1) {
$package_type = $skulisttemp['packagetype'];
}
$iscard = printLabelModel::checkprintcard($orinfval['id']);
$pmNameStr = CommonModel::getMaterInfoById($orinfval['pmId']);
$orinfval['finalposition'] = $locationinfo;
$totalStr = $totalnum . " " . $pmNameStr . " " . $orinfval['calcWeight'] . "KG";
if (!empty($package_type)) {
$totalStr = $totalStr . " " . $package_type;
}
if (!empty($iscard)) {
$totalStr = $totalStr . " " . $iscard;
}
$totalStr = $totalStr . " " . $orinfval['platformUsername'];
$carrier = CommonModel::getShipingNameById($orinfval['transportId']);
$orinfval['abbrshipname'] = CommonModel::getShipingAbbrNameById($orinfval['transportId']);
$orinfval['totalStr'] = $totalStr;
$orinfval['notes'] = $po_obj->getOrderNotesInfo($orinfval['id']);
$orinfval['countryZh'] = CommonModel::getCountryNameCn($orinfval['countryName']);
$orinfval['partionFromAddress'] = printLabelModel::getPartionFromAddress($orinfval['id'], $carrier, $orinfval['countryName']);
if (!in_array($orinfval['accountId'], $acc_id_arr)) {
array_push($acc_id_arr, $orinfval['accountId']);
}
}
$salesaccountinfo = CommonModel::getAccountInfo($acc_id_arr);
$this->smarty->assign('salesaccountinfo', $salesaccountinfo);
$totalCount = count($ordersinfo);
$this->smarty->assign('totalCount', $totalCount);
$this->smarty->assign('orderids', $orderids);
$this->smarty->assign('ordersinfo', $ordersinfo);
$this->smarty->display('label50x100_22.htm');
}
示例15: act_manualSortingCheck
public function act_manualSortingCheck()
{
$userId = $_SESSION['userId'];
$waveId = isset($_POST['waveId']) ? $_POST['waveId'] : "";
$where = "number='{$waveId}'";
$waveInfo = WhWaveInfoModel::get_wave_info("*", $where);
if (!$waveInfo) {
self::$errCode = 502;
self::$errMsg = "此配货单号不存在!";
return false;
}
if ($waveInfo[0]['waveStatus'] != WAVE_FINISH_GET_GOODS) {
self::$errCode = 514;
self::$errMsg = "此配货单不在【配货完成】状态,不能进行分拣操作!";
return false;
}
if ($waveInfo[0]['waveType'] == 3) {
self::$errCode = 518;
self::$errMsg = "此配货单属于多SKU生成的配货单,不能进行人工分拣!";
return false;
}
//一个发货单对应多个配货单的时候,发货单是唯一的,
if ($waveInfo[0]['waveType'] == 1) {
$waveId = $waveInfo[0]['id'];
$result = WhWaveShippingRelationModel::select_not_scanning($waveId);
$shipOrderId = $result[0]['shipOrderId'];
if ($result[0]['pickUserId'] != 0) {
self::$errCode = 520;
self::$errMsg = "此配货单已经分拣过了!";
return false;
}
WhShippingOrderModel::begin();
$update = WhWaveShippingRelationModel::update(array('pickUserId' => $userId, 'pickTime' => time()), array('is_delete' => 0, 'waveId' => $waveId));
if (!$update) {
self::$errCode = 519;
self::$errMsg = "扫描该配货单失败,请联系负责人!";
WhShippingOrderModel::rollback();
return false;
// $result = WhWaveShippingRelationModel::getShippingOrderIdsByWaveId($waveId);
//$shipOrderId = $result[0]['shipOrderId'];
//查询还没有扫描的配货单
}
$select_not_scanning = WhWaveShippingRelationModel::select_not_scanning_by_id($shipOrderId);
$not_scanning_waveId = '';
//还没有分拣的配货单
if ($select_not_scanning) {
foreach ($select_not_scanning as $val) {
$not_scanning_waveId .= $val['waveId'] . ',';
}
self::$errMsg = "扫描该配货单'{$waveId}'成功,对应发货单'{$shipOrderId}'的配货单'{$not_scanning_waveId}'还没有分拣!";
} else {
self::$errMsg = "扫描该配货单'{$waveId}'成功,对应的发货单'{$shipOrderId}'已经分拣完成,请处理完成之后拿去复核!";
//获取一个发货单对应多个配货单的每个配货单号
$result = OmAvailableModel::getTNameList("wh_wave_shipping_relation", "waveId", "where shipOrderId='{$shipOrderId}' and is_delete=0 ");
$wave_all = '';
foreach ($result as $values) {
$wave_all .= $values['waveId'] . ',';
}
$wave_all = trim($wave_all, ',');
//得到该发货单下所有配货单的信息
$scan_record = OmAvailableModel::getTNameList("wh_wave_scan_record", "waveId,sku,skuAmount,amount", "where waveId in ('{$wave_all}') and scanStatus = 1 and is_delete=0 ");
$picklist_all = array();
foreach ($scan_record as $record) {
$data = array('waveId' => $record['waveId'], 'shipOrderId' => $shipOrderId, 'sku' => $record['sku'], 'skuAmount' => $record['skuAmount'], 'amount' => $record['amount'], 'pickStatus' => 1, 'pickUserId' => intval($_SESSION['userId']), 'pickTime' => time(), 'deleteUserId' => '0', 'deleteTime' => '0', 'is_delete' => '0');
$picklist_all[] = $data;
}
if (!WhWavePickRecordModel::insert($picklist_all, true)) {
WhShippingOrderModel::rollback();
self::$errCode = 517;
self::$errMsg = "该配货单插入分拣记录失败!";
return false;
}
$where = "id = '{$shipOrderId}' AND orderStatus='" . PKS_WAITING_SORTING . "'";
if (!WhShippingOrderModel::update_shipping_order($where, "orderStatus='" . PKS_WIQC . "'")) {
WhShippingOrderModel::rollback();
self::$errCode = 516;
self::$errMsg = "此配货单所属发货单{$shipOrderId}更新状态失败!";
return false;
}
}
WhPushModel::pushOrderStatus($shipOrderId, 'PKS_WIQC', $_SESSION['userId'], time());
//状态推送,需要改为待复核单(订单系统提供状态常量)
WhShippingOrderModel::commit();
self::$errCode = 200;
return true;
}
/*
if(empty($waveInfo[0]['sku'])){
self::$errCode = 515;
self::$errMsg = "此配货单不属于单SKU生成的配货单,不能进行人工分拣!";
return false;
}
*/
$waveId = $waveInfo[0]['id'];
//echo $waveId;
$shippOrders = WhWaveShippingRelationModel::getShippingOrderIdsByWaveId($waveId);
//var_dump($shippOrders);
WhShippingOrderModel::begin();
foreach ($shippOrders as $shippOrder) {
$shipOrderId = $shippOrder['shipOrderId'];
//.........这里部分代码省略.........