|
|
@@ -184,7 +184,7 @@ class CostAccounting extends Api
|
|
|
->join('成本_各月其他费用 d', 'a.Sys_ny = d.sys_ny','left')
|
|
|
->field([
|
|
|
'a.Sys_ny' => '年月',
|
|
|
- 'a.车间' => '车间',
|
|
|
+ 'rtrim(a.车间)' => '车间',
|
|
|
'SUM(c.个人计件工资) + SUM(c.个人加班工资)' => '人工分摊因子总额',
|
|
|
'a.一线工资总额' => '车间实发工资',
|
|
|
'd.部门人员工资' => '部门人员工资实发',
|
|
|
@@ -556,7 +556,7 @@ class CostAccounting extends Api
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 车间人工工单详情
|
|
|
+ * 车间成本核算汇总
|
|
|
* @return void
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
|
@@ -582,4 +582,47 @@ class CostAccounting extends Api
|
|
|
$this->success('成功', $list);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ //创建各月水电气分摊
|
|
|
+// public function UtilitiesAdd()
|
|
|
+// {
|
|
|
+// if ($this->request->isGet() === false) {
|
|
|
+// $this->error('请求错误');
|
|
|
+// }
|
|
|
+// $param = $this->request->param();
|
|
|
+// if (empty($param)) {
|
|
|
+// $this->error('参数错误');
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
+
|
|
|
+ //各月水电气列表
|
|
|
+// public function UtilitiesList()
|
|
|
+// {
|
|
|
+//
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 成本汇总左侧列表
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function getSummaryTab()
|
|
|
+ {
|
|
|
+ if ($this->request->isGet() === false) {
|
|
|
+ $this->error('请求错误');
|
|
|
+ }
|
|
|
+ $months = db('成本v23_月度成本明细')
|
|
|
+ ->field('sys_ny AS year_month')
|
|
|
+ ->group('Sys_ny')
|
|
|
+ ->order('Sys_ny DESC')
|
|
|
+ ->column('Sys_ny');
|
|
|
+ $sist = ['胶印车间','凹丝印车间','印后车间','检验车间'];
|
|
|
+ $data = [];
|
|
|
+ foreach ($months as $month) {
|
|
|
+ $data[$month] = $sist;
|
|
|
+ }
|
|
|
+ $this->success('成功', $data);
|
|
|
+ }
|
|
|
}
|