wuxw пре 7 година
родитељ
комит
97b0605db2

+ 1 - 0
Api/src/main/java/com/java110/api/listener/owner/QueryOwnersListener.java

@@ -76,6 +76,7 @@ public class QueryOwnersListener extends AbstractServiceApiDataFlowListener {
 
         apiOwnerVo.setRecords((int) Math.ceil((double) total / (double) row));
 
+
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiOwnerVo), HttpStatus.OK);
         dataFlowContext.setResponseEntity(responseEntity);
     }

+ 4 - 4
WebService/src/main/java/com/java110/web/smo/addOwner/impl/AddOwnerBindingSMOImpl.java

@@ -39,9 +39,9 @@ public class AddOwnerBindingSMOImpl extends AbstractComponentSMO implements IAdd
 
         Assert.hasKeyByFlowData(infos, "viewFloorInfo", "floorId", "必填,未选择楼栋");
         Assert.hasKeyByFlowData(infos, "sellRoomSelectRoom", "roomId", "必填,未选择房屋");
-        Assert.hasKeyByFlowData(infos, "addOwnerBinding", "name", "必填,名称不能为空");
-        Assert.hasKeyByFlowData(infos, "addOwnerBinding", "sex", "必填,请选择性别");
-        Assert.hasKeyByFlowData(infos, "addOwnerBinding", "age", "必填,请填写年龄");
+        Assert.hasKeyByFlowData(infos, "addOwnerView", "name", "必填,名称不能为空");
+        Assert.hasKeyByFlowData(infos, "addOwnerView", "sex", "必填,请选择性别");
+        Assert.hasKeyByFlowData(infos, "addOwnerView", "age", "必填,请填写年龄");
 
 
         super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.ADD_OWNER);
@@ -56,7 +56,7 @@ public class AddOwnerBindingSMOImpl extends AbstractComponentSMO implements IAdd
         JSONArray infos = paramIn.getJSONArray("data");
         //JSONObject viewFloorInfo = getObj(infos, "viewFloorInfo");
         JSONObject sellRoomSelectRoom = getObj(infos, "sellRoomSelectRoom");
-        JSONObject addOwner = getObj(infos, "addOwner");
+        JSONObject addOwner = getObj(infos, "addOwnerView");
 
         String communityId = paramIn.getString("communityId");
         addOwner.put("ownerTypeCd", "1001");

+ 2 - 2
WebService/src/main/resources/components/ownerPackage/addOwnerView/addOwnerView.html

@@ -20,8 +20,8 @@
                     <div class="col-sm-10">
                         <select class="custom-select" v-model="addOwnerViewInfo.sex">
                             <option selected disabled value="">必填,请选择性别</option>
-                            <option value="1">男</option>
-                            <option value="0">女</option>
+                            <option value="0">男</option>
+                            <option value="1">女</option>
                         </select></div>
                 </div>
                 <div class="form-group row">

+ 45 - 0
WebService/src/main/resources/components/ownerPackage/list-owner/listOwner.html

@@ -1,4 +1,49 @@
 <div id="component">
+    <div class="row">
+        <div class="col-lg-12">
+            <div class="ibox ">
+                <div class="ibox-title">
+                    <h5>查询条件</h5>
+                    <div class="ibox-tools" style="top:10px;">
+                        <!-- <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
+                                 v-on:click="_moreCondition()">更多
+                         </button>-->
+                    </div>
+                </div>
+                <div class="ibox-content">
+                    <div class="row">
+
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <input type="text" placeholder="请输入业主ID"
+                                       v-model="listOwnerInfo.conditions.ownerId" class=" form-control">
+                            </div>
+                        </div>
+                        <div class="col-sm-3">
+                            <div class="form-group">
+                                <input type="text" placeholder="请输入业主名称"
+                                       v-model="listOwnerInfo.conditions.name" class=" form-control">
+                            </div>
+                        </div>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <input type="number" placeholder="请输入联系方式"
+                                       v-model="listOwnerInfo.conditions.link" class=" form-control">
+                            </div>
+                        </div>
+                        <div class="col-sm-1">
+                            <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryOwnerMethod()"><i
+                                    class="glyphicon glyphicon-search" ></i> 查询
+                            </button>
+                        </div>
+
+                    </div>
+
+
+                </div>
+            </div>
+        </div>
+    </div>
     <div class="row">
         <div class="col-lg-12">
             <div class="ibox">

+ 15 - 7
WebService/src/main/resources/components/ownerPackage/list-owner/listOwner.js

@@ -6,7 +6,13 @@
             listOwnerInfo:{
                 owners:[],
                 total:0,
-                records:1
+                records:1,
+                conditions:{
+                    ownerTypeCd:'1001',
+                    ownerId:'',
+                    name:'',
+                    link:''
+                }
             }
         },
         _initMethod:function(){
@@ -22,13 +28,12 @@
         },
         methods:{
             _listOwnerData:function(_page,_row){
+
+                vc.component.listOwnerInfo.conditions.page= _page;
+                vc.component.listOwnerInfo.conditions.row= _row;
+                vc.component.listOwnerInfo.conditions.communityId= vc.getCurrentCommunity().communityId;
                 var param = {
-                    params:{
-                        page:_page,
-                        row:_row,
-                        communityId:vc.getCurrentCommunity().communityId,
-                        ownerTypeCd:'1001'
-                    }
+                    params:vc.component.listOwnerInfo.conditions
                 }
 
                //发送get请求
@@ -61,6 +66,9 @@
             },
             _openEditOwnerModel:function(_owner){
                 vc.emit('editOwner','openEditOwnerModal',_owner);
+            },
+            _queryOwnerMethod:function(){
+                vc.component._listOwnerData(DEFAULT_PAGE,DEFAULT_ROWS);
             }
         }
     })

