浏览代码

存量用地 政府后续看不到合同信息

huZhiHao 5 年之前
父节点
当前提交
9c863d5a18

+ 34 - 13
src/main/java/platform/modules/company/web/StockLandApproveController.java

@@ -161,21 +161,24 @@ public class StockLandApproveController extends BaseController {
 
             modelMap.put("companyInfo", companyInfo);
 
-            if (Objects.equals(landApply.getIs_in_park(), "1")) {
-                Contract contract = icContractService.getDeatailById(landApply.getContract_id());
-                if (contract == null) {
-                    modelMap.put("contract", new Contract());
-                } else {
-                    modelMap.put("contract", contract);
-                }
-            } else if (Objects.equals(landApply.getIs_in_park(), "0")) {
-                StockLandOutPark stockLandOutPark = stockLandOutParkService.findById(landApply.getContract_id());
-                if (stockLandOutPark == null) {
-                    modelMap.put("stockLandOutPark", new StockLandOutPark());
-                } else {
-                    modelMap.put("stockLandOutPark", stockLandOutPark);
+            if(Objects.equals(landApply.getApply_type(),Constant.LandApplyType.RENT)){
+                if (Objects.equals(landApply.getIs_in_park(), "1")) {
+                    Contract contract = icContractService.getDeatailById(landApply.getContract_id());
+                    if (contract == null) {
+                        modelMap.put("contract", new Contract());
+                    } else {
+                        modelMap.put("contract", contract);
+                    }
+                } else if (Objects.equals(landApply.getIs_in_park(), "0")) {
+                    StockLandOutPark stockLandOutPark = stockLandOutParkService.findById(landApply.getContract_id());
+                    if (stockLandOutPark == null) {
+                        modelMap.put("stockLandOutPark", new StockLandOutPark());
+                    } else {
+                        modelMap.put("stockLandOutPark", stockLandOutPark);
+                    }
                 }
             }
+
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -595,6 +598,24 @@ public class StockLandApproveController extends BaseController {
             modelMap.put("feedbackList", feedbackList);    //进程反馈信息
             Integer companyId = landApply.getCompany_id();
             modelMap.put("companyInfo", companyService.getCompanyInfo(companyId));//企业信息
+
+            if(Objects.equals(landApply.getApply_type(),Constant.LandApplyType.RENT)){
+                if (Objects.equals(landApply.getIs_in_park(), "1")) {
+                    Contract contract = icContractService.getDeatailById(landApply.getContract_id());
+                    if (contract == null) {
+                        modelMap.put("contract", new Contract());
+                    } else {
+                        modelMap.put("contract", contract);
+                    }
+                } else if (Objects.equals(landApply.getIs_in_park(), "0")) {
+                    StockLandOutPark stockLandOutPark = stockLandOutParkService.findById(landApply.getContract_id());
+                    if (stockLandOutPark == null) {
+                        modelMap.put("stockLandOutPark", new StockLandOutPark());
+                    } else {
+                        modelMap.put("stockLandOutPark", stockLandOutPark);
+                    }
+                }
+            }
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 56 - 8
src/main/java/platform/modules/government/service/ContentService.java

@@ -202,19 +202,29 @@ public class ContentService extends BaseService<Content> {
 
         List<Map> result = new ArrayList<>();
 
-        Content query = new Content();
-        query.setDel_flag(false);
-        List<Content> contentList = this.findListByWhere(query);
+//        Content query = new Content();
+//        query.setDel_flag(false);
+//        List<Content> contentList = this.findListByWhere(query);
+
+        Example example = new Example(Content.class);
+        Example.Criteria criteria = example.createCriteria();
+        //倒序
+        example.orderBy("sort").asc();
+        example.orderBy("create_time").desc();
+        PageHelper.startPage(1, num);
+        List<Content> contentList = this.selectByExample(example);
+
         int count = 0;
         List<String> businessIdList = new ArrayList<>();
 
         long interval = 0;
         Date startTime = new Date();
 
-        while (count < num && interval < 2) {
+        //500ms内必须结束
+        /*while (count < num && interval < 500) {
 
             Date now = new Date();
-            interval = (now.getTime() - startTime.getTime()) / 1000;
+            interval = (now.getTime() - startTime.getTime());
 
             //随机在list里选一个
             int index = (int) (Math.random() * (contentList.size() - 1));
@@ -222,7 +232,7 @@ public class ContentService extends BaseService<Content> {
             //排除同一businessid
             boolean idDuplicatedFlag = true;
             for (String businessId : businessIdList) {
-                if (Objects.equals(businessId, contentEntity.getId())) {
+                if (Objects.equals(businessId, contentEntity.getId() + "")) {
                     idDuplicatedFlag = false;
                 }
             }
@@ -261,7 +271,7 @@ public class ContentService extends BaseService<Content> {
                 map.put("create_time", contentEntity.getCreate_time());
                 map.put("url", pics.get(0));
 
-                /*String textStr = "";
+                *//*String textStr = "";
                 Pattern p_script;
                 Matcher m_script;
                 Pattern p_style;
@@ -283,13 +293,51 @@ public class ContentService extends BaseService<Content> {
                 htmlStr = m_html.replaceAll(""); //过滤html标签
                 textStr = htmlStr;
 
-                map.put("content", textStr);*/
+                map.put("content", textStr);*//*
 
                 result.add(map);
 
                 businessIdList.add(contentEntity.getId() + "");
                 count++;
             }
+        }*/
+
+        for (Content contentEntity : contentList) {
+            String htmlStr = contentEntity.getContent();
+            //排除没有图片标签的
+            if (!htmlStr.contains("<img")) {
+                continue;
+            }
+            //排除没有src内容的
+            if (!htmlStr.contains("src=")) {
+                continue;
+            }
+
+            String img = "";
+            Pattern p_image;
+            Matcher m_image;
+            List<String> pics = new ArrayList<String>();
+            //String regEx_img = "<img.*src=(.*?)[^>]*?>"; //图片链接地址
+            String regEx_img = "<img.*src\\s*=\\s*(.*?)[^>]*?>";
+            p_image = Pattern.compile(regEx_img, Pattern.CASE_INSENSITIVE);
+            m_image = p_image.matcher(htmlStr);
+            while (m_image.find()) {
+                img = img + "," + m_image.group();
+                // Matcher m =
+                // Pattern.compile("src=\"?(.*?)(\"|>|\\s+)").matcher(img); //匹配src
+                Matcher m = Pattern.compile("src\\s*=\\s*\"?(.*?)(\"|>|\\s+)").matcher(img);
+                while (m.find()) {
+                    pics.add(m.group(1));
+                }
+            }
+
+            Map<String, String> map = new HashMap<>();
+            map.put("id", contentEntity.getId() + "");
+            map.put("title", contentEntity.getTitle());
+            map.put("create_time", contentEntity.getCreate_time());
+            map.put("url", pics.get(0));
+
+            result.add(map);
         }
 //        System.out.println("两个时间相差" + interval + "秒");
         return result;

+ 66 - 0
src/main/resources/templates/admin/company/stock_land/approve_pass_check.html

@@ -215,6 +215,72 @@
 			        </table>
 	        </div>
         </div>
+
+        <th:block th:if="${landApply.apply_type == '4'}">
+
+            <div class="line">合同基本信息</div>
+            <th:block th:if="${landApply.is_in_park == '1'}">
+                <div class="row cl">
+                    <label class="form-label col-xs-4 col-sm-2">关联载体:</label>
+                    <div class="col-xs-8 col-sm-8">
+                        <table class="table table-border table-bordered table-bg table-hover ">
+                            <thead>
+                            <tr class="text-c">
+                                <th>所属园区</th>
+                                <th>楼栋</th>
+                                <th>楼层</th>
+                                <td>面积</td>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr class="text-c" th:each="item : ${contract.floors}">
+                                <td th:text="${contract.park_name}"></td>
+                                <td th:text="${item.building_name}"></td>
+                                <td th:text="${item.floor}"></td>
+                                <td th:text="${item.area}"></td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+                <div class="row cl">
+                    <label class="form-label col-xs-4 col-sm-2">租住生效日期:</label>
+                    <div class="formControls col-xs-4 col-sm-2">
+                        [[${contract.contract_start}]]
+                    </div>
+                    <label class="form-label col-xs-4 col-sm-2">租住到期日期:</label>
+                    <div class="formControls col-xs-4 col-sm-2">
+                        [[${contract.contract_end}]]
+                    </div>
+                </div>
+            </th:block>
+            <th:block th:if="${landApply.is_in_park == '0'}">
+                <div class="row cl">
+                    <label class="form-label col-xs-4 col-sm-2">租赁地址:</label>
+                    <div class="formControls col-xs-8 col-sm-9">
+                        [[${stockLandOutPark.out_park_location}]]
+                    </div>
+                </div>
+                <div class="row cl">
+                    <label class="form-label col-xs-4 col-sm-2">租赁面积(㎡):</label>
+                    <div class="formControls col-xs-4 col-sm-2">
+                        [[${stockLandOutPark.out_park_contract_area}]]
+                    </div>
+                </div>
+                <div class="row cl">
+                    <label class="form-label col-xs-4 col-sm-2">租住生效日期:</label>
+                    <div class="formControls col-xs-4 col-sm-2">
+                        [[${stockLandOutPark.out_park_contract_start}]]
+                    </div>
+                    <label class="form-label col-xs-4 col-sm-2">租住到期日期:</label>
+                    <div class="formControls col-xs-4 col-sm-2">
+                        [[${stockLandOutPark.out_park_contract_end}]]
+                    </div>
+                </div>
+            </th:block>
+
+        </th:block>
+
         <div class="line">流程信息</div>
         <div class="row cl">
         	<div class="col-xs-8 col-sm-9 col-xs-offset-2 col-sm-offset-1">