Browse Source

加入 临时车费用相关代码

java110 5 years ago
parent
commit
435a542b2d
22 changed files with 1852 additions and 26 deletions
  1. 104 0
      java110-bean/src/main/java/com/java110/dto/tempCarFeeConfig/TempCarFeeConfigDto.java
  2. 90 0
      java110-bean/src/main/java/com/java110/po/tempCarFeeConfig/TempCarFeeConfigPo.java
  3. 42 0
      java110-core/src/main/java/com/java110/core/smo/fee/ITempCarFeeConfigInnerServiceSMO.java
  4. 232 0
      java110-db/src/main/resources/mapper/fee/TempCarFeeConfigServiceDaoImplMapper.xml
  5. 42 25
      java110-generator/src/main/resources/back/template_1.json
  6. 5 0
      java110-service/pom.xml
  7. 18 0
      java110-utils/src/main/java/com/java110/utils/constant/BusinessTypeConstant.java
  8. 31 0
      java110-utils/src/main/java/com/java110/utils/constant/ServiceCodeTempCarFeeConfigConstant.java
  9. 38 0
      service-api/src/main/java/com/java110/api/bmo/tempCarFeeConfig/ITempCarFeeConfigBMO.java
  10. 61 0
      service-api/src/main/java/com/java110/api/bmo/tempCarFeeConfig/impl/TempCarFeeConfigBMOImpl.java
  11. 50 0
      service-api/src/main/java/com/java110/api/listener/fee/DeleteTempCarFeeConfigListener.java
  12. 82 0
      service-api/src/main/java/com/java110/api/listener/fee/ListTempCarFeeConfigsListener.java
  13. 53 0
      service-api/src/main/java/com/java110/api/listener/fee/SaveTempCarFeeConfigListener.java
  14. 53 0
      service-api/src/main/java/com/java110/api/listener/fee/UpdateTempCarFeeConfigListener.java
  15. 81 0
      service-fee/src/main/java/com/java110/fee/dao/ITempCarFeeConfigServiceDao.java
  16. 130 0
      service-fee/src/main/java/com/java110/fee/dao/impl/TempCarFeeConfigServiceDaoImpl.java
  17. 96 0
      service-fee/src/main/java/com/java110/fee/listener/tempCarFeeConfig/AbstractTempCarFeeConfigBusinessServiceDataFlowListener.java
  18. 180 0
      service-fee/src/main/java/com/java110/fee/listener/tempCarFeeConfig/DeleteTempCarFeeConfigInfoListener.java
  19. 181 0
      service-fee/src/main/java/com/java110/fee/listener/tempCarFeeConfig/SaveTempCarFeeConfigInfoListener.java
  20. 190 0
      service-fee/src/main/java/com/java110/fee/listener/tempCarFeeConfig/UpdateTempCarFeeConfigInfoListener.java
  21. 92 0
      service-fee/src/main/java/com/java110/fee/smo/impl/TempCarFeeConfigInnerServiceSMOImpl.java
  22. 1 1
      service-front/src/main/java/com/java110/front/controller/CallComponentController.java

+ 104 - 0
java110-bean/src/main/java/com/java110/dto/tempCarFeeConfig/TempCarFeeConfigDto.java

@@ -0,0 +1,104 @@
+package com.java110.dto.tempCarFeeConfig;
+
+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 TempCarFeeConfigDto extends PageDto implements Serializable {
+
+    private String carType;
+private String configId;
+private String feeName;
+private String paId;
+private String areaNum;
+private String startTime;
+private String endTime;
+private String ruleId;
+private String communityId;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getCarType() {
+        return carType;
+    }
+public void setCarType(String carType) {
+        this.carType = carType;
+    }
+public String getConfigId() {
+        return configId;
+    }
+public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+public String getFeeName() {
+        return feeName;
+    }
+public void setFeeName(String feeName) {
+        this.feeName = feeName;
+    }
+public String getPaId() {
+        return paId;
+    }
+public void setPaId(String paId) {
+        this.paId = paId;
+    }
+public String getAreaNum() {
+        return areaNum;
+    }
+public void setAreaNum(String areaNum) {
+        this.areaNum = areaNum;
+    }
+public String getStartTime() {
+        return startTime;
+    }
+public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+public String getEndTime() {
+        return endTime;
+    }
+public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+public String getRuleId() {
+        return ruleId;
+    }
+public void setRuleId(String ruleId) {
+        this.ruleId = ruleId;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+
+    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;
+    }
+}

+ 90 - 0
java110-bean/src/main/java/com/java110/po/tempCarFeeConfig/TempCarFeeConfigPo.java

