Pārlūkot izejas kodu

生活补贴审核端大部分完成

sugangqiang 1 gadu atpakaļ
vecāks
revīzija
f39a3f7e8a

+ 6 - 0
app/admin/controller/Batch.php

@@ -91,4 +91,10 @@ class Batch extends AdminController {
         return view();
     }
 
+    public function listBatchByType() {
+        $type = $this->request["type"];
+        $talentType = $this->user["type"];
+        return json(BatchApi::getValidBatchs($type, $talentType));
+    }
+
 }

+ 423 - 24
app/admin/controller/LivingAllowance.php

@@ -474,6 +474,260 @@ class LivingAllowance extends AdminController {
         return json($response);
     }
 
+    /**
+     * 通用导出
+     * @return type
+     */
+    public function commonExport() {
+        $response = new \stdClass();
+        $response->code = 500;
+
+        $request = $this->request;
+        $user = $this->user;
+        if (!in_array($user["type"], [1, 2])) {
+            $response->msg = "当前账号类型没有操作权限";
+            return \StrUtil::back($response, "LivingAllowanceInfo.callBack");
+        }
+        $process = $request["process"];
+        $names = \StrUtil::getRequestDecodeParam($request, "names");
+        $values = \StrUtil::getRequestDecodeParam($request, "values");
+
+        $title = array_filter(explode(",", $names)); //exce标题
+        $keys = array_filter(explode(",", $values)); //标题对应的字段
+
+        $where = [];
+        $where[] = ["type", "=", $user["type"]];
+        if ($_where = LivingAllowanceApi::setLivingAllowanceCheckStateCondition($request->param())) {
+            $where = array_merge($where, $_where);
+        }
+
+        if ($_where2 = LivingAllowanceApi::getWhereByParams($request->param())) {
+            $where = array_merge($where, $_where2);
+        }
+        if (in_array("declareTypeName", $keys)) {
+            $declareTypeMap = DictApi::selectByParentCode("un_master_education");
+        }
+        if (in_array("nationalityName", $keys)) {
+            $nationalityMap = DictApi::selectByParentCode("nationality");
+        }
+        if (in_array("nationName", $keys)) {
+            $nationaMap = DictApi::selectByParentCode("nation");
+        }
+        if (in_array("industryFieldNewName", $keys)) {
+            $industryFieldNewMap = DictApi::selectByParentCode("industry_field");
+        }
+        if (in_array("industryFieldName", $keys)) {
+            $industryFieldMap = DictApi::selectByParentCode("un_industryField");
+        }
+        if (in_array("streetName", $keys)) {
+            $streetMap = DictApi::selectByParentCode("street");
+        }
+        if (in_array("politicsName", $keys)) {
+            $politicsMap = DictApi::selectByParentCode("politics");
+        }
+        if (in_array("educationName", $keys)) {
+            $highEducationMap = DictApi::selectByParentCode("highest_degree");
+        }
+        if (in_array("introductionModeName", $keys)) {
+            $introductionModeMap = DictApi::selectByParentCode("un_introduction_mode");
+        }
+
+        $list = LaModel::where($_where)->select()->toArray();
+        $nationalityOldAndNew = [
+            "01" => "cn",
+            "02" => "cn_hk",
+            "03" => "cn_mc",
+            "04" => "cn_tw",
+            "05" => "us",
+            "06" => "en",
+            "07" => "jp",
+            "08" => "co",
+            "09" => "nl",
+            "10" => "sg",
+            "11" => "other"
+        ];
+        foreach ($list as $key => $item) {
+            if (in_array("declareTypeName", $keys)) {
+                $list[$key]["declareTypeName"] = $declareTypeMap[$item["declareType"]];
+            }
+            if (in_array("nationalityName", $keys)) {
+                $list[$key]["nationalityName"] = $nationalityMap[$item["nationality"]] ?: $nationalityMap[$nationalityOldAndNew[$item["nationality"]]];
+            }
+            if (in_array("nationName", $keys)) {
+                $list[$key]["nationName"] = $nationaMap[$item["nation"]];
+            }
+            if (in_array("industryFieldNewName", $keys)) {
+                $list[$key]["industryFieldNewName"] = $industryFieldNewMap[$item["industryFieldNew"]];
+            }
+            if (in_array("industryFieldName", $keys)) {
+                if ($item["industryFieldNew"]) {
+                    $list[$key]["industryFieldName"] = DictApi::findByParentCodeAndCode($item["industryFieldNew"] . "_field", $item["industryField"])["name"];
+                } else {
+                    $list[$key]["industryFieldName"] = $industryFieldMap[$item["industryField"]];
+                }
+            }
+            if (in_array("streetName", $keys)) {
+                $list[$key]["streetName"] = $streetMap[$item["address"]];
+            }
+            if (in_array("politicsName", $keys)) {
+                $list[$key]["politicsName"] = $politicsMap[$item["politics"]];
+            }
+            if (in_array("educationName", $keys)) {
+                $list[$key]["educationName"] = $highEducationMap[$item["highEducation"]];
+            }
+            if (in_array("introductionModeName", $keys)) {
+                $list[$key]["introductionModeName"] = $introductionModeMap[$item["introductionMode"]];
+            }
+            if (in_array("introductionMethodName", $keys)) {
+                $list[$key]["introductionMethodName"] = $item["introductionMethod"] == 1 ? "新引进" : "其他";
+            }
+            if (in_array("sexName", $keys)) {
+                $list[$key]["sexName"] = $item["sex"] == 1 ? "男" : "女";
+            }
+            if (in_array("cardTypeName", $keys)) {
+                switch ($item["cardType"]) {
+                    case 1:
+                        $list[$key]["cardTypeName"] = "身份证";
+                        break;
+                    case 2:
+                        $list[$key]["cardTypeName"] = "通行证";
+                        break;
+                    case 3:
+                        $list[$key]["cardTypeName"] = "护照";
+                        break;
+                    default:
+                        $list[$key]["cardTypeName"] = "未知";
+                        break;
+                }
+            }
+            if (in_array("isPublicName", $keys)) {
+                switch ($item["isPublic"]) {
+                    case 1:
+                        $list[$key]["isPublicName"] = "待核查征信";
+                        break;
+                    case 2:
+                        $list[$key]["isPublicName"] = "待公示";
+                        break;
+                    case 3:
+                        $list[$key]["isPublicName"] = "公示中";
+                        break;
+                    case 4:
+                        $list[$key]["isPublicName"] = "待兑现";
+                        break;
+                    case 5:
+                        $list[$key]["isPublicName"] = "已兑现";
+                        break;
+                }
+            }
+            if (in_array("studyAbroadName", $keys)) {
+                $list[$key]["studyAbroadName"] = $item["studyAbroad"] == 1 ? "是" : "否";
+            }
+            if (in_array("recommendIsPayName", $keys)) {
+                if ($item["recommendIsPay"] == -1) {
+                    $list[$key]["recommendIsPayName"] = "不予兑现";
+                }
+                if ($item["recommendIsPay"] == 0) {
+                    $list[$key]["recommendIsPayName"] = "未知";
+                }
+                if ($item["recommendIsPay"] == 1) {
+                    $list[$key]["recommendIsPayName"] = "待兑现";
+                }
+                if ($item["recommendIsPay"] == 2) {
+                    $list[$key]["recommendIsPayName"] = "已兑现";
+                }
+            }
+            if (in_array("isPayName", $keys)) {
+                if ($item["isPay"] == -1) {
+                    $list[$key]["isPayName"] = "不予兑现";
+                }
+                if ($item["isPay"] == 0) {
+                    $list[$key]["isPayName"] = "未知";
+                }
+                if ($item["isPay"] == 1) {
+                    $list[$key]["isPayName"] = "待兑现";
+                }
+                if ($item["isPay"] == 2) {
+                    $list[$key]["isPayName"] = "已兑现";
+                }
+            }
+            if (in_array("creditStatusName", $keys)) {
+                if ($item["creditStatus"] == 1) {
+                    $list[$key]["creditStatusName"] = "待核查征信";
+                }
+                if ($item["creditStatus"] == 2) {
+                    $list[$key]["creditStatusName"] = "征信通过";
+                }
+                if ($item["creditStatus"] == 3) {
+                    $list[$key]["creditStatusName"] = "征信失信";
+                }
+            }
+
+            if ($process && in_array("checkStateName", $keys)) {
+                switch ($process) {
+                    case 1:
+                        if ($item["checkState"] == -1) {
+                            $list[$key]["checkStateName"] = "审核不通过";
+                        } else if ($item["checkState"] == 1) {
+                            $list[$key]["checkStateName"] = "待提交";
+                        } else if ($item["checkState"] == 10) {
+                            $list[$key]["checkStateName"] = "已驳回";
+                        } else if ($item["checkState"] == 15 || $item["checkState"] >= 25 || $item["checkState"] >= 35) {
+                            $list[$key]["checkStateName"] = "已通过";
+                        } else if ($item["checkState"] == 7) {
+                            $list[$key]["checkStateName"] = $item["highProcess"] >= 1 ? "重新提交" : "待审核";
+                        } else if ($item["checkState"] == 20) {
+                            $list[$key]["checkStateName"] = $item["highProcess"] >= 1 ? "上级驳回" : "待审核";
+                        }
+                        break;
+                    case 3:
+                        if ($item["checkState"] == -1) {
+                            $list[$key]["checkStateName"] = "审核不通过";
+                        } else if ($item["checkState"] == 25) {
+                            $list[$key]["checkStateName"] = $item["highProcess"] >= 3 ? "重新提交" : "待审核";
+                        } else if ($item["checkState"] == 30 || $item["checkState"] <= 20) {
+                            $list[$key]["checkStateName"] = "已驳回";
+                        } else if ($item["checkState"] == 35) {
+                            $list[$key]["checkStateName"] = "已通过";
+                        }
+                        break;
+                    case 4:
+                        if ($item["checkState"] == -1) {
+                            $list[$key]["checkStateName"] = "审核不通过";
+                        } else if ($item["checkState"] == 35) {
+                            $list[$key]["checkStateName"] = "已通过";
+                        }
+                        break;
+                    case 5:
+                        $list[$key]["checkStateName"] = "已通过";
+                        break;
+                }
+            }
+        }
+        $fileName = "硕博人才生活补贴申报导出";
+        if ($process == 1) {
+            $fileName = "硕博人才生活补贴初审导出";
+        } else if ($process == 2) {
+            $fileName = "硕博人才生活补贴部门审核导出";
+        } else if ($process == 3) {
+            $fileName = "硕博人才生活补贴复核导出";
+        } else if ($process == 4) {
+            $fileName = "硕博人才生活补贴兑现导出";
+        }
+        $rows = [];
+        foreach ($list as $item) {
+            $row = [];
+            foreach ($keys as $k) {
+                $row[] = $item[$k];
+            }
+            $rows[] = $row;
+        }
+        if (!$rows) {
+            $response->msg = "没有可导出的内容";
+            return \StrUtil::back($response, "LivingAllowanceInfo.callBack");
+        }
+        export($title, $rows, $fileName);
+    }
+
     /**
      * 导出核查征信名单
      * @auth {{/talentInfo/exportHczx}}
@@ -508,6 +762,120 @@ class LivingAllowance extends AdminController {
         export($title, $exportList, $fileName);
     }
 
+    /**
+     * 公示预览
+     */
+    public function exportPublic() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $user = $this->user;
+        $ids = array_filter(explode(",", $this->request->param("ids")));
+        $batch = date("Ym");
+        //查询需要公示的数据(勾选)
+        $where = [];
+        $where[] = ["id", "in", $ids];
+        $list = LaModel::where($where)->order("enterpriseId")->select()->toArray();
+        $rows = [];
+        for ($i = 0; $i < count($list); $i++) {
+            $obj = $list[$i];
+            $obj["sexName"] = $obj["sex"] == 1 ? "男" : "女";
+            $obj["sn"] = $i + 1;
+            if ($obj["checkState"] == LaState::LA_NOTPASS) {
+                $where = [];
+                $where[] = ["mainId", "=", $obj["id"]];
+                $where[] = ["type", "=", ProjectState::LIVINGALLOWANCE];
+                $where[] = ["step", "=", 3];
+                $where[] = ["state", "<>", 8];
+                $log = TalentLog::where($where)->order("createTime desc")->find();
+                if ($log && $log["state"] == -1) {
+                    $obj["description"] = $log["description"];
+                }
+                if ($obj["outMsg"]) {
+                    $obj["description"] = ($log["description"] ? $log["description"] : "") . $obj["outMsg"];
+                }
+                $obj["stateName"] = "审核不通过";
+            }
+            if ($obj["checkState"] == LaState::LA_PASS) {
+                $obj["stateName"] = "审核通过";
+            }
+            $rows[] = [
+                $obj["sn"], $obj["name"], $obj["sexName"], $obj["enterpriseName"], $obj["stateName"], $obj["description"]
+            ];
+        }
+        $title = ["序号", "姓名", "性别", "工作单位", "审核状态", "备注"];
+
+        $fileName = "硕博人才生活补贴申报第" . $batch . "批次公示导出";
+        $titleName = "";
+        if ($user["type"] == 1) {
+            $titleName = substr($batch, 0, 4) . "年" . substr($batch, 4, 6) . "月硕博人才生活补贴申报对象公示名单";
+        }
+        if ($user["type"] == 2) {
+            $titleName = substr($batch, 0, 4) . "年" . substr($batch, 4, 6) . "月硕博人才生活补贴申报对象公示名单";
+        }
+        export($title, $rows, $fileName, [], $titleName);
+    }
+
+    /**
+     * 公示导出
+     */
+    public function publicExport() {
+        $response = new \stdClass();
+        $response->code = 500;
+        $user = $this->user;
+        if (!in_array($user["type"], [1, 2])) {
+            $response->msg = "当前账号类型没有操作权限";
+            return \StrUtil::back($response, "LivingAllowanceInfo.callBack");
+        }
+        $startTime = $this->request["startTime"];
+        $endTime = $this->request["endTime"];
+        $where = [];
+        $where[] = ["publicBatch", "between", [$startTime, $endTime]];
+        $where[] = ["type", "=", $user["type"]];
+        $list = LaModel::where($where)->order("publicBatch")->select()->toArray();
+        if (!$list) {
+            $response->msg = "所选时间段内无公示数据";
+            return \StrUtil::back($response, "LivingAllowanceInfo.callBack");
+        }
+        $rows = [];
+        for ($i = 0; $i < count($list); $i++) {
+            $obj = $list[$i];
+
+            $obj["sexName"] = $obj["sex"] == 1 ? "男" : "女";
+            $obj["sn"] = $i + 1;
+            if ($obj["checkState"] == LaState::LA_NOTPASS) {
+                $where = [];
+                $where[] = ["mainId", "=", $obj["id"]];
+                $where[] = ["type", "=", ProjectState::LIVINGALLOWANCE];
+                $where[] = ["step", "=", 3];
+                $where[] = ["state", "<>", 8];
+                $log = TalentLog::where($where)->order("createTime desc")->find();
+                if ($log && $log["state"] == -1) {
+                    $obj["description"] = $log["description"];
+                }
+                if ($obj["outMsg"]) {
+                    $obj["description"] = ($log["description"] ? $log["description"] : "") . $obj["outMsg"];
+                }
+                $obj["stateName"] = "审核不通过";
+            }
+            if ($obj["checkState"] == LaState::LA_PASS) {
+                $obj["stateName"] = "审核通过";
+            }
+            $rows[] = [
+                $obj["sn"], $obj["publicBatch"], $obj["name"], $obj["sexName"], $obj["enterpriseName"], $obj["stateName"], $obj["description"]
+            ];
+        }
+        $title = ["序号", "公示批次", "姓名", "性别", "工作单位", "审核状态", "备注"];
+        $fileName = "硕博人才生活补贴公示导出";
+        $titleName = "";
+        if ($user["type"] == 1) {
+            $titleName = $startTime . "至" . $endTime . "硕博人才生活补贴申报公示名单";
+        }
+        if ($user["type"] == 2) {
+            $titleName = $startTime . "至" + $endTime . "硕博人才生活补贴申报公示名单";
+        }
+        export($title, $rows, $fileName, [], $titleName);
+    }
+
     /**
      * 导入征信核查结果
      * @auth {{/talentInfo/importProject}}
@@ -736,7 +1104,7 @@ class LivingAllowance extends AdminController {
             $data["recommendJudgmentDetails"] = "";
             $desc = "(公示再审核驳回)审核状态:" . LaState::getStateDesc($old["checkState"]) . "->" . LaState::getStateDesc($data["checkState"]) .
                     ";公示状态:<span class='label label-success'>公示中</span>-><span class='label label-primary'>待核查征信</span>";
-        } else if (obj . getCheckState() == StateConst . RCRD_NOTPASS) {
+        } else if ($checkState == LaState::LA_NOTPASS) {
             $data["isPublic"] = 4;
             $data["recommendIsPay"] = -1;
             $data["recommendAmount"] = 0;
@@ -799,9 +1167,18 @@ class LivingAllowance extends AdminController {
                 $obj = $upList[$i];
 
                 if ($obj["isPublic"] != 3) {
-                    $response->msg = sprintf("第%d条记录不是公示中状态,不能公示通过");
+                    $response->msg = sprintf("第%d条记录不是公示中状态,不能公示通过", $i + 1);
                     return json($response);
                 }
+
+                $obj["isPublic"] = 4;
+                $obj["amount"] = $obj["recommendAmount"];
+                $obj["isPay"] = $obj["recommendIsPay"];
+                $obj["amountDesc"] = $obj["recommendAmountDesc"];
+                $obj["judgmentDetails"] = $obj["recommendJudgmentDetails"];
+                Db::table("md_living_allowance_info")->save($obj);
+
+                //添加日志
                 $newLog["id"] = getStringId();
                 $newLog["type"] = ProjectState::LIVINGALLOWANCE;
                 $newLog["mainId"] = $obj["id"];
@@ -812,15 +1189,7 @@ class LivingAllowance extends AdminController {
                 $newLog["description"] = "";
                 $newLog["createTime"] = date("Y-m-d H:i:s");
                 $newLog["createUser"] = sprintf("%s(%s)", $this->user["account"], $this->user["companyName"]);
-
                 $newLogs[] = $newLog;
-
-                $obj["isPublic"] = 4;
-                $obj["amount"] = $obj["recommendAmount"];
-                $obj["isPay"] = $obj["recommendIsPay"];
-                $obj["amountDesc"] = $obj["recommendAmountDesc"];
-                $obj["judgmentDetails"] = $obj["recommendJudgmentDetails"];
-                Db::table("md_living_allowance_info")->save($obj);
             }
             Db::table("new_talent_checklog")->insertAll($newLogs);
             Db::commit();
@@ -838,20 +1207,50 @@ class LivingAllowance extends AdminController {
      * 兑现
      */
     public function issue() {
-        /* Company company = (Company) this . getSession() . getAttribute("company");
-          List<LivingAllowanceInfo> tiList = this.livingAllowanceInfoService.selectList(new EntityWrapper<LivingAllowanceInfo>().in("id", ids.split(",")));
-          List<TalentChecklog> logList = new ArrayList<>();
-          for (LivingAllowanceInfo obj : tiList) {
-          obj . setIsPublic(5);
-          //添加日志
-          TalentChecklog log = new TalentChecklog(Integer . parseInt(ProjectConst . MASTERLIVINGALLOWANCE), obj . getId(), null,
-          StateConst . ACTIVE_YES, BasicStateEnum . RCRD_BASIC_PASS . getCode(), StepEnum . RCRD_STEP_CARD . getCode(), "<span class='label label-success'>待兑现</span>-><span class='label label-primary'>已兑现</span>", "",
-          DateUtil . getTime(), ShiroKit . getUser() . getAccount() + "(" + company . getName() + ")");
-          logList . add(log);
-          }
-          this . livingAllowanceInfoService . updateBatchById(tiList);
-          this . talentChecklogService . insertBatch(logList);
-          return new ResponseObj(ResponseObj . SUCCESS, "兑现成功"); */
+        $response = new \stdClass();
+        $response->code = 500;
+
+        $ids = array_filter(explode(",", \StrUtil::getRequestDecodeParam($this->request, "ids")));
+        $where = [];
+        $where[] = ["id", "in", $ids];
+        $list = Db::table("md_living_allowance_info")->where($where)->select()->toArray();
+        $newLogs = [];
+        Db::startTrans();
+        try {
+            for ($i = 0; $i < count($list); $i++) {
+                $obj = $list[$i];
+
+                if ($obj["isPublic"] != 4) {
+                    $response->msg = sprintf("第%d条记录不是公示通过状态,不能兑现", $i + 1);
+                    return json($response);
+                }
+                $obj["isPublic"] = 5;
+                $obj["isPay"] = 2;
+                Db::table("md_living_allowance_info")->save($obj);
+
+                //添加日志
+                $newLog["id"] = getStringId();
+                $newLog["type"] = ProjectState::LIVINGALLOWANCE;
+                $newLog["mainId"] = $obj["id"];
+                $newLog["active"] = 1;
+                $newLog["state"] = 3;
+                $newLog["step"] = 8;
+                $newLog["stateChange"] = "<span class='label label-success'>待兑现</span>-><span class='label label-primary'>已兑现</span>";
+                $newLog["description"] = "";
+                $newLog["createTime"] = date("Y-m-d H:i:s");
+                $newLog["createUser"] = sprintf("%s(%s)", $this->user["account"], $this->user["companyName"]);
+                $newLogs[] = $newLog;
+            }
+            Db::table("new_talent_checklog")->insertAll($newLogs);
+            Db::commit();
+            $response->code = 200;
+            $response->msg = "兑现成功";
+            return json($response);
+        } catch (\Exception $e) {
+            Db::rollback();
+            $response->msg = $e->getMessage();
+            return json($response);
+        }
     }
 
     /**

+ 1 - 4
app/admin/view/living_allowance/index.html

@@ -679,11 +679,9 @@
                                 <li style="width:24%"><input type="checkbox" value="firstInJJTime"><span>首次来晋工作时间</span></li>
                                 <li style="width:24%"><input type="checkbox" value="backJJBusinessTime"><span>返晋创业时间</span></li>
                                 <li style="width:24%"><input type="checkbox" value="enterpriseName"><span>单位名称</span></li>
+                                <li style="width:24%"><input type="checkbox" value="industryFieldNewName"><span>产业领域</span></li>
                                 <li style="width:24%"><input type="checkbox" value="industryFieldName"><span>行业领域</span></li>
                                 <li style="width:24%"><input type="checkbox" value="streetName"><span>所属镇街</span></li>
-                                <!--                                <li style="width:24%"><input type="checkbox" value="enterpriseTalentTypeName"><span>企业标签</span></li>-->
-                                <!--                                <li style="width:24%"><input type="checkbox" value="letterTime"><span>首次来晋行政介绍信时间</span></li>-->
-                                <!--                                <li style="width:24%"><input type="checkbox" value="introductionModeName"><span>引进方式</span></li>-->
                                 <li style="width:24%"><input type="checkbox" value="entryTime"><span>本单位入职时间</span></li>
                                 <li style="width:24%"><input type="checkbox" value="post"><span>职务</span></li>
                                 <li style="width:24%"><input type="checkbox" value="startTime"><span>工作合同开始时间</span></li>
@@ -702,7 +700,6 @@
                                 <li style="width:24%"><input type="checkbox" value="bankNetwork"><span>开户银行网点</span></li>
                                 <li style="width:24%"><input type="checkbox" value="bankNumber"><span>银行行号</span></li>
                                 <li style="width:24%"><input type="checkbox" value="bankAccount"><span>银行账号</span></li>
-                                <!--                                <li style="width:24%"><input type="checkbox" value="description"><span>备注</span></li>-->
                                 <li style="width:24%"><input type="checkbox" value="socialSecurity"><span>社保缴纳情况</span></li>
                                 <li style="width:24%"><input type="checkbox" value="personalTax"><span>个税缴纳情况</span></li>
                                 <li style="width:24%"><input type="checkbox" value="firstSubmitTime"><span>首次确认提交时间</span></li>

+ 19 - 0
app/common/api/BatchApi.php

@@ -260,4 +260,23 @@ class BatchApi {
         return $batch = Batch::where($where)->order("createTime desc")->findOrEmpty();
     }
 
+    /**
+     * 
+     * @param type $type 申报项目
+     * @param type $talentType 人才类型
+     * @return type
+     */
+    public static function getValidBatchs($type, $talentType) {
+        $now = date("Y-m-d H:i:s");
+        $where = [];
+        if ($batch) {
+            $where[] = ["batch", "=", $batch];
+        } else {
+            $where[] = ["active", "=", 1];
+        }
+        $where[] = ["type", "=", $type];
+        $where[] = ["source", "=", $talentType];
+        return $batch = Batch::where($where)->order("createTime desc")->select()->toArray();
+    }
+
 }

+ 3 - 3
app/common/api/LivingAllowanceApi.php

@@ -37,7 +37,7 @@ class LivingAllowanceApi {
         return ["total" => $count, "rows" => $list];
     }
 
-    private static function setLivingAllowanceCheckStateCondition($params) {
+    public static function setLivingAllowanceCheckStateCondition($params) {
         $where = [];
         $checkState = $params["checkState"];
         $process = $params["process"];
@@ -84,7 +84,7 @@ class LivingAllowanceApi {
                     } else if ($checkState == LaState::LA_BEFORE_REJECT) {            //重新提交
                         $where[] = ["checkState", "=", LaState::LA_NEED_THIRD];
                         $where[] = ["highProcess", ">=", 3];
-                    } else if ($checkState == StateConst . RCRD_NEED_THIRD) {               //待复核
+                    } else if ($checkState == LaState::LA_NEED_THIRD) {               //待复核
                         $where[] = ["checkState", "=", $checkState];
                         $where[] = ["highProcess", "<", 3];
                     } else {
@@ -101,7 +101,7 @@ class LivingAllowanceApi {
         return $where;
     }
 
-    private static function getWhereByParams($params) {
+    public static function getWhereByParams($params) {
         foreach ($params as &$param) {
             $param = trim($param);
         }unset($param);

+ 6 - 6
public/static/modular/master/livingAllowanceInfo/livingAllowanceInfo.js

@@ -677,7 +677,7 @@ LivingAllowanceInfo.showCheckFileModal = function () {
         "displayCode": "id",
         "displayName": "batch",
         "type": "GET",
-        "url": Feng.ctxPath + "/batch/listBatchByType?type=" + CONFIG.project_master_living_allowance
+        "url": Feng.ctxPath + "/admin/batch/listBatchByType?type=" + CONFIG.project_master_living_allowance
     });
     $("#upload_file").val("");
     $("#checkFileModal").modal("show");
@@ -843,7 +843,7 @@ LivingAllowanceInfo.needPublicExport = function () {
     }
     var operation = function () {
         $("#exportCommonModal").modal("hide");
-        window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/livingAllowanceInfoExport/exportPublic?ids=" + ids));
+        window.location.href = encodeURI(encodeURI(Feng.ctxPath + "/admin/living_allowance/exportPublic?ids=" + ids));
     }
     Feng.confirm("确定要公示预览吗?", operation);
 }
@@ -952,11 +952,11 @@ LivingAllowanceInfo.public = function () {
 LivingAllowanceInfo.publicExport = function (type) {
     var url = "", dateType = '', format = '';
     if (type == 1) {         //公示导出
-        url = Feng.ctxPath + "/livingAllowanceInfoExport/publicExport";
+        url = Feng.ctxPath + "/admin/living_allowance/publicExport";
         dateType = 'month';
         format = "yyyyMM";
     } else if (type == 2) {     //公布导出
-        url = Feng.ctxPath + "/livingAllowanceInfoExport/publishExport";
+        url = Feng.ctxPath + "/admin/living_allowance/publishExport";
         dateType = 'date';
         format = "yyyy-MM-dd";
     }
@@ -1116,7 +1116,7 @@ LivingAllowanceInfo.issue = function () {
         ids = ids + selected[i].id + ",";
     }
     var operation = function () {
-        var ajax = new $ax(Feng.ctxPath + "/livingAllowanceInfo/issue", function (data) {
+        var ajax = new $ax(Feng.ctxPath + "/admin/living_allowance/issue", function (data) {
             if (data.code == 200) {
                 Feng.success(data.msg);
                 LivingAllowanceInfo.table.refresh();
@@ -1152,7 +1152,7 @@ LivingAllowanceInfo.export = function (process) {
         param.names = names;
         param.values = fieldCodes;
         param.process = process;
-        window.location.href = Feng.setUrlParam(Feng.ctxPath + "/livingAllowanceInfoExport/commonExport", param);
+        window.location.href = Feng.setUrlParam(Feng.ctxPath + "/admin/living_allowance/commonExport", param);
         // window.location.href = Feng.ctxPath + "/api/talentInfoExport/export?names=" + names + "&fieldCodes=" + fieldCodes + "&name=" + $("#name").val() + "&idCard=" + $("#idCard").val()
         //     + "&sex=" + $("#sex").val()+ "&nation=" + $("#nation").val()+ "&nationality=" + $("#nationality").val()+ "&talentType=" + $("#talentType").val()+ "&talentArrange=" + $("#talentArrange").val();
     };