소스 검색

业主详情页面 优化完成

wuxw 7 년 전
부모
커밋
0909ad8487

+ 2 - 0
Api/src/main/java/com/java110/api/listener/fee/QueryFeeByParkingSpaceListener.java

@@ -83,6 +83,8 @@ public class QueryFeeByParkingSpaceListener extends AbstractServiceApiDataFlowLi
         ResponseEntity<String> responseEntity = null;
         if (feeDtos == null || feeDtos.size() == 0) {
             responseEntity = new ResponseEntity<String>("{}", HttpStatus.OK);
+            dataFlowContext.setResponseEntity(responseEntity);
+            return ;
         }
 
         FeeDto feeDto = feeDtos.get(0);

+ 38 - 0
WebService/src/main/java/com/java110/web/smo/impl/PackingSpaceServiceSMOImpl.java

@@ -1,6 +1,8 @@
 package com.java110.web.smo.impl;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.java110.common.constant.FeeTypeConstant;
 import com.java110.common.constant.PrivilegeCodeConstant;
 import com.java110.common.constant.ResponseConstant;
 import com.java110.common.constant.ServiceConstant;
@@ -18,6 +20,9 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
 
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * 小区楼实现类
  * <p>
@@ -200,6 +205,39 @@ public class PackingSpaceServiceSMOImpl extends BaseComponentSMO implements IPar
         responseEntity = this.callCenterService(restTemplate, pd, "",
                 apiUrl,
                 HttpMethod.GET);
+        if (responseEntity.getStatusCode() != HttpStatus.OK) {
+            return responseEntity;
+        }
+
+        JSONObject psInfo = JSONObject.parseObject(responseEntity.getBody().toString());
+        JSONArray pss = psInfo.getJSONArray("parkingSpaces");
+
+        Map feeMap = null;
+        JSONObject resultFeeInfo = null;
+        JSONObject psObj = null;
+        for (int roomIndex = 0; roomIndex < pss.size(); roomIndex++) {
+            psObj = pss.getJSONObject(roomIndex);
+            feeMap = new HashMap();
+            feeMap.put("communityId", communityId);
+            feeMap.put("psId", psObj.getString("psId"));
+            apiUrl = ServiceConstant.SERVICE_API_URL + "/api/fee.queryFeeByParkingSpace" + mapToUrlParam(feeMap);
+            responseEntity = this.callCenterService(restTemplate, pd, "",
+                    apiUrl,
+                    HttpMethod.GET);
+
+            if (responseEntity.getStatusCode() != HttpStatus.OK) {
+                //throw new SMOException(ResponseConstant.RESULT_CODE_ERROR, "当前房屋[" + roomObj.getString("roomNum") + "]没有物业费信息,数据错误");
+
+                continue;
+            }
+
+            resultFeeInfo = JSONObject.parseObject(responseEntity.getBody().toString());
+            psObj.putAll(resultFeeInfo);
+
+        }
+
+        responseEntity = new ResponseEntity(psInfo.toJSONString(), HttpStatus.OK);
+
         return responseEntity;
     }
 

+ 6 - 0
WebService/src/main/resources/components/ownerPackage/list-owner/listOwner.js

