Browse Source

优化代码

java110 4 years ago
parent
commit
6cc9a8f74a
18 changed files with 982 additions and 11 deletions
  1. 111 0
      java110-bean/src/main/java/com/java110/dto/payFeeDetailMonth/PayFeeDetailMonthDto.java
  2. 88 0
      java110-bean/src/main/java/com/java110/po/payFeeDetailMonth/PayFeeDetailMonthPo.java
  3. 1 1
      java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java
  4. 151 0
      java110-db/src/main/resources/mapper/fee/PayFeeDetailMonthServiceDaoImplMapper.xml
  5. 11 10
      java110-generator/src/main/resources/newBack/template_1.json
  6. 53 0
      java110-interface/src/main/java/com/java110/intf/fee/IPayFeeDetailMonthInnerServiceSMO.java
  7. 108 0
      service-fee/src/main/java/com/java110/fee/api/PayFeeDetailMonthApi.java
  8. 17 0
      service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/IDeletePayFeeDetailMonthBMO.java
  9. 16 0
      service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/IGetPayFeeDetailMonthBMO.java
  10. 17 0
      service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/ISavePayFeeDetailMonthBMO.java
  11. 17 0
      service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/IUpdatePayFeeDetailMonthBMO.java
  12. 34 0
      service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/impl/DeletePayFeeDetailMonthBMOImpl.java
  13. 44 0
      service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/impl/GetPayFeeDetailMonthBMOImpl.java
  14. 38 0
      service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/impl/SavePayFeeDetailMonthBMOImpl.java
  15. 34 0
      service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/impl/UpdatePayFeeDetailMonthBMOImpl.java
  16. 61 0
      service-fee/src/main/java/com/java110/fee/dao/IPayFeeDetailMonthServiceDao.java
  17. 98 0
      service-fee/src/main/java/com/java110/fee/dao/impl/PayFeeDetailMonthServiceDaoImpl.java
  18. 83 0
      service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeDetailMonthInnerServiceSMOImpl.java

+ 111 - 0
java110-bean/src/main/java/com/java110/dto/payFeeDetailMonth/PayFeeDetailMonthDto.java

