Przeglądaj źródła

添加 我的维修派单页面

wuxw 6 lat temu
rodzic
commit
39676eabe4

+ 41 - 0
WebService/src/main/java/com/java110/web/components/ownerRepair/MyRepairDispatchComponent.java

@@ -0,0 +1,41 @@
+package com.java110.web.components.ownerRepair;
+
+import com.java110.core.context.IPageData;
+import com.java110.web.smo.ownerRepair.IListOwnerRepairsSMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+/**
+ * @ClassName MyRepairDispatchComponent
+ * @Description TODO
+ * @Author wuxw
+ * @Date 2019/10/20 18:21
+ * @Version 1.0
+ * add by wuxw 2019/10/20
+ **/
+@Component("myRepairDispatch")
+public class MyRepairDispatchComponent {
+
+
+    @Autowired
+    private IListOwnerRepairsSMO listOwnerRepairsSMOImpl;
+
+    /**
+     * 查询业主报修列表
+     * @param pd 页面数据封装
+     * @return 返回 ResponseEntity 对象
+     */
+    public ResponseEntity<String> list(IPageData pd){
+        return listOwnerRepairsSMOImpl.listOwnerRepairs(pd);
+    }
+
+
+    public IListOwnerRepairsSMO getListOwnerRepairsSMOImpl() {
+        return listOwnerRepairsSMOImpl;
+    }
+
+    public void setListOwnerRepairsSMOImpl(IListOwnerRepairsSMO listOwnerRepairsSMOImpl) {
+        this.listOwnerRepairsSMOImpl = listOwnerRepairsSMOImpl;
+    }
+}

+ 4 - 0
WebService/src/main/java/com/java110/web/smo/ownerRepair/impl/ListOwnerRepairsSMOImpl.java

@@ -49,6 +49,10 @@ public class ListOwnerRepairsSMOImpl extends AbstractComponentSMO implements ILi
         Map paramMap = BeanConvertUtil.beanCovertMap(result);
         Map paramMap = BeanConvertUtil.beanCovertMap(result);
         paramIn.putAll(paramMap);
         paramIn.putAll(paramMap);
 
 
+        if(paramIn.containsKey("pageFlag") && "myRepairDispatch".equals(paramIn.getString("pageFlag"))){
+            paramIn.put("staffId", result.getUserId());
+        }
+
         String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/ownerRepair.listOwnerRepairs" + mapToUrlParam(paramIn);
         String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/ownerRepair.listOwnerRepairs" + mapToUrlParam(paramIn);
 
 
 
 

+ 120 - 0
WebService/src/main/resources/components/ownerRepairPackage/myRepairDispatch-manage/myRepairDispatchManage.html