@@ -16,6 +16,12 @@
             }
         },
         _initMethod:function(){
+            //加载 业主信息
+            var _ownerId = vc.getParam('ownerId')
+
+            if(vc.notNull(_ownerId)){
+                vc.component.listOwnerInfo.conditions.ownerId = _ownerId;
+            }
             vc.component._listOwnerData(DEFAULT_PAGE,DEFAULT_ROWS);
         },
         _initEvent:function(){

+ 1 - 0
WebService/src/main/resources/components/ownerPackage/owner-detail/ownerDetail.html

@@ -4,6 +4,7 @@
     <vc:create name="viewOwnerInfo"
                callBackListener="sellParkingSpace"
                callBackFunction="notify"
+               showCallBackButton="true"
     ></vc:create>
 
     <!-- 业主 房屋信息 -->

+ 94 - 78
WebService/src/main/resources/components/ownerPackage/show-owner-rooms/showOwnerRoom.html

@@ -1,104 +1,120 @@
-<div class="row" v-for=" roomInfo in showOwnerRoomInfo.rooms">
-    <div class="col-lg-12">
-        <div class="ibox ">
-            <div class="ibox-title">
-                <h5>{{roomInfo.roomNum}}房屋信息</h5>
-                <div class="ibox-tools" style="top:10px;">
-                    <button type="button" class="btn btn-primary btn-sm"
-                            v-on:click="ownerExitRoomModel(roomInfo.roomId)">
-                        <i class="glyphicon glyphicon-remove"></i> 我要退房
-                    </button>
+<div v-for=" roomInfo in showOwnerRoomInfo.rooms">
+    <div class="row">
+        <div class="col-lg-12">
+            <div class="ibox ">
+                <div class="ibox-title">
+                    <h5>{{roomInfo.roomNum}}房屋信息</h5>
+                    <div class="ibox-tools" style="top:10px;">
+                        <button type="button" class="btn btn-primary btn-sm"
+                                v-on:click="ownerExitRoomModel(roomInfo.roomId)">
+                            <i class="glyphicon glyphicon-remove"></i> 我要退房
+                        </button>
+                    </div>
                 </div>
-            </div>
-            <div class="ibox-content">
-                <div class="row">
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">房屋ID:</label>
-                            <label class="">{{roomInfo.roomId}}</label>
+                <div class="ibox-content">
+                    <div class="row">
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">房屋ID:</label>
+                                <label class="">{{roomInfo.roomId}}</label>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">房屋编号:</label>
-                            <label class="">{{roomInfo.roomNum}}</label>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">房屋编号:</label>
+                                <label class="">{{roomInfo.roomNum}}</label>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">单元:</label>
-                            <label class="">{{roomInfo.unitNum}}</label>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">单元:</label>
+                                <label class="">{{roomInfo.unitNum}}</label>
+                            </div>
                         </div>
-                    </div>
 
-                </div>
+                    </div>
 
-                <div class="row">
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">楼层:</label>
-                            <label class="">{{roomInfo.layer}}</label>
+                    <div class="row">
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">楼层:</label>
+                                <label class="">{{roomInfo.layer}}</label>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">房间数:</label>
-                            <label class="">{{roomInfo.section}}</label>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">房间数:</label>
+                                <label class="">{{roomInfo.section}}</label>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">户型:</label>
-                            <label class="">{{roomInfo.apartment}}</label>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">户型:</label>
+                                <label class="">{{roomInfo.apartment}}</label>
+                            </div>
                         </div>
-                    </div>
 
-                </div>
-                <div class="row">
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">建筑面积:</label>
-                            <label class="">{{roomInfo.builtUpArea}}</label>
-                        </div>
                     </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">单价:</label>
-                            <label class="">{{roomInfo.unitPrice}}</label>
+                    <div class="row">
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">建筑面积:</label>
+                                <label class="">{{roomInfo.builtUpArea}}</label>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">创建员工:</label>
-                            <label class="">{{roomInfo.userName}}</label>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">单价:</label>
+                                <label class="">{{roomInfo.unitPrice}}</label>
+                            </div>
+                        </div>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">创建员工:</label>
+                                <label class="">{{roomInfo.userName}}</label>
+                            </div>
                         </div>
+
                     </div>
+                </div>
+            </div>
+        </div>
+        <vc:create name="ownerExitRoom"></vc:create>
+    </div>
+    <div class="row">
+        <div class="col-lg-12">
+            <div class="ibox ">
+                <div class="ibox-title">
+                    <h5>{{roomInfo.roomNum}}物业费信息</h5>
+                    <div class="ibox-tools" style="top:10px;">
 
+                    </div>
                 </div>
+                <div class="ibox-content">
 
-                <div class="row">
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">物业费ID:</label>
-                            <label class="">{{roomInfo.feeId}}</label>
+                    <div class="row">
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">物业费ID:</label>
+                                <label class="">{{roomInfo.feeId}}</label>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">物业费开始时间:</label>
-                            <label class="">{{roomInfo.startTime}}</label>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">物业费开始时间:</label>
+                                <label class="">{{roomInfo.startTime}}</label>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">物业费结束时间:</label>
-                            <label class="">{{roomInfo.endTime}}</label>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">物业费结束时间:</label>
+                                <label class="">{{roomInfo.endTime}}</label>
+                            </div>
                         </div>
-                    </div>
 
+                    </div>
                 </div>
             </div>
         </div>
     </div>
-    <vc:create name="ownerExitRoom"></vc:create>
 </div>

+ 9 - 5
WebService/src/main/resources/components/ownerPackage/viewOwnerInfo/viewOwnerInfo.html

@@ -4,13 +4,17 @@
             <div class="ibox-title">
                 <h5>业主信息</h5>
                 <div class="ibox-tools" style="top:10px;">
+                    <button type="button" class="btn btn-primary btn-sm" v-if="viewOwnerInfo.showCallBackButton=='true'"
+                            v-on:click="_callBackListOwner(viewOwnerInfo.ownerId)">
+                        返回
+                    </button>
                 </div>
             </div>
             <div class="ibox-content">
                 <div class="row">
                     <div class="col-sm-3">
                         <div class="form-group">
-                            <label class="col-form-label" >业主ID:</label>
+                            <label class="col-form-label">业主ID:</label>
                             <label class="">{{viewOwnerInfo.ownerId}}</label>
                         </div>
                     </div>
@@ -22,13 +26,13 @@
                     </div>
                     <div class="col-sm-3">
                         <div class="form-group">
-                            <label class="col-form-label" >性别:</label>
+                            <label class="col-form-label">性别:</label>
                             <label class="">{{viewOwnerInfo.sex == 0 ? '男' : '女'}}</label>
                         </div>
                     </div>
                     <div class="col-sm-3">
                         <div class="form-group">
-                            <label class="col-form-label" >年龄:</label>
+                            <label class="col-form-label">年龄:</label>
                             <label class="">{{viewOwnerInfo.age}}</label>
                         </div>
                     </div>
@@ -38,7 +42,7 @@
                 <div class="row">
                     <div class="col-sm-3">
                         <div class="form-group">
-                            <label class="col-form-label" >联系方式:</label>
+                            <label class="col-form-label">联系方式:</label>
                             <label class="">{{viewOwnerInfo.link}}</label>
                         </div>
                     </div>
@@ -50,7 +54,7 @@
                     </div>
                     <div class="col-sm-6">
                         <div class="form-group">
-                            <label class="col-form-label" >备注:</label>
+                            <label class="col-form-label">备注:</label>
                             <label class="">{{viewOwnerInfo.remark}}</label>
                         </div>
                     </div>

+ 6 - 1
WebService/src/main/resources/components/ownerPackage/viewOwnerInfo/viewOwnerInfo.js

@@ -6,7 +6,8 @@
     vc.extends({
         propTypes: {
            callBackListener:vc.propTypes.string,
-           callBackFunction:vc.propTypes.string
+           callBackFunction:vc.propTypes.string,
+           showCallBackButton:vc.propTypes.string='false'
         },
         data:{
             viewOwnerInfo:{
@@ -18,6 +19,7 @@
                 userName:"",
                 remark:"",
                 link:"",
+                showCallBackButton:$props.showCallBackButton
             }
         },
         _initMethod:function(){
@@ -67,6 +69,9 @@
                              }
                            );
 
+            },
+            _callBackListOwner:function(_ownerId){
+                vc.jumpToPage("/flow/ownerFlow?ownerId="+_ownerId);
             }
 
         }

