java110 лет назад: 5
Родитель
Сommit
988624e3f6
26 измененных файлов с 335609 добавлено и 175975 удалено
  1. 3 1
      docs/db/sql_hc_community20200521.sql
  2. 0 175704
      docs/db/sql_TT20200521.sql
  3. 334395 0
      docs/db/tt.sql
  4. 76 0
      java110-bean/src/main/java/com/java110/dto/contractType/ContractTypeDto.java
  5. 53 0
      java110-bean/src/main/java/com/java110/po/contractType/ContractTypePo.java
  6. 2 0
      java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java
  7. 106 0
      java110-db/src/main/resources/mapper/store/ContractTypeServiceDaoImplMapper.xml
  8. 8 0
      java110-db/src/main/resources/mapper/user/RentingPoolServiceDaoImplMapper.xml
  9. 11 74
      java110-generator/src/main/resources/newBack/template_1.json
  10. 91 0
      java110-generator/src/main/resources/newBack/template_contract.json
  11. 42 185
      java110-generator/src/main/resources/web/template_1.json
  12. 213 0
      java110-generator/src/main/resources/web/template_contract.json
  13. 52 0
      java110-interface/src/main/java/com/java110/intf/store/IContractTypeInnerServiceSMO.java
  14. 89 0
      service-store/src/main/java/com/java110/store/api/ContractApi.java
  15. 17 0
      service-store/src/main/java/com/java110/store/bmo/contractType/IDeleteContractTypeBMO.java
  16. 19 0
      service-store/src/main/java/com/java110/store/bmo/contractType/IGetContractTypeBMO.java
  17. 19 0
      service-store/src/main/java/com/java110/store/bmo/contractType/ISaveContractTypeBMO.java
  18. 19 0
      service-store/src/main/java/com/java110/store/bmo/contractType/IUpdateContractTypeBMO.java
  19. 34 0
      service-store/src/main/java/com/java110/store/bmo/contractType/impl/DeleteContractTypeBMOImpl.java
  20. 44 0
      service-store/src/main/java/com/java110/store/bmo/contractType/impl/GetContractTypeBMOImpl.java
  21. 38 0
      service-store/src/main/java/com/java110/store/bmo/contractType/impl/SaveContractTypeBMOImpl.java
  22. 34 0
      service-store/src/main/java/com/java110/store/bmo/contractType/impl/UpdateContractTypeBMOImpl.java
  23. 61 0
      service-store/src/main/java/com/java110/store/dao/IContractTypeServiceDao.java
  24. 97 0
      service-store/src/main/java/com/java110/store/dao/impl/ContractTypeServiceDaoImpl.java
  25. 82 0
      service-store/src/main/java/com/java110/store/smo/impl/ContractTypeInnerServiceSMOImpl.java
  26. 4 11
      service-user/src/main/java/com/java110/user/api/RentingApi.java

+ 3 - 1
docs/db/sql_hc_community20200521.sql

