浏览代码

凌云集团更改公司

peiguo 5 年之前
父节点
当前提交
03eb1d3a61

+ 18 - 2
admin-ui/app/whepi/mock/menu.json

@@ -35,6 +35,14 @@
         },
         {
           "id": "ENT100023",
+          "text": "凌云出入记录",
+          "href": "/app/whepi/scan/xqmanageLY.js",
+          "iconCls": "icon-blank fa fa-align-justify",
+          "state": "close",
+          "children": []
+        },
+        {
+          "id": "ENT100024",
           "text": "巡检扫码记录",
           "href": "/app/whepi/scan/xunJian.js",
           "iconCls": "icon-blank fa fa-align-justify",
@@ -42,8 +50,16 @@
           "children": []
         },
         {
-          "id": "ENT100024",
-          "text": "特殊人员管理",
+          "id": "ENT100025",
+          "text": "其他特殊人员管理",
+          "href": "/app/whepi/scan/specialPersonnel.js",
+          "iconCls": "icon-blank fa fa-align-justify",
+          "state": "close",
+          "children": []
+        },
+        {
+          "id": "ENT100026",
+          "text": "凌云特殊人员管理",
           "href": "/app/whepi/scan/specialPersonnel.js",
           "iconCls": "icon-blank fa fa-align-justify",
           "state": "close",

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

@@ -0,0 +1,261 @@
+define(function (require) {
+        return function (context) {
+
+            var $grid1, $form;
+
+            // 弹框的方式
+            var widgets = {
+                // 搜索分类检索
+                selectTableUnit: {
+                    url: 'app/whepi/home/selectLYbumen.js',
+                    bind: {
+                        unitId: 'unitId',
+                        unit: 'unit',
+                    },
+                },
+            }
+
+
+            // 导出
+            function exportExcel() {
+                var queryForm = $form.formGet();
+                $.yvan.download({
+                    method: 'post',
+                    url: api('/sweepCode/exportLY?queryProperties=' + queryForm.queryProperties + '&unitId=' + queryForm.unitId + '&goStatus=' + queryForm.goStatus + '&dateSta=' + queryForm.dateSta + '&dateEnd=' + queryForm.dateEnd),
+                    fileName: '进出管理-' + $.yvan.getMoment().format('YYYY-MM-DD HH:mm:ss') + '.xlsx'
+
+                });
+            }
+
+            // 输入搜索文本后点击回车按钮查询列表
+            function enterQueryGrid1(e) {
+                if (e.keyCode === 13) {
+                    var tmp = $(this).val();
+                    $form.formSet({queryProperties: tmp});
+                    queryGrid1();
+                }
+            }
+
+            // 检索条件查询
+            function queryGrid1() {
+                var queryUrl = '/sweepCode/selectCodeLY';// 自行替换此参数
+                var queryForm = $form.formGet();
+                if (!queryForm.dateSta) {
+                    $form.formSet({dateSta: getFormatDate() + " 00:00:00"});
+                    queryForm.dateSta = getFormatDate() + " 00:00:00";
+                }
+                if (!queryForm.dateEnd) {
+                    $form.formSet({dateEnd: getFormatDate() + " 23:59:59"});
+                    queryForm.dateEnd = getFormatDate() + " 23:59:59";
+                }
+                queryForm.roleCode = App.currentRoleCode;
+                $grid1.reload({
+                    mtype: 'POST',
+                    url: api(queryUrl),
+                    queryParams: queryForm
+                }, true);
+            }
+
+            // 搜索按钮
+            var queryToolbarTitle = '进出管理';// 自行替换此参数
+            var queryToolbar = {
+                xtype: 'toolbar', title: queryToolbarTitle, items: [
+                    {
+                        text: '查询', iconCls: 'fa fa-search', onClick: function () {
+                            queryGrid1();
+                        }
+                    }, {
+                        text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+                            $form.formClear();
+                            queryGrid1();
+                        }
+                    }, {
+                        text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+                            App.closeMe(this);
+                        }
+                    }
+                ]
+            };
+
+            // 搜索条件
+            var queryForm = {
+                onRender: function () {
+                    $form = $(this);
+                },
+                xtype: 'form',
+                items: [[
+                    {
+                        xtype: 'textbox',
+                        label: '大门名称',
+                        name: 'queryProperties',
+                        prompt: "大门名称",
+                        labelWidth: 'auto',
+                        events: {keydown: enterQueryGrid1}, width: 250
+                    },
+                    {xtype: 'hidden', name: 'unitId'},
+                    {
+                        xtype: 'searchbox',
+                        label: '部门',
+                        name: 'unit',
+                        prompt: "部门",
+                        width: '300px',
+                        widget: widgets.selectTableUnit,// 弹出框方法
+                        labelWidth: '70px',
+                        onChange: function (value) {
+                            if (!isNotNullOrEmpty(value)) {
+                                $form.formSet({
+                                    unitId: ''
+                                })
+                            }
+                            queryGrid1();
+                        },
+                    },
+                    {
+                        xtype: 'yvselect', label: '通行状态', name: 'goStatus', labelWidth: 'auto', value: '', width: 220,
+                        data: [
+                            {id: '1', text: '允许'},
+                            {id: '-1', text: '禁止'},
+                        ],
+                        onChange: function () {
+                            queryGrid1();
+                        }
+                    },
+                    {
+                        xtype: 'datetimebox',
+                        name: 'dateSta',
+                        label: '进出时间',
+                        labelWidth: 'auto',
+                        width: 230,
+                        onChange: function (data) {
+                          /*  var expDateStart = $form.formGet().nextRepairDate;
+                            var expDateEnd = $form.formGet().expDateEnd;
+                            var expDateStart = new Date(expDateStart.replace("-", "/"));
+                            var expDateEnd = new Date(expDateEnd.replace("-", "/"));
+                            if (expDateStart > expDateEnd) {
+                                $.yvan.msg('起止日期必须大于起始日期');
+                                return;
+                            }*/
+                        }
+                    },
+                    {
+                        xtype: 'datetimebox', label: '--', name: 'dateEnd', labelWidth: 'auto', width: 220,
+                        onChange: function (data) {
+                           /* var expDateStart = $form.formGet().nextRepairDate;
+                            var expDateEnd = $form.formGet().expDateEnd;
+                            var expDateStart = new Date(expDateStart.replace("-", "/"));
+                            var expDateEnd = new Date(expDateEnd.replace("-", "/"));
+                            if (expDateStart > expDateEnd) {
+                                $.yvan.msg('起止日期必须大于起始日期');
+                                return;
+                            }*/
+                        }
+                    }
+                ]]
+            };
+
+            var gridToolbarTitle = '出入列表';// 自行替换此参数
+            var gridToolbar = {
+                xtype: 'toolbar',
+                title: gridToolbarTitle,
+                items: [
+                    {
+                        text: '导出', iconCls: 'fa fa-cloud-upload', onClick: function () {
+                            exportExcel();
+                        }
+                    },
+                ]
+            };
+
+            return {
+                north: {
+                    height: 88,
+                    /* split: true,
+                     border: false,*///底框是否可变动
+                    items: [
+                        queryToolbar,
+                        queryForm
+                    ]
+                },
+                center: {
+                    height: '60%',
+                    split: true,
+                    items:
+                        {
+                            onRender: function () {
+                                $grid1 = $(this);
+                                queryGrid1()
+                            },
+                            xtype: 'grid',
+                            toolbar:
+                            gridToolbar,
+                            idField: 'joId',
+                            autoSizeColumns: true,//序号多  正确显示
+                            columns:
+                                [
+                                    [
+                                        {field: 'uptownId', title: '小区id', maxWidth: 200, align: 'left', hidden: true},
+                                        // {field: 'uptownName', title: '小区名称', maxWidth: 200, align: 'left',},
+                                        // {field: 'ridgepole', title: '楼栋', maxWidth: 200, align: 'left',},
+                                        {field: 'unit', title: '部门', maxWidth: 200,},
+                                        {
+                                            field: 'doorplate',
+                                            title: '工号', maxWidth: 200,
+                                        },
+                                        {
+                                            field: 'linkman',
+                                            title: '用户名',
+                                        },
+                                        {
+                                            field: 'phone',
+                                            title: '电话',
+                                        },
+                                        {
+                                            field: 'doorName',
+                                            title: '出入大门',
+                                            align: 'left',
+                                        },
+                                        {
+                                            field: 'date',
+                                            title: '进出时间',
+                                            align: 'left',
+                                        },
+                                        {
+                                            field: 'inType',
+                                            title: '记录状态',
+                                            align: 'center',
+                                            formatter:function (value) {
+                                                if(value==1){
+                                                    return "进入"
+                                                }else if(value ==2){
+                                                    return "外出"
+                                                }
+
+                                            }
+                                        },
+                                        {
+                                            field: 'goStatus',
+                                            title: '通行状态',
+                                            align: 'center',
+                                            formatter:function (value) {
+                                                if(value==1){
+                                                    return "允许"
+                                                }else if(value ==-1){
+                                                    return "禁止"
+                                                }
+
+                                            }
+                                        },
+                                        {
+                                            field: 'errorInfo',
+                                            title: '禁止提示',
+                                            align: 'left',
+                                        },
+
+                                    ]
+                                ]
+                        }
+                }
+            };
+        };
+    }
+);