+ 98 - 58
WebService/src/main/resources/components/parkingSpacePackage/show-owner-parkingSpaces/showOwnerParkingSpace.html

@@ -1,80 +1,120 @@
-<div class="row" v-for=" parkingSpaceInfo in showOwnerParkingSpaceInfo.parkingSpaces">
-    <div class="col-lg-12">
-        <div class="ibox ">
-            <div class="ibox-title">
-                <h5>{{parkingSpaceInfo.num}}车位信息</h5>
-                <div class="ibox-tools" style="top:10px;">
-                    <button type="button" class="btn btn-primary btn-sm" v-on:click="ownerExitParkingSpaceModel(parkingSpaceInfo.psId)">
-                        <i class="glyphicon glyphicon-remove"></i> 我要退款</button>
+<div v-for=" parkingSpaceInfo in showOwnerParkingSpaceInfo.parkingSpaces">
+    <div class="row">
+        <div class="col-lg-12">
+            <div class="ibox ">
+                <div class="ibox-title">
+                    <h5>{{parkingSpaceInfo.num}}车位信息</h5>
+                    <div class="ibox-tools" style="top:10px;">
+                        <button type="button" class="btn btn-primary btn-sm"
+                                v-on:click="ownerExitParkingSpaceModel(parkingSpaceInfo.psId)">
+                            <i class="glyphicon glyphicon-remove"></i> 我要退款
+                        </button>
+                    </div>
                 </div>
