|
@@ -523,10 +523,35 @@ class CostAccounting extends Api
|
|
|
$result = [];
|
|
$result = [];
|
|
|
foreach ($stats as $item) {
|
|
foreach ($stats as $item) {
|
|
|
$result[] = [
|
|
$result[] = [
|
|
|
|
|
+ '年月' => $param['month'],
|
|
|
'车间' => $item['workshop'],
|
|
'车间' => $item['workshop'],
|
|
|
'色度数' => number_format($item['total'], 2)
|
|
'色度数' => number_format($item['total'], 2)
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
$this->success('成功', $result);
|
|
$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);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|