瀏覽代碼

凌云集团更改公司

peiguo 5 年之前
父節點
當前提交
10a30f180a

+ 77 - 12
admin-ui/app/whepi/home/home.js

@@ -1,7 +1,7 @@
 define(function (require) {
     return function (context) {
 
-        var $form, $form1;
+        var $form, $form1, $form2;
 
         // 弹框的方式
         var widgets = {
@@ -13,6 +13,14 @@ define(function (require) {
                     uptownName: 'uptownName',
                 },
             },
+            // 搜索分类检索
+            selectTableUnit: {
+                url: 'app/whepi/home/selectLYbumen.js',
+                bind: {
+                    unitId: 'unitId',
+                    unit: 'unit',
+                },
+            },
         };
 
         //检查查询
@@ -38,6 +46,20 @@ define(function (require) {
             return true;
         }
 
+        //检查查询
+        function queryGrid3() {
+            var obj = $form2.formGet();
+            if (obj.unitId == "") {
+                $.yvan.msg('请选择部门');
+                return false;
+            }
+            if (obj.date1 == "") {
+                $.yvan.msg('请选择导出时间');
+                return false;
+            }
+            return true;
+        }
+
         return {
             center: {
                 border: false,
@@ -143,17 +165,6 @@ define(function (require) {
                                     }
                                 },
                                 {
-                                    xtype: 'button', text: '导出凌云正常家庭上报', class: 'button-blue', onClick: function () {
-                                        var obj = $form1.formGet();
-                                        if (obj.date == "") {
-                                            $.yvan.msg('请选择导出时间');
-                                            return false;
-                                        }
-                                        var date = $form1.formGet().date;
-                                        window.open(api('/lun/exportRiBao?date=' + date));
-                                    }
-                                },
-                                {
                                     xtype: 'button', text: '导出小区家庭上报明细', class: 'button-blue', onClick: function () {
                                         if (!queryGrid2()) {
                                             return;
@@ -166,6 +177,60 @@ define(function (require) {
                             ],
                         ]
                     },
+                    {
+                        onRender: function () {
+                            $form2 = $(this);
+                        },
+                        xtype: 'formgroup',
+                        title: '导出数据',
+                        items: [
+                            [
+                                {xtype: 'hidden', name: 'unitId'},
+                                {
+                                    xtype: 'searchbox',
+                                    label: '部门',
+                                    name: 'unit',
+                                    prompt: "部门",
+                                    width: '400px',
+                                    widget: widgets.selectTableUnit,// 弹出框方法
+                                    labelWidth: '120px',
+                                    onChange: function (value) {
+                                        if (!isNotNullOrEmpty(value)) {
+                                            $form.formSet({
+                                                userId: ''
+                                            })
+                                        }
+                                    },
+                                },
+                                {
+                                    name: 'date1',
+                                    label: '导出时间',
+                                    prompt: '导出时间',
+                                    xtype: 'datebox',
+                                    labelWidth: 'auto',
+                                    width: 250,
+                                },
+                            ]
+                        ]
+                    },
+                    {
+                        xtype: 'group',
+                        title: '具体操作',
+                        items: [
+                            [{xtype: 'offset'},
+                                {
+                                    xtype: 'button', text: '导出凌云正常家庭上报', class: 'button-blue', onClick: function () {
+                                        if (!queryGrid3()) {
+                                            return;
+                                        }
+                                        var date = $form2.formGet().date1;
+                                        var unitId = $form2.formGet().unitId;
+                                        window.open(api('/lun/exportRiBao?date=' + date + "&unitId=" + unitId));
+                                    }
+                                },
+                            ],
+                        ]
+                    },
                 ]
             },
         };

+ 23 - 0
admin-ui/app/whepi/home/selectLYbumen.js

@@ -0,0 +1,23 @@
+// 查询类型
+define(function (require) {
+  return function (context) {
+    return {
+      xtype: 'widget',
+      title: '部门搜索',
+      width: 550,
+      height: 600,
+      grid: {
+        url: api('/qrImg/getDLYbumen'),
+        mtype: 'post',
+        pagination: false,
+        autoSizeColumns: true,
+        queryParams: {query: context.query},
+        // idField: 'userId',
+        columns: [[
+          {title: 'ID', field: 'unitId', hidden: true},
+          {title: '部门', field: 'unit'},
+        ]]
+      }
+    };
+  };
+});

+ 1 - 14
whepi-web/src/main/java/com/bofeng/dao/RbMapper.java

@@ -93,20 +93,7 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
     )
     List<ExcelRiBao> selectExcelRiBao(@Param("uptownId") Long uptownId, @Param("date") String date);
 
-    @Select(
-            "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,\n" +
-                    "msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum, \n" +
-                    "msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,\n" +
-                    "mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult,tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other \n" +
-                    "from sys_uptown_house suh\n" +
-                    "inner join sys_uptown_home suho on suho.house_id=suh.house_id\n" +
-                    "INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId}\n" +
-                    "left join ms_report msr on msr.house_id = suh.house_id and msr.report_date = #{date}\n" +
-                    "left join ms_suspected mss on mss.report_id=msr.report_id\n" +
-                    "left join ms_trip tr on mss.suspected_id=trip_id\n" +
-                    "order by suu.unit_id asc,suho.linkman  "
-    )
-    List<ExcelRiBaoLY> selectExcelRiBaoLY(@Param("uptownId") Long uptownId, @Param("date") String date);
+    List<ExcelRiBaoLY> selectExcelRiBaoLY(@Param("uptownId") Long uptownId, @Param("date") String date, @Param("unitId") Long unitId);
 
     @Select(
             "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,\n" +

+ 5 - 0
whepi-web/src/main/java/com/bofeng/dao/UptownUnitMapper.java

@@ -2,6 +2,7 @@ package com.bofeng.dao;
 
 import com.baomidou.mybatisplus.mapper.BaseMapper;
 import com.bofeng.entity.UptownUnit;
+import com.yvan.PageDb;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
@@ -42,4 +43,8 @@ public interface UptownUnitMapper extends BaseMapper<UptownUnit> {
 
     @Select("select * from sys_uptown_unit where status = 1 and uptown_id = #{uptownId}")
     List<UptownUnit> getUptownUnitLY(@Param("uptownId") Long uptownId);
+
+
+    @Select("select unit_id,CONCAT(ridgepole,unit) as unit from sys_uptown_unit where status = 1 and uptown_id = 1238790987234")
+    List<UptownUnit>  getDLYbumen(PageDb pagination);
 }

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

@@ -125,8 +125,8 @@ public class RbService {
         return list;
     }
 
-    public List<ExcelRiBaoLY> selectExcelRiBaoLY (Long upId,String date) {
-        List<ExcelRiBaoLY> list = rbMapper.selectExcelRiBaoLY(upId, date);
+    public List<ExcelRiBaoLY> selectExcelRiBaoLY(Long upId, String date, Long unitId) {
+        List<ExcelRiBaoLY> list = rbMapper.selectExcelRiBaoLY(upId, date, unitId);
 
         if (list != null && list.size() > 0) {
             String tripDet;

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

@@ -58,6 +58,8 @@ public class ScanAdminController {
     private OutUserMapper outUserMapper;
     @Autowired
     private UptownHomeMapper uptownHomeMapper;
+    @Autowired
+    private UptownUnitMapper uptownUnitMapper;
 
     @ApiOperation("出入查询")
     @PostMapping("/whepi/sweepCode/selectCode")
@@ -190,6 +192,12 @@ public class ScanAdminController {
         return Model.newSuccess(uptownDoorMapper.getUptownDoorById(doorId));
     }
 
+    @ApiOperation("获取部门数据")
+    @PostMapping("/whepi/qrImg/getDLYbumen")
+    public Model<List<UptownUnit>> getDLYbumen(HttpParameterParser parser, PageDb pagination) {
+        return Model.newSuccess(pagination, uptownUnitMapper.getDLYbumen(pagination));
+    }
+
     @ApiOperation("保存小区大门信息")
     @PostMapping("/whepi/qrImg/insertDoor")
     public Model insert(@JsonBody UptownDoor uptownDoor) {

+ 2 - 2
whepi-web/src/main/java/com/bofeng/wx/controller/YeWeiHuiController.java

@@ -255,7 +255,7 @@ public class YeWeiHuiController {
   @ApiOperation("导出凌云家庭上报明细")
   @GetMapping("/whepi/lun/exportRiBao")
   @SneakyThrows
-  public void lunExportRiBao(@Pd(name = "date") String date,
+  public void lunExportRiBao(@Pd(name = "date") String date,@Pd(name = "unitId") Long unitId,
                              HttpServletResponse resp) {
 
     Uptown uptown = uptownMapper.selectById("1238790987234");
@@ -263,7 +263,7 @@ public class YeWeiHuiController {
     String fileName = uptown.getUptownName();
     fileName += "上报信息-";
     fileName += date;
-    List<ExcelRiBaoLY> list = rbService.selectExcelRiBaoLY(upId, date);
+    List<ExcelRiBaoLY> list = rbService.selectExcelRiBaoLY(upId, date, unitId);
     ExcelUtils.writeSheet(ExcelRiBaoLY.class, list).export(resp, fileName);
 
   }

+ 24 - 0
whepi-web/src/main/resources/mapper/RbMapper.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.bofeng.dao.RbMapper">
+
+    <select id="selectExcelRiBaoLY" resultType="com.bofeng.entity.ExcelRiBaoLY">
+        select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,
+        msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,
+        msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,
+        mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult,tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other
+        from sys_uptown_house suh
+        inner join sys_uptown_home suho on suho.house_id=suh.house_id
+        INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId}
+        left join ms_report msr on msr.house_id = suh.house_id and msr.report_date = #{date}
+        left join ms_suspected mss on mss.report_id=msr.report_id
+        left join ms_trip tr on mss.suspected_id=trip_id
+        <where>
+            <if test="unitId!=null and uptownId!=''">
+                and suu.unit_id=#{unitId}
+            </if>
+        </where>
+        order by suu.unit_id asc,suho.linkman
+    </select>
+
+</mapper>