@@ -0,0 +1,90 @@
+package com.java110.po.tempCarFeeConfig;
+
+import java.io.Serializable;
+
+public class TempCarFeeConfigPo implements Serializable {
+
+    private String carType;
+    private String configId;
+    private String feeName;
+    private String paId;
+    private String areaNum;
+    private String startTime;
+    private String endTime;
+    private String ruleId;
+    private String communityId;
+
+    public String getCarType() {
+        return carType;
+    }
+
+    public void setCarType(String carType) {
+        this.carType = carType;
+    }
+
+    public String getConfigId() {
+        return configId;
+    }
+
+    public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+
+    public String getFeeName() {
+        return feeName;
+    }
+
+    public void setFeeName(String feeName) {
+        this.feeName = feeName;
+    }
+
+    public String getPaId() {
+        return paId;
+    }
+
+    public void setPaId(String paId) {
+        this.paId = paId;
+    }
+
+    public String getAreaNum() {
+        return areaNum;
+    }
+
+    public void setAreaNum(String areaNum) {
+        this.areaNum = areaNum;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getRuleId() {
+        return ruleId;
+    }
+
+    public void setRuleId(String ruleId) {
+        this.ruleId = ruleId;
+    }
+
+    public String getCommunityId() {
+        return communityId;
+    }
+
+    public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+
+}

+ 42 - 0
java110-core/src/main/java/com/java110/core/smo/fee/ITempCarFeeConfigInnerServiceSMO.java

@@ -0,0 +1,42 @@
+package com.java110.core.smo.fee;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.tempCarFeeConfig.TempCarFeeConfigDto;
+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 ITempCarFeeConfigInnerServiceSMO
+ * @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("/tempCarFeeConfigApi")
+public interface ITempCarFeeConfigInnerServiceSMO {
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param tempCarFeeConfigDto 数据对象分享
+     * @return TempCarFeeConfigDto 对象数据
+     */
+    @RequestMapping(value = "/queryTempCarFeeConfigs", method = RequestMethod.POST)
+    List<TempCarFeeConfigDto> queryTempCarFeeConfigs(@RequestBody TempCarFeeConfigDto tempCarFeeConfigDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param tempCarFeeConfigDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryTempCarFeeConfigsCount", method = RequestMethod.POST)
+    int queryTempCarFeeConfigsCount(@RequestBody TempCarFeeConfigDto tempCarFeeConfigDto);
+}

+ 232 - 0
java110-db/src/main/resources/mapper/fee/TempCarFeeConfigServiceDaoImplMapper.xml

@@ -0,0 +1,232 @@
+<?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="tempCarFeeConfigServiceDaoImpl">
+
+    <!-- 保存临时车收费标准信息 add by wuxw 2018-07-03 -->
+       <insert id="saveBusinessTempCarFeeConfigInfo" parameterType="Map">
+           insert into business_temp_car_fee_config(
+car_type,operate,config_id,fee_name,pa_id,area_num,start_time,end_time,b_id,rule_id,community_id
+) values (
+#{carType},#{operate},#{configId},#{feeName},#{paId},#{areaNum},#{startTime},#{endTime},#{bId},#{ruleId},#{communityId}
+)
+       </insert>
+
+
+       <!-- 查询临时车收费标准信息(Business) add by wuxw 2018-07-03 -->
+       <select id="getBusinessTempCarFeeConfigInfo" parameterType="Map" resultType="Map">
+           select  t.car_type,t.car_type carType,t.operate,t.config_id,t.config_id configId,t.fee_name,t.fee_name feeName,t.pa_id,t.pa_id paId,t.area_num,t.area_num areaNum,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.b_id,t.b_id bId,t.rule_id,t.rule_id ruleId,t.community_id,t.community_id communityId 
+from business_temp_car_fee_config t 
+where 1 =1 
+<if test="carType !=null and carType != ''">
+   and t.car_type= #{carType}
+</if> 
+<if test="operate !=null and operate != ''">
+   and t.operate= #{operate}
+</if> 
+<if test="configId !=null and configId != ''">
+   and t.config_id= #{configId}
+</if> 
+<if test="feeName !=null and feeName != ''">
+   and t.fee_name= #{feeName}
+</if> 
+<if test="paId !=null and paId != ''">
+   and t.pa_id= #{paId}
+</if> 
+<if test="areaNum !=null and areaNum != ''">
+   and t.area_num= #{areaNum}
+</if> 
+<if test="startTime !=null and startTime != ''">
+   and t.start_time= #{startTime}
+</if> 
+<if test="endTime !=null and endTime != ''">
+   and t.end_time= #{endTime}
+</if> 
+<if test="bId !=null and bId != ''">
+   and t.b_id= #{bId}
+</if> 
+<if test="ruleId !=null and ruleId != ''">
+   and t.rule_id= #{ruleId}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+
+       </select>
+
+
+
+
+
+    <!-- 保存临时车收费标准信息至 instance表中 add by wuxw 2018-07-03 -->
+    <insert id="saveTempCarFeeConfigInfoInstance" parameterType="Map">
+        insert into temp_car_fee_config(
+car_type,config_id,fee_name,pa_id,area_num,status_cd,start_time,end_time,b_id,rule_id,community_id
+) select t.car_type,t.config_id,t.fee_name,t.pa_id,t.area_num,'0',t.start_time,t.end_time,t.b_id,t.rule_id,t.community_id from business_temp_car_fee_config t where 1=1
+<if test="carType !=null and carType != ''">
+   and t.car_type= #{carType}
+</if> 
+   and t.operate= 'ADD'
+<if test="configId !=null and configId != ''">
+   and t.config_id= #{configId}
+</if> 
+<if test="feeName !=null and feeName != ''">
+   and t.fee_name= #{feeName}
+</if> 
+<if test="paId !=null and paId != ''">
+   and t.pa_id= #{paId}
+</if> 
+<if test="areaNum !=null and areaNum != ''">
+   and t.area_num= #{areaNum}
+</if> 
+<if test="startTime !=null and startTime != ''">
+   and t.start_time= #{startTime}
+</if> 
+<if test="endTime !=null and endTime != ''">
+   and t.end_time= #{endTime}
+</if> 
+<if test="bId !=null and bId != ''">
+   and t.b_id= #{bId}
+</if> 
+<if test="ruleId !=null and ruleId != ''">
+   and t.rule_id= #{ruleId}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+
+    </insert>
+
+
+
+    <!-- 查询临时车收费标准信息 add by wuxw 2018-07-03 -->
+    <select id="getTempCarFeeConfigInfo" parameterType="Map" resultType="Map">
+        select  t.car_type,t.car_type carType,t.config_id,t.config_id configId,t.fee_name,t.fee_name feeName,t.pa_id,t.pa_id paId,t.area_num,t.area_num areaNum,t.status_cd,t.status_cd statusCd,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.b_id,t.b_id bId,t.rule_id,t.rule_id ruleId,t.community_id,t.community_id communityId 
+from temp_car_fee_config t 
+where 1 =1 
+<if test="carType !=null and carType != ''">
+   and t.car_type= #{carType}
+</if> 
+<if test="configId !=null and configId != ''">
+   and t.config_id= #{configId}
+</if> 
+<if test="feeName !=null and feeName != ''">
+   and t.fee_name= #{feeName}
+</if> 
+<if test="paId !=null and paId != ''">
+   and t.pa_id= #{paId}
+</if> 
+<if test="areaNum !=null and areaNum != ''">
+   and t.area_num= #{areaNum}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="startTime !=null and startTime != ''">
+   and t.start_time= #{startTime}
+</if> 
+<if test="endTime !=null and endTime != ''">
+   and t.end_time= #{endTime}
+</if> 
+<if test="bId !=null and bId != ''">
+   and t.b_id= #{bId}
+</if> 
+<if test="ruleId !=null and ruleId != ''">
+   and t.rule_id= #{ruleId}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</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="updateTempCarFeeConfigInfoInstance" parameterType="Map">
+        update  temp_car_fee_config t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="carType !=null and carType != ''">
+, t.car_type= #{carType}
+</if> 
+<if test="feeName !=null and feeName != ''">
+, t.fee_name= #{feeName}
+</if> 
+<if test="paId !=null and paId != ''">
+, t.pa_id= #{paId}
+</if> 
+<if test="areaNum !=null and areaNum != ''">
+, t.area_num= #{areaNum}
+</if> 
+<if test="startTime !=null and startTime != ''">
+, t.start_time= #{startTime}
+</if> 
+<if test="endTime !=null and endTime != ''">
+, t.end_time= #{endTime}
+</if> 
+<if test="ruleId !=null and ruleId != ''">
+, t.rule_id= #{ruleId}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+ where 1=1 <if test="configId !=null and configId != ''">
+and t.config_id= #{configId}
+</if> 
+<if test="bId !=null and bId != ''">
+and t.b_id= #{bId}
+</if> 
+
+    </update>
+
+    <!-- 查询临时车收费标准数量 add by wuxw 2018-07-03 -->
+     <select id="queryTempCarFeeConfigsCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from temp_car_fee_config t 
+where 1 =1 
+<if test="carType !=null and carType != ''">
+   and t.car_type= #{carType}
+</if> 
+<if test="configId !=null and configId != ''">
+   and t.config_id= #{configId}
+</if> 
+<if test="feeName !=null and feeName != ''">
+   and t.fee_name= #{feeName}
+</if> 
+<if test="paId !=null and paId != ''">
+   and t.pa_id= #{paId}
+</if> 
+<if test="areaNum !=null and areaNum != ''">
+   and t.area_num= #{areaNum}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="startTime !=null and startTime != ''">
+   and t.start_time= #{startTime}
+</if> 
+<if test="endTime !=null and endTime != ''">
+   and t.end_time= #{endTime}
+</if> 
+<if test="bId !=null and bId != ''">
+   and t.b_id= #{bId}
+</if> 
+<if test="ruleId !=null and ruleId != ''">
+   and t.rule_id= #{ruleId}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 42 - 25
java110-generator/src/main/resources/back/template_1.json

@@ -1,44 +1,61 @@
 {
   "autoMove": true,
-  "id": "detailDiscountId",
-  "name": "payFeeDetailDiscount",
-  "desc": "缴费优惠",
+  "id": "configId",
+  "name": "tempCarFeeConfig",
+  "desc": "临时车收费标准",
   "shareParam": "community_id",
   "shareColumn": "communityId",
   "shareName": "fee",
-  "newBusinessTypeCd": "BUSINESS_TYPE_SAVE_DETAIL_DISCOUNT_INFO",
-  "updateBusinessTypeCd": "BUSINESS_TYPE_UPDATE_DETAIL_DISCOUNT_INFO",
-  "deleteBusinessTypeCd": "BUSINESS_TYPE_DELETE_DETAIL_DISCOUNT_INFO",
-  "newBusinessTypeCdValue": "641100030001",
-  "updateBusinessTypeCdValue": "641100040001",
-  "deleteBusinessTypeCdValue": "641100050001",
-  "businessTableName": "business_pay_fee_detail_discount",
-  "tableName": "pay_fee_detail_discount",
+  "newBusinessTypeCd": "BUSINESS_TYPE_SAVE_TEMP_CAR_FEE_CONFIG_INFO",
+  "updateBusinessTypeCd": "BUSINESS_TYPE_UPDATE_TEMP_CAR_FEE_CONFIG_INFO",
+  "deleteBusinessTypeCd": "BUSINESS_TYPE_DELETE_TEMP_CAR_FEE_CONFIG_INFO",
+  "newBusinessTypeCdValue": "651100030001",
+  "updateBusinessTypeCdValue": "651100040001",
+  "deleteBusinessTypeCdValue": "651100050001",
+  "businessTableName": "business_temp_car_fee_config",
+  "tableName": "temp_car_fee_config",
   "param": {
-    "detailDiscountId": "detail_discount_id",
+    "configId": "config_id",
     "bId": "b_id",
-    "feeId": "fee_id",
-    "detailId": "detail_id",
-    "communityId": "community_id",
+    "feeName": "fee_name",
+    "paId": "pa_id",
+    "areaNum": "area_num",
     "statusCd": "status_cd",
-    "createTime": "create_time",
-    "discountId": "discount_id",
-    "discountPrice": "discount_price",
-    "remark": "remark",
+    "carType": "car_type",
+    "ruleId": "rule_id",
+    "communityId": "community_id",
+    "startTime": "start_time",
+    "endTime": "end_time",
     "operate": "operate"
   },
   "required": [
     {
-      "code": "detailId",
-      "msg": "缴费明细不能为空"
+      "code": "feeName",
+      "msg": "费用名称不能为空"
+    },
+    {
+      "code": "paId",
+      "msg": "停车场不能为空"
+    },
+    {
+      "code": "carType",
+      "msg": "车辆类型不能为空"
+    },
+    {
+      "code": "ruleId",
+      "msg": "规则不能为空"
+    },
+    {
+      "code": "communityId",
+      "msg": "小区不能为空"
     },
     {
-      "code": "feeId",
-      "msg": "费用不能为空"
+      "code": "startTime",
+      "msg": "开始时间不能为空"
     },
     {
-      "code": "discountId",
-      "msg": "优惠不能为空"
+      "code": "endTime",
+      "msg": "结束时间不能为空"
     }
   ]
 }

+ 5 - 0
java110-service/pom.xml

@@ -137,5 +137,10 @@
             <groupId>io.springfox</groupId>
             <artifactId>springfox-swagger-ui</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-zipkin</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 18 - 0
java110-utils/src/main/java/com/java110/utils/constant/BusinessTypeConstant.java

@@ -1236,5 +1236,23 @@ public class BusinessTypeConstant {
      */
     public static final String BUSINESS_TYPE_DELETE_DETAIL_DISCOUNT_INFO="641100050001";
 
+    /**
+     *  保存工作流节点 处理员工 ORDER_FEE_SERVICE_URL
+     *  3保存 feeServiceTopic
+     */
+    public static final String BUSINESS_TYPE_SAVE_TEMP_CAR_FEE_CONFIG_INFO="651100030001";
+
+
+    /**
+     *  修改工作流节点 处理员工
+     *  3保存
+     */
+    public static final String BUSINESS_TYPE_UPDATE_TEMP_CAR_FEE_CONFIG_INFO="651100040001";
+
+    /**
+     * 删除工作流节点 处理员工
+     */
+    public static final String BUSINESS_TYPE_DELETE_TEMP_CAR_FEE_CONFIG_INFO="651100050001";
+
 
 }

+ 31 - 0
java110-utils/src/main/java/com/java110/utils/constant/ServiceCodeTempCarFeeConfigConstant.java

@@ -0,0 +1,31 @@
+package com.java110.utils.constant;
+
+/**
+ * 临时车收费标准常量类
+ * Created by wuxw on 2017/5/20.
+ */
+public class ServiceCodeTempCarFeeConfigConstant {
+
+    /**
+     * 添加 临时车收费标准
+     */
+    public static final String ADD_TEMPCARFEECONFIG = "tempCarFeeConfig.saveTempCarFeeConfig";
+
+
+    /**
+     * 修改 临时车收费标准
+     */
+    public static final String UPDATE_TEMPCARFEECONFIG = "tempCarFeeConfig.updateTempCarFeeConfig";
+    /**
+     * 删除 临时车收费标准
+     */
+    public static final String DELETE_TEMPCARFEECONFIG = "tempCarFeeConfig.deleteTempCarFeeConfig";
+
+
+    /**
+     * 查询 临时车收费标准
+     */
+    public static final String LIST_TEMPCARFEECONFIGS = "tempCarFeeConfig.listTempCarFeeConfigs";
+
+
+}

+ 38 - 0
service-api/src/main/java/com/java110/api/bmo/tempCarFeeConfig/ITempCarFeeConfigBMO.java

@@ -0,0 +1,38 @@
+package com.java110.api.bmo.tempCarFeeConfig;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.bmo.IApiBaseBMO;
+import com.java110.core.context.DataFlowContext;
+
+public interface ITempCarFeeConfigBMO extends IApiBaseBMO {
+
+
+    /**
+     * 添加临时车收费标准
+     * @param paramInJson
+     * @param dataFlowContext
+     * @return
+     */
+     void addTempCarFeeConfig(JSONObject paramInJson, DataFlowContext dataFlowContext);
+
+    /**
+     * 添加临时车收费标准信息
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+     void updateTempCarFeeConfig(JSONObject paramInJson, DataFlowContext dataFlowContext);
+
+    /**
+     * 删除临时车收费标准
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+     void deleteTempCarFeeConfig(JSONObject paramInJson, DataFlowContext dataFlowContext);
+
+
+
+}

+ 61 - 0
service-api/src/main/java/com/java110/api/bmo/tempCarFeeConfig/impl/TempCarFeeConfigBMOImpl.java

@@ -0,0 +1,61 @@
+package com.java110.api.bmo.tempCarFeeConfig.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.bmo.ApiBaseBMO;
+import com.java110.api.bmo.tempCarFeeConfig.ITempCarFeeConfigBMO;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.smo.fee.ITempCarFeeConfigInnerServiceSMO;
+import com.java110.po.tempCarFeeConfig.TempCarFeeConfigPo;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.util.BeanConvertUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service("tempCarFeeConfigBMOImpl")
+public class TempCarFeeConfigBMOImpl extends ApiBaseBMO implements ITempCarFeeConfigBMO {
+
+    @Autowired
+    private ITempCarFeeConfigInnerServiceSMO tempCarFeeConfigInnerServiceSMOImpl;
+
+    /**
+     * 添加小区信息
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+    public void addTempCarFeeConfig(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+
+        paramInJson.put("configId", "-1");
+        TempCarFeeConfigPo tempCarFeeConfigPo = BeanConvertUtil.covertBean(paramInJson, TempCarFeeConfigPo.class);
+        super.insert(dataFlowContext, tempCarFeeConfigPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_TEMP_CAR_FEE_CONFIG_INFO);
+    }
+
+
+    /**
+     * 添加活动信息
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+    public void updateTempCarFeeConfig(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+        TempCarFeeConfigPo tempCarFeeConfigPo = BeanConvertUtil.covertBean(paramInJson, TempCarFeeConfigPo.class);
+        super.update(dataFlowContext, tempCarFeeConfigPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_TEMP_CAR_FEE_CONFIG_INFO);
+    }
+
+
+    /**
+     * 添加小区信息
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+    public void deleteTempCarFeeConfig(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+
+        TempCarFeeConfigPo tempCarFeeConfigPo = BeanConvertUtil.covertBean(paramInJson, TempCarFeeConfigPo.class);
+        super.update(dataFlowContext, tempCarFeeConfigPo, BusinessTypeConstant.BUSINESS_TYPE_DELETE_TEMP_CAR_FEE_CONFIG_INFO);
+    }
+
+}

+ 50 - 0
service-api/src/main/java/com/java110/api/listener/fee/DeleteTempCarFeeConfigListener.java

@@ -0,0 +1,50 @@
+package com.java110.api.listener.fee;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.bmo.tempCarFeeConfig.ITempCarFeeConfigBMO;
+import com.java110.api.listener.AbstractServiceApiPlusListener;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.utils.constant.ServiceCodeTempCarFeeConfigConstant;
+import com.java110.utils.util.Assert;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+
+
+/**
+ * 保存小区侦听
+ * add by wuxw 2019-06-30
+ */
+@Java110Listener("deleteTempCarFeeConfigListener")
+public class DeleteTempCarFeeConfigListener extends AbstractServiceApiPlusListener {
+
+    @Autowired
+    private ITempCarFeeConfigBMO tempCarFeeConfigBMOImpl;
+
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
+
+        Assert.hasKeyAndValue(reqJson, "configId", "configId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
+
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+
+        tempCarFeeConfigBMOImpl.deleteTempCarFeeConfig(reqJson, context);
+    }
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeTempCarFeeConfigConstant.DELETE_TEMPCARFEECONFIG;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.POST;
+    }
+
+}

+ 82 - 0
service-api/src/main/java/com/java110/api/listener/fee/ListTempCarFeeConfigsListener.java

@@ -0,0 +1,82 @@
+package com.java110.api.listener.fee;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.listener.AbstractServiceApiListener;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.core.smo.fee.ITempCarFeeConfigInnerServiceSMO;
+import com.java110.dto.tempCarFeeConfig.TempCarFeeConfigDto;
+import com.java110.utils.constant.ServiceCodeTempCarFeeConfigConstant;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 查询小区侦听类
+ */
+@Java110Listener("listTempCarFeeConfigsListener")
+public class ListTempCarFeeConfigsListener extends AbstractServiceApiListener {
+
+    @Autowired
+    private ITempCarFeeConfigInnerServiceSMO tempCarFeeConfigInnerServiceSMOImpl;
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeTempCarFeeConfigConstant.LIST_TEMPCARFEECONFIGS;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.GET;
+    }
+
+
+    @Override
+    public int getOrder() {
+        return DEFAULT_ORDER;
+    }
+
+
+    public ITempCarFeeConfigInnerServiceSMO getTempCarFeeConfigInnerServiceSMOImpl() {
+        return tempCarFeeConfigInnerServiceSMOImpl;
+    }
+
+    public void setTempCarFeeConfigInnerServiceSMOImpl(ITempCarFeeConfigInnerServiceSMO tempCarFeeConfigInnerServiceSMOImpl) {
+        this.tempCarFeeConfigInnerServiceSMOImpl = tempCarFeeConfigInnerServiceSMOImpl;
+    }
+
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+
+        TempCarFeeConfigDto tempCarFeeConfigDto = BeanConvertUtil.covertBean(reqJson, TempCarFeeConfigDto.class);
+
+        int count = tempCarFeeConfigInnerServiceSMOImpl.queryTempCarFeeConfigsCount(tempCarFeeConfigDto);
+
+        List<TempCarFeeConfigDto> tempCarFeeConfigDtos = null;
+
+        if (count > 0) {
+            tempCarFeeConfigDtos = tempCarFeeConfigInnerServiceSMOImpl.queryTempCarFeeConfigs(tempCarFeeConfigDto);
+        } else {
+            tempCarFeeConfigDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, tempCarFeeConfigDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        context.setResponseEntity(responseEntity);
+
+    }
+}

+ 53 - 0
service-api/src/main/java/com/java110/api/listener/fee/SaveTempCarFeeConfigListener.java

@@ -0,0 +1,53 @@
+package com.java110.api.listener.fee;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.bmo.tempCarFeeConfig.ITempCarFeeConfigBMO;
+import com.java110.api.listener.AbstractServiceApiPlusListener;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.utils.constant.ServiceCodeTempCarFeeConfigConstant;
+import com.java110.utils.util.Assert;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+
+/**
+ * 保存商户侦听
+ * add by wuxw 2019-06-30
+ */
+@Java110Listener("saveTempCarFeeConfigListener")
+public class SaveTempCarFeeConfigListener extends AbstractServiceApiPlusListener {
+
+    @Autowired
+    private ITempCarFeeConfigBMO tempCarFeeConfigBMOImpl;
+
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
+
+        Assert.hasKeyAndValue(reqJson, "feeName", "请求报文中未包含feeName");
+        Assert.hasKeyAndValue(reqJson, "paId", "请求报文中未包含paId");
+        Assert.hasKeyAndValue(reqJson, "carType", "请求报文中未包含carType");
+        Assert.hasKeyAndValue(reqJson, "ruleId", "请求报文中未包含ruleId");
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
+        Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含endTime");
+
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+        tempCarFeeConfigBMOImpl.addTempCarFeeConfig(reqJson, context);
+    }
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeTempCarFeeConfigConstant.ADD_TEMPCARFEECONFIG;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.POST;
+    }
+
+}

