Bläddra i källkod

凌云集团更改公司

peiguo 5 år sedan
förälder
incheckning
f98dbf2395

+ 10 - 15
admin-ui/app/whepi/clock/clock.js

@@ -56,7 +56,7 @@ define(function (require) {
         var queryForm = $form.formGet();
         $.yvan.download({
           method: 'post',
-          url: api('/clock/exSelectClockLY?phone=' + queryForm.phone + '&unitId=' + queryForm.unitId + '&departmentId=' + queryForm.departmentId + '&dateSta=' + queryForm.dateSta + '&dateEnd=' + queryForm.dateEnd),
+          url: api('/clock/exSelectClockLY?queryProperties=' + queryForm.queryProperties + '&phone=' + queryForm.phone + '&unitId=' + queryForm.unitId + '&departmentId=' + queryForm.departmentId + '&dateSta=' + queryForm.dateSta + '&dateEnd=' + queryForm.dateEnd),
           fileName: '签到管理-' + $.yvan.getMoment().format('YYYY-MM-DD HH:mm:ss') + '.xlsx'
 
         });
@@ -133,14 +133,14 @@ define(function (require) {
         },
         xtype: 'form',
         items: [[
-          // {
-          //   xtype: 'textbox',
-          //   label: '大门名称',
-          //   name: 'queryProperties',
-          //   prompt: "大门名称",
-          //   labelWidth: 'auto',
-          //   events: {keydown: enterQueryGrid1}, width: 250
-          // },
+          {
+            xtype: 'textbox',
+            label: '大门名称',
+            name: 'queryProperties',
+            prompt: "大门名称",
+            labelWidth: 'auto',
+            events: {keydown: enterQueryGrid1}, width: 250
+          },
           {
             xtype: 'textbox',
             label: '姓名/电话',
@@ -261,7 +261,7 @@ define(function (require) {
                   [
                     {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: 'doorName', title: '出入大门', align: 'left',},
                     {field: 'unit', title: '部门', maxWidth: 200,},
                     {field: 'departmentName', title: '二级部门', maxWidth: 200, align: 'left',},
                     {
@@ -276,11 +276,6 @@ define(function (require) {
                       field: 'doorplate',
                       title: '工号', maxWidth: 200,
                     },
-                    // {
-                    //   field: 'doorName',
-                    //   title: '出入大门',
-                    //   align: 'left',
-                    // },
                     {
                       field: 'dateStr',
                       title: '签到时间',

+ 10 - 6
whepi-web/src/main/java/com/bofeng/entity/OutScanClock.java

@@ -79,27 +79,31 @@ public class OutScanClock {
     @TableField(exist = false)
     private DateTime timeUpdate;
 
-    @ExcelProperty(value = "部门", index = 0)
+    @ExcelProperty(value = "出入大门", index = 0)
+    @TableField(exist = false)
+    private String doorName;
+
+    @ExcelProperty(value = "部门", index = 1)
     @TableField(exist = false)
     private String unit;
 
-    @ExcelProperty(value = "二级部门", index = 1)
+    @ExcelProperty(value = "二级部门", index = 2)
     @TableField(exist = false)
     private String departmentName;
 
-    @ExcelProperty(value = "用户名", index = 2)
+    @ExcelProperty(value = "用户名", index = 3)
     @TableField(exist = false)
     private String linkman;
 
-    @ExcelProperty(value = "电话", index = 3)
+    @ExcelProperty(value = "电话", index = 4)
     @TableField(exist = false)
     private String phone;
 
-    @ExcelProperty(value = "工号", index = 4)
+    @ExcelProperty(value = "工号", index = 5)
     @TableField(exist = false)
     private String doorplate;
 
-    @ExcelProperty(value = "签到时间", index = 5)
+    @ExcelProperty(value = "签到时间", index = 6)
     @TableField(exist = false)
     private String dateStr;
 }

+ 26 - 18
whepi-web/src/main/resources/mapper/SweepCodeMapper.xml

@@ -344,22 +344,22 @@
         a.uptown_name,
         CONCAT( d.ridgepole, d.unit ) AS unit,
         e.doorplate,
-        DATE_FORMAT( c.dateStr, '%Y-%m-%d %H:%i:%s' ) AS dateStr,
+        b.door_name as doorName,
+        DATE_FORMAT( c.date, '%Y-%m-%d %H:%i:%s' ) AS dateStr,
         g.linkman,
         g.phone,
         de.department_name AS departmentName
-        FROM
-            (select user_id,min(cast(date as datetime)) as dateStr
-            from out_scan
-            where uptown_id = #{uptownId} and go_status = 1 and in_type = 1
-            <if test="dateSta != null and dateSta !=''">
-                and date >= #{dateSta}
-            </if>
-            <if test="dateEnd != null and dateEnd !=''">
-                and date &lt; #{dateEnd}
-            </if>
-            group by user_id,cast(date as date)
-            ) c
+        FROM out_scan c
+        inner join (select user_id,min(date) as dateStr
+        from out_scan
+        where uptown_id = #{uptownId} and go_status = 1 and in_type = 1
+        <if test="dateSta != null and dateSta !=''">
+            and date >= #{dateSta}
+        </if>
+        <if test="dateEnd != null and dateEnd !=''">
+            and date &lt; #{dateEnd}
+        </if>
+        group by user_id)aa on aa.user_id = c.user_id and aa.dateStr = c.date and c.go_status = 1 and c.in_type = 1
         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
@@ -367,7 +367,11 @@
         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
         LEFT JOIN sys_department de ON de.department_id = e.department_id
+        inner join sys_uptown_door b on c.door_id = b.door_id
         <where>
+            <if test="queryProperties != null and queryProperties != ''">
+                and b.door_name like concat('%',#{queryProperties},'%')
+            </if>
             <if test="phone != null and phone != ''">
                 and (g.linkman like concat('%',#{phone},'%')
                 or g.phone = #{phone} )
@@ -386,12 +390,13 @@
         a.uptown_name,
         CONCAT( d.ridgepole, d.unit ) AS unit,
         e.doorplate,
-        DATE_FORMAT( c.dateStr, '%Y-%m-%d %H:%i:%s' ) AS dateStr,
+        b.door_name as doorName,
+        DATE_FORMAT( c.date, '%Y-%m-%d %H:%i:%s' ) AS dateStr,
         g.linkman,
         g.phone,
         de.department_name AS departmentName
-        FROM
-        (select user_id,min(cast(date as datetime)) as dateStr
+        FROM out_scan c
+        inner join (select user_id,min(date) as dateStr
         from out_scan
         where uptown_id = #{uptownId} and go_status = 1 and in_type = 1
         <if test="dateSta != null and dateSta !=''">
@@ -400,8 +405,7 @@
         <if test="dateEnd != null and dateEnd !=''">
             and date &lt; #{dateEnd}
         </if>
-        group by user_id,cast(date as date)
-        ) c
+        group by user_id)aa on aa.user_id = c.user_id and aa.dateStr = c.date and c.go_status = 1 and c.in_type = 1
         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
@@ -409,7 +413,11 @@
         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
         LEFT JOIN sys_department de ON de.department_id = e.department_id
+        inner join sys_uptown_door b on c.door_id = b.door_id
         <where>
+            <if test="queryProperties != null and queryProperties != ''">
+                and b.door_name like concat('%',#{queryProperties},'%')
+            </if>
             <if test="phone != null and phone != ''">
                 and (g.linkman like concat('%',#{phone},'%')
                 or g.phone = #{phone} )