-            </div>
-            <div class="ibox-content">
-                <div class="row">
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label" >车位ID:</label>
-                            <label class="">{{parkingSpaceInfo.psId}}</label>
+                <div class="ibox-content">
+                    <div class="row">
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">车位ID:</label>
+                                <label class="">{{parkingSpaceInfo.psId}}</label>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">车位编号:</label>
-                            <label class="">{{parkingSpaceInfo.num}}</label>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">车位编号:</label>
+                                <label class="">{{parkingSpaceInfo.num}}</label>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label" >车位类型:</label>
-                            <label class="">{{parkingSpaceInfo.typeCd}}</label>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">车位类型:</label>
+                                <label class="">{{parkingSpaceInfo.typeCd}}</label>
+                            </div>
                         </div>
-                    </div>
 
-                </div>
+                    </div>
 
-                <div class="row">
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label" >车位状态:</label>
-                            <label class="">{{parkingSpaceInfo.state}}</label>
+                    <div class="row">
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">车位状态:</label>
+                                <label class="">{{parkingSpaceInfo.state}}</label>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">车位面积:</label>
-                            <label class="">{{parkingSpaceInfo.area}}</label>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">车位面积:</label>
+                                <label class="">{{parkingSpaceInfo.area}}</label>
+                            </div>
+                        </div>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">车辆ID:</label>
+                                <label class="">{{parkingSpaceInfo.carId}}</label>
+                            </div>
                         </div>
+
                     </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label" >车辆ID:</label>
-                            <label class="">{{parkingSpaceInfo.carId}}</label>
+                    <div class="row">
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">车牌号:</label>
+                                <label class="">{{parkingSpaceInfo.carNum}}</label>
+                            </div>
+                        </div>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">车品牌:</label>
+                                <label class="">{{parkingSpaceInfo.carBrand}}</label>
+                            </div>
                         </div>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">车类型:</label>
+                                <label class="">{{parkingSpaceInfo.carType}}</label>
+                            </div>
+                        </div>
+
                     </div>
+                </div>
+            </div>
+        </div>
+        <vc:create name="ownerExitParkingSpace"></vc:create>
+    </div>
 
+    <div class="row">
+        <div class="col-lg-12">
+            <div class="ibox ">
+                <div class="ibox-title">
+                    <h5>{{parkingSpaceInfo.num}}停车费信息</h5>
+                    <div class="ibox-tools" style="top:10px;">
+
+                    </div>
                 </div>