+ 14 - 5
WebService/src/main/resources/components/ownerPackage/search-owner/searchOwner.html

@@ -1,4 +1,5 @@
-<div id = "searchOwnerModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="searchOwnerModelLabel" aria-hidden="true" >
+<div id="searchOwnerModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="searchOwnerModelLabel"
+     aria-hidden="true">
     <div class="modal-dialog modal-lg">
         <div class="modal-content">
             <div class="modal-header">
@@ -14,13 +15,20 @@
                             <div class="row">
 
                                 <div class="col-sm-7 m-b-xs">
-
+                                    <div class="input-group">
+                                        <input placeholder="输入业主ID" type="text"
+                                               v-model="searchOwnerInfo._currentOwnerId"
+                                               class="form-control form-control-sm">
+                                    </div>
                                 </div>
                                 <div class="col-sm-5">
                                     <div class="input-group">
-                                        <input placeholder="输入业主名称" type="text" v-model="searchOwnerInfo._currentOwnerName" class="form-control form-control-sm">
+                                        <input placeholder="输入业主名称" type="text"
+                                               v-model="searchOwnerInfo._currentOwnerName"
+                                               class="form-control form-control-sm">
                                         <span class="input-group-append">
-                                                <button type="button" class="btn btn-sm btn-primary" v-on:click="searchOwners()">查询</button>
+                                                <button type="button" class="btn btn-sm btn-primary"
+                                                        v-on:click="searchOwners()">查询</button>
                                             </span>
                                     </div>
                                 </div>
@@ -64,7 +72,8 @@
                                             {{owner.remark}}
                                         </td>
                                         <td>
-                                            <button class="btn btn-primary btn-xs" v-on:click="chooseOwner(owner)">选择</button>
+                                            <button class="btn btn-primary btn-xs" v-on:click="chooseOwner(owner)">选择
+                                            </button>
                                         </td>
                                     </tr>
                                     </tbody>

+ 2 - 0
WebService/src/main/resources/components/ownerPackage/search-owner/searchOwner.js

@@ -8,6 +8,7 @@
             searchOwnerInfo:{
                 owners:[],
                 _currentOwnerName:'',
+                _currentOwnerId:''
             }
         },
         _initMethod:function(){
@@ -29,6 +30,7 @@
                         row:_row,
                         communityId:vc.getCurrentCommunity().communityId,
                         name:_name,
+                        ownerId:vc.component.searchOwnerInfo._currentOwnerId
                         ownerTypeCd:'1001'
                     }
                 };

+ 2 - 2
WebService/src/main/resources/components/roomPackage/sell-room-select-room/sellRoomSelectRoom.js

@@ -27,8 +27,8 @@
         },
         _initEvent:function(){
             vc.on('sellRoomSelectRoom','chooseRoom',function(_room){
-                vc.component.roomInfo = _room;
-                vc.emit($props.callBackListener,$props.callBackFunction,_room);
+                vc.copyObject(_room, vc.component.roomInfo);
+                vc.emit($props.callBackListener,$props.callBackFunction,vc.component.roomInfo);
             });
 
         },

+ 1 - 1
WebService/src/main/resources/views/ownerFlow.html

@@ -5,7 +5,7 @@
       xmlns:vc="http://www.thymeleaf.org">
 <head>
     <meta charset="UTF-8"/>
-    <title>添加业主|java110</title>
+    <title>业主信息|java110</title>
     <vc:create name="commonTop"></vc:create>
 </head>
 <body>

+ 4 - 4
java110-common/src/main/java/com/java110/common/constant/BusinessTypeConstant.java