+ 53 - 0
service-api/src/main/java/com/java110/api/listener/fee/UpdateTempCarFeeConfigListener.java

@@ -0,0 +1,53 @@
+package com.java110.api.listener.fee;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.bmo.tempCarFeeConfig.ITempCarFeeConfigBMO;
+import com.java110.api.listener.AbstractServiceApiPlusListener;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.utils.constant.ServiceCodeTempCarFeeConfigConstant;
+import com.java110.utils.util.Assert;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+
+/**
+ * 保存临时车收费标准侦听
+ * add by wuxw 2019-06-30
+ */
+@Java110Listener("updateTempCarFeeConfigListener")
+public class UpdateTempCarFeeConfigListener extends AbstractServiceApiPlusListener {
+
+    @Autowired
+    private ITempCarFeeConfigBMO tempCarFeeConfigBMOImpl;
+
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+
+        Assert.hasKeyAndValue(reqJson, "configId", "configId不能为空");
+        Assert.hasKeyAndValue(reqJson, "feeName", "请求报文中未包含feeName");
+        Assert.hasKeyAndValue(reqJson, "paId", "请求报文中未包含paId");
+        Assert.hasKeyAndValue(reqJson, "carType", "请求报文中未包含carType");
+        Assert.hasKeyAndValue(reqJson, "ruleId", "请求报文中未包含ruleId");
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
+        Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含endTime");
+
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+
+        tempCarFeeConfigBMOImpl.updateTempCarFeeConfig(reqJson, context);
+    }
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeTempCarFeeConfigConstant.UPDATE_TEMPCARFEECONFIG;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.POST;
+    }
+}

