|
@@ -41,11 +41,11 @@ class CostAccounting extends Api
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 3. 数据库查询优化
|
|
// 3. 数据库查询优化
|
|
|
- $months = db('成本_各月水电气')
|
|
|
|
|
- ->field('Sys_ny AS year_month')
|
|
|
|
|
- ->group('Sys_ny')
|
|
|
|
|
- ->order('Sys_ny DESC')
|
|
|
|
|
- ->column('Sys_ny');
|
|
|
|
|
|
|
+ $months = db('成本v23_月度成本明细')
|
|
|
|
|
+ ->field('sys_ny AS year_month')
|
|
|
|
|
+ ->group('sys_ny')
|
|
|
|
|
+ ->order('sys_ny DESC')
|
|
|
|
|
+ ->column('sys_ny');
|
|
|
|
|
|
|
|
// 4. 使用模板构建策略
|
|
// 4. 使用模板构建策略
|
|
|
$data = [];
|
|
$data = [];
|
|
@@ -712,31 +712,21 @@ class CostAccounting extends Api
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//水电气分摊费用下方明细列表
|
|
//水电气分摊费用下方明细列表
|
|
|
- public function shuidianqiMachineDetailList()
|
|
|
|
|
- {
|
|
|
|
|
- if ($this->request->isGet() === false) {
|
|
|
|
|
- $this->error('请求错误');
|
|
|
|
|
- }
|
|
|
|
|
- $param = $this->request->param();
|
|
|
|
|
- if (empty($param)) {
|
|
|
|
|
- $this->error('参数错误');
|
|
|
|
|
- }
|
|
|
|
|
- $sist = ['胶印车间','凹丝印车间','印后车间','检验车间'];
|
|
|
|
|
- if (strpos($param['sist'],'车间') === false) {
|
|
|
|
|
- $number = db('成本_各月水电气')
|
|
|
|
|
- ->where('Sys_ny', $param['month'])
|
|
|
|
|
- ->where('部门名称', $param['sist'])
|
|
|
|
|
- ->where('费用类型', '分摊')
|
|
|
|
|
- ->value('');
|
|
|
|
|
- }else{
|
|
|
|
|
- $machineList = db('设备_基本资料')
|
|
|
|
|
- ->where('使用部门', $param['sist'])
|
|
|
|
|
- ->where('sys_sbID', '<>', '')
|
|
|
|
|
- ->order('设备编号')
|
|
|
|
|
- ->column('设备编号');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// public function shuidianqiMachineDetailList()
|
|
|
|
|
+// {
|
|
|
|
|
+// if ($this->request->isGet() === false) {
|
|
|
|
|
+// $this->error('请求错误');
|
|
|
|
|
+// }
|
|
|
|
|
+// $param = $this->request->param();
|
|
|
|
|
+// if (empty($param)) {
|
|
|
|
|
+// $this->error('参数错误');
|
|
|
|
|
+// }
|
|
|
|
|
+// $list = db('设备_基本资料')
|
|
|
|
|
+// ->alias('a')
|
|
|
|
|
+// ->join('成本_各月分摊系数 b', 'a.设备编号 = b.设备编号', 'LEFT')
|
|
|
|
|
+// ->field()
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 其他待摊费用
|
|
* 其他待摊费用
|
|
@@ -1028,4 +1018,16 @@ class CostAccounting extends Api
|
|
|
// return $data;
|
|
// return $data;
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public function materialRequisition()
|
|
|
|
|
+ {
|
|
|
|
|
+ if ($this->request->isGet() === false) {
|
|
|
|
|
+ $this->error('请求错误');
|
|
|
|
|
+ }
|
|
|
|
|
+ $param = $this->request->param();
|
|
|
|
|
+ if (empty($param)) {
|
|
|
|
|
+ $this->error('参数错误');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|