@@ -0,0 +1,120 @@
+<div id="component" class="wrapper wrapper-content animated fadeInRight ecommerce">
+    <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()">{{myRepairDispatchInfo.moreCondition == true?'隐藏':'更多'}}
+                        </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="myRepairDispatchInfo.conditions.repairId" class=" form-control">
+                            </div>
+                        </div>
+                        <div class="col-sm-4">
+                            <div class="form-group">
+                                <input type="text" placeholder="请输入报修人"
+                                       v-model="myRepairDispatchInfo.conditions.repairName" class=" form-control">
+                            </div>
+                        </div>
+                        <div class="col-sm-3">
+                            <div class="form-group">
+                                <input type="text" placeholder="请输入报修电话" v-model="myRepairDispatchInfo.conditions.tel"
+                                       class=" form-control">
+                            </div>
+                        </div>
+                        <div class="col-sm-1">
+                            <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryOwnerRepairMethod()">
+                                <i class="glyphicon glyphicon-search"></i> 查询
+                            </button>
+                        </div>
+                    </div>
+                    <div class="row">
+                        <div class="col-sm-4" v-if="myRepairDispatchInfo.moreCondition == true">
+                            <select class="custom-select" v-model="myRepairDispatchInfo.conditions.repairType">
+                                <option selected value="">请选择报修类型</option>
+                                <option value="10001">卧室报修</option>
+                                <option value="10002">管道报修</option>
+                                <option value="10003">客厅报修</option>
+                            </select></div>
+                        <div class="col-sm-4" v-if="ownerRepairManageInfo.moreCondition == true">
+                            <select class="custom-select" v-model="ownerRepairManageInfo.conditions.state">
+                                <option selected value="">请选择报修状态</option>
+                                <option value="1000">未派单</option>
+                                <option value="1100">处理中</option>
+                                <option value="1200">处理完成</option>
+                            </select>
+                        </div>
+                    </div>
+
+
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class="row">
+        <div class="col-lg-12">
+            <div class="ibox">
+                <div class="ibox-title">
+                    <h5><span v-text="myRepairDispatchInfo.conditions.roomName"></span>报修信息</h5>
+
+                </div>
+                <div class="ibox-content">
+
+                    <table class="footable table table-stripped toggle-arrow-tiny"
+                           data-page-size="15"
+                    >
+                        <thead>
+                        <tr>
+                            <th class="text-center">报修ID</th>
+                            <th class="text-center">报修类型</th>
+                            <th class="text-center">报修人</th>
+                            <th class="text-center">联系方式</th>
+                            <th class="text-center">预约时间</th>
+                            <th class="text-center">状态</th>
+                            <th class="text-center">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr v-for="ownerRepair in myRepairDispatchInfo.ownerRepairs">
+                            <td class="text-center">{{ownerRepair.repairId}}</td>
+                            <td class="text-center">{{ownerRepair.repairTypeName}}</td>
+                            <td class="text-center">{{ownerRepair.repairName}}</td>
+                            <td class="text-center">{{ownerRepair.tel}}</td>
+                            <td class="text-center">{{ownerRepair.appointmentTime}}</td>
+                            <td class="text-center">{{ownerRepair.repairDispatchState}}</td>
+                            <td class="text-center">
+                                <div class="btn-group">
+                                    <button class="btn-white btn btn-xs"
+                                            v-bind:disabled="ownerRepair.state == '1100'"
+                                            v-on:click="_openDealRepair(ownerRepair)">办理
+                                    </button>
+                                </div>
+                            </td>
+
+                        </tr>
+                        </tbody>
+                        <tfoot>
+                        <tr>
+                            <td colspan="7">
+                                <ul class="pagination float-right"></ul>
+                            </td>
+                        </tr>
+                        </tfoot>
+                    </table>
+                    <!-- 分页 -->
+                    <vc:create name="pagination"></vc:create>
+                </div>
+            </div>
+        </div>
+    </div>
+
+
+</div>

+ 118 - 0
WebService/src/main/resources/components/ownerRepairPackage/myRepairDispatch-manage/myRepairDispatchManage.js

@@ -0,0 +1,118 @@
+/**
+    入驻小区
+**/
+(function(vc){
+    var DEFAULT_PAGE = 1;
+    var DEFAULT_ROWS = 10;
+    vc.extends({
+        data:{
+            myRepairDispatchInfo:{
+                ownerRepairs:[],
+                total:0,
+                records:1,
+                moreCondition:false,
+                repairName:'',
+                conditions:{
+                    pageFlag:'myRepairDispatch',
+                    repairId:'',
+                    repairName:'',
+                    tel:'',
+                    repairType:'',
+                    roomId:'',
+                    roomName:'',
+                    ownerId:'',
+                    state:''
+                }
+            }
+        },
+        _initMethod:function(){
+            //vc.component._listOwnerRepairs(DEFAULT_PAGE, DEFAULT_ROWS);
+            vc.component._validateParam();
+        },
+        _initEvent:function(){
+            
+            vc.on('myRepairDispatch','listOwnerRepair',function(_param){
+                  vc.component._listOwnerRepairs(DEFAULT_PAGE, DEFAULT_ROWS);
+            });
+             vc.on('pagination','page_event',function(_currentPage){
+                vc.component._listOwnerRepairs(_currentPage,DEFAULT_ROWS);
+            });
+        },
+        methods:{
+            _validateParam:function(){
+
+                var param={
+                    params:{
+                        roomId:vc.component.myRepairDispatchInfo.conditions.roomId,
+                        communityId:vc.getCurrentCommunity().communityId,
+                        page:1,
+                        row:1
+                    }
+                };
+                //查询房屋信息 业主信息
+               vc.http.get('myRepairDispatch',
+                            'getRoom',
+                             param,
+                             function(json,res){
+                                if(res.status == 200){
+                                    var _roomInfos=JSON.parse(json);
+                                    if(!_roomInfos.hasOwnProperty("rooms")){
+                                         vc.message("非法操作,未找到房屋信息");
+                                         vc.jumpToPage('/flow/ownerFlow');
+                                         return ;
+                                    }
+                                    var _roomInfo = _roomInfos.rooms[0];
+                                    vc.component.myRepairDispatchInfo.conditions.roomName= _roomInfo.floorNum+"号楼 "+_roomInfo.unitNum+"单元 "+_roomInfo.roomNum + "室";
+                                    vc.component._listOwnerRepairs(DEFAULT_PAGE, DEFAULT_ROWS);
+                                }else{
+                                     vc.message("非法操作,未找到房屋信息");
+                                     vc.jumpToPage('/flow/ownerFlow');
+                                }
+                             },function(errInfo,error){
+                                console.log('请求失败处理');
+                                vc.message("非法操作,未找到房屋信息");
+                                vc.jumpToPage('/flow/ownerFlow');
+                             }
+                 );
+            },
+            _listOwnerRepairs:function(_page, _rows){
+                vc.component.myRepairDispatchInfo.conditions.page = _page;
+                vc.component.myRepairDispatchInfo.conditions.row = _rows;
+                vc.component.myRepairDispatchInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
+                var param = {
+                    params:vc.component.myRepairDispatchInfo.conditions
+               };
+
+               //发送get请求
+               vc.http.get('myRepairDispatch',
+                            'list',
+                             param,
+                             function(json,res){
+                                var _myRepairDispatchInfo=JSON.parse(json);
+                                vc.component.myRepairDispatchInfo.total = _myRepairDispatchInfo.total;
+                                vc.component.myRepairDispatchInfo.records = _myRepairDispatchInfo.records;
+                                vc.component.myRepairDispatchInfo.ownerRepairs = _myRepairDispatchInfo.ownerRepairs;
+                                vc.emit('pagination','init',{
+                                     total:vc.component.myRepairDispatchInfo.records,
+                                     currentPage:_page
+                                 });
+                             },function(errInfo,error){
+                                console.log('请求失败处理');
+                             }
+                           );
+            },
+            _openDealRepair:function(){
+                vc.emit('addOwnerRepair','openAddOwnerRepairModal',vc.component.myRepairDispatchInfo.conditions);
+            },
+            _moreCondition:function(){
+                if(vc.component.myRepairDispatchInfo.moreCondition){
+                    vc.component.myRepairDispatchInfo.moreCondition = false;
+                }else{
+                    vc.component.myRepairDispatchInfo.moreCondition = true;
+                }
+            }
+
+             
+        }
+    });
+})(window.vc);

