OvertimeVerification.php 20 KB

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