@@ -62,7 +62,7 @@ public class BusinessTypeConstant {
      */
     public static final String BUSINESS_TYPE_SAVE_OWNER_INFO = "110100030001";
 
-    /**
+    /**tia
      * 修改业主
      */
     public static final String BUSINESS_TYPE_UPDATE_OWNER_INFO = "110100040001";
@@ -436,14 +436,14 @@ public class BusinessTypeConstant {
      * 保存访客信息
      * 11开头  3保存
      */
-    public static final String BUSINESS_TYPE_SAVE_VISIT="110100030001";
+    public static final String BUSINESS_TYPE_SAVE_VISIT="120100030001";
     /**
      *  修改访客信息  11开头  4修改
      */
-    public static final String BUSINESS_TYPE_UPDATE_VISIT="110100040001";
+    public static final String BUSINESS_TYPE_UPDATE_VISIT="120100040001";
     /**
      *  删除访客信息  11开头  5修改
      */
-    public static final String BUSINESS_TYPE_DELETE_VISIT ="110100050001";
+    public static final String BUSINESS_TYPE_DELETE_VISIT ="120100050001";
 
 }

+ 241 - 242
java110-db/src/main/resources/mapper/owner/OwnerServiceDaoImplMapper.xml

@@ -5,95 +5,92 @@
 <mapper namespace="ownerServiceDaoImpl">
 
     <!-- 保存业主信息 add by wuxw 2018-07-03 -->
-       <insert id="saveBusinessOwnerInfo" parameterType="Map">
-           insert into business_building_owner(
-operate,sex,name,link,remark,owner_id,b_id,user_id,age,member_id,owner_type_cd
-) values (
-#{operate},#{sex},#{name},#{link},#{remark},#{ownerId},#{bId},#{userId},#{age},#{memberId},#{ownerTypeCd}
-)
-       </insert>
-
-
-       <!-- 查询业主信息(Business) add by wuxw 2018-07-03 -->
-       <select id="getBusinessOwnerInfo" parameterType="Map" resultType="Map">
-           select  t.operate,t.sex,t.name,t.link,t.remark,t.owner_id,t.owner_id ownerId,t.b_id,t.b_id bId,
-           t.user_id,t.user_id userId,t.age,t.member_id,t.member_id memberId,t.owner_type_cd,t.owner_type_cd ownerTypeCd
-from business_building_owner t 
-where 1 =1 
-<if test="operate !=null and operate != ''">
-   and t.operate= #{operate}
-</if> 
-<if test="sex !=null ">
-   and t.sex= #{sex}
-</if> 
-<if test="name !=null and name != ''">
-   and t.name= #{name}
-</if> 
-<if test="link !=null and link != ''">
-   and t.link= #{link}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="ownerId !=null and ownerId != ''">
-   and t.owner_id= #{ownerId}
-</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="age !=null and age != ''">
-   and t.age= #{age}
-</if> 
-<if test="memberId !=null and memberId != ''">
-   and t.member_id= #{memberId}
-</if>
-           <if test="ownerTypeCd !=null and ownerTypeCd != ''">
-   and t.owner_type_cd= #{ownerTypeCd}
-</if>
-
-       </select>
+    <insert id="saveBusinessOwnerInfo" parameterType="Map">
+        insert into business_building_owner(
+        operate,sex,name,link,remark,owner_id,b_id,user_id,age,member_id,owner_type_cd
+        ) values (
+        #{operate},#{sex},#{name},#{link},#{remark},#{ownerId},#{bId},#{userId},#{age},#{memberId},#{ownerTypeCd}
+        )
+    </insert>
 
 
+    <!-- 查询业主信息(Business) add by wuxw 2018-07-03 -->
+    <select id="getBusinessOwnerInfo" parameterType="Map" resultType="Map">
+        select t.operate,t.sex,t.name,t.link,t.remark,t.owner_id,t.owner_id ownerId,t.b_id,t.b_id bId,
+        t.user_id,t.user_id userId,t.age,t.member_id,t.member_id memberId,t.owner_type_cd,t.owner_type_cd ownerTypeCd
+        from business_building_owner t
+        where 1 =1
+        <if test="operate !=null and operate != ''">
+            and t.operate= #{operate}
+        </if>
+        <if test="sex !=null ">
+            and t.sex= #{sex}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name = #{name}
+        </if>
+        <if test="link !=null and link != ''">
+            and t.link= #{link}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="ownerId !=null and ownerId != ''">
+            and t.owner_id= #{ownerId}
+        </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="age !=null and age != ''">
+            and t.age= #{age}
+        </if>
+        <if test="memberId !=null and memberId != ''">
+            and t.member_id= #{memberId}
+        </if>
+        <if test="ownerTypeCd !=null and ownerTypeCd != ''">
+            and t.owner_type_cd= #{ownerTypeCd}
+        </if>
 
+    </select>
 
 
     <!-- 保存业主信息至 instance表中 add by wuxw 2018-07-03 -->
     <insert id="saveOwnerInfoInstance" parameterType="Map">
         insert into building_owner(
-sex,name,link,status_cd,remark,owner_id,b_id,user_id,age,member_id,owner_type_cd
-) select t.sex,t.name,t.link,'0',t.remark,t.owner_id,t.b_id,t.user_id,t.age,t.member_id,t.owner_type_cd
+        sex,name,link,status_cd,remark,owner_id,b_id,user_id,age,member_id,owner_type_cd
+        ) select t.sex,t.name,t.link,'0',t.remark,t.owner_id,t.b_id,t.user_id,t.age,t.member_id,t.owner_type_cd
         from business_building_owner t where 1=1
-   and t.operate= 'ADD'
-<if test="sex !=null">
-   and t.sex= #{sex}
-</if> 
-<if test="name !=null and name != ''">
-   and t.name= #{name}
-</if> 
-<if test="link !=null and link != ''">
-   and t.link= #{link}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="ownerId !=null and ownerId != ''">
-   and t.owner_id= #{ownerId}
-</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="age !=null and age != ''">
-   and t.age= #{age}
-</if> 
-<if test="memberId !=null and memberId != ''">
-   and t.member_id= #{memberId}
-</if>
+        and t.operate= 'ADD'
+        <if test="sex !=null">
+            and t.sex= #{sex}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="link !=null and link != ''">
+            and t.link= #{link}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="ownerId !=null and ownerId != ''">
+            and t.owner_id= #{ownerId}
+        </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="age !=null and age != ''">
+            and t.age= #{age}
+        </if>
+        <if test="memberId !=null and memberId != ''">
+            and t.member_id= #{memberId}
+        </if>
         <if test="ownerTypeCd !=null and ownerTypeCd != ''">
             and t.owner_type_cd= #{ownerTypeCd}
         </if>
