瀏覽代碼

Merge branch '2.0.0' of http://git.ycjcjy.com/fuxingfan/smartCommunity into 2.0.0

魏熙美 6 年之前
父節點
當前提交
67c014c538
共有 35 個檔案被更改,包括 1296 行新增271 行删除
  1. 6
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AssembleController.java
  2. 16
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaBriskUserMapper.java
  3. 50
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaBriskUser.java
  4. 5
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/AssembleServiceI.java
  5. 43
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/AssembleServiceImpl.java
  6. 27
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TaBriskUserMapper.xml
  7. 113
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TaTemporaryLicenseCountController.java
  8. 113
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TaUserLicenseCountController.java
  9. 113
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpBillInvoiceCountController.java
  10. 2
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/BillInvoiceMapper.java
  11. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaTemporaryLicenseCountMapper.java
  12. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserLicenseCountMapper.java
  13. 4
    2
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserLicenseOrderMapper.java
  14. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpBillInvoiceCountMapper.java
  15. 41
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TaTemporaryLicenseCount.java
  16. 41
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TaUserLicenseCount.java
  17. 41
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpBillInvoiceCount.java
  18. 7
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IBillInvoiceService.java
  19. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITaTemporaryLicenseCountService.java
  20. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITaUserLicenseCountService.java
  21. 5
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITaUserLicenseOrderService.java
  22. 16
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpBillInvoiceCountService.java
  23. 10
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BillInvoiceServiceImpl.java
  24. 31
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TaTemporaryLicenseCountServiceImpl.java
  25. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TaUserLicenseCountServiceImpl.java
  26. 6
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TaUserLicenseOrderServiceImpl.java
  27. 20
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpBillInvoiceCountServiceImpl.java
  28. 109
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/task/IndexCountTasks.java
  29. 12
    0
      CODE/smart-community/property-api/src/main/resources/mapper/BillInvoiceMapper.xml
  30. 16
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TaTemporaryLicenseCountMapper.xml
  31. 5
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TaUserLicenseCountMapper.xml
  32. 11
    1
      CODE/smart-community/property-api/src/main/resources/mapper/TaUserLicenseOrderMapper.xml
  33. 5
    0
      CODE/smart-community/property-api/src/main/resources/mapper/TpBillInvoiceCountMapper.xml
  34. 160
    133
      文档/MYSQL/smartCommunity.pdb
  35. 160
    133
      文档/MYSQL/smartCommunity.pdm

+ 6
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AssembleController.java 查看文件

@@ -5,6 +5,7 @@ import com.community.commom.mode.ResponseBean;
5 5
 import com.community.commom.session.UserElement;
6 6
 import com.community.huiju.model.TaSysMenu;
7 7
 import com.community.huiju.model.ToBanner;
8
+import com.community.huiju.service.AssembleServiceI;
8 9
 import com.community.huiju.service.BannerServiceI;
9 10
 import com.community.huiju.service.MenuServiceI;
10 11
 import com.community.huiju.service.MessageServiceI;