@@ -0,0 +1,111 @@
+package com.java110.dto.payFeeDetailMonth;
+
+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 PayFeeDetailMonthDto extends PageDto implements Serializable {
+
+    private String detailMonth;
+private String detailYear;
+private String detailId;
+private String receivableAmount;
+private String discountAmount;
+private String remark;
+private String receivedAmount;
+private String communityId;
+private String feeId;
+private String monthId;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getDetailMonth() {
+        return detailMonth;
+    }
+public void setDetailMonth(String detailMonth) {
+        this.detailMonth = detailMonth;
+    }
+public String getDetailYear() {
+        return detailYear;
+    }
+public void setDetailYear(String detailYear) {
+        this.detailYear = detailYear;
+    }
+public String getDetailId() {
+        return detailId;
+    }
+public void setDetailId(String detailId) {
+        this.detailId = detailId;
+    }
+public String getReceivableAmount() {
+        return receivableAmount;
+    }
+public void setReceivableAmount(String receivableAmount) {
+        this.receivableAmount = receivableAmount;
+    }
+public String getDiscountAmount() {
+        return discountAmount;
+    }
+public void setDiscountAmount(String discountAmount) {
+        this.discountAmount = discountAmount;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getReceivedAmount() {
+        return receivedAmount;
+    }
+public void setReceivedAmount(String receivedAmount) {
+        this.receivedAmount = receivedAmount;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getFeeId() {
+        return feeId;
+    }
+public void setFeeId(String feeId) {
+        this.feeId = feeId;
+    }
+public String getMonthId() {
+        return monthId;
+    }
+public void setMonthId(String monthId) {
+        this.monthId = monthId;
+    }
+
+
+    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;
+    }
+}

+ 88 - 0
java110-bean/src/main/java/com/java110/po/payFeeDetailMonth/PayFeeDetailMonthPo.java

@@ -0,0 +1,88 @@
+package com.java110.po.payFeeDetailMonth;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class PayFeeDetailMonthPo implements Serializable {
+
+    private String detailMonth;
+private String detailYear;
+private String detailId;
+private String receivableAmount;
+private String discountAmount;
+private String remark;
+private String statusCd = "0";
+private String receivedAmount;
+private String communityId;
+private String feeId;
+private String monthId;
+public String getDetailMonth() {
+        return detailMonth;
+    }
+public void setDetailMonth(String detailMonth) {
+        this.detailMonth = detailMonth;
+    }
+public String getDetailYear() {
+        return detailYear;
+    }
+public void setDetailYear(String detailYear) {
+        this.detailYear = detailYear;
+    }
+public String getDetailId() {
+        return detailId;
+    }
+public void setDetailId(String detailId) {
+        this.detailId = detailId;
+    }
+public String getReceivableAmount() {
+        return receivableAmount;
+    }
+public void setReceivableAmount(String receivableAmount) {
+        this.receivableAmount = receivableAmount;
+    }
+public String getDiscountAmount() {
+        return discountAmount;
+    }
+public void setDiscountAmount(String discountAmount) {
+        this.discountAmount = discountAmount;
+    }
+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 getReceivedAmount() {
+        return receivedAmount;
+    }
+public void setReceivedAmount(String receivedAmount) {
+        this.receivedAmount = receivedAmount;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getFeeId() {
+        return feeId;
+    }
+public void setFeeId(String feeId) {
+        this.feeId = feeId;
+    }
+public String getMonthId() {
+        return monthId;
+    }
+public void setMonthId(String monthId) {
+        this.monthId = monthId;
+    }
+
+
+
+}

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

@@ -215,7 +215,7 @@ public class GenerateCodeFactory {
     public static final String CODE_PREFIX_anValueId = "68";
 
     public static final String CODE_PREFIX_backId = "78";
-    public static final String CODE_PREFIX_cdId = "79";
+    public static final String CODE_PREFIX_monthId = "79";
 
 
 

+ 151 - 0
java110-db/src/main/resources/mapper/fee/PayFeeDetailMonthServiceDaoImplMapper.xml

@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="payFeeDetailMonthServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存月缴费表信息 add by wuxw 2018-07-03 -->
+    <insert id="savePayFeeDetailMonthInfo" parameterType="Map">
+        insert into pay_fee_detail_month(
+detail_month,detail_year,detail_id,receivable_amount,discount_amount,remark,received_amount,community_id,fee_id,month_id
+) values (
+#{detailMonth},#{detailYear},#{detailId},#{receivableAmount},#{discountAmount},#{remark},#{receivedAmount},#{communityId},#{feeId},#{monthId}
+)
+    </insert>
+
+
+
+    <!-- 查询月缴费表信息 add by wuxw 2018-07-03 -->
+    <select id="getPayFeeDetailMonthInfo" parameterType="Map" resultType="Map">
+        select  t.detail_month,t.detail_month detailMonth,t.detail_year,t.detail_year detailYear,t.detail_id,t.detail_id detailId,t.receivable_amount,t.receivable_amount receivableAmount,t.discount_amount,t.discount_amount discountAmount,t.remark,t.status_cd,t.status_cd statusCd,t.received_amount,t.received_amount receivedAmount,t.community_id,t.community_id communityId,t.fee_id,t.fee_id feeId,t.month_id,t.month_id monthId 
+from pay_fee_detail_month t 
+where 1 =1 
+<if test="detailMonth !=null and detailMonth != ''">
+   and t.detail_month= #{detailMonth}
+</if> 
+<if test="detailYear !=null and detailYear != ''">
+   and t.detail_year= #{detailYear}
+</if> 
+<if test="detailId !=null and detailId != ''">
+   and t.detail_id= #{detailId}
+</if> 
+<if test="receivableAmount !=null and receivableAmount != ''">
+   and t.receivable_amount= #{receivableAmount}
+</if> 
+<if test="discountAmount !=null and discountAmount != ''">
+   and t.discount_amount= #{discountAmount}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="receivedAmount !=null and receivedAmount != ''">
+   and t.received_amount= #{receivedAmount}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="feeId !=null and feeId != ''">
+   and t.fee_id= #{feeId}
+</if> 
+<if test="monthId !=null and monthId != ''">
+   and t.month_id= #{monthId}
+</if> 
+order by t.create_time desc
+<if test="page != -1 and page != null ">
+   limit #{page}, #{row}
+</if> 
+
+    </select>
+
+
+
+
+    <!-- 修改月缴费表信息 add by wuxw 2018-07-03 -->
+    <update id="updatePayFeeDetailMonthInfo" parameterType="Map">
+        update  pay_fee_detail_month t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="detailMonth !=null and detailMonth != ''">
+, t.detail_month= #{detailMonth}
+</if> 
+<if test="detailYear !=null and detailYear != ''">
+, t.detail_year= #{detailYear}
+</if> 
+<if test="detailId !=null and detailId != ''">
+, t.detail_id= #{detailId}
+</if> 
+<if test="receivableAmount !=null and receivableAmount != ''">
+, t.receivable_amount= #{receivableAmount}
+</if> 
+<if test="discountAmount !=null and discountAmount != ''">
+, t.discount_amount= #{discountAmount}
+</if> 
+<if test="remark !=null and remark != ''">
+, t.remark= #{remark}
+</if> 
+<if test="receivedAmount !=null and receivedAmount != ''">
+, t.received_amount= #{receivedAmount}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+<if test="feeId !=null and feeId != ''">
+, t.fee_id= #{feeId}
+</if> 
+ where 1=1 <if test="monthId !=null and monthId != ''">
+and t.month_id= #{monthId}
+</if> 
+
+    </update>
+
+    <!-- 查询月缴费表数量 add by wuxw 2018-07-03 -->
+     <select id="queryPayFeeDetailMonthsCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from pay_fee_detail_month t 
+where 1 =1 
+<if test="detailMonth !=null and detailMonth != ''">
+   and t.detail_month= #{detailMonth}
+</if> 
+<if test="detailYear !=null and detailYear != ''">
+   and t.detail_year= #{detailYear}
+</if> 
+<if test="detailId !=null and detailId != ''">
+   and t.detail_id= #{detailId}
+</if> 
+<if test="receivableAmount !=null and receivableAmount != ''">
+   and t.receivable_amount= #{receivableAmount}
+</if> 
+<if test="discountAmount !=null and discountAmount != ''">
+   and t.discount_amount= #{discountAmount}
+</if> 
+<if test="remark !=null and remark != ''">
+   and t.remark= #{remark}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="receivedAmount !=null and receivedAmount != ''">
+   and t.received_amount= #{receivedAmount}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="feeId !=null and feeId != ''">
+   and t.fee_id= #{feeId}
+</if> 
+<if test="monthId !=null and monthId != ''">
+   and t.month_id= #{monthId}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 11 - 10
java110-generator/src/main/resources/newBack/template_1.json

@@ -1,22 +1,23 @@
 {
   "autoMove": true,
-  "id": "cdId",
-  "name": "reportFeeMonthCollectionDetail",
+  "id": "monthId",
+  "name": "payFeeDetailMonth",
   "desc": "月缴费表",
   "shareParam": "communityId",
   "shareColumn": "community_id",
-  "shareName": "report",
-  "tableName": "report_fee_month_collection_detail",
+  "shareName": "fee",
+  "tableName": "pay_fee_detail_month",
   "param": {
-    "cdId": "cd_id",
+    "monthId": "month_id",
+    "feeId": "fee_id",
     "detailId": "detail_id",
-    "collectionId": "collection_id",
-    "collectionYear": "collection_year",
-    "collectionMonth": "collection_month",
     "communityId": "community_id",
+    "detailYear": "detail_year",
+    "detailMonth": "detail_month",
     "receivableAmount": "receivable_amount",
     "receivedAmount": "received_amount",
     "discountAmount": "discount_amount",
+    "remark": "remark",
     "statusCd": "status_cd"
   },
   "required": [
@@ -25,11 +26,11 @@
       "msg": "缴费ID不能为空"
     },
     {
-      "code": "collectionYear",
+      "code": "detailYear",
       "msg": "年份不能为空"
     },
     {
-      "code": "collectionMonth",
+      "code": "detailMonth",
       "msg": "月份不能为空"
     }
   ]

+ 53 - 0
java110-interface/src/main/java/com/java110/intf/fee/IPayFeeDetailMonthInnerServiceSMO.java

@@ -0,0 +1,53 @@
+package com.java110.intf.fee;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.payFeeDetailMonth.PayFeeDetailMonthDto;
+import com.java110.po.payFeeDetailMonth.PayFeeDetailMonthPo;
+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 IPayFeeDetailMonthInnerServiceSMO
+ * @Description 月缴费表接口类
+ * @Author wuxw
+ * @Date 2019/4/24 9:04
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+@FeignClient(name = "fee-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/payFeeDetailMonthApi")
+public interface IPayFeeDetailMonthInnerServiceSMO {
+
+
+    @RequestMapping(value = "/savePayFeeDetailMonth", method = RequestMethod.POST)
+    public int savePayFeeDetailMonth(@RequestBody PayFeeDetailMonthPo payFeeDetailMonthPo);
+
+    @RequestMapping(value = "/updatePayFeeDetailMonth", method = RequestMethod.POST)
+    public int updatePayFeeDetailMonth(@RequestBody  PayFeeDetailMonthPo payFeeDetailMonthPo);
+
+    @RequestMapping(value = "/deletePayFeeDetailMonth", method = RequestMethod.POST)
+    public int deletePayFeeDetailMonth(@RequestBody  PayFeeDetailMonthPo payFeeDetailMonthPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param payFeeDetailMonthDto 数据对象分享
+     * @return PayFeeDetailMonthDto 对象数据
+     */
+    @RequestMapping(value = "/queryPayFeeDetailMonths", method = RequestMethod.POST)
+    List<PayFeeDetailMonthDto> queryPayFeeDetailMonths(@RequestBody PayFeeDetailMonthDto payFeeDetailMonthDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param payFeeDetailMonthDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryPayFeeDetailMonthsCount", method = RequestMethod.POST)
+    int queryPayFeeDetailMonthsCount(@RequestBody PayFeeDetailMonthDto payFeeDetailMonthDto);
+}

+ 108 - 0
service-fee/src/main/java/com/java110/fee/api/PayFeeDetailMonthApi.java

@@ -0,0 +1,108 @@
+package com.java110.fee.api;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.dto.payFeeDetailMonth.PayFeeDetailMonthDto;
+import com.java110.fee.bmo.payFeeDetailMonth.IDeletePayFeeDetailMonthBMO;
+import com.java110.fee.bmo.payFeeDetailMonth.IGetPayFeeDetailMonthBMO;
+import com.java110.fee.bmo.payFeeDetailMonth.ISavePayFeeDetailMonthBMO;
+import com.java110.fee.bmo.payFeeDetailMonth.IUpdatePayFeeDetailMonthBMO;
+import com.java110.po.payFeeDetailMonth.PayFeeDetailMonthPo;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping(value = "/payFeeDetailMonth")
+public class PayFeeDetailMonthApi {
+
+    @Autowired
+    private ISavePayFeeDetailMonthBMO savePayFeeDetailMonthBMOImpl;
+    @Autowired
+    private IUpdatePayFeeDetailMonthBMO updatePayFeeDetailMonthBMOImpl;
+    @Autowired
+    private IDeletePayFeeDetailMonthBMO deletePayFeeDetailMonthBMOImpl;
+
+    @Autowired
+    private IGetPayFeeDetailMonthBMO getPayFeeDetailMonthBMOImpl;
+
+    /**
+     * 微信保存消息模板
+     * @serviceCode /payFeeDetailMonth/savePayFeeDetailMonth
+     * @path /app/payFeeDetailMonth/savePayFeeDetailMonth
+     * @param reqJson
+     * @return
+     */
+    @RequestMapping(value = "/savePayFeeDetailMonth", method = RequestMethod.POST)
+    public ResponseEntity<String> savePayFeeDetailMonth(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "detailId", "请求报文中未包含detailId");
+Assert.hasKeyAndValue(reqJson, "detailYear", "请求报文中未包含detailYear");
+Assert.hasKeyAndValue(reqJson, "detailMonth", "请求报文中未包含detailMonth");
+
+
+        PayFeeDetailMonthPo payFeeDetailMonthPo = BeanConvertUtil.covertBean(reqJson, PayFeeDetailMonthPo.class);
+        return savePayFeeDetailMonthBMOImpl.save(payFeeDetailMonthPo);
+    }
+
+    /**
+     * 微信修改消息模板
+     * @serviceCode /payFeeDetailMonth/updatePayFeeDetailMonth
+     * @path /app/payFeeDetailMonth/updatePayFeeDetailMonth
+     * @param reqJson
+     * @return
+     */
+    @RequestMapping(value = "/updatePayFeeDetailMonth", method = RequestMethod.POST)
+    public ResponseEntity<String> updatePayFeeDetailMonth(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "detailId", "请求报文中未包含detailId");
+Assert.hasKeyAndValue(reqJson, "detailYear", "请求报文中未包含detailYear");
+Assert.hasKeyAndValue(reqJson, "detailMonth", "请求报文中未包含detailMonth");
+Assert.hasKeyAndValue(reqJson, "monthId", "monthId不能为空");
+
+
+        PayFeeDetailMonthPo payFeeDetailMonthPo = BeanConvertUtil.covertBean(reqJson, PayFeeDetailMonthPo.class);
+        return updatePayFeeDetailMonthBMOImpl.update(payFeeDetailMonthPo);
+    }
+
+    /**
+     * 微信删除消息模板
+     * @serviceCode /payFeeDetailMonth/deletePayFeeDetailMonth
+     * @path /app/payFeeDetailMonth/deletePayFeeDetailMonth
+     * @param reqJson
+     * @return
+     */
+    @RequestMapping(value = "/deletePayFeeDetailMonth", method = RequestMethod.POST)
+    public ResponseEntity<String> deletePayFeeDetailMonth(@RequestBody JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
+
+        Assert.hasKeyAndValue(reqJson, "monthId", "monthId不能为空");
+
+
+        PayFeeDetailMonthPo payFeeDetailMonthPo = BeanConvertUtil.covertBean(reqJson, PayFeeDetailMonthPo.class);
+        return deletePayFeeDetailMonthBMOImpl.delete(payFeeDetailMonthPo);
+    }
+
+    /**
+     * 微信删除消息模板
+     * @serviceCode /payFeeDetailMonth/queryPayFeeDetailMonth
+     * @path /app/payFeeDetailMonth/queryPayFeeDetailMonth
+     * @param communityId 小区ID
+     * @return
+     */
+    @RequestMapping(value = "/queryPayFeeDetailMonth", method = RequestMethod.GET)
+    public ResponseEntity<String> queryPayFeeDetailMonth(@RequestParam(value = "communityId") String communityId,
+                                                      @RequestParam(value = "page") int page,
+                                                      @RequestParam(value = "row") int row) {
+        PayFeeDetailMonthDto payFeeDetailMonthDto = new PayFeeDetailMonthDto();
+        payFeeDetailMonthDto.setPage(page);
+        payFeeDetailMonthDto.setRow(row);
+        payFeeDetailMonthDto.setCommunityId(communityId);
+        return getPayFeeDetailMonthBMOImpl.get(payFeeDetailMonthDto);
+    }
+}

+ 17 - 0
service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/IDeletePayFeeDetailMonthBMO.java

@@ -0,0 +1,17 @@
+package com.java110.fee.bmo.payFeeDetailMonth;
+import com.java110.po.payFeeDetailMonth.PayFeeDetailMonthPo;
+import org.springframework.http.ResponseEntity;
+
+public interface IDeletePayFeeDetailMonthBMO {
+
+
+    /**
+     * 修改月缴费表
+     * add by wuxw
+     * @param payFeeDetailMonthPo
+     * @return
+     */
+    ResponseEntity<String> delete(PayFeeDetailMonthPo payFeeDetailMonthPo);
+
+
+}

+ 16 - 0
service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/IGetPayFeeDetailMonthBMO.java

@@ -0,0 +1,16 @@
+package com.java110.fee.bmo.payFeeDetailMonth;
+import com.java110.dto.payFeeDetailMonth.PayFeeDetailMonthDto;
+import org.springframework.http.ResponseEntity;
+public interface IGetPayFeeDetailMonthBMO {
+
+
+    /**
+     * 查询月缴费表
+     * add by wuxw
+     * @param  payFeeDetailMonthDto
+     * @return
+     */
+    ResponseEntity<String> get(PayFeeDetailMonthDto payFeeDetailMonthDto);
+
+
+}

+ 17 - 0
service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/ISavePayFeeDetailMonthBMO.java

@@ -0,0 +1,17 @@
+package com.java110.fee.bmo.payFeeDetailMonth;
+
+import com.java110.po.payFeeDetailMonth.PayFeeDetailMonthPo;
+import org.springframework.http.ResponseEntity;
+public interface ISavePayFeeDetailMonthBMO {
+
+
+    /**
+     * 添加月缴费表
+     * add by wuxw
+     * @param payFeeDetailMonthPo
+     * @return
+     */
+    ResponseEntity<String> save(PayFeeDetailMonthPo payFeeDetailMonthPo);
+
+
+}

+ 17 - 0
service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/IUpdatePayFeeDetailMonthBMO.java

@@ -0,0 +1,17 @@
+package com.java110.fee.bmo.payFeeDetailMonth;
+import com.java110.po.payFeeDetailMonth.PayFeeDetailMonthPo;
+import org.springframework.http.ResponseEntity;
+
+public interface IUpdatePayFeeDetailMonthBMO {
+
+
+    /**
+     * 修改月缴费表
+     * add by wuxw
+     * @param payFeeDetailMonthPo
+     * @return
+     */
+    ResponseEntity<String> update(PayFeeDetailMonthPo payFeeDetailMonthPo);
+
+
+}

+ 34 - 0
service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/impl/DeletePayFeeDetailMonthBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.fee.bmo.payFeeDetailMonth.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.fee.bmo.payFeeDetailMonth.IDeletePayFeeDetailMonthBMO;
+import com.java110.intf.fee.IPayFeeDetailMonthInnerServiceSMO;
+import com.java110.po.payFeeDetailMonth.PayFeeDetailMonthPo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("deletePayFeeDetailMonthBMOImpl")
+public class DeletePayFeeDetailMonthBMOImpl implements IDeletePayFeeDetailMonthBMO {
+
+    @Autowired
+    private IPayFeeDetailMonthInnerServiceSMO payFeeDetailMonthInnerServiceSMOImpl;
+
+    /**
+     * @param payFeeDetailMonthPo 数据
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> delete(PayFeeDetailMonthPo payFeeDetailMonthPo) {
+
+        int flag = payFeeDetailMonthInnerServiceSMOImpl.deletePayFeeDetailMonth(payFeeDetailMonthPo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 44 - 0
service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/impl/GetPayFeeDetailMonthBMOImpl.java

@@ -0,0 +1,44 @@
+package com.java110.fee.bmo.payFeeDetailMonth.impl;
+
+import com.java110.dto.payFeeDetailMonth.PayFeeDetailMonthDto;
+import com.java110.fee.bmo.payFeeDetailMonth.IGetPayFeeDetailMonthBMO;
+import com.java110.intf.fee.IPayFeeDetailMonthInnerServiceSMO;
+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("getPayFeeDetailMonthBMOImpl")
+public class GetPayFeeDetailMonthBMOImpl implements IGetPayFeeDetailMonthBMO {
+
+    @Autowired
+    private IPayFeeDetailMonthInnerServiceSMO payFeeDetailMonthInnerServiceSMOImpl;
+
+    /**
+     * @param payFeeDetailMonthDto
+     * @return 订单服务能够接受的报文
+     */
+    public ResponseEntity<String> get(PayFeeDetailMonthDto payFeeDetailMonthDto) {
+
+
+        int count = payFeeDetailMonthInnerServiceSMOImpl.queryPayFeeDetailMonthsCount(payFeeDetailMonthDto);
+
+        List<PayFeeDetailMonthDto> payFeeDetailMonthDtos = null;
+        if (count > 0) {
+            payFeeDetailMonthDtos = payFeeDetailMonthInnerServiceSMOImpl.queryPayFeeDetailMonths(payFeeDetailMonthDto);
+        } else {
+            payFeeDetailMonthDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) payFeeDetailMonthDto.getRow()), count, payFeeDetailMonthDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        return responseEntity;
+    }
+
+}

+ 38 - 0
service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/impl/SavePayFeeDetailMonthBMOImpl.java

@@ -0,0 +1,38 @@
+package com.java110.fee.bmo.payFeeDetailMonth.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.fee.bmo.payFeeDetailMonth.ISavePayFeeDetailMonthBMO;
+import com.java110.intf.fee.IPayFeeDetailMonthInnerServiceSMO;
+import com.java110.po.payFeeDetailMonth.PayFeeDetailMonthPo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("savePayFeeDetailMonthBMOImpl")
+public class SavePayFeeDetailMonthBMOImpl implements ISavePayFeeDetailMonthBMO {
+
+    @Autowired
+    private IPayFeeDetailMonthInnerServiceSMO payFeeDetailMonthInnerServiceSMOImpl;
+
+    /**
+     * 添加小区信息
+     *
+     * @param payFeeDetailMonthPo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> save(PayFeeDetailMonthPo payFeeDetailMonthPo) {
+
+        payFeeDetailMonthPo.setMonthId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_monthId));
+        int flag = payFeeDetailMonthInnerServiceSMOImpl.savePayFeeDetailMonth(payFeeDetailMonthPo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 34 - 0
service-fee/src/main/java/com/java110/fee/bmo/payFeeDetailMonth/impl/UpdatePayFeeDetailMonthBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.fee.bmo.payFeeDetailMonth.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.fee.bmo.payFeeDetailMonth.IUpdatePayFeeDetailMonthBMO;
+import com.java110.intf.fee.IPayFeeDetailMonthInnerServiceSMO;
+import com.java110.po.payFeeDetailMonth.PayFeeDetailMonthPo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("updatePayFeeDetailMonthBMOImpl")
+public class UpdatePayFeeDetailMonthBMOImpl implements IUpdatePayFeeDetailMonthBMO {
+
+    @Autowired
+    private IPayFeeDetailMonthInnerServiceSMO payFeeDetailMonthInnerServiceSMOImpl;
+
+    /**
+     * @param payFeeDetailMonthPo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> update(PayFeeDetailMonthPo payFeeDetailMonthPo) {
+
+        int flag = payFeeDetailMonthInnerServiceSMOImpl.updatePayFeeDetailMonth(payFeeDetailMonthPo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 61 - 0
service-fee/src/main/java/com/java110/fee/dao/IPayFeeDetailMonthServiceDao.java

@@ -0,0 +1,61 @@
+package com.java110.fee.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 IPayFeeDetailMonthServiceDao {
+
+
+    /**
+     * 保存 月缴费表信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    void savePayFeeDetailMonthInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询月缴费表信息(instance过程)
+     * 根据bId 查询月缴费表信息
+     * @param info bId 信息
+     * @return 月缴费表信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getPayFeeDetailMonthInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改月缴费表信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    void updatePayFeeDetailMonthInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询月缴费表总数
+     *
+     * @param info 月缴费表信息
+     * @return 月缴费表数量
+     */
+    int queryPayFeeDetailMonthsCount(Map info);
+
+}

+ 98 - 0
service-fee/src/main/java/com/java110/fee/dao/impl/PayFeeDetailMonthServiceDaoImpl.java

@@ -0,0 +1,98 @@
+package com.java110.fee.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.fee.dao.IPayFeeDetailMonthServiceDao;
+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("payFeeDetailMonthServiceDaoImpl")
+//@Transactional
+public class PayFeeDetailMonthServiceDaoImpl extends BaseServiceDao implements IPayFeeDetailMonthServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(PayFeeDetailMonthServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存月缴费表信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void savePayFeeDetailMonthInfo(Map info) throws DAOException {
+        logger.debug("保存月缴费表信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("payFeeDetailMonthServiceDaoImpl.savePayFeeDetailMonthInfo",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> getPayFeeDetailMonthInfo(Map info) throws DAOException {
+        logger.debug("查询月缴费表信息 入参 info : {}",info);
+
+        List<Map> businessPayFeeDetailMonthInfos = sqlSessionTemplate.selectList("payFeeDetailMonthServiceDaoImpl.getPayFeeDetailMonthInfo",info);
+
+        return businessPayFeeDetailMonthInfos;
+    }
+
+
+    /**
+     * 修改月缴费表信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void updatePayFeeDetailMonthInfo(Map info) throws DAOException {
+        logger.debug("修改月缴费表信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("payFeeDetailMonthServiceDaoImpl.updatePayFeeDetailMonthInfo",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改月缴费表信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        }
+    }
+
+     /**
+     * 查询月缴费表数量
+     * @param info 月缴费表信息
+     * @return 月缴费表数量
+     */
+    @Override
+    public int queryPayFeeDetailMonthsCount(Map info) {
+        logger.debug("查询月缴费表数据 入参 info : {}",info);
+
+        List<Map> businessPayFeeDetailMonthInfos = sqlSessionTemplate.selectList("payFeeDetailMonthServiceDaoImpl.queryPayFeeDetailMonthsCount", info);
+        if (businessPayFeeDetailMonthInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessPayFeeDetailMonthInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 83 - 0
service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeDetailMonthInnerServiceSMOImpl.java

@@ -0,0 +1,83 @@
+package com.java110.fee.smo.impl;
+
+
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.PageDto;
+import com.java110.dto.payFeeDetailMonth.PayFeeDetailMonthDto;
+import com.java110.fee.dao.IPayFeeDetailMonthServiceDao;
+import com.java110.intf.fee.IPayFeeDetailMonthInnerServiceSMO;
+import com.java110.po.payFeeDetailMonth.PayFeeDetailMonthPo;
+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 PayFeeDetailMonthInnerServiceSMOImpl extends BaseServiceSMO implements IPayFeeDetailMonthInnerServiceSMO {
+
+    @Autowired
+    private IPayFeeDetailMonthServiceDao payFeeDetailMonthServiceDaoImpl;
+
+
+    @Override
+    public int savePayFeeDetailMonth(@RequestBody PayFeeDetailMonthPo payFeeDetailMonthPo) {
+        int saveFlag = 1;
+        payFeeDetailMonthServiceDaoImpl.savePayFeeDetailMonthInfo(BeanConvertUtil.beanCovertMap(payFeeDetailMonthPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int updatePayFeeDetailMonth(@RequestBody PayFeeDetailMonthPo payFeeDetailMonthPo) {
+        int saveFlag = 1;
+        payFeeDetailMonthServiceDaoImpl.updatePayFeeDetailMonthInfo(BeanConvertUtil.beanCovertMap(payFeeDetailMonthPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int deletePayFeeDetailMonth(@RequestBody PayFeeDetailMonthPo payFeeDetailMonthPo) {
+        int saveFlag = 1;
+        payFeeDetailMonthPo.setStatusCd("1");
+        payFeeDetailMonthServiceDaoImpl.updatePayFeeDetailMonthInfo(BeanConvertUtil.beanCovertMap(payFeeDetailMonthPo));
+        return saveFlag;
+    }
+
+    @Override
+    public List<PayFeeDetailMonthDto> queryPayFeeDetailMonths(@RequestBody PayFeeDetailMonthDto payFeeDetailMonthDto) {
+
+        //校验是否传了 分页信息
+
+        int page = payFeeDetailMonthDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            payFeeDetailMonthDto.setPage((page - 1) * payFeeDetailMonthDto.getRow());
+        }
+
+        List<PayFeeDetailMonthDto> payFeeDetailMonths = BeanConvertUtil.covertBeanList(payFeeDetailMonthServiceDaoImpl.getPayFeeDetailMonthInfo(BeanConvertUtil.beanCovertMap(payFeeDetailMonthDto)), PayFeeDetailMonthDto.class);
+
+        return payFeeDetailMonths;
+    }
+
+
+    @Override
+    public int queryPayFeeDetailMonthsCount(@RequestBody PayFeeDetailMonthDto payFeeDetailMonthDto) {
+        return payFeeDetailMonthServiceDaoImpl.queryPayFeeDetailMonthsCount(BeanConvertUtil.beanCovertMap(payFeeDetailMonthDto));
+    }
+
+    public IPayFeeDetailMonthServiceDao getPayFeeDetailMonthServiceDaoImpl() {
+        return payFeeDetailMonthServiceDaoImpl;
+    }
+
+    public void setPayFeeDetailMonthServiceDaoImpl(IPayFeeDetailMonthServiceDao payFeeDetailMonthServiceDaoImpl) {
+        this.payFeeDetailMonthServiceDaoImpl = payFeeDetailMonthServiceDaoImpl;
+    }
+}