@@ -1,4 +1,4 @@
-it/*
+/*
 Navicat MySQL Data Transfer
 
 Source Server         : hc_demo
@@ -15,6 +15,8 @@ Date: 2020-05-21 16:03:57
 
 SET FOREIGN_KEY_CHECKS=0;
 
+use hc_community;
+
 -- ----------------------------
 -- Table structure for ACT_EVT_LOG
 -- ----------------------------

Разница между файлами не показана из-за своего большого размера
+ 0 - 175704
docs/db/sql_TT20200521.sql


Разница между файлами не показана из-за своего большого размера
+ 334395 - 0
docs/db/tt.sql


+ 76 - 0
java110-bean/src/main/java/com/java110/dto/contractType/ContractTypeDto.java

@@ -0,0 +1,76 @@
+package com.java110.dto.contractType;
+
+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 ContractTypeDto extends PageDto implements Serializable {
+
+    private String audit;
+private String typeName;
+private String remark;
+private String storeId;
+private String contractTypeId;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getAudit() {
+        return audit;
+    }
+public void setAudit(String audit) {
+        this.audit = audit;
+    }
+public String getTypeName() {
+        return typeName;
+    }
+public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getStoreId() {
+        return storeId;
+    }
+public void setStoreId(String storeId) {
+        this.storeId = storeId;
+    }
+public String getContractTypeId() {
+        return contractTypeId;
+    }
+public void setContractTypeId(String contractTypeId) {
+        this.contractTypeId = contractTypeId;
+    }
+
+
+    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/contractType/ContractTypePo.java

@@ -0,0 +1,53 @@
+package com.java110.po.contractType;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ContractTypePo implements Serializable {
+
+    private String audit;
+private String typeName;
+private String remark;
+private String statusCd = "0";
+private String storeId;
+private String contractTypeId;
+public String getAudit() {
+        return audit;
+    }
+public void setAudit(String audit) {
+        this.audit = audit;
+    }
+public String getTypeName() {
+        return typeName;
+    }
+public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
+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 getStoreId() {
+        return storeId;
+    }
+public void setStoreId(String storeId) {
+        this.storeId = storeId;
+    }
+public String getContractTypeId() {
+        return contractTypeId;
+    }
+public void setContractTypeId(String contractTypeId) {
+        this.contractTypeId = contractTypeId;
+    }
+
+
+
+}

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

@@ -146,6 +146,8 @@ public class GenerateCodeFactory {
     public static final String CODE_PREFIX_formulaId = "79";
     public static final String CODE_PREFIX_appointmentId = "80";
     public static final String CODE_PREFIX_contractId = "81";
+    public static final String CODE_PREFIX_contractTypeId = "81";
+
 
 
     /**

+ 106 - 0
java110-db/src/main/resources/mapper/store/ContractTypeServiceDaoImplMapper.xml

@@ -0,0 +1,106 @@
+<?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="contractTypeServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存合同类型信息 add by wuxw 2018-07-03 -->
+    <insert id="saveContractTypeInfo" parameterType="Map">
+        insert into contract_type(
+audit,type_name,remark,store_id,contract_type_id
+) values (
+#{audit},#{typeName},#{remark},#{storeId},#{contractTypeId}
+)
+    </insert>
+
+
+
+    <!-- 查询合同类型信息 add by wuxw 2018-07-03 -->
+    <select id="getContractTypeInfo" parameterType="Map" resultType="Map">
+        select  t.audit,t.type_name,t.type_name typeName,t.remark,t.status_cd,t.status_cd statusCd,t.store_id,t.store_id storeId,t.contract_type_id,t.contract_type_id contractTypeId 
+from contract_type t 
+where 1 =1 
+<if test="audit !=null and audit != ''">
+   and t.audit= #{audit}
+</if> 
+<if test="typeName !=null and typeName != ''">
+   and t.type_name= #{typeName}
+</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="storeId !=null and storeId != ''">
+   and t.store_id= #{storeId}
+</if> 
+<if test="contractTypeId !=null and contractTypeId != ''">
+   and t.contract_type_id= #{contractTypeId}
+</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="updateContractTypeInfo" parameterType="Map">
+        update  contract_type t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="audit !=null and audit != ''">
+, t.audit= #{audit}
+</if> 
+<if test="typeName !=null and typeName != ''">
+, t.type_name= #{typeName}
+</if> 
+<if test="remark !=null and remark != ''">
+, t.remark= #{remark}
+</if> 
+<if test="storeId !=null and storeId != ''">
+, t.store_id= #{storeId}
+</if> 
+ where 1=1 <if test="contractTypeId !=null and contractTypeId != ''">
+and t.contract_type_id= #{contractTypeId}
+</if> 
+
+    </update>
+
+    <!-- 查询合同类型数量 add by wuxw 2018-07-03 -->
+     <select id="queryContractTypesCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from contract_type t 
+where 1 =1 
+<if test="audit !=null and audit != ''">
+   and t.audit= #{audit}
+</if> 
+<if test="typeName !=null and typeName != ''">
+   and t.type_name= #{typeName}
+</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="storeId !=null and storeId != ''">
+   and t.store_id= #{storeId}
+</if> 
+<if test="contractTypeId !=null and contractTypeId != ''">
+   and t.contract_type_id= #{contractTypeId}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 8 - 0
java110-db/src/main/resources/mapper/user/RentingPoolServiceDaoImplMapper.xml

@@ -69,6 +69,10 @@
         <if test="state !=null and state != ''">
             and t.state= #{state}
         </if>
+
+        <if test="rentingType !=null and rentingType != ''">
+            and rc.renting_type= #{rentingType}
+        </if>
         <if test="states !=null ">
             and t.state in
             <foreach collection="states" item="item" index="index" open="(" close=")" separator=",">
@@ -146,6 +150,7 @@
     <select id="queryRentingPoolsCount" parameterType="Map" resultType="Map">
         select count(1) count
         from renting_pool t
+        left join renting_config rc on t.renting_config_id = rc.renting_config_id and rc.status_cd = '0'
         where 1 =1
         <if test="latitude !=null and latitude != ''">
             and t.latitude= #{latitude}
@@ -192,6 +197,9 @@
         <if test="longitude !=null and longitude != ''">
             and t.longitude= #{longitude}
         </if>
+        <if test="rentingType !=null and rentingType != ''">
+            and rc.renting_type= #{rentingType}
+        </if>
 
 
     </select>

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

@@ -1,91 +1,28 @@
 {
   "autoMove": true,
-  "id": "contractId",
-  "name": "contract",
-  "desc": "合同管理",
+  "id": "contractTypeId",
+  "name": "contractType",
+  "desc": "合同类型",
   "shareParam": "storeId",
   "shareColumn": "store_id",
   "shareName": "store",
-  "tableName": "contract",
+  "tableName": "contract_type",
   "param": {
-    "contractId": "contract_id",
-    "contractCode": "contract_code",
-    "contractName": "contract_name",
-    "contractType": "contract_type",
-    "objType": "obj_type",
-    "objId": "obj_id",
-    "partyA": "party_a",
-    "partyB": "party_b",
-    "aContacts": "a_contacts",
-    "aLink": "a_link",
-    "bContacts": "b_contacts",
-    "bLink": "b_link",
-    "operator": "operator",
-    "operatorLink": "operator_link",
-    "amount": "amount",
-    "startTime": "start_time",
-    "endTime": "end_time",
-    "signingTime": "signing_time",
+    "contractTypeId": "contract_type_id",
+    "typeName": "type_name",
+    "audit": "audit",
     "storeId": "store_id",
-    "state": "state",
+    "remark": "remark",
     "statusCd": "status_cd"
   },
   "required": [
     {
-      "code": "contractCode",
-      "msg": "合同编码不能为空"
-    },
-    {
-      "code": "contractName",
-      "msg": "合同名称不能为空"
-    },
-    {
-      "code": "contractType",
+      "code": "typeName",
       "msg": "合同类型不能为空"
     },
     {
-      "code": "partyA",
-      "msg": "甲方不能为空"
-    },
-    {
-      "code": "partyB",
-      "msg": "乙方不能为空"
-    },
-    {
-      "code": "aContacts",
-      "msg": "甲方联系人不能为空"
-    },
-    {
-      "code": "aLink",
-      "msg": "甲方联系电话不能为空"
-    },
-    {
-      "code": "bContacts",
-      "msg": "乙方联系人不能为空"
-    },
-    {
-      "code": "bLink",
-      "msg": "乙方联系电话不能为空"
-    },
-    {
-      "code": "operator",
-      "msg": "经办人不能为空"
-    },
-    {
-      "code": "operatorLink",
-      "msg": "经办人联系电话不能为空"
-    },
-    {
-      "code": "startTime",
-      "msg": "开始时间不能为空"
-    },
-    {
-      "code": "endTime",
-      "msg": "结束时间不能为空"
-    },
-    {
-      "code": "signingTime",
-      "msg": "签订时间不能为空"
+      "code": "audit",
+      "msg": "审核不能为空"
     }
   ]
 }

+ 91 - 0
java110-generator/src/main/resources/newBack/template_contract.json

@@ -0,0 +1,91 @@
+{
+  "autoMove": true,
+  "id": "contractId",
+  "name": "contract",
+  "desc": "合同管理",
+  "shareParam": "storeId",
+  "shareColumn": "store_id",
+  "shareName": "store",
+  "tableName": "contract",
+  "param": {
+    "contractId": "contract_id",
+    "contractCode": "contract_code",
+    "contractName": "contract_name",
+    "contractType": "contract_type",
+    "objType": "obj_type",
+    "objId": "obj_id",
+    "partyA": "party_a",
+    "partyB": "party_b",
+    "aContacts": "a_contacts",
+    "aLink": "a_link",
+    "bContacts": "b_contacts",
+    "bLink": "b_link",
+    "operator": "operator",
+    "operatorLink": "operator_link",
+    "amount": "amount",
+    "startTime": "start_time",
+    "endTime": "end_time",
+    "signingTime": "signing_time",
+    "storeId": "store_id",
+    "state": "state",
+    "statusCd": "status_cd"
+  },
+  "required": [
+    {
+      "code": "contractCode",
+      "msg": "合同编码不能为空"
+    },
+    {
+      "code": "contractName",
+      "msg": "合同名称不能为空"
+    },
+    {
+      "code": "contractType",
+      "msg": "合同类型不能为空"
+    },
+    {
+      "code": "partyA",
+      "msg": "甲方不能为空"
+    },
+    {
+      "code": "partyB",
+      "msg": "乙方不能为空"
+    },
+    {
+      "code": "aContacts",
+      "msg": "甲方联系人不能为空"
+    },
+    {
+      "code": "aLink",
+      "msg": "甲方联系电话不能为空"
+    },
+    {
+      "code": "bContacts",
+      "msg": "乙方联系人不能为空"
+    },
+    {
+      "code": "bLink",
+      "msg": "乙方联系电话不能为空"
+    },
+    {
+      "code": "operator",
+      "msg": "经办人不能为空"
+    },
+    {
+      "code": "operatorLink",
+      "msg": "经办人联系电话不能为空"
+    },
+    {
+      "code": "startTime",
+      "msg": "开始时间不能为空"
+    },
+    {
+      "code": "endTime",
+      "msg": "结束时间不能为空"
+    },
+    {
+      "code": "signingTime",
+      "msg": "签订时间不能为空"
+    }
+  ]
+}

+ 42 - 185
java110-generator/src/main/resources/web/template_1.json

@@ -1,213 +1,70 @@
 {
-  "templateName":"合同信息",
+  "templateName": "合同类型",
   "directories": "admin",
-  "templateCode":"contract",
-  "templateKey":"contractId",
-  "templateKeyName":"合同ID",
-  "searchCode": "contractId",
-  "searchName": "合同ID",
+  "templateCode": "contractType",
+  "templateKey": "contractTypeId",
+  "templateKeyName": "类型ID",
+  "searchCode": "contractTypeId",
+  "searchName": "类型ID",
   "conditions": [
     {
-      "name": "合同名称",
+      "name": "类型名称",
       "inputType": "input",
-      "code": "contractName",
+      "code": "typeName",
       "whereCondition": "equal"
     },
     {
-      "name": "合同编号",
-      "inputType": "input",
-      "code": "contractCode",
+      "name": "审核",
+      "inputType": "select",
+      "selectValue": "1001,2002,3003,4004",
+      "selectValueName": "物业审核,不审核,运营审核,代理商审核",
+      "code": "audit",
       "whereCondition": "equal"
     },
     {
-      "name": "合同类型",
+      "name": "类型编码",
       "inputType": "input",
-      "code": "contractType",
+      "code": "contractTypeId",
       "whereCondition": "equal"
     }
   ],
-  "columns":[
-    {
-      "code": "contractName",
-      "cnCode":"合同名称",
-      "desc":"必填,请填写合同名称",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"maxLength",
-      "limitParam":"200",
-      "limitErrInfo":"合同名称不能超过64位",
-      "show": true
-    },
+  "columns": [
     {
-      "code": "contractCode",
-      "cnCode":"合同编号",
-      "desc":"选填,请填写合同编号",
-      "required":true,
-      "hasDefaultValue":false,
+      "code": "typeName",
+      "cnCode": "类型名称",
+      "desc": "必填,请填写合同类型名称",
+      "required": true,
+      "hasDefaultValue": false,
       "inputType": "input",
-      "limit":"maxLength",
-      "limitParam":"30",
-      "limitErrInfo":"合同编号错误",
+      "limit": "maxLength",
+      "limitParam": "200",
+      "limitErrInfo": "类型名称不能超过64位",
       "show": true
     },
     {
-      "code": "contractType",
-      "cnCode":"合同类型",
-      "desc":"必填,请选择合同类型",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "select",
-      "selectValue":"10001,10002",
-      "selectValueName":"小区文化,其他",
-      "limit":"num",
-      "limitParam":"",
-      "limitErrInfo":"合同类型格式错误",
-      "show": true
-    },
-    {
-      "code": "partyA",
-      "cnCode":"甲方",
-      "desc":"必填,请填写甲方",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"maxLength",
-      "limitParam":"200",
-      "limitErrInfo":"甲方名称太长",
+      "code": "audit",
+      "cnCode": "是否审核",
+      "desc": "必须,请选择是否审核",
+      "required": true,
+      "hasDefaultValue": false,
+      "selectValue": "1001,2002,3003,4004",
+      "selectValueName": "物业审核,不审核,运营审核,代理商审核",
+      "limit": "num",
+      "limitParam": "",
+      "limitErrInfo": "是否审核格式错误",
       "show": true
     },
     {
-      "code": "partyB",
-      "cnCode":"乙方",
-      "desc":"必填,请填写乙方",
-      "required":true,
-      "hasDefaultValue":false,
+      "code": "remark",
+      "cnCode": "描述",
+      "desc": "选填,请填写描述",
+      "required": false,
+      "hasDefaultValue": false,
       "inputType": "input",
-      "limit":"maxLength",
-      "limitParam":"200",
-      "limitErrInfo":"乙方名称太长",
+      "limit": "maxLength",
+      "limitParam": "200",
+      "limitErrInfo": "描述超过200位",
       "show": true
-    },
-    {
-      "code": "aContacts",
-      "cnCode":"甲方联系人",
-      "desc":"必填,请填写甲方联系人",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"maxLength",
-      "limitParam":"64",
-      "limitErrInfo":"甲方联系人长度超过64位",
-      "show": false
-    },
-    {
-      "code": "bContacts",
-      "cnCode":"乙方联系人",
-      "desc":"必填,请填写甲方联系人",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"maxLength",
-      "limitParam":"64",
-      "limitErrInfo":"甲方联系人长度超过64位",
-      "show": false
-    },
-    {
-      "code": "aLink",
-      "cnCode":"甲方联系电话",
-      "desc":"必填,请填写甲方联系电话",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"phone",
-      "limitParam":"",
-      "limitErrInfo":"甲方联系电话错误",
-      "show": false
-    },
-    {
-      "code": "bLink",
-      "cnCode":"乙方联系电话",
-      "desc":"必填,请填写乙方联系电话",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"phone",
-      "limitParam":"",
-      "limitErrInfo":"乙方联系电话错误",
-      "show": false
-    },
-    {
-      "code": "operator",
-      "cnCode":"经办人",
-      "desc":"必填,请填写经办人",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"maxLength",
-      "limitParam":"64",
-      "limitErrInfo":"经办人超过64位",
-      "show": true
-    },
-    {
-      "code": "operatorLink",
-      "cnCode":"联系电话",
-      "desc":"必填,请填写经办人联系电话",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"phone",
-      "limitParam":"",
-      "limitErrInfo":"经办人联系电话格式错误",
-      "show": false
-    },
-    {
-      "code": "amount",
-      "cnCode":"合同金额",
-      "desc":"必填,请填写合同金额",
-      "required":false,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"money",
-      "limitParam":"",
-      "limitErrInfo":"合同金额格式错误,如1.50",
-      "show": true
-    },
-    {
-      "code": "startTime",
-      "cnCode":"开始时间",
-      "desc":"必填,请填写合同开始时间",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"dateTime",
-      "limitParam":"",
-      "limitErrInfo":"合同开始时间格式错误",
-      "show": true
-    },
-    {
-      "code": "endTime",
-      "cnCode":"结束时间",
-      "desc":"必填,请填写合同结束时间",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"dateTime",
-      "limitParam":"",
-      "limitErrInfo":"合同结束时间格式错误",
-      "show": true
-    },
-    {
-      "code": "signingTime",
-      "cnCode":"签订时间",
-      "desc":"选填,请填写合同签订时间",
-      "required":true,
-      "hasDefaultValue":false,
-      "inputType": "input",
-      "limit":"dateTime",
-      "limitParam":"",
-      "limitErrInfo":"合同签订时间格式错误",
-      "show": false
     }
   ]
 }

+ 213 - 0
java110-generator/src/main/resources/web/template_contract.json

@@ -0,0 +1,213 @@
+{
+  "templateName":"合同信息",
+  "directories": "admin",
+  "templateCode":"contract",
+  "templateKey":"contractId",
+  "templateKeyName":"合同ID",
+  "searchCode": "contractId",
+  "searchName": "合同ID",
+  "conditions": [
+    {
+      "name": "合同名称",
+      "inputType": "input",
+      "code": "contractName",
+      "whereCondition": "equal"
+    },
+    {
+      "name": "合同编号",
+      "inputType": "input",
+      "code": "contractCode",
+      "whereCondition": "equal"
+    },
+    {
+      "name": "合同类型",
+      "inputType": "input",
+      "code": "contractType",
+      "whereCondition": "equal"
+    }
+  ],
+  "columns":[
+    {
+      "code": "contractName",
+      "cnCode":"合同名称",
+      "desc":"必填,请填写合同名称",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"maxLength",
+      "limitParam":"200",
+      "limitErrInfo":"合同名称不能超过64位",
+      "show": true
+    },
+    {
+      "code": "contractCode",
+      "cnCode":"合同编号",
+      "desc":"选填,请填写合同编号",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"maxLength",
+      "limitParam":"30",
+      "limitErrInfo":"合同编号错误",
+      "show": true
+    },
+    {
+      "code": "contractType",
+      "cnCode":"合同类型",
+      "desc":"必填,请选择合同类型",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "select",
+      "selectValue":"10001,10002",
+      "selectValueName":"小区文化,其他",
+      "limit":"num",
+      "limitParam":"",
+      "limitErrInfo":"合同类型格式错误",
+      "show": true
+    },
+    {
+      "code": "partyA",
+      "cnCode":"甲方",
+      "desc":"必填,请填写甲方",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"maxLength",
+      "limitParam":"200",
+      "limitErrInfo":"甲方名称太长",
+      "show": true
+    },
+    {
+      "code": "partyB",
+      "cnCode":"乙方",
+      "desc":"必填,请填写乙方",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"maxLength",
+      "limitParam":"200",
+      "limitErrInfo":"乙方名称太长",
+      "show": true
+    },
+    {
+      "code": "aContacts",
+      "cnCode":"甲方联系人",
+      "desc":"必填,请填写甲方联系人",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"maxLength",
+      "limitParam":"64",
+      "limitErrInfo":"甲方联系人长度超过64位",
+      "show": false
+    },
+    {
+      "code": "bContacts",
+      "cnCode":"乙方联系人",
+      "desc":"必填,请填写甲方联系人",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"maxLength",
+      "limitParam":"64",
+      "limitErrInfo":"甲方联系人长度超过64位",
+      "show": false
+    },
+    {
+      "code": "aLink",
+      "cnCode":"甲方联系电话",
+      "desc":"必填,请填写甲方联系电话",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"phone",
+      "limitParam":"",
+      "limitErrInfo":"甲方联系电话错误",
+      "show": false
+    },
+    {
+      "code": "bLink",
+      "cnCode":"乙方联系电话",
+      "desc":"必填,请填写乙方联系电话",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"phone",
+      "limitParam":"",
+      "limitErrInfo":"乙方联系电话错误",
+      "show": false
+    },
+    {
+      "code": "operator",
+      "cnCode":"经办人",
+      "desc":"必填,请填写经办人",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"maxLength",
+      "limitParam":"64",
+      "limitErrInfo":"经办人超过64位",
+      "show": true
+    },
+    {
+      "code": "operatorLink",
+      "cnCode":"联系电话",
+      "desc":"必填,请填写经办人联系电话",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"phone",
+      "limitParam":"",
+      "limitErrInfo":"经办人联系电话格式错误",
+      "show": false
+    },
+    {
+      "code": "amount",
+      "cnCode":"合同金额",
+      "desc":"必填,请填写合同金额",
+      "required":false,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"money",
+      "limitParam":"",
+      "limitErrInfo":"合同金额格式错误,如1.50",
+      "show": true
+    },
+    {
+      "code": "startTime",
+      "cnCode":"开始时间",
+      "desc":"必填,请填写合同开始时间",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"dateTime",
+      "limitParam":"",
+      "limitErrInfo":"合同开始时间格式错误",
+      "show": true
+    },
+    {
+      "code": "endTime",
+      "cnCode":"结束时间",
+      "desc":"必填,请填写合同结束时间",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"dateTime",
+      "limitParam":"",
+      "limitErrInfo":"合同结束时间格式错误",
+      "show": true
+    },
+    {
+      "code": "signingTime",
+      "cnCode":"签订时间",
+      "desc":"选填,请填写合同签订时间",
+      "required":true,
+      "hasDefaultValue":false,
+      "inputType": "input",
+      "limit":"dateTime",
+      "limitParam":"",
+      "limitErrInfo":"合同签订时间格式错误",
+      "show": false
+    }
+  ]
+}

+ 52 - 0
java110-interface/src/main/java/com/java110/intf/store/IContractTypeInnerServiceSMO.java

@@ -0,0 +1,52 @@
+package com.java110.intf.store;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.contractType.ContractTypeDto;
+import com.java110.po.contractType.ContractTypePo;
+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 IContractTypeInnerServiceSMO
+ * @Description 合同类型接口类
+ * @Author wuxw
+ * @Date 2019/4/24 9:04
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+@FeignClient(name = "store-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/contractTypeApi")
+public interface IContractTypeInnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveContractType", method = RequestMethod.POST)
+    public int saveContractType(@RequestBody ContractTypePo contractTypePo);
+
+    @RequestMapping(value = "/updateContractType", method = RequestMethod.POST)
+    public int updateContractType(@RequestBody ContractTypePo contractTypePo);
+
+    @RequestMapping(value = "/deleteContractType", method = RequestMethod.POST)
+    public int deleteContractType(@RequestBody ContractTypePo contractTypePo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     * @param contractTypeDto 数据对象分享
+     * @return ContractTypeDto 对象数据
+     */
+    @RequestMapping(value = "/queryContractTypes", method = RequestMethod.POST)
+    List<ContractTypeDto> queryContractTypes(@RequestBody ContractTypeDto contractTypeDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param contractTypeDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryContractTypesCount", method = RequestMethod.POST)
+    int queryContractTypesCount(@RequestBody ContractTypeDto contractTypeDto);
+}

+ 89 - 0
service-store/src/main/java/com/java110/store/api/ContractApi.java

@@ -2,11 +2,17 @@ package com.java110.store.api;
 
 import com.alibaba.fastjson.JSONObject;
 import com.java110.dto.contract.ContractDto;
+import com.java110.dto.contractType.ContractTypeDto;
 import com.java110.po.contract.ContractPo;
+import com.java110.po.contractType.ContractTypePo;
 import com.java110.store.bmo.contract.IDeleteContractBMO;
 import com.java110.store.bmo.contract.IGetContractBMO;
 import com.java110.store.bmo.contract.ISaveContractBMO;
 import com.java110.store.bmo.contract.IUpdateContractBMO;
+import com.java110.store.bmo.contractType.IDeleteContractTypeBMO;
+import com.java110.store.bmo.contractType.IGetContractTypeBMO;
+import com.java110.store.bmo.contractType.ISaveContractTypeBMO;
+import com.java110.store.bmo.contractType.IUpdateContractTypeBMO;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -28,6 +34,16 @@ public class ContractApi {
     @Autowired
     private IGetContractBMO getContractBMOImpl;
 
+    @Autowired
+    private ISaveContractTypeBMO saveContractTypeBMOImpl;
+    @Autowired
+    private IUpdateContractTypeBMO updateContractTypeBMOImpl;
+    @Autowired
+    private IDeleteContractTypeBMO deleteContractTypeBMOImpl;
+
+    @Autowired
+    private IGetContractTypeBMO getContractTypeBMOImpl;
+
     /**
      * 微信保存消息模板
      *
@@ -128,4 +144,77 @@ public class ContractApi {
         contractDto.setStoreId(storeId);
         return getContractBMOImpl.get(contractDto);
     }
+
+    /**
+     * 微信保存消息模板
+     * @serviceCode /contract/saveContractType
+     * @path /app/contract/saveContractType
+     * @param reqJson
+     * @return
+     */
+    @RequestMapping(value = "/saveContractType", method = RequestMethod.POST)
+    public ResponseEntity<String> saveContractType(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "typeName", "请求报文中未包含typeName");
+        Assert.hasKeyAndValue(reqJson, "audit", "请求报文中未包含audit");
+
+
+        ContractTypePo contractTypePo = BeanConvertUtil.covertBean(reqJson, ContractTypePo.class);
+        return saveContractTypeBMOImpl.save(contractTypePo);
+    }
+
+    /**
+     * 微信修改消息模板
+     * @serviceCode /contract/updateContractType
+     * @path /app/contract/updateContractType
+     * @param reqJson
+     * @return
+     */
+    @RequestMapping(value = "/updateContractType", method = RequestMethod.POST)
+    public ResponseEntity<String> updateContractType(@RequestBody JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "typeName", "请求报文中未包含typeName");
+        Assert.hasKeyAndValue(reqJson, "audit", "请求报文中未包含audit");
+        Assert.hasKeyAndValue(reqJson, "contractTypeId", "contractTypeId不能为空");
+
+
+        ContractTypePo contractTypePo = BeanConvertUtil.covertBean(reqJson, ContractTypePo.class);
+        return updateContractTypeBMOImpl.update(contractTypePo);
+    }
+
+    /**
+     * 微信删除消息模板
+     * @serviceCode /contract/deleteContractType
+     * @path /app/contract/deleteContractType
+     * @param reqJson
+     * @return
+     */
+    @RequestMapping(value = "/deleteContractType", method = RequestMethod.POST)
+    public ResponseEntity<String> deleteContractType(@RequestBody JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
+
+        Assert.hasKeyAndValue(reqJson, "contractTypeId", "contractTypeId不能为空");
+
+
+        ContractTypePo contractTypePo = BeanConvertUtil.covertBean(reqJson, ContractTypePo.class);
+        return deleteContractTypeBMOImpl.delete(contractTypePo);
+    }
+
+    /**
+     * 微信删除消息模板
+     * @serviceCode /contract/queryContractType
+     * @path /app/contract/queryContractType
+     * @param storeId 商户ID
+     * @return
+     */
+    @RequestMapping(value = "/queryContractType", method = RequestMethod.GET)
+    public ResponseEntity<String> queryContractType(@RequestHeader(value = "store-id") String storeId,
+                                                    @RequestParam(value = "page") int page,
+                                                    @RequestParam(value = "row") int row) {
+        ContractTypeDto contractTypeDto = new ContractTypeDto();
+        contractTypeDto.setPage(page);
+        contractTypeDto.setRow(row);
+        contractTypeDto.setStoreId(storeId);
+        return getContractTypeBMOImpl.get(contractTypeDto);
+    }
 }

