| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- class GlluSalaryCalculation extends Api
- {
- protected $noNeedLogin = ['*'];
- protected $noNeedRight = ['*'];
- public function salaryCalculation()
- {
- if(!$this->request->isGet()){
- $this->error('请求错误');
- }
- $params = $this->request->param();
- if (!isset($params['month']) || empty($params['month'])) {
- $this->error('参数错误');
- }
- //糊盒计件产量
- $filds = "a.sczl_gdbh as 工单编号,a.sczl_yjno as 印件号,a.sczl_gxh as 工序号,a.sczl_gxmc as 工序名称,a.sczl_cl as 产量,a.sczl_rq as 日期,
- a.sczl_ls as 联数,a.sczl_dedh as 定额代号,a.工价系数,a.保养工时,a.装版工时,a.异常工时,设备运行工时,a.role,a.sczl_jtbh,b.yj_cpdh,b.yj_yjmc"
- $list = db('设备_糊盒报工资料')
- ->alias('a')
- ->join('工单_印件资料 b', 'a.sczl_gdbh = b.Yj_Gdbh and a.sczl_yjno = b.yj_Yjno')
- ->field($filds)
- ->where(['month' => $params['month']])
- ->select();
- halt($list);
- }
- }
|