@@ -51,13 +52,15 @@ public class AssembleController extends BaseController {
51 52
 	@Autowired
52 53
 	private TpShopServicel tpShopServicel;
53 54
 	
55
+	@Autowired
56
+	private AssembleServiceI assembleService;
57
+	
54 58
 	@ApiOperation(value = "首页数据获取接口", notes = "首页数据获取接口")
55 59
 	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
56 60
 			@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token") })
57 61
 	@RequestMapping(value = "/index/{communityId}",method = RequestMethod.GET)
58 62
 	public ResponseBean getIndexData(@PathVariable("communityId") Integer communityId, HttpSession session){
59 63
 		UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
60
-		Integer userId = userElement.getId();
61 64
 		ResponseBean responseBean = new ResponseBean();
62 65
 
63 66
 		if (!check(communityId)) {
@@ -86,6 +89,8 @@ public class AssembleController extends BaseController {
86 89
 		indexMap.put("tpShopList",((Map<Object, Object>)shopRes.getData()).get("tpShopList"));
87 90
 		indexMap.put("toDoTotal",totalMap.get("toDoTotal"));
88 91
 		responseBean.addSuccess(indexMap);
92
+		//获取成功的情况下记录
93
+		assembleService.saveBriskUser(userElement.getUserVerifyId(),userElement.getCommunityId());
89 94
 		return responseBean;
90 95
 	}
91 96
 }

+ 16
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaBriskUserMapper.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TaBriskUser;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.Date;
8
+import java.util.List;
9
+
10
+@Mapper
11
+public interface TaBriskUserMapper {
12
+	
13
+	List<TaBriskUser> selectByParams(@Param("userVerifyId") Integer userVerifyId, @Param("communityId") Integer communityId,@Param("nowDate") Date nowDate);
14
+	
15
+	int saveBriskUser(TaBriskUser taBriskUser);
16
+}

+ 50
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaBriskUser.java 查看文件

@@ -0,0 +1,50 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+/**
6
+ * @author FXF
7
+ * @date 2019-05-28
8
+ */
9
+public class TaBriskUser {
10
+	
11
+	private Integer id;
12
+	
13
+	private Integer communityId;
14
+	
15
+	private Integer taUserVerifyId;
16
+	
17
+	private Date createDate;
18
+	
19
+	public Integer getId() {
20
+		return id;
21
+	}
22
+	
23
+	public void setId(Integer id) {
24
+		this.id = id;
25
+	}
26
+	
27
+	public Integer getCommunityId() {
28
+		return communityId;
29
+	}
30
+	
31
+	public void setCommunityId(Integer communityId) {
32
+		this.communityId = communityId;
33
+	}
34
+	
35
+	public Integer getTaUserVerifyId() {
36
+		return taUserVerifyId;
37
+	}
38
+	
39
+	public void setTaUserVerifyId(Integer taUserVerifyId) {
40
+		this.taUserVerifyId = taUserVerifyId;
41
+	}
42
+	
43
+	public Date getCreateDate() {
44
+		return createDate;
45
+	}
46
+	
47
+	public void setCreateDate(Date createDate) {
48
+		this.createDate = createDate;
49
+	}
50
+}

+ 5
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/AssembleServiceI.java 查看文件

@@ -0,0 +1,5 @@
1
+package com.community.huiju.service;
2
+
3
+public interface AssembleServiceI {
4
+	void saveBriskUser(Integer userVerifyId, Integer communityId);
5
+}

+ 43
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/AssembleServiceImpl.java 查看文件

@@ -0,0 +1,43 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.community.huiju.dao.TaBriskUserMapper;
4
+import com.community.huiju.model.TaBriskUser;
5
+import com.community.huiju.service.AssembleServiceI;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.stereotype.Service;
8
+import org.springframework.transaction.annotation.Transactional;
9
+
10
+import java.util.Date;
11
+import java.util.List;
12
+
13
+/**
14
+ * @author FXF
15
+ * @date 2019-05-28
16
+ */
17
+@Service("assembleService")
18
+@Transactional(rollbackFor = Exception.class)
19
+public class AssembleServiceImpl implements AssembleServiceI {
20
+	
21
+	@Autowired
22
+	private TaBriskUserMapper taBriskUserMapper;
23
+	
24
+	/**
25
+	 * 记录日活跃用户,同一个用户当天只记录一次
26
+	 * @param userVerifyId
27
+	 * @param communityId
28
+	 */
29
+	@Override
30
+	public void saveBriskUser(Integer userVerifyId, Integer communityId) {
31
+		//先查看此用户当天是否进入过首页,没进入过则插入
32
+		Date date = new Date();
33
+		List<TaBriskUser> list = taBriskUserMapper.selectByParams(userVerifyId,communityId,date);
34
+		if (list.size() < 1) {
35
+			//插入一条数据
36
+			TaBriskUser taBriskUser = new TaBriskUser();
37
+			taBriskUser.setCommunityId(communityId);
38
+			taBriskUser.setTaUserVerifyId(userVerifyId);
39
+			taBriskUser.setCreateDate(date);
40
+			taBriskUserMapper.saveBriskUser(taBriskUser);
41
+		}
42
+	}
43
+}

+ 27
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaBriskUserMapper.xml 查看文件

@@ -0,0 +1,27 @@
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.TaBriskUserMapper" >
4
+
5
+    <resultMap id="BaseResultMap" type="com.community.huiju.model.TaBriskUser" >
6
+        <id column="id" property="id" jdbcType="INTEGER" />
7
+        <result column="community_id" property="communityId" jdbcType="INTEGER" />
8
+        <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
9
+        <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
10
+    </resultMap>
11
+
12
+    <select id="selectByParams" resultMap="BaseResultMap">
13
+        select
14
+          id,community_id,ta_user_verify_id,create_date
15
+        from ta_brisk_user
16
+        where ta_user_verify_id = #{userVerifyId}
17
+        AND community_id = #{communityId}
18
+        AND to_days(create_date) = to_days(#{nowDate})
19
+    </select>
20
+
21
+    <insert id="saveBriskUser" parameterType="com.community.huiju.model.TaBriskUser" >
22
+    insert into ta_brisk_user (id, community_id, ta_user_verify_id,create_date
23
+      )
24
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserVerifyId,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}
25
+      )
26
+  </insert>
27
+</mapper>

+ 113
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TaTemporaryLicenseCountController.java 查看文件

@@ -0,0 +1,113 @@
1
+package com.community.huiju.controller;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.huiju.common.base.BaseController;
5
+import com.community.huiju.model.TaTemporaryLicenseCount;
6
+import com.community.huiju.service.ITaTemporaryLicenseCountService;
7
+import org.slf4j.Logger;
8
+import org.slf4j.LoggerFactory;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.web.bind.annotation.PathVariable;
11
+import org.springframework.web.bind.annotation.RequestBody;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RequestMethod;
14
+import org.springframework.web.bind.annotation.ResponseBody;
15
+import org.springframework.web.bind.annotation.RestController;
16
+
17
+/**
18
+ * <p>
19
+    * 临时车统计表,按天计算 前端控制器
20
+    * </p>
21
+ *
22
+ * @author jobob
23
+ * @since 2019-05-28
24
+ */
25
+@RestController
26
+@RequestMapping("/")
27
+public class TaTemporaryLicenseCountController extends BaseController {
28
+
29
+    private final Logger logger = LoggerFactory.getLogger(TaTemporaryLicenseCountController.class);
30
+
31
+    @Autowired
32
+    public ITaTemporaryLicenseCountService iTaTemporaryLicenseCountService;
33
+
34
+
35
+    /**
36
+     * 保存对象
37
+     * @param taTemporaryLicenseCount 实体对象
38
+     * @return
39
+     */
40
+    @RequestMapping(value="/taTemporaryLicenseCount/add",method= RequestMethod.POST)
41
+    public ResponseBean tpShopImgAdd(@RequestBody TaTemporaryLicenseCount taTemporaryLicenseCount){
42
+        ResponseBean responseBean = new ResponseBean();
43
+        try {
44
+            if (iTaTemporaryLicenseCountService.save(taTemporaryLicenseCount)){
45
+                responseBean.addSuccess("success");
46
+            }else {
47
+                responseBean.addError("fail");
48
+            }
49
+        }catch (Exception e){
50
+            logger.error("taTemporaryLicenseCountAdd -=- {}",e.toString());
51
+            responseBean.addError(e.getMessage());
52
+        }
53
+        return responseBean;
54
+    }
55
+
56
+    /**
57
+     * 根据id删除对象
58
+     * @param id  实体ID
59
+     */
60
+    @ResponseBody
61
+    @RequestMapping(value="/taTemporaryLicenseCount/delete/{id}", method= RequestMethod.DELETE)
62
+    public ResponseBean taTemporaryLicenseCountDelete(@PathVariable Integer id){
63
+        ResponseBean responseBean = new ResponseBean();
64
+        try {
65
+            if(iTaTemporaryLicenseCountService.removeById(id)){
66
+                responseBean.addSuccess("success");
67
+            }else {
68
+                responseBean.addError("fail");
69
+            }
70
+        }catch (Exception e){
71
+            logger.error("taTemporaryLicenseCountDelete -=- {}",e.toString());
72
+            responseBean.addError(e.getMessage());
73
+        }
74
+        return responseBean;
75
+    }
76
+
77
+    /**
78
+     * 修改对象
79
+     * @param taTemporaryLicenseCount 实体对象
80
+     * @return
81
+     */
82
+    @RequestMapping(value="/taTemporaryLicenseCount/update",method= RequestMethod.PUT)
83
+    public ResponseBean tpShopImgUpdate(@RequestBody TaTemporaryLicenseCount taTemporaryLicenseCount){
84
+        ResponseBean responseBean = new ResponseBean();
85
+        try {
86
+            if (iTaTemporaryLicenseCountService.updateById(taTemporaryLicenseCount)){
87
+                responseBean.addSuccess("success");
88
+            }else {
89
+                responseBean.addError("fail");
90
+            }
91
+        }catch (Exception e){
92
+            logger.error("taTemporaryLicenseCountUpdate -=- {}",e.toString());
93
+            responseBean.addError(e.getMessage());
94
+        }
95
+        return responseBean;
96
+    }
97
+
98
+    /**
99
+     * 根据id查询对象
100
+     * @param id  实体ID
101
+     */
102
+    @RequestMapping(value="/taTemporaryLicenseCount/get/{id}",method= RequestMethod.GET)
103
+    public ResponseBean tpShopImgGet(@PathVariable Integer id){
104
+        ResponseBean responseBean = new ResponseBean();
105
+        try {
106
+            responseBean.addSuccess(iTaTemporaryLicenseCountService.getById(id));
107
+        }catch (Exception e){
108
+            logger.error("taTemporaryLicenseCountDelete -=- {}",e.toString());
109
+            responseBean.addError(e.getMessage());
110
+        }
111
+        return responseBean;
112
+    }
113
+}

+ 113
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TaUserLicenseCountController.java 查看文件

@@ -0,0 +1,113 @@
1
+package com.community.huiju.controller;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.huiju.common.base.BaseController;
5
+import com.community.huiju.model.TaUserLicenseCount;
6
+import com.community.huiju.service.ITaUserLicenseCountService;
7
+import org.slf4j.Logger;
8
+import org.slf4j.LoggerFactory;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.web.bind.annotation.PathVariable;
11
+import org.springframework.web.bind.annotation.RequestBody;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RequestMethod;
14
+import org.springframework.web.bind.annotation.ResponseBody;
15
+import org.springframework.web.bind.annotation.RestController;
16
+
17
+/**
18
+ * <p>
19
+    * 月租车统计表,按天计算 前端控制器
20
+    * </p>
21
+ *
22
+ * @author jobob
23
+ * @since 2019-05-28
24
+ */
25
+@RestController
26
+@RequestMapping("/")
27
+public class TaUserLicenseCountController extends BaseController {
28
+
29
+    private final Logger logger = LoggerFactory.getLogger(TaUserLicenseCountController.class);
30
+
31
+    @Autowired
32
+    public ITaUserLicenseCountService iTaUserLicenseCountService;
33
+
34
+
35
+    /**
36
+     * 保存对象
37
+     * @param taUserLicenseCount 实体对象
38
+     * @return
39
+     */
40
+    @RequestMapping(value="/taUserLicenseCount/add",method= RequestMethod.POST)
41
+    public ResponseBean tpShopImgAdd(@RequestBody TaUserLicenseCount taUserLicenseCount){
42
+        ResponseBean responseBean = new ResponseBean();
43
+        try {
44
+            if (iTaUserLicenseCountService.save(taUserLicenseCount)){
45
+                responseBean.addSuccess("success");
46
+            }else {
47
+                responseBean.addError("fail");
48
+            }
49
+        }catch (Exception e){
50
+            logger.error("taUserLicenseCountAdd -=- {}",e.toString());
51
+            responseBean.addError(e.getMessage());
52
+        }
53
+        return responseBean;
54
+    }
55
+
56
+    /**
57
+     * 根据id删除对象
58
+     * @param id  实体ID
59
+     */
60
+    @ResponseBody
61
+    @RequestMapping(value="/taUserLicenseCount/delete/{id}", method= RequestMethod.DELETE)
62
+    public ResponseBean taUserLicenseCountDelete(@PathVariable Integer id){
63
+        ResponseBean responseBean = new ResponseBean();
64
+        try {
65
+            if(iTaUserLicenseCountService.removeById(id)){
66
+                responseBean.addSuccess("success");
67
+            }else {
68
+                responseBean.addError("fail");
69
+            }
70
+        }catch (Exception e){
71
+            logger.error("taUserLicenseCountDelete -=- {}",e.toString());
72
+            responseBean.addError(e.getMessage());
73
+        }
74
+        return responseBean;
75
+    }
76
+
77
+    /**
78
+     * 修改对象
79
+     * @param taUserLicenseCount 实体对象
80
+     * @return
81
+     */
82
+    @RequestMapping(value="/taUserLicenseCount/update",method= RequestMethod.PUT)
83
+    public ResponseBean tpShopImgUpdate(@RequestBody TaUserLicenseCount taUserLicenseCount){
84
+        ResponseBean responseBean = new ResponseBean();
85
+        try {
86
+            if (iTaUserLicenseCountService.updateById(taUserLicenseCount)){
87
+                responseBean.addSuccess("success");
88
+            }else {
89
+                responseBean.addError("fail");
90
+            }
91
+        }catch (Exception e){
92
+            logger.error("taUserLicenseCountUpdate -=- {}",e.toString());
93
+            responseBean.addError(e.getMessage());
94
+        }
95
+        return responseBean;
96
+    }
97
+
98
+    /**
99
+     * 根据id查询对象
100
+     * @param id  实体ID
101
+     */
102
+    @RequestMapping(value="/taUserLicenseCount/get/{id}",method= RequestMethod.GET)
103
+    public ResponseBean tpShopImgGet(@PathVariable Integer id){
104
+        ResponseBean responseBean = new ResponseBean();
105
+        try {
106
+            responseBean.addSuccess(iTaUserLicenseCountService.getById(id));
107
+        }catch (Exception e){
108
+            logger.error("taUserLicenseCountDelete -=- {}",e.toString());
109
+            responseBean.addError(e.getMessage());
110
+        }
111
+        return responseBean;
112
+    }
113
+}

+ 113
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpBillInvoiceCountController.java 查看文件

@@ -0,0 +1,113 @@
1
+package com.community.huiju.controller;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.huiju.common.base.BaseController;
5
+import com.community.huiju.model.TpBillInvoiceCount;
6
+import com.community.huiju.service.ITpBillInvoiceCountService;
7
+import org.slf4j.Logger;
8
+import org.slf4j.LoggerFactory;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.web.bind.annotation.PathVariable;
11
+import org.springframework.web.bind.annotation.RequestBody;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RequestMethod;
14
+import org.springframework.web.bind.annotation.ResponseBody;
15
+import org.springframework.web.bind.annotation.RestController;
16
+
17
+/**
18
+ * <p>
19
+    * 收费单统计表,按天统计 前端控制器
20
+    * </p>
21
+ *
22
+ * @author jobob
23
+ * @since 2019-05-28
24
+ */
25
+@RestController
26
+@RequestMapping("/")
27
+public class TpBillInvoiceCountController extends BaseController {
28
+
29
+    private final Logger logger = LoggerFactory.getLogger(TpBillInvoiceCountController.class);
30
+
31
+    @Autowired
32
+    public ITpBillInvoiceCountService iTpBillInvoiceCountService;
33
+
34
+
35
+    /**
36
+     * 保存对象
37
+     * @param tpBillInvoiceCount 实体对象
38
+     * @return
39
+     */
40
+    @RequestMapping(value="/tpBillInvoiceCount/add",method= RequestMethod.POST)
41
+    public ResponseBean tpShopImgAdd(@RequestBody TpBillInvoiceCount tpBillInvoiceCount){
42
+        ResponseBean responseBean = new ResponseBean();
43
+        try {
44
+            if (iTpBillInvoiceCountService.save(tpBillInvoiceCount)){
45
+                responseBean.addSuccess("success");
46
+            }else {
47
+                responseBean.addError("fail");
48
+            }
49
+        }catch (Exception e){
50
+            logger.error("tpBillInvoiceCountAdd -=- {}",e.toString());
51
+            responseBean.addError(e.getMessage());
52
+        }
53
+        return responseBean;
54
+    }
55
+
56
+    /**
57
+     * 根据id删除对象
58
+     * @param id  实体ID
59
+     */
60
+    @ResponseBody
61
+    @RequestMapping(value="/tpBillInvoiceCount/delete/{id}", method= RequestMethod.DELETE)
62
+    public ResponseBean tpBillInvoiceCountDelete(@PathVariable Integer id){
63
+        ResponseBean responseBean = new ResponseBean();
64
+        try {
65
+            if(iTpBillInvoiceCountService.removeById(id)){
66
+                responseBean.addSuccess("success");
67
+            }else {
68
+                responseBean.addError("fail");
69
+            }
70
+        }catch (Exception e){
71
+            logger.error("tpBillInvoiceCountDelete -=- {}",e.toString());
72
+            responseBean.addError(e.getMessage());
73
+        }
74
+        return responseBean;
75
+    }
76
+
77
+    /**
78
+     * 修改对象
79
+     * @param tpBillInvoiceCount 实体对象
80
+     * @return
81
+     */
82
+    @RequestMapping(value="/tpBillInvoiceCount/update",method= RequestMethod.PUT)
83
+    public ResponseBean tpShopImgUpdate(@RequestBody TpBillInvoiceCount tpBillInvoiceCount){
84
+        ResponseBean responseBean = new ResponseBean();
85
+        try {
86
+            if (iTpBillInvoiceCountService.updateById(tpBillInvoiceCount)){
87
+                responseBean.addSuccess("success");
88
+            }else {
89
+                responseBean.addError("fail");
90
+            }
91
+        }catch (Exception e){
92
+            logger.error("tpBillInvoiceCountUpdate -=- {}",e.toString());
93
+            responseBean.addError(e.getMessage());
94
+        }
95
+        return responseBean;
96
+    }
97
+
98
+    /**
99
+     * 根据id查询对象
100
+     * @param id  实体ID
101
+     */
102
+    @RequestMapping(value="/tpBillInvoiceCount/get/{id}",method= RequestMethod.GET)
103
+    public ResponseBean tpShopImgGet(@PathVariable Integer id){
104
+        ResponseBean responseBean = new ResponseBean();
105
+        try {
106
+            responseBean.addSuccess(iTpBillInvoiceCountService.getById(id));
107
+        }catch (Exception e){
108
+            logger.error("tpBillInvoiceCountDelete -=- {}",e.toString());
109
+            responseBean.addError(e.getMessage());
110
+        }
111
+        return responseBean;
112
+    }
113
+}

+ 2
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/BillInvoiceMapper.java 查看文件

@@ -43,5 +43,6 @@ public interface BillInvoiceMapper extends BaseMapper<BillInvoice> {
43 43
      * @return
44 44
      */
45 45
     IPage<BillInvoice> selectBillInvoiceEffective(Page page, @Param("map") Map<String, Object> map);
46
-
46
+	
47
+	List<Map<String, Object>> getPriceCount();
47 48
 }

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaTemporaryLicenseCountMapper.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TaTemporaryLicenseCount;
5
+
6
+import java.util.List;
7
+import java.util.Map;
8
+
9
+/**
10
+ * <p>
11
+ * 临时车统计表,按天计算 Mapper 接口
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-28
16
+ */
17
+public interface TaTemporaryLicenseCountMapper extends BaseMapper<TaTemporaryLicenseCount> {
18
+	
19
+	List<Map<String, Object>> getTemporaryLicenseOrderPriceCount();
20
+}

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserLicenseCountMapper.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TaUserLicenseCount;
5
+
6
+/**
7
+ * <p>
8
+ * 月租车统计表,按天计算 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-28
13
+ */
14
+public interface TaUserLicenseCountMapper extends BaseMapper<TaUserLicenseCount> {
15
+
16
+}

+ 4
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TaUserLicenseOrderMapper.java 查看文件

@@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.ResultType;
7 7
 import org.apache.ibatis.annotations.Select;
8 8
 
9 9
 import java.util.List;
10
+import java.util.Map;
10 11
 
11 12
 /**
12 13
  * <p>
@@ -37,6 +38,7 @@ public interface TaUserLicenseOrderMapper extends BaseMapper<TaUserLicenseOrder>
37 38
     @ResultType(Integer.class)
38 39
     @Select("select count(*) from ta_user_license_order where community_id = #{communityId}")
39 40
     Integer getCount(@Param("communityId") Integer communityId);
40
-
41
-
41
+    
42
+    
43
+    List<Map<String, Object>> getPriceCount();
42 44
 }

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpBillInvoiceCountMapper.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TpBillInvoiceCount;
5
+
6
+/**
7
+ * <p>
8
+ * 收费单统计表,按天统计 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-28
13
+ */
14
+public interface TpBillInvoiceCountMapper extends BaseMapper<TpBillInvoiceCount> {
15
+
16
+}

+ 41
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TaTemporaryLicenseCount.java 查看文件

@@ -0,0 +1,41 @@
1
+package com.community.huiju.model;
2
+
3
+import lombok.Data;
4
+import lombok.EqualsAndHashCode;
5
+import lombok.experimental.Accessors;
6
+
7
+import java.io.Serializable;
8
+import java.time.LocalDateTime;
9
+
10
+/**
11
+ * <p>
12
+ * 临时车统计表,按天计算
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2019-05-28
17
+ */
18
+@Data
19
+@EqualsAndHashCode(callSuper = false)
20
+@Accessors(chain = true)
21
+public class TaTemporaryLicenseCount implements Serializable {
22
+
23
+    private static final long serialVersionUID = 1L;
24
+
25
+    /**
26
+     * 小区id
27
+     */
28
+    private Integer communityId;
29
+
30
+    /**
31
+     * 价格总和
32
+     */
33
+    private Integer priceTotal;
34
+
35
+    /**
36
+     * 创建时间
37
+     */
38
+    private LocalDateTime createDate;
39
+
40
+
41
+}

+ 41
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TaUserLicenseCount.java 查看文件

@@ -0,0 +1,41 @@
1
+package com.community.huiju.model;
2
+
3
+import lombok.Data;
4
+import lombok.EqualsAndHashCode;
5
+import lombok.experimental.Accessors;
6
+
7
+import java.io.Serializable;
8
+import java.time.LocalDateTime;
9
+
10
+/**
11
+ * <p>
12
+ * 月租车统计表,按天计算
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2019-05-28
17
+ */
18
+@Data
19
+@EqualsAndHashCode(callSuper = false)
20
+@Accessors(chain = true)
21
+public class TaUserLicenseCount implements Serializable {
22
+
23
+    private static final long serialVersionUID = 1L;
24
+
25
+    /**
26
+     * 小区id
27
+     */
28
+    private Integer communityId;
29
+
30
+    /**
31
+     * 价格总和
32
+     */
33
+    private Integer priceTotal;
34
+
35
+    /**
36
+     * 创建时间
37
+     */
38
+    private LocalDateTime createDate;
39
+
40
+
41
+}

+ 41
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpBillInvoiceCount.java 查看文件

@@ -0,0 +1,41 @@
1
+package com.community.huiju.model;
2
+
3
+import lombok.Data;
4
+import lombok.EqualsAndHashCode;
5
+import lombok.experimental.Accessors;
6
+
7
+import java.io.Serializable;
8
+import java.time.LocalDateTime;
9
+
10
+/**
11
+ * <p>
12
+ * 收费单统计表,按天统计
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2019-05-28
17
+ */
18
+@Data
19
+@EqualsAndHashCode(callSuper = false)
20
+@Accessors(chain = true)
21
+public class TpBillInvoiceCount implements Serializable {
22
+
23
+    private static final long serialVersionUID = 1L;
24
+
25
+    /**
26
+     * 小区ID
27
+     */
28
+    private Integer communityId;
29
+
30
+    /**
31
+     * 价格总和
32
+     */
33
+    private Integer priceTotal;
34
+
35
+    /**
36
+     * 创建时间
37
+     */
38
+    private LocalDateTime createDate;
39
+
40
+
41
+}

+ 7
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/IBillInvoiceService.java 查看文件

@@ -7,6 +7,7 @@ import com.community.huiju.model.BillInvoice;
7 7
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
8 8
 
9 9
 import java.util.List;
10
+import java.util.Map;
10 11
 
11 12
 /**
12 13
  * <p>
@@ -99,4 +100,10 @@ public interface IBillInvoiceService extends IService<BillInvoice> {
99 100
      * @return
100 101
      */
101 102
     ResponseBean getInvoiceInvalid(UserElement userElement, String parameter);
103
+    
104
+    /**
105
+     * 按小区统计所有的金额
106
+     * @return
107
+     */
108
+	List<Map<String, Object>> getPriceCount();
102 109
 }

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITaTemporaryLicenseCountService.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.TaTemporaryLicenseCount;
5
+
6
+import java.util.List;
7
+import java.util.Map;
8
+
9
+/**
10
+ * <p>
11
+ * 临时车统计表,按天计算 服务类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-28
16
+ */
17
+public interface ITaTemporaryLicenseCountService extends IService<TaTemporaryLicenseCount> {
18
+	
19
+	List<Map<String, Object>> getTemporaryLicenseOrderPriceCount();
20
+}

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITaUserLicenseCountService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.TaUserLicenseCount;
5
+
6
+/**
7
+ * <p>
8
+ * 月租车统计表,按天计算 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-28
13
+ */
14
+public interface ITaUserLicenseCountService extends IService<TaUserLicenseCount> {
15
+
16
+}

