unknown 7 месяцев назад
Родитель
Сommit
1ed83aec70
1 измененных файлов с 25 добавлено и 0 удалено
  1. 25 0
      application/api/controller/CostAccounting.php

+ 25 - 0
application/api/controller/CostAccounting.php

@@ -523,10 +523,35 @@ class CostAccounting extends Api
         $result = [];
         foreach ($stats as $item) {
             $result[] = [
+                '年月' => $param['month'],
                 '车间' => $item['workshop'],
                 '色度数' => number_format($item['total'], 2)
             ];
         }
         $this->success('成功', $result);
     }
+
+    /**
+     * 车间色度数详情列表
+     * @return void
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     */
+    public function MonochromaticDetailList()
+    {
+        if ($this->request->isGet() === false) {
+            $this->error('请求错误');
+        }
+        $param = $this->request->param();
+        if (empty($param)) {
+            $this->error('参数错误');
+        }
+        $list = db('成本_各月色度数')
+            ->where('年月', $param['month'])
+            ->where('部门', $param['sist'])
+            ->order('sczl_gdbh')
+            ->select();
+        $this->success('成功', $list);
+    }
 }