+ 4 - 0
whepi-web/src/main/java/com/bofeng/dao/SweepCodeMapper.java

@@ -1,6 +1,7 @@
 package com.bofeng.dao;
 
 import com.bofeng.entity.SysUptownHouse;
+import com.bofeng.entity.SysUptownHouseLY;
 import com.yvan.PageDb;
 import org.apache.ibatis.annotations.Mapper;
 import org.springframework.stereotype.Repository;
@@ -14,4 +15,7 @@ public interface SweepCodeMapper {
     List<SysUptownHouse> selectCode(PageDb pageDb, Map<String, Object> queryParam);
     List<SysUptownHouse> selectLingyunUser(PageDb pageDb, Map<String, Object> queryParam);
     List<SysUptownHouse> export(Map<String, Object> queryParam);
+
+    List<SysUptownHouseLY> selectCodeLY(PageDb pageDb, Map<String, Object> queryParam);
+    List<SysUptownHouseLY> exportLY(Map<String, Object> queryParam);
 }

+ 106 - 0
whepi-web/src/main/java/com/bofeng/entity/SysUptownHouseLY.java

@@ -0,0 +1,106 @@
+package com.bofeng.entity;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.joda.time.DateTime;
+
+import java.io.Serializable;
+
+@Data
+public class SysUptownHouseLY implements Serializable {
+    @TableId("house_id")
+    private Long houseId;
+
+    @TableField(exist = false)
+    private Long uptownId;
+
+    @TableField(exist = false)
+    private Long unitId;
+
+    @TableField(exist = false)
+    private String ridgepole;
+
+    @TableField(exist = false)
+    @ExcelProperty(value = {"部门"}, index = 0)
+    private String unit;
+
+    @TableField(exist = false)
+    private String reportId;
+
+    @TableField(exist = false)
+    private String msStatus;
+
+    @TableField(exist = false)
+    private String time;
+
+    @TableField("doorplate")
+    @ExcelProperty(value = {"工号"}, index = 1)
+    private String doorplate;
+
+    @TableField("status")
+    private int status;
+
+    @TableField("report_status")
+    private int reportStatus;
+
+    @TableField("time_create")
+    private DateTime timeCreate;
+
+    @TableField("time_update")
+    private DateTime timeUpdate;
+
+    @TableField(exist = false)
+    private String uptownName;
+
+    @TableField(exist = false)
+    @ExcelProperty(value = {"出入大门"}, index = 4)
+    private String doorName;
+
+    @TableField(exist = false)
+    @ExcelProperty(value = {"进出时间"}, index = 5)
+    private String date;
+
+    @TableField(exist = false)
+    private Integer inType;
+
+    @TableField(exist = false)
+    @ExcelProperty(value = {"记录状态"}, index = 6)
+    private String inTypeStr;
+
+    @TableField(exist = false)
+    @ExcelProperty(value = {"用户名"}, index = 2)
+    private String linkman;
+
+    @TableField(exist = false)
+    @ExcelProperty(value = {"电话"}, index = 3)
+    private String phone;
+
+    @TableField(exist = false)
+    private Integer goStatus;
+
+    @ExcelProperty(value = {"通行状态"}, index = 7)
+    @ApiModelProperty("通行状态:1允许,-1禁止")
+    @TableField(exist = false)
+    private String goStatusStr;
+
+    @ExcelProperty(value = {"禁止提示"}, index = 8)
+    @ApiModelProperty("禁止提示")
+    @TableField(exist = false)
+    private String errorInfo;
+
+    @TableField(exist = false)
+    private String jcStatus;
+
+    @TableField(exist = false)
+    private String dept;
+
+    @TableField(exist = false)
+    private Long userId;
+
+
+
+}