+ 36 - 0
WebService/src/main/resources/views/myRepairDispatchFlow.html

@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en"
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:th="http://www.thymeleaf.org"
+      xmlns:vc="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8"/>
+    <title>我的派单|java110</title>
+    <vc:create name="commonTop"></vc:create>
+</head>
+<body>
+<vc:create name="bodyTop"></vc:create>
+<div id="wrapper">
+    <vc:create name="menu"></vc:create>
+
+
+    <div id="page-wrapper" class="gray-bg dashbard-1">
+        <div class="row border-bottom">
+            <vc:create name="nav"></vc:create>
+        </div>
+        <div class="wrapper wrapper-content" style="padding-bottom: 0px;">
+            <vc:create name="breadcrumb"></vc:create>
+        </div>
+        <!-- id="component" -->
+        <div class="wrapper wrapper-content animated fadeInRight">
+            <vc:create name="myRepairDispatchManage"></vc:create>
+        </div>
+
+        <vc:create name="copyright"></vc:create>
+
+    </div>
+</div>
+
+<vc:create name="commonBottom"></vc:create>
+</body>
+</html>

+ 38 - 0
java110-bean/src/main/java/com/java110/dto/repair/RepairDto.java

@@ -27,6 +27,11 @@ public class RepairDto extends PageDto implements Serializable {
     private String roomId;
     private String roomId;
     private String repairTypeName;
     private String repairTypeName;
 
 
+    private String staffId;
+
+    private String repairDispatchState;
+    private String repairDispatchContext;
+    private String repairDispatchStateName;
 
 
     private Date createTime;
     private Date createTime;
 
 
@@ -137,4 +142,37 @@ public class RepairDto extends PageDto implements Serializable {
     public void setRepairTypeName(String repairTypeName) {
     public void setRepairTypeName(String repairTypeName) {
         this.repairTypeName = repairTypeName;
         this.repairTypeName = repairTypeName;
     }
     }
+
+
+    public String getStaffId() {
+        return staffId;
+    }
+
+    public void setStaffId(String staffId) {
+        this.staffId = staffId;
+    }
+
+    public String getRepairDispatchState() {
+        return repairDispatchState;
+    }
+
+    public void setRepairDispatchState(String repairDispatchState) {
+        this.repairDispatchState = repairDispatchState;
+    }
+
+    public String getRepairDispatchContext() {
+        return repairDispatchContext;
+    }
+
+    public void setRepairDispatchContext(String repairDispatchContext) {
+        this.repairDispatchContext = repairDispatchContext;
+    }
+
+    public String getRepairDispatchStateName() {
+        return repairDispatchStateName;
+    }
+
+    public void setRepairDispatchStateName(String repairDispatchStateName) {
+        this.repairDispatchStateName = repairDispatchStateName;
+    }
 }
 }

