Bladeren bron

解决冲突

dingxin 6 jaren geleden
bovenliggende
commit
d81fb0c524
29 gewijzigde bestanden met toevoegingen van 2348 en 535 verwijderingen
  1. 59
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BillController.java
  2. 20
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java
  3. 64
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java
  4. 39
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillInvoiceMapper.java
  5. 19
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillMapper.java
  6. 19
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillStatementMapper.java
  7. 19
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java
  8. 145
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBill.java
  9. 155
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBillInvoice.java
  10. 95
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBillStatement.java
  11. 165
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java
  12. 10
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecordComment.java
  13. 23
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/BillServiceI.java
  14. 27
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java
  15. 8
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java
  16. 49
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BillServiceImpl.java
  17. 163
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  18. 23
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java
  19. 2
    0
      CODE/smart-community/app-api/src/main/resources/application.yml
  20. 1
    1
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml
  21. 264
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpBillInvoiceMapper.xml
  22. 199
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpBillMapper.xml
  23. 142
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpBillStatementMapper.xml
  24. 223
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml
  25. 3
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/Constant.java
  26. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/Constant.class
  27. 204
    264
      文档/MYSQL/smartCommunity.pdb
  28. 208
    268
      文档/MYSQL/smartCommunity.pdm
  29. BIN
      文档/需求/app接口需求-第二版.xlsx

+ 59
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BillController.java Bestand weergeven

@@ -0,0 +1,59 @@
1
+package com.community.huiju.controller;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.huiju.service.BillServiceI;
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.RequestParam;
15
+import org.springframework.web.bind.annotation.RestController;
16
+
17
+import java.util.List;
18
+import java.util.Map;
19
+
20
+/**
21
+ * @author FXF
22
+ * @date 2018-10-25
23
+ */
24
+@RestController
25
+@RefreshScope
26
+@RequestMapping("/")
27
+@Api(value = "缴费相关的API", description = "缴费相关的API")
28
+public class BillController {
29
+	
30
+	@Autowired
31
+	private BillServiceI billServiceI;
32
+	
33
+	@ApiOperation(value = "获取本人的收费账单信息(已缴费或未缴费)", notes = "获取本人的收费账单信息(已缴费或未缴费)")
34
+	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
35
+			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "payType", value = "0是未缴费1是已缴费"),
36
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
37
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
38
+	@RequestMapping(value = "/bills/{communityId}/{payType}",method = RequestMethod.GET)
39
+	public ResponseBean getBillInvoice(@PathVariable Integer communityId,
40
+	                                   @PathVariable Integer payType,
41
+	                                   @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
42
+	                                   @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
43
+		ResponseBean responseBean = new ResponseBean();
44
+		List<Map<String,Object>> billsList = billServiceI.getBillsList(communityId,payType,pageNum,pageSize);
45
+		responseBean.addSuccess(billsList);
46
+		return responseBean;
47
+	}
48
+	
49
+	@ApiOperation(value = "获取账单的详细信息", notes = "获取账单的详细信息")
50
+	@ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
51
+						@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "billInvoiceId", value = "账单id")})
52
+	@RequestMapping(value = "/bill/{communityId}/{billInvoiceId}",method = RequestMethod.GET)
53
+	public ResponseBean getBillInvoiceDetail(@PathVariable Integer communityId,@PathVariable Integer billInvoiceId){
54
+		ResponseBean responseBean = new ResponseBean();
55
+		Map<String,Object> billInvoiceMap = billServiceI.getBillInvoiceDetail(communityId,billInvoiceId);
56
+		responseBean.addSuccess(billInvoiceMap);
57
+		return responseBean;
58
+	}
59
+}

+ 20
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java Bestand weergeven

@@ -6,11 +6,14 @@ import com.community.huiju.config.entity.UserElement;
6 6
 import com.community.huiju.model.TaUser;
7 7
 import com.community.huiju.model.TpTicket;
8 8
 import com.community.huiju.model.TpTransaction;
9
+import com.community.huiju.model.TpTicketRecordComment;
9 10
 import com.community.huiju.service.ITicketService;
10 11
 import io.swagger.annotations.Api;
11 12
 import io.swagger.annotations.ApiImplicitParam;
12 13
 import io.swagger.annotations.ApiImplicitParams;
13 14
 import io.swagger.annotations.ApiOperation;
15
+import io.swagger.annotations.Example;
16
+import io.swagger.annotations.ExampleProperty;
14 17
 import lombok.val;
15 18
 import org.springframework.beans.factory.annotation.Autowired;
16 19
 import org.springframework.cloud.context.config.annotation.RefreshScope;
@@ -69,8 +72,8 @@ public class TicketController {
69 72
     @ApiImplicitParams({
70 73
             @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId", value = "小区编号"),
71 74
             @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNum", value = "第几页"),
72
-            @ApiImplicitParam(paramType = "path",dataType = "Integer",name = "pageSize", value = "一页多少数据"),
73
-            @ApiImplicitParam(paramType = "path",dataType = "String",name = "type", value = "工单类型 (0报修/1投诉/2联系单)"),
75
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize", value = "一页多少数据"),
76
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "type", value = "工单类型 (0报修/1投诉/2联系单)"),
74 77
     })
75 78
     public ResponseBean getServiceList(@PathVariable(value = "communityId") String communityId,
76 79
                                        @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum,
@@ -91,6 +94,21 @@ public class TicketController {
91 94
         return responseBean;
92 95
 
93 96
     }
97
+    @ApiOperation(value = "回复 报修/投诉/联系单 追问接口", notes = "回复 报修/投诉/联系单 追问接口")
98
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
99
+            @ApiImplicitParam(name = "tpTicketRecordComment", value = "回复记录参数", paramType ="body")})
100
+    @RequestMapping(value = "/ticket/reply/{communityId}", method = RequestMethod.POST)
101
+    public ResponseBean updateTicketsReply(@PathVariable(value = "communityId") Integer communityId, @RequestBody TpTicketRecordComment tpTicketRecordComment){
102
+        ResponseBean responseBean = new ResponseBean();
103
+        tpTicketRecordComment.setCommunityId(communityId);
104
+        Integer size = iTicketService.updateTicketsReply(tpTicketRecordComment);
105
+        if (size > 0){
106
+            responseBean.addSuccess(size);
107
+        }else{
108
+            responseBean.addError("更新失败");
109
+        }
110
+        return responseBean;
111
+    }
94 112
 
95 113
     @ApiOperation(value = "添加报修", notes = "添加报修")
96 114
     @ApiImplicitParams({

+ 64
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java Bestand weergeven

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.controller;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.community.commom.constant.Constant;
4 5
 import com.community.commom.mode.ResponseBean;
5 6
 import com.community.huiju.common.code.cache.AppkeyCache;
@@ -71,5 +72,68 @@ public class UserController {
71 72
         return response;
72 73
     }
73 74
 
75
+    @ApiOperation(value = "修改用户名和性别", notes = "修改用户名和性别")
76
+    @ApiImplicitParams({
77
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "userName",value = "用户民"),
78
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "gender",value = "性别")
79
+    })
80
+    @RequestMapping(value = "/user/update/info",method = RequestMethod.PUT)
81
+    public ResponseBean updateUserNameAndGender(@RequestBody TaUser user,
82
+                                                HttpSession session){
83
+        ResponseBean response = new ResponseBean();
84
+
85
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
86
+
87
+        user.setId(userElement.getId());
88
+
89
+        response = iTaUserService.modifyUser(user);
90
+        return response;
91
+
92
+    }
93
+
94
+    @ApiOperation(value = "租客或家属 启用或者停用", notes = "租客或家属 启用或者停用")
95
+    @ApiImplicitParams({
96
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "userId",value = "租客或者家属"),
97
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "type",value = "1启用 0停用")
98
+    })
99
+    @RequestMapping(value = "/user/update/dependentsOrTenants",method = RequestMethod.PUT)
100
+    public ResponseBean updateDependentsOrTenants(@RequestBody String parameter,
101
+                                                HttpSession session){
102
+        ResponseBean response = new ResponseBean();
103
+
104
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
105
+
106
+        JSONObject jsonObject = JSONObject.parseObject(parameter);
107
+        response = iTaUserService.startOrEndUsingUser(userElement.getId(),jsonObject.getInteger("userId"),jsonObject.getInteger("type"));
108
+
109
+        return response;
110
+
111
+    }
112
+
113
+
114
+    @ApiOperation(value = "业主添加 租客或家属", notes = "业主添加 租客或家属")
115
+    @ApiImplicitParams({
116
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "userName",value = "租客或者家属 姓名"),
117
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "phone",value = "租客或者家属 手机号"),
118
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "gender",value = "租客或者家属 性别 1男 2女"),
119
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "type",value = "1家属 0租客")
120
+    })
121
+    @RequestMapping(value = "/user/update/addTenantsOrDependents",method = RequestMethod.POST)
122
+    public ResponseBean addTenantsOrDependents(@RequestBody String parameter,
123
+                                               HttpSession session){
124
+        ResponseBean response = new ResponseBean();
125
+
126
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
127
+        JSONObject jsonObject = JSONObject.parseObject(parameter);
128
+        response = iTaUserService.addTenantsOrDependents(jsonObject.getString("userName"),
129
+                jsonObject.getString("phone"),jsonObject.getString("gender"),
130
+                userElement.getId(),
131
+                jsonObject.getInteger("type"));
132
+
133
+        return response;
134
+
135
+    }
136
+
137
+
74 138
 
75 139
 }

+ 39
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillInvoiceMapper.java Bestand weergeven

