ZHIHAO HU 4 tahun lalu
induk
melakukan
35644692ef

+ 47 - 41
src/main/java/platform/modules/area/MapAreaService.java

@@ -15,6 +15,8 @@ import org.apache.http.util.EntityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Service;
+import platform.common.Constant;
+import platform.modules.api.dto.SyncUserDto;
 import platform.modules.build.entity.BuildInfo;
 import platform.modules.build.entity.FloorContractRelate;
 import platform.modules.build.service.BuildInfoService;
@@ -46,56 +48,59 @@ public class MapAreaService {
      * 企业入驻
      */
     public void addIndustryPointByAttr(List<FloorContractRelate> floorContractRelates) {
-        String requestUrl = "http://" + getUrl() + "/LandIndustrySys/rest/map/addIndustryPointByAttr";
-        for (FloorContractRelate floorContractRelate : floorContractRelates) {
-            BuildInfo buildInfo = buildInfoService.findById(floorContractRelate.getBuild_id());
-            //创建一个http客户端
-            HttpClient client = new DefaultHttpClient(); //创建一个POST请求
-            HttpPost serverPost = new HttpPost(requestUrl);
-            //设置HTTP POST请求参数必须用NameValuePair
-            List<NameValuePair> params = new ArrayList<NameValuePair>();
-            params.add(new BasicNameValuePair("qymc", floorContractRelate.getCompany_name()));
-            if (null != buildInfo) {
-                params.add(new BasicNameValuePair("ssgyy", buildInfo.getName()));
-            }
-            params.add(new BasicNameValuePair("cfbh", floorContractRelate.getBuild_number()));
-            params.add(new BasicNameValuePair("jydz", buildInfo.getLocation()));
-            try {
-                //设置http Post请求参数
-                StringEntity entity = new UrlEncodedFormEntity(params, "utf-8");
-                serverPost.setEntity(entity);
-                HttpResponse sererResponse =
-                        client.execute(serverPost);
-                if (sererResponse.getStatusLine().getStatusCode() == 200) {//如果状 态码为200,表示请求成功
-                    String result = EntityUtils.toString(sererResponse.getEntity());
-                    System.out.println(result);
-                    JSONObject jsonObject = JSON.parseObject(result);
-                    if (jsonObject.get("status").equals("0")) {
-                        System.out.println("数据库中已有同名记录,将不再重复生成");
-                    } else if (jsonObject.get("status").equals("2")) {
-                        System.out.println("数据信息不对");
-                    } else {
-                        floorContractRelate.setArea_company_id(jsonObject.get("status").toString());
-                        floorContractRelate.setIs_area(true);
-                        floorContractRelateService.updateSelective(floorContractRelate);
+        new Thread(() -> {
+            String requestUrl = "http://" + getUrl() + "/LandIndustrySys/rest/map/addIndustryPointByAttr";
+            for (FloorContractRelate floorContractRelate : floorContractRelates) {
+                BuildInfo buildInfo = buildInfoService.findById(floorContractRelate.getBuild_id());
+                //创建一个http客户端
+                HttpClient client = new DefaultHttpClient(); //创建一个POST请求
+                HttpPost serverPost = new HttpPost(requestUrl);
+                //设置HTTP POST请求参数必须用NameValuePair
+                List<NameValuePair> params = new ArrayList<NameValuePair>();
+                params.add(new BasicNameValuePair("qymc", floorContractRelate.getCompany_name()));
+                if (null != buildInfo) {
+                    params.add(new BasicNameValuePair("ssgyy", buildInfo.getName()));
+                }
+                params.add(new BasicNameValuePair("cfbh", floorContractRelate.getBuild_number()));
+                params.add(new BasicNameValuePair("jydz", buildInfo.getLocation()));
+                try {
+                    //设置http Post请求参数
+                    StringEntity entity = new UrlEncodedFormEntity(params, "utf-8");
+                    serverPost.setEntity(entity);
+                    HttpResponse sererResponse =
+                            client.execute(serverPost);
+                    if (sererResponse.getStatusLine().getStatusCode() == 200) {//如果状 态码为200,表示请求成功
+                        String result = EntityUtils.toString(sererResponse.getEntity());
+                        System.out.println(result);
+                        JSONObject jsonObject = JSON.parseObject(result);
+                        if (jsonObject.get("status").equals("0")) {
+                            System.out.println("数据库中已有同名记录,将不再重复生成");
+                        } else if (jsonObject.get("status").equals("2")) {
+                            System.out.println("数据信息不对");
+                        } else {
+                            floorContractRelate.setArea_company_id(jsonObject.get("status").toString());
+                            floorContractRelate.setIs_area(true);
+                            floorContractRelateService.updateSelective(floorContractRelate);
+                        }
                     }
+                } catch (ClientProtocolException e) {
+                    e.printStackTrace();
+                    //进行处理操作
+                } catch (IOException e) {
+                    e.printStackTrace();
                 }
-            } catch (ClientProtocolException e) {
-                e.printStackTrace();
-                //进行处理操作
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-            finally {
+                finally {
 
+                }
             }
-        }
+        }, "addIndustryPointByAttr").start();
     }
 
     /**
      * 企业搬离
      */
     public void deleteIndustryPointByUUID(List<FloorContractRelate> floorContractRelates) {
+        new Thread(() -> {
         String requestUrl = "http://" + getUrl() + "/LandIndustrySys/rest/map/deleteIndustryPointByUUID";
         //创建一个http客户端
         HttpClient client = new DefaultHttpClient(); //创建一个POST请求
@@ -127,6 +132,7 @@ public class MapAreaService {
 
             }
         }
-
+        }, "deleteIndustryPointByUUID").start();
     }
+
 }

+ 15 - 12
src/main/java/platform/modules/government/service/LandStatisticsService.java

@@ -89,10 +89,13 @@ public class LandStatisticsService {
             //已审核
             if (Objects.equals(stockLand.getApprove_status(), Constant.LandApproveStatus.APPROVED)
                     || Objects.equals(stockLand.getApprove_status(), Constant.LandApproveStatus.PASSED)
-                    || Objects.equals(stockLand.getApprove_status(), Constant.LandApproveStatus.NOTAPPROVED)) {
+                    || Objects.equals(stockLand.getApprove_status(), Constant.LandApproveStatus.NOTPASSED)
+                    || Objects.equals(stockLand.getApprove_status(), Constant.LandApproveStatus.EASY_PROCESS_APPROVED)
+            ) {
                 //通过
                 processedPassed++;
-            } else if (Objects.equals(stockLand.getApprove_status(), Constant.LandApproveStatus.NOTAPPROVED)) {
+            } else if (Objects.equals(stockLand.getApprove_status(), Constant.LandApproveStatus.NOTAPPROVED)
+                    || Objects.equals(stockLand.getApprove_status(), Constant.LandApproveStatus.EASY_PROCESS_DENY)) {
                 //不通过
                 processedNotPass++;
             } else if (Objects.equals(stockLand.getApprove_status(), Constant.LandApproveStatus.REJECT)) {
@@ -643,8 +646,8 @@ public class LandStatisticsService {
             map.put("useChangePassNum", useChangePassAmountNum);
             map.put("useChangePassRate", useChangeApplyAmountNum == 0 ? 0 : useChangePassAmountNum * 100 / useChangeApplyAmountNum);
 
-            map.put("immovablesChangeApplyNum", immovablesChangeApplyAmountNum+ "(" + immovablesChangeSummaryProcedureApplyAmountNum + ")");
-            map.put("immovablesChangePassNum", immovablesChangePassAmountNum+ "(" + immovablesChangeSummaryProcedurePassAmountNum + ")");
+            map.put("immovablesChangeApplyNum", immovablesChangeApplyAmountNum + "(" + immovablesChangeSummaryProcedureApplyAmountNum + ")");
+            map.put("immovablesChangePassNum", immovablesChangePassAmountNum + "(" + immovablesChangeSummaryProcedurePassAmountNum + ")");
             map.put("immovablesChangePassRate",
                     (immovablesChangeApplyAmountNum == 0 ? 0 : immovablesChangePassAmountNum * 100 / immovablesChangeApplyAmountNum)
                             + "%(" + (immovablesChangeSummaryProcedureApplyAmountNum == 0 ? 0 : immovablesChangeSummaryProcedurePassAmountNum * 100 / immovablesChangeSummaryProcedureApplyAmountNum) + "%)"
@@ -687,12 +690,12 @@ public class LandStatisticsService {
         int[] immovablesChangeApplyNum = new int[streetList.size() + 1], immovablesChangeRejectNum = new int[streetList.size() + 1], immovablesChangePassNum = new int[streetList.size() + 1], immovablesChangeNotPassNum = new int[streetList.size() + 1], immovablesChangePassRate = new int[streetList.size() + 1];
         int[] equityStructureChangeApplyNum = new int[streetList.size() + 1], equityStructureChangeRejectNum = new int[streetList.size() + 1], equityStructureChangePassNum = new int[streetList.size() + 1], equityStructureChangeNotPassNum = new int[streetList.size() + 1], equityStructureChangePassRate = new int[streetList.size() + 1];
 
-        int[]  immovablesChangeSummaryProcedureApplyNum = new int[streetList.size() + 1],  immovablesChangeSummaryProcedurePassNum = new int[streetList.size() + 1],  immovablesChangeSummaryProcedureNotPassNum = new int[streetList.size() + 1],  immovablesChangeSummaryProcedureRejectNum = new int[streetList.size() + 1],  immovablesChangeSummaryProcedurePassRate = new int[streetList.size() + 1];
+        int[] immovablesChangeSummaryProcedureApplyNum = new int[streetList.size() + 1], immovablesChangeSummaryProcedurePassNum = new int[streetList.size() + 1], immovablesChangeSummaryProcedureNotPassNum = new int[streetList.size() + 1], immovablesChangeSummaryProcedureRejectNum = new int[streetList.size() + 1], immovablesChangeSummaryProcedurePassRate = new int[streetList.size() + 1];
         int[] equityStructureChangeSummaryProcedureApplyNum = new int[streetList.size() + 1], equityStructureChangeSummaryProcedurePassNum = new int[streetList.size() + 1], equityStructureChangeSummaryProcedureNotPassNum = new int[streetList.size() + 1], equityStructureChangeSummaryProcedureRejectNum = new int[streetList.size() + 1], equityStructureChangeSummaryProcedurePassRate = new int[streetList.size() + 1];
 
         int[] applyNum = new int[streetList.size() + 1], rejectNum = new int[streetList.size() + 1], passNum = new int[streetList.size() + 1], notPassNum = new int[streetList.size() + 1], passRate = new int[streetList.size() + 1];
 
-        String[]  immovablesChangeApplyNumStr = new String[streetList.size() + 1],  immovablesChangeRejectNumStr = new String[streetList.size() + 1],  immovablesChangePassNumStr = new String[streetList.size() + 1],  immovablesChangeNotPassNumStr = new String[streetList.size() + 1],  immovablesChangePassRateStr = new String[streetList.size() + 1];
+        String[] immovablesChangeApplyNumStr = new String[streetList.size() + 1], immovablesChangeRejectNumStr = new String[streetList.size() + 1], immovablesChangePassNumStr = new String[streetList.size() + 1], immovablesChangeNotPassNumStr = new String[streetList.size() + 1], immovablesChangePassRateStr = new String[streetList.size() + 1];
         String[] equityStructureChangeApplyNumStr = new String[streetList.size() + 1], equityStructureChangeRejectNumStr = new String[streetList.size() + 1], equityStructureChangePassNumStr = new String[streetList.size() + 1], equityStructureChangeNotPassNumStr = new String[streetList.size() + 1], equityStructureChangePassRateStr = new String[streetList.size() + 1];
 
         //存量用地信息
@@ -996,7 +999,7 @@ public class LandStatisticsService {
             immovablesChangePassRate[i] = immovablesChangeApplyNum[i] == 0 ? 0 : immovablesChangePassNum[i] * 100 / immovablesChangeApplyNum[i];
             equityStructureChangePassRate[i] = equityStructureChangeApplyNum[i] == 0 ? 0 : equityStructureChangePassNum[i] * 100 / equityStructureChangeApplyNum[i];
 
-            immovablesChangeSummaryProcedurePassRate[i] = immovablesChangeSummaryProcedureApplyNum[i] == 0 ? 0 :  immovablesChangeSummaryProcedurePassNum[i] * 100 /  immovablesChangeSummaryProcedureApplyNum[i];
+            immovablesChangeSummaryProcedurePassRate[i] = immovablesChangeSummaryProcedureApplyNum[i] == 0 ? 0 : immovablesChangeSummaryProcedurePassNum[i] * 100 / immovablesChangeSummaryProcedureApplyNum[i];
             equityStructureChangeSummaryProcedurePassRate[i] = equityStructureChangeSummaryProcedureApplyNum[i] == 0 ? 0 : equityStructureChangeSummaryProcedurePassNum[i] * 100 / equityStructureChangeSummaryProcedureApplyNum[i];
 
             passRate[i] = applyNum[i] == 0 ? 0 : passNum[i] * 100 / applyNum[i];
@@ -1007,11 +1010,11 @@ public class LandStatisticsService {
             equityStructureChangeRejectNumStr[i] = equityStructureChangeRejectNum[i] + "(" + equityStructureChangeSummaryProcedureRejectNum[i] + ")";
             equityStructureChangePassRateStr[i] = equityStructureChangePassRate[i] + "%(" + equityStructureChangeSummaryProcedurePassRate[i] + "%)";
 
-             immovablesChangeApplyNumStr[i] =  immovablesChangeApplyNum[i] + "(" +  immovablesChangeSummaryProcedureApplyNum[i] + ")";
-             immovablesChangePassNumStr[i] =  immovablesChangePassNum[i] + "(" +  immovablesChangeSummaryProcedurePassNum[i] + ")";
-             immovablesChangeNotPassNumStr[i] =  immovablesChangeNotPassNum[i] + "(" +  immovablesChangeSummaryProcedureNotPassNum[i] + ")";
-             immovablesChangeRejectNumStr[i] =  immovablesChangeRejectNum[i] + "(" +  immovablesChangeSummaryProcedureRejectNum[i] + ")";
-             immovablesChangePassRateStr[i] =  immovablesChangePassRate[i] + "%(" +  immovablesChangeSummaryProcedurePassRate[i] + "%)";
+            immovablesChangeApplyNumStr[i] = immovablesChangeApplyNum[i] + "(" + immovablesChangeSummaryProcedureApplyNum[i] + ")";
+            immovablesChangePassNumStr[i] = immovablesChangePassNum[i] + "(" + immovablesChangeSummaryProcedurePassNum[i] + ")";
+            immovablesChangeNotPassNumStr[i] = immovablesChangeNotPassNum[i] + "(" + immovablesChangeSummaryProcedureNotPassNum[i] + ")";
+            immovablesChangeRejectNumStr[i] = immovablesChangeRejectNum[i] + "(" + immovablesChangeSummaryProcedureRejectNum[i] + ")";
+            immovablesChangePassRateStr[i] = immovablesChangePassRate[i] + "%(" + immovablesChangeSummaryProcedurePassRate[i] + "%)";
         }
 
         Map rentPassRateNumMap = new HashMap();

+ 2 - 1
src/main/java/platform/modules/home/service/HomeRefactorService.java

@@ -245,7 +245,8 @@ public class HomeRefactorService {
             activity.setReading_number(activity.getReading_number() + 1);
             activityService.updateSelective(activity);
         }
-        InputStream is_detail = activityService.getQRcode("1", "350", "activity_id=" + id);
+        //InputStream is_detail = activityService.getQRcode("1", "350", "activity_id=" + id);
+        InputStream is_detail = activityService.getQRcode("1", "350", id+"");
         try {
             byte[] bytes_detail = IOUtils.toByteArray(is_detail);
             String encoded_detail = Base64.getEncoder().encodeToString(bytes_detail);