Kaynağa Gözat

报修设置加入办理时长和超时预警功能

wuxw 1 yıl önce
ebeveyn
işleme
ad3bee0c54

+ 19 - 0
java110-bean/src/main/java/com/java110/dto/repair/RepairSettingDto.java

@@ -39,6 +39,9 @@ public class RepairSettingDto extends PageDto implements Serializable {
 
     private String notifyWay;
 
+    private int doTime;
+    private int warningTime;
+
     public String getRepairTypeName() {
         return repairTypeName;
     }
@@ -198,4 +201,20 @@ public class RepairSettingDto extends PageDto implements Serializable {
     public void setCommunityIds(String[] communityIds) {
         this.communityIds = communityIds;
     }
+
+    public int getDoTime() {
+        return doTime;
+    }
+
+    public void setDoTime(int doTime) {
+        this.doTime = doTime;
+    }
+
+    public int getWarningTime() {
+        return warningTime;
+    }
+
+    public void setWarningTime(int warningTime) {
+        this.warningTime = warningTime;
+    }
 }

+ 19 - 0
java110-bean/src/main/java/com/java110/po/repair/RepairSettingPo.java

@@ -19,6 +19,9 @@ public class RepairSettingPo implements Serializable {
 
     private String notifyWay;
 
+    private int doTime;
+    private int warningTime;
+
     public String getRepairTypeName() {
         return repairTypeName;
     }
@@ -130,4 +133,20 @@ public class RepairSettingPo implements Serializable {
     public void setNotifyWay(String notifyWay) {
         this.notifyWay = notifyWay;
     }
+
+    public int getDoTime() {
+        return doTime;
+    }
+
+    public void setDoTime(int doTime) {
+        this.doTime = doTime;
+    }
+
+    public int getWarningTime() {
+        return warningTime;
+    }
+
+    public void setWarningTime(int warningTime) {
+        this.warningTime = warningTime;
+    }
 }

+ 0 - 265
java110-db/src/main/resources/mapper/community/RepairSettingServiceDaoImplMapper.xml

@@ -1,265 +0,0 @@
-<?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="repairSettingServiceDaoImpl">
-
-    <!-- 保存报修设置信息 add by wuxw 2018-07-03 -->
-    <insert id="saveBusinessRepairSettingInfo" parameterType="Map">
-        insert into business_repair_setting(operate, repair_type_name, repair_type, repair_setting_type, remark, b_id,
-                                            community_id, repair_way, setting_id, public_area, pay_fee_flag,
-                                            price_scope, return_visit_flag, is_show)
-        values (#{operate}, #{repairTypeName}, #{repairType}, #{repairSettingType}, #{remark}, #{bId}, #{communityId},
-                #{repairWay}, #{settingId}, #{publicArea}, #{payFeeFlag}, #{priceScope}, #{returnVisitFlag}, #{isShow})
-    </insert>
-
-    <!-- 查询报修设置信息(Business) add by wuxw 2018-07-03 -->
-    <select id="getBusinessRepairSettingInfo" parameterType="Map" resultType="Map">
-        select t.operate,t.repair_type_name,t.repair_type_name repairTypeName,t.repair_type,t.repair_type
-        repairType,t.repair_setting_type,t.repair_setting_type repairSettingType,t.remark,t.b_id,t.b_id
-        bId,t.community_id,t.community_id communityId,t.repair_way,t.repair_way
-        repairWay,t.setting_id,t.setting_id settingId,t.public_area,t.public_area
-        publicArea,t.pay_fee_flag,t.pay_fee_flag payFeeFlag
-        ,t.price_scope,t.price_scope priceScope,t.return_visit_flag,t.return_visit_flag returnVisitFlag
-        ,t.is_show,t.is_show isShow
-        from business_repair_setting t
-        where 1 =1
-        <if test="operate !=null and operate != ''">
-            and t.operate= #{operate}
-        </if>
-        <if test="repairTypeName !=null and repairTypeName != ''">
-            and t.repair_type_name= #{repairTypeName}
-        </if>
-        <if test="repairType !=null and repairType != ''">
-            and t.repair_type= #{repairType}
-        </if>
-        <if test="repairSettingType !=null and repairSettingType != ''">
-            and t.repair_setting_type= #{repairSettingType}
-        </if>
-        <if test="remark !=null and remark != ''">
-            and t.remark= #{remark}
-        </if>
-        <if test="bId !=null and bId != ''">
-            and t.b_id= #{bId}
-        </if>
-        <if test="communityId !=null and communityId != ''">
-            and t.community_id= #{communityId}
-        </if>
-        <if test="repairWay !=null and repairWay != ''">
-            and t.repair_way= #{repairWay}
-        </if>
-        <if test="settingId !=null and settingId != ''">
-            and t.setting_id= #{settingId}
-        </if>
-        <if test="isShow !=null and isShow != ''">
-            and t.is_show= #{isShow}
-        </if>
-    </select>
-
-    <!-- 保存报修设置信息至 instance表中 add by wuxw 2018-07-03 -->
-    <insert id="saveRepairSettingInfoInstance" parameterType="Map">
-        insert into r_repair_setting(
-        repair_type_name,repair_type,repair_setting_type,remark,status_cd,b_id,community_id,repair_way,setting_id,public_area
-        ,pay_fee_flag,price_scope,return_visit_flag,is_show
-        ) select
-        t.repair_type_name,t.repair_type,t.repair_setting_type,t.remark,'0',t.b_id,t.community_id,t.repair_way,t.setting_id
-        ,t.public_area,t.pay_fee_flag,t.price_scope,t.return_visit_flag,t.is_show
-        from business_repair_setting t where 1=1
-        and t.operate= 'ADD'
-        <if test="repairTypeName !=null and repairTypeName != ''">
-            and t.repair_type_name= #{repairTypeName}
-        </if>
-        <if test="repairType !=null and repairType != ''">
-            and t.repair_type= #{repairType}
-        </if>
-        <if test="repairSettingType and repairSettingType != ''">
-            and t.repair_setting_type= #{repairSettingType}
-        </if>
-        <if test="remark !=null and remark != ''">
-            and t.remark= #{remark}
-        </if>
-        <if test="bId !=null and bId != ''">
-            and t.b_id= #{bId}
-        </if>
-        <if test="communityId !=null and communityId != ''">
-            and t.community_id= #{communityId}
-        </if>
-        <if test="repairWay !=null and repairWay != ''">
-            and t.repair_way= #{repairWay}
-        </if>
-        <if test="settingId !=null and settingId != ''">
-            and t.setting_id= #{settingId}
-        </if>
-        <if test="isShow !=null and isShow != ''">
-            and t.is_show= #{isShow}
-        </if>
-    </insert>
-
-    <!-- 查询报修设置信息 add by wuxw 2018-07-03 -->
-    <select id="getRepairSettingInfo" parameterType="Map" resultType="Map">
-        select t.repair_type_name,t.repair_type_name repairTypeName,t.repair_type,t.repair_type
-        repairType,t.repair_setting_type,t.repair_setting_type repairSettingType,t.remark,t.status_cd,t.status_cd
-        statusCd,t.b_id,t.b_id bId,t.community_id,t.community_id
-        communityId,t.repair_way,t.repair_way repairWay,t.setting_id,t.setting_id settingId,t.create_time
-        createTime,d.name repairWayName,d2.name repairSettingTypeName,
-        t.public_area,t.public_area publicArea,t.pay_fee_flag,t.pay_fee_flag payFeeFlag
-        ,t.price_scope,t.price_scope priceScope,t.return_visit_flag,t.return_visit_flag returnVisitFlag,d1.name
-        returnVisitFlagName,t.is_show,t.is_show isShow,t.notify_way notifyWay
-        from r_repair_setting t
-        left join t_dict d on t.repair_way = d.status_cd and d.table_name = 'r_repair_setting' and d.table_columns
-        ='repair_way'
-        left join t_dict d1 on t.return_visit_flag = d1.status_cd and d1.table_name = 'r_repair_setting' and
-        d1.table_columns = 'return_visit_flag'
-        left join t_dict d2 on t.repair_setting_type = d2.status_cd and d2.table_name = 'r_repair_setting' and
-        d2.table_columns = 'repair_setting_type'
-        where 1 =1
-        <if test="repairTypeName !=null and repairTypeName != ''">
-            and t.repair_type_name like '%${repairTypeName}%'
-        </if>
-        <if test="repairType !=null and repairType != ''">
-            and t.repair_type= #{repairType}
-        </if>
-        <if test="notifyWay !=null and notifyWay != ''">
-            and t.notify_way= #{notifyWay}
-        </if>
-        <if test="repairSettingType !=null and repairSettingType != ''">
-            and t.repair_setting_type= #{repairSettingType}
-        </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="bId !=null and bId != ''">
-            and t.b_id= #{bId}
-        </if>
-        <if test="communityId !=null and communityId != ''">
-            and t.community_id= #{communityId}
-        </if>
-        <if test="repairWay !=null and repairWay != ''">
-            and t.repair_way= #{repairWay}
-        </if>
-        <if test="settingId !=null and settingId != ''">
-            and t.setting_id= #{settingId}
-        </if>
-        <if test="publicArea !=null and publicArea != ''">
-            and t.public_area= #{publicArea}
-        </if>
-        <if test="payFeeFlag !=null and payFeeFlag != ''">
-            and t.pay_fee_flag= #{payFeeFlag}
-        </if>
-        <if test="returnVisitFlag !=null and returnVisitFlag != ''">
-            and t.return_visit_flag= #{returnVisitFlag}
-        </if>
-        <if test="isShow !=null and isShow != ''">
-            and t.is_show= #{isShow}
-        </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="updateRepairSettingInfoInstance" parameterType="Map">
-        update r_repair_setting t set t.status_cd = #{statusCd}
-        <if test="newBId != null and newBId != ''">
-            ,t.b_id = #{newBId}
-        </if>
-        <if test="repairTypeName !=null and repairTypeName != ''">
-            , t.repair_type_name= #{repairTypeName}
-        </if>
-        <if test="repairType !=null and repairType != ''">
-            , t.repair_type= #{repairType}
-        </if>
-        <if test="repairSettingType !=null and repairSettingType != ''">
-            , t.repair_setting_type= #{repairSettingType}
-        </if>
-        <if test="remark !=null and remark != ''">
-            , t.remark= #{remark}
-        </if>
-
-        <if test="repairWay !=null and repairWay != ''">
-            , t.repair_way= #{repairWay}
-        </if>
-        <if test="publicArea !=null and publicArea != ''">
-            , t.public_area= #{publicArea}
-        </if>
-        <if test="payFeeFlag !=null and payFeeFlag != ''">
-            , t.pay_fee_flag= #{payFeeFlag}
-        </if>
-        <if test="returnVisitFlag !=null and returnVisitFlag != ''">
-            , t.return_visit_flag= #{returnVisitFlag}
-        </if>
-        <if test="priceScope !=null and priceScope != ''">
-            , t.price_scope= #{priceScope}
-        </if>
-        <if test="isShow !=null and isShow != ''">
-            , t.is_show= #{isShow}
-        </if>
-        <if test="notifyWay !=null and notifyWay != ''">
-            , t.notify_way= #{notifyWay}
-        </if>
-        where 1=1
-        <if test="bId !=null and bId != ''">
-            and t.b_id= #{bId}
-        </if>
-        <if test="settingId !=null and settingId != ''">
-            and t.setting_id= #{settingId}
-        </if>
-        <if test="communityId !=null and communityId != ''">
-            and t.community_id= #{communityId}
-        </if>
-    </update>
-
-    <!-- 查询报修设置数量 add by wuxw 2018-07-03 -->
-    <select id="queryRepairSettingsCount" parameterType="Map" resultType="Map">
-        select count(1) count
-        from r_repair_setting t
-        left join t_dict d on t.repair_way = d.status_cd and d.table_name = 'r_repair_setting' and d.table_columns =
-        'repair_way'
-        where 1 =1
-        <if test="repairTypeName !=null and repairTypeName != ''">
-            and t.repair_type_name like '%${repairTypeName}%'
-        </if>
-        <if test="repairType !=null and repairType != ''">
-            and t.repair_type= #{repairType}
-        </if>
-        <if test="repairSettingType !=null and repairSettingType != ''">
-            and t.repair_setting_type= #{repairSettingType}
-        </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="bId !=null and bId != ''">
-            and t.b_id= #{bId}
-        </if>
-        <if test="communityId !=null and communityId != ''">
-            and t.community_id= #{communityId}
-        </if>
-        <if test="repairWay !=null and repairWay != ''">
-            and t.repair_way= #{repairWay}
-        </if>
-        <if test="settingId !=null and settingId != ''">
-            and t.setting_id= #{settingId}
-        </if>
-        <if test="publicArea !=null and publicArea != ''">
-            and t.public_area= #{publicArea}
-        </if>
-        <if test="payFeeFlag !=null and payFeeFlag != ''">
-            and t.pay_fee_flag= #{payFeeFlag}
-        </if>
-        <if test="returnVisitFlag !=null and returnVisitFlag != ''">
-            and t.return_visit_flag= #{returnVisitFlag}
-        </if>
-        <if test="isShow !=null and isShow != ''">
-            and t.is_show= #{isShow}
-        </if>
-        <if test="notifyWay !=null and notifyWay != ''">
-            and t.notify_way= #{notifyWay}
-        </if>
-    </select>
-</mapper>

+ 27 - 7
java110-db/src/main/resources/mapper/community/RepairSettingV1ServiceDaoImplMapper.xml

@@ -7,19 +7,33 @@
     <insert id="saveRepairSettingInfo" parameterType="Map">
         insert into r_repair_setting(price_scope, pay_fee_flag, return_visit_flag, repair_type_name, repair_type,
                                      remark, community_id, public_area, repair_way, repair_setting_type, setting_id,
-                                     is_show,notify_way)
+                                     is_show,notify_way,do_time,warning_time)
         values (#{priceScope}, #{payFeeFlag}, #{returnVisitFlag}, #{repairTypeName}, #{repairType}, #{remark},
-                #{communityId}, #{publicArea}, #{repairWay}, #{repairSettingType}, #{settingId}, #{isShow},#{notifyWay})
+                #{communityId}, #{publicArea}, #{repairWay}, #{repairSettingType}, #{settingId}, #{isShow},#{notifyWay}
+        , #{doTime},#{warningTime}
+        )
     </insert>
     <!-- 查询报修设置信息 add by wuxw 2018-07-03 -->
     <select id="getRepairSettingInfo" parameterType="Map" resultType="Map">
-        select t.price_scope priceScope,t.pay_fee_flag
-        payFeeFlag,t.return_visit_flag returnVisitFlag,t.repair_type_name
-        repairTypeName,t.repair_type repairType,t.remark,t.status_cd
-        statusCd,t.community_id communityId,t.public_area publicArea,t.repair_way repairWay,t.repair_setting_type
-        repairSettingType,t.setting_id settingId,t.is_show isShow,t.notify_way notifyWay
+        select t.repair_type_name,t.repair_type_name repairTypeName,t.repair_type,t.repair_type
+        repairType,t.repair_setting_type,t.repair_setting_type repairSettingType,t.remark,t.status_cd,t.status_cd
+        statusCd,t.b_id,t.b_id bId,t.community_id,t.community_id
+        communityId,t.repair_way,t.repair_way repairWay,t.setting_id,t.setting_id settingId,t.create_time
+        createTime,d.name repairWayName,d2.name repairSettingTypeName,
+        t.public_area,t.public_area publicArea,t.pay_fee_flag,t.pay_fee_flag payFeeFlag
+        ,t.price_scope,t.price_scope priceScope,t.return_visit_flag,t.return_visit_flag returnVisitFlag,d1.name
+        returnVisitFlagName,t.is_show,t.is_show isShow,t.notify_way notifyWay,t.do_time doTime,t.warning_time warningTime
         from r_repair_setting t
+        left join t_dict d on t.repair_way = d.status_cd and d.table_name = 'r_repair_setting' and d.table_columns
+        ='repair_way'
+        left join t_dict d1 on t.return_visit_flag = d1.status_cd and d1.table_name = 'r_repair_setting' and
+        d1.table_columns = 'return_visit_flag'
+        left join t_dict d2 on t.repair_setting_type = d2.status_cd and d2.table_name = 'r_repair_setting' and
+        d2.table_columns = 'repair_setting_type'
         where 1 =1
+        <if test="repairTypeName !=null and repairTypeName != ''">
+            and t.repair_type_name like '%${repairTypeName}%'
+        </if>
         <if test="priceScope !=null and priceScope != ''">
             and t.price_scope= #{priceScope}
         </if>
@@ -108,6 +122,12 @@
         <if test="notifyWay !=null and notifyWay != ''">
             , t.notify_way= #{notifyWay}
         </if>
+        <if test="doTime !=null and doTime != ''">
+            , t.do_time= #{doTime}
+        </if>
+        <if test="warningTime !=null and warningTime != ''">
+            , t.warning_time= #{warningTime}
+        </if>
         where 1=1
         <if test="settingId !=null and settingId != ''">
             and t.setting_id= #{settingId}

+ 0 - 41
java110-interface/src/main/java/com/java110/intf/community/IRepairSettingInnerServiceSMO.java

@@ -1,41 +0,0 @@
-package com.java110.intf.community;
-
-import com.java110.config.feign.FeignConfiguration;
-import com.java110.dto.repair.RepairSettingDto;
-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 IRepairSettingInnerServiceSMO
- * @Description 报修设置接口类
- * @Author wuxw
- * @Date 2019/4/24 9:04
- * @Version 1.0
- * add by wuxw 2019/4/24
- **/
-@FeignClient(name = "community-service", configuration = {FeignConfiguration.class})
-@RequestMapping("/repairSettingApi")
-public interface IRepairSettingInnerServiceSMO {
-
-    /**
-     * <p>查询小区楼信息</p>
-     *
-     * @param repairSettingDto 数据对象分享
-     * @return RepairSettingDto 对象数据
-     */
-    @RequestMapping(value = "/queryRepairSettings", method = RequestMethod.POST)
-    List<RepairSettingDto> queryRepairSettings(@RequestBody RepairSettingDto repairSettingDto);
-
-    /**
-     * 查询<p>小区楼</p>总记录数
-     *
-     * @param repairSettingDto 数据对象分享
-     * @return 小区下的小区楼记录数
-     */
-    @RequestMapping(value = "/queryRepairSettingsCount", method = RequestMethod.POST)
-    int queryRepairSettingsCount(@RequestBody RepairSettingDto repairSettingDto);
-}

+ 3 - 3
java110-interface/src/main/java/com/java110/intf/community/IRepairSettingV1InnerServiceSMO.java

@@ -39,13 +39,13 @@ public interface IRepairSettingV1InnerServiceSMO {
 
 
     @RequestMapping(value = "/saveRepairSetting", method = RequestMethod.POST)
-    public int saveRepairSetting(@RequestBody RepairSettingPo repairSettingPo);
+     int saveRepairSetting(@RequestBody RepairSettingPo repairSettingPo);
 
     @RequestMapping(value = "/updateRepairSetting", method = RequestMethod.POST)
-    public int updateRepairSetting(@RequestBody  RepairSettingPo repairSettingPo);
+     int updateRepairSetting(@RequestBody  RepairSettingPo repairSettingPo);
 
     @RequestMapping(value = "/deleteRepairSetting", method = RequestMethod.POST)
-    public int deleteRepairSetting(@RequestBody  RepairSettingPo repairSettingPo);
+     int deleteRepairSetting(@RequestBody  RepairSettingPo repairSettingPo);
 
     /**
      * <p>查询小区楼信息</p>

+ 4 - 4
service-community/src/main/java/com/java110/community/cmd/repair/ListRepairSettingsCmd.java

@@ -21,7 +21,7 @@ import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
 import com.java110.dto.repair.RepairSettingDto;
-import com.java110.intf.community.IRepairSettingInnerServiceSMO;
+import com.java110.intf.community.IRepairSettingV1InnerServiceSMO;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
@@ -51,7 +51,7 @@ public class ListRepairSettingsCmd extends Cmd {
     private static Logger logger = LoggerFactory.getLogger(ListRepairSettingsCmd.class);
 
     @Autowired
-    private IRepairSettingInnerServiceSMO repairSettingInnerServiceSMOImpl;
+    private IRepairSettingV1InnerServiceSMO repairSettingV1InnerServiceSMOImpl;
 
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
@@ -64,12 +64,12 @@ public class ListRepairSettingsCmd extends Cmd {
 
         RepairSettingDto repairSettingDto = BeanConvertUtil.covertBean(reqJson, RepairSettingDto.class);
 
-        int count = repairSettingInnerServiceSMOImpl.queryRepairSettingsCount(repairSettingDto);
+        int count = repairSettingV1InnerServiceSMOImpl.queryRepairSettingsCount(repairSettingDto);
 
         List<RepairSettingDto> repairSettingDtos = null;
 
         if (count > 0) {
-            repairSettingDtos = repairSettingInnerServiceSMOImpl.queryRepairSettings(repairSettingDto);
+            repairSettingDtos = repairSettingV1InnerServiceSMOImpl.queryRepairSettings(repairSettingDto);
         } else {
             repairSettingDtos = new ArrayList<>();
         }

+ 2 - 0
service-community/src/main/java/com/java110/community/cmd/repair/SaveRepairSettingCmd.java

@@ -60,6 +60,8 @@ public class SaveRepairSettingCmd extends Cmd {
         Assert.hasKeyAndValue(reqJson, "publicArea", "请求报文中未包含公共区域");
         Assert.hasKeyAndValue(reqJson, "payFeeFlag", "请求报文中未包含收费情况");
         Assert.hasKeyAndValue(reqJson, "returnVisitFlag", "请求报文中未包含回访设置");
+        Assert.hasKeyAndValue(reqJson, "doTime", "请求报文中未包含办理时长");
+        Assert.hasKeyAndValue(reqJson, "warning", "请求报文中未包含超时预警");
 
     }
 

+ 0 - 77
service-community/src/main/java/com/java110/community/dao/IRepairSettingServiceDao.java

@@ -1,77 +0,0 @@
-package com.java110.community.dao;
-
-
-import com.java110.utils.exception.DAOException;
-
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 报修设置组件内部之间使用,没有给外围系统提供服务能力
- * 报修设置服务接口类,要求全部以字符串传输,方便微服务化
- * 新建客户,修改客户,删除客户,查询客户等功能
- *
- * Created by wuxw on 2016/12/27.
- */
-public interface IRepairSettingServiceDao {
-
-    /**
-     * 保存 报修设置信息
-     * @param businessRepairSettingInfo 报修设置信息 封装
-     * @throws DAOException 操作数据库异常
-     */
-    void saveBusinessRepairSettingInfo(Map businessRepairSettingInfo) throws DAOException;
-
-
-
-    /**
-     * 查询报修设置信息(business过程)
-     * 根据bId 查询报修设置信息
-     * @param info bId 信息
-     * @return 报修设置信息
-     * @throws DAOException DAO异常
-     */
-    List<Map> getBusinessRepairSettingInfo(Map info) throws DAOException;
-
-
-
-
-    /**
-     * 保存 报修设置信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException DAO异常
-     */
-    void saveRepairSettingInfoInstance(Map info) throws DAOException;
-
-
-
-
-    /**
-     * 查询报修设置信息(instance过程)
-     * 根据bId 查询报修设置信息
-     * @param info bId 信息
-     * @return 报修设置信息
-     * @throws DAOException DAO异常
-     */
-    List<Map> getRepairSettingInfo(Map info) throws DAOException;
-
-
-
-    /**
-     * 修改报修设置信息
-     * @param info 修改信息
-     * @throws DAOException DAO异常
-     */
-    void updateRepairSettingInfoInstance(Map info) throws DAOException;
-
-
-    /**
-     * 查询报修设置总数
-     *
-     * @param info 报修设置信息
-     * @return 报修设置数量
-     */
-    int queryRepairSettingsCount(Map info);
-
-}

+ 0 - 134
service-community/src/main/java/com/java110/community/dao/impl/RepairSettingServiceDaoImpl.java

@@ -1,134 +0,0 @@
-package com.java110.community.dao.impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.community.dao.IRepairSettingServiceDao;
-import com.java110.core.base.dao.BaseServiceDao;
-import com.java110.utils.constant.ResponseConstant;
-import com.java110.utils.exception.DAOException;
-import com.java110.utils.util.DateUtil;
-import org.slf4j.Logger;
-import com.java110.core.log.LoggerFactory;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 报修设置服务 与数据库交互
- * Created by wuxw on 2017/4/5.
- */
-@Service("repairSettingServiceDaoImpl")
-//@Transactional
-public class RepairSettingServiceDaoImpl extends BaseServiceDao implements IRepairSettingServiceDao {
-
-    private static Logger logger = LoggerFactory.getLogger(RepairSettingServiceDaoImpl.class);
-
-    /**
-     * 报修设置信息封装
-     *
-     * @param businessRepairSettingInfo 报修设置信息 封装
-     * @throws DAOException DAO异常
-     */
-    @Override
-    public void saveBusinessRepairSettingInfo(Map businessRepairSettingInfo) throws DAOException {
-        businessRepairSettingInfo.put("month", DateUtil.getCurrentMonth());
-        // 查询business_user 数据是否已经存在
-        logger.debug("保存报修设置信息 入参 businessRepairSettingInfo : {}", businessRepairSettingInfo);
-        int saveFlag = sqlSessionTemplate.insert("repairSettingServiceDaoImpl.saveBusinessRepairSettingInfo", businessRepairSettingInfo);
-
-        if (saveFlag < 1) {
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存报修设置数据失败:" + JSONObject.toJSONString(businessRepairSettingInfo));
-        }
-    }
-
-
-    /**
-     * 查询报修设置信息
-     *
-     * @param info bId 信息
-     * @return 报修设置信息
-     * @throws DAOException DAO异常
-     */
-    @Override
-    public List<Map> getBusinessRepairSettingInfo(Map info) throws DAOException {
-
-        logger.debug("查询报修设置信息 入参 info : {}", info);
-
-        List<Map> businessRepairSettingInfos = sqlSessionTemplate.selectList("repairSettingServiceDaoImpl.getBusinessRepairSettingInfo", info);
-
-        return businessRepairSettingInfos;
-    }
-
-
-    /**
-     * 保存报修设置信息 到 instance
-     *
-     * @param info bId 信息
-     * @throws DAOException DAO异常
-     */
-    @Override
-    public void saveRepairSettingInfoInstance(Map info) throws DAOException {
-        logger.debug("保存报修设置信息Instance 入参 info : {}", info);
-
-        int saveFlag = sqlSessionTemplate.insert("repairSettingServiceDaoImpl.saveRepairSettingInfoInstance", 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> getRepairSettingInfo(Map info) throws DAOException {
-        logger.debug("查询报修设置信息 入参 info : {}", info);
-
-        List<Map> infos = sqlSessionTemplate.selectList("repairSettingServiceDaoImpl.getRepairSettingInfo", info);
-
-        return infos;
-    }
-
-
-    /**
-     * 修改报修设置信息
-     *
-     * @param info 修改信息
-     * @throws DAOException DAO异常
-     */
-    @Override
-    public void updateRepairSettingInfoInstance(Map info) throws DAOException {
-        logger.debug("修改报修设置信息Instance 入参 info : {}", info);
-
-        int saveFlag = sqlSessionTemplate.update("repairSettingServiceDaoImpl.updateRepairSettingInfoInstance", info);
-
-        if (saveFlag < 1) {
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改报修设置信息Instance数据失败:" + JSONObject.toJSONString(info));
-        }
-    }
-
-    /**
-     * 查询报修设置数量
-     *
-     * @param info 报修设置信息
-     * @return 报修设置数量
-     */
-    @Override
-    public int queryRepairSettingsCount(Map info) {
-        logger.debug("查询报修设置数据 入参 info : {}", info);
-
-        List<Map> businessRepairSettingInfos = sqlSessionTemplate.selectList("repairSettingServiceDaoImpl.queryRepairSettingsCount", info);
-        if (businessRepairSettingInfos.size() < 1) {
-            return 0;
-        }
-
-        return Integer.parseInt(businessRepairSettingInfos.get(0).get("count").toString());
-    }
-
-
-}

+ 6 - 5
service-community/src/main/java/com/java110/community/dao/impl/RepairSettingV1ServiceDaoImpl.java

@@ -21,6 +21,7 @@ import com.java110.utils.exception.DAOException;
 import com.java110.utils.util.DateUtil;
 import com.java110.core.base.dao.BaseServiceDao;
 import com.java110.community.dao.IRepairSettingV1ServiceDao;
+import com.java110.utils.util.ListUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
@@ -71,9 +72,9 @@ public class RepairSettingV1ServiceDaoImpl extends BaseServiceDao implements IRe
     public List<Map> getRepairSettingInfo(Map info) throws DAOException {
         logger.debug("查询 getRepairSettingInfo 入参 info : {}",info);
 
-        List<Map> businessRepairSettingInfos = sqlSessionTemplate.selectList("repairSettingV1ServiceDaoImpl.getRepairSettingInfo",info);
+        List<Map> infos = sqlSessionTemplate.selectList("repairSettingV1ServiceDaoImpl.getRepairSettingInfo",info);
 
-        return businessRepairSettingInfos;
+        return infos;
     }
 
 
@@ -100,12 +101,12 @@ public class RepairSettingV1ServiceDaoImpl extends BaseServiceDao implements IRe
     public int queryRepairSettingsCount(Map info) {
         logger.debug("查询 queryRepairSettingsCount 入参 info : {}",info);
 
-        List<Map> businessRepairSettingInfos = sqlSessionTemplate.selectList("repairSettingV1ServiceDaoImpl.queryRepairSettingsCount", info);
-        if (businessRepairSettingInfos.size() < 1) {
+        List<Map> infos = sqlSessionTemplate.selectList("repairSettingV1ServiceDaoImpl.queryRepairSettingsCount", info);
+        if (ListUtil.isNull(infos)) {
             return 0;
         }
 
-        return Integer.parseInt(businessRepairSettingInfos.get(0).get("count").toString());
+        return Integer.parseInt(infos.get(0).get("count").toString());
     }
 
 

+ 0 - 113
service-community/src/main/java/com/java110/community/smo/impl/RepairSettingInnerServiceSMOImpl.java

@@ -1,113 +0,0 @@
-package com.java110.community.smo.impl;
-
-
-import com.java110.community.dao.IRepairSettingServiceDao;
-import com.java110.core.base.smo.BaseServiceSMO;
-import com.java110.dto.PageDto;
-import com.java110.dto.repair.RepairSettingDto;
-import com.java110.dto.user.UserDto;
-import com.java110.intf.community.IRepairSettingInnerServiceSMO;
-import com.java110.intf.user.IUserInnerServiceSMO;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.utils.util.ListUtil;
-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 RepairSettingInnerServiceSMOImpl extends BaseServiceSMO implements IRepairSettingInnerServiceSMO {
-
-    @Autowired
-    private IRepairSettingServiceDao repairSettingServiceDaoImpl;
-
-    @Autowired
-    private IUserInnerServiceSMO userInnerServiceSMOImpl;
-
-    @Override
-    public List<RepairSettingDto> queryRepairSettings(@RequestBody RepairSettingDto repairSettingDto) {
-
-        //校验是否传了 分页信息
-
-        int page = repairSettingDto.getPage();
-
-        if (page != PageDto.DEFAULT_PAGE) {
-            repairSettingDto.setPage((page - 1) * repairSettingDto.getRow());
-        }
-
-        List<RepairSettingDto> repairSettings = BeanConvertUtil.covertBeanList(repairSettingServiceDaoImpl.getRepairSettingInfo(BeanConvertUtil.beanCovertMap(repairSettingDto)), RepairSettingDto.class);
-
-        if (ListUtil.isNull(repairSettings)) {
-            return repairSettings;
-        }
-
-        String[] userIds = getUserIds(repairSettings);
-        //根据 userId 查询用户信息
-        List<UserDto> users = userInnerServiceSMOImpl.getUserInfo(userIds);
-
-        for (RepairSettingDto repairSetting : repairSettings) {
-            refreshRepairSetting(repairSetting, users);
-        }
-        return repairSettings;
-    }
-
-    /**
-     * 从用户列表中查询用户,将用户中的信息 刷新到 floor对象中
-     *
-     * @param repairSetting 小区报修设置信息
-     * @param users         用户列表
-     */
-    private void refreshRepairSetting(RepairSettingDto repairSetting, List<UserDto> users) {
-        for (UserDto user : users) {
-            if (repairSetting.getSettingId().equals(user.getUserId())) {
-                BeanConvertUtil.covertBean(user, repairSetting);
-            }
-        }
-    }
-
-    /**
-     * 获取批量userId
-     *
-     * @param repairSettings 小区楼信息
-     * @return 批量userIds 信息
-     */
-    private String[] getUserIds(List<RepairSettingDto> repairSettings) {
-        List<String> userIds = new ArrayList<String>();
-        for (RepairSettingDto repairSetting : repairSettings) {
-            userIds.add(repairSetting.getSettingId());
-        }
-
-        return userIds.toArray(new String[userIds.size()]);
-    }
-
-    @Override
-    public int queryRepairSettingsCount(@RequestBody RepairSettingDto repairSettingDto) {
-        return repairSettingServiceDaoImpl.queryRepairSettingsCount(BeanConvertUtil.beanCovertMap(repairSettingDto));
-    }
-
-    public IRepairSettingServiceDao getRepairSettingServiceDaoImpl() {
-        return repairSettingServiceDaoImpl;
-    }
-
-    public void setRepairSettingServiceDaoImpl(IRepairSettingServiceDao repairSettingServiceDaoImpl) {
-        this.repairSettingServiceDaoImpl = repairSettingServiceDaoImpl;
-    }
-
-    public IUserInnerServiceSMO getUserInnerServiceSMOImpl() {
-        return userInnerServiceSMOImpl;
-    }
-
-    public void setUserInnerServiceSMOImpl(IUserInnerServiceSMO userInnerServiceSMOImpl) {
-        this.userInnerServiceSMOImpl = userInnerServiceSMOImpl;
-    }
-}

+ 3 - 3
service-job/src/main/java/com/java110/job/adapt/Repair/MachineReturnRepairAdapt.java

@@ -19,7 +19,7 @@ import com.java110.dto.wechat.Data;
 import com.java110.dto.wechat.PropertyFeeTemplateMessage;
 import com.java110.intf.community.ICommunityInnerServiceSMO;
 import com.java110.intf.community.IRepairInnerServiceSMO;
-import com.java110.intf.community.IRepairSettingInnerServiceSMO;
+import com.java110.intf.community.IRepairSettingV1InnerServiceSMO;
 import com.java110.intf.community.IRepairUserInnerServiceSMO;
 import com.java110.intf.store.ISmallWeChatInnerServiceSMO;
 import com.java110.intf.store.ISmallWechatAttrInnerServiceSMO;
@@ -82,7 +82,7 @@ public class MachineReturnRepairAdapt extends DatabusAdaptImpl {
     private IOwnerAppUserInnerServiceSMO ownerAppUserInnerServiceSMO;
 
     @Autowired
-    private IRepairSettingInnerServiceSMO repairSettingInnerServiceSMO;
+    private IRepairSettingV1InnerServiceSMO repairSettingV1InnerServiceSMO;
 
     @Autowired
     private IOwnerRoomRelInnerServiceSMO ownerRoomRelInnerServiceSMO;
@@ -161,7 +161,7 @@ public class MachineReturnRepairAdapt extends DatabusAdaptImpl {
         String repairType = repairDtos.get(0).getRepairType();
         RepairSettingDto repairSettingDto = new RepairSettingDto();
         repairSettingDto.setSettingId(repairType);
-        List<RepairSettingDto> repairSettingDtos = repairSettingInnerServiceSMO.queryRepairSettings(repairSettingDto);
+        List<RepairSettingDto> repairSettingDtos = repairSettingV1InnerServiceSMO.queryRepairSettings(repairSettingDto);
         Assert.listOnlyOne(repairSettingDtos, "信息错误");
         JSONObject paramIn = new JSONObject();
         if (RepairUserDto.STATE_BACK.equals(state)) {   //退单状态

+ 8 - 6
service-job/src/main/java/com/java110/job/task/repair/ReturnVisitRepairTemplate.java

@@ -7,7 +7,7 @@ import com.java110.dto.repair.RepairSettingDto;
 import com.java110.dto.repair.RepairUserDto;
 import com.java110.dto.task.TaskDto;
 import com.java110.intf.community.IRepairInnerServiceSMO;
-import com.java110.intf.community.IRepairSettingInnerServiceSMO;
+import com.java110.intf.community.IRepairSettingV1InnerServiceSMO;
 import com.java110.intf.community.IRepairUserInnerServiceSMO;
 import com.java110.job.quartz.TaskSystemQuartz;
 import com.java110.po.owner.RepairPoolPo;
@@ -16,6 +16,7 @@ import com.java110.utils.cache.MappingCache;
 import com.java110.utils.constant.MappingConstant;
 import com.java110.utils.constant.StatusConstant;
 import com.java110.utils.util.DateUtil;
+import com.java110.utils.util.ListUtil;
 import com.java110.utils.util.StringUtil;
 import org.slf4j.Logger;
 import com.java110.core.log.LoggerFactory;
@@ -46,7 +47,8 @@ public class ReturnVisitRepairTemplate extends TaskSystemQuartz {
     private IRepairUserInnerServiceSMO repairUserInnerServiceSMO;
 
     @Autowired
-    private IRepairSettingInnerServiceSMO repairSettingInnerServiceSMO;
+    private IRepairSettingV1InnerServiceSMO repairSettingV1InnerServiceSMO;
+
 
     @Override
     protected void process(TaskDto taskDto) {
@@ -117,7 +119,7 @@ public class ReturnVisitRepairTemplate extends TaskSystemQuartz {
             //查询报修工单信息
             RepairSettingDto repairSettingDto = new RepairSettingDto();
             repairSettingDto.setSettingId(repairDtos.get(0).getRepairType());
-            List<RepairSettingDto> repairSettingDtos = repairSettingInnerServiceSMO.queryRepairSettings(repairSettingDto);
+            List<RepairSettingDto> repairSettingDtos = repairSettingV1InnerServiceSMO.queryRepairSettings(repairSettingDto);
             if (repairSettingDtos == null || repairSettingDtos.size() != 1) {
                 return;
             }
@@ -171,14 +173,14 @@ public class ReturnVisitRepairTemplate extends TaskSystemQuartz {
             repairDto.setRepairId(tmpRepairDto.getRepairId());
             //查询报修信息
             List<RepairDto> repairDtos = repairInnerServiceSMOImpl.queryRepairs(repairDto);
-            if (repairDtos == null || repairDtos.size() != 1) {
+            if (ListUtil.isNull(repairDtos)) {
                 return;
             }
             //查询报修工单信息
             RepairSettingDto repairSettingDto = new RepairSettingDto();
             repairSettingDto.setSettingId(repairDtos.get(0).getRepairType());
-            List<RepairSettingDto> repairSettingDtos = repairSettingInnerServiceSMO.queryRepairSettings(repairSettingDto);
-            if (repairSettingDtos == null || repairSettingDtos.size() != 1) {
+            List<RepairSettingDto> repairSettingDtos = repairSettingV1InnerServiceSMO.queryRepairSettings(repairSettingDto);
+            if (ListUtil.isNull(repairSettingDtos)) {
                 return;
             }
             //获取报修区域