|
|
@@ -144,31 +144,6 @@ class GluSalaryCalculationService
|
|
|
return stripos((string)$jtbh, 'SG') !== false;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 判断是否皮壳机台(机台编号含 PK)
|
|
|
- * @param string $jtbh
|
|
|
- * @return bool
|
|
|
- */
|
|
|
- protected function isShellMachine($jtbh)
|
|
|
- {
|
|
|
- return stripos((string)$jtbh, 'PK') !== false;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 皮壳机机长工资系数
|
|
|
- * @param float $wage
|
|
|
- * @param string $jtbh
|
|
|
- * @param int $slotIndex 班组序号,1 为机长
|
|
|
- * @return float
|
|
|
- */
|
|
|
- protected function applyShellCaptainWageBonus($wage, $jtbh, $slotIndex)
|
|
|
- {
|
|
|
- if ((int)$slotIndex === 1 && $this->isShellMachine($jtbh)) {
|
|
|
- return floatval(number_format((float)$wage * 1.1, 2, '.', ''));
|
|
|
- }
|
|
|
- return $wage;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 员工编号是否参与工资计算(仅纯数字编号)
|
|
|
* @param mixed $bh
|
|
|
@@ -190,7 +165,6 @@ class GluSalaryCalculationService
|
|
|
{
|
|
|
$wageList = [];
|
|
|
$salary = (float)$report['产量'] * (float)$report['price'];
|
|
|
- $jtbh = $report['sczl_jtbh'] ?? '';
|
|
|
|
|
|
for ($i = 1; $i <= 30; $i++) {
|
|
|
$bh = trim($classResult['bh' . $i] ?? '');
|
|
|
@@ -199,7 +173,6 @@ class GluSalaryCalculationService
|
|
|
}
|
|
|
|
|
|
$wage = floatval(number_format($salary * (float)$classResult['rate' . $i], 2, '.', ''));
|
|
|
- $wage = $this->applyShellCaptainWageBonus($wage, $jtbh, $i);
|
|
|
|
|
|
$wageList[] = [
|
|
|
'bh' => $bh,
|
|
|
@@ -221,7 +194,6 @@ class GluSalaryCalculationService
|
|
|
protected function calculateManualPieceWages(array $report, array $classResult)
|
|
|
{
|
|
|
$employees = [];
|
|
|
- $jtbh = $report['sczl_jtbh'] ?? '';
|
|
|
for ($i = 1; $i <= 30; $i++) {
|
|
|
$bh = trim($classResult['bh' . $i] ?? '');
|
|
|
if (!$this->isValidEmployeeBh($bh)) {
|
|
|
@@ -231,7 +203,6 @@ class GluSalaryCalculationService
|
|
|
'bh' => $bh,
|
|
|
'name' => $classResult['员工姓名' . $i] ?? '',
|
|
|
'rate' => $classResult['rate' . $i] ?? '',
|
|
|
- 'slot' => $i,
|
|
|
];
|
|
|
}
|
|
|
|
|
|
@@ -283,7 +254,6 @@ class GluSalaryCalculationService
|
|
|
: 0;
|
|
|
foreach ($employees as $employee) {
|
|
|
$wage = floatval(number_format($overPerPerson, 2, '.', ''));
|
|
|
- $wage = $this->applyShellCaptainWageBonus($wage, $jtbh, $employee['slot']);
|
|
|
$wageList[] = [
|
|
|
'bh' => $employee['bh'],
|
|
|
'name' => $employee['name'],
|
|
|
@@ -317,11 +287,7 @@ class GluSalaryCalculationService
|
|
|
'bh' => $employee['bh'],
|
|
|
'name' => $employee['name'],
|
|
|
'rate' => $employee['rate'],
|
|
|
- 'wage' => $this->applyShellCaptainWageBonus(
|
|
|
- floatval(number_format($wage, 2, '.', '')),
|
|
|
- $jtbh,
|
|
|
- $employee['slot']
|
|
|
- ),
|
|
|
+ 'wage' => floatval(number_format($wage, 2, '.', '')),
|
|
|
];
|
|
|
}
|
|
|
|