-                <div class="row">
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label" >车牌号:</label>
-                            <label class="">{{parkingSpaceInfo.carNum}}</label>
+                <div class="ibox-content">
+                    <div class="row">
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">费用开始时间:</label>
+                                <label class="">{{parkingSpaceInfo.startTime}}</label>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label">车品牌:</label>
-                            <label class="">{{parkingSpaceInfo.carBrand}}</label>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <label class="col-form-label">费用到期时间:</label>
+                                <label class="">{{parkingSpaceInfo.endTime}}</label>
+                            </div>
                         </div>
-                    </div>
-                    <div class="col-sm-4">
-                        <div class="form-group">
-                            <label class="col-form-label" >车类型:</label>
-                            <label class="">{{parkingSpaceInfo.carType}}</label>
+                        <div class="col-sm-4">
+                            <div class="form-group" v-if="parkingSpaceInfo.amount != '-1.00'">
+                                <label class="col-form-label">费用金额:</label>
+                                <label class="">{{parkingSpaceInfo.amount}}</label>
+                            </div>
                         </div>
                     </div>
-
                 </div>
             </div>
         </div>
+        <vc:create name="ownerExitParkingSpace"></vc:create>
     </div>
-    <vc:create name="ownerExitParkingSpace"></vc:create>
 </div>

+ 198 - 199
java110-db/src/main/resources/mapper/owner/OwnerCarServiceDaoImplMapper.xml

@@ -5,229 +5,228 @@
 <mapper namespace="ownerCarServiceDaoImpl">
 
     <!-- 保存车辆管理信息 add by wuxw 2018-07-03 -->
-       <insert id="saveBusinessOwnerCarInfo" parameterType="Map">
-           insert into business_owner_car(
-car_color,car_brand,car_type,operate,car_num,ps_id,remark,owner_id,b_id,user_id,car_id
-) values (
-#{carColor},#{carBrand},#{carType},#{operate},#{carNum},#{psId},#{remark},#{ownerId},#{bId},#{userId},#{carId}
-)
-       </insert>
-
-
-       <!-- 查询车辆管理信息(Business) add by wuxw 2018-07-03 -->
-       <select id="getBusinessOwnerCarInfo" parameterType="Map" resultType="Map">
-           select  t.car_color,t.car_color carColor,t.car_brand,t.car_brand carBrand,t.car_type,t.car_type carType,t.operate,t.car_num,t.car_num carNum,t.ps_id,t.ps_id psId,t.remark,t.owner_id,t.owner_id ownerId,t.b_id,t.b_id bId,t.user_id,t.user_id userId,t.car_id,t.car_id carId 
-from business_owner_car t 
-where 1 =1 
-<if test="carColor !=null and carColor != ''">
-   and t.car_color= #{carColor}
-</if> 
-<if test="carBrand !=null and carBrand != ''">
-   and t.car_brand= #{carBrand}
-</if> 
-<if test="carType !=null and carType != ''">
-   and t.car_type= #{carType}
-</if> 
-<if test="operate !=null and operate != ''">
-   and t.operate= #{operate}
-</if> 
-<if test="carNum !=null and carNum != ''">
-   and t.car_num= #{carNum}
-</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="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="carId !=null and carId != ''">
-   and t.car_id= #{carId}
-</if> 
-
-       </select>
+    <insert id="saveBusinessOwnerCarInfo" parameterType="Map">
+        insert into business_owner_car(
+        car_color,car_brand,car_type,operate,car_num,ps_id,remark,owner_id,b_id,user_id,car_id
+        ) values (
+        #{carColor},#{carBrand},#{carType},#{operate},#{carNum},#{psId},#{remark},#{ownerId},#{bId},#{userId},#{carId}
+        )
+    </insert>
 
 
+    <!-- 查询车辆管理信息(Business) add by wuxw 2018-07-03 -->
+    <select id="getBusinessOwnerCarInfo" parameterType="Map" resultType="Map">
+        select t.car_color,t.car_color carColor,t.car_brand,t.car_brand carBrand,t.car_type,t.car_type
+        carType,t.operate,t.car_num,t.car_num carNum,t.ps_id,t.ps_id psId,t.remark,t.owner_id,t.owner_id
+        ownerId,t.b_id,t.b_id bId,t.user_id,t.user_id userId,t.car_id,t.car_id carId
+        from business_owner_car t
+        where 1 =1
+        <if test="carColor !=null and carColor != ''">
+            and t.car_color= #{carColor}
+        </if>
+        <if test="carBrand !=null and carBrand != ''">
+            and t.car_brand= #{carBrand}
+        </if>
+        <if test="carType !=null and carType != ''">
+            and t.car_type= #{carType}
+        </if>
+        <if test="operate !=null and operate != ''">
+            and t.operate= #{operate}
+        </if>
+        <if test="carNum !=null and carNum != ''">
+            and t.car_num= #{carNum}
+        </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="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="carId !=null and carId != ''">
+            and t.car_id= #{carId}
+        </if>
 
