|
@@ -149,8 +149,8 @@ class ReportingWork extends Api
|
|
|
->where('big_process', '车缝')
|
|
->where('big_process', '车缝')
|
|
|
->where('del_rq', null)
|
|
->where('del_rq', null)
|
|
|
->where('status', 0)
|
|
->where('status', 0)
|
|
|
- ->field('process_code as 工艺编号,process_name as 工艺名称,standard_hour as 标准工时,
|
|
|
|
|
- standard_score as 标准工分,coefficient as 系数,remark as 备注')
|
|
|
|
|
|
|
+ ->field('process_code as 工艺编号,process_name as 工艺名称,standard_hour as 标准工时,standard_minutes as 标准分钟,
|
|
|
|
|
+ standard_score as 标准工分,coefficient as 系数,remark as 备注,money as 金额')
|
|
|
->order('process_code')
|
|
->order('process_code')
|
|
|
->select();
|
|
->select();
|
|
|
$this->success('成功', $data);
|
|
$this->success('成功', $data);
|
|
@@ -226,6 +226,12 @@ class ReportingWork extends Api
|
|
|
// if (!isset($item['standard_hour']) || $item['standard_hour'] === '') {
|
|
// if (!isset($item['standard_hour']) || $item['standard_hour'] === '') {
|
|
|
// $this->error('第' . $rowNo . '条标准工时不能为空');
|
|
// $this->error('第' . $rowNo . '条标准工时不能为空');
|
|
|
// }
|
|
// }
|
|
|
|
|
+ // if (!isset($item['money']) || $item['money'] === '') {
|
|
|
|
|
+ // $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 . '条标准工分不能为空');
|
|
|
}
|
|
}
|
|
@@ -235,12 +241,15 @@ class ReportingWork extends Api
|
|
|
|
|
|
|
|
$standardHour = floatval($item['standard_hour']);
|
|
$standardHour = floatval($item['standard_hour']);
|
|
|
$standardScore = floatval($item['standard_score']);
|
|
$standardScore = floatval($item['standard_score']);
|
|
|
- $coefficient = isset($item['coefficient']) && $item['coefficient'] !== '' ? floatval($item['coefficient']) : 1;
|
|
|
|
|
|
|
+ $money = floatval($item['money']);
|
|
|
|
|
+ $standardMinutes = floatval($item['standard_minutes']);
|
|
|
|
|
+ $coefficient = isset($item['coefficient']) && $item['coefficient'] !== '' ? floatval($item['coefficient']) : 'C';
|
|
|
$number = floatval($item['number']);
|
|
$number = floatval($item['number']);
|
|
|
|
|
|
|
|
- $productionHour = $standardHour * $number * $coefficient;
|
|
|
|
|
- $productionScore = $standardScore * $number * $coefficient;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ $productionHour = $standardHour * $number;
|
|
|
|
|
+ $productionScore = $standardScore * $number;
|
|
|
|
|
+ $productionMinutes = $standardMinutes * $number;
|
|
|
|
|
+ $productionMoney = $money * $number;
|
|
|
$partCode = null;
|
|
$partCode = null;
|
|
|
if (isset($item['part_code']) && $item['part_code'] !== '') {
|
|
if (isset($item['part_code']) && $item['part_code'] !== '') {
|
|
|
$partCode = intval($item['part_code']);
|
|
$partCode = intval($item['part_code']);
|
|
@@ -257,11 +266,14 @@ class ReportingWork extends Api
|
|
|
'process_name' => $item['process_name'],
|
|
'process_name' => $item['process_name'],
|
|
|
'standard_hour' => $standardHour,
|
|
'standard_hour' => $standardHour,
|
|
|
'standard_score' => $standardScore,
|
|
'standard_score' => $standardScore,
|
|
|
|
|
+ 'standard_minutes' => $standardMinutes,
|
|
|
|
|
+ 'money' => $money,
|
|
|
'coefficient' => $coefficient,
|
|
'coefficient' => $coefficient,
|
|
|
'number' => $number,
|
|
'number' => $number,
|
|
|
'production_hour' => round($productionHour, 4),
|
|
'production_hour' => round($productionHour, 4),
|
|
|
'production_score' => round($productionScore, 4),
|
|
'production_score' => round($productionScore, 4),
|
|
|
- 'salary' => round($productionScore*0.5,2),
|
|
|
|
|
|
|
+ 'production_minutes' => round($productionMinutes, 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'] : '',
|
|
|
'sys_rq' => $now,
|
|
'sys_rq' => $now,
|