+ 81 - 0
service-fee/src/main/java/com/java110/fee/dao/ITempCarFeeConfigServiceDao.java

@@ -0,0 +1,81 @@
+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 ITempCarFeeConfigServiceDao {
+
+    /**
+     * 保存 临时车收费标准信息
+     * @param businessTempCarFeeConfigInfo 临时车收费标准信息 封装
+     * @throws DAOException 操作数据库异常
+     */
+    void saveBusinessTempCarFeeConfigInfo(Map businessTempCarFeeConfigInfo) throws DAOException;
+
+
+
+    /**
+     * 查询临时车收费标准信息(business过程)
+     * 根据bId 查询临时车收费标准信息
+     * @param info bId 信息
+     * @return 临时车收费标准信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getBusinessTempCarFeeConfigInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 保存 临时车收费标准信息 Business数据到 Instance中
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    void saveTempCarFeeConfigInfoInstance(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询临时车收费标准信息(instance过程)
+     * 根据bId 查询临时车收费标准信息
+     * @param info bId 信息
+     * @return 临时车收费标准信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getTempCarFeeConfigInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改临时车收费标准信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    void updateTempCarFeeConfigInfoInstance(Map info) throws DAOException;
+
+
+    /**
+     * 查询临时车收费标准总数
+     *
+     * @param info 临时车收费标准信息
+     * @return 临时车收费标准数量
+     */
+    int queryTempCarFeeConfigsCount(Map info);
+
+}

+ 130 - 0
service-fee/src/main/java/com/java110/fee/dao/impl/TempCarFeeConfigServiceDaoImpl.java

