mirror of
https://gitee.com/ShopeX/OMS
synced 2026-08-06 03:56:23 +08:00
[TBID:SCRUM-7403] fix: apprid存在SQL注入漏洞
# Conflicts: # app/console/controller/admin/iostockorder.php # app/console/controller/admin/stockdump.php # app/console/lib/finder/stockdump.php # app/console/view/admin/iostock/instock_item.html # app/console/view/admin/iostock/outstock_item.html # app/console/view/admin/stockdump/stockdump_detail_item.html # app/console/view/admin/stockdump/stockdump_more_item.html
This commit is contained in:
@@ -1152,70 +1152,6 @@ class console_ctl_admin_iostockorder extends desktop_controller
|
||||
$this->finder('taoguaniostockorder_mdl_iso', $params);
|
||||
} // end func
|
||||
|
||||
/**
|
||||
* 更多
|
||||
* @param type $varname description
|
||||
* @return type description
|
||||
* @access public
|
||||
* @author cyyr24@sina.cn
|
||||
*/
|
||||
public function more_items($iso_id)
|
||||
{
|
||||
$basicMaterialObj = app::get('material')->model('basic_material');
|
||||
$basicMaterialLib = kernel::single('material_basic_material');
|
||||
$basicMaterialBarcode = kernel::single('material_basic_material_barcode');
|
||||
|
||||
$isoObj = app::get('taoguaniostockorder')->model('iso');
|
||||
|
||||
$iso = $isoObj->dump($iso_id, 'iso_id', array('iso_items' => array('*')));
|
||||
foreach ($iso['iso_items'] as $k => $order_item) {
|
||||
$product = $basicMaterialObj->dump(array('bm_id' => $order_item['product_id']), 'bm_id, material_bn, material_name');
|
||||
|
||||
#查询关联的条形码
|
||||
$product['barcode'] = $basicMaterialBarcode->getBarcodeById($order_item['product_id']);
|
||||
|
||||
$order_item['spec_info'] = $product['spec_info'];
|
||||
$order_item['barcode'] = $product['barcode'];
|
||||
$iso['iso_items'][$k] = $order_item;
|
||||
}
|
||||
$finder_id = $_GET['_finder']['finder_id'];
|
||||
$appr_id = $_GET['apprid'];
|
||||
$render = app::get('console')->render();
|
||||
|
||||
$itemObj = app::get('console')->model('stockdump_items');
|
||||
$omeObj = app::get('ome')->render();
|
||||
$page = $_GET['page'] ? $_GET['page'] : 1;
|
||||
$pagelimit = 10;
|
||||
$offset = ($page - 1) * $pagelimit;
|
||||
$sql = "SELECT COUNT(*) FROM `sdb_console_stockdump_items` WHERE stockdump_id =" . $appr_id;
|
||||
$tmp = kernel::database()->select($sql);
|
||||
$items = $itemObj->getList('*', array('stockdump_id' => $appr_id), $offset, $pagelimit);
|
||||
$count = $tmp[0]['COUNT(*)'];
|
||||
$total_page = ceil($count / $pagelimit);
|
||||
$pager = $this->ui()->pager(array(
|
||||
'current' => $page,
|
||||
'total' => $total_page,
|
||||
'link' => 'index.php?app=console&ctl=admin_stockdump&act=more_items&apprid=' . $appr_id . '&page=%d',
|
||||
));
|
||||
|
||||
if ($items) {
|
||||
foreach ($items as $key => $item) {
|
||||
//将商品的显示名称改为后台的显示名称
|
||||
$product = $basicMaterialObj->dump(array('material_bn' => $items[$key]['bn']), 'bm_id');
|
||||
|
||||
$product_name = $basicMaterialLib->getBasicMaterialExt($product['bm_id']);
|
||||
|
||||
$items[$key]['product_name'] = $product_name['material_name'];
|
||||
$items[$key]['spec_info'] = $product_name['spec_info'];
|
||||
$items[$key]['unit'] = $product_name['unit'];
|
||||
}
|
||||
}
|
||||
|
||||
$render->pagedata['items'] = $items;
|
||||
$render->pagedata['pager'] = $pager;
|
||||
$this->singlepage('admin/stockdump/stockdump_more_item.html');
|
||||
}
|
||||
|
||||
/**
|
||||
* 单据发送至第三方.
|
||||
* @param
|
||||
|
||||
@@ -238,65 +238,15 @@ class console_ctl_admin_stockdump extends desktop_controller{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* more_items
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function more_items(){
|
||||
$finder_id = $_GET['_finder']['finder_id'];
|
||||
$appr_id = $_GET['apprid'];
|
||||
$render = app::get('console')->render();
|
||||
|
||||
$basicMaterialObj = app::get('material')->model('basic_material');
|
||||
$basicMaterialLib = kernel::single('material_basic_material');
|
||||
|
||||
$itemObj = app::get('console')->model('stockdump_items');
|
||||
$omeObj = app::get('ome')->render();
|
||||
$page = $_GET['page'] ? $_GET['page'] : 1;
|
||||
$pagelimit = 10;
|
||||
$offset = ($page-1)*$pagelimit;
|
||||
$sql = "SELECT COUNT(*) FROM `sdb_console_stockdump_items` WHERE stockdump_id =".$appr_id;
|
||||
$tmp = kernel::database()->select($sql);
|
||||
$items = $itemObj->getList('*',array('stockdump_id'=>$appr_id),$offset,$pagelimit);
|
||||
$count = $tmp[0]['COUNT(*)'];
|
||||
$total_page = ceil($count/$pagelimit);
|
||||
$pager = $this->ui()->pager(array(
|
||||
'current'=>$page,
|
||||
'total'=>$total_page,
|
||||
'link'=>'index.php?app=console&ctl=admin_stockdump&act=more_items&apprid='.$appr_id.'&page=%d&finder_id='.$finder_id,
|
||||
));
|
||||
|
||||
if ($items)
|
||||
foreach ($items as $key => $item)
|
||||
{
|
||||
//将商品的显示名称改为后台的显示名称
|
||||
$bm_ids = $basicMaterialObj->dump(array('material_bn'=>$items[$key]['bn']), 'bm_id');
|
||||
|
||||
$product_name = $basicMaterialLib->getBasicMaterialExt($bm_ids['bm_id']);
|
||||
|
||||
$items[$key]['product_name'] = $product_name['material_name'];
|
||||
$items[$key]['spec_info'] = $product_name['specifications'];
|
||||
$items[$key]['unit'] = $product_name['unit'];
|
||||
|
||||
}
|
||||
|
||||
$render->pagedata['items'] = $items;
|
||||
$render->pagedata['pager'] = $pager;
|
||||
$this->singlepage('admin/stockdump/stockdump_more_item.html');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取_wms_branch
|
||||
* @return mixed 返回结果
|
||||
*/
|
||||
public function get_wms_branch(){
|
||||
$branch_id = $_POST['branch_id'];
|
||||
$branch_id = intval($_POST['branch_id']);
|
||||
if ($branch_id <= 0) {
|
||||
echo '';
|
||||
return;
|
||||
}
|
||||
$branch_model = app::get('ome')->model('branch');
|
||||
|
||||
$sql = "SELECT wb.wms_id,wb.branch_bn FROM `sdb_ome_branch` as wb
|
||||
|
||||
WHERE wb.branch_id = ".$branch_id;
|
||||
|
||||
$sql = "SELECT wb.wms_id,wb.branch_bn FROM `sdb_ome_branch` as wb WHERE wb.branch_id = ".$branch_id;
|
||||
$wms_info = kernel::database()->select($sql);
|
||||
$bn_array = array();
|
||||
$bn_str = '';
|
||||
|
||||
@@ -37,7 +37,7 @@ class console_finder_stockdump{
|
||||
|
||||
$appObj = app::get('console')->model('stockdump');
|
||||
$itemObj = app::get('console')->model('stockdump_items');
|
||||
$items = $itemObj->getList('*',array('stockdump_id'=>$appr_id),0,100);
|
||||
$items = $itemObj->getList('*',array('stockdump_id'=>$appr_id),0,-1);
|
||||
|
||||
if ($items)
|
||||
foreach ($items as $key => $item)
|
||||
@@ -56,22 +56,14 @@ class console_finder_stockdump{
|
||||
$showPurchasePrice = false;
|
||||
}
|
||||
$render->pagedata['show_purchase_price'] = $showPurchasePrice;
|
||||
$finder_id = $_GET['_finder']['finder_id'];
|
||||
|
||||
$render->pagedata['items'] = $items;
|
||||
$render->pagedata['finder_id'] = $finder_id;
|
||||
$render->pagedata['appr_id'] = $appr_id;
|
||||
return $render->fetch('admin/stockdump/stockdump_detail_item.html');
|
||||
}
|
||||
|
||||
|
||||
var $column_operation = '操作';
|
||||
var $column_operation_width = 90;
|
||||
/**
|
||||
* column_operation
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_operation($row){
|
||||
$return = '';
|
||||
$stockdump_id = $row['stockdump_id'];
|
||||
@@ -99,11 +91,6 @@ class console_finder_stockdump{
|
||||
|
||||
var $column_confirm_type = '确认状态';
|
||||
var $column_confirm_type_width = 80;
|
||||
/**
|
||||
* column_confirm_type
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_confirm_type($row){
|
||||
$return = '';
|
||||
$stockdump_id = $row['stockdump_id'];
|
||||
@@ -124,11 +111,6 @@ class console_finder_stockdump{
|
||||
|
||||
var $column_confirm_name = '确认人';
|
||||
var $column_confirm_name_width = 80;
|
||||
/**
|
||||
* column_confirm_name
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_confirm_name($row){
|
||||
$return = '';
|
||||
$stockdump_id = $row['stockdump_id'];
|
||||
@@ -140,11 +122,6 @@ class console_finder_stockdump{
|
||||
|
||||
var $column_confirm_time = '确认日期';
|
||||
var $column_confirm_time_width = 140;
|
||||
/**
|
||||
* column_confirm_time
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_confirm_time($row){
|
||||
$return = '';
|
||||
$stockdump_id = $row['stockdump_id'];
|
||||
@@ -160,11 +137,6 @@ class console_finder_stockdump{
|
||||
|
||||
var $column_op_time = ' 处理时长';
|
||||
var $column_op_time_width = 80;
|
||||
/**
|
||||
* column_op_time
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_op_time($row){
|
||||
$stockdump_id = $row['stockdump_id'];
|
||||
$appObj = app::get('console')->model('stockdump');
|
||||
@@ -186,11 +158,6 @@ class console_finder_stockdump{
|
||||
|
||||
var $column_time_remind = ' 超时提醒';
|
||||
var $column_time_remind_width = 80;
|
||||
/**
|
||||
* column_time_remind
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_time_remind($row){
|
||||
$stockdump_remind_setting_days = app::get("omestorage")->getConf("stockdump_remind_setting_days");
|
||||
if($stockdump_remind_setting_days == 'nosetting')
|
||||
@@ -209,11 +176,6 @@ class console_finder_stockdump{
|
||||
|
||||
var $column_sync_status = ' 同步状态';
|
||||
var $column_sync_status_width = 80;
|
||||
/**
|
||||
* column_sync_status
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_sync_status($row){
|
||||
$stockdump_id = $row['stockdump_id'];
|
||||
$appObj = app::get('console')->model('stockdump');
|
||||
@@ -238,11 +200,6 @@ class console_finder_stockdump{
|
||||
|
||||
var $column_type = '单据状态';
|
||||
var $column_type_width = 80;
|
||||
/**
|
||||
* column_type
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_type($row){
|
||||
$return = '';
|
||||
$stockdump_id = $row['stockdump_id'];
|
||||
@@ -272,11 +229,6 @@ class console_finder_stockdump{
|
||||
|
||||
var $column_to_branch_id = '调入仓库';
|
||||
var $column_to_branch_id_width = 120;
|
||||
/**
|
||||
* column_to_branch_id
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_to_branch_id($row){
|
||||
$return = '';
|
||||
$stockdump_id = $row['stockdump_id'];
|
||||
@@ -291,11 +243,6 @@ class console_finder_stockdump{
|
||||
|
||||
var $column_from_branch_name = '调出仓库';
|
||||
var $column_from_branch_name_width = 120;
|
||||
/**
|
||||
* column_from_branch_name
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_from_branch_name($row){
|
||||
$return = '';
|
||||
$stockdump_id = $row['stockdump_id'];
|
||||
@@ -310,11 +257,6 @@ class console_finder_stockdump{
|
||||
|
||||
var $column_memo = '备注';
|
||||
var $column_memo_width = 200;
|
||||
/**
|
||||
* column_memo
|
||||
* @param mixed $row row
|
||||
* @return mixed 返回值
|
||||
*/
|
||||
public function column_memo($row){
|
||||
$return = '';
|
||||
$stockdump_id = $row['stockdump_id'];
|
||||
|
||||
@@ -93,9 +93,3 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div style="width:100%;text-align:right;line-height:25px;">
|
||||
<a href='index.php?app=console&ctl=admin_iostockorder&act=more_items&iso_id=<{$appr_id}>' target="_blank">查看更多</a>
|
||||
</div>
|
||||
-->
|
||||
@@ -88,8 +88,3 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div style="width:100%;text-align:right;line-height:25px;">
|
||||
<a href='index.php?app=console&ctl=admin_iostockorder&act=more_items&iso_id=<{$appr_id}>' target="_blank">查看更多</a>
|
||||
</div>
|
||||
-->
|
||||
@@ -44,8 +44,5 @@
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="width:100%;text-align:right;line-height:25px;">
|
||||
<a href='index.php?app=console&ctl=admin_stockdump&act=more_items&apprid=<{$appr_id}>&finder_id=<{$finder_id}>' target="_blank">查看更多</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user