Browse Source

优化代码

java110 5 years ago
parent
commit
ed92ebffa6
21 changed files with 1075 additions and 122 deletions
  1. 76 0
      java110-bean/src/main/java/com/java110/dto/feePrintSpec/FeePrintSpecDto.java
  2. 53 0
      java110-bean/src/main/java/com/java110/po/feePrintSpec/FeePrintSpecPo.java
  3. 1 0
      java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java
  4. 102 0
      java110-db/src/main/resources/mapper/fee/FeePrintSpecServiceDaoImplMapper.xml
  5. 18 16
      java110-generator/src/main/resources/newBack/template_1.json
  6. 31 0
      java110-generator/src/main/resources/newBack/template_contractTypeTemplate.json
  7. 37 106
      java110-generator/src/main/resources/web/template_1.json
  8. 128 0
      java110-generator/src/main/resources/web/template_ContractTypeSpec.json
  9. 52 0
      java110-interface/src/main/java/com/java110/intf/fee/IFeePrintSpecInnerServiceSMO.java
  10. 109 0
      service-fee/src/main/java/com/java110/fee/api/FeePrintSpecApi.java
  11. 19 0
      service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/IDeleteFeePrintSpecBMO.java
  12. 19 0
      service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/IGetFeePrintSpecBMO.java
  13. 19 0
      service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/ISaveFeePrintSpecBMO.java
  14. 19 0
      service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/IUpdateFeePrintSpecBMO.java
  15. 34 0
      service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/impl/DeleteFeePrintSpecBMOImpl.java
  16. 44 0
      service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/impl/GetFeePrintSpecBMOImpl.java
  17. 38 0
      service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/impl/SaveFeePrintSpecBMOImpl.java
  18. 34 0
      service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/impl/UpdateFeePrintSpecBMOImpl.java
  19. 61 0
      service-fee/src/main/java/com/java110/fee/dao/IFeePrintSpecServiceDao.java
  20. 98 0
      service-fee/src/main/java/com/java110/fee/dao/impl/FeePrintSpecServiceDaoImpl.java
  21. 83 0
      service-fee/src/main/java/com/java110/fee/smo/impl/FeePrintSpecInnerServiceSMOImpl.java

+ 76 - 0
java110-bean/src/main/java/com/java110/dto/feePrintSpec/FeePrintSpecDto.java

@@ -0,0 +1,76 @@
+package com.java110.dto.feePrintSpec;
+
+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 FeePrintSpecDto extends PageDto implements Serializable {
+
+    private String printId;
+private String context;
+private String specCd;
+private String communityId;
+private String qrImg;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getPrintId() {
+        return printId;
+    }
+public void setPrintId(String printId) {
+        this.printId = printId;
+    }
+public String getContext() {
+        return context;
+    }
+public void setContext(String context) {
+        this.context = context;
+    }
+public String getSpecCd() {
+        return specCd;
+    }
+public void setSpecCd(String specCd) {
+        this.specCd = specCd;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getQrImg() {
+        return qrImg;
+    }
+public void setQrImg(String qrImg) {
+        this.qrImg = qrImg;
+    }
+
+
+    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;
+    }
+}

+ 53 - 0
java110-bean/src/main/java/com/java110/po/feePrintSpec/FeePrintSpecPo.java

