Browse Source

小高薪

cqp 3 months ago
parent
commit
64afc0d52a

+ 1 - 0
app/Service/DeviceDepreciationService.php

@@ -282,6 +282,7 @@ class DeviceDepreciationService extends Service
             // 组装每一行详情需要展示的字段
             $res[$item->main_id][] = [
                 'device_code' => $tmpEmp ? $tmpEmp->code : '',
+                'device_title' => $tmpEmp ? $tmpEmp->title : '',
                 'depreciation_amount'  => $item->depreciation_amount,
             ];
         }

+ 1 - 0
app/Service/DeviceWorkService.php

@@ -302,6 +302,7 @@ class DeviceWorkService extends Service
             // 组装每一行详情需要展示的字段
             $res[$item->main_id][] = [
                 'device_code' => $tmpEmp ? $tmpEmp->code : '',
+                'device_title' => $tmpEmp ? $tmpEmp->title : '',
                 'total_days'     => $item->total_days,
                 'rd_total_days'  => $item->rd_total_days,
                 'total_hours'    => $item->total_hours,

+ 11 - 0
app/Service/ImportService.php

@@ -1611,6 +1611,9 @@ class ImportService extends Service
             foreach ($table_config as $k => $conf) {
                 if (!$conf['is_main']) {
                     $fieldKey = $conf['key'];
+
+                    if ($fieldKey == 'employee_title') continue;
+
                     $fieldVal = $row[$k];
                     // 如果是人员,转换为 ID
                     if ($fieldKey == 'employee_id') {
@@ -1872,6 +1875,9 @@ class ImportService extends Service
             foreach ($table_config as $k => $conf) {
                 if (!$conf['is_main']) {
                     $fieldKey = $conf['key'];
+
+                    if ($fieldKey == 'device_title') continue;
+
                     $fieldVal = $row[$k];
                     // 如果是人员,转换为 ID
                     if ($fieldKey == 'device_id') {
@@ -2127,6 +2133,9 @@ class ImportService extends Service
             foreach ($table_config as $k => $conf) {
                 if (!$conf['is_main']) {
                     $fieldKey = $conf['key'];
+
+                    if ($fieldKey == 'employee_title') continue;
+
                     $fieldVal = $row[$k];
                     // 如果是人员,转换为 ID
                     if ($fieldKey == 'employee_id') {
@@ -2371,6 +2380,8 @@ class ImportService extends Service
             foreach ($table_config as $k => $conf) {
                 if (!$conf['is_main']) {
                     $fieldKey = $conf['key'];
+                    if ($fieldKey == 'device_title') continue;
+
                     $fieldVal = $row[$k];
                     // 如果是人员,转换为 ID
                     if ($fieldKey == 'device_id') {

+ 1 - 0
app/Service/PersonSalaryService.php

@@ -287,6 +287,7 @@ class PersonSalaryService extends Service
             // 组装每一行详情需要展示的字段
             $res[$item->main_id][] = [
                 'employee_number' => $tmpEmp ? $tmpEmp->number : '',
+                'employee_title' => $tmpEmp ? $tmpEmp->title : '',
                 'salary'     => $item->salary,
                 'social_insurance'  => $item->social_insurance,
                 'public_housing_fund'    => $item->public_housing_fund,

+ 1 - 0
app/Service/PersonWorkService.php

@@ -301,6 +301,7 @@ class PersonWorkService extends Service
             // 组装每一行详情需要展示的字段
             $res[$item->main_id][] = [
                 'employee_number' => $tmpEmp ? $tmpEmp->number : '',
+                'employee_title' => $tmpEmp ? $tmpEmp->title : '',
                 'total_days'     => $item->total_days,
                 'rd_total_days'  => $item->rd_total_days,
                 'total_hours'    => $item->total_hours,

+ 12 - 1
config/excel/monthDdOrder.php

@@ -27,7 +27,7 @@ return [
         [
             'key' =>'device_id',
             'export' =>'device_code',
-            'value' => '设备',
+            'value' => '设备编码',
             'required' => true,
             'is_main' => false,
             'default' => "",
@@ -35,6 +35,17 @@ return [
             'enums' => [],
             'comments' => '必填(填写设备的资产编码)'
         ],
+        [
+            'key' =>'device_title',
+            'export' =>'device_title',
+            'value' => '设备名称',
+            'required' => false,
+            'is_main' => false,
+            'default' => "",
+            'unique' => false,
+            'enums' => [],
+            'comments' => '选填(便于操作人查看编码对应的名称)'
+        ],
         [
             'key' =>'depreciation_amount',
             'export' =>'depreciation_amount',

+ 12 - 1
config/excel/monthDwOrder.php

@@ -27,7 +27,7 @@ return [
         [
             'key' =>'device_id',
             'export' =>'device_code',
-            'value' => '设备',
+            'value' => '设备编码',
             'required' => true,
             'is_main' => false,
             'default' => "",
@@ -35,6 +35,17 @@ return [
             'enums' => [],
             'comments' => '必填(填写设备的资产编码)'
         ],
+        [
+            'key' =>'device_title',
+            'export' =>'device_title',
+            'value' => '设备名称',
+            'required' => false,
+            'is_main' => false,
+            'default' => "",
+            'unique' => false,
+            'enums' => [],
+            'comments' => '选填(便于操作人查看编码对应的名称)'
+        ],
         [
             'key' =>'total_days',
             'export' =>'total_days',

+ 12 - 1
config/excel/monthPsOrder.php

@@ -27,7 +27,7 @@ return [
         [
             'key' =>'employee_id',
             'export' =>'employee_number',
-            'value' => '人员',
+            'value' => '人员工号',
             'required' => true,
             'is_main' => false,
             'default' => "",
@@ -35,6 +35,17 @@ return [
             'enums' => [],
             'comments' => '必填(填写人员工号)'
         ],
+        [
+            'key' =>'employee_title',
+            'export' =>'employee_title',
+            'value' => '人员名称',
+            'required' => false,
+            'is_main' => false,
+            'default' => "",
+            'unique' => false,
+            'enums' => [],
+            'comments' => '选填(便于操作人查看编码对应的名称)'
+        ],
         [
             'key' =>'salary',
             'export' =>'salary',

+ 12 - 1
config/excel/monthPwOrder.php

@@ -27,7 +27,7 @@ return [
         [
             'key' =>'employee_id',
             'export' =>'employee_number',
-            'value' => '人员',
+            'value' => '人员工号',
             'required' => true,
             'is_main' => false,
             'default' => "",
@@ -35,6 +35,17 @@ return [
             'enums' => [],
             'comments' => '必填(填写人员工号)'
         ],
+        [
+            'key' =>'employee_title',
+            'export' =>'employee_title',
+            'value' => '人员名称',
+            'required' => false,
+            'is_main' => false,
+            'default' => "",
+            'unique' => false,
+            'enums' => [],
+            'comments' => '选填(便于操作人查看编码对应的名称)'
+        ],
         [
             'key' =>'total_days',
             'export' =>'total_days',