+    </select>
 
 
     <!-- 保存车辆管理信息至 instance表中 add by wuxw 2018-07-03 -->
     <insert id="saveOwnerCarInfoInstance" parameterType="Map">
         insert into owner_car(
-car_color,car_brand,car_type,car_num,ps_id,remark,status_cd,owner_id,b_id,user_id,car_id
-) select t.car_color,t.car_brand,t.car_type,t.car_num,t.ps_id,t.remark,'0',t.owner_id,t.b_id,t.user_id,t.car_id from business_owner_car t where 1=1
-<if test="carColor !=null and carColor != ''">
-   and t.car_color= #{carColor}
-</if> 
-<if test="carBrand !=null and carBrand != ''">
-   and t.car_brand= #{carBrand}
-</if> 
-<if test="carType !=null and carType != ''">
-   and t.car_type= #{carType}
-</if> 
-   and t.operate= 'ADD'
-<if test="carNum !=null and carNum != ''">
-   and t.car_num= #{carNum}
-</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="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="carId !=null and carId != ''">
-   and t.car_id= #{carId}
-</if> 
+        car_color,car_brand,car_type,car_num,ps_id,remark,status_cd,owner_id,b_id,user_id,car_id
+        ) select t.car_color,t.car_brand,t.car_type,t.car_num,t.ps_id,t.remark,'0',t.owner_id,t.b_id,t.user_id,t.car_id
+        from business_owner_car t where 1=1
+        <if test="carColor !=null and carColor != ''">
+            and t.car_color= #{carColor}
+        </if>
+        <if test="carBrand !=null and carBrand != ''">
+            and t.car_brand= #{carBrand}
+        </if>
+        <if test="carType !=null and carType != ''">
+            and t.car_type= #{carType}
+        </if>
+        and t.operate= 'ADD'
+        <if test="carNum !=null and carNum != ''">
+            and t.car_num= #{carNum}
+        </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="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="carId !=null and carId != ''">
+            and t.car_id= #{carId}
+        </if>
 
     </insert>
 
 
-
     <!-- 查询车辆管理信息 add by wuxw 2018-07-03 -->
     <select id="getOwnerCarInfo" parameterType="Map" resultType="Map">
-        select  t.car_color,t.car_color carColor,t.car_brand,t.car_brand carBrand,t.car_type,t.car_type carType,
+        select t.car_color,t.car_color carColor,t.car_brand,t.car_brand carBrand,t.car_type,t.car_type carType,
         t.car_num,t.car_num carNum,t.ps_id,t.ps_id psId,t.remark,t.status_cd,t.status_cd statusCd,t.owner_id,
