dingxin 6 anos atrás
pai
commit
b68aa6df34
17 arquivos alterados com 2663 adições e 2029 exclusões
  1. 46
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TaVersionController.java
  2. 11
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaVersionMapper.java
  3. 68
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaVersion.java
  4. 21
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TaVersionServicel.java
  5. 8
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FaceServicelimpl.java
  6. 27
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/HKServiceImpl.java
  7. 48
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaVersionServiceimpl.java
  8. 15
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TaVersionMapper.xml
  9. 25
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TaUserLicenseOrderController.java
  10. 26
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserLicenseOrderMapper.java
  11. 6
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITaUserLicenseOrderService.java
  12. 98
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TaUserLicenseOrderServiceImpl.java
  13. 9
    0
      VUECODE/smart-property-manage/src/api/license.js
  14. 10
    1
      VUECODE/smart-property-manage/src/store/modules/license.js
  15. 31
    2
      VUECODE/smart-property-manage/src/views/bill/license/index.vue
  16. 1101
    1010
      文档/MYSQL/smartCommunity.pdb
  17. 1113
    1010
      文档/MYSQL/smartCommunity.pdm

+ 46
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TaVersionController.java Ver arquivo

@@ -0,0 +1,46 @@
1
+package com.community.huiju.controller;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.huiju.service.TaVersionServicel;
5
+import io.swagger.annotations.Api;
6
+import io.swagger.annotations.ApiImplicitParam;
7
+import io.swagger.annotations.ApiImplicitParams;
8
+import io.swagger.annotations.ApiOperation;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.cloud.context.config.annotation.RefreshScope;
11
+import org.springframework.web.bind.annotation.PathVariable;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RequestMethod;
14
+import org.springframework.web.bind.annotation.RestController;
15
+
16
+import javax.servlet.http.HttpSession;
17
+
18
+/**
19
+ * version V1.0
20
+ * class_name: $METHOD_NAME$
21
+ * param: $METHOD_PARAM$
22
+ * describe: TODO
23
+ * creat_user:fuxingfan
24
+ * creat_time: 2019/5/9
25
+ **/
26
+@RestController
27
+@RefreshScope
28
+@RequestMapping("/")
29
+@Api(value = "版本相关的API", description = "版本相关的API")
30
+public class TaVersionController extends BaseController {
31
+
32
+
33
+    @Autowired
34
+    private TaVersionServicel taVersionService;
35
+
36
+
37
+    @ApiOperation(value = "获取APP版本号并对比", notes = "获取APP版本号并对比")
38
+    @ApiImplicitParams({
39
+            @ApiImplicitParam(paramType = "path",dataType = "String",name = "type",value = "ios/android"),
40
+    })
41
+    @RequestMapping(value = "/version/{type}",method = RequestMethod.GET)
42
+    public ResponseBean getVersion(@PathVariable String type, HttpSession session){
43
+        ResponseBean responseBean = taVersionService.getVersion(type);
44
+        return responseBean;
45
+    }
46
+}

+ 11
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaVersionMapper.java Ver arquivo

@@ -0,0 +1,11 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TaVersion;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+
8
+@Mapper
9
+public interface TaVersionMapper {
10
+    TaVersion getVersion(@Param("type") String type);
11
+}

+ 68
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaVersion.java Ver arquivo

@@ -0,0 +1,68 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+import java.util.List;
5
+
6
+public class TaVersion {
7
+    private Integer id;
8
+    
9
+    /**
10
+     * 客户端版本号
11
+     */
12
+    private String clientVersion;
13
+    
14
+    /**
15
+     *  服务端版本号
16
+     */
17
+    private String serviceVersion;
18
+    
19
+    /**
20
+     * 类型
21
+     */
22
+    private String type;
23
+    
24
+    /**
25
+     * 升级地址
26
+     */
27
+    private String updateAddress;
28
+    
29
+    public Integer getId() {
30
+        return id;
31
+    }
32
+    
33
+    public void setId(Integer id) {
34
+        this.id = id;
35
+    }
36
+    
37
+    public String getClientVersion() {
38
+        return clientVersion;
39
+    }
40
+    
41
+    public void setClientVersion(String clientVersion) {
42
+        this.clientVersion = clientVersion;
43
+    }
44
+    
45
+    public String getServiceVersion() {
46
+        return serviceVersion;
47
+    }
48
+    
49
+    public void setServiceVersion(String serviceVersion) {
50
+        this.serviceVersion = serviceVersion;
51
+    }
52
+    
53
+    public String getType() {
54
+        return type;
55
+    }
56
+    
57
+    public void setType(String type) {
58
+        this.type = type;
59
+    }
60
+    
61
+    public String getUpdateAddress() {
62
+        return updateAddress;
63
+    }
64
+    
65
+    public void setUpdateAddress(String updateAddress) {
66
+        this.updateAddress = updateAddress;
67
+    }
68
+}

