瀏覽代碼

1. 处理组织管理没有上级菜单
2. 处理车位界面显示问题

离歌笑 6 年之前
父節點
當前提交
dc649a491b

+ 1 - 1
CommentService/src/main/resources/application.yml

@@ -1,3 +1,3 @@
 spring:
   profiles:
-    active: test
+    active: dev

+ 9 - 20
WebService/src/main/resources/components/parkingSpacePackage/list-parking-space/listParkingSpace.html

@@ -11,7 +11,7 @@
                         </button>
                     </div>
                 </div>
-                <div class="ibox-content">
+                <div class="ibox-content" v-if="listParkingSpaceInfo.moreCondition">
                     <div class="row">
                         <div class="col-sm-4">
                             <div class="form-group">
@@ -33,13 +33,19 @@
                                        v-model="listParkingSpaceInfo.conditions.area">
                             </div>
                         </div>
+                    </div>
+                    <div class="row">
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <input type="text" placeholder="请填写车位编号" class=" form-control" v-model="listParkingSpaceInfo.num">
+                            </div>
+                        </div>
                         <div class="col-sm-1">
                             <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryRoomMethod()"><i
                                     class="glyphicon glyphicon-search"></i> 查询
                             </button>
                         </div>
                     </div>
-
                 </div>
             </div>
         </div>
@@ -54,14 +60,6 @@
 
                         <form>
                             <div class="form-row">
-                                <div class="col-8 input-group input-group-sm">
-                                    <input type="text" placeholder="请填写车位编号" class=" form-control" v-model="listParkingSpaceInfo.num">
-                                    <div class="input-group-prepend">
-                                        <button type="button" class="btn btn-primary btn-sm"  v-on:click="queryParkingSpaceMethod()">
-                                            <i class="glyphicon glyphicon-search"></i> 马上查询</button>
-                                    </div>
-                                </div>
-
                                 <div class="col">
                                     <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddParkingSpaceModal(-1)">
                                         <i class="glyphicon glyphicon-plus"></i>
@@ -84,10 +82,7 @@
                             <th data-hide="phone">车位类型</th>
                             <th data-hide="phone">车位状态</th>
                             <th data-hide="phone">面积</th>
-                            <th data-hide="phone">创建员工</th>
-                            <th data-hide="phone">备注</th>
                             <th class="text-right">操作</th>
-
                         </tr>
                         </thead>
                         <tbody>
@@ -100,7 +95,7 @@
                                 {{parkingSpace.num}}
                             </td>
                             <td>
-                                {{parkingSpace.typeCd == '1001'?'地上停车位':'地下停车位'}}
+                                {{vc.component._viewParkingTypeCd(parkingSpace.typeCd)}}
                             </td>
                             <td>
                                 {{vc.component._viewParkingSpaceState(parkingSpace.state)}}
@@ -108,12 +103,6 @@
                             <td>
                                 {{parkingSpace.area}}
                             </td>
-                            <td>
-                                {{parkingSpace.userName}}
-                            </td>
-                            <td>
-                                {{parkingSpace.remark}}
-                            </td>
                             <td class="text-right">
                                 <div class="btn-group">
                                     <button class="btn-white btn btn-xs" v-on:click="_openEditParkingSpaceModel(parkingSpace)">修改</button>

+ 77 - 60
WebService/src/main/resources/components/parkingSpacePackage/list-parking-space/listParkingSpace.js