+ 39 - 0
java110-bean/src/main/java/com/java110/vo/api/ownerRepair/ApiOwnerRepairDataVo.java

@@ -16,6 +16,12 @@ public class ApiOwnerRepairDataVo implements Serializable {
     private String stateName;
     private String stateName;
     private String repairTypeName;
     private String repairTypeName;
 
 
+    private String staffId;
+
+    private String repairDispatchState;
+    private String repairDispatchContext;
+    private String repairDispatchStateName;
+
     public String getRepairId() {
     public String getRepairId() {
         return repairId;
         return repairId;
     }
     }
@@ -95,4 +101,37 @@ public class ApiOwnerRepairDataVo implements Serializable {
     public void setRepairTypeName(String repairTypeName) {
     public void setRepairTypeName(String repairTypeName) {
         this.repairTypeName = repairTypeName;
         this.repairTypeName = repairTypeName;
     }
     }
+
+
+    public String getStaffId() {
+        return staffId;
+    }
+
+    public void setStaffId(String staffId) {
+        this.staffId = staffId;
+    }
+
+    public String getRepairDispatchState() {
+        return repairDispatchState;
+    }
+
+    public void setRepairDispatchState(String repairDispatchState) {
+        this.repairDispatchState = repairDispatchState;
+    }
+
+    public String getRepairDispatchContext() {
+        return repairDispatchContext;
+    }
+
+    public void setRepairDispatchContext(String repairDispatchContext) {
+        this.repairDispatchContext = repairDispatchContext;
+    }
+
+    public String getRepairDispatchStateName() {
+        return repairDispatchStateName;
+    }
+
+    public void setRepairDispatchStateName(String repairDispatchStateName) {
+        this.repairDispatchStateName = repairDispatchStateName;
+    }
 }
 }

+ 30 - 1
java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml

@@ -122,8 +122,24 @@
         ELSE
         ELSE
         '客厅报修'
         '客厅报修'
         END) repairTypeName
         END) repairTypeName
+        <if test="staffId != null and staffId != ''">
+            ,rru.state repairDispatchState,rru.context repairDispatchContext,td.name repairDispatchStateName
+        </if>
         from r_repair_pool t
         from r_repair_pool t
+        <if test="staffId != null and staffId != ''">
+            ,r_repair_user rru
+            ,t_dict td
+        </if>
         where 1 =1
         where 1 =1
+        <if test="staffId != null and staffId != ''">
+            and t.repair_id = rru.repair_id
+            and user_id = #{staffId}
+            and community_id = #{communityId}
+            and status_cd = '0'
+            and td.`table_name` = 'r_repair_user'
+            AND td.`table_columns` = 'state'
+            AND td.`status_cd` = rru.state
+        </if>
         <if test="repairName !=null and repairName != ''">
         <if test="repairName !=null and repairName != ''">
             and t.repair_name= #{repairName}
             and t.repair_name= #{repairName}
         </if>
         </if>
@@ -207,8 +223,21 @@
     <!-- 查询报修信息数量 add by wuxw 2018-07-03 -->
     <!-- 查询报修信息数量 add by wuxw 2018-07-03 -->
     <select id="queryRepairsCount" parameterType="Map" resultType="Map">
     <select id="queryRepairsCount" parameterType="Map" resultType="Map">
         select count(1) count
         select count(1) count
-        from r_repair_pool t
+        from r_repair_pool t,
+        <if test="staffId != null and staffId != ''">
+            ,r_repair_user rru
+            ,t_dict td
+        </if>
         where 1 =1
         where 1 =1
+        <if test="staffId != null and staffId != ''">
+            and t.repair_id = rru.repair_id
+            and user_id = #{staffId}
+            and community_id = #{communityId}
+            and status_cd = '0'
+            and td.`table_name` = 'r_repair_user'
+            AND td.`table_columns` = 'state'
+            AND td.`status_cd` = rru.state
+        </if>
         <if test="repairName !=null and repairName != ''">
         <if test="repairName !=null and repairName != ''">
             and t.repair_name= #{repairName}
             and t.repair_name= #{repairName}
         </if>
         </if>