Quellcode durchsuchen

修改皮壳机机长计算规则

unknown vor 1 Woche
Ursprung
Commit
e686a2c77c
1 geänderte Dateien mit 1 neuen und 35 gelöschten Zeilen
  1. 1 35
      application/service/GluSalaryCalculationService.php

+ 1 - 35
application/service/GluSalaryCalculationService.php

@@ -144,31 +144,6 @@ class GluSalaryCalculationService
         return stripos((string)$jtbh, 'SG') !== false;
         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
      * @param mixed $bh
@@ -190,7 +165,6 @@ class GluSalaryCalculationService
     {
     {
         $wageList = [];
         $wageList = [];
         $salary = (float)$report['产量'] * (float)$report['price'];
         $salary = (float)$report['产量'] * (float)$report['price'];
-        $jtbh = $report['sczl_jtbh'] ?? '';
 
 
         for ($i = 1; $i <= 30; $i++) {
         for ($i = 1; $i <= 30; $i++) {
             $bh = trim($classResult['bh' . $i] ?? '');
             $bh = trim($classResult['bh' . $i] ?? '');
@@ -199,7 +173,6 @@ class GluSalaryCalculationService
             }
             }
 
 
             $wage = floatval(number_format($salary * (float)$classResult['rate' . $i], 2, '.', ''));
             $wage = floatval(number_format($salary * (float)$classResult['rate' . $i], 2, '.', ''));
-            $wage = $this->applyShellCaptainWageBonus($wage, $jtbh, $i);
 
 
             $wageList[] = [
             $wageList[] = [
                 'bh' => $bh,
                 'bh' => $bh,
@@ -221,7 +194,6 @@ class GluSalaryCalculationService
     protected function calculateManualPieceWages(array $report, array $classResult)
     protected function calculateManualPieceWages(array $report, array $classResult)
     {
     {
         $employees = [];
         $employees = [];
-        $jtbh = $report['sczl_jtbh'] ?? '';
         for ($i = 1; $i <= 30; $i++) {
         for ($i = 1; $i <= 30; $i++) {
             $bh = trim($classResult['bh' . $i] ?? '');
             $bh = trim($classResult['bh' . $i] ?? '');
             if (!$this->isValidEmployeeBh($bh)) {
             if (!$this->isValidEmployeeBh($bh)) {
@@ -231,7 +203,6 @@ class GluSalaryCalculationService
                 'bh' => $bh,
                 'bh' => $bh,
                 'name' => $classResult['员工姓名' . $i] ?? '',
                 'name' => $classResult['员工姓名' . $i] ?? '',
                 'rate' => $classResult['rate' . $i] ?? '',
                 'rate' => $classResult['rate' . $i] ?? '',
-                'slot' => $i,
             ];
             ];
         }
         }
 
 
@@ -283,7 +254,6 @@ class GluSalaryCalculationService
                 : 0;
                 : 0;
             foreach ($employees as $employee) {
             foreach ($employees as $employee) {
                 $wage = floatval(number_format($overPerPerson, 2, '.', ''));
                 $wage = floatval(number_format($overPerPerson, 2, '.', ''));
-                $wage = $this->applyShellCaptainWageBonus($wage, $jtbh, $employee['slot']);
                 $wageList[] = [
                 $wageList[] = [
                     'bh' => $employee['bh'],
                     'bh' => $employee['bh'],
                     'name' => $employee['name'],
                     'name' => $employee['name'],
@@ -317,11 +287,7 @@ class GluSalaryCalculationService
                 'bh' => $employee['bh'],
                 'bh' => $employee['bh'],
                 'name' => $employee['name'],
                 'name' => $employee['name'],
                 'rate' => $employee['rate'],
                 'rate' => $employee['rate'],
-                'wage' => $this->applyShellCaptainWageBonus(
-                    floatval(number_format($wage, 2, '.', '')),
-                    $jtbh,
-                    $employee['slot']
-                ),
+                'wage' => floatval(number_format($wage, 2, '.', '')),
             ];
             ];
         }
         }