load->_model("Model_zzquque_u9",'zzquque_u9'); $this->load->_model("Model_aaconf","aaconf"); $this->load->_model("Model_logic_u9xg",'logic_u9xg'); $this->load->_model("Model_logic_order","logic_order"); } //定义方法的调用规则 获取URI第二段值 public function _remap($arg,$arg_array) { $api = $this->input->get('api',true); if($api != $this->api){ exit('No direct script access allowed'); } if($arg == 'xdls')//执行小单的流转到临时仓的队列 { $this->_xdls(); } else { $this->_index(); } } public function _index(){ //执行第一步的参数 // $list = $this->zzquque_u9->find_all(); // $do_list = []; // foreach($list as $k=>$v){ // $tmp_info = $this->logic_order->getInfoByType($v['platform'],$v['order_no']); // $tmp_info['zq_u9_id'] = $v['id']; // $do_list[] = $tmp_info; // } // $this->logic_u9xg->xdlsOneStep($do_list); //执行第二步的参数 // $list = $this->zzquque_u9->find_all("dc_status = 1 and xs_status = 1 and cg_status = 1 and type = 10 and update_time <=".(time() - 300)); // $this->logic_u9xg->xdlsTwoStep($list); //执行第三部参数 // $list = $this->zzquque_u9->find_all(); // $this->logic_u9xg->xdlsThreeStep($list); //执行第四部的参数 生成销售单 // $list = $this->zzquque_u9->find_all(); // $do_list = []; // foreach($list as $k=>$v){ // $tmp_info = $this->logic_order->getInfoByType($v['platform'],$v['order_no']); // $tmp_info['zq_u9_id'] = $v['id']; // $do_list[] = $tmp_info; // } // $this->logic_u9xg->xdlsFourStep($do_list); //执行第五步骤 审核销售单 并同时生成标准出货单 $list = $this->zzquque_u9->find_all(" xs_two_no = 'SO2502280045' "); $this->logic_u9xg->xdlsFivestep($list); // $list = $this->zzquque_u9->find_all(""); // $this->logic_u9xg->xdlsSixStep($list); exit('No direct script access allowed index'."
"); } //执行小单的流转到临时仓的队列 public function _xdls(){ //第一步生成 许昌成品库的调出单 // $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 0 and cg_status = 0 and xs_status = 0 and order_no = 'KISS-50123-003'"); // $do_list = []; // foreach($list as $k=>$v){ // $tmp_info = $this->logic_order->getInfoByPlat($v['platform'],$v['order_no']); // $tmp_info['zq_u9_id'] = $v['id']; // $do_list[] = $tmp_info; // } // $this->logic_u9xg->xdlsOneStep($do_list); //sleep(3); //第二步 提交审核第一步的采购单和销售单 // $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 1 and cg_status = 1 and xs_status = 1 and order_no = 'KISS-50123-003'"); // $this->logic_u9xg->xdlsTwoStep($list); //第三步 查询调出单生成的调入单是否生成 如果生成了就审核 如果没生成 说明异常了 这种都是按步骤走的 // $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 1 and cg_status = 3 and xs_status = 3 and dr_status = 0 and order_no = 'KISS-50123-003'"); // $this->logic_u9xg->xdlsThreeStep($list); //第四步 建立香港的销售单 标准出库单有源的需要先审核 先创建销售单 // $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and cg_status = 3 and xs_status = 3 and dr_status = 3 and xs_two_status = 0 and order_no = 'KISS-50123-003'"); // $do_list = []; // foreach($list as $k=>$v){ // $tmp_info = $this->logic_order->getInfoByType($v['platform'],$v['order_no']); // $tmp_info['zq_u9_id'] = $v['id']; // $do_list[] = $tmp_info; // } // $this->logic_u9xg->xdlsFourStep($do_list); //执行第五步骤 审核销售单 并同时生成标准出货单 // $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and cg_status = 3 and xs_status = 3 and dr_status = 3 and xs_two_status = 1 and bzch_status = 0 and order_no = 'KISS-50123-003'"); // $this->logic_u9xg->xdlsFivestep($list); // sleep(3); // $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and cg_status = 3 and xs_status = 3 and dr_status = 3 and xs_two_status = 3 and bzch_status = 1 and order_no = 'KISS-50123-003'"); // $this->logic_u9xg->xdlsSixStep($list); } }