对接 PDA 问题件扫描确认上架
来源:互联网 发布:淘宝上正品金丝楠木店 编辑:程序博客网 时间:2024/04/30 09:31
/* * 订单信息验证 * @param params=>array('header'=>用户/TOKEN/KEY,'data'=>订单数据验证,'methods') //json data * @return array('status'=>1成功/0失败,'msg'=>系统信息,'systime'=>系统时间,'data'=>返回数据) //joson data * */ public function svcAction() { //问题件扫描确认 if ( $params->methods == 'ProblemProductInfo' ) { //接收 PDA 扫描数据 $problem_product = isset( $params->data->ProblemProduct ) ? $params->data->ProblemProduct : ''; //嵌套查询(订单号、跟踪号、物流单号) if( !empty( $problem_product ) ) { $condition = array( 'order_code' => $problem_product ); $Info = Order_Service_ProblemOrder::getByCondition( $condition ); if( !$Info ) { $condition = array( 'ref_tracking_number' => $problem_product ); $Info = Order_Service_ProblemOrder::getByCondition( $condition ); if( !$Info ) { $condition = array( 'tracking_number' => $problem_product ); $Info = Order_Service_ProblemOrder::getByCondition( $condition ); } } } //返回订单状态 if ( !empty( $Info ) ) { foreach ( $Info as $value ) { if ( $value['po_status'] == 0 ) { $po_status = "删除"; } else if ( $value['po_status'] == 1 ) { $po_status = "草稿"; } else if ( $value['po_status'] == 2 ) { $po_status = "待客服处理"; } else if ( $value['po_status'] == 3 ) { $po_status = "待操作处理"; } else if ( $value['po_status'] == 4 ) { $po_status = "处理完成"; } } $return['status'] = 1; $return['msg'] = "成功"; $return['data'] = array( 'po_status' => $po_status ); } else { $return['status'] = 0; $return['msg'] = "问题件不存在"; } die( json_encode( $return ) ); } //问题件上架 if ( $params->methods == 'ProblemShelvesInfo' ) { //接收 PDA 扫描数据 $problem_product = isset( $params->data->ProblemProduct ) ? $params->data->ProblemProduct : ''; $ws_code = isset( $params->data->ws_code ) ? $params->data->ws_code : ''; //确认货位号是否在该货架上 $condition = array( 'ws_code' => $ws_code ); $Info = Warehouse_Service_Shelf::getByCondition( $condition ); if ( !empty( $Info ) ) { //确认该货架是否在不良区 foreach ( $Info as $value ) { $wa_type = Warehouse_Service_Area::getByWaCode( $value['wa_code'] ); } if ( $wa_type['wa_type'] == 2 ) { //嵌套查询订单号是否存在货位号(订单号、跟踪号、物流单号) if( !empty( $problem_product ) ) { $data = array( 'order_code' => $problem_product ); $problem_orderInfo = Order_Service_ProblemOrder::getByCondition( $data ); if( empty( $problem_orderInfo ) ) { $data = array( 'ref_tracking_number' => $problem_product ); $problem_orderInfo = Order_Service_ProblemOrder::getByCondition( $data ); if( empty( $problem_orderInfo ) ) { $data = array( 'tracking_number' => $problem_product ); $problem_orderInfo = Order_Service_ProblemOrder::getByCondition( $data ); } } } if ( !empty( $problem_orderInfo ) ) { //订单号绑定货位号 foreach ( $problem_orderInfo as $v ) { if ( $v['po_status'] == 4 ) { $return['status'] = 0; $return['msg'] = "处理完成订单不能再次上架"; } else { if ( empty( $v['ws_code'] ) ) { $problem_orderList = Order_Service_ProblemOrder::update( $condition, $v['po_id'] ); $return['status'] = 1; $return['msg'] = "上架成功"; } else { $return['status'] = 0; $return['msg'] = "该订单号已绑定货位号"; } } } } else { $return['status'] = 0; $return['msg'] = "问题件不存在"; } } else { $return['status'] = 0; $return['msg'] = "不良品区不存在该货位号"; } } else { $return['status'] = 0; $return['msg'] = "货位号不存在"; } die( json_encode( $return ) ); }}
阅读全文
0 0
- 对接 PDA 问题件扫描确认上架
- 思讯服装之星V8盘点机条码数据采集器无线条码扫描枪智能终端PDA-汉码盘点机无缝对接
- Android扫描枪(PDA)开发
- Android扫描枪(PDA)开发
- Android扫描枪(PDA)开发
- Pda 数据库同步问题
- wince系统PDA 条码扫描 设计
- NC PAD 扫描C# 与PDA开发
- PDA物流快递条码扫描系统
- 防窜货PDA扫描程序 APP 出入库扫描打印
- 新手App上架问题
- 上架 出现的问题
- 上架问题汇总
- IOS上架审核问题
- 第二次上架的问题
- 工行B2C对接问题
- onvif对接问题汇总
- PDA
- bzoj 3505 数三角形 组合数 解题报告
- RecyclerView瀑布流如何动态计算imageview的宽高
- android 引导页的制作
- SAP审批策略相关表
- 开发中常见小问题(笔记)
- 对接 PDA 问题件扫描确认上架
- Python中的下划线'_'用法
- maven打包的时候报错:Failed to execute goalcom.google.code.maven-svn-revision-number-plugin:svn-revision-num
- Java中ArrayList和LinkedList区别
- 简单工厂模式
- CentOS 7 系列(二)系统服务配置--单元(Unit)
- 史上最全最强SpringMVC详细示例实战教程
- 基于React.js + ANT DESIGN 中使用异步请求之----fetch封装
- Attribute 和 Parameter 的区别