@@ -101,44 +98,43 @@ sex,name,link,status_cd,remark,owner_id,b_id,user_id,age,member_id,owner_type_cd
     </insert>
 
 
-
     <!-- 查询业主信息 add by wuxw 2018-07-03 -->
     <select id="getOwnerInfo" parameterType="Map" resultType="Map">
-        select  t.sex,t.name,t.link,t.status_cd,t.status_cd statusCd,t.remark,
+        select t.sex,t.name,t.link,t.status_cd,t.status_cd statusCd,t.remark,
         t.owner_id,t.owner_id ownerId,t.b_id,t.b_id bId,
         t.user_id,t.user_id userId,t.age,t.member_id,t.member_id memberId,t.owner_type_cd,t.owner_type_cd ownerTypeCd
-from building_owner t 
-where 1 =1 
-<if test="sex !=null">
-   and t.sex= #{sex}
-</if> 
-<if test="name !=null and name != ''">
-   and t.name= #{name}
-</if> 
-<if test="link !=null and link != ''">
-   and t.link= #{link}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="ownerId !=null and ownerId != ''">
-   and t.owner_id= #{ownerId}
-</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="age !=null and age != ''">
-   and t.age= #{age}
-</if> 
-<if test="memberId !=null and memberId != ''">
-   and t.member_id= #{memberId}
-</if>
+        from building_owner t
+        where 1 =1
+        <if test="sex !=null">
+            and t.sex= #{sex}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name like concat('%',#{name},'%')
+        </if>
+        <if test="link !=null and link != ''">
+            and t.link= #{link}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="ownerId !=null and ownerId != ''">
+            and t.owner_id= #{ownerId}
+        </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="age !=null and age != ''">
+            and t.age= #{age}
+        </if>
+        <if test="memberId !=null and memberId != ''">
+            and t.member_id= #{memberId}
+        </if>
         <if test="ownerIds != null and ownerIds != ''">
             and t.owner_id in
             <foreach collection="ownerIds" item="item" open="(" close=")" separator=",">
@@ -148,96 +144,96 @@ where 1 =1
         <if test="ownerTypeCd !=null and ownerTypeCd != ''">
             and t.owner_type_cd= #{ownerTypeCd}
         </if>
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改业主信息 add by wuxw 2018-07-03 -->
     <update id="updateOwnerInfoInstance" parameterType="Map">
-        update  building_owner t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="sex !=null ">
-, t.sex= #{sex}
-</if> 
-<if test="name !=null and name != ''">
-, t.name= #{name}
-</if> 
-<if test="link !=null and link != ''">
-, t.link= #{link}
-</if> 
-<if test="remark !=null and remark != ''">
-, t.remark= #{remark}
-</if> 
-<if test="ownerId !=null and ownerId != ''">
-, t.owner_id= #{ownerId}
-</if> 
-<if test="userId !=null and userId != ''">
-, t.user_id= #{userId}
-</if> 
-<if test="age !=null and age != ''">
-, t.age= #{age}
-</if> 
- where 1=1 <if test="bId !=null and bId != ''">
-and t.b_id= #{bId}
-</if> 
-<if test="memberId !=null and memberId != ''">
-and t.member_id= #{memberId}
-</if> 
+        update building_owner t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="sex !=null ">
+            , t.sex= #{sex}
+        </if>
+        <if test="name !=null and name != ''">
+            , t.name= #{name}
+        </if>
+        <if test="link !=null and link != ''">
+            , t.link= #{link}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="ownerId !=null and ownerId != ''">
+            , t.owner_id= #{ownerId}
+        </if>
+        <if test="userId !=null and userId != ''">
+            , t.user_id= #{userId}
+        </if>
+        <if test="age !=null and age != ''">
+            , t.age= #{age}
+        </if>
+        where 1=1
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="memberId !=null and memberId != ''">
+            and t.member_id= #{memberId}
+        </if>
 
     </update>
 
     <!-- 查询业主数量 add by wuxw 2018-07-03 -->
-     <select id="queryOwnersCount" parameterType="Map" resultType="Map">
-        select  count(1) count
-         FROM building_owner t
-<if test="sex !=null ">
-   and t.sex= #{sex}
-</if> 
-<if test="name !=null and name != ''">
-   and t.name= #{name}
-</if> 
-<if test="link !=null and link != ''">
-   and t.link= #{link}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="ownerId !=null and ownerId != ''">
-   and t.owner_id= #{ownerId}
-</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="age !=null and age != ''">
-   and t.age= #{age}
-</if> 
-<if test="memberId !=null and memberId != ''">
-   and t.member_id= #{memberId}
-</if>
-         <if test="ownerTypeCd !=null and ownerTypeCd != ''">
-             and t.owner_type_cd= #{ownerTypeCd}
-         </if>
+    <select id="queryOwnersCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        FROM building_owner t
+        where 1=1
+        <if test="sex !=null ">
+            and t.sex= #{sex}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name like concat('%',#{name},'%')
+        </if>
+        <if test="link !=null and link != ''">
+            and t.link= #{link}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="ownerId !=null and ownerId != ''">
+            and t.owner_id= #{ownerId}
+        </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="age !=null and age != ''">
+            and t.age= #{age}
+        </if>
+        <if test="memberId !=null and memberId != ''">
+            and t.member_id= #{memberId}
+        </if>
+        <if test="ownerTypeCd !=null and ownerTypeCd != ''">
+            and t.owner_type_cd= #{ownerTypeCd}
+        </if>
 
 
-     </select>
+    </select>
 
 
     <!-- 查询业主数量 add by wuxw 2018-07-03 -->
     <select id="queryOwnersCountByCondition" parameterType="Map" resultType="Map">
