Quellcode durchsuchen

凌云集团更改公司

peiguo vor 5 Jahren
Ursprung
Commit
0003b28753

+ 57 - 2
admin-ui/app/whepi/scan/specialPersonnelLYS2.js

@@ -1,7 +1,7 @@
 define(function (require) {
         return function (context) {
 
-            var $grid1, $form;
+            var $grid1, $form, $coma;
 
             // 弹框的方式
             var widgets = {
@@ -15,6 +15,42 @@ define(function (require) {
                 },
             };
 
+            // 下拉选清空并重新赋值
+            function reloadValuea(_datas) {
+                if ($coma) {
+                    $coma.combobox('clear');// 清除当前的选项
+                    $coma.combobox('loadData', _datas);// 重新加载数据
+                }
+            }
+
+            // 获取联机下拉选二级信息
+            function getList(id) {
+                id = id == undefined ? 0 : id
+                var _datas = [];
+                _datas.push({
+                    "id": "",
+                    "text": "全部",
+                    "selected": true
+                });
+                $.yvan.ajax({
+                    url: api('/home/getDepartmentIdLYepi.json?unitId=' + id),
+                    method: 'GET',
+                    async: true,
+                    success: function (data) {
+                        if (data.data != null && data.data != undefined) {
+                            for (var i = 0; i < data.data.length; i++) {
+                                _datas.push({
+                                    "id": data.data[i].departmentId,
+                                    "text": data.data[i].departmentName
+                                })
+                            }
+                            reloadValuea(_datas);
+                        }
+                    }
+                });
+                return _datas;
+            }
+
             // 输入搜索文本后点击回车按钮查询列表
             function enterQueryGrid1(e) {
                 if (e.keyCode === 13) {
@@ -89,13 +125,31 @@ define(function (require) {
                         onChange: function (value) {
                             if (!isNotNullOrEmpty(value)) {
                                 $form.formSet({
-                                    unitId : ''
+                                    unitId : 0
                                 })
                             }
+                            getList($form.formGet().unitId);
                             queryGrid1();
                         },
                     },
                     {
+                        xtype: 'combobox',
+                        label: '二级部门',
+                        name: 'departmentId',
+                        labelWidth: 'auto',
+                        width: 280,
+                        value: '',
+                        data: getList(),
+                        onRender: function () {
+                            $coma = $(this);
+                        },
+                        onValue: function (data) {
+                        },
+                        onChange: function () {
+                            queryGrid1();
+                        }
+                    },
+                    {
                         xtype: 'textbox',
                         label: '电话',
                         name: 'phone',
@@ -212,6 +266,7 @@ define(function (require) {
                                         {field: 'tuId', title: '用户ID', hidden: true},
                                         {field: 'userId', title: '用户ID', hidden: true},
                                         {field: 'unit', title: '部门', maxWidth: 200, align: 'left',},
+                                        {field: 'departmentName', title: '二级部门', maxWidth: 200, align: 'left',},
                                         {field: 'name', title: '名字', maxWidth: 200, align: 'left',},
                                         {field: 'phone', title: '电话', maxWidth: 200, align: 'left',},
                                         {field: 'doorplate', title: '工号', maxWidth: 200, align: 'left',},

+ 57 - 2
admin-ui/app/whepi/scan/specialPersonnelLYSix.js

@@ -1,7 +1,7 @@
 define(function (require) {
         return function (context) {
 
-            var $grid1, $form;
+            var $grid1, $form, $coma;
 
             // 弹框的方式
             var widgets = {
@@ -15,6 +15,42 @@ define(function (require) {
                 },
             };
 
+            // 下拉选清空并重新赋值
+            function reloadValuea(_datas) {
+                if ($coma) {
+                    $coma.combobox('clear');// 清除当前的选项
+                    $coma.combobox('loadData', _datas);// 重新加载数据
+                }
+            }
+
+            // 获取联机下拉选二级信息
+            function getList(id) {
+                id = id == undefined ? 0 : id
+                var _datas = [];
+                _datas.push({
+                    "id": "",
+                    "text": "全部",
+                    "selected": true
+                });
+                $.yvan.ajax({
+                    url: api('/home/getDepartmentIdLYepi.json?unitId=' + id),
+                    method: 'GET',
+                    async: true,
+                    success: function (data) {
+                        if (data.data != null && data.data != undefined) {
+                            for (var i = 0; i < data.data.length; i++) {
+                                _datas.push({
+                                    "id": data.data[i].departmentId,
+                                    "text": data.data[i].departmentName
+                                })
+                            }
+                            reloadValuea(_datas);
+                        }
+                    }
+                });
+                return _datas;
+            }
+
             // 输入搜索文本后点击回车按钮查询列表
             function enterQueryGrid1(e) {
                 if (e.keyCode === 13) {
@@ -89,13 +125,31 @@ define(function (require) {
                         onChange: function (value) {
                             if (!isNotNullOrEmpty(value)) {
                                 $form.formSet({
-                                    unitId : ''
+                                    unitId : 0
                                 })
                             }
+                            getList($form.formGet().unitId);
                             queryGrid1();
                         },
                     },
                     {
+                        xtype: 'combobox',
+                        label: '二级部门',
+                        name: 'departmentId',
+                        labelWidth: 'auto',
+                        width: 280,
+                        value: '',
+                        data: getList(),
+                        onRender: function () {
+                            $coma = $(this);
+                        },
+                        onValue: function (data) {
+                        },
+                        onChange: function () {
+                            queryGrid1();
+                        }
+                    },
+                    {
                         xtype: 'textbox',
                         label: '电话',
                         name: 'phone',
@@ -194,6 +248,7 @@ define(function (require) {
                                         {field: 'tuId', title: '用户ID', hidden: true},
                                         {field: 'userId', title: '用户ID', hidden: true},
                                         {field: 'unit', title: '部门', maxWidth: 200, align: 'left',},
+                                        {field: 'departmentName', title: '二级部门', maxWidth: 200, align: 'left',},
                                         {field: 'name', title: '名字', maxWidth: 200, align: 'left',},
                                         {field: 'phone', title: '电话', maxWidth: 200, align: 'left',},
                                         {field: 'doorplate', title: '工号', maxWidth: 200, align: 'left',},

+ 57 - 2
admin-ui/app/whepi/scan/specialPersonnelLYSixS.js

@@ -1,7 +1,7 @@
 define(function (require) {
         return function (context) {
 
-            var $grid1, $form;
+            var $grid1, $form, $coma;
 
             // 弹框的方式
             var widgets = {
@@ -15,6 +15,42 @@ define(function (require) {
                 },
             };
 
+            // 下拉选清空并重新赋值
+            function reloadValuea(_datas) {
+                if ($coma) {
+                    $coma.combobox('clear');// 清除当前的选项
+                    $coma.combobox('loadData', _datas);// 重新加载数据
+                }
+            }
+
+            // 获取联机下拉选二级信息
+            function getList(id) {
+                id = id == undefined ? 0 : id
+                var _datas = [];
+                _datas.push({
+                    "id": "",
+                    "text": "全部",
+                    "selected": true
+                });
+                $.yvan.ajax({
+                    url: api('/home/getDepartmentIdLYepi.json?unitId=' + id),
+                    method: 'GET',
+                    async: true,
+                    success: function (data) {
+                        if (data.data != null && data.data != undefined) {
+                            for (var i = 0; i < data.data.length; i++) {
+                                _datas.push({
+                                    "id": data.data[i].departmentId,
+                                    "text": data.data[i].departmentName
+                                })
+                            }
+                            reloadValuea(_datas);
+                        }
+                    }
+                });
+                return _datas;
+            }
+
             // 输入搜索文本后点击回车按钮查询列表
             function enterQueryGrid1(e) {
                 if (e.keyCode === 13) {
@@ -89,13 +125,31 @@ define(function (require) {
                         onChange: function (value) {
                             if (!isNotNullOrEmpty(value)) {
                                 $form.formSet({
-                                    unitId : ''
+                                    unitId : 0
                                 })
                             }
+                            getList($form.formGet().unitId);
                             queryGrid1();
                         },
                     },
                     {
+                        xtype: 'combobox',
+                        label: '二级部门',
+                        name: 'departmentId',
+                        labelWidth: 'auto',
+                        width: 280,
+                        value: '',
+                        data: getList(),
+                        onRender: function () {
+                            $coma = $(this);
+                        },
+                        onValue: function (data) {
+                        },
+                        onChange: function () {
+                            queryGrid1();
+                        }
+                    },
+                    {
                         xtype: 'textbox',
                         label: '电话',
                         name: 'phone',
@@ -194,6 +248,7 @@ define(function (require) {
                                         {field: 'tuId', title: '用户ID', hidden: true},
                                         {field: 'userId', title: '用户ID', hidden: true},
                                         {field: 'unit', title: '部门', maxWidth: 200, align: 'left',},
+                                        {field: 'departmentName', title: '二级部门', maxWidth: 200, align: 'left',},
                                         {field: 'name', title: '名字', maxWidth: 200, align: 'left',},
                                         {field: 'phone', title: '电话', maxWidth: 200, align: 'left',},
                                         {field: 'doorplate', title: '工号', maxWidth: 200, align: 'left',},

+ 3 - 0
whepi-web/src/main/java/com/bofeng/entity/OutUser.java

@@ -86,4 +86,7 @@ public class OutUser {
 
     @TableField(exist = false)
     private String updateName;
+
+    @TableField(exist = false)
+    private String departmentName;
 }

+ 6 - 1
whepi-web/src/main/resources/mapper/OutUserMapper.xml

@@ -35,7 +35,8 @@
 
     <select id="getAllOutUserLY" resultType="com.bofeng.entity.OutUser">
         select u.time_update as timeUpdate,u.tu_id,ur.user_id as userId,su.uptown_name as uptownName,CONCAT(uu.ridgepole,uu.unit) as unit,u.name,u.phone,suh.doorplate,
-        DATE_FORMAT(u.start_date,'%Y-%m-%d') as startDateStr,DATE_FORMAT(u.end_date,'%Y-%m-%d') as endDateStr,sur.staff_name as createName,sur1.staff_name as updateName
+        DATE_FORMAT(u.start_date,'%Y-%m-%d') as startDateStr,DATE_FORMAT(u.end_date,'%Y-%m-%d') as endDateStr,sur.staff_name as createName,
+        sur1.staff_name as updateName,de.department_name as departmentName
         from out_user u
         left join sys_uptown_home uh on uh.phone = u.phone and uh.linkman = u.name
         left join sys_user_role ur on ur.property_id = uh.house_id and ur.role_id = 1
@@ -44,6 +45,7 @@
         left join sys_uptown su on su.uptown_id = uu.uptown_id
         left join sys_user sur on sur.user_id = u.user_create
         left join sys_user sur1 on sur1.user_id = u.user_update
+        left join sys_department de on de.department_id = suh.department_id
         <where>
             <if test="queryProperties != null and queryProperties != ''">
                 (
@@ -60,6 +62,9 @@
             <if test="unitId != null and unitId !=''">
                 and uu.unit_id = #{unitId}
             </if>
+            <if test="departmentId != null and departmentId !=''">
+                and suh.department_id = #{departmentId}
+            </if>
         </where>
         order by u.time_update desc
     </select>