Преглед изворни кода

Merge branch 'nacyy' of http://8.155.30.116:3000/CQ_JD/nazw into nacyy

tml пре 4 месеци
родитељ
комит
91b2b22763

+ 5 - 5
nngkxxdp/src/main/java/com/example/nngkxxdp/service/impl/ProxyDemandServiceImpl.java

@@ -13,10 +13,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-import java.util.Random;
+import java.util.*;
 
 /**
 * @author zhao
@@ -71,7 +68,10 @@ public class ProxyDemandServiceImpl implements ProxyDemandService {
         proxyDemand.setReserveKey(result);
         //proxyDemand.setHandleTotal(handleTotal+1);
         proxyDemandDao.insert(proxyDemand);
-        return BaseResult.okData(result);
+        Map<Object, Object> map = new HashMap<>();
+        map.put("ReserveKey", result);
+        map.put("ProxyMatters",proxyVerifyDTO.getProxyMatters());
+        return BaseResult.ok(map);
     }
 
     private static String getTime() {

+ 23 - 6
nngkxxdp/src/main/java/com/example/nngkxxdp/service/impl/ReserveOvertimeServiceImpl.java

@@ -13,10 +13,10 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-import java.util.Random;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
 import java.util.concurrent.TimeUnit;
 
 /**
@@ -54,7 +54,7 @@ public class ReserveOvertimeServiceImpl implements ReserveOvertimeService {
         //接收前端传递来的时间参数
         Date handleTime = overtimeVerifyDTO.getHandleTime();
         int handleTotal = this.findTotalByTime(handleTime);
-        //int handleTotal = reserveOvertimeDao.findTotalByTime(handleTime);
+//        int handleTotal = reserveOvertimeDao.findTotalByTime(handleTime);
         if(handleTotal>9){
             throw new BusinessException("今日预约人数已满,请更换办理日期!");
         }
@@ -69,7 +69,24 @@ public class ReserveOvertimeServiceImpl implements ReserveOvertimeService {
         reserveOvertime.setCreatTime(new Date());
         reserveOvertime.setReserveKey(result);
         reserveOvertimeDao.insert(reserveOvertime);
-        return BaseResult.okData(result);
+        // 将Date转换为LocalDateTime
+        LocalDateTime localDateTime = handleTime.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
+        // 定义输出的格式
+        DateTimeFormatter outputFormatterFull = DateTimeFormatter.ofPattern("yyyy年MM月dd日HH点");
+        DateTimeFormatter outputFormatterHour = DateTimeFormatter.ofPattern("HH点");
+        // 格式化原始时间
+        String startTimeStr = localDateTime.format(outputFormatterFull);
+        // 增加1小时
+        LocalDateTime updatedTime = localDateTime.plusHours(1);
+        // 格式化增加后的时间,只保留小时部分
+        String endTimeStr = updatedTime.format(outputFormatterHour);
+        String time = startTimeStr + "至" + endTimeStr;
+        //返回前端数据
+        Map<Object, Object> map = new HashMap<>();
+        map.put("ReserveKey", result);
+        map.put("time",time);
+        map.put("Business",overtimeVerifyDTO.getBusiness());
+        return BaseResult.ok(map);
     }
 
     private static String getTime() {

+ 4 - 0
nngkxxdp/src/main/resources/static/naxsb/css/qjt.css

@@ -432,6 +432,10 @@ body {
     white-space: nowrap;
 }
 
+.districtLevelList-col2 {
+    cursor: pointer;
+}
+
 /* 区行政服务中心网点分布 end */
 
 /* 公交详情弹窗 start */

+ 2 - 2
nngkxxdp/src/main/resources/static/naxsb/floorone.html

@@ -651,11 +651,11 @@
                 </div>
                 <div class="vrdiv" style="left: 284px;bottom: 120px;"
                     @click="window.open('https://www.cqna.gov.cn/vr/dating3/tour.html?startscene=3')">