+ 17 - 0
service-store/src/main/java/com/java110/store/bmo/contractType/IDeleteContractTypeBMO.java

@@ -0,0 +1,17 @@
+package com.java110.store.bmo.contractType;
+import com.java110.po.contractType.ContractTypePo;
+import org.springframework.http.ResponseEntity;
+
+public interface IDeleteContractTypeBMO {
+
+
+    /**
+     * 修改合同类型
+     * add by wuxw
+     * @param contractTypePo
+     * @return
+     */
+    ResponseEntity<String> delete(ContractTypePo contractTypePo);
+
+
+}

+ 19 - 0
service-store/src/main/java/com/java110/store/bmo/contractType/IGetContractTypeBMO.java

@@ -0,0 +1,19 @@
+package com.java110.store.bmo.contractType;
+
+import com.java110.dto.contractType.ContractTypeDto;
+import org.springframework.http.ResponseEntity;
+
+public interface IGetContractTypeBMO {
+
+
+    /**
+     * 查询合同类型
+     * add by wuxw
+     *
+     * @param contractTypeDto
+     * @return
+     */
+    ResponseEntity<String> get(ContractTypeDto contractTypeDto);
+
+
+}

+ 19 - 0
service-store/src/main/java/com/java110/store/bmo/contractType/ISaveContractTypeBMO.java

@@ -0,0 +1,19 @@
+package com.java110.store.bmo.contractType;
+
+import com.java110.po.contractType.ContractTypePo;
+import org.springframework.http.ResponseEntity;
+
+public interface ISaveContractTypeBMO {
+
+
+    /**
+     * 添加合同类型
+     * add by wuxw
+     *
+     * @param contractTypePo
+     * @return
+     */
+    ResponseEntity<String> save(ContractTypePo contractTypePo);
+
+
+}

+ 19 - 0
service-store/src/main/java/com/java110/store/bmo/contractType/IUpdateContractTypeBMO.java

@@ -0,0 +1,19 @@
+package com.java110.store.bmo.contractType;
+
+import com.java110.po.contractType.ContractTypePo;
+import org.springframework.http.ResponseEntity;
+
+public interface IUpdateContractTypeBMO {
+
+
+    /**
+     * 修改合同类型
+     * add by wuxw
+     *
+     * @param contractTypePo
+     * @return
+     */
+    ResponseEntity<String> update(ContractTypePo contractTypePo);
+
+
+}

+ 34 - 0
service-store/src/main/java/com/java110/store/bmo/contractType/impl/DeleteContractTypeBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.store.bmo.contractType.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.intf.store.IContractTypeInnerServiceSMO;
+import com.java110.po.contractType.ContractTypePo;
+import com.java110.store.bmo.contractType.IDeleteContractTypeBMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("deleteContractTypeBMOImpl")
+public class DeleteContractTypeBMOImpl implements IDeleteContractTypeBMO {
+
+    @Autowired
+    private IContractTypeInnerServiceSMO contractTypeInnerServiceSMOImpl;
+
+    /**
+     * @param contractTypePo 数据
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> delete(ContractTypePo contractTypePo) {
+
+        int flag = contractTypeInnerServiceSMOImpl.deleteContractType(contractTypePo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 44 - 0
service-store/src/main/java/com/java110/store/bmo/contractType/impl/GetContractTypeBMOImpl.java

@@ -0,0 +1,44 @@
+package com.java110.store.bmo.contractType.impl;
+
+import com.java110.dto.contractType.ContractTypeDto;
+import com.java110.intf.store.IContractTypeInnerServiceSMO;
+import com.java110.store.bmo.contractType.IGetContractTypeBMO;
+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("getContractTypeBMOImpl")
+public class GetContractTypeBMOImpl implements IGetContractTypeBMO {
+
+    @Autowired
+    private IContractTypeInnerServiceSMO contractTypeInnerServiceSMOImpl;
+
+    /**
+     * @param contractTypeDto
+     * @return 订单服务能够接受的报文
+     */
+    public ResponseEntity<String> get(ContractTypeDto contractTypeDto) {
+
+
+        int count = contractTypeInnerServiceSMOImpl.queryContractTypesCount(contractTypeDto);
+
+        List<ContractTypeDto> contractTypeDtos = null;
+        if (count > 0) {
+            contractTypeDtos = contractTypeInnerServiceSMOImpl.queryContractTypes(contractTypeDto);
+        } else {
+            contractTypeDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) contractTypeDto.getRow()), count, contractTypeDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        return responseEntity;
+    }
+
+}

