|
@@ -229,9 +229,6 @@ class ReportingWork extends Api
|
|
|
// if (!isset($item['money']) || $item['money'] === '') {
|
|
// if (!isset($item['money']) || $item['money'] === '') {
|
|
|
// $this->error('第' . $rowNo . '条金额不能为空');
|
|
// $this->error('第' . $rowNo . '条金额不能为空');
|
|
|
// }
|
|
// }
|
|
|
- // if (!isset($item['standard_minutes']) || $item['standard_minutes'] === '') {
|
|
|
|
|
- // $this->error('第' . $rowNo . '条标准分钟不能为空');
|
|
|
|
|
- // }
|
|
|
|
|
if (!isset($item['standard_score']) || $item['standard_score'] === '') {
|
|
if (!isset($item['standard_score']) || $item['standard_score'] === '') {
|
|
|
$this->error('第' . $rowNo . '条标准工分不能为空');
|
|
$this->error('第' . $rowNo . '条标准工分不能为空');
|
|
|
}
|
|
}
|
|
@@ -248,7 +245,6 @@ class ReportingWork extends Api
|
|
|
|
|
|
|
|
$productionHour = $standardHour * $number;
|
|
$productionHour = $standardHour * $number;
|
|
|
$productionScore = $standardScore * $number;
|
|
$productionScore = $standardScore * $number;
|
|
|
- $productionMinutes = $standardMinutes * $number;
|
|
|
|
|
$productionMoney = $money * $number;
|
|
$productionMoney = $money * $number;
|
|
|
$partCode = null;
|
|
$partCode = null;
|
|
|
if (isset($item['part_code']) && $item['part_code'] !== '') {
|
|
if (isset($item['part_code']) && $item['part_code'] !== '') {
|
|
@@ -272,7 +268,6 @@ class ReportingWork extends Api
|
|
|
'number' => $number,
|
|
'number' => $number,
|
|
|
'production_hour' => round($productionHour, 4),
|
|
'production_hour' => round($productionHour, 4),
|
|
|
'production_score' => round($productionScore, 4),
|
|
'production_score' => round($productionScore, 4),
|
|
|
- 'production_minutes' => round($productionMinutes, 4),
|
|
|
|
|
'salary' => round($productionMoney, 4),
|
|
'salary' => round($productionMoney, 4),
|
|
|
'machine' => isset($item['machine']) ? $item['machine'] : '',
|
|
'machine' => isset($item['machine']) ? $item['machine'] : '',
|
|
|
'sys_id' => isset($item['sys_id']) ? $item['sys_id'] : '',
|
|
'sys_id' => isset($item['sys_id']) ? $item['sys_id'] : '',
|
|
@@ -374,7 +369,7 @@ class ReportingWork extends Api
|
|
|
->where('date', $params['date'])
|
|
->where('date', $params['date'])
|
|
|
->where('machine', $params['machine'])
|
|
->where('machine', $params['machine'])
|
|
|
->field('id,work_order,majorprocess,part_code,process_code,process_name,staff_no,staff_name,standard_hour,
|
|
->field('id,work_order,majorprocess,part_code,process_code,process_name,staff_no,staff_name,standard_hour,
|
|
|
- standard_score,standard_minutes,money,coefficient,number,production_hour,production_score,production_minutes,
|
|
|
|
|
|
|
+ standard_score,standard_minutes,money,coefficient,number,production_hour,production_score,
|
|
|
salary,machine,sys_id,sys_rq')
|
|
salary,machine,sys_id,sys_rq')
|
|
|
->order('process_code asc,staff_no asc')
|
|
->order('process_code asc,staff_no asc')
|
|
|
->select();
|
|
->select();
|
|
@@ -406,7 +401,6 @@ class ReportingWork extends Api
|
|
|
'number' => $row['number'],
|
|
'number' => $row['number'],
|
|
|
'production_hour' => $row['production_hour'],
|
|
'production_hour' => $row['production_hour'],
|
|
|
'production_score' => $row['production_score'],
|
|
'production_score' => $row['production_score'],
|
|
|
- 'production_minutes' => $row['production_minutes'],
|
|
|
|
|
'salary' => $row['salary'],
|
|
'salary' => $row['salary'],
|
|
|
'sys_id' => $row['sys_id'],
|
|
'sys_id' => $row['sys_id'],
|
|
|
'sys_rq' => $row['sys_rq'],
|
|
'sys_rq' => $row['sys_rq'],
|
|
@@ -445,7 +439,6 @@ class ReportingWork extends Api
|
|
|
'number' => $params['number'],
|
|
'number' => $params['number'],
|
|
|
'production_hour' => $params['production_hour'],
|
|
'production_hour' => $params['production_hour'],
|
|
|
'production_score' => $params['production_score'],
|
|
'production_score' => $params['production_score'],
|
|
|
- 'production_minutes' => $params['production_minutes'],
|
|
|
|
|
'money' => $params['money'],
|
|
'money' => $params['money'],
|
|
|
'salary' => $params['money'] * $params['number'],
|
|
'salary' => $params['money'] * $params['number'],
|
|
|
];
|
|
];
|
|
@@ -517,7 +510,7 @@ class ReportingWork extends Api
|
|
|
->where('machine', $params['machine'])
|
|
->where('machine', $params['machine'])
|
|
|
->field('work_order,majorprocess,part_code,process_code,process_name,staff_no,staff_name,
|
|
->field('work_order,majorprocess,part_code,process_code,process_name,staff_no,staff_name,
|
|
|
standard_hour,standard_score,standard_minutes,money,coefficient,number,production_hour,
|
|
standard_hour,standard_score,standard_minutes,money,coefficient,number,production_hour,
|
|
|
- production_score,production_minutes,salary,machine,sys_id,sys_rq,id')
|
|
|
|
|
|
|
+ production_score,salary,machine,sys_id,sys_rq,id')
|
|
|
->order('process_code asc,staff_no asc')
|
|
->order('process_code asc,staff_no asc')
|
|
|
->select();
|
|
->select();
|
|
|
$this->success('成功', $rows);
|
|
$this->success('成功', $rows);
|