Browse Source

加入 月报表基础表

java110 5 years ago
parent
commit
7565570364
20 changed files with 1172 additions and 58 deletions
  1. 153 0
      java110-bean/src/main/java/com/java110/dto/reportFeeMonthStatistics/ReportFeeMonthStatisticsDto.java
  2. 162 0
      java110-bean/src/main/java/com/java110/po/reportFeeMonthStatistics/ReportFeeMonthStatisticsPo.java
  3. 1 0
      java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java
  4. 205 0
      java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
  5. 25 23
      java110-generator/src/main/resources/newBack/template_1.json
  6. 53 0
      java110-interface/src/main/java/com/java110/intf/report/IReportFeeMonthStatisticsInnerServiceSMO.java
  7. 4 3
      service-report/src/main/java/com/java110/report/ReportServiceApplicationStart.java
  8. 105 0
      service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java
  9. 17 0
      service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/IDeleteReportFeeMonthStatisticsBMO.java
  10. 16 0
      service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/IGetReportFeeMonthStatisticsBMO.java
  11. 19 0
      service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/ISaveReportFeeMonthStatisticsBMO.java
  12. 19 0
      service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/IUpdateReportFeeMonthStatisticsBMO.java
  13. 34 0
      service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/DeleteReportFeeMonthStatisticsBMOImpl.java
  14. 44 0
      service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java
  15. 38 0
      service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/SaveReportFeeMonthStatisticsBMOImpl.java
  16. 34 0
      service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/UpdateReportFeeMonthStatisticsBMOImpl.java
  17. 61 0
      service-report/src/main/java/com/java110/report/dao/IReportFeeMonthStatisticsServiceDao.java
  18. 98 0
      service-report/src/main/java/com/java110/report/dao/impl/ReportFeeMonthStatisticsServiceDaoImpl.java
  19. 83 0
      service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java
  20. 1 32
      service-report/src/main/resources/dataSource.yml

+ 153 - 0
java110-bean/src/main/java/com/java110/dto/reportFeeMonthStatistics/ReportFeeMonthStatisticsDto.java

