|
@@ -174,17 +174,23 @@ class House extends AdminController {
|
|
if (!$checkState) {
|
|
if (!$checkState) {
|
|
return new Response(Response::ERROR, "请选择审核状态");
|
|
return new Response(Response::ERROR, "请选择审核状态");
|
|
}
|
|
}
|
|
|
|
+ $old = HouseApi::getInfoById($id);
|
|
|
|
+ if (!$old || $old["type"] != $this->user["type"]) {
|
|
|
|
+ return new Response(Response::ERROR, "没有对应的申报记录");
|
|
|
|
+ }
|
|
if ($process == 1) {
|
|
if ($process == 1) {
|
|
- $old = HouseApi::getInfoById($id);
|
|
|
|
$old["fields"] = $fields;
|
|
$old["fields"] = $fields;
|
|
$old["files"] = $files;
|
|
$old["files"] = $files;
|
|
houseModel::update($old);
|
|
houseModel::update($old);
|
|
}
|
|
}
|
|
if ($process == 3) {
|
|
if ($process == 3) {
|
|
|
|
+ $depCodes = getJsonConfig("../sys_config.json", "housepurchase_dep_list")[$old["type"]];
|
|
|
|
+ if ((!$depCodes || count($depCodes) == 0) && !$old["importDepPassTime"]) {
|
|
|
|
+ return new Response(Response::ERROR, "没有配置部门审核时,该申报记录需要通过【各单位核查结果批量导入】核果后才可以进行复审");
|
|
|
|
+ }
|
|
$data["id"] = $id;
|
|
$data["id"] = $id;
|
|
if ($checkState == 2) {
|
|
if ($checkState == 2) {
|
|
if ($toProcess == 2) {
|
|
if ($toProcess == 2) {
|
|
- $depCodes = getJsonConfig("../sys_config.json", "housepurchase_dep_list")[$old["type"]];
|
|
|
|
if (!$depCodes || count($depCodes) == 0) {
|
|
if (!$depCodes || count($depCodes) == 0) {
|
|
return new Response(Response::ERROR, "没有配置部门审核,不能选择驳回至部门审核");
|
|
return new Response(Response::ERROR, "没有配置部门审核,不能选择驳回至部门审核");
|
|
}
|
|
}
|
|
@@ -812,6 +818,62 @@ class House extends AdminController {
|
|
return new Response(Response::SUCCESS, "撤销成功");
|
|
return new Response(Response::SUCCESS, "撤销成功");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function importDeptCheckRecords() {
|
|
|
|
+ $depCodes = getJsonConfig("../sys_config.json", "housepurchase_dep_list")[$this->user["type"]];
|
|
|
|
+ if ($depCodes && count($depCodes) > 0) {
|
|
|
|
+ return \StrUtil::back(new Response(Response::ERROR, "系统中存在部门审核配置信息,不能使用报表导入核查结果"), "Housepurchase.callBack");
|
|
|
|
+ }
|
|
|
|
+ $maxFileSize = 10; //mb
|
|
|
|
+ $tmp = $this->request->file("file");
|
|
|
|
+
|
|
|
|
+ if (!$tmp) {
|
|
|
|
+ return \StrUtil::back(new Response(Response::ERROR, "没有上传单位核查文档"), "Housepurchase.callBack");
|
|
|
|
+ }
|
|
|
|
+ if (round($tmp->getSize() / 1024 / 1024, 2) > $maxFileSize) {
|
|
|
|
+ return \StrUtil::back(new Response(Response::ERROR, "文档大小不能超过10MB"), "Housepurchase.callBack");
|
|
|
|
+ }
|
|
|
|
+ $filepath = $tmp->getPathname();
|
|
|
|
+ try {
|
|
|
|
+ $rows = getExcelDatas($filepath);
|
|
|
|
+ } catch (\PhpOffice\PhpSpreadsheet\Exception $e) {
|
|
|
|
+ return \StrUtil::back(new Response(Response::ERROR, "文件识别错误!"), "Housepurchase.callBack");
|
|
|
|
+ }
|
|
|
|
+ array_shift($rows); //去标题行
|
|
|
|
+ $idCards = [];
|
|
|
|
+ $waitCheckRows = [];
|
|
|
|
+ foreach ($rows as $key => $row) {
|
|
|
|
+ $no = $key + 2;
|
|
|
|
+ $idCard = trim($row[1]);
|
|
|
|
+ $checkStateStr = trim($row[2]);
|
|
|
|
+ $checkMsg = trim($row[3]);
|
|
|
|
+ $checkState = $checkStateStr == "审核通过" ? 1 : 2; //1通过,2不通过=驳回状态
|
|
|
|
+ if (!$idCard) {
|
|
|
|
+ return \StrUtil::back(new Response(Response::ERROR, sprintf("第%d行证件号码不能放空,请仔细检查内容完整后再重新提交", $no)), "Housepurchase.callBack");
|
|
|
|
+ }
|
|
|
|
+ if (in_array($idCard, $idCards)) {
|
|
|
|
+ return \StrUtil::back(new Response(Response::ERROR, sprintf("第%d行证件号码存在重复,请请仔细检查内容无误后再重新提交", $no)), "Housepurchase.callBack");
|
|
|
|
+ } else {
|
|
|
|
+ $old = HouseApi::getNewestInfoByIdCard($idCard);
|
|
|
|
+ if (!$old) {
|
|
|
|
+ return \StrUtil::back(new Response(Response::ERROR, sprintf("第%d行证件号码没有有效的申报记录,请请仔细检查内容无误后再重新提交", $no)), "Housepurchase.callBack");
|
|
|
|
+ }
|
|
|
|
+ if ($old["type"] != $this->user["type"]) {
|
|
|
|
+ return \StrUtil::back(new Response(Response::ERROR, sprintf("第%d行证件号码对应的申报记录不在您的职责范围,请请仔细检查内容无误后再重新提交", $no)), "Housepurchase.callBack");
|
|
|
|
+ }
|
|
|
|
+ if ($old["checkState"] != HouseStateEnum::NEED_REVIEW_CHECK) {
|
|
|
|
+ return \StrUtil::back(new Response(Response::ERROR, sprintf("第%d行证件号码对应的申报记录不在审核范围,请请仔细检查内容无误后再重新提交", $no)), "Housepurchase.callBack");
|
|
|
|
+ }
|
|
|
|
+ $idCards[] = $idCard;
|
|
|
|
+ }
|
|
|
|
+ $waitCheckRows[] = ["type" => 1, "idCard" => $idCard, "checkState" => $checkState, "checkMsg" => $checkMsg, "createUser" => sprintf("%s(%s)", $this->user["account"], $this->user["companyName"])];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for ($i = 0; $i < count($waitCheckRows); $i++) {
|
|
|
|
+ queue("app\job\House", $waitCheckRows[$i]);
|
|
|
|
+ }
|
|
|
|
+ return \StrUtil::back(new Response(Response::SUCCESS, "已经成功添加到计划任务,请稍候查看申报列表进行确认"), "Housepurchase.callBack");
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @param type
|
|
* @param type
|
|
* @description 查询需要审核的数据(待核查征信 /待公示 / 待公示通过 / 待兑现)
|
|
* @description 查询需要审核的数据(待核查征信 /待公示 / 待公示通过 / 待兑现)
|
|
@@ -2284,7 +2346,7 @@ class House extends AdminController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$housepurchase["decideDetail"] = $old["decideDetail"] . ($descideDesc ? implode("", $descideDesc) : "");
|
|
$housepurchase["decideDetail"] = $old["decideDetail"] . ($descideDesc ? implode("", $descideDesc) : "");
|
|
- return new Response(Response:: SUCCESS, "", $housepurchase);
|
|
|
|
|
|
+ return new Response(Response::SUCCESS, "", $housepurchase);
|
|
}
|
|
}
|
|
|
|
|
|
private function setHousepurchase($request) {
|
|
private function setHousepurchase($request) {
|
|
@@ -2326,5 +2388,4 @@ class House extends AdminController {
|
|
"marryStatus" => $marryStatus, "checkState" => $checkState, "publicState" => null, "cashType" => null, "isRecover" => $isRecover, "isConflict" => $isConflict];
|
|
"marryStatus" => $marryStatus, "checkState" => $checkState, "publicState" => null, "cashType" => null, "isRecover" => $isRecover, "isConflict" => $isConflict];
|
|
return $obj;
|
|
return $obj;
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|