-        t.owner_id ownerId,t.b_id,t.b_id bId,t.user_id,t.user_id userId,t.car_id,t.car_id carId ,t.create_time createTime
-from owner_car t 
-where 1 =1 
-<if test="carColor !=null and carColor != ''">
-   and t.car_color= #{carColor}
-</if> 
-<if test="carBrand !=null and carBrand != ''">
-   and t.car_brand= #{carBrand}
-</if> 
-<if test="carType !=null and carType != ''">
-   and t.car_type= #{carType}
-</if> 
-<if test="carNum !=null and carNum != ''">
-   and t.car_num= #{carNum}
-</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="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="carId !=null and carId != ''">
-   and t.car_id= #{carId}
-</if> 
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        t.owner_id ownerId,t.b_id,t.b_id bId,t.user_id,t.user_id userId,t.car_id,t.car_id carId ,t.create_time
+        createTime
+        from owner_car t
+        where 1 =1
+        <if test="carColor !=null and carColor != ''">
+            and t.car_color= #{carColor}
+        </if>
+        <if test="carBrand !=null and carBrand != ''">
+            and t.car_brand= #{carBrand}
+        </if>
+        <if test="carType !=null and carType != ''">
+            and t.car_type= #{carType}
+        </if>
+        <if test="carNum !=null and carNum != ''">
+            and t.car_num= #{carNum}
+        </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="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="carId !=null and carId != ''">
+            and t.car_id= #{carId}
+        </if>
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
 
     </select>
 
 
-
-
     <!-- 修改车辆管理信息 add by wuxw 2018-07-03 -->
     <update id="updateOwnerCarInfoInstance" parameterType="Map">
-        update  owner_car t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="carColor !=null and carColor != ''">
-, t.car_color= #{carColor}
-</if> 
-<if test="carBrand !=null and carBrand != ''">
-, t.car_brand= #{carBrand}
-</if> 
-<if test="carType !=null and carType != ''">
-, t.car_type= #{carType}
-</if> 
-<if test="carNum !=null and carNum != ''">
-, t.car_num= #{carNum}
-</if> 
-<if test="psId !=null and psId != ''">
-, t.ps_id= #{psId}
-</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> 
- where 1=1 <if test="bId !=null and bId != ''">
-and t.b_id= #{bId}
-</if> 
-<if test="carId !=null and carId != ''">
-and t.car_id= #{carId}
-</if> 
+        update owner_car t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="carColor !=null and carColor != ''">
+            , t.car_color= #{carColor}
+        </if>
+        <if test="carBrand !=null and carBrand != ''">
+            , t.car_brand= #{carBrand}
+        </if>
+        <if test="carType !=null and carType != ''">
+            , t.car_type= #{carType}
+        </if>
+        <if test="carNum !=null and carNum != ''">
+            , t.car_num= #{carNum}
+        </if>
+        <if test="psId !=null and psId != ''">
+            , t.ps_id= #{psId}
+        </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>
+        where 1=1
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="carId !=null and carId != ''">
+            and t.car_id= #{carId}
+        </if>
 
     </update>
 
     <!-- 查询车辆管理数量 add by wuxw 2018-07-03 -->
-     <select id="queryOwnerCarsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from owner_car t 
-where 1 =1 
-<if test="carColor !=null and carColor != ''">
-   and t.car_color= #{carColor}
-</if> 
-<if test="carBrand !=null and carBrand != ''">
-   and t.car_brand= #{carBrand}
-</if> 
-<if test="carType !=null and carType != ''">
-   and t.car_type= #{carType}
-</if> 
-<if test="carNum !=null and carNum != ''">
-   and t.car_num= #{carNum}
-</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="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="carId !=null and carId != ''">
-   and t.car_id= #{carId}
-</if> 
-
-
-     </select>
+    <select id="queryOwnerCarsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from owner_car t
+        where 1 =1
+        <if test="carColor !=null and carColor != ''">
+            and t.car_color= #{carColor}
+        </if>
+        <if test="carBrand !=null and carBrand != ''">
+            and t.car_brand= #{carBrand}
+        </if>
+        <if test="carType !=null and carType != ''">
+            and t.car_type= #{carType}
+        </if>
+        <if test="carNum !=null and carNum != ''">
+            and t.car_num= #{carNum}
+        </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="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="carId !=null and carId != ''">
+            and t.car_id= #{carId}
+        </if>
+
+
+    </select>
 
 </mapper>