Sfoglia il codice sorgente

增加合同到期待变更提醒

sandm 1 anno fa
parent
commit
e6794a320e
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      app/enterprise/controller/TalentBasicChange.php

+ 2 - 2
app/enterprise/controller/TalentBasicChange.php

@@ -338,8 +338,8 @@ class TalentBasicChange extends EnterpriseController {
 
         $now = strtotime("Y-m-d",time());
 
-        $count = Talent::alias("ti")->field("ti.id,ti.name,ti.card_number,ti.labor_contract_rangetime")->leftJoin("un_talent_basic_change tbc","ti.id = tbc.talentId")->whereRaw("trim(SUBSTRING_INDEX(ti.labor_contract_rangetime,'-',-3)) > '{$now}' and tbc.id is NULL and ti.delete = 0 and ti.checkState = '" .TalentState::CERTIFICATED . "' and ti.enterprise_id = '" . session("user")["uid"] . "'")->count();
-        $list = Talent::alias("ti")->field("ti.id,ti.name,ti.card_number,ti.labor_contract_rangetime")->leftJoin("un_talent_basic_change tbc","ti.id = tbc.talentId")->whereRaw("trim(SUBSTRING_INDEX(ti.labor_contract_rangetime,'-',-3)) > '{$now}' and tbc.id is NULL and ti.delete = 0 and ti.checkState = '" .TalentState::CERTIFICATED . "' and ti.enterprise_id = '" . session("user")["uid"] . "'")->limit($offset, $limit)->select()->toArray();
+        $count = Talent::alias("ti")->field("ti.id,ti.name,ti.card_number,ti.labor_contract_rangetime")->leftJoin("un_talent_basic_change tbc","ti.id = tbc.talentId")->whereRaw("trim(SUBSTRING_INDEX(ti.labor_contract_rangetime,'-',-3)) < '{$now}' and tbc.id is NULL and ti.delete = 0 and ti.checkState = '" .TalentState::CERTIFICATED . "' and ti.active = 1 and ti.enterprise_id = '" . session("user")["uid"] . "'")->count();
+        $list = Talent::alias("ti")->field("ti.id,ti.name,ti.card_number,ti.labor_contract_rangetime")->leftJoin("un_talent_basic_change tbc","ti.id = tbc.talentId")->whereRaw("trim(SUBSTRING_INDEX(ti.labor_contract_rangetime,'-',-3)) < '{$now}' and tbc.id is NULL and ti.delete = 0 and ti.checkState = '" .TalentState::CERTIFICATED . "' and ti.active = 1 and ti.enterprise_id = '" . session("user")["uid"] . "'")->limit($offset, $limit)->select()->toArray();
 
 
         return json(["total" => $count, "rows" => $list]);