@@ -0,0 +1,39 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpBillInvoice;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.List;
8
+import java.util.Map;
9
+
10
+@Mapper
11
+public interface TpBillInvoiceMapper {
12
+    int deleteByPrimaryKey(Integer id);
13
+
14
+    int insert(TpBillInvoice record);
15
+
16
+    int insertSelective(TpBillInvoice record);
17
+
18
+    TpBillInvoice selectByPrimaryKey(Integer id);
19
+
20
+    int updateByPrimaryKeySelective(TpBillInvoice record);
21
+
22
+    int updateByPrimaryKey(TpBillInvoice record);
23
+    
24
+    /**
25
+     * 分页获取缴费和未缴费的数据
26
+     * @param communityId
27
+     * @param userId
28
+     * @param payType
29
+     * @return
30
+     */
31
+    List<Map<String, Object>> getBillsList(@Param("communityId") Integer communityId,@Param("userId") Integer userId,@Param("payType") Integer payType);
32
+    
33
+    /**
34
+     * 获取账单的详细信息
35
+     * @param billInvoiceId
36
+     * @return
37
+     */
38
+    Map<String, Object> getBillInvoiceDetail(@Param("communityId") Integer communityId,@Param("billInvoiceId") Integer billInvoiceId);
39
+}

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillMapper.java Bestand weergeven

@@ -0,0 +1,19 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpBill;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+@Mapper
7
+public interface TpBillMapper {
8
+    int deleteByPrimaryKey(Integer id);
9
+
10
+    int insert(TpBill record);
11
+
12
+    int insertSelective(TpBill record);
13
+
14
+    TpBill selectByPrimaryKey(Integer id);
15
+
16
+    int updateByPrimaryKeySelective(TpBill record);
17
+
18
+    int updateByPrimaryKey(TpBill record);
19
+}

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillStatementMapper.java Bestand weergeven

@@ -0,0 +1,19 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpBillStatement;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+@Mapper
7
+public interface TpBillStatementMapper {
8
+    int deleteByPrimaryKey(Integer id);
9
+
10
+    int insert(TpBillStatement record);
11
+
12
+    int insertSelective(TpBillStatement record);
13
+
14
+    TpBillStatement selectByPrimaryKey(Integer id);
15
+
16
+    int updateByPrimaryKeySelective(TpBillStatement record);
17
+
18
+    int updateByPrimaryKey(TpBillStatement record);
19
+}

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java Bestand weergeven

@@ -0,0 +1,19 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpBuildingOwnerInfo;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+@Mapper
7
+public interface TpBuildingOwnerInfoMapper {
8
+    int deleteByPrimaryKey(Integer id);
9
+
10
+    int insert(TpBuildingOwnerInfo record);
11
+
12
+    int insertSelective(TpBuildingOwnerInfo record);
13
+
14
+    TpBuildingOwnerInfo selectByPrimaryKey(Integer id);
15
+
16
+    int updateByPrimaryKeySelective(TpBuildingOwnerInfo record);
17
+
18
+    int updateByPrimaryKey(TpBuildingOwnerInfo record);
19
+}

+ 145
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBill.java Bestand weergeven

@@ -0,0 +1,145 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpBill {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private String billName;
11
+
12
+    private String billExplain;
13
+
14
+    private String payPrice;
15
+
16
+    private Integer payTotalNum;
17
+
18
+    private Integer payedNum;
19
+
20
+    private Integer unpayedNum;
21
+
22
+    private String billStatus;
23
+
24
+    private Date endDate;
25
+
26
+    private Integer createUser;
27
+
28
+    private Date createDate;
29
+
30
+    private Integer updateUser;
31
+
32
+    private Date updateDate;
33
+
34
+    public Integer getId() {
35
+        return id;
36
+    }
37
+
38
+    public void setId(Integer id) {
39
+        this.id = id;
40
+    }
41
+
42
+    public Integer getCommunityId() {
43
+        return communityId;
44
+    }
45
+
46
+    public void setCommunityId(Integer communityId) {
47
+        this.communityId = communityId;
48
+    }
49
+
50
+    public String getBillName() {
51
+        return billName;
52
+    }
53
+
54
+    public void setBillName(String billName) {
55
+        this.billName = billName == null ? null : billName.trim();
56
+    }
57
+
58
+    public String getBillExplain() {
59
+        return billExplain;
60
+    }
61
+
62
+    public void setBillExplain(String billExplain) {
63
+        this.billExplain = billExplain == null ? null : billExplain.trim();
64
+    }
65
+
66
+    public String getPayPrice() {
67
+        return payPrice;
68
+    }
69
+
70
+    public void setPayPrice(String payPrice) {
71
+        this.payPrice = payPrice == null ? null : payPrice.trim();
72
+    }
73
+
74
+    public Integer getPayTotalNum() {
75
+        return payTotalNum;
76
+    }
77
+
78
+    public void setPayTotalNum(Integer payTotalNum) {
79
+        this.payTotalNum = payTotalNum;
80
+    }
81
+
82
+    public Integer getPayedNum() {
83
+        return payedNum;
84
+    }
85
+
86
+    public void setPayedNum(Integer payedNum) {
87
+        this.payedNum = payedNum;
88
+    }
89
+
90
+    public Integer getUnpayedNum() {
91
+        return unpayedNum;
92
+    }
93
+
94
+    public void setUnpayedNum(Integer unpayedNum) {
95
+        this.unpayedNum = unpayedNum;
96
+    }
97
+
98
+    public String getBillStatus() {
99
+        return billStatus;
100
+    }
101
+
102
+    public void setBillStatus(String billStatus) {
103
+        this.billStatus = billStatus == null ? null : billStatus.trim();
104
+    }
105
+
106
+    public Date getEndDate() {
107
+        return endDate;
108
+    }
109
+
110
+    public void setEndDate(Date endDate) {
111
+        this.endDate = endDate;
112
+    }
113
+
114
+    public Integer getCreateUser() {
115
+        return createUser;
116
+    }
117
+
118
+    public void setCreateUser(Integer createUser) {
119
+        this.createUser = createUser;
120
+    }
121
+
122
+    public Date getCreateDate() {
123
+        return createDate;
124
+    }
125
+
126
+    public void setCreateDate(Date createDate) {
127
+        this.createDate = createDate;
128
+    }
129
+
130
+    public Integer getUpdateUser() {
131
+        return updateUser;
132
+    }
133
+
134
+    public void setUpdateUser(Integer updateUser) {
135
+        this.updateUser = updateUser;
136
+    }
137
+
138
+    public Date getUpdateDate() {
139
+        return updateDate;
140
+    }
141
+
142
+    public void setUpdateDate(Date updateDate) {
143
+        this.updateDate = updateDate;
144
+    }
145
+}

+ 155
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBillInvoice.java Bestand weergeven

@@ -0,0 +1,155 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpBillInvoice {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer billId;
11
+
12
+    private Integer buildingOwnerInfoId;
13
+
14
+    private Integer taUserId;
15
+
16
+    private String billInvoiceExplain;
17
+
18
+    private Integer payPrice;
19
+
20
+    private Integer billStatementId;
21
+
22
+    private String billStatus;
23
+
24
+    private String payName;
25
+
26
+    private Date payDate;
27
+
28
+    private Integer createUser;
29
+
30
+    private Date createDate;
31
+
32
+    private Integer updateUser;
33
+
34
+    private Date updateDate;
35
+
36
+    public Integer getId() {
37
+        return id;
38
+    }
39
+
40
+    public void setId(Integer id) {
41
+        this.id = id;
42
+    }
43
+
44
+    public Integer getCommunityId() {
45
+        return communityId;
46
+    }
47
+
48
+    public void setCommunityId(Integer communityId) {
49
+        this.communityId = communityId;
50
+    }
51
+
52
+    public Integer getBillId() {
53
+        return billId;
54
+    }
55
+
56
+    public void setBillId(Integer billId) {
57
+        this.billId = billId;
58
+    }
59
+
60
+    public Integer getBuildingOwnerInfoId() {
61
+        return buildingOwnerInfoId;
62
+    }
63
+
64
+    public void setBuildingOwnerInfoId(Integer buildingOwnerInfoId) {
65
+        this.buildingOwnerInfoId = buildingOwnerInfoId;
66
+    }
67
+
68
+    public Integer getTaUserId() {
69
+        return taUserId;
70
+    }
71
+
72
+    public void setTaUserId(Integer taUserId) {
73
+        this.taUserId = taUserId;
74
+    }
75
+
76
+    public String getBillInvoiceExplain() {
77
+        return billInvoiceExplain;
78
+    }
79
+
80
+    public void setBillInvoiceExplain(String billInvoiceExplain) {
81
+        this.billInvoiceExplain = billInvoiceExplain == null ? null : billInvoiceExplain.trim();
82
+    }
83
+
84
+    public Integer getPayPrice() {
85
+        return payPrice;
86
+    }
87
+
88
+    public void setPayPrice(Integer payPrice) {
89
+        this.payPrice = payPrice;
90
+    }
91
+
92
+    public Integer getBillStatementId() {
93
+        return billStatementId;
94
+    }
95
+
96
+    public void setBillStatementId(Integer billStatementId) {
97
+        this.billStatementId = billStatementId;
98
+    }
99
+
100
+    public String getBillStatus() {
101
+        return billStatus;
102
+    }
103
+
104
+    public void setBillStatus(String billStatus) {
105
+        this.billStatus = billStatus == null ? null : billStatus.trim();
106
+    }
107
+
108
+    public String getPayName() {
109
+        return payName;
110
+    }
111
+
112
+    public void setPayName(String payName) {
113
+        this.payName = payName == null ? null : payName.trim();
114
+    }
115
+
116
+    public Date getPayDate() {
117
+        return payDate;
118
+    }
119
+
120
+    public void setPayDate(Date payDate) {
121
+        this.payDate = payDate;
122
+    }
123
+
124
+    public Integer getCreateUser() {
125
+        return createUser;
126
+    }
127
+
128
+    public void setCreateUser(Integer createUser) {
129
+        this.createUser = createUser;
130
+    }
131
+
132
+    public Date getCreateDate() {
133
+        return createDate;
134
+    }
135
+
136
+    public void setCreateDate(Date createDate) {
137
+        this.createDate = createDate;
138
+    }
139
+
140
+    public Integer getUpdateUser() {
141
+        return updateUser;
142
+    }
143
+
144
+    public void setUpdateUser(Integer updateUser) {
145
+        this.updateUser = updateUser;
146
+    }
147
+
148
+    public Date getUpdateDate() {
149
+        return updateDate;
150
+    }
151
+
152
+    public void setUpdateDate(Date updateDate) {
153
+        this.updateDate = updateDate;
154
+    }
155
+}

