|
@@ -405,7 +405,9 @@ class TalentAllowance extends EnterpriseController {
|
|
|
}
|
|
|
|
|
|
private function createAllowanceProject($info, $contractList) {
|
|
|
+ $count = 0;
|
|
|
foreach ($contractList as $detail) {
|
|
|
+ $count++;
|
|
|
$projects = [
|
|
|
//AllowanceProjectEnum::PROJECT_CONTRACT,
|
|
|
AllowanceProjectEnum::PROJECT_TAX,
|
|
@@ -418,11 +420,15 @@ class TalentAllowance extends EnterpriseController {
|
|
|
];
|
|
|
$list = [];
|
|
|
foreach ($projects as $project) {
|
|
|
+ $months = "";
|
|
|
+ if ($count == count($contractList) && $info["allowanceType"] == AllowanceTypeEnum::JBT_TALENT)
|
|
|
+ $months = "01,02,03,04,05,06,07,08,09,10,11,12";
|
|
|
$list[] = [
|
|
|
"mainId" => $info["id"],
|
|
|
"baseId" => $detail["id"],
|
|
|
"enterpriseId" => $detail["enterpriseId"],
|
|
|
"project" => $project,
|
|
|
+ "months" => $months,
|
|
|
"isLock" => 1,
|
|
|
"createTime" => date("Y-m-d H:i:s")
|
|
|
];
|
|
@@ -832,7 +838,7 @@ class TalentAllowance extends EnterpriseController {
|
|
|
$whr[] = ["ti.enterprise_id", "=", $this->user["uid"]];
|
|
|
$whr[] = ["e.type", "=", $this->user["type"]];
|
|
|
$whr[] = ["ti.id", "not in", $ids];
|
|
|
- $list = \app\enterprise\model\Talent::alias("ti")->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")->field("ti.id,ti.name,ti.card_number as idCard")->where($whr)->select()->toArray();
|
|
|
+ $list = \app\enterprise\model\Talent::alias("ti")->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")->field("ti.id,ti.name,ti.card_number as idCard,ti.cur_entry_time")->where($whr)->select()->toArray();
|
|
|
foreach ($list as $info) {
|
|
|
if (strtotime($year . "-12-31") >= strtotime($info["identifyMonth"])) {
|
|
|
$res[] = $info;
|