| 
					
				 | 
			
			
				@@ -449,7 +449,7 @@ class House extends AdminController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         $sbSet = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if ($old["type"] == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             sbSet = getAllowanceProjectSet(info, old, AllowanceProjectEnum . PROJECT_SB . getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        } else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             Set<String> pensionSet = getAllowanceProjectSet(info, old, AllowanceProjectEnum . PROJECT_SB_PENSION . getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             Set<String> unemploymentSet = getAllowanceProjectSet(info, old, AllowanceProjectEnum . PROJECT_SB_UNEMPLOYMENT . getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             Set<String> medicalSet = getAllowanceProjectSet(info, old, AllowanceProjectEnum . PROJECT_SB_MEDICA . getCode()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -512,141 +512,6 @@ class House extends AdminController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return new Response(Response::SUCCESS, "提交审核成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 初审撤销 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * @return Response 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public function cancleFirstCheck() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $obj = $this->request->param(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $id = $obj["id"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $checkMsg = $obj["checkMsg"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (!$id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return new Response(Response::ERROR, "请选择需要撤销的对象"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $old = TalentAllowanceApi::getInfoById($id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if ($old["checkState"] != AllowanceStateEnum::NEED_REVIEW && $old["checkState"] != AllowanceStateEnum::NOTPASS) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return new Response(Response::ERROR, "当前对象的审核无法撤销"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $data["id"] = $id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $data["checkMsg"] = $checkMsg; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $data["checkState"] = AllowanceStateEnum::NEED_CHECK; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        TalentChecklog::create([ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'id' => getStringId(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'mainId' => $id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'type' => intval(ProjectState::JBT), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'typeFileId' => null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'active' => 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'state' => 11,  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'step' => 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'stateChange' => AllowanceStateEnum::getStateName($old["checkState"]) . "->" . AllowanceStateEnum::getStateName($data["checkState"]), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'description' => "撤销原因:" . $checkMsg, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'createTime' => date("Y-m-d H:i:s", time()), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'createUser' => sprintf("%s(%s)", $this->user["account"], $this->user["companyName"]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        TaModel::update($data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return new Response(Response::SUCCESS, "撤销成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 复核撤销 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * @return Response|\app\admin\controller\ResponseObj 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public function reviewCancleCheck() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $obj = $this->request->param(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $id = $obj["id"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $checkMsg = $obj["checkMsg"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (!$id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return new Response(Response::ERROR, "请选择需要撤销的对象"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $old = TalentAllowanceApi::getInfoById($id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if ($old["checkState"] != AllowanceStateEnum::REVIEW_PASS || $old["publicState"] != 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return new Response(Response::ERROR, "当前对象的审核无法撤销"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $data["id"] = $id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $data["checkMsg"] = $checkMsg; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $data["checkState"] = AllowanceStateEnum::NEED_REVIEW; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        TalentChecklog::create([ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'id' => getStringId(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'mainId' => $id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'type' => intval(ProjectState::JBT), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'typeFileId' => null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'active' => 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'state' => 11,  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'step' => 3, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'stateChange' => AllowanceStateEnum::getStateName($old["checkState"]) . "->" . AllowanceStateEnum::getStateName($data["checkState"]), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'description' => "撤销原因:" . $checkMsg, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'createTime' => date("Y-m-d H:i:s", time()), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            'createUser' => sprintf("%s(%s)", $this->user["account"], $this->user["companyName"]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        TaModel::update($data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return new Response(Response::SUCCESS, "撤销成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 查询需要导出的数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public function findTalentAllowanceByPage() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $param = $this->request->param(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $where = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $where[] = ["type", "=", $this->user["type"]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if ($param != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (\StrUtil::isNotEmpAndNull($param["name"])) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["name", "like", "%" . $param["name"] . "%"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (\StrUtil::isNotEmpAndNull($param["idCard"])) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["idCard", "like", "%" . $param["idCard"] . "%"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $error = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        switch ($param["type"]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case 1: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case 2: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["publicState", "=", 1]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["checkState", "in", [-1, 30]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $error = "暂无可核查征信的数据"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case 3: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case 7: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["publicState", "=", 2]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["checkState", "in", [-1, 30]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["recommendAllowanceType", "=", 3]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $error = "暂无可公示(不予兑现)的数据"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case 4:              
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case 8: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["publicState", "=", 2]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["checkState", "in", [30]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["recommendAllowanceType", "in", [1, 2]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $error = "暂无需要公示(兑现)的数据"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case 5: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["publicState", "=", 3]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["checkState", "in", [-1, 30]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $error = "暂无可公示通过的数据"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            case 6: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["publicState", "=", 4]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["checkState", "in", [30]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $where[] = ["allowanceType", "in", [1, 2]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $error = "暂无可兑现的数据"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $list = TaModel::where($where)->select()->toArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $enterpriseMap = \app\common\model\Enterprise::where("type", $this->user["type"])->column("name", "id"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        foreach ($list as $key => $item) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            $list[$key]["enterpriseName"] = $enterpriseMap[$item["enterpriseId"]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $res = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "rows" => $list, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "total" => count($list) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return new Response(Response::SUCCESS, "", $res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public function exportHczx() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $response = new \stdClass(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $response->code = 500; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -778,19 +643,16 @@ class House extends AdminController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $where = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $where[] = ["id", "in", $ids]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $list = TaModel::where($where)->select()->toArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $list = houseModel::where($where)->select()->toArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Db::startTrans(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $logList = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $phones = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             foreach ($list as $info) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $data["id"] = $info["id"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $data["publicState"] = 3; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                Db::table("un_talent_allowance_info")->update($data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $logList[] = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "id" => getStringId(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "type" => ProjectState::JBT, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "type" => ProjectState::HOUSE, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "mainId" => $info["id"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "active" => 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "state" => 3, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -802,6 +664,8 @@ class House extends AdminController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 ]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $phones[] = $info["phone"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $data["publicState"] = 2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Db::table("un_housepurchase")->where($where)->update($data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $effect = Db::table("new_talent_checklog")->insertAll($logList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Db::commit(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if ($phones && $isMessage && $effect) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -809,7 +673,7 @@ class House extends AdminController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         $params["typeName"], $params["address"], $params["publicStartTime"], $params["publicEndTime"], $params["dep"], $params["phone"], $params["email"]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $phones = array_filter($phones); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 foreach ($phones as $phone) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    queue("app\job\Messenger", ["type" => 6, "userId" => 0, "phone" => $phone, "template" => $tpl_content, "processName" => "津补贴-批量公示", "userType" => 3]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    queue("app\job\Messenger", ["type" => 6, "userId" => 0, "phone" => $phone, "template" => $tpl_content, "processName" => "购房补贴-批量公示", "userType" => 3]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return new Response(Response::SUCCESS, "公示成功"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -997,57 +861,100 @@ class House extends AdminController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $where = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $where[] = ["id", "in", $ids]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $list = TaModel::where($where)->select()->toArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $list = houseModel::where($where)->select()->toArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $houseInfoList = houseInfoModel::where(null)->select()->toArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $houseInfoMap = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        foreach ($houseInfoList as $houseInfo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $houseInfoMap[$houseInfo["idCard"]] = $houseInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $logList = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $insertHouseInfoList = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Db::startTrans(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for ($i = 0; $i < count($list); $i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $obj = $list[$i]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $upd["id"] = $obj["id"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $upd["publicState"] = 4; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $upd["allowanceType"] = $obj["recommendAllowanceType"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $upd["allowanceMsg"] = $obj["recommendAllowanceMsg"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if ($upd["allowanceType"] == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["months"] = $obj["recommendMonths"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["money"] = $obj["recommendMoney"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["moneyDesc"] = $obj["recommendMoneyDesc"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } else if ($upd["allowanceType"] == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["months"] = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["jtTalentArrange"] = $obj["recommendTalentArrange"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["money"] = $obj["recommendMoney"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["moneyDesc"] = $obj["recommendMoneyDesc"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["workAllowanceMoney"] = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["developAllowanceMoney"] = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["months"] = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["money"] = 0.00; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["workAllowanceMoney"] = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $upd["developAllowanceMoney"] = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if ($obj["cashType"] == 1 && $obj["declareType"] == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $houseInfo = $houseInfoMap[$obj["idCard"]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $spouseHouseInfo = $houseInfoMap[$obj["spouseIdcard"]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!$houseInfo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $houseInfo = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "idCard" => $obj["idCard"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "spouseIdCard" => null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "houseAddress" => $obj["houseAddress"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "houseArea" => $obj["houseArea"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "houseMoney" => $obj["houseMoney"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "recordTime" => $obj["recordTime"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "realEstateNo" => $obj["realEstateNo"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "recordNo" => $obj["recordNo"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "balanceMoney" => $obj["houseMoney"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "count" => 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            "lastYearArrears" => 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        ]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $houseInfo["count"] = $houseInfo["count"] + 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $houseInfo["balanceMoney"] = $houseInfo["balanceMoney"] - $obj["shouldEnjoyMoney"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $houseInfo["lastYearArrears"] = $obj["nowNotSubOtherMoney"] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (\StrUtil::isNotEmpAndNull($obj["spouseIdcard"])) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (!$spouseHouseInfo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            $spouseHouseInfo = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "idCard" => $obj["spouseIdcard"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "spouseIdCard" => null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "houseAddress" => $obj["houseAddress"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "houseArea" => $obj["houseArea"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "houseMoney" => $obj["houseMoney"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "recordTime" => $obj["recordTime"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "realEstateNo" => $obj["realEstateNo"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "recordNo" => $obj["recordNo"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "balanceMoney" => $houseInfo["balanceMoney"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "count" => $houseInfo["count"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                "lastYearArrears" => $houseInfo["lastYearArrears"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            ]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            $spouseHouseInfo["count"] = $spouseHouseInfo["count"] + 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            $spouseHouseInfo["lastYearArrears"] = $houseInfo["lastYearArrears"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            $spouseHouseInfo["balanceMoney"] = $spouseHouseInfo["balanceMoney"] - $obj["shouldEnjoyMoney"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if ($spouseHouseInfo["id"]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            $spouseHouseInfo["updateTime"] = date("Y-m-d H:i:s"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            $spouseHouseInfo["updateUser"] = $this->user["uid"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            Db::table("un_housepurchase_house_info")->update($spouseHouseInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            $spouseHouseInfo["id"] = getStringId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            $spouseHouseInfo["createTime"] = date("Y-m-d H:i:s"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            $spouseHouseInfo["createUser"] = $this->user["uid"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            $insertHouseInfoList[] = $spouseHouseInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if ($houseInfo["id"]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $houseInfo["updateTime"] = date("Y-m-d H:i:s"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $houseInfo["updateUser"] = $this->user["uid"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        Db::table("un_housepurchase_house_info")->update($houseInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $houseInfo["id"] = getStringId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $houseInfo["createTime"] = date("Y-m-d H:i:s"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $houseInfo["createUser"] = $this->user["uid"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $insertHouseInfoList[] = $houseInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                Db::table("un_talent_allowance_info")->update($upd); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $stateChange = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $desc = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if ($obj["checkState"] == AllowanceStateEnum::NOTPASS) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $stateChange = "<span class='label label-success'>公示中</span>-><span class='label label-danger'>审核不通过</span>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $desc = "审核不通过"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $stateChange = "<span class='label label-success'>公示中</span>-><span class='label label-primary'>待兑现</span>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $desc = "批量公示"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $logList[] = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "id" => getStringId(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "type" => ProjectState::JBT, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "type" => ProjectState::HOUSE, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "mainId" => $obj["id"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "active" => 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "state" => 3, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "step" => 6, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "stateChange" => $stateChange, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "description" => $desc, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "stateChange" => "<span class='label label-success'>公示中</span>-><span class='label label-primary'>待公布</span>;", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "description" => "批量公示通过", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "createTime" => date("Y-m-d H:i:s"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     'createUser' => sprintf("%s(%s)", $this->user["account"], $this->user["companyName"]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 ]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $upd["publicState"] = 3; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Db::table("un_housepurchase")->where($where)->update($upd); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if ($insertHouseInfoList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                Db::table("un_housepurchase_house_info")->insertAll($insertHouseInfoList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Db::table("new_talent_checklog")->insertAll($logList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Db::commit(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return new Response(Response::SUCCESS, "批量公示通过成功"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1068,19 +975,16 @@ class House extends AdminController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $where = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $where[] = ["id", "in", $ids]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $list = TaModel::where($where)->select()->toArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $list = houseModel::where($where)->select()->toArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $logList = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Db::startTrans(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for ($i = 0; $i < count($list); $i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $obj = $list[$i]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $upd["id"] = $obj["id"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                $upd["publicState"] = 5; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                Db::table("un_talent_allowance_info")->update($upd); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $logList[] = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "id" => getStringId(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    "type" => ProjectState::JBT, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    "type" => ProjectState::HOUSE, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "mainId" => $obj["id"], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "active" => 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "state" => 3, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1091,6 +995,8 @@ class House extends AdminController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     'createUser' => sprintf("%s(%s)", $this->user["account"], $this->user["companyName"]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 ]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $upd["publicState"] = 4; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Db::table("un_housepurchase")->where($where)->update($upd); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Db::table("new_talent_checklog")->insertAll($logList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Db::commit(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return new Response(Response::SUCCESS, "批量兑现成功"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1134,40 +1040,72 @@ class House extends AdminController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 导出公示名单(需要兑现) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param ids 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param type 1-需要兑现,2-不予兑现 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @description 公示预览 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public function exportPublic() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $levelMap = DictApi::selectByParentCode("talent_arrange"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $streetMap = DictApi::selectByParentCode("street"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $enterpriseMap = \app\common\model\Enterprise::where("type", $this->user["type"])->column("name", "id"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $ids = array_filter(explode(",", $this->request["ids"])); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!$ids) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return new Response(Response::ERROR, "请至少选择一行数据"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $type = $this->request["type"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $where = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $where[] = ["id", "in", explode(",", $this->request["ids"])]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        $list = TaModel::where($where)->select()->toArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $where[] = ["id", "in", $ids]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $list = houseModel::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); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          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"] . "年度累计应享受津补贴金额(元)", "备注"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $where[] = ["pId", "in", $ids]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $otherList = \app\common\model\HousePurchaseEnjoyOther::where($where)->select()->toArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $otherMap = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        foreach ($otherList as $ol) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $otherMap[$ol["pId"]][] = $ol; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $enterpriseMap = \app\common\model\Enterprise::where("type", $this->user["type"])->column("name", "id"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $levelMap = DictApi::selectByParentCode("talent_arrange"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $year = $list[0]["year"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        foreach ($list as $key => $obj) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $obj["talentArrangeName"] = $levelMap[$obj["talentArrange"]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $obj["enterpriseName"] = $enterpriseMap[$obj["enterpriseId"]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $obj["sn"] = $key + 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if ($obj["declareType"] == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $obj["declareTypeName"] = "购房补贴"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $otherHouses = $otherMap[$obj["id"]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $desc = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                foreach ($otherHouses as $house) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $desc[] = $house["enjoyPolicyName"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $obj["description"] = $desc = "扣除已享受" . implode(";\n", $desc) . "部分"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else if ($obj["declareType"] == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $obj["declareTypeName"] = "免租入住"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $obj["description"] = $year . "年度取得免租入住资格"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $userTypeName = CommonConst::getTypeName($this->user["type"]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if ($type == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+             
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $title = ["序号", "申报类型", "姓名", "工作单位", "人才层次", $year . "年度拟发放购房补贴金额(元)", "备注"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $value = ["sn", "declareTypeName", "name", "enterpriseName", "talentArrangeName", "realEnjoyMoney", "description"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $fileName = sprintf("%s%s年度购房补贴拟发放对象名单", $userTypeName, $year); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+             
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $title = ["序号", "申报类型", "姓名", "工作单位", "人才层次", "备注"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $value = ["sn", "declareTypeName", "name", "enterpriseName", "talentArrangeName", "description"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $fileName = sprintf("%s%s年度购房补贴不予兑现对象名单", $userTypeName, $year); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        $rows = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        foreach ($list as $row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $newRow = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for ($i = 0; $i < count($value); $i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                $newRow[] = $row[$value[$i]]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $rows[] = $newRow; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        export($title, $rows, $fileName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      
			 |