Sfoglia il codice sorgente

加入催缴单功能

java110 5 anni fa
parent
commit
c0058c7505
17 ha cambiato i file con 944 aggiunte e 45 eliminazioni
  1. 97 0
      java110-bean/src/main/java/com/java110/dto/feeCollectionOrder/FeeCollectionOrderDto.java
  2. 74 0
      java110-bean/src/main/java/com/java110/po/feeCollectionOrder/FeeCollectionOrderPo.java
  3. 133 0
      java110-db/src/main/resources/mapper/fee/FeeCollectionOrderServiceDaoImplMapper.xml
  4. 18 45
      java110-generator/src/main/resources/newBack/template_1.json
  5. 53 0
      java110-interface/src/main/java/com/java110/intf/fee/IFeeCollectionOrderInnerServiceSMO.java
  6. 108 0
      service-fee/src/main/java/com/java110/fee/api/FeeCollectionOrderApi.java
  7. 19 0
      service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/IDeleteFeeCollectionOrderBMO.java
  8. 16 0
      service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/IGetFeeCollectionOrderBMO.java
  9. 17 0
      service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/ISaveFeeCollectionOrderBMO.java
  10. 17 0
      service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/IUpdateFeeCollectionOrderBMO.java
  11. 34 0
      service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/impl/DeleteFeeCollectionOrderBMOImpl.java
  12. 44 0
      service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/impl/GetFeeCollectionOrderBMOImpl.java
  13. 38 0
      service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/impl/SaveFeeCollectionOrderBMOImpl.java
  14. 34 0
      service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/impl/UpdateFeeCollectionOrderBMOImpl.java
  15. 61 0
      service-fee/src/main/java/com/java110/fee/dao/IFeeCollectionOrderServiceDao.java
  16. 98 0
      service-fee/src/main/java/com/java110/fee/dao/impl/FeeCollectionOrderServiceDaoImpl.java
  17. 83 0
      service-fee/src/main/java/com/java110/fee/smo/impl/FeeCollectionOrderInnerServiceSMOImpl.java

+ 97 - 0
java110-bean/src/main/java/com/java110/dto/feeCollectionOrder/FeeCollectionOrderDto.java

@@ -0,0 +1,97 @@
+package com.java110.dto.feeCollectionOrder;
+
+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 FeeCollectionOrderDto extends PageDto implements Serializable {
+
+    private String orderId;
+private String staffName;
+private String state;
+private String communityId;
+private String collectionWay;
+private String staffId;
+private String remarks;
+private String collectionName;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getOrderId() {
+        return orderId;
+    }
+public void setOrderId(String orderId) {
+        this.orderId = orderId;
+    }
+public String getStaffName() {
+        return staffName;
+    }
+public void setStaffName(String staffName) {
+        this.staffName = staffName;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getCollectionWay() {
+        return collectionWay;
+    }
+public void setCollectionWay(String collectionWay) {
+        this.collectionWay = collectionWay;
+    }
+public String getStaffId() {
+        return staffId;
+    }
+public void setStaffId(String staffId) {
+        this.staffId = staffId;
+    }
+public String getRemarks() {
+        return remarks;
+    }
+public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+public String getCollectionName() {
+        return collectionName;
+    }
+public void setCollectionName(String collectionName) {
+        this.collectionName = collectionName;
+    }
+
+
+    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;
+    }
+}

+ 74 - 0
java110-bean/src/main/java/com/java110/po/feeCollectionOrder/FeeCollectionOrderPo.java