+ 21
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TaVersionServicel.java Ver arquivo

@@ -0,0 +1,21 @@
1
+package com.community.huiju.service;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.commom.session.UserElement;
5
+
6
+/**
7
+ * version V1.0
8
+ * class_name: $METHOD_NAME$
9
+ * param: $METHOD_PARAM$
10
+ * describe: TODO
11
+ * creat_user:fuxingfan
12
+ * creat_time: 2019/5/9
13
+ **/
14
+public interface TaVersionServicel {
15
+    /**
16
+     * 获取版本号
17
+     * @param type
18
+     * @return
19
+     */
20
+    ResponseBean getVersion(String type);
21
+}

+ 8
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FaceServicelimpl.java Ver arquivo

@@ -240,8 +240,14 @@ public class FaceServicelimpl implements FaceServiceI {
240 240
                 userIdList.add(user.getHkUserId());
241 241
                 //临时设备编号
242 242
                 // TODO 根据期楼栋号,来查询出门口机
243
-                List<String> visualList = new ArrayList<>();
244
-                visualList.add("10010100000");
243
+
244
+                // 单元门口机
245
+                List<TpEquipment> visualEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitId(communityId, unitId, 3);
246
+                List<String> visualList = visualEquipments.stream()
247
+                        .map(e-> tpConfigurationMapper.selectByPrimaryKey(e.getUuidId()).getConfigurationValue())
248
+                        .collect(Collectors.toList());
249
+//                List<String> visualList = new ArrayList<>();
250
+//                visualList.add("10010100000");
245 251
                 HKOpenApi.visualIntercom(tpEquipmentTree.getOpUserUuid(), 1, userIdList, visualList, tpEquipmentTree.getAppkey(), tpEquipmentTree.getSecret(), tpEquipmentTree.getHttpServer());
246 252
             } else {
247 253
                 responseBean.addError("请录入正确图片");

+ 27
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/HKServiceImpl.java Ver arquivo

@@ -13,6 +13,7 @@ import com.community.huiju.service.IHKService;
13 13
 import com.google.common.collect.Lists;
14 14
 import com.google.common.collect.Maps;
15 15
 import lombok.extern.slf4j.Slf4j;
16
+import org.apache.commons.collections.CollectionUtils;
16 17
 import org.apache.commons.lang.StringUtils;
17 18
 import org.springframework.beans.factory.annotation.Autowired;
18 19
 import org.springframework.stereotype.Service;
@@ -131,8 +132,14 @@ public class HKServiceImpl implements IHKService {
131 132
         addOutDoorAuthMap.put("personIds", Arrays.asList(user.getHkUserId()));
132 133
         addOutDoorAuthMap.put("secret", tpEquipmentTree.getSecret());
133 134
         addOutDoorAuthMap.put("appkey", tpEquipmentTree.getAppkey());
134
-        List<String> visualList = new ArrayList<>();
135
-        visualList.add("10010100000");
135
+
136
+        // 单元门口机
137
+        List<TpEquipment> visualEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitId(userVerify.getCommunityId(), userVerify.getUnitId(), 3);
138
+        List<String> visualList = visualEquipments.stream()
139
+                .map(e-> tpConfigurationMapper.selectByPrimaryKey(e.getUuidId()).getConfigurationValue())
140
+                .collect(Collectors.toList());
141
+//        List<String> visualList = new ArrayList<>();
142
+//        visualList.add("10010100000");
136 143
         addOutDoorAuthMap.put("longNums", visualList);
137 144
         // 可视对讲下发 权限
138 145
         visualIntercomPermissions(addOutDoorAuthMap);
@@ -319,12 +326,28 @@ public class HKServiceImpl implements IHKService {
319 326
         // 查询当前的房产
320 327
         TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userVerifyId);
321 328
         TpEquipmentTree tpEquipmentTree = tpEquipmentTreeMapper.selectByCommunityId(userVerify.getCommunityId());
329
+        // 单元门口机
330
+        List<TpEquipment> tpEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitId(userVerify.getCommunityId(), userVerify.getUnitId(), 3);
331
+
332
+         if (CollectionUtils.isEmpty(tpEquipments)) {
333
+             responseBean.addError("无设备信息!");
334
+             return responseBean;
335
+         }
336
+
337
+         String str = "";
338
+         for (TpEquipment e : tpEquipments) {
339
+             TpConfiguration tpConfiguration = tpConfigurationMapper.selectByPrimaryKey(e.getUuidId());
340
+             str += tpConfiguration.getConfigurationValue();
341
+             str += ",";
342
+         }
322 343
 
323
-        // TODO 查询设备编号
344
+        // 查询设备编号
324 345
 
325 346
         Map<String,Object> parMap = com.beust.jcommander.internal.Maps.newHashMap();
326
-        parMap.put("longNums", "10010100000");
347
+        parMap.put("longNums", str);
327 348
         parMap.put("openapi_ip_port_http", tpEquipmentTree.getHttpServer());
349
+        parMap.put("secret", tpEquipmentTree.getSecret());
350
+        parMap.put("appkey", tpEquipmentTree.getAppkey());
328 351
         String data = HKOpenApi.syncControl(parMap);
329 352
         JSONObject jsonObject = JSONObject.parseObject(data);
330 353
         int errorCode = jsonObject.getInteger("errorCode");

+ 48
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaVersionServiceimpl.java Ver arquivo

@@ -0,0 +1,48 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.commom.session.UserElement;
5
+import com.community.huiju.dao.TaVersionMapper;
6
+import com.community.huiju.dao.TpHotelImgMapper;
7
+import com.community.huiju.dao.TpHotelMapper;
8
+import com.community.huiju.dao.TpHotelRoomMapper;
9
+import com.community.huiju.model.TaVersion;
10
+import com.community.huiju.model.TpHotel;
11
+import com.community.huiju.model.TpHotelRoom;
12
+import com.community.huiju.service.TaVersionServicel;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.stereotype.Service;
15
+import org.springframework.transaction.annotation.Transactional;
16
+
17
+import java.util.HashMap;
18
+import java.util.List;
19
+import java.util.Map;
20
+
21
+/**
22
+ * version V1.0
23
+ * class_name: $METHOD_NAME$
24
+ * param: $METHOD_PARAM$
25
+ * describe: TODO
26
+ * creat_user:fuxingfan
27
+ * creat_time: 2019/5/9
28
+ **/
29
+@Service("taVersionService")
30
+@Transactional
31
+public class TaVersionServiceimpl implements TaVersionServicel {
32
+    
33
+    @Autowired
34
+    private TaVersionMapper taVersionMapper;
35
+    /**
36
+     * 获取版本号
37
+     *
38
+     * @param type
39
+     * @return
40
+     */
41
+    @Override
42
+    public ResponseBean getVersion(String type) {
43
+        ResponseBean responseBean = new ResponseBean();
44
+        TaVersion taVersion = taVersionMapper.getVersion(type);
45
+        responseBean.addSuccess(taVersion);
46
+        return responseBean;
47
+    }
48
+}

+ 15
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaVersionMapper.xml Ver arquivo

@@ -0,0 +1,15 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.TaVersionMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TaVersion" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="client_version" property="clientVersion" jdbcType="VARCHAR" />
7
+    <result column="service_version" property="serviceVersion" jdbcType="VARCHAR" />
8
+    <result column="type" property="type" jdbcType="VARCHAR" />
9
+    <result column="update_address" property="updateAddress" jdbcType="VARCHAR" />
10
+  </resultMap>
11
+
12
+  <select id="getVersion" resultMap="BaseResultMap">
13
+    select id,client_version,service_version,update_address FROM ta_version  where `type` = #{type,jdbcType=VARCHAR}
14
+  </select>
15
+</mapper>

+ 25
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TaUserLicenseOrderController.java Ver arquivo

@@ -9,13 +9,17 @@ import io.swagger.annotations.Api;
9 9
 import io.swagger.annotations.ApiImplicitParam;
10 10
 import io.swagger.annotations.ApiImplicitParams;
11 11
 import io.swagger.annotations.ApiOperation;
12
+import org.apache.poi.ss.usermodel.Workbook;
12 13
 import org.springframework.beans.factory.annotation.Autowired;
13 14
 import org.springframework.web.bind.annotation.RequestMapping;
14 15
 import org.springframework.web.bind.annotation.RequestMethod;
15 16
 import org.springframework.web.bind.annotation.RequestParam;
16 17
 import org.springframework.web.bind.annotation.RestController;
17 18
 
19
+import javax.servlet.http.HttpServletRequest;
20
+import javax.servlet.http.HttpServletResponse;
18 21
 import javax.servlet.http.HttpSession;
22
+import java.io.OutputStream;
19 23
 
20 24
 /**
21 25
  * <p>
@@ -59,4 +63,25 @@ public class TaUserLicenseOrderController extends BaseController {
59 63
     }
60 64
 
61 65
 
66
+    @ApiOperation(value = "月租车导出数据", notes = "月租车导出数据")
67
+    @ApiImplicitParams({
68
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "header", name = "X-Auth-Token", value = "token")
69
+    })
70
+    @RequestMapping(value = "/user/license/export", method = RequestMethod.GET)
71
+    public void exportDate(HttpServletRequest request, HttpServletResponse response, HttpSession session) {
72
+        UserElement userElement = getUserElement(session);
73
+        ResponseBean responseBean = iTaUserLicenseOrderService.exportDate(userElement);
74
+        Workbook workbook = (Workbook) responseBean.getData();
75
+        this.setResponseHeader(response, "月租租车.xlsx");
76
+        //响应到客户端
77
+        try {
78
+            OutputStream os = response.getOutputStream();
79
+            workbook.write(os);
80
+            os.flush();
81
+            os.close();
82
+        } catch (Exception e) {
83
+            e.printStackTrace();
84
+        }
85
+    }
86
+
62 87
 }

+ 26
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserLicenseOrderMapper.java Ver arquivo

@@ -2,6 +2,11 @@ package com.community.huiju.dao;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 4
 import com.community.huiju.model.TaUserLicenseOrder;
5
+import org.apache.ibatis.annotations.Param;
6
+import org.apache.ibatis.annotations.ResultType;
7
+import org.apache.ibatis.annotations.Select;
8
+
9
+import java.util.List;
5 10
 
6 11
 /**
7 12
  * <p>
@@ -13,4 +18,25 @@ import com.community.huiju.model.TaUserLicenseOrder;
13 18
  */
14 19
 public interface TaUserLicenseOrderMapper extends BaseMapper<TaUserLicenseOrder> {
15 20
 
21
+    /**
22
+     * 分页查询
23
+     * @param communityId
24
+     * @param pageNum
25
+     * @param pageSize
26
+     * @return
27
+     */
28
+    @ResultType(TaUserLicenseOrder.class)
29
+    @Select("select * from ta_user_license_order where community_id = #{communityId} limit #{pageNum},#{pageSize}")
30
+    List<TaUserLicenseOrder> getLicensePage(@Param("communityId") Integer communityId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
31
+
32
+    /**
33
+     * 查询总数
34
+     * @param communityId
35
+     * @return
36
+     */
37
+    @ResultType(Integer.class)
38
+    @Select("select count(*) from ta_user_license_order where community_id = #{communityId}")
39
+    Integer getCount(@Param("communityId") Integer communityId);
40
+
41
+
16 42
 }

+ 6
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITaUserLicenseOrderService.java Ver arquivo

@@ -26,4 +26,10 @@ public interface ITaUserLicenseOrderService extends IService<TaUserLicenseOrder>
26 26
      */
27 27
     ResponseBean getAll(Integer id, String licensePlate, String orderNumber, String paymentName, String paymentTel, Integer pageNum, Integer pageSize, UserElement userElement);
28 28
 
29
+    /**
30
+     * 导出数据
31
+     * @param userElement
32
+     * @return
33
+     */
34
+    ResponseBean exportDate(UserElement userElement);
29 35
 }

+ 98
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TaUserLicenseOrderServiceImpl.java Ver arquivo

@@ -9,9 +9,22 @@ import com.community.commom.session.UserElement;
9 9
 import com.community.huiju.model.TaUserLicenseOrder;
10 10
 import com.community.huiju.dao.TaUserLicenseOrderMapper;
11 11
 import com.community.huiju.service.ITaUserLicenseOrderService;
12
+import org.apache.commons.collections.CollectionUtils;
12 13
 import org.apache.commons.lang3.StringUtils;
14
+import org.apache.poi.ss.usermodel.Cell;
15
+import org.apache.poi.ss.usermodel.Row;
16
+import org.apache.poi.ss.usermodel.Sheet;
17
+import org.apache.poi.ss.usermodel.Workbook;
18
+import org.apache.poi.xssf.usermodel.XSSFRow;
19
+import org.apache.poi.xssf.usermodel.XSSFSheet;
20
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
21
+import org.springframework.beans.factory.annotation.Autowired;
13 22
 import org.springframework.stereotype.Service;
14 23
 
24
+import java.text.SimpleDateFormat;
25
+import java.time.format.DateTimeFormatter;
26
+import java.util.List;
27
+
15 28
 /**
16 29
  * <p>
17 30
  * 月租车缴费订单表 服务实现类
@@ -23,6 +36,9 @@ import org.springframework.stereotype.Service;
23 36
 @Service
24 37
 public class TaUserLicenseOrderServiceImpl extends ServiceImpl<TaUserLicenseOrderMapper, TaUserLicenseOrder> implements ITaUserLicenseOrderService {
25 38
 
39
+    @Autowired
40
+    private TaUserLicenseOrderMapper taUserLicenseOrderMapper;
41
+
26 42
     @Override
27 43
     public ResponseBean getAll(Integer id, String licensePlate, String orderNumber, String paymentName, String paymentTel, Integer pageNum, Integer pageSize, UserElement userElement) {
28 44
         ResponseBean responseBean = new ResponseBean();
@@ -41,4 +57,86 @@ public class TaUserLicenseOrderServiceImpl extends ServiceImpl<TaUserLicenseOrde
41 57
         responseBean.addSuccess(orderIPage);
42 58
         return responseBean;
43 59
     }
60
+
61
+    @Override
62
+    public ResponseBean exportDate(UserElement userElement) {
63
+        ResponseBean responseBean = new ResponseBean();
64
+        Integer pageNum = 0;
65
+        Integer pageSize = 10;
66
+        Integer count = 0;
67
+        count = taUserLicenseOrderMapper.getCount(userElement.getCommunityId());
68
+        List<TaUserLicenseOrder> licensePage = taUserLicenseOrderMapper.getLicensePage(userElement.getCommunityId(), pageNum * pageSize, pageSize);
69
+
70
+        Workbook workbook = new XSSFWorkbook();
71
+        Sheet sheet = workbook.createSheet();
72
+        Row row = sheet.createRow(0);
73
+        Cell cell = row.createCell(0);
74
+        cell.setCellValue("编号");
75
+        cell = row.createCell(0);
76
+        cell.setCellValue("车牌号");
77
+        cell = row.createCell(1);
78
+        cell.setCellValue("续期时长(月)");
79
+        cell = row.createCell(2);
80
+        cell.setCellValue("续期费用(元)");
81
+        cell = row.createCell(3);
82
+        cell.setCellValue("缴费订单号");
83
+        cell = row.createCell(4);
84
+        cell.setCellValue("缴费人手机号");
85
+        cell = row.createCell(5);
86
+        cell.setCellValue("缴费人姓名");
87
+        cell = row.createCell(6);
88
+        cell.setCellValue("缴费方式");
89
+        cell = row.createCell(7);
90
+        cell.setCellValue("延期后到期日");
91
+        cell = row.createCell(8);
92
+        cell.setCellValue("缴费完成时间");
93
+
94
+        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss");
95
+
96
+        int listIndex = 0;
97
+        int currentRow = 1;
98
+        if (listIndex < licensePage.size()) {
99
+            do{
100
+                TaUserLicenseOrder taUserLicenseOrder = licensePage.get(listIndex);
101
+
102
+                row = sheet.createRow(currentRow);
103
+                cell = row.createCell(0);
104
+                cell.setCellValue(taUserLicenseOrder.getId());
105
+                cell = row.createCell(1);
106
+                cell.setCellValue(taUserLicenseOrder.getLicensePlate());
107
+                cell = row.createCell(2);
108
+                cell.setCellValue(taUserLicenseOrder.getExtensionMonth());
109
+                cell = row.createCell(3);
110
+                cell.setCellValue(taUserLicenseOrder.getExtensionPrice());
111
+                cell = row.createCell(4);
112
+                cell.setCellValue(taUserLicenseOrder.getOrderNumber());
113
+                cell = row.createCell(5);
114
+                cell.setCellValue(taUserLicenseOrder.getPaymentTel());
115
+                cell = row.createCell(6);
116
+                cell.setCellValue(taUserLicenseOrder.getPaymentName());
117
+                cell = row.createCell(7);
118
+                cell.setCellValue("0".equals(taUserLicenseOrder.getPaymentType()) ? "微信支付" : "2".equals(taUserLicenseOrder.getPaymentType()) ? "支付宝" : "" );
119
+                cell = row.createCell(8);
120
+                cell.setCellValue(dateTimeFormatter.format(taUserLicenseOrder.getExpireDate()));
121
+                cell = row.createCell(9);
122
+                cell.setCellValue(taUserLicenseOrder.getUpdateDate() == null ? "" : dateTimeFormatter.format(taUserLicenseOrder.getUpdateDate()));
123
+
124
+                listIndex ++;
125
+                currentRow ++;
126
+
127
+                if (listIndex == licensePage.size()) {
128
+                    listIndex = 0;
129
+                    pageNum ++;
130
+                    licensePage = taUserLicenseOrderMapper.getLicensePage(userElement.getCommunityId(), pageNum * pageSize, pageSize);
131
+                }
132
+                if (licensePage.isEmpty()) {
133
+                    break;
134
+                }
135
+
136
+            }while (pageNum <= count);
137
+        }
138
+
139
+        responseBean.addSuccess(workbook);
140
+        return responseBean;
141
+    }
44 142
 }

+ 9
- 0
VUECODE/smart-property-manage/src/api/license.js Ver arquivo

@@ -16,3 +16,12 @@ export function getLicenseAll(data) {
16 16
     }
17 17
   })
18 18
 }
19
+
20
+// 导出月租车数据
21
+export function exportLicenseData() {
22
+  return request({
23
+    url: '/user/license/export',
24
+    method: 'get',
25
+    responseType: 'blob'
26
+  })
27
+}

+ 10
- 1
VUECODE/smart-property-manage/src/store/modules/license.js Ver arquivo

@@ -1,4 +1,4 @@
1
-import { getLicenseAll } from '@/api/license'
1
+import { getLicenseAll, exportLicenseData } from '@/api/license'
2 2
 
3 3
 const license = {
4 4
   state: {
@@ -16,6 +16,15 @@ const license = {
16 16
           reject(error)
17 17
         })
18 18
       })
19
+    },
20
+    ExportLicenseData({ commit }) { // 导出月租车数据
21
+      return new Promise((resolve, reject) => {
22
+        exportLicenseData().then(response => {
23
+          resolve(response)
24
+        }).catch(error => {
25
+          reject(error)
26
+        })
27
+      })
19 28
     }
20 29
   }
21 30
 }

+ 31
- 2
VUECODE/smart-property-manage/src/views/bill/license/index.vue Ver arquivo

@@ -21,14 +21,14 @@
21 21
         <el-button type="primary" @click="query">查询</el-button>
22 22
       </el-form-item>
23 23
     </el-form>
24
-    <div>
24
+    <div style="display: flex; margin-left: 20px;">
25 25
       <el-button type="primary" @click="exportLicense">导出数据</el-button>
26 26
     </div>
27 27
     <el-table
28 28
       v-loading="loading"
29 29
       :data="list"
30 30
       border
31
-      style="width: 100%">
31
+      style="width: 100%; margin-top: 20px;">
32 32
       <el-table-column
33 33
         prop="id"
34 34
         label="编号"
@@ -122,6 +122,17 @@ export default {
122 122
     this.getData()
123 123
   },
124 124
   methods: {
125
+    handleSizeChange(val) {
126
+      console.log(`每页 ${val} 条`)
127
+      this.listQuery.pageSize = val
128
+      this.listQuery.pageNum = 1
129
+      this.getData()
130
+    },
131
+    handleCurrentChange(val) {
132
+      console.log(`当前页: ${val}`)
133
+      this.listQuery.pageNum = val
134
+      this.getData()
135
+    },
125 136
     formatDate(val) {
126 137
       if (val === null || val === '') {
127 138
         return ''
@@ -203,6 +214,24 @@ export default {
203 214
           break
204 215
       }
205 216
       return str
217
+    },
218
+    exportLicense() {
219
+      this.$store.dispatch('ExportLicenseData').then((res) => {
220
+        this.download(res)
221
+      })
222
+    },
223
+    download(data) { // 下载文件
224
+      if (!data) {
225
+        return
226
+      }
227
+      let url = window.URL.createObjectURL(new Blob([data]))
228
+      let link = document.createElement('a')
229
+      link.style.display = 'none'
230
+      link.href = url
231
+      link.setAttribute('download', '月租车订单.xlsx')
232
+
233
+      document.body.appendChild(link)
234
+      link.click()
206 235
     }
207 236
   }
208 237
 }

+ 1101
- 1010
文档/MYSQL/smartCommunity.pdb
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 1113
- 1010
文档/MYSQL/smartCommunity.pdm
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo