Pārlūkot izejas kodu

收费组详情

weiximei 6 gadus atpakaļ
vecāks
revīzija
25006b3443

+ 34
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/BillInvoiceController.java Parādīt failu

1
 package com.community.huiju.controller;
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
 import com.community.huiju.common.base.BaseController;
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
 import org.springframework.web.bind.annotation.RequestMapping;
15
 import org.springframework.web.bind.annotation.RequestMapping;
16
+import org.springframework.web.bind.annotation.RequestMethod;
6
 import org.springframework.web.bind.annotation.RestController;
17
 import org.springframework.web.bind.annotation.RestController;
7
 
18
 
19
+import javax.servlet.http.HttpSession;
20
+
8
 /**
21
 /**
9
  * <p>
22
  * <p>
10
  * 缴费单 前端控制器
23
  * 缴费单 前端控制器
14
  * @since 2019-02-13
27
  * @since 2019-02-13
15
  */
28
  */
16
 @RestController
29
 @RestController
17
-@RequestMapping("/tp/bill-invoice")
30
+@RequestMapping("/")
31
+@RefreshScope
32
+@Api(value = "缴费单 API", description = "缴费单 API")
18
 public class BillInvoiceController extends BaseController {
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 Parādīt failu

1
 package com.community.huiju.model;
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
 import com.baomidou.mybatisplus.annotation.TableName;
6
 import com.baomidou.mybatisplus.annotation.TableName;
4
 import lombok.Data;
7
 import lombok.Data;
5
 import lombok.EqualsAndHashCode;
8
 import lombok.EqualsAndHashCode;
24
 
27
 
25
     private static final long serialVersionUID = 1L;
28
     private static final long serialVersionUID = 1L;
26
 
29
 
30
+    @TableId(value = "id", type = IdType.AUTO)
31
+    private Integer id;
32
+
27
     /**
33
     /**
28
      * 小区id
34
      * 小区id
29
      */
35
      */
94
      */
100
      */
95
     private LocalDateTime updateDate;
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 Parādīt failu

2
 
2
 
3
 import com.baomidou.mybatisplus.extension.service.IService;
3
 import com.baomidou.mybatisplus.extension.service.IService;
4
 import com.community.commom.mode.ResponseBean;
4
 import com.community.commom.mode.ResponseBean;
5
+import com.community.commom.session.UserElement;
5
 import com.community.huiju.model.BillInvoice;
6
 import com.community.huiju.model.BillInvoice;
6
 
7
 
7
 /**
8
 /**
20
      * @param parameter
21
      * @param parameter
21
      * @return
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 Parādīt failu

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

+ 18
- 7
CODE/smart-community/property-api/src/main/resources/mapper/BillInvoiceMapper.xml Parādīt failu

5
     <select id="selectBillInvoice" resultType="com.community.huiju.model.BillInvoice">
5
     <select id="selectBillInvoice" resultType="com.community.huiju.model.BillInvoice">
6
 
6
 
7
         SELECT
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
         FROM
17
         FROM
14
-            tp_bill_invoice tpi
18
+          tp_bill_invoice tpi
15
         LEFT JOIN tp_building_owner_info tboi ON tpi.building_owner_info_id = tboi.id
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
         <where>
21
         <where>
17
             <trim prefixOverrides="and | or">
22
             <trim prefixOverrides="and | or">
18
                 <if test="map.phase != null and map.phase != ''">
23
                 <if test="map.phase != null and map.phase != ''">
30
                 <if test="map.ownerName != null and map.ownerName != ''">
35
                 <if test="map.ownerName != null and map.ownerName != ''">
31
                     AND tboi.owner_name = #{map.ownerName}
36
                     AND tboi.owner_name = #{map.ownerName}
32
                 </if>
37
                 </if>
33
-                <if test="map.billStatus != null and map.billStatu != ''">
38
+                <if test="map.billStatus != null and map.billStatus != ''">
34
                     AND tpi.bill_status = #{map.billStatus}
39
                     AND tpi.bill_status = #{map.billStatus}
35
                 </if>
40
                 </if>
36
                 <if test="map.payName != null and map.payName != ''">
41
                 <if test="map.payName != null and map.payName != ''">
37
                     AND tpi.pay_name = #{map.payName}
42
                     AND tpi.pay_name = #{map.payName}
38
                 </if>
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
             </trim>
50
             </trim>
40
         </where>
51
         </where>
41
 
52
 

+ 31
- 0
VUECODE/smart-property-manage/src/api/billInvoice.js Parādīt failu

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 Parādīt failu

12
 import buildingOwnerInfo from './modules/buildingOwnerInfo'
12
 import buildingOwnerInfo from './modules/buildingOwnerInfo'
13
 import activity from './modules/activity'
13
 import activity from './modules/activity'
14
 import role from './modules/role'
14
 import role from './modules/role'
15
+import billInvoice from './modules/billInvoice'
15
 
16
 
16
 Vue.use(Vuex)
17
 Vue.use(Vuex)
17
 
18
 
27
     announcement,
28
     announcement,
28
     activity,
29
     activity,
29
     transaction,
30
     transaction,
30
-    role
31
+    role,
32
+    billInvoice
31
   },
33
   },
32
   getters
34
   getters
33
 })
35
 })

+ 23
- 0
VUECODE/smart-property-manage/src/store/modules/billInvoice.js Parādīt failu

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 Parādīt failu

10
   name: 'Index',
10
   name: 'Index',
11
   methods: {
11
   methods: {
12
     getInfo() {
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 Parādīt failu

74
         type="selection"
74
         type="selection"
75
         width="55"/>
75
         width="55"/>
76
       <el-table-column
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
       </el-table-column>
81
       </el-table-column>
80
       <el-table-column
82
       <el-table-column
81
         prop="name"
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
       <el-table-column
87
       <el-table-column
84
-        prop="address"
88
+        prop="ownerName"
85
         label="业主姓名"
89
         label="业主姓名"
86
         show-overflow-tooltip/>
90
         show-overflow-tooltip/>
87
       <el-table-column
91
       <el-table-column
88
-        prop="name"
89
-        label="收费单说明"/>
92
+        prop="billInvoiceExplain"
93
+        label="收费单说明"
94
+        width="300"/>
90
       <el-table-column
95
       <el-table-column
91
-        prop="name"
96
+        prop="payPrice"
92
         label="金额(元)"/>
97
         label="金额(元)"/>
93
       <el-table-column
98
       <el-table-column
94
-        prop="name"
99
+        prop="billStatement"
95
         label="流水"/>
100
         label="流水"/>
96
       <el-table-column
101
       <el-table-column
97
-        prop="name"
102
+        prop="billStatus"
98
         label="缴费状态"/>
103
         label="缴费状态"/>
99
       <el-table-column
104
       <el-table-column
100
-        prop="name"
105
+        prop="payName"
101
         label="缴费人"/>
106
         label="缴费人"/>
102
       <el-table-column
107
       <el-table-column
103
-        prop="name"
108
+        prop="payDate"
104
         label="缴费时间"/>
109
         label="缴费时间"/>
105
       <el-table-column
110
       <el-table-column
106
-        prop="name"
111
+        prop="createDate"
107
         label="新建时间"/>
112
         label="新建时间"/>
108
       <el-table-column
113
       <el-table-column
109
-        prop="name"
114
+        prop="createUserName"
110
         label="新建人"/>
115
         label="新建人"/>
111
       <el-table-column
116
       <el-table-column
112
-        prop="name"
117
+        prop="updateUserName"
113
         label="修改时间"/>
118
         label="修改时间"/>
114
       <el-table-column
119
       <el-table-column
115
-        prop="name"
120
+        prop="updateDate"
116
         label="修改时间"/>
121
         label="修改时间"/>
117
     </el-table>
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
   </div>
133
   </div>
119
 </template>
134
 </template>
120
 
135
 
131
         roomNo: '',
146
         roomNo: '',
132
         ownerName: '',
147
         ownerName: '',
133
         billStatus: '',
148
         billStatus: '',
134
-        payName: ''
149
+        payName: '',
150
+        pageSize: 10,
151
+        pageNum: 1
135
       },
152
       },
136
       billName: 'xxx收费项目',
153
       billName: 'xxx收费项目',
137
       billExplain: 'xxx收费说明',
154
       billExplain: 'xxx收费说明',
138
       endDate: 'xxx收费项截止时间',
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
   methods: {
164
   methods: {
143
     handleSelectionChange(val) {
165
     handleSelectionChange(val) {
144
       console.log(val)
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
   flex-wrap: wrap;
205
   flex-wrap: wrap;
173
   margin-left: 20px;
206
   margin-left: 20px;
174
 }
207
 }
208
+.pagination-info {
209
+  display: flex;
210
+  justify-content: flex-end;
211
+}
175
 </style>
212
 </style>