-        select  count(1) count
+        select count(1) count
         FROM building_owner t , s_community_member cm
         WHERE t.`member_id` = cm.`member_id`
         AND cm.`community_id` = #{communityId}
@@ -247,7 +243,7 @@ and t.member_id= #{memberId}
             and t.sex= #{sex}
         </if>
         <if test="name !=null and name != ''">
-            and t.name= #{name}
+            and t.name like concat('%',#{name},'%')
         </if>
         <if test="link !=null and link != ''">
             and t.link= #{link}
@@ -283,78 +279,80 @@ and t.member_id= #{memberId}
 
     <!-- 查询业主信息 add by wuxw 2018-07-03 -->
     <select id="getOwnerInfoByCondition" parameterType="Map" resultType="Map">
-    select  t.sex,t.name,t.link,t.status_cd,t.status_cd statusCd,t.remark,t.owner_id,t.owner_id ownerId,t.b_id,t.b_id bId,
+        select t.sex,t.name,t.link,t.status_cd,t.status_cd statusCd,t.remark,t.owner_id,t.owner_id ownerId,t.b_id,t.b_id
+        bId,
         t.user_id,t.user_id userId,t.age,t.member_id,t.member_id memberId,t.owner_type_cd,t.owner_type_cd ownerTypeCd
         FROM building_owner t , s_community_member cm
         WHERE t.`member_id` = cm.`member_id`
         AND cm.`community_id` = #{communityId}
         AND cm.`status_cd` = '0'
         AND t.`status_cd` = '0'
-    <if test="sex !=null ">
-        and t.sex= #{sex}
-    </if>
-    <if test="name !=null and name != ''">
-        and t.name= #{name}
-    </if>
-    <if test="link !=null and link != ''">
-        and t.link= #{link}
-    </if>
-    <if test="statusCd !=null and statusCd != ''">
-        and t.status_cd= #{statusCd}
-    </if>
-    <if test="remark !=null and remark != ''">
-        and t.remark= #{remark}
-    </if>
-    <if test="ownerId !=null and ownerId != ''">
-        and t.owner_id= #{ownerId}
-    </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="age !=null and age != ''">
-        and t.age= #{age}
-    </if>
-    <if test="memberId !=null and memberId != ''">
-        and t.member_id= #{memberId}
-    </if>
-    <if test="ownerIds != null and ownerIds != ''">
-        and t.owner_id in
-        <foreach collection="ownerIds" item="item" open="(" close=")" separator=",">
-            #{item}
-        </foreach>
-    </if>
+        <if test="sex !=null ">
+            and t.sex= #{sex}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name like concat('%',#{name},'%')
+        </if>
+        <if test="link !=null and link != ''">
+            and t.link= #{link}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="ownerId !=null and ownerId != ''">
+            and t.owner_id= #{ownerId}
+        </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="age !=null and age != ''">
+            and t.age= #{age}
+        </if>
+        <if test="memberId !=null and memberId != ''">
+            and t.member_id= #{memberId}
+        </if>
+        <if test="ownerIds != null and ownerIds != ''">
+            and t.owner_id in
+            <foreach collection="ownerIds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="ownerTypeCd !=null and ownerTypeCd != ''">
             and t.owner_type_cd= #{ownerTypeCd}
         </if>
-    <if test="page != -1 and page != null ">
-        limit #{page}, #{row}
-    </if>
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
     </select>
     <!-- 查询未入驻业主 总数 -->
     <select id="queryNoEnterRoomOwnerCount" parameterType="Map" resultType="Map">
         SELECT
-            COUNT(1) count
+        COUNT(1) count
         FROM
-            building_owner_room_rel a,
-            building_owner o,
-            s_community_member m
+        building_owner_room_rel a,
+        building_owner o,
+        s_community_member m
         WHERE a.`state` IN ('2001', '2003')
-            AND a.`owner_id` = o.`owner_id`
-            AND o.`owner_id` = m.`member_id`
-            AND m.`member_type_cd` = '390001200005'
-            AND m.`community_id` = #{communityId}
-            AND a.`status_cd` = '0'
-            AND o.`status_cd` = '0'
-            AND m.`status_cd` = '0'
+        AND a.`owner_id` = o.`owner_id`
+        AND o.`owner_id` = m.`member_id`
+        AND m.`member_type_cd` = '390001200005'
+        AND m.`community_id` = #{communityId}
+        AND a.`status_cd` = '0'
+        AND o.`status_cd` = '0'
+        AND m.`status_cd` = '0'
     </select>
 
     <!-- queryOwnersByRoom -->
     <!-- 根据房屋查询业主信息 -->
     <select id="queryOwnersByRoom" parameterType="Map" resultType="Map">
-        SELECT t.sex,t.name,t.link,t.status_cd,t.status_cd statusCd,t.remark,t.owner_id,t.owner_id ownerId,t.b_id,t.b_id bId,
+        SELECT t.sex,t.name,t.link,t.status_cd,t.status_cd statusCd,t.remark,t.owner_id,t.owner_id ownerId,t.b_id,t.b_id
+        bId,
         t.user_id,t.user_id userId,t.age,t.member_id,t.member_id memberId,t.owner_type_cd,t.owner_type_cd ownerTypeCd,
         r.`room_id` roomId,r.`room_num` roomNum
         FROM building_room r,building_owner_room_rel orr,building_owner t
@@ -377,7 +375,8 @@ and t.member_id= #{memberId}
     <!-- 根据停车位查询 -->
     <select id="queryOwnersByParkingSpace" parameterType="Map" resultType="Map">
 
-        select ps.num,ps.ps_id psId,t.sex,t.name,t.link,t.status_cd,t.status_cd statusCd,t.remark,t.owner_id,t.owner_id ownerId,t.b_id,t.b_id bId,
+        select ps.num,ps.ps_id psId,t.sex,t.name,t.link,t.status_cd,t.status_cd statusCd,t.remark,t.owner_id,t.owner_id
+        ownerId,t.b_id,t.b_id bId,
         t.user_id,t.user_id userId,t.age,t.member_id,t.member_id memberId,t.owner_type_cd,t.owner_type_cd ownerTypeCd
         from p_parking_space ps , owner_car oc,building_owner t
         where ps.ps_id = oc.ps_id

+ 162 - 160
java110-db/src/main/resources/mapper/service/ServiceBusinessServiceDaoImplMapper.xml

@@ -5,88 +5,91 @@
 <mapper namespace="serviceBusinessServiceDaoImpl">
 
     <!-- 保存服务实现信息 add by wuxw 2018-07-03 -->
-       <insert id="saveServiceBusiness" parameterType="Map">
-           insert into c_service_business(
-business_type_cd,invoke_type,message_topic,retry_count,url,timeout
-) values (
-#{businessTypeCd},#{invokeType},#{messageTopic},#{retryCount},#{url},#{timeout}
-)
-       </insert>
-
-
-       <!-- 查询服务实现信息(Business) add by wuxw 2018-07-03 -->
-       <select id="getBusinessServiceBusinessInfo" parameterType="Map" resultType="Map">
-           select  t.business_type_cd,t.business_type_cd businessTypeCd,t.invoke_type,t.invoke_type invokeType,t.message_topic,t.message_topic messageTopic,t.operate,t.retry_count,t.retry_count retryCount,t.service_business_id,t.service_business_id serviceBusinessId,t.url,t.timeout 
-from c_service_business t 
-where 1 =1 
-<if test="businessTypeCd !=null and businessTypeCd != ''">
-   and t.business_type_cd= #{businessTypeCd}
-</if> 
-<if test="invokeType !=null and invokeType != ''">
-   and t.invoke_type= #{invokeType}
-</if> 
-<if test="messageTopic !=null and messageTopic != ''">
-   and t.message_topic= #{messageTopic}
-</if> 
-<if test="operate !=null and operate != ''">
-   and t.operate= #{operate}
-</if> 
-<if test="retryCount !=null and retryCount != ''">
-   and t.retry_count= #{retryCount}
-</if> 
-<if test="serviceBusinessId !=null and serviceBusinessId != ''">
-   and t.service_business_id= #{serviceBusinessId}
-</if> 
-<if test="url !=null and url != ''">
-   and t.url= #{url}
-</if> 
-<if test="timeout !=null and timeout != ''">
-   and t.timeout= #{timeout}
-</if> 
-
-       </select>
+    <insert id="saveServiceBusiness" parameterType="Map">
+        insert into c_service_business(
+        business_type_cd,invoke_type,message_topic,retry_count,url,timeout
+        ) values (
+        #{businessTypeCd},#{invokeType},#{messageTopic},#{retryCount},#{url},#{timeout}
+        )
+    </insert>
 
 
+    <!-- 查询服务实现信息(Business) add by wuxw 2018-07-03 -->
+    <select id="getBusinessServiceBusinessInfo" parameterType="Map" resultType="Map">
+        select t.business_type_cd,t.business_type_cd businessTypeCd,t.invoke_type,t.invoke_type
+        invokeType,t.message_topic,t.message_topic messageTopic,t.operate,t.retry_count,t.retry_count
+        retryCount,t.service_business_id,t.service_business_id serviceBusinessId,t.url,t.timeout
+        from c_service_business t
+        where 1 =1
+        <if test="businessTypeCd !=null and businessTypeCd != ''">
+            and t.business_type_cd= #{businessTypeCd}
+        </if>
+        <if test="invokeType !=null and invokeType != ''">
+            and t.invoke_type= #{invokeType}
+        </if>
+        <if test="messageTopic !=null and messageTopic != ''">
+            and t.message_topic= #{messageTopic}
+        </if>
+        <if test="operate !=null and operate != ''">
+            and t.operate= #{operate}
+        </if>
+        <if test="retryCount !=null and retryCount != ''">
+            and t.retry_count= #{retryCount}
+        </if>
+        <if test="serviceBusinessId !=null and serviceBusinessId != ''">
+            and t.service_business_id= #{serviceBusinessId}
+        </if>
+        <if test="url !=null and url != ''">
+            and t.url= #{url}
+        </if>
+        <if test="timeout !=null and timeout != ''">
+            and t.timeout= #{timeout}
+        </if>
 
+    </select>
 
 
     <!-- 保存服务实现信息至 instance表中 add by wuxw 2018-07-03 -->
     <insert id="saveServiceBusinessInfoInstance" parameterType="Map">
         insert into c_service_business(
-business_type_cd,invoke_type,message_topic,retry_count,status_cd,service_business_id,url,timeout
-) select t.business_type_cd,t.invoke_type,t.message_topic,t.retry_count,'0',t.service_business_id,t.url,t.timeout from c_service_business t where 1=1
-<if test="businessTypeCd !=null and businessTypeCd != ''">
-   and t.business_type_cd= #{businessTypeCd}
-</if> 
-<if test="invokeType !=null and invokeType != ''">
-   and t.invoke_type= #{invokeType}
-</if> 
-<if test="messageTopic !=null and messageTopic != ''">
-   and t.message_topic= #{messageTopic}
-</if> 
-   and t.operate= 'ADD'
-<if test="retryCount !=null and retryCount != ''">
-   and t.retry_count= #{retryCount}
-</if> 
-<if test="serviceBusinessId !=null and serviceBusinessId != ''">
-   and t.service_business_id= #{serviceBusinessId}
-</if> 
-<if test="url !=null and url != ''">
-   and t.url= #{url}
-</if> 
-<if test="timeout !=null and timeout != ''">
-   and t.timeout= #{timeout}
-</if> 
+        business_type_cd,invoke_type,message_topic,retry_count,status_cd,service_business_id,url,timeout
+        ) select
+        t.business_type_cd,t.invoke_type,t.message_topic,t.retry_count,'0',t.service_business_id,t.url,t.timeout from
+        c_service_business t where 1=1
+        <if test="businessTypeCd !=null and businessTypeCd != ''">
+            and t.business_type_cd= #{businessTypeCd}
+        </if>
+        <if test="invokeType !=null and invokeType != ''">
+            and t.invoke_type= #{invokeType}
+        </if>
+        <if test="messageTopic !=null and messageTopic != ''">
+            and t.message_topic= #{messageTopic}
+        </if>
+        and t.operate= 'ADD'
+        <if test="retryCount !=null and retryCount != ''">
+            and t.retry_count= #{retryCount}
+        </if>
+        <if test="serviceBusinessId !=null and serviceBusinessId != ''">
+            and t.service_business_id= #{serviceBusinessId}
+        </if>
+        <if test="url !=null and url != ''">
+            and t.url= #{url}
+        </if>
+        <if test="timeout !=null and timeout != ''">
+            and t.timeout= #{timeout}
+        </if>
 
     </insert>
 
 
