Browse Source

收费组详情

weiximei 6 years ago
parent
commit
25006b3443

+ 34
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BillInvoiceController.java View File

@@ -1,10 +1,23 @@
1 1
 package com.community.huiju.controller;
2 2
 
3 3
 
4
+import com.community.commom.mode.ResponseBean;
5
+import com.community.commom.session.UserElement;
4 6
 import com.community.huiju.common.base.BaseController;
7
+import com.community.huiju.service.IBillInvoiceService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.cloud.context.config.annotation.RefreshScope;
14
+import org.springframework.web.bind.annotation.RequestBody;
5 15
 import org.springframework.web.bind.annotation.RequestMapping;
16
+import org.springframework.web.bind.annotation.RequestMethod;
6 17
 import org.springframework.web.bind.annotation.RestController;
7 18
 
19
+import javax.servlet.http.HttpSession;
20
+
8 21
 /**
9 22
  * <p>
10 23
  * 缴费单 前端控制器
@@ -14,7 +27,27 @@ import org.springframework.web.bind.annotation.RestController;
14 27
  * @since 2019-02-13
15 28
  */
16 29
 @RestController
17
-@RequestMapping("/tp/bill-invoice")
30
+@RequestMapping("/")
31
+@RefreshScope
32
+@Api(value = "缴费单 API", description = "缴费单 API")
18 33
 public class BillInvoiceController extends BaseController {
19 34
 
35
+    @Autowired
36
+    private IBillInvoiceService iBillInvoiceService;
37
+
38
+    @ApiOperation(value = "查询缴费单", notes = "查询缴费单")
39
+    @ApiImplicitParams({
40
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billId: 缴费项目id," +
41
+                    "phase: 期,building: 栋,unit: 单元,roomNo: 户号,ownerName: 业主姓名," +
42
+                    "billStatus: 缴费状态,payName: 缴费人,pageSize: 一页多少行,pageNum: 第几页"),
43
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
44
+    })
45
+    @RequestMapping(value = "/bill/invoice/list", method = RequestMethod.POST)
46
+    public ResponseBean getBillList(HttpSession session, @RequestBody String parameter) {
47
+        ResponseBean responseBean = new ResponseBean();
48
+        UserElement userElement = getUserElement(session);
49
+        responseBean = iBillInvoiceService.getBillList(parameter, userElement);
50
+        return responseBean;
51
+    }
52
+
20 53
 }

+ 53
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/BillInvoice.java View File

@@ -1,5 +1,8 @@
1 1
 package com.community.huiju.model;
2 2
 
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
5
+import com.baomidou.mybatisplus.annotation.TableId;
3 6
 import com.baomidou.mybatisplus.annotation.TableName;
4 7
 import lombok.Data;
5 8
 import lombok.EqualsAndHashCode;
@@ -24,6 +27,9 @@ public class BillInvoice implements Serializable {
24 27
 
25 28
     private static final long serialVersionUID = 1L;
26 29
 
30
+    @TableId(value = "id", type = IdType.AUTO)
31
+    private Integer id;
32
+
27 33
     /**
28 34
      * 小区id
29 35
      */
@@ -94,5 +100,52 @@ public class BillInvoice implements Serializable {
94 100
      */
95 101
     private LocalDateTime updateDate;
96 102
 
103
+    /**
104
+     * 业主姓名
105
+     */
106
+    @TableField(exist = false)
107
+    private String ownerName;
108
+
109
+    /**
110
+     * 期
111
+     */
112
+    @TableField(exist = false)
113
+    private String phase;
114
+
115
+    /**
116
+     * 栋
117
+     */
118
+    @TableField(exist = false)
119
+    private String building;
120
+
121
+    /**
122
+     * 单元
123
+     */
124
+    @TableField(exist = false)
125
+    private String unit;
126
+
127
+    /**
128
+     * 户号
129
+     */
130
+    @TableField(exist = false)
131
+    private String roomNo;
132
+
133
+    /**
134
+     * 流水账单编号
135
+     */
136
+    @TableField(exist = false)
137
+    private Integer billStatement;
138
+
139
+    /**
140
+     * 创建人姓名
141
+     */
142
+    @TableField(exist = false)
143
+    private String createUserName;
144
+
145
+    /**
146
+     * 修改人姓名
147
+     */
148
+    @TableField(exist = false)
149
+    private String updateUserName;
97 150
 
98 151
 }

+ 2
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IBillInvoiceService.java View File

@@ -2,6 +2,7 @@ package com.community.huiju.service;
2 2
 
3 3
 import com.baomidou.mybatisplus.extension.service.IService;
4 4
 import com.community.commom.mode.ResponseBean;
5
+import com.community.commom.session.UserElement;
5 6
 import com.community.huiju.model.BillInvoice;
6 7
 
7 8
 /**
@@ -20,7 +21,7 @@ public interface IBillInvoiceService extends IService<BillInvoice> {
20 21
      * @param parameter
21 22
      * @return
22 23
      */
23
-    ResponseBean getBillList(String parameter);
24
+    ResponseBean getBillList(String parameter, UserElement userElement);
24 25
 
25 26
 
26 27
 }