@@ -0,0 +1,153 @@
+package com.java110.dto.reportFeeMonthStatistics;
+
+import com.java110.dto.PageDto;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @ClassName FloorDto
+ * @Description 费用月统计数据层封装
+ * @Author wuxw
+ * @Date 2019/4/24 8:52
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+public class ReportFeeMonthStatisticsDto extends PageDto implements Serializable {
+
+    private String receivableAmount;
+private String statisticsId;
+private String updateTime;
+private String remark;
+private String objName;
+private String receivedAmount;
+private String feeYear;
+private String feeMonth;
+private String feeId;
+private String configId;
+private String objId;
+private String feeName;
+private String oweAmount;
+private String communityId;
+private String feeCreateTime;
+private String objType;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getReceivableAmount() {
+        return receivableAmount;
+    }
+public void setReceivableAmount(String receivableAmount) {
+        this.receivableAmount = receivableAmount;
+    }
+public String getStatisticsId() {
+        return statisticsId;
+    }
+public void setStatisticsId(String statisticsId) {
+        this.statisticsId = statisticsId;
+    }
+public String getUpdateTime() {
+        return updateTime;
+    }
+public void setUpdateTime(String updateTime) {
+        this.updateTime = updateTime;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getObjName() {
+        return objName;
+    }
+public void setObjName(String objName) {
+        this.objName = objName;
+    }
+public String getReceivedAmount() {
+        return receivedAmount;
+    }
+public void setReceivedAmount(String receivedAmount) {
+        this.receivedAmount = receivedAmount;
+    }
+public String getFeeYear() {
+        return feeYear;
+    }
+public void setFeeYear(String feeYear) {
+        this.feeYear = feeYear;
+    }
+public String getFeeMonth() {
+        return feeMonth;
+    }
+public void setFeeMonth(String feeMonth) {
+        this.feeMonth = feeMonth;
+    }
+public String getFeeId() {
+        return feeId;
+    }
+public void setFeeId(String feeId) {
+        this.feeId = feeId;
+    }
+public String getConfigId() {
+        return configId;
+    }
+public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+public String getObjId() {
+        return objId;
+    }
+public void setObjId(String objId) {
+        this.objId = objId;
+    }
+public String getFeeName() {
+        return feeName;
+    }
+public void setFeeName(String feeName) {
+        this.feeName = feeName;
+    }
+public String getOweAmount() {
+        return oweAmount;
+    }
+public void setOweAmount(String oweAmount) {
+        this.oweAmount = oweAmount;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getFeeCreateTime() {
+        return feeCreateTime;
+    }
+public void setFeeCreateTime(String feeCreateTime) {
+        this.feeCreateTime = feeCreateTime;
+    }
+public String getObjType() {
+        return objType;
+    }
+public void setObjType(String objType) {
+        this.objType = objType;
+    }
+
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+}

+ 162 - 0
java110-bean/src/main/java/com/java110/po/reportFeeMonthStatistics/ReportFeeMonthStatisticsPo.java

@@ -0,0 +1,162 @@
+package com.java110.po.reportFeeMonthStatistics;
+
+import java.io.Serializable;
+
+public class ReportFeeMonthStatisticsPo implements Serializable {
+
+    private String receivableAmount;
+    private String statisticsId;
+    private String updateTime;
+    private String remark;
+    private String statusCd = "0";
+    private String objName;
+    private String receivedAmount;
+    private String feeYear;
+    private String feeMonth;
+    private String feeId;
+    private String configId;
+    private String objId;
+    private String feeName;
+    private String oweAmount;
+    private String communityId;
+    private String feeCreateTime;
+    private String objType;
+
+    public String getReceivableAmount() {
+        return receivableAmount;
+    }
+
+    public void setReceivableAmount(String receivableAmount) {
+        this.receivableAmount = receivableAmount;
+    }
+
+    public String getStatisticsId() {
+        return statisticsId;
+    }
+
+    public void setStatisticsId(String statisticsId) {
+        this.statisticsId = statisticsId;
+    }
+
+    public String getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(String updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+
+    public String getObjName() {
+        return objName;
+    }
+
+    public void setObjName(String objName) {
+        this.objName = objName;
+    }
+
+    public String getReceivedAmount() {
+        return receivedAmount;
+    }
+
+    public void setReceivedAmount(String receivedAmount) {
+        this.receivedAmount = receivedAmount;
+    }
+
+    public String getFeeYear() {
+        return feeYear;
+    }
+
+    public void setFeeYear(String feeYear) {
+        this.feeYear = feeYear;
+    }
+
+    public String getFeeMonth() {
+        return feeMonth;
+    }
+
+    public void setFeeMonth(String feeMonth) {
+        this.feeMonth = feeMonth;
+    }
+
+    public String getFeeId() {
+        return feeId;
+    }
+
+    public void setFeeId(String feeId) {
+        this.feeId = feeId;
+    }
+
+    public String getConfigId() {
+        return configId;
+    }
+
+    public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+
+    public String getObjId() {
+        return objId;
+    }
+
+    public void setObjId(String objId) {
+        this.objId = objId;
+    }
+
+    public String getFeeName() {
+        return feeName;
+    }
+
+    public void setFeeName(String feeName) {
+        this.feeName = feeName;
+    }
+
+    public String getOweAmount() {
+        return oweAmount;
+    }
+
+    public void setOweAmount(String oweAmount) {
+        this.oweAmount = oweAmount;
+    }
+
+    public String getCommunityId() {
+        return communityId;
+    }
+
+    public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+    public String getFeeCreateTime() {
+        return feeCreateTime;
+    }
+
+    public void setFeeCreateTime(String feeCreateTime) {
+        this.feeCreateTime = feeCreateTime;
+    }
+
+    public String getObjType() {
+        return objType;
+    }
+
+    public void setObjType(String objType) {
+        this.objType = objType;
+    }
+
+
+}

+ 1 - 0
java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java

@@ -161,6 +161,7 @@ public class GenerateCodeFactory {
     public static final String CODE_PREFIX_valueId = "91";
     public static final String CODE_PREFIX_groupId = "92";
     public static final String CODE_PREFIX_batchId = "93";
+    public static final String CODE_PREFIX_statisticsId = "94";
 
 
 

File diff suppressed because it is too large
+ 205 - 0
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml


+ 25 - 23
java110-generator/src/main/resources/newBack/template_1.json

@@ -1,33 +1,35 @@
 {
   "autoMove": true,
-  "id": "batchId",
-  "name": "groupBuyBatch",
-  "desc": "拼团批次",
-  "shareParam": "storeId",
-  "shareColumn": "store_id",
-  "shareName": "goods",
-  "tableName": "group_buy_batch",
+  "id": "statisticsId",
+  "name": "reportFeeMonthStatistics",
+  "desc": "费用月统计",
+  "shareParam": "communityId",
+  "shareColumn": "community_id",
+  "shareName": "report",
+  "tableName": "report_fee_month_statistics",
   "param": {
-    "batchId": "batch_id",
-    "storeId": "store_id",
-    "settingId": "setting_id",
-    "batchStartTime": "batch_start_time",
-    "batchEndTime": "batch_end_time",
-    "curBatch": "cur_batch",
+    "statisticsId": "statistics_id",
+    "feeYear": "fee_year",
+    "feeMonth": "fee_month",
+    "communityId": "community_id",
+    "objType": "obj_type",
+    "objId": "obj_id",
+    "objName": "obj_name",
+    "feeId": "fee_id",
+    "feeName": "fee_name",
+    "configId": "config_id",
+    "receivableAmount": "receivable_amount",
+    "receivedAmount": "received_amount",
+    "oweAmount": "owe_amount",
+    "feeCreateTime": "fee_create_time",
+    "updateTime": "update_time",
+    "remark": "remark",
     "statusCd": "status_cd"
   },
   "required": [
     {
-      "code": "settingId",
-      "msg": "设置ID不能为空"
-    },
-    {
-      "code": "batchStartTime",
-      "msg": "开始时间不能为空"
-    },
-    {
-      "code": "batchEndTime",
-      "msg": "结束时间不能为空"
+      "code": "feeYear",
+      "msg": "年不能为空"
     }
   ]
 }

+ 53 - 0
java110-interface/src/main/java/com/java110/intf/report/IReportFeeMonthStatisticsInnerServiceSMO.java

@@ -0,0 +1,53 @@
+package com.java110.intf;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
+import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * @ClassName IReportFeeMonthStatisticsInnerServiceSMO
+ * @Description 费用月统计接口类
+ * @Author wuxw
+ * @Date 2019/4/24 9:04
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+@FeignClient(name = "report-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/reportFeeMonthStatisticsApi")
+public interface IReportFeeMonthStatisticsInnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveReportFeeMonthStatistics", method = RequestMethod.POST)
+    public int saveReportFeeMonthStatistics(@RequestBody ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo);
+
+    @RequestMapping(value = "/updateReportFeeMonthStatistics", method = RequestMethod.POST)
+    public int updateReportFeeMonthStatistics(@RequestBody  ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo);
+
+    @RequestMapping(value = "/deleteReportFeeMonthStatistics", method = RequestMethod.POST)
+    public int deleteReportFeeMonthStatistics(@RequestBody  ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param reportFeeMonthStatisticsDto 数据对象分享
+     * @return ReportFeeMonthStatisticsDto 对象数据
+     */
+    @RequestMapping(value = "/queryReportFeeMonthStatisticss", method = RequestMethod.POST)
+    List<ReportFeeMonthStatisticsDto> queryReportFeeMonthStatisticss(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param reportFeeMonthStatisticsDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryReportFeeMonthStatisticssCount", method = RequestMethod.POST)
+    int queryReportFeeMonthStatisticssCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
+}

+ 4 - 3
service-report/src/main/java/com/java110/report/ReportServiceApplicationStart.java

@@ -1,6 +1,7 @@
 package com.java110.report;
 
 import com.java110.core.annotation.Java110ListenerDiscovery;
+import com.java110.core.client.RestTemplate;
 import com.java110.core.event.service.BusinessServiceDataFlowEventPublishing;
 import com.java110.service.init.ServiceStartInit;
 import org.slf4j.Logger;
@@ -15,7 +16,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.annotation.Bean;
 import org.springframework.http.converter.StringHttpMessageConverter;
-import org.springframework.web.client.RestTemplate;
+
 
 import java.nio.charset.Charset;
 
@@ -51,7 +52,7 @@ public class ReportServiceApplicationStart {
     @LoadBalanced
     public RestTemplate restTemplate() {
         StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8"));
-        RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build();
+        RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build(RestTemplate.class);
         return restTemplate;
     }
 
@@ -63,7 +64,7 @@ public class ReportServiceApplicationStart {
     @Bean
     public com.java110.core.client.RestTemplate outRestTemplate() {
         StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8"));
-        com.java110.core.client.RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build(com.java110.core.client.RestTemplate.class);
+        RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build(RestTemplate.class);
         return restTemplate;
     }
 

+ 105 - 0
service-report/src/main/java/com/java110/report/api/ReportFeeMonthStatisticsApi.java

@@ -0,0 +1,105 @@
+package com.java110.report.api;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
+import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
+import com.java110.report.bmo.reportFeeMonthStatistics.IDeleteReportFeeMonthStatisticsBMO;
+import com.java110.report.bmo.reportFeeMonthStatistics.IGetReportFeeMonthStatisticsBMO;
+import com.java110.report.bmo.reportFeeMonthStatistics.ISaveReportFeeMonthStatisticsBMO;
+import com.java110.report.bmo.reportFeeMonthStatistics.IUpdateReportFeeMonthStatisticsBMO;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+
+@RestController
+@RequestMapping(value = "/reportFeeMonthStatistics")
+public class ReportFeeMonthStatisticsApi {
+
+    @Autowired
+    private ISaveReportFeeMonthStatisticsBMO saveReportFeeMonthStatisticsBMOImpl;
+    @Autowired
+    private IUpdateReportFeeMonthStatisticsBMO updateReportFeeMonthStatisticsBMOImpl;
+    @Autowired
+    private IDeleteReportFeeMonthStatisticsBMO deleteReportFeeMonthStatisticsBMOImpl;
+
+    @Autowired
+    private IGetReportFeeMonthStatisticsBMO getReportFeeMonthStatisticsBMOImpl;
+
+    /**
+     * 微信保存消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /reportFeeMonthStatistics/saveReportFeeMonthStatistics
+     * @path /app/reportFeeMonthStatistics/saveReportFeeMonthStatistics
+     */
+    @RequestMapping(value = "/saveReportFeeMonthStatistics", method = RequestMethod.POST)
+    public ResponseEntity<String> saveReportFeeMonthStatistics(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "feeYear", "请求报文中未包含feeYear");
+
+
+        ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo = BeanConvertUtil.covertBean(reqJson, ReportFeeMonthStatisticsPo.class);
+        return saveReportFeeMonthStatisticsBMOImpl.save(reportFeeMonthStatisticsPo);
+    }
+
+    /**
+     * 微信修改消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /reportFeeMonthStatistics/updateReportFeeMonthStatistics
+     * @path /app/reportFeeMonthStatistics/updateReportFeeMonthStatistics
+     */
+    @RequestMapping(value = "/updateReportFeeMonthStatistics", method = RequestMethod.POST)
+    public ResponseEntity<String> updateReportFeeMonthStatistics(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "feeYear", "请求报文中未包含feeYear");
+        Assert.hasKeyAndValue(reqJson, "statisticsId", "statisticsId不能为空");
+
+
+        ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo = BeanConvertUtil.covertBean(reqJson, ReportFeeMonthStatisticsPo.class);
+        return updateReportFeeMonthStatisticsBMOImpl.update(reportFeeMonthStatisticsPo);
+    }
+
+    /**
+     * 微信删除消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /reportFeeMonthStatistics/deleteReportFeeMonthStatistics
+     * @path /app/reportFeeMonthStatistics/deleteReportFeeMonthStatistics
+     */
+    @RequestMapping(value = "/deleteReportFeeMonthStatistics", method = RequestMethod.POST)
+    public ResponseEntity<String> deleteReportFeeMonthStatistics(@RequestBody JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
+
+        Assert.hasKeyAndValue(reqJson, "statisticsId", "statisticsId不能为空");
+
+
+        ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo = BeanConvertUtil.covertBean(reqJson, ReportFeeMonthStatisticsPo.class);
+        return deleteReportFeeMonthStatisticsBMOImpl.delete(reportFeeMonthStatisticsPo);
+    }
+
+    /**
+     * 微信删除消息模板
+     *
+     * @param communityId 小区ID
+     * @return
+     * @serviceCode /reportFeeMonthStatistics/queryReportFeeMonthStatistics
+     * @path /app/reportFeeMonthStatistics/queryReportFeeMonthStatistics
+     */
+    @RequestMapping(value = "/queryReportFeeMonthStatistics", method = RequestMethod.GET)
+    public ResponseEntity<String> queryReportFeeMonthStatistics(@RequestParam(value = "communityId") String communityId,
+                                                                @RequestParam(value = "page") int page,
+                                                                @RequestParam(value = "row") int row) {
+        ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = new ReportFeeMonthStatisticsDto();
+        reportFeeMonthStatisticsDto.setPage(page);
+        reportFeeMonthStatisticsDto.setRow(row);
+        reportFeeMonthStatisticsDto.setCommunityId(communityId);
+        return getReportFeeMonthStatisticsBMOImpl.get(reportFeeMonthStatisticsDto);
+    }
+}

+ 17 - 0
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/IDeleteReportFeeMonthStatisticsBMO.java

@@ -0,0 +1,17 @@
+package com.java110.report.bmo.reportFeeMonthStatistics;
+import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
+import org.springframework.http.ResponseEntity;
+
+public interface IDeleteReportFeeMonthStatisticsBMO {
+
+
+    /**
+     * 修改费用月统计
+     * add by wuxw
+     * @param reportFeeMonthStatisticsPo
+     * @return
+     */
+    ResponseEntity<String> delete(ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo);
+
+
+}

+ 16 - 0
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/IGetReportFeeMonthStatisticsBMO.java

@@ -0,0 +1,16 @@
+package com.java110.report.bmo.reportFeeMonthStatistics;
+import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
+import org.springframework.http.ResponseEntity;
+public interface IGetReportFeeMonthStatisticsBMO {
+
+
+    /**
+     * 查询费用月统计
+     * add by wuxw
+     * @param  reportFeeMonthStatisticsDto
+     * @return
+     */
+    ResponseEntity<String> get(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
+
+
+}

+ 19 - 0
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/ISaveReportFeeMonthStatisticsBMO.java

@@ -0,0 +1,19 @@
+package com.java110.report.bmo.reportFeeMonthStatistics;
+
+import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
+import org.springframework.http.ResponseEntity;
+
+public interface ISaveReportFeeMonthStatisticsBMO {
+
+
+    /**
+     * 添加费用月统计
+     * add by wuxw
+     *
+     * @param reportFeeMonthStatisticsPo
+     * @return
+     */
+    ResponseEntity<String> save(ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo);
+
+
+}

+ 19 - 0
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/IUpdateReportFeeMonthStatisticsBMO.java

@@ -0,0 +1,19 @@
+package com.java110.report.bmo.reportFeeMonthStatistics;
+
+import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
+import org.springframework.http.ResponseEntity;
+
+public interface IUpdateReportFeeMonthStatisticsBMO {
+
+
+    /**
+     * 修改费用月统计
+     * add by wuxw
+     *
+     * @param reportFeeMonthStatisticsPo
+     * @return
+     */
+    ResponseEntity<String> update(ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo);
+
+
+}

+ 34 - 0
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/DeleteReportFeeMonthStatisticsBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.report.bmo.reportFeeMonthStatistics.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.intf.IReportFeeMonthStatisticsInnerServiceSMO;
+import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
+import com.java110.report.bmo.reportFeeMonthStatistics.IDeleteReportFeeMonthStatisticsBMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("deleteReportFeeMonthStatisticsBMOImpl")
+public class DeleteReportFeeMonthStatisticsBMOImpl implements IDeleteReportFeeMonthStatisticsBMO {
+
+    @Autowired
+    private IReportFeeMonthStatisticsInnerServiceSMO reportFeeMonthStatisticsInnerServiceSMOImpl;
+
+    /**
+     * @param reportFeeMonthStatisticsPo 数据
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> delete(ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo) {
+
+        int flag = reportFeeMonthStatisticsInnerServiceSMOImpl.deleteReportFeeMonthStatistics(reportFeeMonthStatisticsPo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 44 - 0
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java

@@ -0,0 +1,44 @@
+package com.java110.report.bmo.reportFeeMonthStatistics.impl;
+
+import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
+import com.java110.intf.IReportFeeMonthStatisticsInnerServiceSMO;
+import com.java110.report.bmo.reportFeeMonthStatistics.IGetReportFeeMonthStatisticsBMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service("getReportFeeMonthStatisticsBMOImpl")
+public class GetReportFeeMonthStatisticsBMOImpl implements IGetReportFeeMonthStatisticsBMO {
+
+    @Autowired
+    private IReportFeeMonthStatisticsInnerServiceSMO reportFeeMonthStatisticsInnerServiceSMOImpl;
+
+    /**
+     * @param reportFeeMonthStatisticsDto
+     * @return 订单服务能够接受的报文
+     */
+    public ResponseEntity<String> get(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
+
+
+        int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFeeMonthStatisticssCount(reportFeeMonthStatisticsDto);
+
+        List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null;
+        if (count > 0) {
+            reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFeeMonthStatisticss(reportFeeMonthStatisticsDto);
+        } else {
+            reportFeeMonthStatisticsDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportFeeMonthStatisticsDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        return responseEntity;
+    }
+
+}

+ 38 - 0
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/SaveReportFeeMonthStatisticsBMOImpl.java

@@ -0,0 +1,38 @@
+package com.java110.report.bmo.reportFeeMonthStatistics.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.IReportFeeMonthStatisticsInnerServiceSMO;
+import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
+import com.java110.report.bmo.reportFeeMonthStatistics.ISaveReportFeeMonthStatisticsBMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("saveReportFeeMonthStatisticsBMOImpl")
+public class SaveReportFeeMonthStatisticsBMOImpl implements ISaveReportFeeMonthStatisticsBMO {
+
+    @Autowired
+    private IReportFeeMonthStatisticsInnerServiceSMO reportFeeMonthStatisticsInnerServiceSMOImpl;
+
+    /**
+     * 添加小区信息
+     *
+     * @param reportFeeMonthStatisticsPo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> save(ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo) {
+
+        reportFeeMonthStatisticsPo.setStatisticsId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_statisticsId));
+        int flag = reportFeeMonthStatisticsInnerServiceSMOImpl.saveReportFeeMonthStatistics(reportFeeMonthStatisticsPo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 34 - 0
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/UpdateReportFeeMonthStatisticsBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.report.bmo.reportFeeMonthStatistics.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.intf.IReportFeeMonthStatisticsInnerServiceSMO;
+import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
+import com.java110.report.bmo.reportFeeMonthStatistics.IUpdateReportFeeMonthStatisticsBMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("updateReportFeeMonthStatisticsBMOImpl")
+public class UpdateReportFeeMonthStatisticsBMOImpl implements IUpdateReportFeeMonthStatisticsBMO {
+
+    @Autowired
+    private IReportFeeMonthStatisticsInnerServiceSMO reportFeeMonthStatisticsInnerServiceSMOImpl;
+
+    /**
+     * @param reportFeeMonthStatisticsPo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> update(ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo) {
+
+        int flag = reportFeeMonthStatisticsInnerServiceSMOImpl.updateReportFeeMonthStatistics(reportFeeMonthStatisticsPo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 61 - 0
service-report/src/main/java/com/java110/report/dao/IReportFeeMonthStatisticsServiceDao.java

@@ -0,0 +1,61 @@
+package com.java110.report.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 费用月统计组件内部之间使用,没有给外围系统提供服务能力
+ * 费用月统计服务接口类,要求全部以字符串传输,方便微服务化
+ * 新建客户,修改客户,删除客户,查询客户等功能
+ *
+ * Created by wuxw on 2016/12/27.
+ */
+public interface IReportFeeMonthStatisticsServiceDao {
+
+
+    /**
+     * 保存 费用月统计信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    void saveReportFeeMonthStatisticsInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询费用月统计信息(instance过程)
+     * 根据bId 查询费用月统计信息
+     * @param info bId 信息
+     * @return 费用月统计信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getReportFeeMonthStatisticsInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改费用月统计信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    void updateReportFeeMonthStatisticsInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询费用月统计总数
+     *
+     * @param info 费用月统计信息
+     * @return 费用月统计数量
+     */
+    int queryReportFeeMonthStatisticssCount(Map info);
+
+}

+ 98 - 0
service-report/src/main/java/com/java110/report/dao/impl/ReportFeeMonthStatisticsServiceDaoImpl.java

@@ -0,0 +1,98 @@
+package com.java110.report.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.report.dao.IReportFeeMonthStatisticsServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 费用月统计服务 与数据库交互
+ * Created by wuxw on 2017/4/5.
+ */
+@Service("reportFeeMonthStatisticsServiceDaoImpl")
+//@Transactional
+public class ReportFeeMonthStatisticsServiceDaoImpl extends BaseServiceDao implements IReportFeeMonthStatisticsServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ReportFeeMonthStatisticsServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存费用月统计信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void saveReportFeeMonthStatisticsInfo(Map info) throws DAOException {
+        logger.debug("保存费用月统计信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("reportFeeMonthStatisticsServiceDaoImpl.saveReportFeeMonthStatisticsInfo",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存费用月统计信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        }
+    }
+
+
+    /**
+     * 查询费用月统计信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getReportFeeMonthStatisticsInfo(Map info) throws DAOException {
+        logger.debug("查询费用月统计信息 入参 info : {}",info);
+
+        List<Map> businessReportFeeMonthStatisticsInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.getReportFeeMonthStatisticsInfo",info);
+
+        return businessReportFeeMonthStatisticsInfos;
+    }
+
+
+    /**
+     * 修改费用月统计信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void updateReportFeeMonthStatisticsInfo(Map info) throws DAOException {
+        logger.debug("修改费用月统计信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("reportFeeMonthStatisticsServiceDaoImpl.updateReportFeeMonthStatisticsInfo",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改费用月统计信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        }
+    }
+
+     /**
+     * 查询费用月统计数量
+     * @param info 费用月统计信息
+     * @return 费用月统计数量
+     */
+    @Override
+    public int queryReportFeeMonthStatisticssCount(Map info) {
+        logger.debug("查询费用月统计数据 入参 info : {}",info);
+
+        List<Map> businessReportFeeMonthStatisticsInfos = sqlSessionTemplate.selectList("reportFeeMonthStatisticsServiceDaoImpl.queryReportFeeMonthStatisticssCount", info);
+        if (businessReportFeeMonthStatisticsInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessReportFeeMonthStatisticsInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 83 - 0
service-report/src/main/java/com/java110/report/smo/impl/ReportFeeMonthStatisticsInnerServiceSMOImpl.java

@@ -0,0 +1,83 @@
+package com.java110.report.smo.impl;
+
+
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.PageDto;
+import com.java110.dto.reportFeeMonthStatistics.ReportFeeMonthStatisticsDto;
+import com.java110.intf.IReportFeeMonthStatisticsInnerServiceSMO;
+import com.java110.po.reportFeeMonthStatistics.ReportFeeMonthStatisticsPo;
+import com.java110.report.dao.IReportFeeMonthStatisticsServiceDao;
+import com.java110.utils.util.BeanConvertUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @ClassName FloorInnerServiceSMOImpl
+ * @Description 费用月统计内部服务实现类
+ * @Author wuxw
+ * @Date 2019/4/24 9:20
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+@RestController
+public class ReportFeeMonthStatisticsInnerServiceSMOImpl extends BaseServiceSMO implements IReportFeeMonthStatisticsInnerServiceSMO {
+
+    @Autowired
+    private IReportFeeMonthStatisticsServiceDao reportFeeMonthStatisticsServiceDaoImpl;
+
+
+    @Override
+    public int saveReportFeeMonthStatistics(@RequestBody ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo) {
+        int saveFlag = 1;
+        reportFeeMonthStatisticsServiceDaoImpl.saveReportFeeMonthStatisticsInfo(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int updateReportFeeMonthStatistics(@RequestBody ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo) {
+        int saveFlag = 1;
+        reportFeeMonthStatisticsServiceDaoImpl.updateReportFeeMonthStatisticsInfo(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int deleteReportFeeMonthStatistics(@RequestBody ReportFeeMonthStatisticsPo reportFeeMonthStatisticsPo) {
+        int saveFlag = 1;
+        reportFeeMonthStatisticsPo.setStatusCd("1");
+        reportFeeMonthStatisticsServiceDaoImpl.updateReportFeeMonthStatisticsInfo(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsPo));
+        return saveFlag;
+    }
+
+    @Override
+    public List<ReportFeeMonthStatisticsDto> queryReportFeeMonthStatisticss(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
+
+        //校验是否传了 分页信息
+
+        int page = reportFeeMonthStatisticsDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            reportFeeMonthStatisticsDto.setPage((page - 1) * reportFeeMonthStatisticsDto.getRow());
+        }
+
+        List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticss = BeanConvertUtil.covertBeanList(reportFeeMonthStatisticsServiceDaoImpl.getReportFeeMonthStatisticsInfo(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto)), ReportFeeMonthStatisticsDto.class);
+
+        return reportFeeMonthStatisticss;
+    }
+
+
+    @Override
+    public int queryReportFeeMonthStatisticssCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
+        return reportFeeMonthStatisticsServiceDaoImpl.queryReportFeeMonthStatisticssCount(BeanConvertUtil.beanCovertMap(reportFeeMonthStatisticsDto));
+    }
+
+    public IReportFeeMonthStatisticsServiceDao getReportFeeMonthStatisticsServiceDaoImpl() {
+        return reportFeeMonthStatisticsServiceDaoImpl;
+    }
+
+    public void setReportFeeMonthStatisticsServiceDaoImpl(IReportFeeMonthStatisticsServiceDao reportFeeMonthStatisticsServiceDaoImpl) {
+        this.reportFeeMonthStatisticsServiceDaoImpl = reportFeeMonthStatisticsServiceDaoImpl;
+    }
+}

+ 1 - 32
service-report/src/main/resources/dataSource.yml

@@ -1,26 +1,5 @@
 dataSources:
   ds0: !!com.alibaba.druid.pool.DruidDataSource
-    driverClassName: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8
-    username: hc_community
-    password: hc_community@12345678
-    minIdle: 5
-    validationQuery: SELECT 1 FROM DUAL
-    initialSize: 5
-    maxWait: 60000
-    filters: stat,wall,log4j
-    poolPreparedStatements: true
-#  ds0_slave0: !!com.alibaba.druid.pool.DruidDataSource
-#    driverClassName: com.mysql.jdbc.Driver
-#    url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
-#    username: TT
-#    password: TT@12345678
-#    connectionTimeoutMilliseconds: 30000
-#    idleTimeoutMilliseconds: 60000
-#    maxPoolSize: 50
-#    minPoolSize: 1
-#    maintenanceIntervalMilliseconds: 30000
-  ds1: !!com.alibaba.druid.pool.DruidDataSource
     driverClassName: com.mysql.cj.jdbc.Driver
     url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
     username: TT
@@ -31,16 +10,6 @@ dataSources:
     maxWait: 60000
     filters: stat,wall,log4j
     poolPreparedStatements: true
-#  ds1_slave0: !!com.alibaba.druid.pool.DruidDataSource
-#    driverClassName: com.mysql.jdbc.Driver
-#    url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
-#    username: TT
-#    password: TT@12345678
-#    connectionTimeoutMilliseconds: 30000
-#    idleTimeoutMilliseconds: 60000
-#    maxPoolSize: 50
-#    minPoolSize: 1
-#    maintenanceIntervalMilliseconds: 30000
 
 shardingRule:
   tables:
@@ -54,7 +23,7 @@ shardingRule:
   bindingTables:
     - business_xxx
 
-  defaultDataSourceName: ds1
+  defaultDataSourceName: ds0
   defaultDatabaseStrategy:
     none:
   defaultTableStrategy: