OvertimeVerification.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use \think\Request;
  5. use \think\Db;
  6. /**
  7. * 计件员工加班费核查接口
  8. */
  9. class OvertimeVerification extends Api
  10. {
  11. protected $noNeedLogin = ['*'];
  12. protected $noNeedRight = ['*'];
  13. /**
  14. * 首页
  15. *
  16. */
  17. public function index()
  18. {
  19. $this->success('请求成功');
  20. }
  21. /**
  22. * 计件员工加班费核查侧边栏
  23. * @ApiMethod (GET)
  24. */
  25. public function getTab()
  26. {
  27. //get请求
  28. if(!$this->request->isGet()){
  29. $this->error('请求方式错误');
  30. }
  31. $res=db('绩效工资汇总')
  32. ->field('DATE_FORMAT(`sczl_rq`, "%Y%m") as sys_ny,bh')
  33. ->group('DATE_FORMAT(`sczl_rq`, "%Y%m"),bh')
  34. ->whereTime('sczl_rq', '>=', strtotime('-14 months'))
  35. ->where('bh','<>','000000')
  36. ->order('sczl_rq desc')
  37. ->select();
  38. foreach($res as $v){
  39. $arr[$v['sys_ny'].'('][]=$v['bh'];
  40. }
  41. $rs = db('人事_基本资料')->column('员工编号,所在部门');
  42. foreach($arr as $k=>$v){
  43. foreach($v as $value){
  44. $data[$k.count($v).'人)'][rtrim($rs[$value])][]=rtrim($rs[$value]);
  45. }
  46. $j=0;
  47. foreach($data[$k.count($v).'人)'] as $keys=>$values){
  48. $data[$k.count($v).'人)']['bm'][$j]=$keys;
  49. $data[$k.count($v).'人)'][$keys]=count($values);
  50. $j++;
  51. }
  52. usort($data[$k.count($v).'人)']['bm'], function($a, $b) {
  53. $order = array(
  54. '胶印车间',
  55. '凹印车间',
  56. '丝印车间',
  57. '模切车间',
  58. '检验车间',
  59. '精品试验车间',
  60. '品保部',
  61. '人力资源部',
  62. '生产部',
  63. '营销部'
  64. );
  65. $a_index = array_search($a, $order);
  66. $b_index = array_search($b, $order);
  67. return $a_index - $b_index;
  68. });
  69. foreach($data[$k.count($v).'人)']['bm'] as &$va){
  70. $va=$va.'('.$data[$k.count($v).'人)'][$va].'人)';
  71. }
  72. $data[$k.count($v).'人)']=$data[$k.count($v).'人)']['bm'];
  73. }
  74. $i=0;
  75. foreach($data as $k=>$v){
  76. $datas[$i]['label']=$k;
  77. $gdbh=substr($k,0,strpos($k,'('));
  78. foreach($v as $key=>$value){
  79. $datas[$i]['children'][$key]['label']=$value;
  80. $datas[$i]['children'][$key]['gdbh']=$gdbh;
  81. }
  82. $i++;
  83. }
  84. $this->success('成功',$datas);
  85. }
  86. /**
  87. * 计件员工加班费核查上侧列表
  88. * @ApiMethod (GET)
  89. * @param string $date 年月
  90. * @param string $department 部门
  91. */
  92. public function getList()
  93. {
  94. //get请求
  95. if(!$this->request->isGet()){
  96. $this->error('请求方式错误');
  97. }
  98. $req = $this->request->param();
  99. $res=db('绩效工资汇总')->alias('j')
  100. ->join('人事_基本资料 r','r.员工编号=j.bh')
  101. ->group('j.bh')
  102. ->where('j.sys_ny',$req['date'])
  103. ->where(['r.所在部门'=>['like',$req['department'].'%']])
  104. ->column('CONCAT(j.bh, "-", DATE_FORMAT(j.sczl_rq,"%Y.%m")) AS rq_bh,j.bh,rtrim(j.xm) as 员工姓名,r.工资表类别,DATE_FORMAT(r.聘用日期,"%Y.%m.%d") as 聘用日期,j.法定天数,
  105. sum(j.达标定额) as 当月定额,(sum(j.班组车头产量*j.工序难度系数)+sum(j.班组换算产量)) as 月度合计产量,sum(j.个人计件工资) as 个人计件工资,
  106. sum(j.个人加班工资) as 个人加班工资,sum(j.异常停机工时) as 月计时时数,LEFT(j.sczl_rq, 7) as sczl_rq');
  107. $year=substr($req['date'],0,4);
  108. $month=substr($req['date'],-2);
  109. $start_time = $year . '-' . $month . '-01 00:00:00';
  110. $end_time = date('Y-m-t', strtotime("$year-$month-01")) . ' 23:59:59';
  111. $arr = [];
  112. $columns = ['wgjs_bh1', 'wgjs_bh2', 'wgjs_bh3', 'wgjs_bh4', 'wgjs_bh5', 'wgjs_bh6'];
  113. for ($i = 1; $i <= 6; $i++) {
  114. $column = $columns[$i-1];
  115. $r = db('db_wgjs')
  116. ->field("DATE_FORMAT(wgjs_rq,'%Y.%m') as wgjs_rq, $column as wgjs_bh, wgjs_js$i as wgjs_js, wgjs_冲定额$i as wgjs_冲定额")
  117. ->join('人事_基本资料', "人事_基本资料.员工编号=db_wgjs.$column")
  118. ->where(['wgjs_rq' => ['between', "$start_time,$end_time"], '人事_基本资料.所在部门' => ['like', $req['department'] . '%']])
  119. ->select();
  120. $arr = array_merge($arr, $r);
  121. }
  122. $list = [];
  123. foreach($arr as $v){
  124. if(isset($list[$v['wgjs_bh'].'-'.$v['wgjs_rq']])){
  125. if($v['wgjs_冲定额']=='是'){
  126. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['月计时时数']+=$v['wgjs_js'];
  127. }
  128. }else{
  129. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['bh']=$v['wgjs_bh'];
  130. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['sczl_rq']=$v['wgjs_rq'];
  131. if($v['wgjs_冲定额']=='是'){
  132. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['月计时时数']=$v['wgjs_js'];
  133. }else{
  134. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['月计时时数']=0;
  135. }
  136. }
  137. };
  138. //获取每个员工计时补差天数
  139. $arr1 = db('绩效工资汇总')->alias('j')
  140. ->field('j.bh,j.sczl_rq')
  141. ->join('人事_基本资料 r','r.员工编号=j.bh')
  142. ->group('j.bh,j.sczl_rq')
  143. ->where('j.sys_ny',$req['date'])
  144. // ->where('j.达标定额','<>',0)
  145. ->where(['r.所在部门'=>['like',$req['department'].'%']])
  146. ->buildSql();
  147. $arr1 = db()->table($arr1 . ' t')
  148. ->group('t.bh, LEFT(t.sczl_rq, 7)')
  149. ->column('t.bh,count(LEFT(t.sczl_rq, 7)) as num');
  150. //查询每条记录
  151. $arr2 = db('绩效工资汇总')->alias('j')
  152. ->field('j.bh, DATE_FORMAT(j.sczl_rq,"%Y.%m") as sczl_rq,
  153. sum(j.达标定额) as 达标定额, j.Rate, j.千件工价')
  154. ->join('人事_基本资料 r','r.员工编号=j.bh')
  155. ->where('j.sys_ny',$req['date'])
  156. // ->where('j.达标定额','<>',0)
  157. ->where(['r.所在部门'=>['like',$req['department'].'%']])
  158. ->group('j.bh,j.sczl_rq,j.sczl_gdbh')
  159. ->select();
  160. //计算每条记录的计时补差
  161. $brr = [];
  162. foreach($arr2 as $v){
  163. $yjsss1 = array_key_exists($v['bh'].'-'.$v['sczl_rq'],$list) ? $list[$v['bh'].'-'.$v['sczl_rq']]['月计时时数'] : 0;
  164. $yjsss2 = array_key_exists($v['bh'].'-'.$v['sczl_rq'],$res) ? $res[$v['bh'].'-'.$v['sczl_rq']]['月计时时数'] : 0;
  165. $yjsss = $yjsss1 + $yjsss2;
  166. $a = $yjsss/$arr1[$v['bh']]/11*0.6*$v['达标定额']*$v['Rate']*0.5/1000*$v['千件工价'];
  167. if(array_key_exists($v['bh'].'-'.$v['sczl_rq'],$brr)){
  168. $brr[$v['bh'].'-'.$v['sczl_rq']] += $a;
  169. }else{
  170. $brr[$v['bh'].'-'.$v['sczl_rq']] = $a;
  171. }
  172. }
  173. foreach($res as $k=>&$v){
  174. if(array_key_exists($k,$list)){
  175. $v['月计时时数'] += $list[$k]['月计时时数'];
  176. }
  177. $v['工资表类别'] = trim($v['工资表类别']);
  178. $v['法定天数'] = round($v['法定天数']);
  179. $v['当月定额'] = round($v['当月定额']);
  180. $v['月度合计产量'] = round($v['月度合计产量']);
  181. $v['月计时时数'] = floatval(number_format($v['月计时时数'],2, '.', ''));
  182. $v['计时补差'] = floatval(number_format($brr[$k],2, '.', ''));
  183. unset($v['rq_bh']);
  184. }
  185. $res = array_values($res);
  186. $this->success('成功',$res);
  187. }
  188. /**
  189. * 计件员工加班费核查下侧列表
  190. * @ApiMethod (GET)
  191. * @param string $date 年月
  192. * @param string $code 员工编号
  193. */
  194. public function getAllList()
  195. {
  196. //get请求
  197. if(!$this->request->isGet()){
  198. $this->error('请求方式错误');
  199. }
  200. $req = $this->request->param();
  201. $res=db('绩效工资汇总')
  202. ->field('LEFT(sczl_rq, 10) as sczl_rq,sczl_gdbh,rtrim(g.yj_yjmc) as Gd_cpmc,sczl_yjno,sczl_gxh,sczl_type,
  203. sczl_jtbh,sum(班组车头产量) as 班组车头产量,工序难度系数 as 产量系数,(sum(班组车头产量*工序难度系数)) as 计件产量,
  204. sum(班组换算产量) as 补产产量,(sum(班组车头产量*工序难度系数)+sum(班组换算产量)) as 核算产量,日定额,sum(达标定额)
  205. as 达标定额,千件工价,补产标准,sum(个人计件工资) as 个人计件工资,sum(个人加班工资) as 个人加班工资,Rate as 个人比例,
  206. sum(装版工时) as 装版工时,sum(保养工时) as 保养工时,sum(打样工时) as 打样工时,sum(计时补差额工资) as 计时补差')
  207. ->join('工单_印件资料 g','g.Yj_Gdbh = 绩效工资汇总.sczl_gdbh AND g.yj_Yjno = 绩效工资汇总.sczl_yjno','LEFT')
  208. ->group('LEFT(sczl_rq, 10),sczl_gdbh,CONCAT(sczl_yjno, "-", sczl_gxh, "-", sczl_type)')
  209. ->where(['sys_ny'=>$req['date'],'bh'=>$req['code']])
  210. ->select();
  211. if(!$res){
  212. $this->error('失败');
  213. }
  214. foreach($res as &$v){
  215. $v['sczl_rq']=str_replace('-','.',$v['sczl_rq']);
  216. if($v['sczl_yjno']>9){
  217. $sczl_yjno=$v['sczl_yjno'];
  218. }else{
  219. $sczl_yjno='0'.$v['sczl_yjno'];
  220. }
  221. unset($v['sczl_yjno']);
  222. if($v['sczl_gxh']>9){
  223. $sczl_gxh=$v['sczl_gxh'];
  224. }else{
  225. $sczl_gxh='0'.$v['sczl_gxh'];
  226. }
  227. $v['计件产量'] = floatval(number_format($v['计件产量'], 2, '.', ''));
  228. $v['核算产量'] = floatval(number_format($v['核算产量'], 2, '.', ''));
  229. unset($v['sczl_gxh']);
  230. $v['sczl_type']=$sczl_yjno.'-'.$sczl_gxh.'-->'.$v['sczl_type'];
  231. }
  232. $this->success('成功',$res);
  233. }
  234. /**
  235. * 计件员工加班费核查详情
  236. * @ApiMethod (GET)
  237. * @param string $date 日期
  238. * @param string $code 员工编号
  239. */
  240. public function getDetail()
  241. {
  242. //get请求
  243. if(!$this->request->isGet()){
  244. $this->error('请求方式错误');
  245. }
  246. $req = $this->request->param();
  247. $start_time=$req['date'].' 00:00:00';
  248. $end_time=$req['date'].' 23:59:59';
  249. $res=db('绩效工资汇总')
  250. ->field('LEFT(sczl_rq, 10) as sczl_rq,sczl_gdbh,rtrim(g.yj_yjmc) as Gd_cpmc,sczl_yjno,sczl_gxh,sczl_type,
  251. sczl_jtbh,sum(班组车头产量) as 班组车头产量,工序难度系数 as 产量系数,(sum(班组车头产量*工序难度系数)) as 计件产量,
  252. sum(班组换算产量) as 补产产量,(sum(班组车头产量*工序难度系数)+sum(班组换算产量)) as 核算产量,日定额,sum(达标定额)
  253. as 达标定额,千件工价,补产标准,sum(个人计件工资) as 个人计件工资,sum(个人加班工资) as 个人加班工资,Rate as 个人比例,
  254. sum(装版工时) as 装版工时,sum(保养工时) as 保养工时,sum(打样工时) as 打样工时,sum(计时补差额工资) as 计时补差')
  255. ->join('工单_印件资料 g','g.Yj_Gdbh = 绩效工资汇总.sczl_gdbh AND g.yj_Yjno = 绩效工资汇总.sczl_yjno','LEFT')
  256. ->group('LEFT(sczl_rq, 10),sczl_gdbh')
  257. ->where(['sczl_rq'=>['between',"$start_time,$end_time"],'bh'=>$req['code']])
  258. ->select();
  259. if(!$res){
  260. $this->error('失败');
  261. }
  262. foreach($res as &$v){
  263. $v['sczl_rq']=str_replace('-','.',$v['sczl_rq']);
  264. if($v['sczl_yjno']>9){
  265. $sczl_yjno=$v['sczl_yjno'];
  266. }else{
  267. $sczl_yjno='0'.$v['sczl_yjno'];
  268. }
  269. unset($v['sczl_yjno']);
  270. if($v['sczl_gxh']>9){
  271. $sczl_gxh=$v['sczl_gxh'];
  272. }else{
  273. $sczl_gxh='0'.$v['sczl_gxh'];
  274. }
  275. unset($v['sczl_gxh']);
  276. $v['sczl_type']=$sczl_yjno.'-'.$sczl_gxh.'-->'.$v['sczl_type'];
  277. }
  278. $this->success('成功',$res);
  279. }
  280. /**
  281. * 定位
  282. * @ApiMethod GET
  283. */
  284. public function search(){
  285. //get请求
  286. if(!$this->request->isGet()){
  287. $this->error('请求方式错误');
  288. }
  289. $req = $this->request->param();
  290. $yg = db()->table('人事_基本资料')->where('员工姓名',$req['search'])->value('员工编号');
  291. // $yg = db()->table('人事_基本资料')->where('员工姓名','like','%'.$req['search'].'%')->column('员工编号');
  292. if($yg){
  293. $req['search']=$yg;
  294. }
  295. $res=db('绩效工资汇总')->alias('j')
  296. ->join('人事_基本资料 r','r.员工编号=j.bh')
  297. ->group('j.bh')
  298. ->where('j.sys_ny',$req['date'])
  299. ->where('j.bh',$req['search'])
  300. // ->where(['r.所在部门'=>['like',$req['department'].'%']])
  301. ->column('CONCAT(j.bh, "-", DATE_FORMAT(sczl_rq,"%Y.%m")) AS rq_bh,j.bh,rtrim(j.xm) as 员工姓名,r.工资表类别,DATE_FORMAT(r.聘用日期,"%Y.%m.%d") as 聘用日期,j.法定天数,
  302. sum(j.达标定额) as 当月定额,(sum(j.班组车头产量*j.工序难度系数)+sum(j.班组换算产量)) as 月度合计产量,sum(j.个人计件工资) as 个人计件工资,
  303. sum(j.个人加班工资) as 个人加班工资,sum(j.异常停机工时) as 月计时时数,LEFT(j.sczl_rq, 7) as sczl_rq');
  304. $year=substr($req['date'],0,4);
  305. $month=substr($req['date'],-2);
  306. $start_time = $year . '-' . $month . '-01 00:00:00';
  307. $end_time = date('Y-m-t', strtotime("$year-$month-01")) . ' 23:59:59';
  308. $arr = [];
  309. $columns = ['wgjs_bh1', 'wgjs_bh2', 'wgjs_bh3', 'wgjs_bh4', 'wgjs_bh5', 'wgjs_bh6'];
  310. for ($i = 1; $i <= 6; $i++) {
  311. $column = $columns[$i-1];
  312. $r = db('db_wgjs')
  313. ->field("DATE_FORMAT(wgjs_rq,'%Y.%m') as wgjs_rq, $column as wgjs_bh, wgjs_js$i as wgjs_js, wgjs_冲定额$i as wgjs_冲定额")
  314. ->join('人事_基本资料', "人事_基本资料.员工编号=db_wgjs.$column")
  315. ->where($column,$req['search'])
  316. ->where(['wgjs_rq' => ['between', "$start_time,$end_time"]])
  317. ->select();
  318. $arr = array_merge($arr, $r);
  319. }
  320. $list = [];
  321. foreach($arr as $v){
  322. if(isset($list[$v['wgjs_bh'].'-'.$v['wgjs_rq']])){
  323. if($v['wgjs_冲定额']=='是'){
  324. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['月计时时数']+=$v['wgjs_js'];
  325. }
  326. }else{
  327. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['bh']=$v['wgjs_bh'];
  328. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['sczl_rq']=$v['wgjs_rq'];
  329. if($v['wgjs_冲定额']=='是'){
  330. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['月计时时数']=$v['wgjs_js'];
  331. }else{
  332. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['月计时时数']=0;
  333. }
  334. }
  335. };
  336. //获取每个员工计时补差天数
  337. $arr1 = db('绩效工资汇总')->alias('j')
  338. ->field('j.bh,j.sczl_rq')
  339. ->join('人事_基本资料 r','r.员工编号=j.bh')
  340. ->group('j.bh,j.sczl_rq')
  341. ->where('j.sys_ny',$req['date'])
  342. ->where('j.bh',$req['search'])
  343. // ->where('j.达标定额','<>',0)
  344. // ->where(['r.所在部门'=>['like',$req['department'].'%']])
  345. ->buildSql();
  346. $arr1 = db()->table($arr1 . ' t')
  347. ->group('t.bh, LEFT(t.sczl_rq, 7)')
  348. ->column('t.bh,count(LEFT(t.sczl_rq, 7)) as num');
  349. //查询每条记录
  350. $arr2 = db('绩效工资汇总')->alias('j')
  351. ->field('j.bh, DATE_FORMAT(j.sczl_rq,"%Y.%m") as sczl_rq,
  352. sum(j.达标定额) as 达标定额, j.Rate, j.千件工价')
  353. ->join('人事_基本资料 r','r.员工编号=j.bh')
  354. ->where('j.sys_ny',$req['date'])
  355. // ->where('j.达标定额','<>',0)
  356. ->where('j.bh',$req['search'])
  357. // ->where(['r.所在部门'=>['like',$req['department'].'%']])
  358. ->group('j.bh,j.sczl_rq,j.sczl_gdbh')
  359. ->select();
  360. //计算每条记录的计时补差
  361. $brr = [];
  362. foreach($arr2 as $v){
  363. $yjsss1 = array_key_exists($v['bh'].'-'.$v['sczl_rq'],$list) ? $list[$v['bh'].'-'.$v['sczl_rq']]['月计时时数'] : 0;
  364. $yjsss2 = array_key_exists($v['bh'].'-'.$v['sczl_rq'],$res) ? $res[$v['bh'].'-'.$v['sczl_rq']]['月计时时数'] : 0;
  365. $yjsss = $yjsss1 + $yjsss2;
  366. $a = $yjsss/$arr1[$v['bh']]/11*0.6*$v['达标定额']*$v['Rate']*0.5/1000*$v['千件工价'];
  367. if(array_key_exists($v['bh'].'-'.$v['sczl_rq'],$brr)){
  368. $brr[$v['bh'].'-'.$v['sczl_rq']] += $a;
  369. }else{
  370. $brr[$v['bh'].'-'.$v['sczl_rq']] = $a;
  371. }
  372. }
  373. foreach($res as $k=>&$v){
  374. if(array_key_exists($k,$list)){
  375. $v['月计时时数'] += $list[$k]['月计时时数'];
  376. }
  377. $v['工资表类别'] = trim($v['工资表类别']);
  378. $v['法定天数'] = round($v['法定天数']);
  379. $v['当月定额'] = round($v['当月定额']);
  380. $v['月度合计产量'] = round($v['月度合计产量']);
  381. $v['月计时时数'] = floatval(number_format($v['月计时时数'],2, '.', ''));
  382. $v['计时补差'] = floatval(number_format($brr[$k],2, '.', ''));
  383. unset($v['rq_bh']);
  384. }
  385. $res = array_values($res);
  386. $this->success('成功',$res);
  387. $arr = [];
  388. $columns = ['wgjs_bh1', 'wgjs_bh2', 'wgjs_bh3', 'wgjs_bh4', 'wgjs_bh5', 'wgjs_bh6'];
  389. $field = 'wgjs_js';
  390. for ($i = 1; $i <= 6; $i++) {
  391. $column = $columns[$i-1];
  392. $r = db('db_wgjs')
  393. ->field("DATE_FORMAT(wgjs_rq,'%Y.%m') as wgjs_rq, $column as wgjs_bh, ${field}${i} as wgjs_js")
  394. ->join('人事_基本资料', "人事_基本资料.员工编号=db_wgjs.$column")
  395. ->where(['wgjs_rq' => ['between', "$start_time,$end_time"]])
  396. ->select();
  397. $arr = array_merge($arr, $r);
  398. }
  399. $list = [];
  400. foreach($arr as $v){
  401. if(isset($list[$v['wgjs_bh'].'-'.$v['wgjs_rq']])){
  402. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['月计时时数']+=$v['wgjs_js'];
  403. }else{
  404. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['bh']=$v['wgjs_bh'];
  405. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['sczl_rq']=$v['wgjs_rq'];
  406. $list[$v['wgjs_bh'].'-'.$v['wgjs_rq']]['月计时时数']=$v['wgjs_js'];
  407. }
  408. };
  409. foreach($res as $k=>&$v){
  410. if(array_key_exists($k,$list)){
  411. $v['月计时时数'] += $list[$k]['月计时时数'];
  412. }
  413. $v['工资表类别'] = trim($v['工资表类别']);
  414. $v['法定天数'] = round($v['法定天数']);
  415. $v['当月定额'] = round($v['当月定额']);
  416. $v['月度合计产量'] = round($v['月度合计产量']);
  417. $v['月计时时数'] = floatval(number_format($v['月计时时数'],2, '.', ''));
  418. $v['计时补差'] = floatval(bcmul($v['月计时时数'], 9.5, 2));
  419. unset($v['rq_bh']);
  420. }
  421. $res = array_values($res);
  422. $this->success('成功',$res);
  423. }
  424. }