+ 5
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITaUserLicenseOrderService.java 查看文件

@@ -5,6 +5,9 @@ import com.community.commom.mode.ResponseBean;
5 5
 import com.community.commom.session.UserElement;
6 6
 import com.community.huiju.model.TaUserLicenseOrder;
7 7
 
8
+import java.util.List;
9
+import java.util.Map;
10
+
8 11
 /**
9 12
  * <p>
10 13
  * 月租车缴费订单表 服务类
@@ -32,4 +35,6 @@ public interface ITaUserLicenseOrderService extends IService<TaUserLicenseOrder>
32 35
      * @return
33 36
      */
34 37
     ResponseBean exportDate(UserElement userElement);
38
+	
39
+	List<Map<String, Object>> getPriceCount();
35 40
 }

+ 16
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/ITpBillInvoiceCountService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.TpBillInvoiceCount;
5
+
6
+/**
7
+ * <p>
8
+ * 收费单统计表,按天统计 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-28
13
+ */
14
+public interface ITpBillInvoiceCountService extends IService<TpBillInvoiceCount> {
15
+
16
+}

+ 10
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BillInvoiceServiceImpl.java 查看文件

@@ -612,4 +612,14 @@ public class BillInvoiceServiceImpl extends ServiceImpl<BillInvoiceMapper, BillI
612 612
         responseBean.addSuccess(map);
