소스 검색

add - 长期工程师结算定时任务

liugc 1 년 전
부모
커밋
38efaa9c34
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      app/common/command/SalaryItemPermanently.php
  2. 2 0
      config/console.php

+ 4 - 2
app/common/command/SalaryItemPermanently.php

@@ -16,13 +16,15 @@ class SalaryItemPermanently extends Command
 {
     protected function configure()
     {
-        $this->setName('salary_item_permanently')->setDescription('长期工程师结算');
+        $this->setName('salary_item_permanently')->setDescription('长期工程师结算')
+            ->addArgument('masterWorker_id', 2, '工程师ID');
     }
 
     protected function execute(Input $input, Output $output)
     {
         try {
-            EngineerSettlementPermanentlyLogic::settlementRegular();
+            $masterWorker_id = $input->getArgument('masterWorker_id')??0;
+            EngineerSettlementPermanentlyLogic::settlementRegular($masterWorker_id);
             return true;
         } catch (\Exception $e) {
             Log::write('EngineerSettlementPermanentlyLogic:'.$e->getMessage());

+ 2 - 0
config/console.php

@@ -25,6 +25,8 @@ return [
         'group_order' => 'app\common\command\GroupOrder',
         // 导出表格
         'excel_export' => 'app\common\command\ExcelExport',
+        // 长期工程师结算
+        'salary_item_permanently' => 'app\common\command\SalaryItemPermanently',
         //配件定时任务
         'examine_spare' => 'app\common\command\ExamineSpare',
         //维修故障限价数据初始化抓取