|
@@ -574,15 +574,26 @@ class CostAccounting extends Api
|
|
|
if (empty($param)) {
|
|
if (empty($param)) {
|
|
|
$this->error('参数错误');
|
|
$this->error('参数错误');
|
|
|
}
|
|
}
|
|
|
|
|
+ $page = $this->request->param('page', 1);
|
|
|
|
|
+ $pageSize = $this->request->param('limit', 30);
|
|
|
|
|
+ $total = db('成本v23_月度成本明细')
|
|
|
|
|
+ ->where('车间名称', $param['sist'])
|
|
|
|
|
+ ->where('sys_ny', $param['month'])
|
|
|
|
|
+ ->count();
|
|
|
$list = db('成本v23_月度成本明细')
|
|
$list = db('成本v23_月度成本明细')
|
|
|
->where('车间名称', $param['sist'])
|
|
->where('车间名称', $param['sist'])
|
|
|
->where('sys_ny', $param['month'])
|
|
->where('sys_ny', $param['month'])
|
|
|
->order('sczl_gdbh')
|
|
->order('sczl_gdbh')
|
|
|
|
|
+ ->page($page, $pageSize)
|
|
|
->select();
|
|
->select();
|
|
|
|
|
+ $data = [
|
|
|
|
|
+ 'total' => $total,
|
|
|
|
|
+ 'list' => $list,
|
|
|
|
|
+ ];
|
|
|
if (empty($list)) {
|
|
if (empty($list)) {
|
|
|
$this->error('未找到数据');
|
|
$this->error('未找到数据');
|
|
|
}else{
|
|
}else{
|
|
|
- $this->success('成功', $list);
|
|
|
|
|
|
|
+ $this->success('成功', $data);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|