613 613
         return responseBean;
614 614
     }
615
+    
616
+    /**
617
+     * 按小区统计所有的金额
618
+     *
619
+     * @return
620
+     */
621
+    @Override
622
+    public List<Map<String, Object>> getPriceCount() {
623
+        return billInvoiceMapper.getPriceCount();
624
+    }
615 625
 }

+ 31
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TaTemporaryLicenseCountServiceImpl.java 查看文件

@@ -0,0 +1,31 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.dao.TaTemporaryLicenseCountMapper;
5
+import com.community.huiju.model.TaTemporaryLicenseCount;
6
+import com.community.huiju.service.ITaTemporaryLicenseCountService;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Service;
9
+
10
+import java.util.List;
11
+import java.util.Map;
12
+
13
+/**
14
+ * <p>
15
+ * 临时车统计表,按天计算 服务实现类
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2019-05-28
20
+ */
21
+@Service
22
+public class TaTemporaryLicenseCountServiceImpl extends ServiceImpl<TaTemporaryLicenseCountMapper, TaTemporaryLicenseCount> implements ITaTemporaryLicenseCountService {
23
+	
24
+	@Autowired
25
+	private TaTemporaryLicenseCountMapper taTemporaryLicenseCountMapper;
26
+	
27
+	@Override
28
+	public List<Map<String, Object>> getTemporaryLicenseOrderPriceCount() {
29
+		return taTemporaryLicenseCountMapper.getTemporaryLicenseOrderPriceCount();
30
+	}
31
+}

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TaUserLicenseCountServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.dao.TaUserLicenseCountMapper;
5
+import com.community.huiju.model.TaUserLicenseCount;
6
+import com.community.huiju.service.ITaUserLicenseCountService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 月租车统计表,按天计算 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-28
16
+ */
17
+@Service
18
+public class TaUserLicenseCountServiceImpl extends ServiceImpl<TaUserLicenseCountMapper, TaUserLicenseCount> implements ITaUserLicenseCountService {
19
+
20
+}

