当前位置: 首页>>代码示例>>PHP>>正文


PHP OmAvailableModel::deleteTNameRow方法代码示例

本文整理汇总了PHP中OmAvailableModel::deleteTNameRow方法的典型用法代码示例。如果您正苦于以下问题:PHP OmAvailableModel::deleteTNameRow方法的具体用法?PHP OmAvailableModel::deleteTNameRow怎么用?PHP OmAvailableModel::deleteTNameRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OmAvailableModel的用法示例。


在下文中一共展示了OmAvailableModel::deleteTNameRow方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: act_deleteTmpProsById

 function act_deleteTmpProsById()
 {
     $id = intval($_POST['id']);
     if ($id <= 0) {
         self::$errCode = '101';
         self::$errMsg = '��Ч��¼��ɾ��ʧ��';
         return false;
     }
     $tName = 'pc_tmp_products_return';
     $where = "WHERE id={$id}";
     OmAvailableModel::deleteTNameRow($tName, $where);
     self::$errCode = '200';
     self::$errMsg = "ɾ���ɹ�";
     return true;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:15,代码来源:tmpReturnPros.action.php

示例2: act_pcForMQByZqt

 /**
  *功能:我自己运行的接口,自由发送mq队列
  * */
 public function act_pcForMQByZqt()
 {
     $tName = 'pc_goods';
     $where = "WHERE is_delete=0 and id in(87276,87277,87278,87279)";
     OmAvailableModel::deleteTNameRow($tName, $where);
 }
开发者ID:ohjack,项目名称:newErp,代码行数:9,代码来源:omAvailableApi.action.php

示例3: view_createModReturnBill

 public function view_createModReturnBill()
 {
     $whId = $_GET['whId'] ? post_check(trim($_GET['whId'])) : '';
     $whInfoList = getWhInfo();
     //根据接口取得对应仓库信息
     $whInfoIdArr = array();
     foreach ($whInfoList as $value) {
         $whInfoIdArr[] = $value['id'];
         //取得仓库id
     }
     if (!in_array($whId, $whInfoIdArr)) {
         $status = '仓库信息有误';
         header("Location:index.php?mod=products&act=tmpReturnPros&status={$status}");
         exit;
     }
     $whId = intval($whId);
     $tName = 'pc_tmp_products_return';
     $select = '*';
     $where = "WHERE returnType=3 ";
     //选出产品修改归还的产品
     $returnSkuList = OmAvailableModel::getTNameList($tName, $select, $where);
     if (empty($returnSkuList)) {
         $status = '修改产品归还列表中没有sku,请先添加';
         header("Location:index.php?mod=products&act=tmpModReturnPros&status={$status}");
         exit;
     }
     try {
         BaseModel::begin();
         //先插入表头数据
         $tName = 'pc_products_iostore';
         $dataIostore = array();
         $dataIostore['ordersn'] = "XGGH" . date('Y') . date('m') . date('d') . date("H") . date('i') . date('s') . str_pad(rand(1, 9999), 4, '0', STR_PAD_LEFT);
         //默认领料单单号为前缀“PRODUCTOR”+年月日时分秒生成
         $where = "WHERE ordersn='{$dataIostore['ordersn']}'";
         $countIoStore = OmAvailableModel::getTNameCount($tName, $where);
         if ($countIoStore) {
             $status = '异常,请重试';
             header("Location:index.php?mod=products&act=tmpModReturnPros&status={$status}");
             exit;
         }
         $dataIostore['iostoreTypeId'] = 2;
         //单据类型为2,退料单
         $dataIostore['addUserId'] = $_SESSION['userId'];
         //添加人
         if (intval($dataIostore['addUserId']) <= 0) {
             $status = '登陆超时,请重试';
             header("Location:index.php?mod=products&act=tmpModReturnPros&status={$status}");
             exit;
         }
         $dataIostore['createdTime'] = time();
         //生成时间
         $dataIostore['whId'] = $whId;
         $insertIostoreId = OmAvailableModel::addTNameRow2arr($tName, $dataIostore);
         //下面插入表体
         $tName = 'pc_products_iostore_detail';
         foreach ($returnSkuList as $value) {
             $dataIostoreDetail = array();
             $dataIostoreDetail['iostoreId'] = $insertIostoreId;
             $dataIostoreDetail['iostoreTypeId'] = 2;
             //退料单
             $dataIostoreDetail['sku'] = $value['sku'];
             //$dataIostoreDetail['amount'] = $value['amount'];
             $dataIostoreDetail['addUserId'] = $value['addUserId'];
             $dataIostoreDetail['addTime'] = $value['createdTime'];
             $dataIostoreDetail['whId'] = $whId;
             OmAvailableModel::addTNameRow2arr($tName, $dataIostoreDetail);
         }
         //下面删除掉returnType=3的料号
         $tName = 'pc_tmp_products_return';
         $where = "WHERE returnType=3 ";
         OmAvailableModel::deleteTNameRow($tName, $where);
         BaseModel::commit();
         BaseModel::autoCommit();
         $status = "退料单 {$dataIostore['ordersn']} 生成成功";
         header("Location:index.php?mod=products&act=getInStoreList&status={$status}");
         exit;
     } catch (Exception $e) {
         BaseModel::rollback();
         BaseModel::autoCommit();
         $status = "系统错误,生成失败";
         header("Location:index.php?mod=products&act=getInStoreList&status={$status}");
         exit;
     }
 }
开发者ID:ohjack,项目名称:newErp,代码行数:84,代码来源:products.view.php

示例4: session_start

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);
    $dataConvertion['modifiedUserId'] = getPersonIdByName($user);