@@ -0,0 +1,74 @@
+package com.java110.po.feeCollectionOrder;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class FeeCollectionOrderPo implements Serializable {
+
+    private String orderId;
+private String staffName;
+private String statusCd = "0";
+private String state;
+private String communityId;
+private String collectionWay;
+private String staffId;
+private String remarks;
+private String collectionName;
+public String getOrderId() {
+        return orderId;
+    }
+public void setOrderId(String orderId) {
+        this.orderId = orderId;
+    }
+public String getStaffName() {
+        return staffName;
+    }
+public void setStaffName(String staffName) {
+        this.staffName = staffName;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getCollectionWay() {
+        return collectionWay;
+    }
+public void setCollectionWay(String collectionWay) {
+        this.collectionWay = collectionWay;
+    }
+public String getStaffId() {
+        return staffId;
+    }
+public void setStaffId(String staffId) {
+        this.staffId = staffId;
+    }
+public String getRemarks() {
+        return remarks;
+    }
+public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+public String getCollectionName() {
+        return collectionName;
+    }
+public void setCollectionName(String collectionName) {
+        this.collectionName = collectionName;
+    }
+
+
+
+}

+ 133 - 0
java110-db/src/main/resources/mapper/fee/FeeCollectionOrderServiceDaoImplMapper.xml

@@ -0,0 +1,133 @@
+<?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="feeCollectionOrderServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存催缴单信息 add by wuxw 2018-07-03 -->
+    <insert id="saveFeeCollectionOrderInfo" parameterType="Map">
+        insert into fee_collection_order(
+order_id,staff_name,state,community_id,collection_way,staff_id,remarks,collection_name
+) values (
+#{orderId},#{staffName},#{state},#{communityId},#{collectionWay},#{staffId},#{remarks},#{collectionName}
+)
+    </insert>
+
+
+
+    <!-- 查询催缴单信息 add by wuxw 2018-07-03 -->
+    <select id="getFeeCollectionOrderInfo" parameterType="Map" resultType="Map">
+        select  t.order_id,t.order_id orderId,t.staff_name,t.staff_name staffName,t.status_cd,t.status_cd statusCd,t.state,t.community_id,t.community_id communityId,t.collection_way,t.collection_way collectionWay,t.staff_id,t.staff_id staffId,t.remarks,t.collection_name,t.collection_name collectionName 
+from fee_collection_order t 
+where 1 =1 
+<if test="orderId !=null and orderId != ''">
+   and t.order_id= #{orderId}
+</if> 
+<if test="staffName !=null and staffName != ''">
+   and t.staff_name= #{staffName}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="collectionWay !=null and collectionWay != ''">
+   and t.collection_way= #{collectionWay}
+</if> 
+<if test="staffId !=null and staffId != ''">
+   and t.staff_id= #{staffId}
+</if> 
+<if test="remarks !=null and remarks != ''">
+   and t.remarks= #{remarks}
+</if> 
+<if test="collectionName !=null and collectionName != ''">
+   and t.collection_name= #{collectionName}
+</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="updateFeeCollectionOrderInfo" parameterType="Map">
+        update  fee_collection_order t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="staffName !=null and staffName != ''">
+, t.staff_name= #{staffName}
+</if> 
+<if test="state !=null and state != ''">
+, t.state= #{state}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+<if test="collectionWay !=null and collectionWay != ''">
+, t.collection_way= #{collectionWay}
+</if> 
+<if test="staffId !=null and staffId != ''">
+, t.staff_id= #{staffId}
+</if> 
+<if test="remarks !=null and remarks != ''">
+, t.remarks= #{remarks}
+</if> 
+<if test="collectionName !=null and collectionName != ''">
+, t.collection_name= #{collectionName}
+</if> 
+ where 1=1 <if test="orderId !=null and orderId != ''">
+and t.order_id= #{orderId}
+</if> 
+
+    </update>
+
+    <!-- 查询催缴单数量 add by wuxw 2018-07-03 -->
+     <select id="queryFeeCollectionOrdersCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from fee_collection_order t 
+where 1 =1 
+<if test="orderId !=null and orderId != ''">
+   and t.order_id= #{orderId}
+</if> 
+<if test="staffName !=null and staffName != ''">
+   and t.staff_name= #{staffName}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="state !=null and state != ''">
+   and t.state= #{state}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+<if test="collectionWay !=null and collectionWay != ''">
+   and t.collection_way= #{collectionWay}
+</if> 
+<if test="staffId !=null and staffId != ''">
+   and t.staff_id= #{staffId}
+</if> 
+<if test="remarks !=null and remarks != ''">
+   and t.remarks= #{remarks}
+</if> 
+<if test="collectionName !=null and collectionName != ''">
+   and t.collection_name= #{collectionName}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 18 - 45
java110-generator/src/main/resources/newBack/template_1.json

@@ -1,58 +1,31 @@
 {
   "autoMove": true,
-  "id": "smsId",
-  "name": "smsConfig",
-  "desc": "短信配置",
-  "shareParam": "objId",
-  "shareColumn": "obj_id",
-  "shareName": "common",
-  "tableName": "sms_config",
+  "id": "orderId",
+  "name": "feeCollectionOrder",
+  "desc": "催缴单",
+  "shareParam": "communityId",
+  "shareColumn": "community_id",
+  "shareName": "fee",
+  "tableName": "fee_collection_order",
   "param": {
-    "smsId": "sms_id",
-    "storeId": "store_id",
-    "objId": "obj_id",
-    "smsType": "sms_type",
-    "smsBusi": "sms_busi",
-    "templateCode": "template_code",
-    "signName": "sign_name",
-    "accessSecret": "access_secret",
-    "accessKeyId": "access_key_id",
-    "region": "region",
-    "logSwitch": "log_switch",
+    "orderId": "order_id",
+    "collectionName": "collection_name",
+    "staffId": "staff_id",
+    "staffName": "staff_name",
+    "communityId": "community_id",
+    "collectionWay": "collection_way",
+    "state": "state",
     "remarks": "remarks",
     "statusCd": "status_cd"
   },
   "required": [
     {
-      "code": "objId",
-      "msg": "对象不能为空"
+      "code": "communityId",
+      "msg": "小区不能为空"
     },
     {
-      "code": "smsType",
-      "msg": "短信类型不能为空"
-    },
-    {
-      "code": "smsBusi",
-      "msg": "短信业务不能为空"
-    },{
-      "code": "templateCode",
-      "msg": "短信模板不能为空"
-    },{
-      "code": "signName",
-      "msg": "短信签名不能为空"
-    },
-    {
-      "code": "accessSecret",
-      "msg": "访问秘钥不能为空"
-    },{
-      "code": "accessKeyId",
-      "msg": "访问Key不能为空"
-    },{
-      "code": "region",
-      "msg": "区域不能为空"
-    },{
-      "code": "logSwitch",
-      "msg": "日志开关不能为空"
+      "code": "collectionWay",
+      "msg": "催缴方式不能为空"
     }
   ]
 }

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

@@ -0,0 +1,53 @@
+package com.java110.intf.fee;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.feeCollectionOrder.FeeCollectionOrderDto;
+import com.java110.po.feeCollectionOrder.FeeCollectionOrderPo;
+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 IFeeCollectionOrderInnerServiceSMO
+ * @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("/feeCollectionOrderApi")
+public interface IFeeCollectionOrderInnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveFeeCollectionOrder", method = RequestMethod.POST)
+    public int saveFeeCollectionOrder(@RequestBody FeeCollectionOrderPo feeCollectionOrderPo);
+
+    @RequestMapping(value = "/updateFeeCollectionOrder", method = RequestMethod.POST)
+    public int updateFeeCollectionOrder(@RequestBody  FeeCollectionOrderPo feeCollectionOrderPo);
+
+    @RequestMapping(value = "/deleteFeeCollectionOrder", method = RequestMethod.POST)
+    public int deleteFeeCollectionOrder(@RequestBody  FeeCollectionOrderPo feeCollectionOrderPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param feeCollectionOrderDto 数据对象分享
+     * @return FeeCollectionOrderDto 对象数据
+     */
+    @RequestMapping(value = "/queryFeeCollectionOrders", method = RequestMethod.POST)
+    List<FeeCollectionOrderDto> queryFeeCollectionOrders(@RequestBody FeeCollectionOrderDto feeCollectionOrderDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param feeCollectionOrderDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryFeeCollectionOrdersCount", method = RequestMethod.POST)
+    int queryFeeCollectionOrdersCount(@RequestBody FeeCollectionOrderDto feeCollectionOrderDto);
+}

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

@@ -0,0 +1,108 @@
+package com.java110.fee.api;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.dto.feeCollectionOrder.FeeCollectionOrderDto;
+import com.java110.fee.bmo.feeCollectionOrder.IDeleteFeeCollectionOrderBMO;
+import com.java110.fee.bmo.feeCollectionOrder.IGetFeeCollectionOrderBMO;
+import com.java110.fee.bmo.feeCollectionOrder.ISaveFeeCollectionOrderBMO;
+import com.java110.fee.bmo.feeCollectionOrder.IUpdateFeeCollectionOrderBMO;
+import com.java110.po.feeCollectionOrder.FeeCollectionOrderPo;
+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 = "/feeCollectionOrder")
+public class FeeCollectionOrderApi {
+
+    @Autowired
+    private ISaveFeeCollectionOrderBMO saveFeeCollectionOrderBMOImpl;
+    @Autowired
+    private IUpdateFeeCollectionOrderBMO updateFeeCollectionOrderBMOImpl;
+    @Autowired
+    private IDeleteFeeCollectionOrderBMO deleteFeeCollectionOrderBMOImpl;
+
+    @Autowired
+    private IGetFeeCollectionOrderBMO getFeeCollectionOrderBMOImpl;
+
+    /**
+     * 微信保存消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /feeCollectionOrder/saveFeeCollectionOrder
+     * @path /app/feeCollectionOrder/saveFeeCollectionOrder
+     */
+    @RequestMapping(value = "/saveFeeCollectionOrder", method = RequestMethod.POST)
+    public ResponseEntity<String> saveFeeCollectionOrder(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+        Assert.hasKeyAndValue(reqJson, "collectionWay", "请求报文中未包含collectionWay");
+
+
+        FeeCollectionOrderPo feeCollectionOrderPo = BeanConvertUtil.covertBean(reqJson, FeeCollectionOrderPo.class);
+        return saveFeeCollectionOrderBMOImpl.save(feeCollectionOrderPo);
+    }
+
+    /**
+     * 微信修改消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /feeCollectionOrder/updateFeeCollectionOrder
+     * @path /app/feeCollectionOrder/updateFeeCollectionOrder
+     */
+    @RequestMapping(value = "/updateFeeCollectionOrder", method = RequestMethod.POST)
+    public ResponseEntity<String> updateFeeCollectionOrder(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+        Assert.hasKeyAndValue(reqJson, "collectionWay", "请求报文中未包含collectionWay");
+        Assert.hasKeyAndValue(reqJson, "orderId", "orderId不能为空");
+
+
+        FeeCollectionOrderPo feeCollectionOrderPo = BeanConvertUtil.covertBean(reqJson, FeeCollectionOrderPo.class);
+        return updateFeeCollectionOrderBMOImpl.update(feeCollectionOrderPo);
+    }
+
+    /**
+     * 微信删除消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /feeCollectionOrder/deleteFeeCollectionOrder
+     * @path /app/feeCollectionOrder/deleteFeeCollectionOrder
+     */
+    @RequestMapping(value = "/deleteFeeCollectionOrder", method = RequestMethod.POST)
+    public ResponseEntity<String> deleteFeeCollectionOrder(@RequestBody JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
+
+        Assert.hasKeyAndValue(reqJson, "orderId", "orderId不能为空");
+
+
+        FeeCollectionOrderPo feeCollectionOrderPo = BeanConvertUtil.covertBean(reqJson, FeeCollectionOrderPo.class);
+        return deleteFeeCollectionOrderBMOImpl.delete(feeCollectionOrderPo);
+    }
+
+    /**
+     * 微信删除消息模板
+     *
+     * @param communityId 小区ID
+     * @return
+     * @serviceCode /feeCollectionOrder/queryFeeCollectionOrder
+     * @path /app/feeCollectionOrder/queryFeeCollectionOrder
+     */
+    @RequestMapping(value = "/queryFeeCollectionOrder", method = RequestMethod.GET)
+    public ResponseEntity<String> queryFeeCollectionOrder(@RequestParam(value = "communityId") String communityId,
+                                                          @RequestParam(value = "page") int page,
+                                                          @RequestParam(value = "row") int row) {
+        FeeCollectionOrderDto feeCollectionOrderDto = new FeeCollectionOrderDto();
+        feeCollectionOrderDto.setPage(page);
+        feeCollectionOrderDto.setRow(row);
+        feeCollectionOrderDto.setCommunityId(communityId);
+        return getFeeCollectionOrderBMOImpl.get(feeCollectionOrderDto);
+    }
+}

+ 19 - 0
service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/IDeleteFeeCollectionOrderBMO.java

@@ -0,0 +1,19 @@
+package com.java110.fee.bmo.feeCollectionOrder;
+
+import com.java110.po.feeCollectionOrder.FeeCollectionOrderPo;
+import org.springframework.http.ResponseEntity;
+
+public interface IDeleteFeeCollectionOrderBMO {
+
+
+    /**
+     * 修改催缴单
+     * add by wuxw
+     *
+     * @param feeCollectionOrderPo
+     * @return
+     */
+    ResponseEntity<String> delete(FeeCollectionOrderPo feeCollectionOrderPo);
+
+
+}

+ 16 - 0
service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/IGetFeeCollectionOrderBMO.java

@@ -0,0 +1,16 @@
+package com.java110.fee.bmo.feeCollectionOrder;
+import com.java110.dto.feeCollectionOrder.FeeCollectionOrderDto;
+import org.springframework.http.ResponseEntity;
+public interface IGetFeeCollectionOrderBMO {
+
+
+    /**
+     * 查询催缴单
+     * add by wuxw
+     * @param  feeCollectionOrderDto
+     * @return
+     */
+    ResponseEntity<String> get(FeeCollectionOrderDto feeCollectionOrderDto);
+
+
+}

+ 17 - 0
service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/ISaveFeeCollectionOrderBMO.java

@@ -0,0 +1,17 @@
+package com.java110.fee.bmo.feeCollectionOrder;
+
+import com.java110.po.feeCollectionOrder.FeeCollectionOrderPo;
+import org.springframework.http.ResponseEntity;
+public interface ISaveFeeCollectionOrderBMO {
+
+
+    /**
+     * 添加催缴单
+     * add by wuxw
+     * @param feeCollectionOrderPo
+     * @return
+     */
+    ResponseEntity<String> save(FeeCollectionOrderPo feeCollectionOrderPo);
+
+
+}

+ 17 - 0
service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/IUpdateFeeCollectionOrderBMO.java

@@ -0,0 +1,17 @@
+package com.java110.fee.bmo.feeCollectionOrder;
+import com.java110.po.feeCollectionOrder.FeeCollectionOrderPo;
+import org.springframework.http.ResponseEntity;
+
+public interface IUpdateFeeCollectionOrderBMO {
+
+
+    /**
+     * 修改催缴单
+     * add by wuxw
+     * @param feeCollectionOrderPo
+     * @return
+     */
+    ResponseEntity<String> update(FeeCollectionOrderPo feeCollectionOrderPo);
+
+
+}

+ 34 - 0
service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/impl/DeleteFeeCollectionOrderBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.fee.bmo.feeCollectionOrder.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.fee.bmo.feeCollectionOrder.IDeleteFeeCollectionOrderBMO;
+import com.java110.intf.fee.IFeeCollectionOrderInnerServiceSMO;
+import com.java110.po.feeCollectionOrder.FeeCollectionOrderPo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("deleteFeeCollectionOrderBMOImpl")
+public class DeleteFeeCollectionOrderBMOImpl implements IDeleteFeeCollectionOrderBMO {
+
+    @Autowired
+    private IFeeCollectionOrderInnerServiceSMO feeCollectionOrderInnerServiceSMOImpl;
+
+    /**
+     * @param feeCollectionOrderPo 数据
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> delete(FeeCollectionOrderPo feeCollectionOrderPo) {
+
+        int flag = feeCollectionOrderInnerServiceSMOImpl.deleteFeeCollectionOrder(feeCollectionOrderPo);
+
+        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/feeCollectionOrder/impl/GetFeeCollectionOrderBMOImpl.java

@@ -0,0 +1,44 @@
+package com.java110.fee.bmo.feeCollectionOrder.impl;
+
+import com.java110.dto.feeCollectionOrder.FeeCollectionOrderDto;
+import com.java110.fee.bmo.feeCollectionOrder.IGetFeeCollectionOrderBMO;
+import com.java110.intf.fee.IFeeCollectionOrderInnerServiceSMO;
+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("getFeeCollectionOrderBMOImpl")
+public class GetFeeCollectionOrderBMOImpl implements IGetFeeCollectionOrderBMO {
+
+    @Autowired
+    private IFeeCollectionOrderInnerServiceSMO feeCollectionOrderInnerServiceSMOImpl;
+
+    /**
+     * @param feeCollectionOrderDto
+     * @return 订单服务能够接受的报文
+     */
+    public ResponseEntity<String> get(FeeCollectionOrderDto feeCollectionOrderDto) {
+
+
+        int count = feeCollectionOrderInnerServiceSMOImpl.queryFeeCollectionOrdersCount(feeCollectionOrderDto);
+
+        List<FeeCollectionOrderDto> feeCollectionOrderDtos = null;
+        if (count > 0) {
+            feeCollectionOrderDtos = feeCollectionOrderInnerServiceSMOImpl.queryFeeCollectionOrders(feeCollectionOrderDto);
+        } else {
+            feeCollectionOrderDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) feeCollectionOrderDto.getRow()), count, feeCollectionOrderDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        return responseEntity;
+    }
+
+}