+ 6
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TaUserLicenseOrderServiceImpl.java 查看文件

@@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
24 24
 import java.text.SimpleDateFormat;
25 25
 import java.time.format.DateTimeFormatter;
26 26
 import java.util.List;
27
+import java.util.Map;
27 28
 
28 29
 /**
29 30
  * <p>
@@ -140,4 +141,9 @@ public class TaUserLicenseOrderServiceImpl extends ServiceImpl<TaUserLicenseOrde
140 141
         responseBean.addSuccess(workbook);
141 142
         return responseBean;
142 143
     }
144
+    
145
+    @Override
146
+    public List<Map<String, Object>> getPriceCount() {
147
+        return taUserLicenseOrderMapper.getPriceCount();
148
+    }
143 149
 }

+ 20
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpBillInvoiceCountServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.dao.TpBillInvoiceCountMapper;
5
+import com.community.huiju.model.TpBillInvoiceCount;
6
+import com.community.huiju.service.ITpBillInvoiceCountService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 收费单统计表,按天统计 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-28
16
+ */
17
+@Service
18
+public class TpBillInvoiceCountServiceImpl extends ServiceImpl<TpBillInvoiceCountMapper, TpBillInvoiceCount> implements ITpBillInvoiceCountService {
19
+
20
+}