开发者ID:ohjack,项目名称:newErp,代码行数:30,代码来源:getLocationSkuConvertionToPcSkuConvertion.php

示例5: view_addCombineOn


//.........这里部分代码省略.........
             $combineHeight = $_POST['combineHeight' . $index] ? post_check(trim($_POST['combineHeight' . $index])) : '';
             $combineNote = $_POST['combineNote' . $index] ? trim($_POST['combineNote' . $index]) : '';
             $skuArr = $_POST['sku' . $index];
             $countArr = $_POST['count' . $index];
             $dataCom = array();
             $dataCom['combineSpu'] = $combineSpu;
             $dataCom['combineSku'] = $combineSku;
             $dataCom['combineCost'] = $combineCost;
             $dataCom['combineWeight'] = $combineWeight;
             $dataCom['combineLength'] = $combineLength;
             $dataCom['combineWidth'] = $combineWidth;
             $dataCom['combineHeight'] = $combineHeight;
             $dataCom['combineNote'] = $combineNote;
             $dataCom['combineUserId'] = $_SESSION['userId'];
             $dataCom['addTime'] = time();
             $tName = 'pc_goods_combine';
             $insertIdCom = OmAvailableModel::addTNameRow2arr($tName, $dataCom);
             if (!$insertIdCom) {
                 throw new Exception('add combine error');
             }
             $dataRelation = array();
             $dataRelationMem = array();
             for ($i = 0; $i < count($skuArr); $i++) {
                 if (!empty($skuArr[$i]) && !empty($countArr[$i])) {
                     $dataRelation[] = array('combineSku' => $combineSku, 'sku' => $skuArr[$i], 'count' => $countArr[$i]);
                     $dataRelationMem[] = array('sku' => $skuArr[$i], 'count' => $countArr[$i]);
                 }
             }
             if (!empty($dataRelation)) {
                 $tName = 'pc_sku_combine_relation';
                 $where = "WHERE combineSku='{$combineSku}'";
                 $dataRelationCount = OmAvailableModel::getTNameCount($tName, $where);
                 if ($dataRelationCount) {
                     OmAvailableModel::deleteTNameRow($tName, $where);
                 }
                 foreach ($dataRelation as $value) {
                     if (!empty($value['combineSku']) && !empty($value['sku']) && !empty($value['count'])) {
                         $insertId = OmAvailableModel::addTNameRow2arr($tName, $value);
                     }
                 }
             }
             if ($autoSpuList[0]['status'] != 2) {
                 $tName = 'pc_auto_create_spu';
                 $set = "SET status=2";
                 $where = "WHERE spu='{$combineSpu}'";
                 $affectRow = OmAvailableModel::updateTNameRow($tName, $set, $where);
             }
             //将新添加的sku添加到mem中
             $key = 'pc_goods_combine_' . $combineSku;
             $dataCom['detail'] = $dataRelationMem;
             $value = $dataCom;
             setMemNewByKey($key, $value);
             //这里不保证能添加成功
             //同步新数据到旧系统中
             $ebayProductsCombine = array();
             $ebayProductsCombine['id'] = $insertIdCom;
             $ebayProductsCombine['goods_sn'] = $combineSku;
             $goods_sncombine = array();
             $truesku = array();
             foreach ($dataRelationMem as $value) {
                 $str = '';
                 $strTrue = '';
                 $str = $value['sku'] . '*' . $value['count'];
                 $strTrue = '[' . $value['sku'] . ']';
                 $goods_sncombine[] = $str;
                 $truesku[] = $strTrue;
开发者ID:ohjack,项目名称:newErp,代码行数:67,代码来源:goods.view.php

示例6: act_updateSpuArchivePid

 function act_updateSpuArchivePid()
 {
     $spu = $_POST['spu'];
     $pid = $_POST['pid'];
     $userId = $_SESSION['userId'];
     if (intval($userId) <= 0) {
         self::$errCode = '100';
         self::$errMsg = "登陆超时,请重试";
         return false;
     }
     if (empty($spu) || empty($pid)) {
         self::$errCode = '101';
         self::$errMsg = "异常,错误!";
         return false;
     }
     $tName = 'pc_spu_archive';
     $select = 'categoryPath';
     $where = "WHERE is_delete=0 AND spu='{$spu}'";
     $spuList = OmAvailableModel::getTNameList($tName, $select, $where);
     if (empty($spuList)) {
         self::$errCode = '102';
         self::$errMsg = "该SPU档案不存在";
         return false;
     }
     if ($spuList[0]['categoryPath'] == $pid) {
         self::$errCode = '110';
         self::$errMsg = "类别无修改";
         return false;
     }
     $tName = 'pc_goods_category';
     $where = "WHERE path='{$pid}' and is_delete=0";
     $count = OmAvailableModel::getTNameCount($tName, $where);
     if (!$count) {
         self::$errCode = '103';
         self::$errMsg = "所选类别不存在,请刷新重试!";
         return false;
     }
     $where = "WHERE path like'{$pid}-%' and is_delete=0";
     $count = OmAvailableModel::getTNameCount($tName, $where);
     if ($count) {
         self::$errCode = '104';
         self::$errMsg = "产品档案只能建立在最小分类下,请选择最小分类";
         return false;
     }
     try {
         BaseModel::begin();
         $tName = 'pc_spu_archive';
         $where = "WHERE spu='{$spu}'";
         $dataTmpArr = array();
         $dataTmpArr['categoryPath'] = $pid;
         OmAvailableModel::updateTNameRow2arr($tName, $dataTmpArr, $where);
         //更新SPU档案的类别
         $tName = 'pc_archive_spu_property_value_relation';
         $where = "WHERE spu='{$spu}'";
         OmAvailableModel::deleteTNameRow($tName, $where);
         //物理删除该SPU产品档案选择属性记录
         $tName = 'pc_archive_spu_input_value_relation';
         $where = "WHERE spu='{$spu}'";
         OmAvailableModel::deleteTNameRow($tName, $where);
         //物理删除SPU产品档案文本记录
         $tName = 'pc_goods';
         $where = "WHERE is_delete=0 AND spu='{$spu}'";
         $dataTmpArr = array();
         $dataTmpArr['goodsCategory'] = $pid;
         OmAvailableModel::updateTNameRow2arr($tName, $dataTmpArr, $where);
         //更新该SPU下所有SKU的类别
         BaseModel::commit();
         BaseModel::autoCommit();
         OmAvailableModel::newData2ErpInterfOpen('pc.erp.updateGoodsCategoryBySpu', array('spu' => $spu, 'pid' => $pid), 'gw88');
         $personName = getPersonNameById($userId);
         error_log(date('Y-m-d_H:i') . " {$personName} 将SPU:{$spu} 类别改为 {$pid} 原始类别为: {$spuList[0]['categoryPath']} \r\n", 3, WEB_PATH . "log/updateSpuCategoryLog.txt");
         self::$errCode = 200;
         self::$errMsg = "修改成功";
         return true;
     } catch (Exception $e) {
         BaseModel::rollback();
         BaseModel::autoCommit();
         self::$errCode = 404;
         self::$errMsg = '修改失败,原因为:' . $e->getMessage();
         return false;
     }
 }
开发者ID:ohjack,项目名称:newErp,代码行数:82,代码来源:goods.action.php

示例7: view_updateInputOn

 public function view_updateInputOn()
 {
     $id = $_GET['id'];
     $inputName = $_GET['inputName'] ? post_check(trim($_GET['inputName'])) : '';
     $textStatus = $_GET['textStatus'] ? post_check(trim($_GET['textStatus'])) : '';
     $pid = $_GET['pid'] ? post_check(trim($_GET['pid'])) : '';
     if (intval($id) == 0) {
         $status = "属性Id错误";
         header("Location:index.php?mod=property&act=getInputList&status={$status}");
         exit;
     }
     if (intval($textStatus) <= 0) {
         $status = "文本方式有误";
         header("Location:index.php?mod=property&act=getInputList&status={$status}");
         exit;
     }
     if (empty($inputName)) {
         $tName = 'pc_archive_spu_input_value_relation';
         $where = "WHERE inputId={$id}";
         $countIN = OmAvailableModel::getTNameCount($tName, $where);
         if ($countIN) {
             $status = "该属性已经绑定了SPU,不能删除";
             header("Location:index.php?mod=property&act=getInputList&status={$status}");
             exit;
         }
         $tName = 'pc_archive_input';
         $where = "WHERE id={$id}";
         OmAvailableModel::deleteTNameRow($tName, $where);
         $status = "删除成功";
         header("Location:index.php?mod=property&act=getInputList&status={$status}");
         exit;
     }
     if (empty($pid)) {
         $status = "类型不能为空";
         header("Location:index.php?mod=property&act=getInputList&status={$status}");
         exit;
     }
     $tName = 'pc_archive_input';
     $select = '*';
     $where = "WHERE id='{$id}'";
     $inputList = OmAvailableModel::getTNameList($tName, $select, $where);
     if (empty($inputList)) {
         $status = "不存在该属性记录";
         header("Location:index.php?mod=property&act=getInputList&status={$status}");
         exit;
     }
     $categoryName = getAllCateNameByPath($pid);
     $pathImplodeStr = getAllPathBypid($pid);
     $pathImplodeStr = getAllPathBypid($pid);
     $i = strrpos($pathImplodeStr, ',');
     if ($i !== false) {
         $pathImplodeStr = substr($pathImplodeStr, 0, $i);
     }
     $where = "WHERE inputName='{$inputName}' and categoryPath IN ({$pathImplodeStr}) and id<>{$id}";
     $count = OmAvailableModel::getTNameCount($tName, $where);
     if ($count) {
         $status = "{$categoryName} 或其父类下已经存在 {$inputName} 属性";
         header("Location:index.php?mod=property&act=getInputList&status={$status}");
         exit;
     }
     $set = "SET inputName='{$inputName}',categoryPath='{$pid}',textStatus='{$textStatus}'";
     $where = "WHERE id='{$id}'";
     $affectRow = OmAvailableModel::updateTNameRow($tName, $set, $where);
     if (!$affectRow) {
         $status = "无数据修改";
         header("Location:index.php?mod=property&act=getInputList&status={$status}");
         exit;
     }
     $categoryName1 = getAllCateNameByPath($inputList[0]['categoryPath']);
     $categoryName2 = getAllCateNameByPath($pid);
     $status = "{$categoryName1} 下 {$inputList[0]['inputName']} 修改为 {$categoryName2} 下 {$inputName} 成功";
     header("Location:index.php?mod=property&act=getInputList&status={$status}");
 }
开发者ID:ohjack,项目名称:newErp,代码行数:73,代码来源:property.view.php

示例8: act_batchDelSpecialTMSpuOn

 public function act_batchDelSpecialTMSpuOn()
 {
     $spuIdArr = $_POST['spuIdArr'];
     if (!is_array($spuIdArr) || empty($spuIdArr)) {
         self::$errCode = '404';
         self::$errMsg = "请选择SPU";
         return false;
     }
     $spuIdStr = implode(',', $spuIdArr);
     $tName = 'pc_special_transport_manager_spu';
     $where = "WHERE id in({$spuIdStr})";
     OmAvailableModel::deleteTNameRow($tName, $where);
     self::$errCode = '200';
     self::$errMsg = "操作成功";
     return true;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:16,代码来源:spuSpecialProperty.action.php

示例9: view_updateSpuArchiveOn


//.........这里部分代码省略.........
                         $dataPro[] = $tmpArr;
                     }
                 }
             }
         }
     }
     $dataInp = array();
     $tName = 'pc_archive_input';
     $select = '*';
     $where = "WHERE categoryPath IN ({$pathImplodeStr})";
     $inpList = OmAvailableModel::getTNameList($tName, $select, $where);
     if (!empty($inpList)) {
         foreach ($inpList as $value) {
             $tmpArr = array();
             $tmpArr['spu'] = $spu;
             $tmpArr['inputId'] = $value['id'];
             $tmpArr['inputValue'] = $_POST['inp' . $value['id']];
             $dataInp[] = $tmpArr;
         }
     }
     try {
         BaseModel::begin();
         //pc_spu_archive中插入数据
         $tName = 'pc_spu_archive';
         $where = "WHERE spu='{$spu}'";
         $affectRowSpu = OmAvailableModel::updateTNameRow2arr($tName, $dataSpu, $where);
         if ($affectRowSpu === false) {
             throw new Exception('add pc_spu_archive error');
         }
         //add zqt 20140711 添加特殊属性
         if (!empty($spId) && is_array($spId)) {
             $tName = 'pc_special_property_spu';
             $where = "WHERE spu='{$spu}'";
             OmAvailableModel::deleteTNameRow($tName, $where);
             foreach ($spId as $propertyIdValue) {
                 $propertyIdValue = intval($propertyIdValue);
                 $dataTmpArr = array();
                 $dataTmpArr['propertyId'] = $propertyIdValue;
                 $dataTmpArr['spu'] = $spu;
                 OmAvailableModel::addTNameRow2arr($tName, $dataTmpArr);
             }
         }
         //add 20140526 更新PK细分SKU
         $tName = 'pc_spu_archive_pk_sku';
         $where = "WHERE spu='{$spu}'";
         OmAvailableModel::deleteTNameRow($tName, $where);
         //先删掉之前关联的记录
         foreach ($pkSkuArr as $value) {
             $tName = 'pc_spu_archive_pk_sku';
             $dataPkSkuArr['spu'] = $spu;
             $dataPkSkuArr['sku'] = $value;
             OmAvailableModel::addTNameRow2arr($tName, $dataPkSkuArr);
         }
         //pc_archive_spu_link中插入数据
         $tName = 'pc_archive_spu_link';
         if (!empty($dataLink)) {
             $affectRowDelLnk = OmAvailableModel::deleteTNameRow($tName, $where);
             if ($affectRowDelLnk === false) {
                 throw new Exception('delete pc_archive_spu_link error');
             }
             foreach ($dataLink as $value) {
                 if (!empty($value['linkUrl'])) {
                     $insertIdLink = OmAvailableModel::addTNameRow2arr($tName, $value);
                     if ($insertIdLink === false) {
                         throw new Exception('add pc_archive_spu_link error');
                     }
开发者ID:ohjack,项目名称:newErp,代码行数:67,代码来源:autoCreateSpu.view.php


注:本文中的OmAvailableModel::deleteTNameRow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。