@@ -0,0 +1,130 @@
+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.ITempCarFeeConfigServiceDao;
+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("tempCarFeeConfigServiceDaoImpl")
+//@Transactional
+public class TempCarFeeConfigServiceDaoImpl extends BaseServiceDao implements ITempCarFeeConfigServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(TempCarFeeConfigServiceDaoImpl.class);
+
+    /**
+     * 临时车收费标准信息封装
+     * @param businessTempCarFeeConfigInfo 临时车收费标准信息 封装
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void saveBusinessTempCarFeeConfigInfo(Map businessTempCarFeeConfigInfo) throws DAOException {
+        businessTempCarFeeConfigInfo.put("month", DateUtil.getCurrentMonth());
+        // 查询business_user 数据是否已经存在
+        logger.debug("保存临时车收费标准信息 入参 businessTempCarFeeConfigInfo : {}",businessTempCarFeeConfigInfo);
+        int saveFlag = sqlSessionTemplate.insert("tempCarFeeConfigServiceDaoImpl.saveBusinessTempCarFeeConfigInfo",businessTempCarFeeConfigInfo);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存临时车收费标准数据失败:"+ JSONObject.toJSONString(businessTempCarFeeConfigInfo));
+        }
+    }
+
+
+    /**
+     * 查询临时车收费标准信息
+     * @param info bId 信息
+     * @return 临时车收费标准信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getBusinessTempCarFeeConfigInfo(Map info) throws DAOException {
+
+        logger.debug("查询临时车收费标准信息 入参 info : {}",info);
+
+        List<Map> businessTempCarFeeConfigInfos = sqlSessionTemplate.selectList("tempCarFeeConfigServiceDaoImpl.getBusinessTempCarFeeConfigInfo",info);
+
+        return businessTempCarFeeConfigInfos;
+    }
+
+
+
+    /**
+     * 保存临时车收费标准信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void saveTempCarFeeConfigInfoInstance(Map info) throws DAOException {
+        logger.debug("保存临时车收费标准信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("tempCarFeeConfigServiceDaoImpl.saveTempCarFeeConfigInfoInstance",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> getTempCarFeeConfigInfo(Map info) throws DAOException {
+        logger.debug("查询临时车收费标准信息 入参 info : {}",info);
+
+        List<Map> businessTempCarFeeConfigInfos = sqlSessionTemplate.selectList("tempCarFeeConfigServiceDaoImpl.getTempCarFeeConfigInfo",info);
+
+        return businessTempCarFeeConfigInfos;
+    }
+
+
+    /**
+     * 修改临时车收费标准信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public void updateTempCarFeeConfigInfoInstance(Map info) throws DAOException {
+        logger.debug("修改临时车收费标准信息Instance 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("tempCarFeeConfigServiceDaoImpl.updateTempCarFeeConfigInfoInstance",info);
+
+        if(saveFlag < 1){
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改临时车收费标准信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        }
+    }
+
+     /**
+     * 查询临时车收费标准数量
+     * @param info 临时车收费标准信息
+     * @return 临时车收费标准数量
+     */
+    @Override
+    public int queryTempCarFeeConfigsCount(Map info) {
+        logger.debug("查询临时车收费标准数据 入参 info : {}",info);
+
+        List<Map> businessTempCarFeeConfigInfos = sqlSessionTemplate.selectList("tempCarFeeConfigServiceDaoImpl.queryTempCarFeeConfigsCount", info);
+        if (businessTempCarFeeConfigInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessTempCarFeeConfigInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 96 - 0
service-fee/src/main/java/com/java110/fee/listener/tempCarFeeConfig/AbstractTempCarFeeConfigBusinessServiceDataFlowListener.java

@@ -0,0 +1,96 @@
+package com.java110.fee.listener.tempCarFeeConfig;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.event.service.AbstractBusinessServiceDataFlowListener;
+import com.java110.entity.center.Business;
+import com.java110.fee.dao.ITempCarFeeConfigServiceDao;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.constant.StatusConstant;
+import com.java110.utils.exception.ListenerExecuteException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 临时车收费标准 服务侦听 父类
+ * Created by wuxw on 2018/7/4.
+ */
+public abstract class AbstractTempCarFeeConfigBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener {
+    private static Logger logger = LoggerFactory.getLogger(AbstractTempCarFeeConfigBusinessServiceDataFlowListener.class);
+
+
+    /**
+     * 获取 DAO工具类
+     *
+     * @return
+     */
+    public abstract ITempCarFeeConfigServiceDao getTempCarFeeConfigServiceDaoImpl();
+
+    /**
+     * 刷新 businessTempCarFeeConfigInfo 数据
+     * 主要将 数据库 中字段和 接口传递字段建立关系
+     *
+     * @param businessTempCarFeeConfigInfo
+     */
+    protected void flushBusinessTempCarFeeConfigInfo(Map businessTempCarFeeConfigInfo, String statusCd) {
+        businessTempCarFeeConfigInfo.put("newBId", businessTempCarFeeConfigInfo.get("b_id"));
+        businessTempCarFeeConfigInfo.put("carType", businessTempCarFeeConfigInfo.get("car_type"));
+        businessTempCarFeeConfigInfo.put("operate", businessTempCarFeeConfigInfo.get("operate"));
+        businessTempCarFeeConfigInfo.put("configId", businessTempCarFeeConfigInfo.get("config_id"));
+        businessTempCarFeeConfigInfo.put("feeName", businessTempCarFeeConfigInfo.get("fee_name"));
+        businessTempCarFeeConfigInfo.put("paId", businessTempCarFeeConfigInfo.get("pa_id"));
+        businessTempCarFeeConfigInfo.put("areaNum", businessTempCarFeeConfigInfo.get("area_num"));
+        businessTempCarFeeConfigInfo.put("startTime", businessTempCarFeeConfigInfo.get("start_time"));
+        businessTempCarFeeConfigInfo.put("endTime", businessTempCarFeeConfigInfo.get("end_time"));
+        businessTempCarFeeConfigInfo.put("ruleId", businessTempCarFeeConfigInfo.get("rule_id"));
+        businessTempCarFeeConfigInfo.put("communityId", businessTempCarFeeConfigInfo.get("community_id"));
+        businessTempCarFeeConfigInfo.remove("bId");
+        businessTempCarFeeConfigInfo.put("statusCd", statusCd);
+    }
+
+
+    /**
+     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
+     *
+     * @param businessTempCarFeeConfig 临时车收费标准信息
+     */
+    protected void autoSaveDelBusinessTempCarFeeConfig(Business business, JSONObject businessTempCarFeeConfig) {
+//自动插入DEL
+        Map info = new HashMap();
+        info.put("configId", businessTempCarFeeConfig.getString("configId"));
+        info.put("statusCd", StatusConstant.STATUS_CD_VALID);
+        List<Map> currentTempCarFeeConfigInfos = getTempCarFeeConfigServiceDaoImpl().getTempCarFeeConfigInfo(info);
+        if (currentTempCarFeeConfigInfos == null || currentTempCarFeeConfigInfos.size() != 1) {
+            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "未找到需要修改数据信息,入参错误或数据有问题,请检查" + info);
+        }
+
+        Map currentTempCarFeeConfigInfo = currentTempCarFeeConfigInfos.get(0);
+
+        currentTempCarFeeConfigInfo.put("bId", business.getbId());
+
+        currentTempCarFeeConfigInfo.put("carType", currentTempCarFeeConfigInfo.get("car_type"));
+        currentTempCarFeeConfigInfo.put("operate", currentTempCarFeeConfigInfo.get("operate"));
+        currentTempCarFeeConfigInfo.put("configId", currentTempCarFeeConfigInfo.get("config_id"));
+        currentTempCarFeeConfigInfo.put("feeName", currentTempCarFeeConfigInfo.get("fee_name"));
+        currentTempCarFeeConfigInfo.put("paId", currentTempCarFeeConfigInfo.get("pa_id"));
+        currentTempCarFeeConfigInfo.put("areaNum", currentTempCarFeeConfigInfo.get("area_num"));
+        currentTempCarFeeConfigInfo.put("startTime", currentTempCarFeeConfigInfo.get("start_time"));
+        currentTempCarFeeConfigInfo.put("endTime", currentTempCarFeeConfigInfo.get("end_time"));
+        currentTempCarFeeConfigInfo.put("ruleId", currentTempCarFeeConfigInfo.get("rule_id"));
+        currentTempCarFeeConfigInfo.put("communityId", currentTempCarFeeConfigInfo.get("community_id"));
+
+
+        currentTempCarFeeConfigInfo.put("operate", StatusConstant.OPERATE_DEL);
+        getTempCarFeeConfigServiceDaoImpl().saveBusinessTempCarFeeConfigInfo(currentTempCarFeeConfigInfo);
+        for (Object key : currentTempCarFeeConfigInfo.keySet()) {
+            if (businessTempCarFeeConfig.get(key) == null) {
+                businessTempCarFeeConfig.put(key.toString(), currentTempCarFeeConfigInfo.get(key));
+            }
+        }
+    }
+
+
+}

+ 180 - 0
service-fee/src/main/java/com/java110/fee/listener/tempCarFeeConfig/DeleteTempCarFeeConfigInfoListener.java

@@ -0,0 +1,180 @@
+package com.java110.fee.listener.tempCarFeeConfig;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.entity.center.Business;
+import com.java110.fee.dao.ITempCarFeeConfigServiceDao;
+import com.java110.po.tempCarFeeConfig.TempCarFeeConfigPo;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.constant.StatusConstant;
+import com.java110.utils.exception.ListenerExecuteException;
+import com.java110.utils.util.Assert;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 删除临时车收费标准信息 侦听
+ * <p>
+ * 处理节点
+ * 1、businessTempCarFeeConfig:{} 临时车收费标准基本信息节点
+ * 2、businessTempCarFeeConfigAttr:[{}] 临时车收费标准属性信息节点
+ * 3、businessTempCarFeeConfigPhoto:[{}] 临时车收费标准照片信息节点
+ * 4、businessTempCarFeeConfigCerdentials:[{}] 临时车收费标准证件信息节点
+ * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE
+ * Created by wuxw on 2018/5/18.
+ */
+@Java110Listener("deleteTempCarFeeConfigInfoListener")
+@Transactional
+public class DeleteTempCarFeeConfigInfoListener extends AbstractTempCarFeeConfigBusinessServiceDataFlowListener {
+
+    private final static Logger logger = LoggerFactory.getLogger(DeleteTempCarFeeConfigInfoListener.class);
+    @Autowired
+    ITempCarFeeConfigServiceDao tempCarFeeConfigServiceDaoImpl;
+
+    @Override
+    public int getOrder() {
+        return 3;
+    }
+
+    @Override
+    public String getBusinessTypeCd() {
+        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_TEMP_CAR_FEE_CONFIG_INFO;
+    }
+
+    /**
+     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
+     *
+     * @param dataFlowContext 数据对象
+     * @param business        当前业务对象
+     */
+    @Override
+    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
+        JSONObject data = business.getDatas();
+
+        Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理");
+
+        //处理 businessTempCarFeeConfig 节点
+        if (data.containsKey(TempCarFeeConfigPo.class.getSimpleName())) {
+            Object _obj = data.get(TempCarFeeConfigPo.class.getSimpleName());
+            JSONArray businessTempCarFeeConfigs = null;
+            if (_obj instanceof JSONObject) {
+                businessTempCarFeeConfigs = new JSONArray();
+                businessTempCarFeeConfigs.add(_obj);
+            } else {
+                businessTempCarFeeConfigs = (JSONArray) _obj;
+            }
+            //JSONObject businessTempCarFeeConfig = data.getJSONObject(TempCarFeeConfigPo.class.getSimpleName());
+            for (int _tempCarFeeConfigIndex = 0; _tempCarFeeConfigIndex < businessTempCarFeeConfigs.size(); _tempCarFeeConfigIndex++) {
+                JSONObject businessTempCarFeeConfig = businessTempCarFeeConfigs.getJSONObject(_tempCarFeeConfigIndex);
+                doBusinessTempCarFeeConfig(business, businessTempCarFeeConfig);
+                if (_obj instanceof JSONObject) {
+                    dataFlowContext.addParamOut("configId", businessTempCarFeeConfig.getString("configId"));
+                }
+            }
+
+        }
+
+
+    }
+
+    /**
+     * 删除 instance数据
+     *
+     * @param dataFlowContext 数据对象
+     * @param business        当前业务对象
+     */
+    @Override
+    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
+        String bId = business.getbId();
+        //Assert.hasLength(bId,"请求报文中没有包含 bId");
+
+        //临时车收费标准信息
+        Map info = new HashMap();
+        info.put("bId", business.getbId());
+        info.put("operate", StatusConstant.OPERATE_DEL);
+
+        //临时车收费标准信息
+        List<Map> businessTempCarFeeConfigInfos = tempCarFeeConfigServiceDaoImpl.getBusinessTempCarFeeConfigInfo(info);
+        if (businessTempCarFeeConfigInfos != null && businessTempCarFeeConfigInfos.size() > 0) {
+            for (int _tempCarFeeConfigIndex = 0; _tempCarFeeConfigIndex < businessTempCarFeeConfigInfos.size(); _tempCarFeeConfigIndex++) {
+                Map businessTempCarFeeConfigInfo = businessTempCarFeeConfigInfos.get(_tempCarFeeConfigIndex);
+                flushBusinessTempCarFeeConfigInfo(businessTempCarFeeConfigInfo, StatusConstant.STATUS_CD_INVALID);
+                tempCarFeeConfigServiceDaoImpl.updateTempCarFeeConfigInfoInstance(businessTempCarFeeConfigInfo);
+                dataFlowContext.addParamOut("configId", businessTempCarFeeConfigInfo.get("config_id"));
+            }
+        }
+
+    }
+
+    /**
+     * 撤单
+     * 从business表中查询到DEL的数据 将instance中的数据更新回来
+     *
+     * @param dataFlowContext 数据对象
+     * @param business        当前业务对象
+     */
+    @Override
+    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
+        String bId = business.getbId();
+        //Assert.hasLength(bId,"请求报文中没有包含 bId");
+        Map info = new HashMap();
+        info.put("bId", bId);
+        info.put("statusCd", StatusConstant.STATUS_CD_INVALID);
+
+        Map delInfo = new HashMap();
+        delInfo.put("bId", business.getbId());
+        delInfo.put("operate", StatusConstant.OPERATE_DEL);
+        //临时车收费标准信息
+        List<Map> tempCarFeeConfigInfo = tempCarFeeConfigServiceDaoImpl.getTempCarFeeConfigInfo(info);
+        if (tempCarFeeConfigInfo != null && tempCarFeeConfigInfo.size() > 0) {
+
+            //临时车收费标准信息
+            List<Map> businessTempCarFeeConfigInfos = tempCarFeeConfigServiceDaoImpl.getBusinessTempCarFeeConfigInfo(delInfo);
+            //除非程序出错了,这里不会为空
+            if (businessTempCarFeeConfigInfos == null || businessTempCarFeeConfigInfos.size() == 0) {
+                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR, "撤单失败(tempCarFeeConfig),程序内部异常,请检查! " + delInfo);
+            }
+            for (int _tempCarFeeConfigIndex = 0; _tempCarFeeConfigIndex < businessTempCarFeeConfigInfos.size(); _tempCarFeeConfigIndex++) {
+                Map businessTempCarFeeConfigInfo = businessTempCarFeeConfigInfos.get(_tempCarFeeConfigIndex);
+                flushBusinessTempCarFeeConfigInfo(businessTempCarFeeConfigInfo, StatusConstant.STATUS_CD_VALID);
+                tempCarFeeConfigServiceDaoImpl.updateTempCarFeeConfigInfoInstance(businessTempCarFeeConfigInfo);
+            }
+        }
+    }
+
+
+    /**
+     * 处理 businessTempCarFeeConfig 节点
+     *
+     * @param business                 总的数据节点
+     * @param businessTempCarFeeConfig 临时车收费标准节点
+     */
+    private void doBusinessTempCarFeeConfig(Business business, JSONObject businessTempCarFeeConfig) {
+
+        Assert.jsonObjectHaveKey(businessTempCarFeeConfig, "configId", "businessTempCarFeeConfig 节点下没有包含 configId 节点");
+
+        if (businessTempCarFeeConfig.getString("configId").startsWith("-")) {
+            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "configId 错误,不能自动生成(必须已经存在的configId)" + businessTempCarFeeConfig);
+        }
+        //自动插入DEL
+        autoSaveDelBusinessTempCarFeeConfig(business, businessTempCarFeeConfig);
+    }
+
+    @Override
+    public ITempCarFeeConfigServiceDao getTempCarFeeConfigServiceDaoImpl() {
+        return tempCarFeeConfigServiceDaoImpl;
+    }
+
+    public void setTempCarFeeConfigServiceDaoImpl(ITempCarFeeConfigServiceDao tempCarFeeConfigServiceDaoImpl) {
+        this.tempCarFeeConfigServiceDaoImpl = tempCarFeeConfigServiceDaoImpl;
+    }
+}