+ 38 - 0
service-fee/src/main/java/com/java110/fee/bmo/feeCollectionOrder/impl/SaveFeeCollectionOrderBMOImpl.java

@@ -0,0 +1,38 @@
+package com.java110.fee.bmo.feeCollectionOrder.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.fee.bmo.feeCollectionOrder.ISaveFeeCollectionOrderBMO;
+import com.java110.intf.fee.IFeeCollectionOrderInnerServiceSMO;
+import com.java110.po.feeCollectionOrder.FeeCollectionOrderPo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("saveFeeCollectionOrderBMOImpl")
+public class SaveFeeCollectionOrderBMOImpl implements ISaveFeeCollectionOrderBMO {
+
+    @Autowired
+    private IFeeCollectionOrderInnerServiceSMO feeCollectionOrderInnerServiceSMOImpl;
+
+    /**
+     * 添加小区信息
+     *
+     * @param feeCollectionOrderPo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> save(FeeCollectionOrderPo feeCollectionOrderPo) {
+
+        feeCollectionOrderPo.setOrderId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId));
+        int flag = feeCollectionOrderInnerServiceSMOImpl.saveFeeCollectionOrder(feeCollectionOrderPo);
+
+        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/feeCollectionOrder/impl/UpdateFeeCollectionOrderBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.fee.bmo.feeCollectionOrder.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.fee.bmo.feeCollectionOrder.IUpdateFeeCollectionOrderBMO;
+import com.java110.intf.fee.IFeeCollectionOrderInnerServiceSMO;
+import com.java110.po.feeCollectionOrder.FeeCollectionOrderPo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("updateFeeCollectionOrderBMOImpl")
+public class UpdateFeeCollectionOrderBMOImpl implements IUpdateFeeCollectionOrderBMO {
+
+    @Autowired
+    private IFeeCollectionOrderInnerServiceSMO feeCollectionOrderInnerServiceSMOImpl;
+
+    /**
+     * @param feeCollectionOrderPo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> update(FeeCollectionOrderPo feeCollectionOrderPo) {
+
+        int flag = feeCollectionOrderInnerServiceSMOImpl.updateFeeCollectionOrder(feeCollectionOrderPo);
+
+        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/IFeeCollectionOrderServiceDao.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 IFeeCollectionOrderServiceDao {
+
+
+    /**
+     * 保存 催缴单信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    void saveFeeCollectionOrderInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询催缴单信息(instance过程)
+     * 根据bId 查询催缴单信息
+     * @param info bId 信息
+     * @return 催缴单信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getFeeCollectionOrderInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改催缴单信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    void updateFeeCollectionOrderInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询催缴单总数
+     *
+     * @param info 催缴单信息
+     * @return 催缴单数量
+     */
+    int queryFeeCollectionOrdersCount(Map info);
+
+}