-                    <span class="vrDname2"><span class="vrNameLine"></span>大厅2</span>
+                    <span class="vrDname">大厅2<span class="vrNameLine"></span></span>
                 </div>
                 <div class="vrdiv" style="left: 277px;bottom: 69px;"
                     @click="window.open('https://www.cqna.gov.cn/vr/dating3/tour.html?startscene=2')">
-                    <span class="vrDname">自助服务区<span class="vrNameLine"></span></span>
+                    <span class="vrDname2"><span class="vrNameLine"></span>自助服务区</span>
                 </div>
                 <div class="vrdiv" style="left: 384px;bottom: 146px;"
                     @click="window.open('https://www.cqna.gov.cn/vr/dating3/tour.html?startscene=4')">

+ 27 - 3
nngkxxdp/src/main/resources/static/naxsb/qjt.html

@@ -299,7 +299,7 @@
                                     <div class="right">
                                         <span>区级中心</span>
                                         <div class="number">
-                                            <span>3</span>
+                                            <span>2</span>
                                             <span>个</span>
                                         </div>
                                     </div>
@@ -311,7 +311,7 @@
                                     <div class="right">
                                         <span>分中心</span>
                                         <div class="number">
-                                            <span>2</span>
+                                            <span>3</span>
                                             <span>个</span>
                                         </div>
                                     </div>
@@ -360,7 +360,9 @@
                                         :style="`height:${districtLevelListHeight}`">
                                         <el-row>
                                             <el-col :span="12" v-for="(item,index) in districtLevelLists">
-                                                <div class="districtLevelList-col">
+                                                <div class="districtLevelList-col"
+                                                    :class="districtLevelNum=='2'?'districtLevelList-col2':''"
+                                                    @click="goHtmlFun(item.id)">
                                                     <img :src="`./images/districtLevelList${districtLevelNum}.png`"
                                                         alt="" srcset="">
                                                     <div class="left">
@@ -782,6 +784,23 @@
                     //     address: '重庆市南岸区铜元局街道南坪西路36号(上海城嘉发跨贸中心          二楼)南岸区'
                     // }
                 ],
+                addressVrUrlJson: {
+                    414: 'https://www.cqna.gov.cn/vr/jiedao/csq/tour.html',
+                    415: 'https://www.cqna.gov.cn/vr/jiedao/lmh/tour.html',
+                    416: 'https://www.cqna.gov.cn/vr/jiedao/npz/tour.html',
+                    417: 'https://www.cqna.gov.cn/vr/jiedao/twjd/tour.html',
+                    418: 'https://www.cqna.gov.cn/vr/jiedao/ylz/tour.html',
+                    419: 'https://www.cqna.gov.cn/vr/jiedao/jgs/tour.html',
+                    420: 'https://www.cqna.gov.cn/vr/jiedao/gyd/tour.html',
+                    421: 'https://www.cqna.gov.cn/vr/jiedao/hyl/tour.html',
+                    422: 'https://www.cqna.gov.cn/vr/jiedao/ns/tour.html',
+                    423: 'https://www.cqna.gov.cn/vr/jiedao/tsz/tour.html',
+                    424: 'https://www.cqna.gov.cn/vr/jiedao/xkz/tour.html',
+                    425: 'https://www.cqna.gov.cn/vr/jiedao/htx/tour.html',
+                    426: 'https://cqna.gov.cn/vr/jiedao/np/tour.html',
+                    427: 'https://www.cqna.gov.cn/vr/jiedao/tyj/tour.html',
+                    428: 'https://www.cqna.gov.cn/vr/jiedao/dzs/tour.html',
+                },
                 districtLevelLists: [],
                 districtLevelTotal: 0,
                 districtLevelListHeight: "60%",
@@ -924,6 +943,11 @@
                     });
                 }
             },
+            //服务中心分布点击事件
+            goHtmlFun(id) {
+                if (this.districtLevelNum == '2')
+                    window.open(this.addressVrUrlJson[id])
+            },
             // 分页事件
             currentChangeFun(num) {
                 this.current = num