|
@@ -6,9 +6,11 @@ define('BASE_ROOT_PATH',str_replace('/application/index/controller','',dirname(_
|
|
|
require_once(BASE_ROOT_PATH . '/extend/queue.php');
|
|
|
require_once(BASE_ROOT_PATH . '/extend/queue.logic.php');
|
|
|
|
|
|
+use app\index\model\ActionLogModel;
|
|
|
use app\index\model\BoxActionModel;
|
|
|
use app\index\model\CabinetModel;
|
|
|
use app\index\model\BoxModel;
|
|
|
+use app\index\model\MsgModel;
|
|
|
use app\index\model\OrderModel;
|
|
|
use app\index\model\UserModel;
|
|
|
use think\App;
|
|
@@ -46,6 +48,7 @@ class Cabinet extends Base
|
|
|
if($flag['code'] != 1){
|
|
|
return json(json_error_exception('1006',$flag['msg']));
|
|
|
}
|
|
|
+ $this->action_log();
|
|
|
json_success([]);
|
|
|
}
|
|
|
|
|
@@ -73,7 +76,8 @@ class Cabinet extends Base
|
|
|
if($result == false) {
|
|
|
json_error(2000);
|
|
|
} else {
|
|
|
- json_success($result);
|
|
|
+ $this->action_log();
|
|
|
+ json_success($result['data']);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -98,6 +102,7 @@ class Cabinet extends Base
|
|
|
if($result == false) {
|
|
|
json_error(2000);
|
|
|
} else {
|
|
|
+ $this->action_log();
|
|
|
json_success($result);
|
|
|
}
|
|
|
}
|
|
@@ -213,6 +218,7 @@ class Cabinet extends Base
|
|
|
}
|
|
|
$return['total'] = $CabinetModel->getAllCabinets(); //总数量
|
|
|
$return['rows'] = $selectResult;
|
|
|
+ $this->action_log();
|
|
|
json_success($return);
|
|
|
}
|
|
|
|
|
@@ -231,6 +237,7 @@ class Cabinet extends Base
|
|
|
}
|
|
|
$return['total'] = $BoxModel->getAllCounts(); //总数量
|
|
|
$return['rows'] = $selectResult;
|
|
|
+ $this->action_log();
|
|
|
json_success($return);
|
|
|
}
|
|
|
public function BoxActionList(){
|
|
@@ -253,6 +260,47 @@ class Cabinet extends Base
|
|
|
}
|
|
|
$return['total'] = $BoxActionModel->getAllCounts($where); //总数量
|
|
|
$return['rows'] = $selectResult;
|
|
|
+ $this->action_log();
|
|
|
+ json_success($return);
|
|
|
+ }
|
|
|
+ public function MsgList(){
|
|
|
+ $param = input('param.');
|
|
|
+ if(empty($param['cabinet_number']) || empty($param['box_number'])){
|
|
|
+ json_error(1007 , '柜子号码或箱子号码不能为空');
|
|
|
+ }
|
|
|
+ $where['cabinet_number'] = $param['cabinet_number'];
|
|
|
+ $where['box_number'] = $param['box_number'];
|
|
|
+ $limit = isset($param['pageSize']) ? $param['pageSize'] : 10;
|
|
|
+ $param['pageNumber'] = isset($param['pageNumber']) ? $param['pageNumber'] : 1;
|
|
|
+ $offset = ($param['pageNumber'] - 1) * $limit;
|
|
|
+
|
|
|
+ $MsgModel = new MsgModel();
|
|
|
+ $selectResult = $MsgModel->getMsgsByWhere($where , $offset, $limit);
|
|
|
+ $status = ['1' => '存入上报' , '2' => '取走上报'];
|
|
|
+ // 拼装参数
|
|
|
+ foreach($selectResult as $key=>$vo){
|
|
|
+ $selectResult[$key]['status_text'] = $status[$vo['type']];
|
|
|
+ }
|
|
|
+ $return['total'] = $MsgModel->getAllCounts($where); //总数量
|
|
|
+ $return['rows'] = $selectResult;
|
|
|
+ $this->action_log();
|
|
|
+ json_success($return);
|
|
|
+ }
|
|
|
+ public function ActionLogList(){
|
|
|
+ $param = input('param.');
|
|
|
+ $limit = isset($param['pageSize']) ? $param['pageSize'] : 10;
|
|
|
+ $param['pageNumber'] = isset($param['pageNumber']) ? $param['pageNumber'] : 1;
|
|
|
+ $offset = ($param['pageNumber'] - 1) * $limit;
|
|
|
+
|
|
|
+ $ActionLogModel = new ActionLogModel();
|
|
|
+ $selectResult = $ActionLogModel->getActionLogsByWhere($offset, $limit);
|
|
|
+ // 拼装参数
|
|
|
+ foreach($selectResult as $key=>$vo){
|
|
|
+
|
|
|
+ }
|
|
|
+ $return['total'] = $ActionLogModel->getAllCounts(); //总数量
|
|
|
+ $return['rows'] = $selectResult;
|
|
|
+ $this->action_log();
|
|
|
json_success($return);
|
|
|
}
|
|
|
|