+ 98 - 0
service-fee/src/main/java/com/java110/fee/dao/impl/FeeCollectionOrderServiceDaoImpl.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.IFeeCollectionOrderServiceDao;
+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("feeCollectionOrderServiceDaoImpl")
+//@Transactional
+public class FeeCollectionOrderServiceDaoImpl extends BaseServiceDao implements IFeeCollectionOrderServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(FeeCollectionOrderServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存催缴单信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void saveFeeCollectionOrderInfo(Map info) throws DAOException {
+        logger.debug("保存催缴单信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("feeCollectionOrderServiceDaoImpl.saveFeeCollectionOrderInfo",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> getFeeCollectionOrderInfo(Map info) throws DAOException {
+        logger.debug("查询催缴单信息 入参 info : {}",info);
+
+        List<Map> businessFeeCollectionOrderInfos = sqlSessionTemplate.selectList("feeCollectionOrderServiceDaoImpl.getFeeCollectionOrderInfo",info);
+
+        return businessFeeCollectionOrderInfos;
+    }
+
+
+    /**
+     * 修改催缴单信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void updateFeeCollectionOrderInfo(Map info) throws DAOException {
+        logger.debug("修改催缴单信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("feeCollectionOrderServiceDaoImpl.updateFeeCollectionOrderInfo",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改催缴单信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        }
+    }
+
+     /**
+     * 查询催缴单数量
+     * @param info 催缴单信息
+     * @return 催缴单数量
+     */
+    @Override
+    public int queryFeeCollectionOrdersCount(Map info) {
+        logger.debug("查询催缴单数据 入参 info : {}",info);
+
+        List<Map> businessFeeCollectionOrderInfos = sqlSessionTemplate.selectList("feeCollectionOrderServiceDaoImpl.queryFeeCollectionOrdersCount", info);
+        if (businessFeeCollectionOrderInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessFeeCollectionOrderInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 83 - 0
service-fee/src/main/java/com/java110/fee/smo/impl/FeeCollectionOrderInnerServiceSMOImpl.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.feeCollectionOrder.FeeCollectionOrderDto;
+import com.java110.fee.dao.IFeeCollectionOrderServiceDao;
+import com.java110.intf.fee.IFeeCollectionOrderInnerServiceSMO;
+import com.java110.po.feeCollectionOrder.FeeCollectionOrderPo;
+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 FeeCollectionOrderInnerServiceSMOImpl extends BaseServiceSMO implements IFeeCollectionOrderInnerServiceSMO {
+
+    @Autowired
+    private IFeeCollectionOrderServiceDao feeCollectionOrderServiceDaoImpl;
+
+
+    @Override
+    public int saveFeeCollectionOrder(@RequestBody FeeCollectionOrderPo feeCollectionOrderPo) {
+        int saveFlag = 1;
+        feeCollectionOrderServiceDaoImpl.saveFeeCollectionOrderInfo(BeanConvertUtil.beanCovertMap(feeCollectionOrderPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int updateFeeCollectionOrder(@RequestBody FeeCollectionOrderPo feeCollectionOrderPo) {
+        int saveFlag = 1;
+        feeCollectionOrderServiceDaoImpl.updateFeeCollectionOrderInfo(BeanConvertUtil.beanCovertMap(feeCollectionOrderPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int deleteFeeCollectionOrder(@RequestBody FeeCollectionOrderPo feeCollectionOrderPo) {
+        int saveFlag = 1;
+        feeCollectionOrderPo.setStatusCd("1");
+        feeCollectionOrderServiceDaoImpl.updateFeeCollectionOrderInfo(BeanConvertUtil.beanCovertMap(feeCollectionOrderPo));
+        return saveFlag;
+    }
+
+    @Override
+    public List<FeeCollectionOrderDto> queryFeeCollectionOrders(@RequestBody FeeCollectionOrderDto feeCollectionOrderDto) {
+
+        //校验是否传了 分页信息
+
+        int page = feeCollectionOrderDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            feeCollectionOrderDto.setPage((page - 1) * feeCollectionOrderDto.getRow());
+        }
+
+        List<FeeCollectionOrderDto> feeCollectionOrders = BeanConvertUtil.covertBeanList(feeCollectionOrderServiceDaoImpl.getFeeCollectionOrderInfo(BeanConvertUtil.beanCovertMap(feeCollectionOrderDto)), FeeCollectionOrderDto.class);
+
+        return feeCollectionOrders;
+    }
+
+
+    @Override
+    public int queryFeeCollectionOrdersCount(@RequestBody FeeCollectionOrderDto feeCollectionOrderDto) {
+        return feeCollectionOrderServiceDaoImpl.queryFeeCollectionOrdersCount(BeanConvertUtil.beanCovertMap(feeCollectionOrderDto));
+    }
+
+    public IFeeCollectionOrderServiceDao getFeeCollectionOrderServiceDaoImpl() {
+        return feeCollectionOrderServiceDaoImpl;
+    }
+
+    public void setFeeCollectionOrderServiceDaoImpl(IFeeCollectionOrderServiceDao feeCollectionOrderServiceDaoImpl) {
+        this.feeCollectionOrderServiceDaoImpl = feeCollectionOrderServiceDaoImpl;
+    }
+}