@@ -0,0 +1,53 @@
+package com.java110.po.feePrintSpec;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class FeePrintSpecPo implements Serializable {
+
+    private String printId;
+private String context;
+private String specCd;
+private String statusCd = "0";
+private String communityId;
+private String qrImg;
+public String getPrintId() {
+        return printId;
+    }
+public void setPrintId(String printId) {
+        this.printId = printId;
+    }
+public String getContext() {
+        return context;
+    }
+public void setContext(String context) {
+        this.context = context;
+    }
+public String getSpecCd() {
+        return specCd;
+    }
+public void setSpecCd(String specCd) {
+        this.specCd = specCd;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getQrImg() {
+        return qrImg;
+    }
+public void setQrImg(String qrImg) {
+        this.qrImg = qrImg;
+    }
+
+
+
+}

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

@@ -150,6 +150,7 @@ public class GenerateCodeFactory {
     public static final String CODE_PREFIX_specCd = "82";
     public static final String CODE_PREFIX_loginId = "82";
     public static final String CODE_PREFIX_templateId = "82";
+    public static final String CODE_PREFIX_printId = "83";
 
 
 

+ 102 - 0
java110-db/src/main/resources/mapper/fee/FeePrintSpecServiceDaoImplMapper.xml

@@ -0,0 +1,102 @@
+<?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="feePrintSpecServiceDaoImpl">
+
+
+    <!-- 保存打印说明信息 add by wuxw 2018-07-03 -->
+    <insert id="saveFeePrintSpecInfo" parameterType="Map">
+        insert into fee_print_spec(
+        print_id,content,spec_cd,community_id,qr_img
+        ) values (
+        #{printId},#{context},#{specCd},#{communityId},#{qrImg}
+        )
+    </insert>
+
+
+    <!-- 查询打印说明信息 add by wuxw 2018-07-03 -->
+    <select id="getFeePrintSpecInfo" parameterType="Map" resultType="Map">
+        select t.print_id,t.print_id printId,t.content,t.content context,t.spec_cd,t.spec_cd
+        specCd,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.qr_img,t.qr_img qrImg
+        from fee_print_spec t
+        where 1 =1
+        <if test="printId !=null and printId != ''">
+            and t.print_id= #{printId}
+        </if>
+        <if test="context !=null and context != ''">
+            and t.content= #{context}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="qrImg !=null and qrImg != ''">
+            and t.qr_img= #{qrImg}
+        </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="updateFeePrintSpecInfo" parameterType="Map">
+        update fee_print_spec t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="context !=null and context != ''">
+            , t.content= #{context}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            , t.spec_cd= #{specCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="qrImg !=null and qrImg != ''">
+            , t.qr_img= #{qrImg}
+        </if>
+        where 1=1
+        <if test="printId !=null and printId != ''">
+            and t.print_id= #{printId}
+        </if>
+
+    </update>
+
+    <!-- 查询打印说明数量 add by wuxw 2018-07-03 -->
+    <select id="queryFeePrintSpecsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from fee_print_spec t
+        where 1 =1
+        <if test="printId !=null and printId != ''">
+            and t.print_id= #{printId}
+        </if>
+        <if test="context !=null and context != ''">
+            and t.content= #{context}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="qrImg !=null and qrImg != ''">
+            and t.qr_img= #{qrImg}
+        </if>
+
+
+    </select>
+
+</mapper>

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

@@ -1,30 +1,32 @@
 {
   "autoMove": true,
-  "id": "templateId",
-  "name": "contractTypeTemplate",
-  "desc": "合同属性",
-  "shareParam": "storeId",
-  "shareColumn": "store_id",
-  "shareName": "store",
-  "tableName": "contract_type_template",
+  "id": "printId",
+  "name": "feePrintSpec",
+  "desc": "打印说明",
+  "shareParam": "communityId",
+  "shareColumn": "community_id",
+  "shareName": "fee",
+  "tableName": "fee_print_spec",
   "param": {
-    "storeId": "store_id",
-    "contractTypeId": "contract_type_id",
-    "context": "context",
+    "printId": "print_id",
+    "communityId": "community_id",
+    "specCd": "spec_cd",
+    "context": "content",
+    "qrImg": "qr_img",
     "statusCd": "status_cd"
   },
   "required": [
     {
-      "code": "contractTypeId",
-      "msg": "合同类型不能为空"
+      "code": "communityId",
+      "msg": "小区不能为空"
     },
     {
-      "code": "storeId",
-      "msg": "商户ID不能为空"
+      "code": "content",
+      "msg": "内容不能为空"
     },
     {
-      "code": "context",
-      "msg": "内容不能为空"
+      "code": "specCd",
+      "msg": "规格不能为空"
     }
   ]
 }

+ 31 - 0
java110-generator/src/main/resources/newBack/template_contractTypeTemplate.json

@@ -0,0 +1,31 @@
+{
+  "autoMove": true,
+  "id": "templateId",
+  "name": "contractTypeTemplate",
+  "desc": "合同属性",
+  "shareParam": "storeId",
+  "shareColumn": "store_id",
+  "shareName": "store",
+  "tableName": "contract_type_template",
+  "param": {
+    "storeId": "store_id",
+    "contractTypeId": "contract_type_id",
+    "context": "context",
+    "statusCd": "status_cd"
+  },
+  "required": [
+    {
+      "code": "contractTypeId",
+      "msg": "合同类型不能为空"
+    },
+    {
+      "code": "storeId",
+      "msg": "商户ID不能为空"
+    },
+    {
+      "code": "context",
+      "msg": "内容不能为空"
+    }
+  ]
+}
+

+ 37 - 106
java110-generator/src/main/resources/web/template_1.json

@@ -1,127 +1,58 @@
 {
-  "templateName":"合同类型属性",
-  "directories": "admin",
-  "templateCode":"contractTypeSpec",
-  "templateKey":"specCd",
-  "templateKeyName":"规格",
+  "templateName": "打印配置",
+  "directories": "property",
+  "templateCode": "feePrintSpec",
+  "templateKey": "specCd",
+  "templateKeyName": "规格",
   "searchCode": "specCd",
   "searchName": "规格",
   "conditions": [
-    {
-      "name": "规格名称",
-      "inputType": "input",
-      "code": "specName",
-      "whereCondition": "equal"
-    },
-    {
-      "name": "规格显示",
-      "inputType": "select",
-      "selectValue":"Y,N",
-      "selectValueName":"显示,不显示",
-      "code": "specShow",
-      "whereCondition": "equal"
-    },
     {
       "name": "规格",
-      "inputType": "input",
+      "inputType": "select",
+      "selectValue": "1010",
+      "selectValueName": "催缴打印说明",
       "code": "specCd",
       "whereCondition": "equal"
     }
   ],
-  "columns":[
+  "columns": [
     {
-      "code": "specName",
-      "cnCode":"规格名称",
-      "desc":"必填,请填写规格名称",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"maxLength",
-      "limitParam":"64",
-      "limitErrInfo":"规格名称太长",
+      "code": "specCd",
+      "cnCode": "规格",
+      "desc": "必填,请填写规格名称",
+      "required": true,
+      "hasDefaultValue": false,
+      "inputType": "select",
+      "selectValue": "1010",
+      "selectValueName": "催缴打印说明",
+      "limit": "num",
+      "limitParam": "",
+      "limitErrInfo": "规格不是有效数字",
       "show": true
     },
     {
-      "code": "specHoldplace",
-      "cnCode":"说明",
-      "desc":"选填,请填写说明",
-      "required":false,
-      "hasDefaultValue":false,
+      "code": "content",
+      "cnCode": "内容",
+      "desc": "必填,请填写必填内容",
+      "required": true,
+      "hasDefaultValue": false,
       "inputType": "input",
-      "limit":"maxLength",
-      "limitParam":"200",
-      "limitErrInfo":"说明不能超过500位",
+      "limit": "maxLength",
+      "limitParam": "1000",
+      "limitErrInfo": "说明不能超过1000位",
       "show": false
     },
     {
-      "code":"required",
-      "cnCode":"必填",
-      "desc":"必填,请选择是否必填",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "select",
-      "selectValue":"Y,N",
-      "selectValueName":"是,否",
-      "limit":"",
-      "limitParam":"",
-      "limitErrInfo":"模板格式错误",
-      "show": true
-    },
-    {
-      "code":"specShow",
-      "cnCode":"展示",
-      "desc":"必填,请选择是否添加编辑时展示",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "select",
-      "selectValue":"Y,N",
-      "selectValueName":"是,否",
-      "limit":"",
-      "limitParam":"",
-      "limitErrInfo":"模板格式错误",
-      "show": true
-    },
-    {
-      "code":"specValueType",
-      "cnCode":"值类型",
-      "desc":"必填,请选择值类型",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "select",
-      "selectValue":"1001,2002,3003",
-      "selectValueName":"字符串,整数,金额",
-      "limit":"num",
-      "limitParam":"",
-      "limitErrInfo":"值类型格式错误",
-      "show": true
-    },
-    {
-      "code":"specType",
-      "cnCode":"规格类型",
-      "desc":"必填,请选择规格类型",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "select",
-      "selectValue":"2233,3344",
-      "selectValueName":"input,select",
-      "limit":"num",
-      "limitParam":"",
-      "limitErrInfo":"规格类型错误",
-      "show": true
-    }
-  ,
-    {
-      "code":"listShow",
-      "cnCode":"查询显示",
-      "desc":"必填,请选择查询显示",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "select",
-      "selectValue":"Y,N",
-      "selectValueName":"是,否",
-      "limit":"",
-      "limitParam":"",
-      "limitErrInfo":"规格类型错误",
+      "code": "qrImg",
+      "cnCode": "必填",
+      "desc": "必填,请填写二维码",
+      "required": true,
+      "hasDefaultValue": false,
+      "inputType": "input",
+      "limit": "maxLength",
+      "limitParam": "100",
+      "limitErrInfo": "模板格式错误",
       "show": true
     }
   ]

+ 128 - 0
java110-generator/src/main/resources/web/template_ContractTypeSpec.json

@@ -0,0 +1,128 @@
+{
+  "templateName":"合同类型属性",
+  "directories": "admin",
+  "templateCode":"contractTypeSpec",
+  "templateKey":"specCd",
+  "templateKeyName":"规格",
+  "searchCode": "specCd",
+  "searchName": "规格",
+  "conditions": [
+    {
+      "name": "规格名称",
+      "inputType": "input",
+      "code": "specName",
+      "whereCondition": "equal"
+    },
+    {
+      "name": "规格显示",
+      "inputType": "select",
+      "selectValue":"Y,N",
+      "selectValueName":"显示,不显示",
+      "code": "specShow",
+      "whereCondition": "equal"
+    },
+    {
+      "name": "规格",
+      "inputType": "input",
+      "code": "specCd",
+      "whereCondition": "equal"
+    }
+  ],
+  "columns":[
+    {
+      "code": "specName",
+      "cnCode":"规格名称",
+      "desc":"必填,请填写规格名称",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"maxLength",
+      "limitParam":"64",
+      "limitErrInfo":"规格名称太长",
+      "show": true
+    },
+    {
+      "code": "specHoldplace",
+      "cnCode":"说明",
+      "desc":"选填,请填写说明",
+      "required":false,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"maxLength",
+      "limitParam":"200",
+      "limitErrInfo":"说明不能超过500位",
+      "show": false
+    },
+    {
+      "code":"required",
+      "cnCode":"必填",
+      "desc":"必填,请选择是否必填",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"Y,N",
+      "selectValueName":"是,否",
+      "limit":"",
+      "limitParam":"",
+      "limitErrInfo":"模板格式错误",
+      "show": true
+    },
+    {
+      "code":"specShow",
+      "cnCode":"展示",
+      "desc":"必填,请选择是否添加编辑时展示",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"Y,N",
+      "selectValueName":"是,否",
+      "limit":"",
+      "limitParam":"",
+      "limitErrInfo":"模板格式错误",
+      "show": true
+    },
+    {
+      "code":"specValueType",
+      "cnCode":"值类型",
+      "desc":"必填,请选择值类型",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"1001,2002,3003",
+      "selectValueName":"字符串,整数,金额",
+      "limit":"num",
+      "limitParam":"",
+      "limitErrInfo":"值类型格式错误",
+      "show": true
+    },
+    {
+      "code":"specType",
+      "cnCode":"规格类型",
+      "desc":"必填,请选择规格类型",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"2233,3344",
+      "selectValueName":"input,select",
+      "limit":"num",
+      "limitParam":"",
+      "limitErrInfo":"规格类型错误",
+      "show": true
+    }
+  ,
+    {
+      "code":"listShow",
+      "cnCode":"查询显示",
+      "desc":"必填,请选择查询显示",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"Y,N",
+      "selectValueName":"是,否",
+      "limit":"",
+      "limitParam":"",
+      "limitErrInfo":"规格类型错误",
+      "show": true
+    }
+  ]
+}

+ 52 - 0
java110-interface/src/main/java/com/java110/intf/fee/IFeePrintSpecInnerServiceSMO.java

@@ -0,0 +1,52 @@
+package com.java110.intf;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.feePrintSpec.FeePrintSpecDto;
+import com.java110.po.feePrintSpec.FeePrintSpecPo;
+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 IFeePrintSpecInnerServiceSMO
+ * @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("/feePrintSpecApi")
+public interface IFeePrintSpecInnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveFeePrintSpec", method = RequestMethod.POST)
+    public int saveFeePrintSpec(@RequestBody FeePrintSpecPo feePrintSpecPo);
+
+    @RequestMapping(value = "/updateFeePrintSpec", method = RequestMethod.POST)
+    public int updateFeePrintSpec(@RequestBody FeePrintSpecPo feePrintSpecPo);
+
+    @RequestMapping(value = "/deleteFeePrintSpec", method = RequestMethod.POST)
+    public int deleteFeePrintSpec(@RequestBody FeePrintSpecPo feePrintSpecPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     * @param feePrintSpecDto 数据对象分享
+     * @return FeePrintSpecDto 对象数据
+     */
+    @RequestMapping(value = "/queryFeePrintSpecs", method = RequestMethod.POST)
+    List<FeePrintSpecDto> queryFeePrintSpecs(@RequestBody FeePrintSpecDto feePrintSpecDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param feePrintSpecDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryFeePrintSpecsCount", method = RequestMethod.POST)
+    int queryFeePrintSpecsCount(@RequestBody FeePrintSpecDto feePrintSpecDto);
+}

+ 109 - 0
service-fee/src/main/java/com/java110/fee/api/FeePrintSpecApi.java

@@ -0,0 +1,109 @@
+package com.java110.fee.api;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.dto.feePrintSpec.FeePrintSpecDto;
+import com.java110.fee.bmo.feePrintSpec.IDeleteFeePrintSpecBMO;
+import com.java110.fee.bmo.feePrintSpec.IGetFeePrintSpecBMO;
+import com.java110.fee.bmo.feePrintSpec.ISaveFeePrintSpecBMO;
+import com.java110.fee.bmo.feePrintSpec.IUpdateFeePrintSpecBMO;
+import com.java110.po.feePrintSpec.FeePrintSpecPo;
+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 = "/feePrintSpec")
+public class FeePrintSpecApi {
+
+    @Autowired
+    private ISaveFeePrintSpecBMO saveFeePrintSpecBMOImpl;
+    @Autowired
+    private IUpdateFeePrintSpecBMO updateFeePrintSpecBMOImpl;
+    @Autowired
+    private IDeleteFeePrintSpecBMO deleteFeePrintSpecBMOImpl;
+
+    @Autowired
+    private IGetFeePrintSpecBMO getFeePrintSpecBMOImpl;
+
+    /**
+     * 微信保存消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /feePrintSpec/saveFeePrintSpec
+     * @path /app/feePrintSpec/saveFeePrintSpec
+     */
+    @RequestMapping(value = "/saveFeePrintSpec", method = RequestMethod.POST)
+    public ResponseEntity<String> saveFeePrintSpec(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+        Assert.hasKeyAndValue(reqJson, "content", "请求报文中未包含content");
+        Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd");
+
+
+        FeePrintSpecPo feePrintSpecPo = BeanConvertUtil.covertBean(reqJson, FeePrintSpecPo.class);
+        return saveFeePrintSpecBMOImpl.save(feePrintSpecPo);
+    }
+
+    /**
+     * 微信修改消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /feePrintSpec/updateFeePrintSpec
+     * @path /app/feePrintSpec/updateFeePrintSpec
+     */
+    @RequestMapping(value = "/updateFeePrintSpec", method = RequestMethod.POST)
+    public ResponseEntity<String> updateFeePrintSpec(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+        Assert.hasKeyAndValue(reqJson, "content", "请求报文中未包含content");
+        Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd");
+        Assert.hasKeyAndValue(reqJson, "printId", "printId不能为空");
+
+
+        FeePrintSpecPo feePrintSpecPo = BeanConvertUtil.covertBean(reqJson, FeePrintSpecPo.class);
+        return updateFeePrintSpecBMOImpl.update(feePrintSpecPo);
+    }
+
+    /**
+     * 微信删除消息模板
+     *
+     * @param reqJson
+     * @return
+     * @serviceCode /feePrintSpec/deleteFeePrintSpec
+     * @path /app/feePrintSpec/deleteFeePrintSpec
+     */
+    @RequestMapping(value = "/deleteFeePrintSpec", method = RequestMethod.POST)
+    public ResponseEntity<String> deleteFeePrintSpec(@RequestBody JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
+
+        Assert.hasKeyAndValue(reqJson, "printId", "printId不能为空");
+
+
+        FeePrintSpecPo feePrintSpecPo = BeanConvertUtil.covertBean(reqJson, FeePrintSpecPo.class);
+        return deleteFeePrintSpecBMOImpl.delete(feePrintSpecPo);
+    }
+
+    /**
+     * 微信删除消息模板
+     *
+     * @param communityId 小区ID
+     * @return
+     * @serviceCode /feePrintSpec/queryFeePrintSpec
+     * @path /app/feePrintSpec/queryFeePrintSpec
+     */
+    @RequestMapping(value = "/queryFeePrintSpec", method = RequestMethod.GET)
+    public ResponseEntity<String> queryFeePrintSpec(@RequestParam(value = "communityId") String communityId,
+                                                    @RequestParam(value = "page") int page,
+                                                    @RequestParam(value = "row") int row) {
+        FeePrintSpecDto feePrintSpecDto = new FeePrintSpecDto();
+        feePrintSpecDto.setPage(page);
+        feePrintSpecDto.setRow(row);
+        feePrintSpecDto.setCommunityId(communityId);
+        return getFeePrintSpecBMOImpl.get(feePrintSpecDto);
+    }
+}

+ 19 - 0
service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/IDeleteFeePrintSpecBMO.java

@@ -0,0 +1,19 @@
+package com.java110.fee.bmo.feePrintSpec;
+
+import com.java110.po.feePrintSpec.FeePrintSpecPo;
+import org.springframework.http.ResponseEntity;
+
+public interface IDeleteFeePrintSpecBMO {
+
+
+    /**
+     * 修改打印说明
+     * add by wuxw
+     *
+     * @param feePrintSpecPo
+     * @return
+     */
+    ResponseEntity<String> delete(FeePrintSpecPo feePrintSpecPo);
+
+
+}

+ 19 - 0
service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/IGetFeePrintSpecBMO.java

@@ -0,0 +1,19 @@
+package com.java110.fee.bmo.feePrintSpec;
+
+import com.java110.dto.feePrintSpec.FeePrintSpecDto;
+import org.springframework.http.ResponseEntity;
+
+public interface IGetFeePrintSpecBMO {
+
+
+    /**
+     * 查询打印说明
+     * add by wuxw
+     *
+     * @param feePrintSpecDto
+     * @return
+     */
+    ResponseEntity<String> get(FeePrintSpecDto feePrintSpecDto);
+
+
+}

+ 19 - 0
service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/ISaveFeePrintSpecBMO.java

@@ -0,0 +1,19 @@
+package com.java110.fee.bmo.feePrintSpec;
+
+import com.java110.po.feePrintSpec.FeePrintSpecPo;
+import org.springframework.http.ResponseEntity;
+
+public interface ISaveFeePrintSpecBMO {
+
+
+    /**
+     * 添加打印说明
+     * add by wuxw
+     *
+     * @param feePrintSpecPo
+     * @return
+     */
+    ResponseEntity<String> save(FeePrintSpecPo feePrintSpecPo);
+
+
+}

+ 19 - 0
service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/IUpdateFeePrintSpecBMO.java

@@ -0,0 +1,19 @@
+package com.java110.fee.bmo.feePrintSpec;
+
+import com.java110.po.feePrintSpec.FeePrintSpecPo;
+import org.springframework.http.ResponseEntity;
+
+public interface IUpdateFeePrintSpecBMO {
+
+
+    /**
+     * 修改打印说明
+     * add by wuxw
+     *
+     * @param feePrintSpecPo
+     * @return
+     */
+    ResponseEntity<String> update(FeePrintSpecPo feePrintSpecPo);
+
+
+}

+ 34 - 0
service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/impl/DeleteFeePrintSpecBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.fee.bmo.feePrintSpec.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.fee.bmo.feePrintSpec.IDeleteFeePrintSpecBMO;
+import com.java110.intf.IFeePrintSpecInnerServiceSMO;
+import com.java110.po.feePrintSpec.FeePrintSpecPo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("deleteFeePrintSpecBMOImpl")
+public class DeleteFeePrintSpecBMOImpl implements IDeleteFeePrintSpecBMO {
+
+    @Autowired
+    private IFeePrintSpecInnerServiceSMO feePrintSpecInnerServiceSMOImpl;
+
+    /**
+     * @param feePrintSpecPo 数据
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> delete(FeePrintSpecPo feePrintSpecPo) {
+
+        int flag = feePrintSpecInnerServiceSMOImpl.deleteFeePrintSpec(feePrintSpecPo);
+
+        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/feePrintSpec/impl/GetFeePrintSpecBMOImpl.java

@@ -0,0 +1,44 @@
+package com.java110.fee.bmo.feePrintSpec.impl;
+
+import com.java110.dto.feePrintSpec.FeePrintSpecDto;
+import com.java110.fee.bmo.feePrintSpec.IGetFeePrintSpecBMO;
+import com.java110.intf.IFeePrintSpecInnerServiceSMO;
+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("getFeePrintSpecBMOImpl")
+public class GetFeePrintSpecBMOImpl implements IGetFeePrintSpecBMO {
+
+    @Autowired
+    private IFeePrintSpecInnerServiceSMO feePrintSpecInnerServiceSMOImpl;
+
+    /**
+     * @param feePrintSpecDto
+     * @return 订单服务能够接受的报文
+     */
+    public ResponseEntity<String> get(FeePrintSpecDto feePrintSpecDto) {
+
+
+        int count = feePrintSpecInnerServiceSMOImpl.queryFeePrintSpecsCount(feePrintSpecDto);
+
+        List<FeePrintSpecDto> feePrintSpecDtos = null;
+        if (count > 0) {
+            feePrintSpecDtos = feePrintSpecInnerServiceSMOImpl.queryFeePrintSpecs(feePrintSpecDto);
+        } else {
+            feePrintSpecDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) feePrintSpecDto.getRow()), count, feePrintSpecDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        return responseEntity;
+    }
+
+}

+ 38 - 0
service-fee/src/main/java/com/java110/fee/bmo/feePrintSpec/impl/SaveFeePrintSpecBMOImpl.java

@@ -0,0 +1,38 @@
+package com.java110.fee.bmo.feePrintSpec.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.fee.bmo.feePrintSpec.ISaveFeePrintSpecBMO;
+import com.java110.intf.IFeePrintSpecInnerServiceSMO;
+import com.java110.po.feePrintSpec.FeePrintSpecPo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("saveFeePrintSpecBMOImpl")
+public class SaveFeePrintSpecBMOImpl implements ISaveFeePrintSpecBMO {
+
+    @Autowired
+    private IFeePrintSpecInnerServiceSMO feePrintSpecInnerServiceSMOImpl;
+
+    /**
+     * 添加小区信息
+     *
+     * @param feePrintSpecPo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> save(FeePrintSpecPo feePrintSpecPo) {
+
+        feePrintSpecPo.setPrintId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_printId));
+        int flag = feePrintSpecInnerServiceSMOImpl.saveFeePrintSpec(feePrintSpecPo);
+
+        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/feePrintSpec/impl/UpdateFeePrintSpecBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.fee.bmo.feePrintSpec.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.fee.bmo.feePrintSpec.IUpdateFeePrintSpecBMO;
+import com.java110.intf.IFeePrintSpecInnerServiceSMO;
+import com.java110.po.feePrintSpec.FeePrintSpecPo;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("updateFeePrintSpecBMOImpl")
+public class UpdateFeePrintSpecBMOImpl implements IUpdateFeePrintSpecBMO {
+
+    @Autowired
+    private IFeePrintSpecInnerServiceSMO feePrintSpecInnerServiceSMOImpl;
+
+    /**
+     * @param feePrintSpecPo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> update(FeePrintSpecPo feePrintSpecPo) {
+
+        int flag = feePrintSpecInnerServiceSMOImpl.updateFeePrintSpec(feePrintSpecPo);
+
+        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/IFeePrintSpecServiceDao.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 IFeePrintSpecServiceDao {
+
+
+    /**
+     * 保存 打印说明信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    void saveFeePrintSpecInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询打印说明信息(instance过程)
+     * 根据bId 查询打印说明信息
+     * @param info bId 信息
+     * @return 打印说明信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getFeePrintSpecInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改打印说明信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    void updateFeePrintSpecInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询打印说明总数
+     *
+     * @param info 打印说明信息
+     * @return 打印说明数量
+     */
+    int queryFeePrintSpecsCount(Map info);
+
+}

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

+ 83 - 0
service-fee/src/main/java/com/java110/fee/smo/impl/FeePrintSpecInnerServiceSMOImpl.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.feePrintSpec.FeePrintSpecDto;
+import com.java110.fee.dao.IFeePrintSpecServiceDao;
+import com.java110.intf.IFeePrintSpecInnerServiceSMO;
+import com.java110.po.feePrintSpec.FeePrintSpecPo;
+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 FeePrintSpecInnerServiceSMOImpl extends BaseServiceSMO implements IFeePrintSpecInnerServiceSMO {
+
+    @Autowired
+    private IFeePrintSpecServiceDao feePrintSpecServiceDaoImpl;
+
+
+    @Override
+    public int saveFeePrintSpec(@RequestBody FeePrintSpecPo feePrintSpecPo) {
+        int saveFlag = 1;
+        feePrintSpecServiceDaoImpl.saveFeePrintSpecInfo(BeanConvertUtil.beanCovertMap(feePrintSpecPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int updateFeePrintSpec(@RequestBody FeePrintSpecPo feePrintSpecPo) {
+        int saveFlag = 1;
+        feePrintSpecServiceDaoImpl.updateFeePrintSpecInfo(BeanConvertUtil.beanCovertMap(feePrintSpecPo));
+        return saveFlag;
+    }
+
+    @Override
+    public int deleteFeePrintSpec(@RequestBody FeePrintSpecPo feePrintSpecPo) {
+        int saveFlag = 1;
+        feePrintSpecPo.setStatusCd("1");
+        feePrintSpecServiceDaoImpl.updateFeePrintSpecInfo(BeanConvertUtil.beanCovertMap(feePrintSpecPo));
+        return saveFlag;
+    }
+
+    @Override
+    public List<FeePrintSpecDto> queryFeePrintSpecs(@RequestBody FeePrintSpecDto feePrintSpecDto) {
+
+        //校验是否传了 分页信息
+
+        int page = feePrintSpecDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            feePrintSpecDto.setPage((page - 1) * feePrintSpecDto.getRow());
+        }
+
+        List<FeePrintSpecDto> feePrintSpecs = BeanConvertUtil.covertBeanList(feePrintSpecServiceDaoImpl.getFeePrintSpecInfo(BeanConvertUtil.beanCovertMap(feePrintSpecDto)), FeePrintSpecDto.class);
+
+        return feePrintSpecs;
+    }
+
+
+    @Override
+    public int queryFeePrintSpecsCount(@RequestBody FeePrintSpecDto feePrintSpecDto) {
+        return feePrintSpecServiceDaoImpl.queryFeePrintSpecsCount(BeanConvertUtil.beanCovertMap(feePrintSpecDto));
+    }
+
+    public IFeePrintSpecServiceDao getFeePrintSpecServiceDaoImpl() {
+        return feePrintSpecServiceDaoImpl;
+    }
+
+    public void setFeePrintSpecServiceDaoImpl(IFeePrintSpecServiceDao feePrintSpecServiceDaoImpl) {
+        this.feePrintSpecServiceDaoImpl = feePrintSpecServiceDaoImpl;
+    }
+}