@@ -1,92 +1,109 @@
-(function(vc){
+(function (vc) {
     var DEFAULT_PAGE = 1;
     var DEFAULT_ROWS = 10;
     vc.extends({
-        data:{
-            listParkingSpaceInfo:{
-                parkingSpaces:[],
-                total:0,
-                records:1,
-                num:'',
-                conditions:{
-                    psId:'',
-                    area:'',
-                    typeCd:''
+        data: {
+            listParkingSpaceInfo: {
+                parkingSpaces: [],
+                total: 0,
+                records: 1,
+                num: '',
+                moreCondition: false,
+                conditions: {
+                    psId: '',
+                    area: '',
+                    typeCd: ''
                 }
             }
         },
-        _initMethod:function(){
-            vc.component._listParkingSpaceData(DEFAULT_PAGE,DEFAULT_ROWS);
+        _initMethod: function () {
+            vc.component._listParkingSpaceData(DEFAULT_PAGE, DEFAULT_ROWS);
         },
-        _initEvent:function(){
-            vc.on('listParkingSpace','listParkingSpaceData',function(){
-                vc.component._listParkingSpaceData(DEFAULT_PAGE,DEFAULT_ROWS);
+        _initEvent: function () {
+            vc.on('listParkingSpace', 'listParkingSpaceData', function () {
+                vc.component._listParkingSpaceData(DEFAULT_PAGE, DEFAULT_ROWS);
                 vc.component.listParkingSpaceInfo.num = '';
             });
-            vc.on('pagination','page_event',function(_currentPage){
-                vc.component._listParkingSpaceData(_currentPage,DEFAULT_ROWS);
+            vc.on('pagination', 'page_event', function (_currentPage) {
+                vc.component._listParkingSpaceData(_currentPage, DEFAULT_ROWS);
             });
         },
-        methods:{
-            _listParkingSpaceData:function(_page,_row){
+        methods: {
+            _listParkingSpaceData: function (_page, _row) {
                 var param = {
-                    params:{
-                        page:_page,
-                        row:_row,
-                        communityId:vc.getCurrentCommunity().communityId,
-                        num:vc.component.listParkingSpaceInfo.num,
-                        psId:vc.component.listParkingSpaceInfo.conditions.psId,
-                        area:vc.component.listParkingSpaceInfo.conditions.area,
-                        typeCd:vc.component.listParkingSpaceInfo.conditions.typeCd
+                    params: {
+                        page: _page,
+                        row: _row,
+                        communityId: vc.getCurrentCommunity().communityId,
+                        num: vc.component.listParkingSpaceInfo.num,
+                        psId: vc.component.listParkingSpaceInfo.conditions.psId,
+                        area: vc.component.listParkingSpaceInfo.conditions.area,
+                        typeCd: vc.component.listParkingSpaceInfo.conditions.typeCd
                     }
                 }
 
-               //发送get请求
-               vc.http.get('listParkingSpace',
-                            'list',
-                             param,
-                             function(json,res){
-                                var listParkingSpaceData =JSON.parse(json);
+                //发送get请求
+                vc.http.get('listParkingSpace',
+                    'list',
+                    param,
+                    function (json, res) {
+                        var listParkingSpaceData = JSON.parse(json);
 
-                                vc.component.listParkingSpaceInfo.total = listParkingSpaceData.total;
-                                vc.component.listParkingSpaceInfo.records = listParkingSpaceData.records;
-                                vc.component.listParkingSpaceInfo.parkingSpaces = listParkingSpaceData.parkingSpaces;
+                        vc.component.listParkingSpaceInfo.total = listParkingSpaceData.total;
+                        vc.component.listParkingSpaceInfo.records = listParkingSpaceData.records;
+                        vc.component.listParkingSpaceInfo.parkingSpaces = listParkingSpaceData.parkingSpaces;
 
-                                vc.emit('pagination','init',{
-                                    total:vc.component.listParkingSpaceInfo.records,
-                                    currentPage:_page
-                                });
-                             },function(errInfo,error){
-                                console.log('请求失败处理');
-                             }
-                           );
+                        vc.emit('pagination', 'init', {
+                            total: vc.component.listParkingSpaceInfo.records,
+                            currentPage: _page
+                        });
+                    }, function (errInfo, error) {
+                        console.log('请求失败处理');
+                    }
+                );
 
             },
-            _openAddParkingSpaceModal:function(){ //打开添加框
-                vc.emit('addParkingSpace','openAddParkingSpaceModal',-1);
+            _openAddParkingSpaceModal: function () { //打开添加框
+                vc.emit('addParkingSpace', 'openAddParkingSpaceModal', -1);
             },
-            _openDelParkingSpaceModel:function(_parkingSpace){ // 打开删除对话框
-                vc.emit('deleteParkingSpace','openParkingSpaceModel',_parkingSpace);
+            _openDelParkingSpaceModel: function (_parkingSpace) { // 打开删除对话框
+                vc.emit('deleteParkingSpace', 'openParkingSpaceModel', _parkingSpace);
             },
-            _openEditParkingSpaceModel:function(_parkingSpace){
-                vc.emit('editParkingSpace','openEditParkingSpaceModal',_parkingSpace);
+            _openEditParkingSpaceModel: function (_parkingSpace) {
+                vc.emit('editParkingSpace', 'openEditParkingSpaceModal', _parkingSpace);
             },
-            _viewParkingSpaceState:function(state){
-                if(state == 'F'){
+            _viewParkingSpaceState: function (state) {
+                if (state == 'F') {
                     return "空闲";
-                }else if(state == 'S'){
+                } else if (state == 'S') {
                     return "已售卖";
-                }else if(state == 'H'){
+                } else if (state == 'H') {
                     return "已出租";
-                }else{
+                } else {
                     return "未知";
                 }
             },
-            _queryRoomMethod:function(){
-                vc.component._listParkingSpaceData(DEFAULT_PAGE,DEFAULT_ROWS);
+            _viewParkingTypeCd: function (typeCd) {
+                var result = '未知';
+                switch (typeCd) {
+                    case '1001':
+                        result = '地上停车位';
+                        break;
+                    case '2001':
+                        result = '地下停车位';
+                        break;
+                }
+                return result;
+            },
+            _queryRoomMethod: function () {
+                vc.component._listParkingSpaceData(DEFAULT_PAGE, DEFAULT_ROWS);
             },
-            queryParkingSpaceMethod:function(){
-                vc.component._listParkingSpaceData(DEFAULT_PAGE,DEFAULT_ROWS);
+            _moreCondition: function () {
+                if (vc.component.listParkingSpaceInfo.moreCondition) {
+                    vc.component.listParkingSpaceInfo.moreCondition = false;
+                } else {
+                    vc.component.listParkingSpaceInfo.moreCondition = true;
+                }
             }
         }
     })

+ 67 - 51
java110-db/src/main/resources/mapper/community/ParkingSpaceServiceDaoImplMapper.xml

@@ -95,57 +95,73 @@
 
     <!-- 查询停车位信息 add by wuxw 2018-07-03 -->
     <select id="getParkingSpaceInfo" parameterType="Map" resultType="Map">
-        select t.area,t1.name type_cd,t1.name typeCd,t.num,t.ps_id,t.ps_id psId,t.remark,t.status_cd,t.status_cd
-        statusCd,t2.name state,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.user_id,t.user_id userId
-        from p_parking_space t,t_dict t1,t_dict t2 where t.type_cd=t1.status_cd and t1.table_name='p_parking_space'
-        and t.state = t2.status_cd and t2.table_name='p_parking_space'
-        <if test="area !=null and area != ''">
-            and t.area= #{area}
-        </if>
-        <if test="typeCd !=null and typeCd != ''">
-            and t.type_cd= #{typeCd}
-        </if>
-        <if test="num !=null and num != ''">
-            and t.num= #{num}
-        </if>
-        <if test="psId !=null and psId != ''">
-            and t.ps_id= #{psId}
-        </if>
-        <if test="remark !=null and remark != ''">
-            and t.remark= #{remark}
-        </if>
-        <if test="statusCd !=null and statusCd != ''">
-            and t.status_cd= #{statusCd}
-        </if>
-        <if test="state !=null and state != ''">
-            and t.state= #{state}
-        </if>
-        <if test="states != null and states != null">
-            and t.state in
-            <foreach collection="states" item="item" open="(" close=")" separator=",">
-                #{item}
-            </foreach>
-        </if>
-        <if test="psIds != null and psIds != null">
-            and t.ps_id in
-            <foreach collection="psIds" item="item" open="(" close=")" separator=",">
-                #{item}
-            </foreach>
-        </if>
-        <if test="communityId !=null and communityId != ''">
-            and t.community_id= #{communityId}
-        </if>
-        <if test="bId !=null and bId != ''">
-            and t.b_id= #{bId}
-        </if>
-        <if test="userId !=null and userId != ''">
-            and t.user_id= #{userId}
-        </if>
-
-        <if test="page != -1 and page != null ">
-            limit #{page}, #{row}
-        </if>
-
+        SELECT
+            t.area,
+            t.`type_cd` typeCd,
+            t.`type_cd`,
+            t.num,
+            t.ps_id psId,
+            t.ps_id,
+            t.remark,
+            t.status_cd statusCd,
+            t.status_cd,
+            t.`state`,
+            t.community_id,
+            t.community_id communityId,
+            t.b_id,
+            t.b_id bId,
+            t.user_id,
+            t.user_id userId
+        FROM
+          p_parking_space t
+        <where>
+            <if test="area !=null and area != ''">
+                and t.area= #{area}
+            </if>
+            <if test="typeCd !=null and typeCd != ''">
+                and t.type_cd= #{typeCd}
+            </if>
+            <if test="num !=null and num != ''">
+                and t.num= #{num}
+            </if>
+            <if test="psId !=null and psId != ''">
+                and t.ps_id= #{psId}
+            </if>
+            <if test="remark !=null and remark != ''">
+                and t.remark= #{remark}
+            </if>
+            <if test="statusCd !=null and statusCd != ''">
+                and t.status_cd= #{statusCd}
+            </if>
+            <if test="state !=null and state != ''">
+                and t.state= #{state}
+            </if>
+            <if test="states != null and states != null">
+                and t.state in
+                <foreach collection="states" item="item" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="psIds != null and psIds != null">
+                and t.ps_id in
+                <foreach collection="psIds" item="item" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="communityId !=null and communityId != ''">
+                and t.community_id= #{communityId}
+            </if>
+            <if test="bId !=null and bId != ''">
+                and t.b_id= #{bId}
+            </if>
+            <if test="userId !=null and userId != ''">
+                and t.user_id= #{userId}
+            </if>
+
+            <if test="page != -1 and page != null ">
+                limit #{page}, #{row}
+            </if>
+        </where>
     </select>
 
 

+ 5 - 7
java110-db/src/main/resources/mapper/user/OrgServiceDaoImplMapper.xml

@@ -85,14 +85,13 @@
     <select id="getOrgInfo" parameterType="Map" resultType="Map">
         select t.org_name,t.org_name orgName,t.parent_org_id,t.parent_org_id
         parentOrgId,t.description,t.org_level,t.org_level orgLevel,td.name orgLevelName,t.status_cd,t.status_cd
-        statusCd,t.store_id,t.store_id storeId,t.b_id,t.b_id bId,t.org_id,t.org_id orgId,uo.org_name parentOrgName
-        from u_org t,t_dict td,u_org uo
+        statusCd,t.store_id,t.store_id storeId,t.b_id,t.b_id bId,t.org_id,t.org_id orgId
+        from u_org t,t_dict td
         where 1 =1
         and t.org_level = td.status_cd
         and td.table_name='u_org'
         and td.table_columns = 'org_level'
-        and t.parent_org_id = uo.org_id
-        and uo.status_cd = '0'
+        and t.status_cd = '0'
         <if test="orgName !=null and orgName != ''">
             and t.org_name= #{orgName}
         </if>
@@ -158,13 +157,12 @@
     <!-- 查询组织数量 add by wuxw 2018-07-03 -->
     <select id="queryOrgsCount" parameterType="Map" resultType="Map">
         select count(1) count
-            from u_org t,t_dict td,u_org uo
+            from u_org t,t_dict td
         where 1 =1
             and t.org_level = td.status_cd
             and td.table_name='u_org'
             and td.table_columns = 'org_level'
-            and t.parent_org_id = uo.org_id
-            and uo.status_cd = '0'
+            and t.status_cd = '0'
         <if test="orgName !=null and orgName != ''">
             and t.org_name= #{orgName}
         </if>