+ 181 - 0
service-fee/src/main/java/com/java110/fee/listener/tempCarFeeConfig/SaveTempCarFeeConfigInfoListener.java

@@ -0,0 +1,181 @@
+package com.java110.fee.listener.tempCarFeeConfig;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.entity.center.Business;
+import com.java110.fee.dao.ITempCarFeeConfigServiceDao;
+import com.java110.po.tempCarFeeConfig.TempCarFeeConfigPo;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.constant.StatusConstant;
+import com.java110.utils.util.Assert;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 保存 临时车收费标准信息 侦听
+ * Created by wuxw on 2018/5/18.
+ */
+@Java110Listener("saveTempCarFeeConfigInfoListener")
+@Transactional
+public class SaveTempCarFeeConfigInfoListener extends AbstractTempCarFeeConfigBusinessServiceDataFlowListener {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveTempCarFeeConfigInfoListener.class);
+
+    @Autowired
+    private ITempCarFeeConfigServiceDao tempCarFeeConfigServiceDaoImpl;
+
+    @Override
+    public int getOrder() {
+        return 0;
+    }
+
+    @Override
+    public String getBusinessTypeCd() {
+        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_TEMP_CAR_FEE_CONFIG_INFO;
+    }
+
+    /**
+     * 保存临时车收费标准信息 business 表中
+     *
+     * @param dataFlowContext 数据对象
+     * @param business        当前业务对象
+     */
+    @Override
+    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
+        JSONObject data = business.getDatas();
+        Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理");
+
+        //处理 businessTempCarFeeConfig 节点
+        if (data.containsKey(TempCarFeeConfigPo.class.getSimpleName())) {
+            Object bObj = data.get(TempCarFeeConfigPo.class.getSimpleName());
+            JSONArray businessTempCarFeeConfigs = null;
+            if (bObj instanceof JSONObject) {
+                businessTempCarFeeConfigs = new JSONArray();
+                businessTempCarFeeConfigs.add(bObj);
+            } else {
+                businessTempCarFeeConfigs = (JSONArray) bObj;
+            }
+            //JSONObject businessTempCarFeeConfig = data.getJSONObject(TempCarFeeConfigPo.class.getSimpleName());
+            for (int bTempCarFeeConfigIndex = 0; bTempCarFeeConfigIndex < businessTempCarFeeConfigs.size(); bTempCarFeeConfigIndex++) {
+                JSONObject businessTempCarFeeConfig = businessTempCarFeeConfigs.getJSONObject(bTempCarFeeConfigIndex);
+                doBusinessTempCarFeeConfig(business, businessTempCarFeeConfig);
+                if (bObj instanceof JSONObject) {
+                    dataFlowContext.addParamOut("configId", businessTempCarFeeConfig.getString("configId"));
+                }
+            }
+        }
+    }
+
+    /**
+     * business 数据转移到 instance
+     *
+     * @param dataFlowContext 数据对象
+     * @param business        当前业务对象
+     */
+    @Override
+    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
+        JSONObject data = business.getDatas();
+
+        Map info = new HashMap();
+        info.put("bId", business.getbId());
+        info.put("operate", StatusConstant.OPERATE_ADD);
+
+        //临时车收费标准信息
+        List<Map> businessTempCarFeeConfigInfo = tempCarFeeConfigServiceDaoImpl.getBusinessTempCarFeeConfigInfo(info);
+        if (businessTempCarFeeConfigInfo != null && businessTempCarFeeConfigInfo.size() > 0) {
+            reFreshShareColumn(info, businessTempCarFeeConfigInfo.get(0));
+            tempCarFeeConfigServiceDaoImpl.saveTempCarFeeConfigInfoInstance(info);
+            if (businessTempCarFeeConfigInfo.size() == 1) {
+                dataFlowContext.addParamOut("configId", businessTempCarFeeConfigInfo.get(0).get("config_id"));
+            }
+        }
+    }
+
+
+    /**
+     * 刷 分片字段
+     *
+     * @param info         查询对象
+     * @param businessInfo 小区ID
+     */
+    private void reFreshShareColumn(Map info, Map businessInfo) {
+
+        if (info.containsKey("community_id")) {
+            return;
+        }
+
+        if (!businessInfo.containsKey("communityId")) {
+            return;
+        }
+
+        info.put("community_id", businessInfo.get("communityId"));
+    }
+
+    /**
+     * 撤单
+     *
+     * @param dataFlowContext 数据对象
+     * @param business        当前业务对象
+     */
+    @Override
+    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
+        String bId = business.getbId();
+        //Assert.hasLength(bId,"请求报文中没有包含 bId");
+        Map info = new HashMap();
+        info.put("bId", bId);
+        info.put("statusCd", StatusConstant.STATUS_CD_VALID);
+        Map paramIn = new HashMap();
+        paramIn.put("bId", bId);
+        paramIn.put("statusCd", StatusConstant.STATUS_CD_INVALID);
+        //临时车收费标准信息
+        List<Map> tempCarFeeConfigInfo = tempCarFeeConfigServiceDaoImpl.getTempCarFeeConfigInfo(info);
+        if (tempCarFeeConfigInfo != null && tempCarFeeConfigInfo.size() > 0) {
+            reFreshShareColumn(paramIn, tempCarFeeConfigInfo.get(0));
+            tempCarFeeConfigServiceDaoImpl.updateTempCarFeeConfigInfoInstance(paramIn);
+        }
+    }
+
+
+    /**
+     * 处理 businessTempCarFeeConfig 节点
+     *
+     * @param business                 总的数据节点
+     * @param businessTempCarFeeConfig 临时车收费标准节点
+     */
+    private void doBusinessTempCarFeeConfig(Business business, JSONObject businessTempCarFeeConfig) {
+
+        Assert.jsonObjectHaveKey(businessTempCarFeeConfig, "configId", "businessTempCarFeeConfig 节点下没有包含 configId 节点");
+
+        if (businessTempCarFeeConfig.getString("configId").startsWith("-")) {
+            //刷新缓存
+            //flushTempCarFeeConfigId(business.getDatas());
+
+            businessTempCarFeeConfig.put("configId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId));
+
+        }
+
+        businessTempCarFeeConfig.put("bId", business.getbId());
+        businessTempCarFeeConfig.put("operate", StatusConstant.OPERATE_ADD);
+        //保存临时车收费标准信息
+        tempCarFeeConfigServiceDaoImpl.saveBusinessTempCarFeeConfigInfo(businessTempCarFeeConfig);
+
+    }
+
+    @Override
+    public ITempCarFeeConfigServiceDao getTempCarFeeConfigServiceDaoImpl() {
+        return tempCarFeeConfigServiceDaoImpl;
+    }
+
+    public void setTempCarFeeConfigServiceDaoImpl(ITempCarFeeConfigServiceDao tempCarFeeConfigServiceDaoImpl) {
+        this.tempCarFeeConfigServiceDaoImpl = tempCarFeeConfigServiceDaoImpl;
+    }
+}