-
     <!-- 查询服务实现信息 add by wuxw 2018-07-03 -->
     <select id="getServiceBusinessInfo" parameterType="Map" resultType="Map">
-        select  t.business_type_cd,c.name,c.description,t.business_type_cd businessTypeCd,t.invoke_type,t.invoke_type invokeType,t.message_topic,t.message_topic messageTopic,t.retry_count,t.retry_count retryCount,t.status_cd,t.status_cd statusCd,t.service_business_id,t.service_business_id serviceBusinessId,t.url,t.timeout
-from c_service_business t ,c_business_type c
-where 1 =1
+        select t.business_type_cd,c.name,c.description,t.business_type_cd businessTypeCd,t.invoke_type,t.invoke_type
+        invokeType,t.message_topic,t.message_topic messageTopic,t.retry_count,t.retry_count
+        retryCount,t.status_cd,t.status_cd statusCd,t.service_business_id,t.service_business_id
+        serviceBusinessId,t.url,t.timeout
+        from c_service_business t ,c_business_type c
+        where 1 =1
         and t.business_type_cd = c.business_type_cd
         <if test="name != null and name !=''">
             and c.name like concat('%',#{name},'%')
@@ -94,108 +97,107 @@ where 1 =1
         <if test="description != null and description !=''">
             and c.description like concat('%',#{description},'%')
         </if>
-<if test="businessTypeCd !=null and businessTypeCd != ''">
-   and t.business_type_cd= #{businessTypeCd}
-</if> 
-<if test="invokeType !=null and invokeType != ''">
-   and t.invoke_type= #{invokeType}
-</if> 
-<if test="messageTopic !=null and messageTopic != ''">
-   and t.message_topic= #{messageTopic}
-</if> 
-<if test="retryCount !=null and retryCount != ''">
-   and t.retry_count= #{retryCount}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="serviceBusinessId !=null and serviceBusinessId != ''">
-   and t.service_business_id= #{serviceBusinessId}
-</if> 
-<if test="url !=null and url != ''">
-   and t.url= #{url}
-</if> 
-<if test="timeout !=null and timeout != ''">
-   and t.timeout= #{timeout}
-</if> 
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        <if test="businessTypeCd !=null and businessTypeCd != ''">
+            and t.business_type_cd= #{businessTypeCd}
+        </if>
+        <if test="invokeType !=null and invokeType != ''">
+            and t.invoke_type= #{invokeType}
+        </if>
+        <if test="messageTopic !=null and messageTopic != ''">
+            and t.message_topic= #{messageTopic}
+        </if>
+        <if test="retryCount !=null and retryCount != ''">
+            and t.retry_count= #{retryCount}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="serviceBusinessId !=null and serviceBusinessId != ''">
+            and t.service_business_id= #{serviceBusinessId}
+        </if>
+        <if test="url !=null and url != ''">
+            and t.url= #{url}
+        </if>
+        <if test="timeout !=null and timeout != ''">
+            and t.timeout= #{timeout}
+        </if>
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改服务实现信息 add by wuxw 2018-07-03 -->
     <update id="updateServiceBusiness" parameterType="Map">
-        update  c_service_business t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="businessTypeCd !=null and businessTypeCd != ''">
-, t.business_type_cd= #{businessTypeCd}
-</if> 
-<if test="invokeType !=null and invokeType != ''">
-, t.invoke_type= #{invokeType}
-</if> 
-<if test="messageTopic !=null and messageTopic != ''">
-, t.message_topic= #{messageTopic}
-</if> 
-<if test="retryCount !=null and retryCount != ''">
-, t.retry_count= #{retryCount}
-</if> 
-<if test="url !=null and url != ''">
-, t.url= #{url}
-</if> 
-<if test="timeout !=null and timeout != ''">
-, t.timeout= #{timeout}
-</if> 
- where 1=1 <if test="serviceBusinessId !=null and serviceBusinessId != ''">
-and t.service_business_id= #{serviceBusinessId}
-</if> 
+        update c_service_business t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="businessTypeCd !=null and businessTypeCd != ''">
+            , t.business_type_cd= #{businessTypeCd}
+        </if>
+        <if test="invokeType !=null and invokeType != ''">
+            , t.invoke_type= #{invokeType}
+        </if>
+        <if test="messageTopic !=null and messageTopic != ''">
+            , t.message_topic= #{messageTopic}
+        </if>
+        <if test="retryCount !=null and retryCount != ''">
+            , t.retry_count= #{retryCount}
+        </if>
+        <if test="url !=null and url != ''">
+            , t.url= #{url}
+        </if>
+        <if test="timeout !=null and timeout != ''">
+            , t.timeout= #{timeout}
+        </if>
+        where 1=1
+        <if test="serviceBusinessId !=null and serviceBusinessId != ''">
+            and t.service_business_id= #{serviceBusinessId}
+        </if>
 
     </update>
 
     <!-- 查询服务实现数量 add by wuxw 2018-07-03 -->
-     <select id="queryServiceBusinesssCount" parameterType="Map" resultType="Map">
-        select  count(1) count
-         from c_service_business t ,c_business_type c
-         where 1 =1
-         and t.business_type_cd = c.business_type_cd
-         <if test="name != null and name !=''">
-             and c.name like concat('%',#{name},'%')
-         </if>
-         <if test="description != null and description !=''">
-             and c.description like concat('%',#{description},'%')
-         </if>
-<if test="businessTypeCd !=null and businessTypeCd != ''">
-   and t.business_type_cd= #{businessTypeCd}
-</if> 
-<if test="invokeType !=null and invokeType != ''">
-   and t.invoke_type= #{invokeType}
-</if> 
-<if test="messageTopic !=null and messageTopic != ''">
-   and t.message_topic= #{messageTopic}
-</if> 
-<if test="retryCount !=null and retryCount != ''">
-   and t.retry_count= #{retryCount}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="serviceBusinessId !=null and serviceBusinessId != ''">
-   and t.service_business_id= #{serviceBusinessId}
-</if> 
-<if test="url !=null and url != ''">
-   and t.url= #{url}
-</if> 
-<if test="timeout !=null and timeout != ''">
-   and t.timeout= #{timeout}
-</if> 
-
-
-     </select>
+    <select id="queryServiceBusinesssCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from c_service_business t ,c_business_type c
+        where 1 =1
+        and t.business_type_cd = c.business_type_cd
+        <if test="name != null and name !=''">
+            and c.name like concat('%',#{name},'%')
+        </if>
+        <if test="description != null and description !=''">
+            and c.description like concat('%',#{description},'%')
+        </if>
+        <if test="businessTypeCd !=null and businessTypeCd != ''">
+            and t.business_type_cd= #{businessTypeCd}
+        </if>
+        <if test="invokeType !=null and invokeType != ''">
+            and t.invoke_type= #{invokeType}
+        </if>
+        <if test="messageTopic !=null and messageTopic != ''">
+            and t.message_topic= #{messageTopic}
+        </if>
+        <if test="retryCount !=null and retryCount != ''">
+            and t.retry_count= #{retryCount}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="serviceBusinessId !=null and serviceBusinessId != ''">
+            and t.service_business_id= #{serviceBusinessId}
+        </if>
+        <if test="url !=null and url != ''">
+            and t.url= #{url}
+        </if>
+        <if test="timeout !=null and timeout != ''">
+            and t.timeout= #{timeout}
+        </if>
+
+
+    </select>
 
     <select id="queryBusinessType" parameterType="Map" resultType="Map">
         select ct.* from c_business_type ct