+ 3
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BillInvoiceServiceImpl.java View File

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7 7
 import com.community.commom.mode.ResponseBean;
8
+import com.community.commom.session.UserElement;
8 9
 import com.community.huiju.dao.BillMapper;
9 10
 import com.community.huiju.dao.BillStatementMapper;
10 11
 import com.community.huiju.model.BillInvoice;
@@ -40,7 +41,7 @@ public class BillInvoiceServiceImpl extends ServiceImpl<BillInvoiceMapper, BillI
40 41
     private BillStatementMapper billStatementMapper;
41 42
 
42 43
     @Override
43
-    public ResponseBean getBillList(String parameter) {
44
+    public ResponseBean getBillList(String parameter, UserElement userElement) {
44 45
         ResponseBean responseBean = new ResponseBean();
45 46
         JSONObject jsonObject = JSONObject.parseObject(parameter);
46 47
 
@@ -72,6 +73,7 @@ public class BillInvoiceServiceImpl extends ServiceImpl<BillInvoiceMapper, BillI
72 73
         map.put("ownerName", ownerName);
73 74
         map.put("billStatus", billStatus);
74 75
         map.put("payName", payName);
76
+        map.put("communityId", userElement.getCommunityId());
75 77
 
76 78
 
77 79
         Page<BillInvoice> page = new Page<>();

+ 18
- 7
CODE/smart-community/property-api/src/main/resources/mapper/BillInvoiceMapper.xml View File

@@ -5,14 +5,19 @@
5 5
     <select id="selectBillInvoice" resultType="com.community.huiju.model.BillInvoice">
6 6
 
7 7
         SELECT
8
-            tpi.*, tboi.owner_name,
9
-            tboi.phase,
10
-            tboi.building,
11
-            tboi.unit,
12
-            tboi.room_no
8
+            tpi.*,
9
+            tboi.owner_name as ownerName,
10
+            tboi.phase as phase,
11
+            tboi.building as building,
12
+            tboi.unit as unit,
13
+            tboi.room_no as roomNo,
14
+            tbs.id as billStatement,
15
+            (SELECT user_name from tp_user tu WHERE tu.id = tpi.create_user) as createUserName,
16
+            (SELECT user_name from tp_user tu WHERE tu.id = tpi.update_user) as updateUserName
13 17
         FROM
14
-            tp_bill_invoice tpi
18
+          tp_bill_invoice tpi
15 19
         LEFT JOIN tp_building_owner_info tboi ON tpi.building_owner_info_id = tboi.id
20
+        LEFT JOIN tp_bill_statement tbs ON tpi.bill_statement_id = tbs.bill_invoice_id
16 21
         <where>
17 22
             <trim prefixOverrides="and | or">
18 23
                 <if test="map.phase != null and map.phase != ''">
@@ -30,12 +35,18 @@
30 35
                 <if test="map.ownerName != null and map.ownerName != ''">
31 36
                     AND tboi.owner_name = #{map.ownerName}
32 37
                 </if>
33
-                <if test="map.billStatus != null and map.billStatu != ''">
38
+                <if test="map.billStatus != null and map.billStatus != ''">
34 39
                     AND tpi.bill_status = #{map.billStatus}
35 40
                 </if>
36 41
                 <if test="map.payName != null and map.payName != ''">
37 42
                     AND tpi.pay_name = #{map.payName}
38 43
                 </if>
44
+                <if test="map.billId != null">
45
+                    AND tpi.bill_id = #{map.billId}
46
+                </if>
47
+                <if test="map.communityId != null">
48
+                    AND tpi.community_Id = #{map.communityId}
49
+                </if>
39 50
             </trim>
40 51
         </where>
41 52
 

+ 31
- 0
VUECODE/smart-property-manage/src/api/billInvoice.js View File

@@ -0,0 +1,31 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询缴费单
4
+export function getBillInvoiceList(data) {
5
+  return request({
6
+    url: '/bill/invoice/list',
7
+    method: 'post',
8
+    data: {
9
+      billId: data.billId, // 缴费项目id
10
+      phase: data.phase,
11
+      building: data.building,
12
+      unit: data.unit,
13
+      roomNo: data.roomNo,
14
+      ownerName: data.ownerName,
15
+      billStatus: data.billStatus,
16
+      payName: data.payName,
17
+      pageSize: data.pageSize,
18
+      pageNum: data.pageNum
19
+    }
20
+  })
21
+}
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+

+ 3
- 1
VUECODE/smart-property-manage/src/store/index.js View File

@@ -12,6 +12,7 @@ import announcement from './modules/announcement'
12 12
 import buildingOwnerInfo from './modules/buildingOwnerInfo'
13 13
 import activity from './modules/activity'
14 14
 import role from './modules/role'
15
+import billInvoice from './modules/billInvoice'
15 16
 
16 17
 Vue.use(Vuex)
17 18
 
@@ -27,7 +28,8 @@ const store = new Vuex.Store({
27 28
     announcement,
28 29
     activity,
29 30
     transaction,
30
-    role
31
+    role,
32
+    billInvoice
31 33
   },
32 34
   getters
33 35
 })

+ 23
- 0
VUECODE/smart-property-manage/src/store/modules/billInvoice.js View File

@@ -0,0 +1,23 @@
1
+import { getBillInvoiceList } from '@/api/billInvoice'
2
+
3
+const billInvoice = {
4
+  state: {
5
+
6
+  },
7
+  mutations: {
8
+
9
+  },
10
+  actions: {
11
+    GetBillInvoiceList({ commit }, data) {
12
+      return new Promise((resolve, reject) => {
13
+        getBillInvoiceList(data).then(response => {
14
+          resolve(response)
15
+        }).catch(error => {
16
+          reject(error)
17
+        })
18
+      })
19
+    }
20
+  }
21
+}
22
+
23
+export default billInvoice

+ 1
- 1
VUECODE/smart-property-manage/src/views/bill/index.vue View File

@@ -10,7 +10,7 @@ export default {
10 10
   name: 'Index',
11 11
   methods: {
12 12
     getInfo() {
13
-      this.$router.push({ name: 'bill-info' })
13
+      this.$router.push({ name: 'bill-info', params: { id: 187 }})
14 14
     }
15 15
   }
16 16
 }

+ 54
- 17
VUECODE/smart-property-manage/src/views/bill/info/index.vue View File

@@ -74,47 +74,62 @@
74 74
         type="selection"
75 75
         width="55"/>
76 76
       <el-table-column
77
-        label="收费单号">
78
-        <template slot-scope="scope">{{ scope.row.date }}</template>
77
+        prop="id"
78
+        label="收费单号"
79
+        width="55">
80
+        <!--<template slot-scope="scope">{{ scope.row.date }}</template>-->
79 81
       </el-table-column>
80 82
       <el-table-column
81 83
         prop="name"
82
-        label="房屋信息"/>
84
+        label="房屋信息">
85
+        <template slot-scope="scope">{{ scope.row.phase + '期' + scope.row.building + '栋' + scope.row.unit + '单元' + scope.row.roomNo + '户号' }}</template>
86
+      </el-table-column>
83 87
       <el-table-column
84
-        prop="address"
88
+        prop="ownerName"
85 89
         label="业主姓名"
86 90
         show-overflow-tooltip/>
87 91
       <el-table-column
88
-        prop="name"
89
-        label="收费单说明"/>
92
+        prop="billInvoiceExplain"
93
+        label="收费单说明"
94
+        width="300"/>
90 95
       <el-table-column
91
-        prop="name"
96
+        prop="payPrice"
92 97
         label="金额(元)"/>
93 98
       <el-table-column
94
-        prop="name"
99
+        prop="billStatement"
95 100
         label="流水"/>
96 101
       <el-table-column
97
-        prop="name"
102
+        prop="billStatus"
98 103
         label="缴费状态"/>
99 104
       <el-table-column
100
-        prop="name"
105
+        prop="payName"
101 106
         label="缴费人"/>
102 107
       <el-table-column
103
-        prop="name"
108
+        prop="payDate"
104 109
         label="缴费时间"/>
105 110
       <el-table-column
106
-        prop="name"
111
+        prop="createDate"
107 112
         label="新建时间"/>
108 113
       <el-table-column
109
-        prop="name"
114
+        prop="createUserName"
110 115
         label="新建人"/>
111 116
       <el-table-column
112
-        prop="name"
117
+        prop="updateUserName"
113 118
         label="修改时间"/>
114 119
       <el-table-column
115
-        prop="name"
120
+        prop="updateDate"
116 121
         label="修改时间"/>
117 122
     </el-table>
123
+    <div class="pagination-info">
124
+      <el-pagination
125
+        :current-page="formInline.pageNum"
126
+        :page-sizes="[100, 200, 300, 400]"
127
+        :page-size="formInline.pageSize"
128
+        :total="total"
129
+        layout="total, sizes, prev, pager, next, jumper"
130
+        @size-change="handleSizeChange"
131
+        @current-change="handleCurrentChange"/>
132
+    </div>
118 133
   </div>
119 134
 </template>
120 135
 
@@ -131,17 +146,35 @@ export default {
131 146
         roomNo: '',
132 147
         ownerName: '',
133 148
         billStatus: '',
134
-        payName: ''
149
+        payName: '',
150
+        pageSize: 10,
151
+        pageNum: 1
135 152
       },
136 153
       billName: 'xxx收费项目',
137 154
       billExplain: 'xxx收费说明',
138 155
       endDate: 'xxx收费项截止时间',
139
-      list: [] // 数据列表
156
+      list: [], // 数据列表
157
+      total: 0
140 158
     }
141 159
   },
160
+  mounted() {
161
+    this.formInline.billId = this.$route.params.id
162
+    this.getBillInvoice()
163
+  },
142 164
   methods: {
143 165
     handleSelectionChange(val) {
144 166
       console.log(val)
167
+    },
168
+    getBillInvoice() {
169
+      this.$store.dispatch('GetBillInvoiceList', this.formInline).then(res => {
170
+        const resData = res.data
171
+        this.list = resData.list
172
+        this.formInline.pageNum = resData.pageNum
173
+        this.formInline.pageSize = resData.pageSize
174
+        this.total = resData.total
175
+      }).catch(() => {
176
+        console.log('GetBillInvoiceList error')
177
+      })
145 178
     }
146 179
   }
147 180
 }
@@ -172,4 +205,8 @@ export default {
172 205
   flex-wrap: wrap;
173 206
   margin-left: 20px;
174 207
 }
208
+.pagination-info {
209
+  display: flex;
210
+  justify-content: flex-end;
211
+}
175 212
 </style>