Selaa lähdekoodia

凌云集团更改公司

peiguo 5 vuotta sitten
vanhempi
commit
945d1a41f6

+ 2 - 0
admin-ui/app/whepi/scan/qrImg.js

@@ -134,6 +134,8 @@ define(function (require) {
                                             formatter: function (value) {
                                                 return "<img  src='/whepi" + value + "'/>";
                                             },},
+                                        {field: 'longitude', title: '经度', maxWidth: 200, align: 'left',},
+                                        {field: 'latitude', title: '纬度', maxWidth: 200, align: 'left',},
                                         {field: 'timeUpdate', title: '修改时间', maxWidth: 200, formatter: $.fn.fmatter.ts},
                                     ]
                                 ]

+ 2 - 0
admin-ui/app/whepi/scan/xqmanage.js

@@ -232,6 +232,8 @@ define(function (require) {
 
                                             }
                                         },
+                                        {field: 'longitude', title: '经度', maxWidth: 200, align: 'left',},
+                                        {field: 'latitude', title: '纬度', maxWidth: 200, align: 'left',},
                                         {
                                             field: 'goStatus',
                                             title: '通行状态',

+ 2 - 0
admin-ui/app/whepi/scan/xqmanageHC.js

@@ -232,6 +232,8 @@ define(function (require) {
 
                                             }
                                         },
+                                        {field: 'longitude', title: '经度', maxWidth: 200, align: 'left',},
+                                        {field: 'latitude', title: '纬度', maxWidth: 200, align: 'left',},
                                         {
                                             field: 'goStatus',
                                             title: '通行状态',

+ 2 - 0
admin-ui/app/whepi/scan/xqmanageLY.js

@@ -232,6 +232,8 @@ define(function (require) {
 
                                             }
                                         },
+                                        {field: 'longitude', title: '经度', maxWidth: 200, align: 'left',},
+                                        {field: 'latitude', title: '纬度', maxWidth: 200, align: 'left',},
                                         {
                                             field: 'goStatus',
                                             title: '通行状态',

+ 4 - 0
whepi-doc/login.sql

@@ -198,6 +198,8 @@ CREATE TABLE out_scan  (
   in_type           int(11) NOT NULL DEFAULT 0 COMMENT '进出状态:1进,2出',
   day_date          date NOT NULL DEFAULT '0000-01-01' COMMENT '当天时间',
   date              datetime(0) NOT NULL DEFAULT '0000-01-01 00:00:00' COMMENT '进出时间',
+  longitude         varchar(20)  NOT NULL DEFAULT '' COMMENT '经度',
+  latitude          varchar(20)  NOT NULL DEFAULT '' COMMENT '纬度',
   go_status         int(11) NOT NULL DEFAULT 0 COMMENT '通行状态:1允许,-1禁止',
   error_info        varchar(100)  NOT NULL DEFAULT '' COMMENT '错误信息',
   user_create       bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
@@ -255,6 +257,8 @@ CREATE TABLE sys_uptown_door  (
   door_name         varchar(20)  NOT NULL DEFAULT '' COMMENT '大门名称',
   in_img            varchar(100)  NOT NULL DEFAULT '' COMMENT '入口二维码',
   out_img           varchar(100)  NOT NULL DEFAULT '' COMMENT '出口二维码',
+  longitude         varchar(20)  NOT NULL DEFAULT '' COMMENT '经度',
+  latitude          varchar(20)  NOT NULL DEFAULT '' COMMENT '纬度',
   status            int(11) NOT NULL DEFAULT 0 COMMENT '状态:1正常,0草稿,-1删除',
   time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
   time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',

+ 10 - 95
whepi-ui/templates/user/location.ftl

@@ -10,15 +10,15 @@
                     <br/>
                     <br/>
                     <br/>
-                    <br/>
+                    <p class="user-title-long-two">正在获取当前定位信息</p>
                     <br/>
                     <br/>
                     <br/>
                 </header>
                 <br/>
-                <div class="weui-form__opr-area">
-                    <a class="weui-btn weui-btn_primary" href="javascript:;" onclick="map();" id="map">定位</a>
-                </div>
+<#--                <div class="weui-form__opr-area">-->
+<#--                    <a class="weui-btn weui-btn_primary" href="javascript:;" onclick="map();" id="map">定位</a>-->
+<#--                </div>-->
             </div>
         </div>
     </div>
@@ -28,76 +28,7 @@
 <#include "/home/frag.foot.ftl" />
 <script>
     $(document).ready(function () {
-        var latitude = "";
-        var longitude = "";
-        $.ajax({
-            url: '/wx/jsApiConfig',
-            type: "get",
-            data: {
-                "url": location.href.split('#')[0]
-            },
-            success: function (data) {
-                // alert(JSON.stringify(data.data))
-                wx.config({
-                    debug: false,
-                    appId: data.data.appId,
-                    timestamp: data.data.timestamp,
-                    nonceStr: data.data.nonceStr,
-                    signature: data.data.signature,
-                    jsApiList: [
-                        // 所有要调用的 API 都要加到这个列表中
-                        'getLocation'
-                    ]
-                });
-                wx.ready(function () {
-                    wx.checkJsApi({
-                        jsApiList: [
-                            'getLocation'
-                        ],
-
-                        success: function (res) {
-                            // alert(JSON.stringify(res))
-                            // alert(JSON.stringify(res));
-                            // alert(JSON.stringify(res.checkResult.getLocation));
-                            if (res.checkResult.getLocation == false) {
-                                alert('你的微信版本太低,不支持微信JS接口,请升级到最新的微信版本!');
-                                return;
-                            }
-                        }
-                    });
-                    wx.error(function(res){
-                        alert("接口调取失败")
-                    });
-                });
-            },
-        });
-        wx.getLocation({
-            type: 'wgs84',
-            success: function (res) {
-                // alert(JSON.stringify(res));
-
-                var geocoder = new qq.maps.Geocoder({
-                    complete: function (result) {
-                        if ('当阳市' === result.detail.addressComponents.district) {
-                            autoLocal='当阳市';
-                        } else {
-                            autoLocal = result.detail.addressComponents.city;
-                        }
-                        autoAddr = result.detail.address;
-                        // alert(result.detail.address)
-                        console.log(result);
-                    }
-                })
-                var coord = new qq.maps.LatLng(res.latitude, res.longitude)
-                latitude = res.latitude;
-                longitude = res.longitude;
-                geocoder.getAddress(coord)
-            },
-            cancel: function (res) {
-                alert('用户拒绝授权获取地理位置');
-            }
-        });
-        window.location.href = ${url} + latitude + "%2C" + longitude + ${moreUrl};
+        map();
     })
     function map() {
         $.ajax({
@@ -126,13 +57,11 @@
                         ],
 
                         success: function (res) {
-                            // alert(JSON.stringify(res))
-                            // alert(JSON.stringify(res));
-                            // alert(JSON.stringify(res.checkResult.getLocation));
                             if (res.checkResult.getLocation == false) {
                                 alert('你的微信版本太低,不支持微信JS接口,请升级到最新的微信版本!');
                                 return;
                             }
+                            getLocation();
                         }
                     });
                     wx.error(function(res){
@@ -141,28 +70,14 @@
                 });
             },
         });
+    }
+    function getLocation() {
         wx.getLocation({
             type: 'wgs84',
             success: function (res) {
-                // alert(JSON.stringify(res));
-
-                var geocoder = new qq.maps.Geocoder({
-                    complete: function (result) {
-                        if ('当阳市' === result.detail.addressComponents.district) {
-                            autoLocal='当阳市';
-                        } else {
-                            autoLocal = result.detail.addressComponents.city;
-                        }
-                        autoAddr = result.detail.address;
-                        // alert(result.detail.address)
-                        console.log(result);
-                    }
-                })
                 var coord = new qq.maps.LatLng(res.latitude, res.longitude)
-                geocoder.getAddress(coord)
-                alert(coord);
-                // window.location.href = "/user/home.html?userId=" + userId + "&userType=1";
-
+                // alert(coord);
+                window.location.href = "${url}" + res.longitude + "%2C" + res.latitude + "${moreUrl}";
             },
             cancel: function (res) {
                 alert('用户拒绝授权获取地理位置');

+ 8 - 0
whepi-web/src/main/java/com/bofeng/entity/OutScan.java

@@ -46,6 +46,14 @@ public class OutScan {
     @TableField("date")
     private DateTime date;
 
+    @ApiModelProperty("经度")
+    @TableField("longitude")
+    private String longitude;
+
+    @ApiModelProperty("纬度")
+    @TableField("latitude")
+    private String latitude;
+
     @ApiModelProperty("通行状态:1允许,-1禁止")
     @TableField("go_status")
     private Integer goStatus;

+ 10 - 2
whepi-web/src/main/java/com/bofeng/entity/SysUptownHouse.java

@@ -84,12 +84,20 @@ public class SysUptownHouse implements Serializable {
     @TableField(exist = false)
     private Integer goStatus;
 
-    @ExcelProperty(value = {"通行状态"}, index = 9)
+    @ExcelProperty(value = {"经度"}, index = 9)
+    @TableField(exist = false)
+    private String longitude;
+
+    @ExcelProperty(value = {"纬度"}, index = 10)
+    @TableField(exist = false)
+    private String latitude;
+
+    @ExcelProperty(value = {"通行状态"}, index = 11)
     @ApiModelProperty("通行状态:1允许,-1禁止")
     @TableField(exist = false)
     private String goStatusStr;
 
-    @ExcelProperty(value = {"禁止提示"}, index = 10)
+    @ExcelProperty(value = {"禁止提示"}, index = 12)
     @ApiModelProperty("禁止提示")
     @TableField(exist = false)
     private String errorInfo;

+ 10 - 5
whepi-web/src/main/java/com/bofeng/entity/SysUptownHouseLY.java

@@ -82,12 +82,20 @@ public class SysUptownHouseLY implements Serializable {
     @TableField(exist = false)
     private Integer goStatus;
 
-    @ExcelProperty(value = {"通行状态"}, index = 7)
+    @ExcelProperty(value = {"经度"}, index = 7)
+    @TableField(exist = false)
+    private String longitude;
+
+    @ExcelProperty(value = {"纬度"}, index = 8)
+    @TableField(exist = false)
+    private String latitude;
+
+    @ExcelProperty(value = {"通行状态"}, index = 9)
     @ApiModelProperty("通行状态:1允许,-1禁止")
     @TableField(exist = false)
     private String goStatusStr;
 
-    @ExcelProperty(value = {"禁止提示"}, index = 8)
+    @ExcelProperty(value = {"禁止提示"}, index = 10)
     @ApiModelProperty("禁止提示")
     @TableField(exist = false)
     private String errorInfo;
@@ -100,7 +108,4 @@ public class SysUptownHouseLY implements Serializable {
 
     @TableField(exist = false)
     private Long userId;
-
-
-
 }

+ 8 - 0
whepi-web/src/main/java/com/bofeng/entity/UptownDoor.java

@@ -36,6 +36,14 @@ public class UptownDoor {
     @TableField("out_img")
     private String outImg;
 
+    @ApiModelProperty("经度")
+    @TableField("longitude")
+    private String longitude;
+
+    @ApiModelProperty("纬度")
+    @TableField("latitude")
+    private String latitude;
+
     @ApiModelProperty("状态:1正常,0草稿,-1删除")
     @TableField("status")
     private Integer status;

+ 2 - 0
whepi-web/src/main/java/com/bofeng/service/ScanAdminService.java

@@ -24,6 +24,8 @@ public class ScanAdminService {
         uptownDoor.setDoorId(IdWorker.getId());
         uptownDoor.setInImg("");
         uptownDoor.setOutImg("");
+        uptownDoor.setLongitude("");
+        uptownDoor.setLatitude("");
         uptownDoor.setStatus(1);
         OutScanConf outScanConf = outScanConfMapper.getOutScanConfByUptown(uptownDoor.getUptownId());
         if (outScanConf == null) {

+ 10 - 1
whepi-web/src/main/java/com/bofeng/service/ScanService.java

@@ -23,7 +23,14 @@ public class ScanService {
     private OutScanEstateMapper outScanEstateMapper;
 
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
-    public void saveOutScan(Long userId, Integer inType, Long uptownId, Long doorId, Integer status, String errorInfo) {
+    public void saveOutScan(Long userId, Integer inType, String coord, Long uptownId, Long doorId, Integer status, String errorInfo) {
+        String longitude = "";
+        String latitude = "";
+        if (!"".equals(coord)) {
+            String[] coor = coord.split(",");
+            longitude = coor[0];
+            latitude = coor[1];
+        }
         OutScan outScan = new OutScan();
         outScan.setScanId(IdWorker.getId());
         outScan.setUserId(userId);
@@ -32,6 +39,8 @@ public class ScanService {
         outScan.setInType(inType);
         outScan.setDayDate(new Date());
         outScan.setDate(new DateTime());
+        outScan.setLongitude(longitude);
+        outScan.setLatitude(latitude);
         outScan.setGoStatus(status);
         outScan.setErrorInfo(errorInfo);
         outScan.setUserCreate(userId);

+ 34 - 28
whepi-web/src/main/java/com/bofeng/wx/controller/ScanController.java

@@ -124,7 +124,7 @@ public class ScanController {
                     model.put("into", "禁止" + getMsg(inType));
                     model.put("collor", "red");
                     model.put("errorMsg", "非本小区居民,禁止" + getMsg(inType) + "。");
-                    scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                    scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                     return new ModelAndView("/user/scan.ftl", model);
                 }
             }
@@ -142,24 +142,24 @@ public class ScanController {
                         model.put("collor", "orange");
                         model.put("into", "允许进入");
                         model.put("errorMsg", "您在外驻留时间超过1日,请尽快上报您的健康状况,防止在外长时间逗留。");
-                        scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
+                        scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
                         return new ModelAndView("/user/scan.ftl", model);
                     }
                 }
                 if (ly) {
-//                    if ("".equals(coord)) {//%2C
-//                        String url = oauth2+appId +"&redirect_uri="+URLEncoder.encode(domain()+"user/scan.html?doorId="+doorId+"&inType="+inType + "&coord=","utf-8");
-//                        model.put("url", url);
-//                        model.put("moreUrl", moreUrl);
-//                        return new ModelAndView("/user/location.ftl", model);
-//                    }
+                    if ("".equals(coord)) {
+                        String url = oauth2+appId +"&redirect_uri="+URLEncoder.encode(domain()+"user/scan.html?doorId="+doorId+"&inType="+inType + "&coord=","utf-8");
+                        model.put("url", url);
+                        model.put("moreUrl", moreUrl);
+                        return new ModelAndView("/user/location.ftl", model);
+                    }
                     OutUser outUser1 = outUserMapper.getOutUserByPhone(4, uptownHomes.get(0).getLinkman(), Long.parseLong(uptownHomes.get(0).getPhone()));
                     if (outUser1 != null) {
                         model.put("collor", "red");
                         model.put("collor2", "red");
                         model.put("into", "不许进入");
                         model.put("errorMsg", "声明:根据凌云集团防疫指挥部复工条件,您属于不可复工六类人员之一,如有疑问请与上级管理部门联系。");
-                        scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                        scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                         return new ModelAndView("/user/scan.ftl", model);
                     }
                     OutUser outUser = outUserMapper.getOutUserByPhone(1, uptownHomes.get(0).getLinkman(), Long.parseLong(uptownHomes.get(0).getPhone()));
@@ -168,7 +168,7 @@ public class ScanController {
                         model.put("collor2", "green");
                         model.put("into", "允许通行");
                         model.put("errorMsg", "声明:复工许可证是根据员工自主填写健康日报,结合凌云集团复工条件自动产生。原则上代表员工可复工,在厂门口扫描二维码生成绿色复工通行证,并接受检查后,可入厂。");
-                        scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
+                        scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
                         return new ModelAndView("/user/scan.ftl", model);
                     }
                     MsReport msReport = msReportMapper.queryMsReportIsXG(userOpen.getUserId());
@@ -180,7 +180,7 @@ public class ScanController {
                             model.put("collor2", "red");
                             model.put("into", "不许进入");
                             model.put("errorMsg", "由于您上报过新冠确诊、新冠疑似或密切接触者,且未解除医学隔离,不许进入,如有疑问请联系直管领导。");
-                            scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                            scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                             return new ModelAndView("/user/scan.ftl", model);
                         }
                     }
@@ -190,7 +190,7 @@ public class ScanController {
                         model.put("collor2", "red");
                         model.put("into", "不许进入");
                         model.put("errorMsg", "由于您今日或前3日未连续报告日报,不许进入,如有疑问请联系直管领导。");
-                        scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                        scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                         return new ModelAndView("/user/scan.ftl", model);
                     }
                     List<MsReport> msReports2 = msReportMapper.selectMsReportThereError(userOpen.getUserId());
@@ -199,7 +199,7 @@ public class ScanController {
                         model.put("collor2", "red");
                         model.put("into", "不许进入");
                         model.put("errorMsg", "由于近期您健康评估存在问题,不许进入,如有疑问请联系直管领导。");
-                        scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                        scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                         return new ModelAndView("/user/scan.ftl", model);
                     }
                     String returnWork = msReportMapper.returnWork(userOpen.getUserId());
@@ -209,7 +209,7 @@ public class ScanController {
                             model.put("collor2", "red");
                             model.put("into", "不许进入");
                             model.put("errorMsg", "您返回工作驻地后未满14日,不许进入。" + day15(s.parse(returnWork)) + "起方可进入!");
-                            scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                            scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                             return new ModelAndView("/user/scan.ftl", model);
                         }
                     }
@@ -219,7 +219,7 @@ public class ScanController {
                         model.put("collor2", "red");
                         model.put("into", "不许进入");
                         model.put("errorMsg", "您本人不在工作驻地,不能入场复工。");
-                        scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                        scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                         return new ModelAndView("/user/scan.ftl", model);
                     }
                     //您近期内离开过工作单位驻地,请遵守返回工作驻地15日隔离规定,您目前未满15日,禁止进入。
@@ -227,17 +227,23 @@ public class ScanController {
                     model.put("collor2", "green");
                     model.put("into", "允许进入");
                     model.put("errorMsg", "声明:复工通行证是根据员工自主填写健康日报,结合凌云集团复工条件自动产生。原则上代表员工可以通行,在接受规定检查后,方可入厂。");
-                    scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
+                    scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
                     return new ModelAndView("/user/scan.ftl", model);
                 }
                 if (hc) {
+                    if ("".equals(coord)) {
+                        String url = oauth2+appId +"&redirect_uri="+URLEncoder.encode(domain()+"user/scan.html?doorId="+doorId+"&inType="+inType + "&coord=","utf-8");
+                        model.put("url", url);
+                        model.put("moreUrl", moreUrl);
+                        return new ModelAndView("/user/location.ftl", model);
+                    }
                     OutUser outUser = outUserMapper.getOutUserByPhone(3, uptownHomes.get(0).getLinkman(), Long.parseLong(uptownHomes.get(0).getPhone()));
                     if (outUser != null) {
                         model.put("collor", "green");
                         model.put("collor2", "green");
                         model.put("into", "允许通行");
                         model.put("errorMsg", "声明:复工许可证是根据员工自主填写健康日报,结合凌云集团复工条件自动产生。原则上代表员工可复工,在厂门口扫描二维码生成绿色复工通行证,并接受检查后,可入厂。");
-                        scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
+                        scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
                         return new ModelAndView("/user/scanHC.ftl", model);
                     }
                     MsReport msReport = msReportMapper.queryMsReportIsXG(userOpen.getUserId());
@@ -249,7 +255,7 @@ public class ScanController {
                             model.put("collor2", "red");
                             model.put("into", "不许进入");
                             model.put("errorMsg", "由于您上报过新冠确诊、新冠疑似或密切接触者,且未解除医学隔离,不许进入,如有疑问请联系直管领导。");
-                            scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                            scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                             return new ModelAndView("/user/scanHC.ftl", model);
                         }
                     }
@@ -259,7 +265,7 @@ public class ScanController {
                         model.put("collor2", "red");
                         model.put("into", "不许进入");
                         model.put("errorMsg", "由于您今日或前3日未连续报告日报,不许进入,如有疑问请联系直管领导。");
-                        scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                        scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                         return new ModelAndView("/user/scanHC.ftl", model);
                     }
                     List<MsReport> msReports2 = msReportMapper.selectMsReportThereError(userOpen.getUserId());
@@ -268,14 +274,14 @@ public class ScanController {
                         model.put("collor2", "red");
                         model.put("into", "不许进入");
                         model.put("errorMsg", "由于近期您健康评估存在问题,不许进入,如有疑问请联系直管领导。");
-                        scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                        scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                         return new ModelAndView("/user/scanHC.ftl", model);
                     }
                     model.put("collor", "green");
                     model.put("collor2", "green");
                     model.put("into", "允许进入");
                     model.put("errorMsg", "声明:复工通行证是根据员工自主填写健康日报,结合湖北和昌新材料科技股份有限公司复工条件自动产生。原则上代表员工可以通行,在接受规定检查后,方可入厂。");
-                    scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
+                    scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
                     return new ModelAndView("/user/scanHC.ftl", model);
                 }
             }
@@ -285,7 +291,7 @@ public class ScanController {
                     model.put("collor", "green");
                     model.put("into", "允许通行");
                     model.put("errorMsg", "外出请佩戴口罩,避免近距离接触,保生产同时注意自身安全。");
-                    scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
+                    scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
                     return new ModelAndView("/user/scan.ftl", model);
                 }
                 OutScanConf outScanConf = outScanConfMapper.getOutScanConfByUptown(uptownDoor.getUptownId());
@@ -293,7 +299,7 @@ public class ScanController {
                     model.put("collor", "red");
                     model.put("into", "禁止外出");
                     model.put("errorMsg", "根据武汉市小区封闭管理规定,非特殊人员禁止出行!");
-                    scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                    scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                     return new ModelAndView("/user/scan.ftl", model);
                 }
                 OutScan outScan = outScanMapper.getOutScanThreeday(userOpen.getUserId(), 2, outScanConf.getGoOutFre());
@@ -301,7 +307,7 @@ public class ScanController {
                     model.put("collor", "red");
                     model.put("into", "禁止" + getMsg(inType));
                     model.put("errorMsg", "距您上次外出时间未满" + outScanConf.getGoOutFre() + "日,禁止外出,请配合。上次外出登记时间 " + sdf.format(new Date(outScan.getDate().getMillis())) + "。");
-                    scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                    scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                     return new ModelAndView("/user/scan.ftl", model);
                 }
                 MsReport msReport = msReportMapper.selectMsReportToday(userOpen.getUserId());
@@ -309,7 +315,7 @@ public class ScanController {
                     model.put("collor", "red");
                     model.put("into", "禁止通行");
                     model.put("errorMsg", "健康日报提示您存在健康问题,禁止外出,请配合。");
-                    scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                    scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                     return new ModelAndView("/user/scan.ftl", model);
                 }
                 List<MsReport> msReports = msReportMapper.selectMsReportLate(userOpen.getUserId());
@@ -317,13 +323,13 @@ public class ScanController {
                     model.put("collor", "red");
                     model.put("into", "禁止" + getMsg(inType));
                     model.put("errorMsg", "您最近三日未上报健康日报,请说明原因,配合监测人员。");
-                    scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                    scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
                     return new ModelAndView("/user/scan.ftl", model);
                 } else if (msReports.size() < 4) {
                     model.put("collor", "orange");
                     model.put("into", "可以" + getMsg(inType));
                     model.put("errorMsg", "您今日或前3日未连续报告日报,请说明原因并及时填报,配合监测人员。");
-                    scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
+                    scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
                     return new ModelAndView("/user/scan.ftl", model);
                 }
             }
@@ -334,7 +340,7 @@ public class ScanController {
             } else if (inType == 1) {
                 model.put("errorMsg", "欢迎归来,注意防护。");
             }
-            scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
+            scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
             return new ModelAndView("/user/scan.ftl", model);
         }
     }

+ 12 - 0
whepi-web/src/main/resources/mapper/SweepCodeMapper.xml

@@ -12,6 +12,8 @@
         c.in_type,
         c.go_status as goStatus,
         c.error_info as errorInfo,
+        c.longitude,
+        c.latitude,
         g.linkman,
         g.phone,
         c.time_update
@@ -78,6 +80,8 @@
         c.in_type,
         c.go_status as goStatus,
         c.error_info as errorInfo,
+        c.longitude,
+        c.latitude,
         g.linkman,
         g.phone,
         c.time_update
@@ -119,6 +123,8 @@
         c.in_type,
         c.go_status as goStatus,
         c.error_info as errorInfo,
+        c.longitude,
+        c.latitude,
         g.linkman,
         g.phone,
         c.time_update
@@ -159,6 +165,8 @@
         c.in_type,
         c.go_status as goStatus,
         c.error_info as errorInfo,
+        c.longitude,
+        c.latitude,
         g.linkman,
         g.phone,
         c.time_update
@@ -200,6 +208,8 @@
         c.in_type,
         c.go_status as goStatus,
         c.error_info as errorInfo,
+        c.longitude,
+        c.latitude,
         g.linkman,
         g.phone,
         c.time_update
@@ -240,6 +250,8 @@
         c.in_type,
         c.go_status as goStatus,
         c.error_info as errorInfo,
+        c.longitude,
+        c.latitude,
         g.linkman,
         g.phone,
         c.time_update