+ 95
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBillStatement.java Bestand weergeven

@@ -0,0 +1,95 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpBillStatement {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer billInvoiceId;
11
+
12
+    private Integer taUserId;
13
+
14
+    private Integer payPrice;
15
+
16
+    private String payName;
17
+
18
+    private String payRemark;
19
+
20
+    private String payType;
21
+
22
+    private Date createTime;
23
+
24
+    public Integer getId() {
25
+        return id;
26
+    }
27
+
28
+    public void setId(Integer id) {
29
+        this.id = id;
30
+    }
31
+
32
+    public Integer getCommunityId() {
33
+        return communityId;
34
+    }
35
+
36
+    public void setCommunityId(Integer communityId) {
37
+        this.communityId = communityId;
38
+    }
39
+
40
+    public Integer getBillInvoiceId() {
41
+        return billInvoiceId;
42
+    }
43
+
44
+    public void setBillInvoiceId(Integer billInvoiceId) {
45
+        this.billInvoiceId = billInvoiceId;
46
+    }
47
+
48
+    public Integer getTaUserId() {
49
+        return taUserId;
50
+    }
51
+
52
+    public void setTaUserId(Integer taUserId) {
53
+        this.taUserId = taUserId;
54
+    }
55
+
56
+    public Integer getPayPrice() {
57
+        return payPrice;
58
+    }
59
+
60
+    public void setPayPrice(Integer payPrice) {
61
+        this.payPrice = payPrice;
62
+    }
63
+
64
+    public String getPayName() {
65
+        return payName;
66
+    }
67
+
68
+    public void setPayName(String payName) {
69
+        this.payName = payName == null ? null : payName.trim();
70
+    }
71
+
72
+    public String getPayRemark() {
73
+        return payRemark;
74
+    }
75
+
76
+    public void setPayRemark(String payRemark) {
77
+        this.payRemark = payRemark == null ? null : payRemark.trim();
78
+    }
79
+
80
+    public String getPayType() {
81
+        return payType;
82
+    }
83
+
84
+    public void setPayType(String payType) {
85
+        this.payType = payType == null ? null : payType.trim();
86
+    }
87
+
88
+    public Date getCreateTime() {
89
+        return createTime;
90
+    }
91
+
92
+    public void setCreateTime(Date createTime) {
93
+        this.createTime = createTime;
94
+    }
95
+}

+ 165
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java Bestand weergeven

@@ -0,0 +1,165 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpBuildingOwnerInfo {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private String idCard;
11
+
12
+    private String building;
13
+
14
+    private String unit;
15
+
16
+    private String level;
17
+
18
+    private String roomNo;
19
+
20
+    private String ownerName;
21
+
22
+    private String ownerTel;
23
+
24
+    private String gender;
25
+
26
+    private String pairStatus;
27
+
28
+    private String verifyStatus;
29
+
30
+    private Integer createUser;
31
+
32
+    private Date createDate;
33
+
34
+    private Integer updateUser;
35
+
36
+    private Date updateDate;
37
+
38
+    public Integer getId() {
39
+        return id;
40
+    }
41
+
42
+    public void setId(Integer id) {
43
+        this.id = id;
44
+    }
45
+
46
+    public Integer getCommunityId() {
47
+        return communityId;
48
+    }
49
+
50
+    public void setCommunityId(Integer communityId) {
51
+        this.communityId = communityId;
52
+    }
53
+
54
+    public String getIdCard() {
55
+        return idCard;
56
+    }
57
+
58
+    public void setIdCard(String idCard) {
59
+        this.idCard = idCard == null ? null : idCard.trim();
60
+    }
61
+
62
+    public String getBuilding() {
63
+        return building;
64
+    }
65
+
66
+    public void setBuilding(String building) {
67
+        this.building = building == null ? null : building.trim();
68
+    }
69
+
70
+    public String getUnit() {
71
+        return unit;
72
+    }
73
+
74
+    public void setUnit(String unit) {
75
+        this.unit = unit == null ? null : unit.trim();
76
+    }
77
+
78
+    public String getLevel() {
79
+        return level;
80
+    }
81
+
82
+    public void setLevel(String level) {
83
+        this.level = level == null ? null : level.trim();
84
+    }
85
+
86
+    public String getRoomNo() {
87
+        return roomNo;
88
+    }
89
+
90
+    public void setRoomNo(String roomNo) {
91
+        this.roomNo = roomNo == null ? null : roomNo.trim();
92
+    }
93
+
94
+    public String getOwnerName() {
95
+        return ownerName;
96
+    }
97
+
98
+    public void setOwnerName(String ownerName) {
99
+        this.ownerName = ownerName == null ? null : ownerName.trim();
100
+    }
101
+
102
+    public String getOwnerTel() {
103
+        return ownerTel;
104
+    }
105
+
106
+    public void setOwnerTel(String ownerTel) {
107
+        this.ownerTel = ownerTel == null ? null : ownerTel.trim();
108
+    }
109
+
110
+    public String getGender() {
111
+        return gender;
112
+    }
113
+
114
+    public void setGender(String gender) {
115
+        this.gender = gender == null ? null : gender.trim();
116
+    }
117
+
118
+    public String getPairStatus() {
119
+        return pairStatus;
120
+    }
121
+
122
+    public void setPairStatus(String pairStatus) {
123
+        this.pairStatus = pairStatus == null ? null : pairStatus.trim();
124
+    }
125
+
126
+    public String getVerifyStatus() {
127
+        return verifyStatus;
128
+    }
129
+
130
+    public void setVerifyStatus(String verifyStatus) {
131
+        this.verifyStatus = verifyStatus == null ? null : verifyStatus.trim();
132
+    }
133
+
134
+    public Integer getCreateUser() {
135
+        return createUser;
136
+    }
137
+
138
+    public void setCreateUser(Integer createUser) {
139
+        this.createUser = createUser;
140
+    }
141
+
142
+    public Date getCreateDate() {
143
+        return createDate;
144
+    }
145
+
146
+    public void setCreateDate(Date createDate) {
147
+        this.createDate = createDate;
148
+    }
149
+
150
+    public Integer getUpdateUser() {
151
+        return updateUser;
152
+    }
153
+
154
+    public void setUpdateUser(Integer updateUser) {
155
+        this.updateUser = updateUser;
156
+    }
157
+
158
+    public Date getUpdateDate() {
159
+        return updateDate;
160
+    }
161
+
162
+    public void setUpdateDate(Date updateDate) {
163
+        this.updateDate = updateDate;
164
+    }
165
+}

+ 10
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecordComment.java Bestand weergeven