+ 109
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/task/IndexCountTasks.java 查看文件

@@ -0,0 +1,109 @@
1
+package com.community.huiju.task;
2
+
3
+import com.community.huiju.model.TaTemporaryLicenseCount;
4
+import com.community.huiju.model.TaUserLicenseCount;
5
+import com.community.huiju.model.TpBillInvoiceCount;
6
+import com.community.huiju.service.IBillInvoiceService;
7
+import com.community.huiju.service.ITaTemporaryLicenseCountService;
8
+import com.community.huiju.service.ITaUserLicenseCountService;
9
+import com.community.huiju.service.ITaUserLicenseOrderService;
10
+import com.community.huiju.service.ITpBillInvoiceCountService;
11
+import lombok.extern.slf4j.Slf4j;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.scheduling.annotation.Scheduled;
14
+import org.springframework.stereotype.Component;
15
+
16
+import java.time.LocalDateTime;
17
+import java.util.ArrayList;
18
+import java.util.List;
19
+import java.util.Map;
20
+
21
+/**
22
+ * @author FXF
23
+ * @date 2019-05-28
24
+ */
25
+@Component
26
+@Slf4j
27
+public class IndexCountTasks {
28
+	
29
+	
30
+	@Autowired
31
+	private IBillInvoiceService billInvoiceService;
32
+	
33
+	@Autowired
34
+	private ITpBillInvoiceCountService tpBillInvoiceCountService;
35
+	
36
+	@Autowired
37
+	private ITaUserLicenseOrderService userLicenseOrderService;
38
+	
39
+	@Autowired
40
+	private ITaUserLicenseCountService taUserLicenseCountService;
41
+	
42
+	@Autowired
43
+	private ITaTemporaryLicenseCountService taTemporaryLicenseCountService;
44
+	
45
+	/**
46
+	 * 统计定时任务,每天23点执行。
47
+	 */
48
+	@Scheduled(cron = "0 0 23 * * ?")
49
+	public void billInvoice() {
50
+		log.info("定时任务,收费组总缴费统计,月租车总续费统计,临时车总缴费统计。开始。每天23点执行");
51
+		log.info("收费组总缴费统计");
52
+		//收费组总缴费统计,查询所有的金额并插入统计表
53
+		List<Map<String,Object>> priceList =  billInvoiceService.getPriceCount();
54
+		//插入统计表
55
+		List<TpBillInvoiceCount> countList = new ArrayList<>();
56
+		LocalDateTime nowTime = LocalDateTime.now();
57
+		for (Map<String,Object> map : priceList){
58
+			TpBillInvoiceCount tpBillInvoiceCount = new TpBillInvoiceCount();
59
+			tpBillInvoiceCount.setCommunityId(Integer.valueOf(map.get("communityId").toString()));
60
+			String totalPrice = String.valueOf(map.get("totalPrice"));
61
+			int index = totalPrice.indexOf(".");
62
+			if (index > 0) {
63
+				totalPrice = totalPrice.substring(0,index);
64
+			}
65
+			tpBillInvoiceCount.setPriceTotal(Integer.valueOf(totalPrice));
66
+			tpBillInvoiceCount.setCreateDate(nowTime);
67
+			countList.add(tpBillInvoiceCount);
68
+		}
69
+		tpBillInvoiceCountService.saveBatch(countList);
70
+		
71
+		log.info("月租车总续费统计");
72
+		//月租车总续费统计,查询所有的金额并插入统计表
73
+		List<Map<String,Object>> licenseOrderPriceList = userLicenseOrderService.getPriceCount();
74
+		//插入统计表
75
+		List<TaUserLicenseCount> LicenseCountList = new ArrayList<>();
76
+		for (Map<String,Object> map : licenseOrderPriceList){
77
+			TaUserLicenseCount taUserLicenseCount = new TaUserLicenseCount();
78
+			taUserLicenseCount.setCommunityId(Integer.valueOf(map.get("communityId").toString()));
79
+			String totalPrice = String.valueOf(map.get("totalPrice"));
80
+			int index = totalPrice.indexOf(".");
81
+			if (index > 0) {
82
+				totalPrice = totalPrice.substring(0,index);
83
+			}
84
+			taUserLicenseCount.setPriceTotal(Integer.valueOf(totalPrice));
85
+			taUserLicenseCount.setCreateDate(nowTime);
86
+			LicenseCountList.add(taUserLicenseCount);
87
+		}
88
+		taUserLicenseCountService.saveBatch(LicenseCountList);
89
+		
90
+		log.info("临时车总缴费统计");
91
+		//临时车总缴费统计,查询所有的金额并插入统计表
92
+		List<Map<String,Object>> temporarylicenseOrderPriceList = taTemporaryLicenseCountService.getTemporaryLicenseOrderPriceCount();
93
+		//插入统计表
94
+		List<TaTemporaryLicenseCount> temporaryLicenseCountList = new ArrayList<>();
95
+		for (Map<String,Object> map : licenseOrderPriceList){
96
+			TaTemporaryLicenseCount temporaryLicenseCount = new TaTemporaryLicenseCount();
97
+			temporaryLicenseCount.setCommunityId(Integer.valueOf(map.get("communityId").toString()));
98
+			String totalPrice = String.valueOf(map.get("totalPrice"));
99
+			int index = totalPrice.indexOf(".");
100
+			if (index > 0) {
101
+				totalPrice = totalPrice.substring(0,index);
102
+			}
103
+			temporaryLicenseCount.setPriceTotal(Integer.valueOf(totalPrice));
104
+			temporaryLicenseCount.setCreateDate(nowTime);
105
+			temporaryLicenseCountList.add(temporaryLicenseCount);
106
+		}
107
+		taTemporaryLicenseCountService.saveBatch(temporaryLicenseCountList);
108
+	}
109
+}