+ 190 - 0
service-fee/src/main/java/com/java110/fee/listener/tempCarFeeConfig/UpdateTempCarFeeConfigInfoListener.java

@@ -0,0 +1,190 @@
+package com.java110.fee.listener.tempCarFeeConfig;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.entity.center.Business;
+import com.java110.fee.dao.ITempCarFeeConfigServiceDao;
+import com.java110.po.tempCarFeeConfig.TempCarFeeConfigPo;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.constant.StatusConstant;
+import com.java110.utils.exception.ListenerExecuteException;
+import com.java110.utils.util.Assert;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 修改临时车收费标准信息 侦听
+ * <p>
+ * 处理节点
+ * 1、businessTempCarFeeConfig:{} 临时车收费标准基本信息节点
+ * 2、businessTempCarFeeConfigAttr:[{}] 临时车收费标准属性信息节点
+ * 3、businessTempCarFeeConfigPhoto:[{}] 临时车收费标准照片信息节点
+ * 4、businessTempCarFeeConfigCerdentials:[{}] 临时车收费标准证件信息节点
+ * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E4%BF%AE%E6%94%B9%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE
+ * Created by wuxw on 2018/5/18.
+ */
+@Java110Listener("updateTempCarFeeConfigInfoListener")
+@Transactional
+public class UpdateTempCarFeeConfigInfoListener extends AbstractTempCarFeeConfigBusinessServiceDataFlowListener {
+
+    private static Logger logger = LoggerFactory.getLogger(UpdateTempCarFeeConfigInfoListener.class);
+    @Autowired
+    private ITempCarFeeConfigServiceDao tempCarFeeConfigServiceDaoImpl;
+
+    @Override
+    public int getOrder() {
+        return 2;
+    }
+
+    @Override
+    public String getBusinessTypeCd() {
+        return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_TEMP_CAR_FEE_CONFIG_INFO;
+    }
+
+    /**
+     * business过程
+     *
+     * @param dataFlowContext 上下文对象
+     * @param business        业务对象
+     */
+    @Override
+    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
+
+        JSONObject data = business.getDatas();
+
+        Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理");
+
+
+        //处理 businessTempCarFeeConfig 节点
+        if (data.containsKey(TempCarFeeConfigPo.class.getSimpleName())) {
+            Object _obj = data.get(TempCarFeeConfigPo.class.getSimpleName());
+            JSONArray businessTempCarFeeConfigs = null;
+            if (_obj instanceof JSONObject) {
+                businessTempCarFeeConfigs = new JSONArray();
+                businessTempCarFeeConfigs.add(_obj);
+            } else {
+                businessTempCarFeeConfigs = (JSONArray) _obj;
+            }
+            //JSONObject businessTempCarFeeConfig = data.getJSONObject(TempCarFeeConfigPo.class.getSimpleName());
+            for (int _tempCarFeeConfigIndex = 0; _tempCarFeeConfigIndex < businessTempCarFeeConfigs.size(); _tempCarFeeConfigIndex++) {
+                JSONObject businessTempCarFeeConfig = businessTempCarFeeConfigs.getJSONObject(_tempCarFeeConfigIndex);
+                doBusinessTempCarFeeConfig(business, businessTempCarFeeConfig);
+                if (_obj instanceof JSONObject) {
+                    dataFlowContext.addParamOut("configId", businessTempCarFeeConfig.getString("configId"));
+                }
+            }
+        }
+    }
+
+
+    /**
+     * business to instance 过程
+     *
+     * @param dataFlowContext 数据对象
+     * @param business        当前业务对象
+     */
+    @Override
+    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
+
+        JSONObject data = business.getDatas();
+
+        Map info = new HashMap();
+        info.put("bId", business.getbId());
+        info.put("operate", StatusConstant.OPERATE_ADD);
+
+        //临时车收费标准信息
+        List<Map> businessTempCarFeeConfigInfos = tempCarFeeConfigServiceDaoImpl.getBusinessTempCarFeeConfigInfo(info);
+        if (businessTempCarFeeConfigInfos != null && businessTempCarFeeConfigInfos.size() > 0) {
+            for (int _tempCarFeeConfigIndex = 0; _tempCarFeeConfigIndex < businessTempCarFeeConfigInfos.size(); _tempCarFeeConfigIndex++) {
+                Map businessTempCarFeeConfigInfo = businessTempCarFeeConfigInfos.get(_tempCarFeeConfigIndex);
+                flushBusinessTempCarFeeConfigInfo(businessTempCarFeeConfigInfo, StatusConstant.STATUS_CD_VALID);
+                tempCarFeeConfigServiceDaoImpl.updateTempCarFeeConfigInfoInstance(businessTempCarFeeConfigInfo);
+                if (businessTempCarFeeConfigInfo.size() == 1) {
+                    dataFlowContext.addParamOut("configId", businessTempCarFeeConfigInfo.get("config_id"));
+                }
+            }
+        }
+
+    }
+
+    /**
+     * 撤单
+     *
+     * @param dataFlowContext 数据对象
+     * @param business        当前业务对象
+     */
+    @Override
+    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
+
+        String bId = business.getbId();
+        //Assert.hasLength(bId,"请求报文中没有包含 bId");
+        Map info = new HashMap();
+        info.put("bId", bId);
+        info.put("statusCd", StatusConstant.STATUS_CD_VALID);
+        Map delInfo = new HashMap();
+        delInfo.put("bId", business.getbId());
+        delInfo.put("operate", StatusConstant.OPERATE_DEL);
+        //临时车收费标准信息
+        List<Map> tempCarFeeConfigInfo = tempCarFeeConfigServiceDaoImpl.getTempCarFeeConfigInfo(info);
+        if (tempCarFeeConfigInfo != null && tempCarFeeConfigInfo.size() > 0) {
+
+            //临时车收费标准信息
+            List<Map> businessTempCarFeeConfigInfos = tempCarFeeConfigServiceDaoImpl.getBusinessTempCarFeeConfigInfo(delInfo);
+            //除非程序出错了,这里不会为空
+            if (businessTempCarFeeConfigInfos == null || businessTempCarFeeConfigInfos.size() == 0) {
+                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR, "撤单失败(tempCarFeeConfig),程序内部异常,请检查! " + delInfo);
+            }
+            for (int _tempCarFeeConfigIndex = 0; _tempCarFeeConfigIndex < businessTempCarFeeConfigInfos.size(); _tempCarFeeConfigIndex++) {
+                Map businessTempCarFeeConfigInfo = businessTempCarFeeConfigInfos.get(_tempCarFeeConfigIndex);
+                flushBusinessTempCarFeeConfigInfo(businessTempCarFeeConfigInfo, StatusConstant.STATUS_CD_VALID);
+                tempCarFeeConfigServiceDaoImpl.updateTempCarFeeConfigInfoInstance(businessTempCarFeeConfigInfo);
+            }
+        }
+
+    }
+
+
+    /**
+     * 处理 businessTempCarFeeConfig 节点
+     *
+     * @param business                 总的数据节点
+     * @param businessTempCarFeeConfig 临时车收费标准节点
+     */
+    private void doBusinessTempCarFeeConfig(Business business, JSONObject businessTempCarFeeConfig) {
+
+        Assert.jsonObjectHaveKey(businessTempCarFeeConfig, "configId", "businessTempCarFeeConfig 节点下没有包含 configId 节点");
+
+        if (businessTempCarFeeConfig.getString("configId").startsWith("-")) {
+            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "configId 错误,不能自动生成(必须已经存在的configId)" + businessTempCarFeeConfig);
+        }
+        //自动保存DEL
+        autoSaveDelBusinessTempCarFeeConfig(business, businessTempCarFeeConfig);
+
+        businessTempCarFeeConfig.put("bId", business.getbId());
+        businessTempCarFeeConfig.put("operate", StatusConstant.OPERATE_ADD);
+        //保存临时车收费标准信息
+        tempCarFeeConfigServiceDaoImpl.saveBusinessTempCarFeeConfigInfo(businessTempCarFeeConfig);
+
+    }
+
+
+    @Override
+    public ITempCarFeeConfigServiceDao getTempCarFeeConfigServiceDaoImpl() {
+        return tempCarFeeConfigServiceDaoImpl;
+    }
+
+    public void setTempCarFeeConfigServiceDaoImpl(ITempCarFeeConfigServiceDao tempCarFeeConfigServiceDaoImpl) {
+        this.tempCarFeeConfigServiceDaoImpl = tempCarFeeConfigServiceDaoImpl;
+    }
+
+
+}