+ 38 - 0
service-store/src/main/java/com/java110/store/bmo/contractType/impl/SaveContractTypeBMOImpl.java

@@ -0,0 +1,38 @@
+package com.java110.store.bmo.contractType.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.store.IContractTypeInnerServiceSMO;
+import com.java110.po.contractType.ContractTypePo;
+import com.java110.store.bmo.contractType.ISaveContractTypeBMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("saveContractTypeBMOImpl")
+public class SaveContractTypeBMOImpl implements ISaveContractTypeBMO {
+
+    @Autowired
+    private IContractTypeInnerServiceSMO contractTypeInnerServiceSMOImpl;
+
+    /**
+     * 添加小区信息
+     *
+     * @param contractTypePo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> save(ContractTypePo contractTypePo) {
+
+        contractTypePo.setContractTypeId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_contractTypeId));
+        int flag = contractTypeInnerServiceSMOImpl.saveContractType(contractTypePo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 34 - 0
service-store/src/main/java/com/java110/store/bmo/contractType/impl/UpdateContractTypeBMOImpl.java

@@ -0,0 +1,34 @@
+package com.java110.store.bmo.contractType.impl;
+
+import com.java110.core.annotation.Java110Transactional;
+import com.java110.intf.store.IContractTypeInnerServiceSMO;
+import com.java110.po.contractType.ContractTypePo;
+import com.java110.store.bmo.contractType.IUpdateContractTypeBMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service("updateContractTypeBMOImpl")
+public class UpdateContractTypeBMOImpl implements IUpdateContractTypeBMO {
+
+    @Autowired
+    private IContractTypeInnerServiceSMO contractTypeInnerServiceSMOImpl;
+
+    /**
+     * @param contractTypePo
+     * @return 订单服务能够接受的报文
+     */
+    @Java110Transactional
+    public ResponseEntity<String> update(ContractTypePo contractTypePo) {
+
+        int flag = contractTypeInnerServiceSMOImpl.updateContractType(contractTypePo);
+
+        if (flag > 0) {
+            return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
+        }
+
+        return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
+    }
+
+}

