GluSalaryCalculation.php 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. class GlluSalaryCalculation extends Api
  5. {
  6. protected $noNeedLogin = ['*'];
  7. protected $noNeedRight = ['*'];
  8. public function salaryCalculation()
  9. {
  10. if(!$this->request->isGet()){
  11. $this->error('请求错误');
  12. }
  13. $params = $this->request->param();
  14. if (!isset($params['month']) || empty($params['month'])) {
  15. $this->error('参数错误');
  16. }
  17. //糊盒计件产量
  18. $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 日期,
  19. a.sczl_ls as 联数,a.sczl_dedh as 定额代号,a.工价系数,a.保养工时,a.装版工时,a.异常工时,设备运行工时,a.role,a.sczl_jtbh,b.yj_cpdh,b.yj_yjmc"
  20. $list = db('设备_糊盒报工资料')
  21. ->alias('a')
  22. ->join('工单_印件资料 b', 'a.sczl_gdbh = b.Yj_Gdbh and a.sczl_yjno = b.yj_Yjno')
  23. ->field($filds)
  24. ->where(['month' => $params['month']])
  25. ->select();
  26. halt($list);
  27. }
  28. }