+ 92 - 0
service-fee/src/main/java/com/java110/fee/smo/impl/TempCarFeeConfigInnerServiceSMOImpl.java

@@ -0,0 +1,92 @@
+package com.java110.fee.smo.impl;
+
+
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.core.smo.fee.ITempCarFeeConfigInnerServiceSMO;
+import com.java110.dto.PageDto;
+import com.java110.dto.tempCarFeeConfig.TempCarFeeConfigDto;
+import com.java110.dto.user.UserDto;
+import com.java110.fee.dao.ITempCarFeeConfigServiceDao;
+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.ArrayList;
+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 TempCarFeeConfigInnerServiceSMOImpl extends BaseServiceSMO implements ITempCarFeeConfigInnerServiceSMO {
+
+    @Autowired
+    private ITempCarFeeConfigServiceDao tempCarFeeConfigServiceDaoImpl;
+
+
+    @Override
+    public List<TempCarFeeConfigDto> queryTempCarFeeConfigs(@RequestBody TempCarFeeConfigDto tempCarFeeConfigDto) {
+
+        //校验是否传了 分页信息
+
+        int page = tempCarFeeConfigDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            tempCarFeeConfigDto.setPage((page - 1) * tempCarFeeConfigDto.getRow());
+        }
+
+        List<TempCarFeeConfigDto> tempCarFeeConfigs = BeanConvertUtil.covertBeanList(tempCarFeeConfigServiceDaoImpl.getTempCarFeeConfigInfo(BeanConvertUtil.beanCovertMap(tempCarFeeConfigDto)), TempCarFeeConfigDto.class);
+
+        return tempCarFeeConfigs;
+    }
+
+    /**
+     * 从用户列表中查询用户,将用户中的信息 刷新到 floor对象中
+     *
+     * @param tempCarFeeConfig 小区临时车收费标准信息
+     * @param users            用户列表
+     */
+    private void refreshTempCarFeeConfig(TempCarFeeConfigDto tempCarFeeConfig, List<UserDto> users) {
+        for (UserDto user : users) {
+            if (tempCarFeeConfig.getConfigId().equals(user.getUserId())) {
+                BeanConvertUtil.covertBean(user, tempCarFeeConfig);
+            }
+        }
+    }
+
+    /**
+     * 获取批量userId
+     *
+     * @param tempCarFeeConfigs 小区楼信息
+     * @return 批量userIds 信息
+     */
+    private String[] getUserIds(List<TempCarFeeConfigDto> tempCarFeeConfigs) {
+        List<String> userIds = new ArrayList<String>();
+        for (TempCarFeeConfigDto tempCarFeeConfig : tempCarFeeConfigs) {
+            userIds.add(tempCarFeeConfig.getConfigId());
+        }
+
+        return userIds.toArray(new String[userIds.size()]);
+    }
+
+    @Override
+    public int queryTempCarFeeConfigsCount(@RequestBody TempCarFeeConfigDto tempCarFeeConfigDto) {
+        return tempCarFeeConfigServiceDaoImpl.queryTempCarFeeConfigsCount(BeanConvertUtil.beanCovertMap(tempCarFeeConfigDto));
+    }
+
+    public ITempCarFeeConfigServiceDao getTempCarFeeConfigServiceDaoImpl() {
+        return tempCarFeeConfigServiceDaoImpl;
+    }
+
+    public void setTempCarFeeConfigServiceDaoImpl(ITempCarFeeConfigServiceDao tempCarFeeConfigServiceDaoImpl) {
+        this.tempCarFeeConfigServiceDaoImpl = tempCarFeeConfigServiceDaoImpl;
+    }
+
+
+}

+ 1 - 1
service-front/src/main/java/com/java110/front/controller/CallComponentController.java

@@ -186,7 +186,7 @@ public class CallComponentController extends BaseController {
             responseEntity = new ResponseEntity<>(msg, HttpStatus.INTERNAL_SERVER_ERROR);
         } finally {
             logger.debug("组件调用返回信息为{}", responseEntity);
-            logger.debug(componentCode + "::" + componentMethod + "back耗时:" + (DateUtil.getCurrentDate().getTime() - startTime));
+            logger.debug(componentCode + "::" + componentMethod + "调用back耗时:" + (DateUtil.getCurrentDate().getTime() - startTime));
             if (responseEntity.getStatusCode() == HttpStatus.OK) {
                 return responseEntity;
             }