+ 61 - 0
service-store/src/main/java/com/java110/store/dao/IContractTypeServiceDao.java

@@ -0,0 +1,61 @@
+package com.java110.store.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 IContractTypeServiceDao {
+
+
+    /**
+     * 保存 合同类型信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    void saveContractTypeInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询合同类型信息(instance过程)
+     * 根据bId 查询合同类型信息
+     * @param info bId 信息
+     * @return 合同类型信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getContractTypeInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改合同类型信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    void updateContractTypeInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询合同类型总数
+     *
+     * @param info 合同类型信息
+     * @return 合同类型数量
+     */
+    int queryContractTypesCount(Map info);
+
+}

+ 97 - 0
service-store/src/main/java/com/java110/store/dao/impl/ContractTypeServiceDaoImpl.java

@@ -0,0 +1,97 @@
+package com.java110.store.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.store.dao.IContractTypeServiceDao;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 合同类型服务 与数据库交互
+ * Created by wuxw on 2017/4/5.
+ */
+@Service("contractTypeServiceDaoImpl")
+//@Transactional
+public class ContractTypeServiceDaoImpl extends BaseServiceDao implements IContractTypeServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ContractTypeServiceDaoImpl.class);
+
+
+    /**
+     * 保存合同类型信息 到 instance
+     *
+     * @param info bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void saveContractTypeInfo(Map info) throws DAOException {
+        logger.debug("保存合同类型信息Instance 入参 info : {}", info);
+
+        int saveFlag = sqlSessionTemplate.insert("contractTypeServiceDaoImpl.saveContractTypeInfo", 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> getContractTypeInfo(Map info) throws DAOException {
+        logger.debug("查询合同类型信息 入参 info : {}", info);
+
+        List<Map> businessContractTypeInfos = sqlSessionTemplate.selectList("contractTypeServiceDaoImpl.getContractTypeInfo", info);
+
+        return businessContractTypeInfos;
+    }
+
+
+    /**
+     * 修改合同类型信息
+     *
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void updateContractTypeInfo(Map info) throws DAOException {
+        logger.debug("修改合同类型信息Instance 入参 info : {}", info);
+
+        int saveFlag = sqlSessionTemplate.update("contractTypeServiceDaoImpl.updateContractTypeInfo", info);
+
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改合同类型信息Instance数据失败:" + JSONObject.toJSONString(info));
+        }
+    }
+
+    /**
+     * 查询合同类型数量
+     *
+     * @param info 合同类型信息
+     * @return 合同类型数量
+     */
+    @Override
+    public int queryContractTypesCount(Map info) {
+        logger.debug("查询合同类型数据 入参 info : {}", info);
+
+        List<Map> businessContractTypeInfos = sqlSessionTemplate.selectList("contractTypeServiceDaoImpl.queryContractTypesCount", info);
+        if (businessContractTypeInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessContractTypeInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 82 - 0
service-store/src/main/java/com/java110/store/smo/impl/ContractTypeInnerServiceSMOImpl.java

@@ -0,0 +1,82 @@
+package com.java110.store.smo.impl;
+
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.PageDto;
+import com.java110.dto.contractType.ContractTypeDto;
+import com.java110.intf.store.IContractTypeInnerServiceSMO;
+import com.java110.po.contractType.ContractTypePo;
+import com.java110.store.dao.IContractTypeServiceDao;
+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 ContractTypeInnerServiceSMOImpl extends BaseServiceSMO implements IContractTypeInnerServiceSMO {
+
+    @Autowired
+    private IContractTypeServiceDao contractTypeServiceDaoImpl;
+
+
+    @Override
+    public int saveContractType(@RequestBody ContractTypePo contractTypePo) {
+        int saveFlag = 1;
+        contractTypeServiceDaoImpl.saveContractTypeInfo(BeanConvertUtil.beanCovertMap(contractTypePo));
+        return saveFlag;
+    }
+
+    @Override
+    public int updateContractType(@RequestBody ContractTypePo contractTypePo) {
+        int saveFlag = 1;
+        contractTypeServiceDaoImpl.updateContractTypeInfo(BeanConvertUtil.beanCovertMap(contractTypePo));
+        return saveFlag;
+    }
+
+    @Override
+    public int deleteContractType(@RequestBody ContractTypePo contractTypePo) {
+        int saveFlag = 1;
+        contractTypePo.setStatusCd("1");
+        contractTypeServiceDaoImpl.updateContractTypeInfo(BeanConvertUtil.beanCovertMap(contractTypePo));
+        return saveFlag;
+    }
+
+    @Override
+    public List<ContractTypeDto> queryContractTypes(@RequestBody ContractTypeDto contractTypeDto) {
+
+        //校验是否传了 分页信息
+
+        int page = contractTypeDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            contractTypeDto.setPage((page - 1) * contractTypeDto.getRow());
+        }
+
+        List<ContractTypeDto> contractTypes = BeanConvertUtil.covertBeanList(contractTypeServiceDaoImpl.getContractTypeInfo(BeanConvertUtil.beanCovertMap(contractTypeDto)), ContractTypeDto.class);
+
+        return contractTypes;
+    }
+
+
+    @Override
+    public int queryContractTypesCount(@RequestBody ContractTypeDto contractTypeDto) {
+        return contractTypeServiceDaoImpl.queryContractTypesCount(BeanConvertUtil.beanCovertMap(contractTypeDto));
+    }
+
+    public IContractTypeServiceDao getContractTypeServiceDaoImpl() {
+        return contractTypeServiceDaoImpl;
+    }
+
+    public void setContractTypeServiceDaoImpl(IContractTypeServiceDao contractTypeServiceDaoImpl) {
+        this.contractTypeServiceDaoImpl = contractTypeServiceDaoImpl;
+    }
+}

+ 4 - 11
service-user/src/main/java/com/java110/user/api/RentingApi.java

@@ -14,11 +14,7 @@ import com.java110.user.bmo.rentingConfig.IDeleteRentingConfigBMO;
 import com.java110.user.bmo.rentingConfig.IGetRentingConfigBMO;
 import com.java110.user.bmo.rentingConfig.ISaveRentingConfigBMO;
 import com.java110.user.bmo.rentingConfig.IUpdateRentingConfigBMO;
-import com.java110.user.bmo.rentingPool.IAuditRentingBMO;
-import com.java110.user.bmo.rentingPool.IDeleteRentingPoolBMO;
-import com.java110.user.bmo.rentingPool.IGetRentingPoolBMO;
-import com.java110.user.bmo.rentingPool.ISaveRentingPoolBMO;
-import com.java110.user.bmo.rentingPool.IUpdateRentingPoolBMO;
+import com.java110.user.bmo.rentingPool.*;
 import com.java110.user.bmo.rentingPoolAttr.IDeleteRentingPoolAttrBMO;
 import com.java110.user.bmo.rentingPoolAttr.IGetRentingPoolAttrBMO;
 import com.java110.user.bmo.rentingPoolAttr.ISaveRentingPoolAttrBMO;
@@ -28,12 +24,7 @@ import com.java110.utils.util.BeanConvertUtil;
 import com.java110.utils.util.DateUtil;
 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.RequestHeader;
-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;
+import org.springframework.web.bind.annotation.*;
 
 
 @RestController
@@ -249,6 +240,7 @@ public class RentingApi {
                                                    @RequestParam(value = "page") int page,
                                                    @RequestParam(value = "row") int row,
                                                    @RequestParam(value = "state", required = false) String state,
+                                                   @RequestParam(value = "rentingType", required = false) String rentingType,
                                                    @RequestParam(value = "rentingId", required = false) String rentingId
     ) {
         RentingPoolDto rentingPoolDto = new RentingPoolDto();
@@ -256,6 +248,7 @@ public class RentingApi {
         rentingPoolDto.setRow(row);
         rentingPoolDto.setCommunityId(communityId);
         rentingPoolDto.setRentingId(rentingId);
+        rentingPoolDto.setRentingType(rentingType);
         if (!StringUtils.isEmpty(state) && state.contains(",")) {
             rentingPoolDto.setStates(state.split(","));
         } else {