@@ -12,6 +12,8 @@ public class TpTicketRecordComment {
12 12
     private Integer ticketId;
13 13
 
14 14
     private Integer ticketRecordId;
15
+    
16
+    private Integer ticketRecordCommentId;
15 17
 
16 18
     private Integer uuid;
17 19
 
@@ -104,4 +106,12 @@ public class TpTicketRecordComment {
104 106
     public void setCreateDate(Date createDate) {
105 107
         this.createDate = createDate;
106 108
     }
109
+    
110
+    public Integer getTicketRecordCommentId() {
111
+        return ticketRecordCommentId;
112
+    }
113
+    
114
+    public void setTicketRecordCommentId(Integer ticketRecordCommentId) {
115
+        this.ticketRecordCommentId = ticketRecordCommentId;
116
+    }
107 117
 }

+ 23
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/BillServiceI.java Bestand weergeven

@@ -0,0 +1,23 @@
1
+package com.community.huiju.service;
2
+
3
+import java.util.List;
4
+import java.util.Map;
5
+
6
+public interface BillServiceI {
7
+	/**
8
+	 * 根据payType分页获取缴费或未缴费的数据
9
+	 * @param communityId
10
+	 * @param payType
11
+	 * @param pageNum
12
+	 * @param pageSize
13
+	 * @return
14
+	 */
15
+	List<Map<String, Object>> getBillsList(Integer communityId, Integer payType, Integer pageNum, Integer pageSize);
16
+	
17
+	/**
18
+	 * 获取账单的详细信息
19
+	 * @param billInvoiceId
20
+	 * @return
21
+	 */
22
+	Map<String, Object> getBillInvoiceDetail(Integer communityId,Integer billInvoiceId);
23
+}

+ 27
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java Bestand weergeven

@@ -40,5 +40,32 @@ public interface ITaUserService {
40 40
     ResponseBean udDateloginName(Integer id, String paramets);
41 41
 
42 42
 
43
+    /**
44
+     * 修改用户
45
+     * @param user
46
+     * @return
47
+     */
48
+    ResponseBean modifyUser(TaUser user);
49
+
50
+    /**
51
+     * 停用用户 或者 启用用户
52
+     * @param currentUserId 当前用户(业主)
53
+     * @param userId
54
+     * @param type 1启用 0停用
55
+     * @return
56
+     */
57
+    ResponseBean startOrEndUsingUser(Integer currentUserId,Integer userId,Integer type);
58
+
59
+
60
+    /**
61
+     * 添加租客或者家属
62
+     * @param userName
63
+     * @param phone
64
+     * @param gender
65
+     * @param currentUserId 当前用户(业主)
66
+     * @param type 1家属 0租客
67
+     * @return
68
+     */
69
+    ResponseBean addTenantsOrDependents(String userName, String phone, String gender,Integer currentUserId,Integer type);
43 70
 
44 71
 }

+ 8
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java Bestand weergeven

@@ -2,6 +2,7 @@ package com.community.huiju.service;
2 2
 
3 3
 import com.community.commom.mode.ResponseBean;
4 4
 import com.community.huiju.model.TpTicket;
5
+import com.community.huiju.model.TpTicketRecordComment;
5 6
 import com.community.huiju.vo.TpTicketVO;
6 7
 
7 8
 import java.util.List;
@@ -46,4 +47,11 @@ public interface ITicketService {
46 47
 	 * @return
47 48
 	 */
48 49
     ResponseBean addAiTicketService(Integer userId, TpTicket tpTicket);
50
+	
51
+	/**
52
+	 * 回复工单
53
+	 * @param tpTicketRecordComment
54
+	 * @return
55
+	 */
56
+	Integer updateTicketsReply(TpTicketRecordComment tpTicketRecordComment);
49 57
 }

+ 49
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BillServiceImpl.java Bestand weergeven

@@ -0,0 +1,49 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.community.huiju.dao.TpBillInvoiceMapper;
4
+import com.community.huiju.service.BillServiceI;
5
+import com.github.pagehelper.PageHelper;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.stereotype.Service;
8
+
9
+import java.util.List;
10
+import java.util.Map;
11
+
12
+/**
13
+ * @author FXF
14
+ * @date 2018-10-25
15
+ */
16
+@Service("billService")
17
+public class BillServiceImpl implements BillServiceI {
18
+	
19
+	@Autowired
20
+	private TpBillInvoiceMapper tpBillInvoiceMapper;
21
+	
22
+	/**
23
+	 * 根据payType分页获取缴费或未缴费的数据
24
+	 * @param communityId
25
+	 * @param payType
26
+	 * @param pageNum
27
+	 * @param pageSize
28
+	 * @return
29
+	 */
30
+	@Override
31
+	public List<Map<String, Object>> getBillsList(Integer communityId, Integer payType, Integer pageNum, Integer pageSize) {
32
+		//todo
33
+		Integer userId = 1;
34
+		//使用分页插件
35
+		PageHelper.startPage(pageNum, pageSize);
36
+		List<Map<String,Object>> billsList = tpBillInvoiceMapper.getBillsList(communityId,userId,payType);
37
+		return billsList;
38
+	}
39
+	
40
+	/**
41
+	 * 获取账单的详细信息
42
+	 * @param billInvoiceId
43
+	 * @return
44
+	 */
45
+	@Override
46
+	public Map<String, Object> getBillInvoiceDetail(Integer communityId,Integer billInvoiceId) {
47
+		return tpBillInvoiceMapper.getBillInvoiceDetail(communityId,billInvoiceId);
48
+	}
49
+}

+ 163
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Bestand weergeven

@@ -5,13 +5,19 @@ import com.community.commom.mode.ResponseBean;
5 5
 import com.community.commom.utils.AccountValidatorUtil;
6 6
 import com.community.commom.utils.MD5Utils;
7 7
 import com.community.huiju.common.code.cache.AppkeyCache;
8
+import com.community.huiju.dao.TaSysRoleMapper;
9
+import com.community.huiju.dao.TaSysUserRoleMapper;
8 10
 import com.community.huiju.dao.TaUserMapper;
11
+import com.community.huiju.dao.TpBuildingOwnerInfoMapper;
12
+import com.community.huiju.model.TaSysRole;
13
+import com.community.huiju.model.TaSysUserRole;
9 14
 import com.community.huiju.model.TaUser;
10 15
 import com.community.huiju.service.ITaUserService;
11 16
 import com.community.huiju.vo.TaUserVO;
12 17
 import com.google.common.collect.Maps;
13 18
 import lombok.extern.slf4j.Slf4j;
14 19
 import org.apache.commons.lang.StringUtils;
20
+import org.checkerframework.checker.units.qual.A;
15 21
 import org.springframework.beans.BeanUtils;
16 22
 import org.springframework.beans.factory.annotation.Autowired;
17 23
 import org.springframework.stereotype.Service;
@@ -31,6 +37,15 @@ public class TaUserServiceImpl implements ITaUserService {
31 37
     @Autowired
32 38
     private TaUserMapper taUserMapper;
33 39
 
40
+    @Autowired
41
+    private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
42
+
43
+    @Autowired
44
+    private TaSysRoleMapper taSysRoleMapper;
45
+
46
+    @Autowired
47
+    private TaSysUserRoleMapper taSysUserRoleMapper;
48
+
34 49
     @Transactional
35 50
     @Override
36 51
     public ResponseBean login(TaUser user) {
@@ -169,4 +184,152 @@ public class TaUserServiceImpl implements ITaUserService {
169 184
 
170 185
     }
171 186
 
187
+    @Transactional
188
+    @Override
189
+    public ResponseBean modifyUser(TaUser user) {
190
+
191
+        ResponseBean response = new ResponseBean();
192
+
193
+        TaUser taUser = taUserMapper.selectByPrimaryKey(user.getId());
194
+        BeanUtils.copyProperties(user,taUser);
195
+
196
+        int result = taUserMapper.updateByPrimaryKeySelective(taUser);
197
+
198
+        if (result > 0){
199
+            response.addSuccess("修改成功!");
200
+        }else {
201
+            response.addError("修改失败!");
202
+        }
203
+
204
+        return response;
205
+    }
206
+
207
+    @Transactional
208
+    @Override
209
+    public ResponseBean startOrEndUsingUser(Integer currentUserId, Integer userId, Integer type) {
210
+        ResponseBean response = null;
211
+        if ("1".equals(type)){
212
+            response = startAndEnd(currentUserId,userId,true);
213
+        } else {
214
+            response = startAndEnd(currentUserId,userId,false);
215
+        }
216
+        return response;
217
+    }
218
+
219
+    /**
220
+     *  用户停用和启用
221
+     * @param currentUserId 当前用户(业主)
222
+     * @param userId 租客或者家属
223
+     * @param bool 启用为 true  停用为 false
224
+     * @return
225
+     */
226
+    private ResponseBean startAndEnd(Integer currentUserId, Integer userId, boolean bool){
227
+
228
+        // TODO 更新人字段需要待定
229
+        /**
230
+         * 更新人 是业主 还是 物业
231
+         */
232
+
233
+        ResponseBean response = new ResponseBean();
234
+
235
+        TaUser user = taUserMapper.selectByPrimaryKey(userId);
236
+        if (null == user) {
237
+            response.addError("该用户不存在!");
238
+            return response;
239
+        }
240
+        if (!currentUserId.equals(user.getParentId())) {
241
+            response.addError("该用户不是您的家属或租客!");
242
+            return response;
243
+        }
244
+        if (bool) {
245
+            if ("1".equals(user.getStatus())) {
246
+                response.addError("用户已启用!");
247
+                return response;
248
+            }
249
+            user.setStatus("1");
250
+        } else {
251
+            if ("0".equals(user.getStatus())) {
252
+                response.addError("用户已停用!");
253
+                return response;
254
+            }
255
+            user.setStatus("0");
256
+        }
257
+
258
+        int result = taUserMapper.updateByPrimaryKeySelective(user);
259
+        if (result > 0) {
260
+            response.addSuccess(bool==true?"用户启用成功!":"用户停用成功!");
261
+        } else {
262
+            response.addError(bool==true?"用户启用失败!":"用户停用失败!");
263
+        }
264
+
265
+        return response;
266
+    }
267
+
268
+    @Transactional
269
+    @Override
270
+    public ResponseBean addTenantsOrDependents(String userName, String phone, String gender, Integer currentUserId, Integer type) {
271
+        ResponseBean response = new ResponseBean();
272
+
273
+        TaUser taUser = taUserMapper.selectByPrimaryKey(currentUserId);
274
+        if (null == taUser) {
275
+            response.addError("此用户不存在!");
276
+            return response;
277
+        }
278
+        if (taUser.getVerifyStatus().equals("0") || taUser.getVerifyStatus().equals("2")) {
279
+            response.addError("对不起,您未认证或认证已作废!");
280
+            return response;
281
+        }
282
+
283
+        TaUser user = new TaUser();
284
+        user.setUserName(userName);
285
+        user.setLoginName(phone);
286
+        user.setGender(gender);
287
+        user.setCreateDate(new Date());
288
+        user.setCreateUser(currentUserId);
289
+        user.setUpdateDate(new Date());
290
+        user.setUpdateUser(currentUserId);
291
+        user.setParentId(currentUserId);
292
+        user.setStatus("1");
293
+        user.setVerifyStatus("1");
294
+        user.setAcceptAgreementStatus("1");
295
+        user.setRemark("这是业主添加的!");
296
+        user.setUserName(user.getLoginName());
297
+        user.setBuildingOwnerInfoId(taUser.getBuildingOwnerInfoId());
298
+        user.setCommunityId(user.getCommunityId());
299
+
300
+        int result = taUserMapper.insertSelective(user);
301
+        if (result < 0) {
302
+            response.addError("添加失败!");
303
+            return response;
304
+        }
305
+
306
+        // 先查询角色 在角色关联记录
307
+        // 这里的 2 或者 3 是对应角色编号
308
+        int roleType = type.equals("0") ? 2 : 3;
309
+        TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(roleType);
310
+        if (null == taSysRole) {
311
+            response.addError("该权限不存在!");
312
+            log.error("这个角色没有找到!角色名称:{} 角色编号:{}",type.equals("0") ? "租客" : "家属",roleType);
313
+            return response;
314
+        }
315
+
316
+        TaSysUserRole taSysUserRole = new TaSysUserRole();
317
+        taSysUserRole.setCommunityId(user.getCommunityId());
318
+        taSysUserRole.setRoleId(taSysRole.getId());
319
+        taSysUserRole.setUserId(user.getId());
320
+        try {
321
+            int resultRole = taSysUserRoleMapper.insertSelective(taSysUserRole);
322
+            if (resultRole > 0) {
323
+                response.addSuccess("添加成功!");
324
+            } else {
325
+                throw new RuntimeException("租客或者家属角色权限添加失败");
326
+            }
327
+        } catch (Exception e) {
328
+            response.addSuccess("添加失败!");
329
+            log.error("租客或者家属角色权限添加失败!",e);
330
+            throw new RuntimeException("租客或者家属角色权限添加失败");
331
+        }
332
+
333
+        return response;
334
+    }
172 335
 }

+ 23
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java Bestand weergeven

@@ -1,6 +1,7 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3 3
 
4
+import com.community.commom.constant.Constant;
4 5
 import com.community.commom.mode.ResponseBean;
5 6
 import com.community.huiju.dao.TaUserMapper;
6 7
 import com.community.huiju.dao.TpTicketMapper;
@@ -40,6 +41,9 @@ public class TicketServiceImpl implements ITicketService {
40 41
 
41 42
     @Autowired
42 43
     private TpTicketRecordCommentMapper tpTicketRecordCommentMapper;
44
+    
45
+    @Autowired
46
+    private TaUserMapper taUserMapper;
43 47
 
44 48
     @Autowired
45 49
     private TaUserMapper taUserMapper;
@@ -195,5 +199,24 @@ public class TicketServiceImpl implements ITicketService {
195 199
         tpTicketRecordMapper.insert(tpTicketRecord);
196 200
         response.addSuccess("新增成功");
197 201
         return response;
202
+    
203
+    /**
204
+     * 回复工单
205
+     * @param tpTicketRecordComment
206
+     * @return
207
+     */
208
+    @Override
209
+    public Integer updateTicketsReply(TpTicketRecordComment tpTicketRecordComment) {
210
+        Integer userId = 1;
211
+        //查询用户名
212
+        TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
213
+        
214
+        tpTicketRecordComment.setUserName(taUser.getUserName());
215
+        tpTicketRecordComment.setParentId(tpTicketRecordComment.getTicketRecordCommentId());
216
+        tpTicketRecordComment.setUuid(userId);
217
+        tpTicketRecordComment.setUserType(Constant.TICKET_USER_TYPE);
218
+        tpTicketRecordComment.setCreateDate(new Date());
219
+        //插入回复数据
220
+        return tpTicketRecordCommentMapper.insertSelective(tpTicketRecordComment);
198 221
     }
199 222
 }

+ 2
- 0
CODE/smart-community/app-api/src/main/resources/application.yml Bestand weergeven

@@ -7,6 +7,8 @@ management:
7 7
 mybatis:
8 8
   typeAliasesPackage: com.community.huiju.model
9 9
   mapperLocations: classpath:mapper/*.xml
10
+  configuration:
11
+    call-setters-on-nulls: true
10 12
 # 分页配置
11 13
 pagehelper:
12 14
   helper-dialect: mysql

+ 1
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml Bestand weergeven

@@ -52,7 +52,7 @@
52 52
       #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
53 53
       )
54 54
   </insert>
55
-  <insert id="insertSelective" parameterType="com.community.huiju.model.TaUser" >
55
+  <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.community.huiju.model.TaUser" >
56 56
     insert into ta_user
57 57
     <trim prefix="(" suffix=")" suffixOverrides="," >
58 58
       <if test="id != null" >

+ 264
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpBillInvoiceMapper.xml Bestand weergeven

@@ -0,0 +1,264 @@
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.TpBillInvoiceMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBillInvoice" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="bill_id" property="billId" jdbcType="INTEGER" />
8
+    <result column="building_owner_info_id" property="buildingOwnerInfoId" jdbcType="INTEGER" />
9
+    <result column="ta_user_id" property="taUserId" jdbcType="INTEGER" />
10
+    <result column="bill_invoice_explain" property="billInvoiceExplain" jdbcType="VARCHAR" />
11
+    <result column="pay_price" property="payPrice" jdbcType="INTEGER" />
12
+    <result column="bill_statement_id" property="billStatementId" jdbcType="INTEGER" />
13
+    <result column="bill_status" property="billStatus" jdbcType="CHAR" />
14
+    <result column="pay_name" property="payName" jdbcType="VARCHAR" />
15
+    <result column="pay_date" property="payDate" jdbcType="TIMESTAMP" />
16
+    <result column="create_user" property="createUser" jdbcType="INTEGER" />
17
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
18
+    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
19
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
20
+  </resultMap>
21
+  <sql id="Base_Column_List" >
22
+    id, community_id, bill_id, building_owner_info_id, ta_user_id, bill_invoice_explain, 
23
+    pay_price, bill_statement_id, bill_status, pay_name, pay_date, create_user, create_date, 
24
+    update_user, update_date
25
+  </sql>
26
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
27
+    select 
28
+    <include refid="Base_Column_List" />
29
+    from tp_bill_invoice
30
+    where id = #{id,jdbcType=INTEGER}
31
+  </select>
32
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
33
+    delete from tp_bill_invoice
34
+    where id = #{id,jdbcType=INTEGER}
35
+  </delete>
36
+  <insert id="insert" parameterType="com.community.huiju.model.TpBillInvoice" >
37
+    insert into tp_bill_invoice (id, community_id, bill_id, 
38
+      building_owner_info_id, ta_user_id, bill_invoice_explain, 
39
+      pay_price, bill_statement_id, bill_status, 
40
+      pay_name, pay_date, create_user, 
41
+      create_date, update_user, update_date
42
+      )
43
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{billId,jdbcType=INTEGER}, 
44
+      #{buildingOwnerInfoId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER}, #{billInvoiceExplain,jdbcType=VARCHAR}, 
45
+      #{payPrice,jdbcType=INTEGER}, #{billStatementId,jdbcType=INTEGER}, #{billStatus,jdbcType=CHAR}, 
46
+      #{payName,jdbcType=VARCHAR}, #{payDate,jdbcType=TIMESTAMP}, #{createUser,jdbcType=INTEGER}, 
47
+      #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
48
+      )
49
+  </insert>
50
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBillInvoice" >
51
+    insert into tp_bill_invoice
52
+    <trim prefix="(" suffix=")" suffixOverrides="," >
53
+      <if test="id != null" >
54
+        id,
55
+      </if>
56
+      <if test="communityId != null" >
57
+        community_id,
58
+      </if>
59
+      <if test="billId != null" >
60
+        bill_id,
61
+      </if>
62
+      <if test="buildingOwnerInfoId != null" >
63
+        building_owner_info_id,
64
+      </if>
65
+      <if test="taUserId != null" >
66
+        ta_user_id,
67
+      </if>
68
+      <if test="billInvoiceExplain != null" >
69
+        bill_invoice_explain,
70
+      </if>
71
+      <if test="payPrice != null" >
72
+        pay_price,
73
+      </if>
74
+      <if test="billStatementId != null" >
75
+        bill_statement_id,
76
+      </if>
77
+      <if test="billStatus != null" >
78
+        bill_status,
79
+      </if>
80
+      <if test="payName != null" >
81
+        pay_name,
82
+      </if>
83
+      <if test="payDate != null" >
84
+        pay_date,
85
+      </if>
86
+      <if test="createUser != null" >
87
+        create_user,
88
+      </if>
89
+      <if test="createDate != null" >
90
+        create_date,
91
+      </if>
92
+      <if test="updateUser != null" >
93
+        update_user,
94
+      </if>
95
+      <if test="updateDate != null" >
96
+        update_date,
97
+      </if>
98
+    </trim>
99
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
100
+      <if test="id != null" >
101
+        #{id,jdbcType=INTEGER},
102
+      </if>
103
+      <if test="communityId != null" >
104
+        #{communityId,jdbcType=INTEGER},
105
+      </if>
106
+      <if test="billId != null" >
107
+        #{billId,jdbcType=INTEGER},
108
+      </if>
109
+      <if test="buildingOwnerInfoId != null" >
110
+        #{buildingOwnerInfoId,jdbcType=INTEGER},
111
+      </if>
112
+      <if test="taUserId != null" >
113
+        #{taUserId,jdbcType=INTEGER},
114
+      </if>
115
+      <if test="billInvoiceExplain != null" >
116
+        #{billInvoiceExplain,jdbcType=VARCHAR},
117
+      </if>
118
+      <if test="payPrice != null" >
119
+        #{payPrice,jdbcType=INTEGER},
120
+      </if>
121
+      <if test="billStatementId != null" >
122
+        #{billStatementId,jdbcType=INTEGER},
123
+      </if>
124
+      <if test="billStatus != null" >
125
+        #{billStatus,jdbcType=CHAR},
126
+      </if>
127
+      <if test="payName != null" >
128
+        #{payName,jdbcType=VARCHAR},
129
+      </if>
130
+      <if test="payDate != null" >
131
+        #{payDate,jdbcType=TIMESTAMP},
132
+      </if>
133
+      <if test="createUser != null" >
134
+        #{createUser,jdbcType=INTEGER},
135
+      </if>
136
+      <if test="createDate != null" >
137
+        #{createDate,jdbcType=TIMESTAMP},
138
+      </if>
139
+      <if test="updateUser != null" >
140
+        #{updateUser,jdbcType=INTEGER},
141
+      </if>
142
+      <if test="updateDate != null" >
143
+        #{updateDate,jdbcType=TIMESTAMP},
144
+      </if>
145
+    </trim>
146
+  </insert>
147
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBillInvoice" >
148
+    update tp_bill_invoice
149
+    <set >
150
+      <if test="communityId != null" >
151
+        community_id = #{communityId,jdbcType=INTEGER},
152
+      </if>
153
+      <if test="billId != null" >
154
+        bill_id = #{billId,jdbcType=INTEGER},
155
+      </if>
156
+      <if test="buildingOwnerInfoId != null" >
157
+        building_owner_info_id = #{buildingOwnerInfoId,jdbcType=INTEGER},
158
+      </if>
159
+      <if test="taUserId != null" >
160
+        ta_user_id = #{taUserId,jdbcType=INTEGER},
161
+      </if>
162
+      <if test="billInvoiceExplain != null" >
163
+        bill_invoice_explain = #{billInvoiceExplain,jdbcType=VARCHAR},
164
+      </if>
165
+      <if test="payPrice != null" >
166
+        pay_price = #{payPrice,jdbcType=INTEGER},
167
+      </if>
168
+      <if test="billStatementId != null" >
169
+        bill_statement_id = #{billStatementId,jdbcType=INTEGER},
170
+      </if>
171
+      <if test="billStatus != null" >
172
+        bill_status = #{billStatus,jdbcType=CHAR},
173
+      </if>
174
+      <if test="payName != null" >
175
+        pay_name = #{payName,jdbcType=VARCHAR},
176
+      </if>
177
+      <if test="payDate != null" >
178
+        pay_date = #{payDate,jdbcType=TIMESTAMP},
179
+      </if>
180
+      <if test="createUser != null" >
181
+        create_user = #{createUser,jdbcType=INTEGER},
182
+      </if>
183
+      <if test="createDate != null" >
184
+        create_date = #{createDate,jdbcType=TIMESTAMP},
185
+      </if>
186
+      <if test="updateUser != null" >
187
+        update_user = #{updateUser,jdbcType=INTEGER},
188
+      </if>
189
+      <if test="updateDate != null" >
190
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
191
+      </if>
192
+    </set>
193
+    where id = #{id,jdbcType=INTEGER}
194
+  </update>
195
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBillInvoice" >
196
+    update tp_bill_invoice
197
+    set community_id = #{communityId,jdbcType=INTEGER},
198
+      bill_id = #{billId,jdbcType=INTEGER},
199
+      building_owner_info_id = #{buildingOwnerInfoId,jdbcType=INTEGER},
200
+      ta_user_id = #{taUserId,jdbcType=INTEGER},
201
+      bill_invoice_explain = #{billInvoiceExplain,jdbcType=VARCHAR},
202
+      pay_price = #{payPrice,jdbcType=INTEGER},
203
+      bill_statement_id = #{billStatementId,jdbcType=INTEGER},
204
+      bill_status = #{billStatus,jdbcType=CHAR},
205
+      pay_name = #{payName,jdbcType=VARCHAR},
206
+      pay_date = #{payDate,jdbcType=TIMESTAMP},
207
+      create_user = #{createUser,jdbcType=INTEGER},
208
+      create_date = #{createDate,jdbcType=TIMESTAMP},
209
+      update_user = #{updateUser,jdbcType=INTEGER},
210
+      update_date = #{updateDate,jdbcType=TIMESTAMP}
211
+    where id = #{id,jdbcType=INTEGER}
212
+  </update>
213
+
214
+  <select id="getBillsList" resultType="map">
215
+      SELECT
216
+          i.id,
217
+          i.bill_invoice_explain as billInvoiceExplain,
218
+          i.pay_price AS payPrice,
219
+          i.ta_user_id AS taUserId,
220
+          i.bill_status AS billStatus,
221
+          b.bill_name AS billName,
222
+          b.bill_explain AS billExplain,
223
+          b.end_date AS endDate
224
+      FROM
225
+          tp_bill_invoice i
226
+          LEFT JOIN tp_bill b ON b.id = i.bill_id
227
+          AND b.community_id = #{communityId,jdbcType=INTEGER}
228
+      WHERE
229
+          i.community_id = #{communityId,jdbcType=INTEGER}
230
+          <if test="payType == 0">
231
+            AND i.bill_status = 0
232
+          </if>
233
+          <if test="payType == 1">
234
+            AND (i.bill_status = 1 or i.bill_status = 2)
235
+          </if>
236
+          AND i.ta_user_id = #{userId,jdbcType=INTEGER}
237
+  </select>
238
+
239
+  <select id="getBillInvoiceDetail" resultType="map">
240
+    SELECT
241
+        i.id,
242
+        i.bill_invoice_explain AS billInvoiceExplain,
243
+        i.pay_price AS payPrice,
244
+        i.ta_user_id AS taUserId,
245
+        i.bill_status AS billStatus,
246
+        b.bill_name AS billName,
247
+        b.bill_explain AS billExplain,
248
+        b.end_date AS endDate,
249
+        s.id AS billStatementId,
250
+        s.pay_name AS payName,
251
+        s.pay_remark AS payRemark,
252
+        s.pay_type AS payType,
253
+        s.create_time AS createTime
254
+    FROM
255
+        tp_bill_invoice i
256
+        LEFT JOIN tp_bill b ON b.id = i.bill_id
257
+        AND b.community_id = #{communityId,jdbcType=INTEGER}
258
+        LEFT JOIN tp_bill_statement s ON i.bill_statement_id = s.id
259
+        AND s.community_id = #{communityId,jdbcType=INTEGER}
260
+    WHERE
261
+        i.id = #{billInvoiceId,jdbcType=INTEGER}
262
+    AND i.community_id = #{communityId,jdbcType=INTEGER}
263
+  </select>
264
+</mapper>

+ 199
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpBillMapper.xml Bestand weergeven

@@ -0,0 +1,199 @@
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.TpBillMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBill" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="bill_name" property="billName" jdbcType="VARCHAR" />
8
+    <result column="bill_explain" property="billExplain" jdbcType="VARCHAR" />
9
+    <result column="pay_price" property="payPrice" jdbcType="CHAR" />
10
+    <result column="pay_total_num" property="payTotalNum" jdbcType="INTEGER" />
11
+    <result column="payed_num" property="payedNum" jdbcType="INTEGER" />
12
+    <result column="unpayed_num" property="unpayedNum" jdbcType="INTEGER" />
13
+    <result column="bill_status" property="billStatus" jdbcType="CHAR" />
14
+    <result column="end_date" property="endDate" jdbcType="TIMESTAMP" />
15
+    <result column="create_user" property="createUser" jdbcType="INTEGER" />
16
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
17
+    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
18
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
19
+  </resultMap>
20
+  <sql id="Base_Column_List" >
21
+    id, community_id, bill_name, bill_explain, pay_price, pay_total_num, payed_num, unpayed_num, 
22
+    bill_status, end_date, create_user, create_date, update_user, update_date
23
+  </sql>
24
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
25
+    select 
26
+    <include refid="Base_Column_List" />
27
+    from tp_bill
28
+    where id = #{id,jdbcType=INTEGER}
29
+  </select>
30
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
31
+    delete from tp_bill
32
+    where id = #{id,jdbcType=INTEGER}
33
+  </delete>
34
+  <insert id="insert" parameterType="com.community.huiju.model.TpBill" >
35
+    insert into tp_bill (id, community_id, bill_name, 
36
+      bill_explain, pay_price, pay_total_num, 
37
+      payed_num, unpayed_num, bill_status, 
38
+      end_date, create_user, create_date, 
39
+      update_user, update_date)
40
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{billName,jdbcType=VARCHAR}, 
41
+      #{billExplain,jdbcType=VARCHAR}, #{payPrice,jdbcType=CHAR}, #{payTotalNum,jdbcType=INTEGER}, 
42
+      #{payedNum,jdbcType=INTEGER}, #{unpayedNum,jdbcType=INTEGER}, #{billStatus,jdbcType=CHAR}, 
43
+      #{endDate,jdbcType=TIMESTAMP}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
44
+      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
45
+  </insert>
46
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBill" >
47
+    insert into tp_bill
48
+    <trim prefix="(" suffix=")" suffixOverrides="," >
49
+      <if test="id != null" >
50
+        id,
51
+      </if>
52
+      <if test="communityId != null" >
53
+        community_id,
54
+      </if>
55
+      <if test="billName != null" >
56
+        bill_name,
57
+      </if>
58
+      <if test="billExplain != null" >
59
+        bill_explain,
60
+      </if>
61
+      <if test="payPrice != null" >
62
+        pay_price,
63
+      </if>
64
+      <if test="payTotalNum != null" >
65
+        pay_total_num,
66
+      </if>
67
+      <if test="payedNum != null" >
68
+        payed_num,
69
+      </if>
70
+      <if test="unpayedNum != null" >
71
+        unpayed_num,
72
+      </if>
73
+      <if test="billStatus != null" >
74
+        bill_status,
75
+      </if>
76
+      <if test="endDate != null" >
77
+        end_date,
78
+      </if>
79
+      <if test="createUser != null" >
80
+        create_user,
81
+      </if>
82
+      <if test="createDate != null" >
83
+        create_date,
84
+      </if>
85
+      <if test="updateUser != null" >
86
+        update_user,
87
+      </if>
88
+      <if test="updateDate != null" >
89
+        update_date,
90
+      </if>
91
+    </trim>
92
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
93
+      <if test="id != null" >
94
+        #{id,jdbcType=INTEGER},
95
+      </if>
96
+      <if test="communityId != null" >
97
+        #{communityId,jdbcType=INTEGER},
98
+      </if>
99
+      <if test="billName != null" >
100
+        #{billName,jdbcType=VARCHAR},
101
+      </if>
102
+      <if test="billExplain != null" >
103
+        #{billExplain,jdbcType=VARCHAR},
104
+      </if>
105
+      <if test="payPrice != null" >
106
+        #{payPrice,jdbcType=CHAR},
107
+      </if>
108
+      <if test="payTotalNum != null" >
109
+        #{payTotalNum,jdbcType=INTEGER},
110
+      </if>
111
+      <if test="payedNum != null" >
112
+        #{payedNum,jdbcType=INTEGER},
113
+      </if>
114
+      <if test="unpayedNum != null" >
115
+        #{unpayedNum,jdbcType=INTEGER},
116
+      </if>
117
+      <if test="billStatus != null" >
118
+        #{billStatus,jdbcType=CHAR},
119
+      </if>
120
+      <if test="endDate != null" >
121
+        #{endDate,jdbcType=TIMESTAMP},
122
+      </if>
123
+      <if test="createUser != null" >
124
+        #{createUser,jdbcType=INTEGER},
125
+      </if>
126
+      <if test="createDate != null" >
127
+        #{createDate,jdbcType=TIMESTAMP},
128
+      </if>
129
+      <if test="updateUser != null" >
130
+        #{updateUser,jdbcType=INTEGER},
131
+      </if>
132
+      <if test="updateDate != null" >
133
+        #{updateDate,jdbcType=TIMESTAMP},
134
+      </if>
135
+    </trim>
136
+  </insert>
137
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBill" >
138
+    update tp_bill
139
+    <set >
140
+      <if test="communityId != null" >
141
+        community_id = #{communityId,jdbcType=INTEGER},
142
+      </if>
143
+      <if test="billName != null" >
144
+        bill_name = #{billName,jdbcType=VARCHAR},
145
+      </if>
146
+      <if test="billExplain != null" >
147
+        bill_explain = #{billExplain,jdbcType=VARCHAR},
148
+      </if>
149
+      <if test="payPrice != null" >
150
+        pay_price = #{payPrice,jdbcType=CHAR},
151
+      </if>
152
+      <if test="payTotalNum != null" >
153
+        pay_total_num = #{payTotalNum,jdbcType=INTEGER},
154
+      </if>
155
+      <if test="payedNum != null" >
156
+        payed_num = #{payedNum,jdbcType=INTEGER},
157
+      </if>
158
+      <if test="unpayedNum != null" >
159
+        unpayed_num = #{unpayedNum,jdbcType=INTEGER},
160
+      </if>
161
+      <if test="billStatus != null" >
162
+        bill_status = #{billStatus,jdbcType=CHAR},
163
+      </if>
164
+      <if test="endDate != null" >
165
+        end_date = #{endDate,jdbcType=TIMESTAMP},
166
+      </if>
167
+      <if test="createUser != null" >
168
+        create_user = #{createUser,jdbcType=INTEGER},
169
+      </if>
170
+      <if test="createDate != null" >
171
+        create_date = #{createDate,jdbcType=TIMESTAMP},
172
+      </if>
173
+      <if test="updateUser != null" >
174
+        update_user = #{updateUser,jdbcType=INTEGER},
175
+      </if>
176
+      <if test="updateDate != null" >
177
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
178
+      </if>
179
+    </set>
180
+    where id = #{id,jdbcType=INTEGER}
181
+  </update>
182
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBill" >
183
+    update tp_bill
184
+    set community_id = #{communityId,jdbcType=INTEGER},
185
+      bill_name = #{billName,jdbcType=VARCHAR},
186
+      bill_explain = #{billExplain,jdbcType=VARCHAR},
187
+      pay_price = #{payPrice,jdbcType=CHAR},
188
+      pay_total_num = #{payTotalNum,jdbcType=INTEGER},
189
+      payed_num = #{payedNum,jdbcType=INTEGER},
190
+      unpayed_num = #{unpayedNum,jdbcType=INTEGER},
191
+      bill_status = #{billStatus,jdbcType=CHAR},
192
+      end_date = #{endDate,jdbcType=TIMESTAMP},
193
+      create_user = #{createUser,jdbcType=INTEGER},
194
+      create_date = #{createDate,jdbcType=TIMESTAMP},
195
+      update_user = #{updateUser,jdbcType=INTEGER},
196
+      update_date = #{updateDate,jdbcType=TIMESTAMP}
197
+    where id = #{id,jdbcType=INTEGER}
198
+  </update>
199
+</mapper>

+ 142
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpBillStatementMapper.xml Bestand weergeven

@@ -0,0 +1,142 @@
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.TpBillStatementMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBillStatement" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="bill_invoice_id" property="billInvoiceId" jdbcType="INTEGER" />
8
+    <result column="ta_user_id" property="taUserId" jdbcType="INTEGER" />
9
+    <result column="pay_price" property="payPrice" jdbcType="INTEGER" />
10
+    <result column="pay_name" property="payName" jdbcType="VARCHAR" />
11
+    <result column="pay_remark" property="payRemark" jdbcType="VARCHAR" />
12
+    <result column="pay_type" property="payType" jdbcType="CHAR" />
13
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
14
+  </resultMap>
15
+  <sql id="Base_Column_List" >
16
+    id, community_id, bill_invoice_id, ta_user_id, pay_price, pay_name, pay_remark, pay_type, 
17
+    create_time
18
+  </sql>
19
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
20
+    select 
21
+    <include refid="Base_Column_List" />
22
+    from tp_bill_statement
23
+    where id = #{id,jdbcType=INTEGER}
24
+  </select>
25
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
26
+    delete from tp_bill_statement
27
+    where id = #{id,jdbcType=INTEGER}
28
+  </delete>
29
+  <insert id="insert" parameterType="com.community.huiju.model.TpBillStatement" >
30
+    insert into tp_bill_statement (id, community_id, bill_invoice_id, 
31
+      ta_user_id, pay_price, pay_name, 
32
+      pay_remark, pay_type, create_time
33
+      )
34
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{billInvoiceId,jdbcType=INTEGER}, 
35
+      #{taUserId,jdbcType=INTEGER}, #{payPrice,jdbcType=INTEGER}, #{payName,jdbcType=VARCHAR}, 
36
+      #{payRemark,jdbcType=VARCHAR}, #{payType,jdbcType=CHAR}, #{createTime,jdbcType=TIMESTAMP}
37
+      )
38
+  </insert>
39
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBillStatement" >
40
+    insert into tp_bill_statement
41
+    <trim prefix="(" suffix=")" suffixOverrides="," >
42
+      <if test="id != null" >
43
+        id,
44
+      </if>
45
+      <if test="communityId != null" >
46
+        community_id,
47
+      </if>
48
+      <if test="billInvoiceId != null" >
49
+        bill_invoice_id,
50
+      </if>
51
+      <if test="taUserId != null" >
52
+        ta_user_id,
53
+      </if>
54
+      <if test="payPrice != null" >
55
+        pay_price,
56
+      </if>
57
+      <if test="payName != null" >
58
+        pay_name,
59
+      </if>
60
+      <if test="payRemark != null" >
61
+        pay_remark,
62
+      </if>
63
+      <if test="payType != null" >
64
+        pay_type,
65
+      </if>
66
+      <if test="createTime != null" >
67
+        create_time,
68
+      </if>
69
+    </trim>
70
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
71
+      <if test="id != null" >
72
+        #{id,jdbcType=INTEGER},
73
+      </if>
74
+      <if test="communityId != null" >
75
+        #{communityId,jdbcType=INTEGER},
76
+      </if>
77
+      <if test="billInvoiceId != null" >
78
+        #{billInvoiceId,jdbcType=INTEGER},
79
+      </if>
80
+      <if test="taUserId != null" >
81
+        #{taUserId,jdbcType=INTEGER},
82
+      </if>
83
+      <if test="payPrice != null" >
84
+        #{payPrice,jdbcType=INTEGER},
85
+      </if>
86
+      <if test="payName != null" >
87
+        #{payName,jdbcType=VARCHAR},
88
+      </if>
89
+      <if test="payRemark != null" >
90
+        #{payRemark,jdbcType=VARCHAR},
91
+      </if>
92
+      <if test="payType != null" >
93
+        #{payType,jdbcType=CHAR},
94
+      </if>
95
+      <if test="createTime != null" >
96
+        #{createTime,jdbcType=TIMESTAMP},
97
+      </if>
98
+    </trim>
99
+  </insert>
100
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBillStatement" >
101
+    update tp_bill_statement
102
+    <set >
103
+      <if test="communityId != null" >
104
+        community_id = #{communityId,jdbcType=INTEGER},
105
+      </if>
106
+      <if test="billInvoiceId != null" >
107
+        bill_invoice_id = #{billInvoiceId,jdbcType=INTEGER},
108
+      </if>
109
+      <if test="taUserId != null" >
110
+        ta_user_id = #{taUserId,jdbcType=INTEGER},
111
+      </if>
112
+      <if test="payPrice != null" >
113
+        pay_price = #{payPrice,jdbcType=INTEGER},
114
+      </if>
115
+      <if test="payName != null" >
116
+        pay_name = #{payName,jdbcType=VARCHAR},
117
+      </if>
118
+      <if test="payRemark != null" >
119
+        pay_remark = #{payRemark,jdbcType=VARCHAR},
120
+      </if>
121
+      <if test="payType != null" >
122
+        pay_type = #{payType,jdbcType=CHAR},
123
+      </if>
124
+      <if test="createTime != null" >
125
+        create_time = #{createTime,jdbcType=TIMESTAMP},
126
+      </if>
127
+    </set>
128
+    where id = #{id,jdbcType=INTEGER}
129
+  </update>
130
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBillStatement" >
131
+    update tp_bill_statement
132
+    set community_id = #{communityId,jdbcType=INTEGER},
133
+      bill_invoice_id = #{billInvoiceId,jdbcType=INTEGER},
134
+      ta_user_id = #{taUserId,jdbcType=INTEGER},
135
+      pay_price = #{payPrice,jdbcType=INTEGER},
136
+      pay_name = #{payName,jdbcType=VARCHAR},
137
+      pay_remark = #{payRemark,jdbcType=VARCHAR},
138
+      pay_type = #{payType,jdbcType=CHAR},
139
+      create_time = #{createTime,jdbcType=TIMESTAMP}
140
+    where id = #{id,jdbcType=INTEGER}
141
+  </update>
142
+</mapper>

+ 223
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml Bestand weergeven

@@ -0,0 +1,223 @@
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.TpBuildingOwnerInfoMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBuildingOwnerInfo" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="id_card" property="idCard" jdbcType="VARCHAR" />
8
+    <result column="building" property="building" jdbcType="VARCHAR" />
9
+    <result column="unit" property="unit" jdbcType="VARCHAR" />
10
+    <result column="level" property="level" jdbcType="VARCHAR" />
11
+    <result column="room_no" property="roomNo" jdbcType="VARCHAR" />
12
+    <result column="owner_name" property="ownerName" jdbcType="VARCHAR" />
13
+    <result column="owner_tel" property="ownerTel" jdbcType="VARCHAR" />
14
+    <result column="gender" property="gender" jdbcType="CHAR" />
15
+    <result column="pair_status" property="pairStatus" jdbcType="CHAR" />
16
+    <result column="verify_status" property="verifyStatus" jdbcType="CHAR" />
17
+    <result column="create_user" property="createUser" jdbcType="INTEGER" />
18
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
19
+    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
20
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
21
+  </resultMap>
22
+  <sql id="Base_Column_List" >
23
+    id, community_id, id_card, building, unit, level, room_no, owner_name, owner_tel, 
24
+    gender, pair_status, verify_status, create_user, create_date, update_user, update_date
25
+  </sql>
26
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
27
+    select 
28
+    <include refid="Base_Column_List" />
29
+    from tp_building_owner_info
30
+    where id = #{id,jdbcType=INTEGER}
31
+  </select>
32
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
33
+    delete from tp_building_owner_info
34
+    where id = #{id,jdbcType=INTEGER}
35
+  </delete>
36
+  <insert id="insert" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
37
+    insert into tp_building_owner_info (id, community_id, id_card, 
38
+      building, unit, level, 
39
+      room_no, owner_name, owner_tel, 
40
+      gender, pair_status, verify_status, 
41
+      create_user, create_date, update_user, 
42
+      update_date)
43
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{idCard,jdbcType=VARCHAR}, 
44
+      #{building,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, 
45
+      #{roomNo,jdbcType=VARCHAR}, #{ownerName,jdbcType=VARCHAR}, #{ownerTel,jdbcType=VARCHAR}, 
46
+      #{gender,jdbcType=CHAR}, #{pairStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, 
47
+      #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, 
48
+      #{updateDate,jdbcType=TIMESTAMP})
49
+  </insert>
50
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
51
+    insert into tp_building_owner_info
52
+    <trim prefix="(" suffix=")" suffixOverrides="," >
53
+      <if test="id != null" >
54
+        id,
55
+      </if>
56
+      <if test="communityId != null" >
57
+        community_id,
58
+      </if>
59
+      <if test="idCard != null" >
60
+        id_card,
61
+      </if>
62
+      <if test="building != null" >
63
+        building,
64
+      </if>
65
+      <if test="unit != null" >
66
+        unit,
67
+      </if>
68
+      <if test="level != null" >
69
+        level,
70
+      </if>
71
+      <if test="roomNo != null" >
72
+        room_no,
73
+      </if>
74
+      <if test="ownerName != null" >
75
+        owner_name,
76
+      </if>
77
+      <if test="ownerTel != null" >
78
+        owner_tel,
79
+      </if>
80
+      <if test="gender != null" >
81
+        gender,
82
+      </if>
83
+      <if test="pairStatus != null" >
84
+        pair_status,
85
+      </if>
86
+      <if test="verifyStatus != null" >
87
+        verify_status,
88
+      </if>
89
+      <if test="createUser != null" >
90
+        create_user,
91
+      </if>
92
+      <if test="createDate != null" >
93
+        create_date,
94
+      </if>
95
+      <if test="updateUser != null" >
96
+        update_user,
97
+      </if>
98
+      <if test="updateDate != null" >
99
+        update_date,
100
+      </if>
101
+    </trim>
102
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
103
+      <if test="id != null" >
104
+        #{id,jdbcType=INTEGER},
105
+      </if>
106
+      <if test="communityId != null" >
107
+        #{communityId,jdbcType=INTEGER},
108
+      </if>
109
+      <if test="idCard != null" >
110
+        #{idCard,jdbcType=VARCHAR},
111
+      </if>
112
+      <if test="building != null" >
113
+        #{building,jdbcType=VARCHAR},
114
+      </if>
115
+      <if test="unit != null" >
116
+        #{unit,jdbcType=VARCHAR},
117
+      </if>
118
+      <if test="level != null" >
119
+        #{level,jdbcType=VARCHAR},
120
+      </if>
121
+      <if test="roomNo != null" >
122
+        #{roomNo,jdbcType=VARCHAR},
123
+      </if>
124
+      <if test="ownerName != null" >
125
+        #{ownerName,jdbcType=VARCHAR},
126
+      </if>
127
+      <if test="ownerTel != null" >
128
+        #{ownerTel,jdbcType=VARCHAR},
129
+      </if>
130
+      <if test="gender != null" >
131
+        #{gender,jdbcType=CHAR},
132
+      </if>
133
+      <if test="pairStatus != null" >
134
+        #{pairStatus,jdbcType=CHAR},
135
+      </if>
136
+      <if test="verifyStatus != null" >
137
+        #{verifyStatus,jdbcType=CHAR},
138
+      </if>
139
+      <if test="createUser != null" >
140
+        #{createUser,jdbcType=INTEGER},
141
+      </if>
142
+      <if test="createDate != null" >
143
+        #{createDate,jdbcType=TIMESTAMP},
144
+      </if>
145
+      <if test="updateUser != null" >
146
+        #{updateUser,jdbcType=INTEGER},
147
+      </if>
148
+      <if test="updateDate != null" >
149
+        #{updateDate,jdbcType=TIMESTAMP},
150
+      </if>
151
+    </trim>
152
+  </insert>
153
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
154
+    update tp_building_owner_info
155
+    <set >
156
+      <if test="communityId != null" >
157
+        community_id = #{communityId,jdbcType=INTEGER},
158
+      </if>
159
+      <if test="idCard != null" >
160
+        id_card = #{idCard,jdbcType=VARCHAR},
161
+      </if>
162
+      <if test="building != null" >
163
+        building = #{building,jdbcType=VARCHAR},
164
+      </if>
165
+      <if test="unit != null" >
166
+        unit = #{unit,jdbcType=VARCHAR},
167
+      </if>
168
+      <if test="level != null" >
169
+        level = #{level,jdbcType=VARCHAR},
170
+      </if>
171
+      <if test="roomNo != null" >
172
+        room_no = #{roomNo,jdbcType=VARCHAR},
173
+      </if>
174
+      <if test="ownerName != null" >
175
+        owner_name = #{ownerName,jdbcType=VARCHAR},
176
+      </if>
177
+      <if test="ownerTel != null" >
178
+        owner_tel = #{ownerTel,jdbcType=VARCHAR},
179
+      </if>
180
+      <if test="gender != null" >
181
+        gender = #{gender,jdbcType=CHAR},
182
+      </if>
183
+      <if test="pairStatus != null" >
184
+        pair_status = #{pairStatus,jdbcType=CHAR},
185
+      </if>
186
+      <if test="verifyStatus != null" >
187
+        verify_status = #{verifyStatus,jdbcType=CHAR},
188
+      </if>
189
+      <if test="createUser != null" >
190
+        create_user = #{createUser,jdbcType=INTEGER},
191
+      </if>
192
+      <if test="createDate != null" >
193
+        create_date = #{createDate,jdbcType=TIMESTAMP},
194
+      </if>
195
+      <if test="updateUser != null" >
196
+        update_user = #{updateUser,jdbcType=INTEGER},
197
+      </if>
198
+      <if test="updateDate != null" >
199
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
200
+      </if>
201
+    </set>
202
+    where id = #{id,jdbcType=INTEGER}
203
+  </update>
204
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
205
+    update tp_building_owner_info
206
+    set community_id = #{communityId,jdbcType=INTEGER},
207
+      id_card = #{idCard,jdbcType=VARCHAR},
208
+      building = #{building,jdbcType=VARCHAR},
209
+      unit = #{unit,jdbcType=VARCHAR},
210
+      level = #{level,jdbcType=VARCHAR},
211
+      room_no = #{roomNo,jdbcType=VARCHAR},
212
+      owner_name = #{ownerName,jdbcType=VARCHAR},
213
+      owner_tel = #{ownerTel,jdbcType=VARCHAR},
214
+      gender = #{gender,jdbcType=CHAR},
215
+      pair_status = #{pairStatus,jdbcType=CHAR},
216
+      verify_status = #{verifyStatus,jdbcType=CHAR},
217
+      create_user = #{createUser,jdbcType=INTEGER},
218
+      create_date = #{createDate,jdbcType=TIMESTAMP},
219
+      update_user = #{updateUser,jdbcType=INTEGER},
220
+      update_date = #{updateDate,jdbcType=TIMESTAMP}
221
+    where id = #{id,jdbcType=INTEGER}
222
+  </update>
223
+</mapper>

+ 3
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/Constant.java Bestand weergeven

@@ -59,4 +59,7 @@ public class Constant {
59 59
 
60 60
     /**家属角色**/
61 61
     public static final String FAMILYMEMBER = "familyMember";
62
+    
63
+    /** 工单回复的发起人 **/
64
+    public static final String TICKET_USER_TYPE = "1";
62 65
 }

BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/Constant.class Bestand weergeven


+ 204
- 264
文档/MYSQL/smartCommunity.pdb
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 208
- 268
文档/MYSQL/smartCommunity.pdm
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


BIN
文档/需求/app接口需求-第二版.xlsx Bestand weergeven