Browse Source

高教津补贴修改交集项目

sugangqiang 1 year ago
parent
commit
371c5ada82

+ 40 - 28
app/admin/controller/TalentAllowance.php

@@ -975,28 +975,22 @@ class TalentAllowance extends AdminController {
         $where = [];
         $where[] = ["id", "in", explode(",", $this->request["ids"])];
         $list = TaModel::where($where)->select()->toArray();
-        /*         * 查询相关的津补贴人才层次 */
-        $where = [];
-        $where[] = ["mainId", "in", explode(",", $this->request["ids"])];
-        $arrangeList = TalentAllowanceArrange::where($where)->select()->toArray();
-        foreach ($arrangeList as &$arrange) {
-            $arrange["talentArrangeName"] = $levelMap[$arrange["talentArrange"]];
-        }unset($arrange);
-        /* Map<String,List<TalentAllowanceArrange>> arrangeMap = arrangeList.stream().collect(Collectors.groupingBy(TalentAllowanceArrange::getMainId));
-          Integer sheetSize = 0;
-          for(TalentAllowanceInfo info:allList){
-          info.setEnterpriseName(enterpriseMap.get(info.getEnterpriseId()));
-          info.setAddressName(streetMap.get(info.getAddress()));
-          info.setTalentArrangeName(levelMap.get(info.getTalentArrange()));
-          if(info.getRecommendAllowanceType() == 1){
-          info.setArrangeList(arrangeMap.get(info.getId()));
-          sheetSize = sheetSize + info.getArrangeList().size();
-          }else if(info.getRecommendAllowanceType() == 1){
-          sheetSize++;
-          }
-          } */
-        $filename = CommonConst::getTypeName($this->user["type"]) . $list[0]["year"] . "年度津补贴拟发放对象名单";
-        $columns = ["序号", "姓名", "工作单位", "镇(街道)", "人才层次", "津补贴享受月份数", "每月享受津贴标准(元)", $list[0]["year"] . "年度累计应享受津补贴金额(元)", "备注"];
+        $rows = [];
+        for ($i = 0; $i < count($list); $i++) {
+            $item = $list[$i];
+            $rows[] = [
+                $i + 1, $item["name"], $enterpriseMap[$item["enterpriseId"]], $streetMap[$item["address"]], $levelMap[$item["talentArrange"]], $item["description"]
+            ];
+        }
+        $filename = CommonConst::getTypeName($this->user["type"]) . $allList[0]["year"] . "年度津补贴拟发放对象名单";
+        $columns = ["序号", "姓名", "工作单位", "镇(街道)", "人才层次", "备注"];
+        if ($rows) {
+            export($columns, $rows, $filename);
+            exit();
+        } else {
+            $response->msg = "没有选择导出的名单";
+            return \StrUtil::back($response, "TalentAllowanceInfo.hczxCallBack");
+        }
     }
 
     /**
@@ -1180,6 +1174,7 @@ class TalentAllowance extends AdminController {
         /*         * 获取各个项目的综合月份 */
         $monthMap = $this->mergeMonth($detailMonthList);
         $monthAndDayMap = $this->mergeMonthNeedDay($detailMonthList);
+        $info["backWork"] = $old["backWork"];
         $info["recommendAllowanceType"] = $old["allowanceType"];
         $info["recommendAllowanceMsg"] = "";
         $projectList = \app\common\model\TalentAllowanceProject::where("mainId", $info["id"])->select()->toArray();
@@ -1223,12 +1218,23 @@ class TalentAllowance extends AdminController {
             $set = array_intersect($set, $pensionSet);
             $set = array_intersect($set, $taxSet);
         } else if ($info["type"] == CommonConst::ENTERPRISE_GJ) {
-            $set = array_intersect($set, $contractSet);
-            $set = array_intersect($set, $workdaySet);
-            $set = array_intersect($set, $wageSet);
-            $checkSet = $set;
-            $set = array_intersect($set, $pensionSet);
-            $set = array_intersect($set, $taxSet);
+            if ($info["backWork"] == 1) {
+                $str = "工资发放月份、个税缴交月份";
+                $set = array_intersect($set, $wageSet);
+                $set = array_intersect($set, $taxSet);
+                $checkSet = $set;
+                $set = array_intersect($set, $contractSet);
+                $set = array_intersect($set, $pensionSet);
+                $set = array_intersect($set, $workdaySet);
+            } else {
+                $str = "养老保险缴交月份、工资发放月份、个税缴交月份";
+                $set = array_intersect($set, $pensionSet);
+                $set = array_intersect($set, $wageSet);
+                $set = array_intersect($set, $taxSet);
+                $checkSet = $set;
+                $set = array_intersect($set, $contractSet);
+                $set = array_intersect($set, $workdaySet);
+            }
         } else {
             $set = array_intersect($set, $contractSet);
             $set = array_intersect($set, $workdaySet);
@@ -1592,6 +1598,12 @@ class TalentAllowance extends AdminController {
             $res["files"] = $filetypes;
             $res["projects"] = $projectList;
             $res["concats"] = $detailList;
+            if ($process == 1) {
+                $standard = \app\common\api\AmountStandardApi::getStandard($info["type"], $info["allowanceType"], $info["talentArrange"]);
+
+                $res["calResult"] = TalentAllowanceApi::validateAllowanceType($id);
+                $res["calResult"]["money"] = $standard ? $standard["money"] : 0;
+            }
         }
         return new Response(Response::SUCCESS, "不在审核范围内", $res);
     }