+ 24 - 0
whepi-web/src/main/java/com/bofeng/service/SweepCodeService.java

@@ -140,6 +140,30 @@ public class SweepCodeService {
         return sysUptownHouses;
     }
 
+    public List<SysUptownHouseLY> selectCodeLY(PageDb pageDb, Map<String, Object> queryParam) {
+        List<SysUptownHouseLY> sysUptownHouses = sweepCodeMapper.selectCodeLY(pageDb,queryParam);
+        return sysUptownHouses;
+    }
+
+    public List<SysUptownHouseLY> exportLY(Map<String, Object> queryParam) {
+        List<SysUptownHouseLY> sysUptownHouses = sweepCodeMapper.exportLY(queryParam);
+        if(sysUptownHouses.size() != 0){
+            for (int i = 0; i < sysUptownHouses.size(); i++) {
+                if(sysUptownHouses.get(i).getInType() == 1 ){
+                    sysUptownHouses.get(i).setInTypeStr("进入");
+                }else if(sysUptownHouses.get(i).getInType() == 2 ){
+                    sysUptownHouses.get(i).setInTypeStr("外出");
+                }
+                if(sysUptownHouses.get(i).getGoStatus() == 1 ){
+                    sysUptownHouses.get(i).setGoStatusStr("允许");
+                }else if(sysUptownHouses.get(i).getGoStatus() == -1 ){
+                    sysUptownHouses.get(i).setGoStatusStr("禁止");
+                }
+            }
+        }
+        return sysUptownHouses;
+    }
+
     public List<OutScanEstate> selectXunJian(PageDb pageDb, Map<String, Object> queryParam) {
         List<OutScanEstate> outScanEstates = outScanEstateMapper.selectXunJian(pageDb,queryParam);
         return outScanEstates;

+ 15 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/ScanAdminController.java

@@ -126,6 +126,21 @@ public class ScanAdminController {
         ExcelUtils.writeSheet(SysUptownHouse.class, sysUptownHouses).export(resp,"出入管理");
     }
 
+    @ApiOperation("凌云出入查询")
+    @PostMapping("/whepi/sweepCode/selectCodeLY")
+    public Model<List<SysUptownHouseLY>> selectCodeLY(PageDb pageDb,HttpParameterParser parser) {
+        List<SysUptownHouseLY> sysUptownHouses = sweepCodeService.selectCodeLY(pageDb,parser.getMap());
+        return Model.newSuccess(pageDb,sysUptownHouses);
+    }
+
+    @ApiOperation("凌云导出")
+    @PostMapping("/whepi/sweepCode/exportLY")
+    @SneakyThrows
+    public void exportLY(HttpParameterParser parser,HttpServletResponse resp) {
+        List<SysUptownHouseLY> sysUptownHouses = sweepCodeService.exportLY(parser.getMap());
+        ExcelUtils.writeSheet(SysUptownHouseLY.class, sysUptownHouses).export(resp,"凌云集团出入管理");
+    }
+
     @ApiOperation("出入查询")
     @PostMapping("/whepi/sweepCode/selectXunJian")
     public Model<List<OutScanEstate>> selectXunJian(PageDb pageDb,HttpParameterParser parser) {

+ 175 - 94
whepi-web/src/main/resources/mapper/SweepCodeMapper.xml

@@ -2,111 +2,192 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.bofeng.dao.SweepCodeMapper">
     <select id="selectCode" resultType="com.bofeng.entity.SysUptownHouse">
-     select DISTINCT
-     a.uptown_name,
-     d.ridgepole,
-     d.unit,
-     e.doorplate,
-     b.door_name,
-     DATE_FORMAT(c.date,'%Y-%m-%d %H:%i:%s') as date,
-     c.in_type,
-     c.go_status as goStatus,
-     c.error_info as errorInfo,
-     g.linkman,
-     g.phone,
-     c.time_update
-     from out_scan c
-     inner join sys_user_role t on c.user_id = t.user_id and role_id =1
-     inner join sys_uptown_home g on g.house_id = t.property_id
-     inner join sys_uptown a on c.uptown_id = a.uptown_id
-     inner join sys_uptown_door b on c.door_id = b.door_id
-     inner join sys_uptown_house e on e.house_id = t.property_id
-     inner join sys_uptown_unit d on d.unit_id = e.unit_id
+        select DISTINCT
+        a.uptown_name,
+        d.ridgepole,
+        d.unit,
+        e.doorplate,
+        b.door_name,
+        DATE_FORMAT(c.date,'%Y-%m-%d %H:%i:%s') as date,
+        c.in_type,
+        c.go_status as goStatus,
+        c.error_info as errorInfo,
+        g.linkman,
+        g.phone,
+        c.time_update
+        from out_scan c
+        inner join sys_user_role t on c.user_id = t.user_id and role_id =1
+        inner join sys_uptown_home g on g.house_id = t.property_id
+        inner join sys_uptown a on c.uptown_id = a.uptown_id
+        inner join sys_uptown_door b on c.door_id = b.door_id
+        inner join sys_uptown_house e on e.house_id = t.property_id
+        inner join sys_uptown_unit d on d.unit_id = e.unit_id
         <where>
-         <if test="queryProperties != null and queryProperties != ''">
-          b.door_name like concat('%',#{queryProperties},'%')
-         </if>
-         <if test="uptownId != null and uptownId != ''">
-          and a.uptown_id = #{uptownId}
-         </if>
-         <if test="goStatus != null and goStatus !=''">
-          and c.go_status = #{goStatus}
-         </if>
-         <if test="dateSta != null and dateSta !=''">
-          and c.date >= #{dateSta}
-         </if>
-         <if test="dateEnd != null and dateEnd !=''">
-          and c.date &lt; #{dateEnd}
-         </if>
+            <if test="queryProperties != null and queryProperties != ''">
+                b.door_name like concat('%',#{queryProperties},'%')
+            </if>
+            <if test="uptownId != null and uptownId != ''">
+                and a.uptown_id = #{uptownId}
+            </if>
+            <if test="goStatus != null and goStatus !=''">
+                and c.go_status = #{goStatus}
+            </if>
+            <if test="dateSta != null and dateSta !=''">
+                and c.date >= #{dateSta}
+            </if>
+            <if test="dateEnd != null and dateEnd !=''">
+                and c.date &lt; #{dateEnd}
+            </if>
         </where>
-     order by c.time_update desc
+        order by c.time_update desc
     </select>
     <select id="selectLingyunUser" resultType="com.bofeng.entity.SysUptownHouse">
-     select
-     b.user_id,
-     a.linkman,
-     a.phone,
-     c.doorplate,
-     e.uptown_name,
-     concat(d.ridgepole,d.unit) as dept
-     from sys_uptown_home a
-     inner join sys_user_role b on a.house_id = b.property_id and b.role_id =1
-     inner join sys_uptown_house c on c.house_id = b.property_id
-     inner join sys_uptown_unit d on c.unit_id = d.unit_id
-     inner join sys_uptown e on e.uptown_id = d.uptown_id
+        select
+        b.user_id,
+        a.linkman,
+        a.phone,
+        c.doorplate,
+        e.uptown_name,
+        concat(d.ridgepole,d.unit) as dept
+        from sys_uptown_home a
+        inner join sys_user_role b on a.house_id = b.property_id and b.role_id =1
+        inner join sys_uptown_house c on c.house_id = b.property_id
+        inner join sys_uptown_unit d on c.unit_id = d.unit_id
+        inner join sys_uptown e on e.uptown_id = d.uptown_id
         <where>
-         <if test="queryProperties != null and queryProperties != ''">
-          (a.linkman like concat('%',#{queryProperties},'%')
-          or a.phone like concat('%',#{queryProperties},'%'))
-         </if>
-         <if test="uptownId != null and uptownId != ''">
-            and e.uptown_id = #{uptownId}
-         </if>
-         <if test="unitId != null and unitId != ''">
-            and d.unit_id = #{unitId}
-         </if>
+            <if test="queryProperties != null and queryProperties != ''">
+                (a.linkman like concat('%',#{queryProperties},'%')
+                or a.phone like concat('%',#{queryProperties},'%'))
+            </if>
+            <if test="uptownId != null and uptownId != ''">
+                and e.uptown_id = #{uptownId}
+            </if>
+            <if test="unitId != null and unitId != ''">
+                and d.unit_id = #{unitId}
+            </if>
         </where>
     </select>
     <select id="export" resultType="com.bofeng.entity.SysUptownHouse">
-     select DISTINCT
-     a.uptown_name,
-     d.ridgepole,
-     d.unit,
-     e.doorplate,
-     b.door_name,
-     DATE_FORMAT(c.date,'%Y-%m-%d %H:%i:%s') as date,
-     c.in_type,
-     c.go_status as goStatus,
-     c.error_info as errorInfo,
-     g.linkman,
-     g.phone,
-     c.time_update
-     from out_scan c
-     inner join sys_user_role t on c.user_id = t.user_id and role_id =1
-     inner join sys_uptown_home g on g.house_id = t.property_id
-     inner join sys_uptown a on c.uptown_id = a.uptown_id
-     inner join sys_uptown_door b on c.door_id = b.door_id
-     inner join sys_uptown_house e on e.house_id = t.property_id
-     inner join sys_uptown_unit d on d.unit_id = e.unit_id
+        select DISTINCT
+        a.uptown_name,
+        d.ridgepole,
+        d.unit,
+        e.doorplate,
+        b.door_name,
+        DATE_FORMAT(c.date,'%Y-%m-%d %H:%i:%s') as date,
+        c.in_type,
+        c.go_status as goStatus,
+        c.error_info as errorInfo,
+        g.linkman,
+        g.phone,
+        c.time_update
+        from out_scan c
+        inner join sys_user_role t on c.user_id = t.user_id and role_id =1
+        inner join sys_uptown_home g on g.house_id = t.property_id
+        inner join sys_uptown a on c.uptown_id = a.uptown_id
+        inner join sys_uptown_door b on c.door_id = b.door_id
+        inner join sys_uptown_house e on e.house_id = t.property_id
+        inner join sys_uptown_unit d on d.unit_id = e.unit_id
         <where>
-         <if test="queryProperties != null and queryProperties != ''">
-          b.door_name like concat('%',#{queryProperties},'%')
-         </if>
-         <if test="uptownId != null and uptownId != ''">
-          and a.uptown_id = #{uptownId}
-         </if>
-         <if test="goStatus != null and goStatus !=''">
-          and c.go_status = #{goStatus}
-         </if>
-         <if test="dateSta != null and dateSta !=''">
-          and c.date >= #{dateSta}
-         </if>
-         <if test="dateEnd != null and dateEnd !=''">
-          and c.date &lt; #{dateEnd}
-         </if>
+            <if test="queryProperties != null and queryProperties != ''">
+                b.door_name like concat('%',#{queryProperties},'%')
+            </if>
+            <if test="uptownId != null and uptownId != ''">
+                and a.uptown_id = #{uptownId}
+            </if>
+            <if test="goStatus != null and goStatus !=''">
+                and c.go_status = #{goStatus}
+            </if>
+            <if test="dateSta != null and dateSta !=''">
+                and c.date >= #{dateSta}
+            </if>
+            <if test="dateEnd != null and dateEnd !=''">
+                and c.date &lt; #{dateEnd}
+            </if>
         </where>
-     order by c.time_update desc
+        order by c.time_update desc
     </select>
 
 
+    <select id="selectCodeLY" resultType="com.bofeng.entity.SysUptownHouseLY">
+        select DISTINCT
+        a.uptown_name,
+        CONCAT(d.ridgepole,d.unit) as unit,
+        e.doorplate,
+        b.door_name,
+        DATE_FORMAT(c.date,'%Y-%m-%d %H:%i:%s') as date,
+        c.in_type,
+        c.go_status as goStatus,
+        c.error_info as errorInfo,
+        g.linkman,
+        g.phone,
+        c.time_update
+        from out_scan c
+        inner join sys_user_role t on c.user_id = t.user_id and role_id =1
+        inner join sys_uptown_home g on g.house_id = t.property_id
+        inner join sys_uptown a on c.uptown_id = a.uptown_id
+        inner join sys_uptown_door b on c.door_id = b.door_id
+        inner join sys_uptown_house e on e.house_id = t.property_id
+        inner join sys_uptown_unit d on d.unit_id = e.unit_id
+        <where>
+            a.uptown_id = 1238790987234
+            <if test="queryProperties != null and queryProperties != ''">
+                and b.door_name like concat('%',#{queryProperties},'%')
+            </if>
+            <if test="unitId != null and unitId != ''">
+                and d.unit_id = #{unitId}
+            </if>
+            <if test="goStatus != null and goStatus !=''">
+                and c.go_status = #{goStatus}
+            </if>
+            <if test="dateSta != null and dateSta !=''">
+                and c.date >= #{dateSta}
+            </if>
+            <if test="dateEnd != null and dateEnd !=''">
+                and c.date &lt; #{dateEnd}
+            </if>
+        </where>
+        order by c.time_update desc
+    </select>
+    <select id="exportLY" resultType="com.bofeng.entity.SysUptownHouseLY">
+        select DISTINCT
+        a.uptown_name,
+        CONCAT(d.ridgepole,d.unit) as unit,
+        e.doorplate,
+        b.door_name,
+        DATE_FORMAT(c.date,'%Y-%m-%d %H:%i:%s') as date,
+        c.in_type,
+        c.go_status as goStatus,
+        c.error_info as errorInfo,
+        g.linkman,
+        g.phone,
+        c.time_update
+        from out_scan c
+        inner join sys_user_role t on c.user_id = t.user_id and role_id =1
+        inner join sys_uptown_home g on g.house_id = t.property_id
+        inner join sys_uptown a on c.uptown_id = a.uptown_id
+        inner join sys_uptown_door b on c.door_id = b.door_id
+        inner join sys_uptown_house e on e.house_id = t.property_id
+        inner join sys_uptown_unit d on d.unit_id = e.unit_id
+        <where>
+            a.uptown_id = 1238790987234
+            <if test="queryProperties != null and queryProperties != ''">
+                and b.door_name like concat('%',#{queryProperties},'%')
+            </if>
+            <if test="unitId != null and unitId != ''">
+                and d.unit_id = #{unitId}
+            </if>
+            <if test="goStatus != null and goStatus !=''">
+                and c.go_status = #{goStatus}
+            </if>
+            <if test="dateSta != null and dateSta !=''">
+                and c.date >= #{dateSta}
+            </if>
+            <if test="dateEnd != null and dateEnd !=''">
+                and c.date &lt; #{dateEnd}
+            </if>
+        </where>
+        order by c.time_update desc
+    </select>
+
 </mapper>