+ 12
- 0
CODE/smart-community/property-api/src/main/resources/mapper/BillInvoiceMapper.xml 查看文件

@@ -113,4 +113,16 @@
113 113
         order by tpi.create_date DESC
114 114
     </select>
115 115
 
116
+    <select id="getPriceCount" resultType="map">
117
+        SELECT
118
+            sum( pay_price ) AS totalPrice,
119
+            community_id AS communityId
120
+        FROM
121
+            tp_bill_invoice
122
+        WHERE
123
+            `status` = 1
124
+        AND bill_status = 1
125
+        GROUP BY
126
+            community_id
127
+    </select>
116 128
 </mapper>

+ 16
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TaTemporaryLicenseCountMapper.xml 查看文件

@@ -0,0 +1,16 @@
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.TaTemporaryLicenseCountMapper">
4
+
5
+    <select id="getTemporaryLicenseOrderPriceCount" resultType="map">
6
+        SELECT
7
+            sum( actual_amount ) AS totalPrice,
8
+            community_id AS communityId
9
+        FROM
10
+            ta_temporary_license_order
11
+        WHERE
12
+            order_status = 1
13
+        GROUP BY
14
+            community_id
15
+    </select>
16
+</mapper>

+ 5
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TaUserLicenseCountMapper.xml 查看文件

@@ -0,0 +1,5 @@
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.TaUserLicenseCountMapper">
4
+
5
+</mapper>

+ 11
- 1
CODE/smart-community/property-api/src/main/resources/mapper/TaUserLicenseOrderMapper.xml 查看文件

@@ -1,5 +1,15 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.community.huiju.dao.TaUserLicenseOrderMapper">
4
-
4
+    <select id="getPriceCount" resultType="map">
5
+        SELECT
6
+            sum( extension_price ) AS totalPrice,
7
+            community_id AS communityId
8
+        FROM
9
+            ta_user_license_order
10
+        WHERE
11
+            order_status = 1
12
+        GROUP BY
13
+            community_id
14
+    </select>
5 15
 </mapper>

+ 5
- 0
CODE/smart-community/property-api/src/main/resources/mapper/TpBillInvoiceCountMapper.xml 查看文件

@@ -0,0 +1,5 @@
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.TpBillInvoiceCountMapper">
4
+
5
+</mapper>

+ 160
- 133
文档/MYSQL/smartCommunity.pdb
文件差異過大導致無法顯示
查看文件


+ 160
- 133
文档/MYSQL/smartCommunity.pdm
文件差異過大導致無法顯示
查看文件