+ 12 - 0
app/admin/view/talent_allowance/info.html

@@ -241,6 +241,18 @@
                                                     </div>
                                                 </div>
                                                 {/if}
+                                                {if condition="in_array($row['type'],[6])"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-1 control-label spacing"><span style="color: red">*</span>退休返聘人员</label>
+                                                    <div class="col-sm-2 spacing">
+                                                        <select type="text" class="form-control" disabled="disabled" id="backWork" name="backWork" value="{$row.backWork|default=2}">
+                                                            <option>请选择</option>
+                                                            <option value="1">是</option>
+                                                            <option value="2">否</option>
+                                                        </select>
+                                                    </div>
+                                                </div>
+                                                {/if}
                                                 <div class="rowGroup" id="wageDiv" style="display:none;">
                                                     <label class="col-sm-1 control-label spacing"><span style="color: red">*</span>上一年度年薪(元)</label>
                                                     <div class="col-sm-2 spacing">

+ 12 - 6
app/admin/view/talent_allowance/public_check.html

@@ -129,12 +129,6 @@
                                                     </div>
                                                 </div>
                                                 {/if}
-                                                <div class="rowGroup">
-                                                    <label class="col-sm-1 control-label spacing"><span style="color: red">*</span>申报来源</label>
-                                                    <div class="col-sm-2 spacing">
-                                                        <input type="text" class="form-control" readonly="readonly" id="sourceName" name="sourceName" value="{$row.sourceName}" >
-                                                    </div>
-                                                </div>
                                                 {if condition="!in_array($row['type'],[5])"}
                                                 <div class="rowGroup" id="talentTypeSpan">
                                                     <label class="col-sm-1 control-label spacing"><span style="color: red">*</span>人才标签</label>
@@ -257,6 +251,18 @@
                                                     </div>
                                                 </div>
                                                 {/if}
+                                                {if condition="in_array($row['type'],[6])"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-1 control-label spacing"><span style="color: red">*</span>退休返聘人员</label>
+                                                    <div class="col-sm-2 spacing">
+                                                        <select type="text" class="form-control" disabled="disabled" id="backWork" name="backWork" value="{$row.backWork|default=2}">
+                                                            <option>请选择</option>
+                                                            <option value="1">是</option>
+                                                            <option value="2">否</option>
+                                                        </select>
+                                                    </div>
+                                                </div>
+                                                {/if}
                                                 <div class="rowGroup" id="wageDiv" style="display:none;">
                                                     <label class="col-sm-1 control-label spacing"><span style="color: red">*</span>上一年度年薪(元)</label>
                                                     <div class="col-sm-2 spacing">

+ 13 - 1
app/admin/view/talent_allowance/select.html

@@ -67,7 +67,7 @@
                                             <input type="hidden" name="type" id="type" value="{$row.type}">
                                             <input type="hidden" name="talentId" id="talentId" value="{$row.talentId}">
                                             <input type="hidden" name="checkState" id="checkState" value="{$row.checkState}">
-                                            <input type="hidden" name="process" id="process" value="${process}">
+                                            <input type="hidden" name="process" id="process" value="{$process}">
                                             <input type="hidden" name="companyId" id="companyId" value="{$row.companyId}">
                                             <input type="hidden" name="allowanceType" id="allowanceType" value="{$row.allowanceType}">
                                             <input type="hidden" name="recommendAllowanceType" id="recommendAllowanceType" value="{$row.recommendAllowanceType}">
@@ -239,6 +239,18 @@
                                                     </div>
                                                 </div>
                                                 {/if}
+                                                {if condition="in_array($row['type'],[6])"}
+                                                <div class="rowGroup">
+                                                    <label class="col-sm-1 control-label spacing"><span style="color: red">*</span>退休返聘人员</label>
+                                                    <div class="col-sm-2 spacing">
+                                                        <select type="text" class="form-control" disabled="disabled" id="backWork" name="backWork" value="{$row.backWork|default=2}">
+                                                            <option>请选择</option>
+                                                            <option value="1">是</option>
+                                                            <option value="2">否</option>
+                                                        </select>
+                                                    </div>
+                                                </div>
+                                                {/if}
                                                 <div class="rowGroup" id="wageDiv" style="display:none;">
                                                     <label class="col-sm-1 control-label spacing"><span style="color: red">*</span>上一年度年薪(元)</label>
                                                     <div class="col-sm-2 spacing">

+ 18 - 6
app/common/api/TalentAllowanceApi.php

@@ -191,6 +191,7 @@ class TalentAllowanceApi {
         $info = ["id" => $id];
         $old = self::getInfoById($id);
         $info["type"] = $old["type"];
+        $info["backWork"] = $old["backWork"];
         $info["allowanceType"] = $old["allowanceType"];
         $enterpriseMap = \app\common\model\Enterprise::where("type", $old["type"])->column("name", "id");
         /*         * 查询工作单位记录 */
@@ -257,12 +258,23 @@ class TalentAllowanceApi {
             $set = array_intersect($set, $pensionSet);
             $set = array_intersect($set, $taxSet);
         } else if ($info["type"] == CommonConst::ENTERPRISE_GJ) {
-            $set = array_intersect($set, $contractSet);
-            $set = array_intersect($set, $workdaySet);
-            $set = array_intersect($set, $wageSet);
-            $checkSet = $set;
-            $set = array_intersect($set, $pensionSet);
-            $set = array_intersect($set, $taxSet);
+            if ($info["backWork"] == 1) {
+                $str = "工资发放月份、个税缴交月份";
+                $set = array_intersect($set, $wageSet);
+                $set = array_intersect($set, $taxSet);
+                $checkSet = $set;
+                $set = array_intersect($set, $contractSet);
+                $set = array_intersect($set, $pensionSet);
+                $set = array_intersect($set, $workdaySet);
+            } else {
+                $str = "养老保险缴交月份、工资发放月份、个税缴交月份";
+                $set = array_intersect($set, $pensionSet);
+                $set = array_intersect($set, $wageSet);
+                $set = array_intersect($set, $taxSet);
+                $checkSet = $set;
+                $set = array_intersect($set, $contractSet);
+                $set = array_intersect($set, $workdaySet);
+            }
         } else {
             $set = array_intersect($set, $contractSet);
             $set = array_intersect($set, $workdaySet);

+ 16 - 2
public/static/modular/talentAllowance/talentAllowanceInfo_info_supple.js

@@ -518,8 +518,22 @@ TalentAllowanceInfoDlg.createCheckHtml = function () {
     var html = "";
     switch (process) {
         case '1':
-            html =
-                    '<form id="checkForm">\n' +
+            html = '<form id="checkForm">\n';
+            if (type == 6 && 1==2) {
+                html += '<div class="form-group" style="margin: 10px;">\n' +
+                        '<label for="checkState" class="control-label">计算公式</label>\n' +
+                        '<input type="text" class="form-control" id="result" readonly>\n' +
+                        '</div>\n' +
+                        '<div class="form-group" style="margin: 10px;">\n' +
+                        '<label for="checkState" class="control-label">扣除其它补贴</label>\n' +
+                        '<input type="text" class="form-control" id="otherEnjoyedMoney">\n' +
+                        '</div>\n' +
+                        '<div class="form-group" style="margin: 10px;">\n' +
+                        '<label for="checkMsg" class="control-label">审核意见</label>\n' +
+                        '<textarea class="form-control" id="checkMsg" rows="5"></textarea>\n' +
+                        '</div>\n';
+            }
+            html +=
                     '<div class="form-group" style="margin: 10px;">\n' +
                     '<label for="checkState" class="control-label">审核状态</label>\n' +
                     '<select class="form-control" id="checkStateModal" onchange="TalentAllowanceInfoDlg.toggleField()">\n' +

+ 1 - 1
public/static/modular/talentAllowance/talentAllowancePrepare.js

@@ -187,7 +187,7 @@ TalentAllowanceInfo.publishExportBefore = function(type){
     }
     var operation = function(){
         $("#exportPrepareModal").modal("hide");
-        var url = (type==1)?"/admin/talentAllowance/exportPublicNotCash?ids="+ids:"/admin/talentAllowance/exportPublicNeedCash?ids="+ids;
+        var url = (type==1)?"/admin/talentAllowance/exportPublicNotCash?ids="+ids:"/admin/talentAllowance/exportPublic?ids="+ids;
         window.location.href = encodeURI(encodeURI(Feng.ctxPath + url));
     }
     Feng.confirm("确定要公示预览吗?", operation);