浏览代码

优化优化代码

java110 4 年之前
父节点
当前提交
db186c6ac4

+ 1 - 1
java110-db/src/main/resources/mapper/report/ReportCommunityServiceDaoImplMapper.xml

@@ -79,7 +79,7 @@
     </select>
 
     <!-- 查询小区信息 add by wuxw 2018-07-03 -->
-    <select id="getCommunitys" parameterType="com.java110.dto.community.CommunityDto" resultType="com.java110.dto.community.CommunityDto">
+    <select id="getCommunitys" parameterType="Map" resultType="Map">
         select t.address,t.nearby_landmarks,t.nearby_landmarks nearbyLandmarks,
         t.city_code,t.city_code cityCode,t.name,t.status_cd,t.status_cd statusCd,t.tel,
         t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.map_y,t.map_y mapY,

+ 1 - 4
java110-db/src/main/resources/mapper/report/ReportFeeServiceDaoImplMapper.xml

@@ -102,7 +102,7 @@
         computingFormula,t.additional_amount,t.additional_amount additionalAmount,t.status_cd,t.status_cd
         statusCd,t.square_price,t.square_price squarePrice,t.is_default,t.is_default isDefault,t.config_id,t.config_id
         configId,t.fee_flag,t.fee_flag feeFlag,t.fee_name,t.fee_name feeName,t.start_time,t.start_time
-        startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,
+        startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,
         td1.name feeTypeCdName,td2.name feeFlagName,t.bill_type billType,t.bill_type,td3.name billTypeName,
         t.payment_cd,t.payment_cycle,t.payment_cd paymentCd,t.payment_cycle paymentCycle,
         t.computing_formula_text,t.computing_formula_text computingFormulaText
@@ -160,9 +160,6 @@
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
-        <if test="bId !=null and bId != ''">
-            and t.b_id= #{bId}
-        </if>
         <if test="paymentCd !=null and paymentCd != ''">
             and t.payment_cd= #{paymentCd}
         </if>

+ 2 - 1
service-report/src/main/java/com/java110/report/dao/IReportCommunityServiceDao.java

@@ -5,6 +5,7 @@ import com.java110.dto.report.ReportCarDto;
 import com.java110.dto.report.ReportRoomDto;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @ClassName ICommunityServiceDao
@@ -52,5 +53,5 @@ public interface IReportCommunityServiceDao {
      *
      * @return
      */
-    List<CommunityDto> getCommunitys(CommunityDto communityDto);
+    List<Map> getCommunitys(Map communityDto);
 }

+ 2 - 1
service-report/src/main/java/com/java110/report/dao/IReportFeeServiceDao.java

@@ -6,6 +6,7 @@ import com.java110.dto.report.ReportFeeDto;
 import com.java110.dto.report.ReportRoomDto;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @ClassName ICommunityServiceDao
@@ -34,7 +35,7 @@ public interface IReportFeeServiceDao {
      * 查询 房屋 楼栋 单元 和 业主 信息
      * @return
      */
-    List<FeeConfigDto> getFeeConfigs(FeeConfigDto reportFeeDto);
+    List<Map> getFeeConfigs(Map reportFeeDto);
 
     /**
      * 实收费用查询

+ 2 - 2
service-report/src/main/java/com/java110/report/dao/impl/ReportCommunityServiceDaoImpl.java

@@ -75,10 +75,10 @@ public class ReportCommunityServiceDaoImpl extends BaseServiceDao implements IRe
     }
 
     @Override
-    public List<CommunityDto> getCommunitys(CommunityDto communityDto) {
+    public List<Map> getCommunitys(Map communityDto) {
         logger.debug("查询getCommunitys信息 入参 info : {}", JSONObject.toJSONString(communityDto));
 
-        List<CommunityDto> communityDtos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.getCommunitys", communityDto);
+        List<Map> communityDtos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.getCommunitys", communityDto);
 
         return communityDtos;
     }

+ 2 - 2
service-report/src/main/java/com/java110/report/dao/impl/ReportFeeServiceDaoImpl.java

@@ -48,10 +48,10 @@ public class ReportFeeServiceDaoImpl extends BaseServiceDao implements IReportFe
     }
 
     @Override
-    public List<FeeConfigDto> getFeeConfigs(FeeConfigDto reportFeeDto) {
+    public List<Map> getFeeConfigs(Map reportFeeDto) {
         logger.debug("getFeeConfigs 入参 info : {}", JSONObject.toJSONString(reportFeeDto));
 
-        List<FeeConfigDto> feeConfigDtos = sqlSessionTemplate.selectList("reportFeeServiceDaoImpl.getFeeConfigs", reportFeeDto);
+        List<Map> feeConfigDtos = sqlSessionTemplate.selectList("reportFeeServiceDaoImpl.getFeeConfigs", reportFeeDto);
 
         return feeConfigDtos;
     }

+ 4 - 2
service-report/src/main/java/com/java110/report/smo/impl/GeneratorOweFeeInnerServiceSMOImpl.java

@@ -82,7 +82,8 @@ public class GeneratorOweFeeInnerServiceSMOImpl implements IGeneratorOweFeeInner
 
         CommunityDto communityDto = new CommunityDto();
 
-        List<CommunityDto> communityDtos = reportCommunityServiceDaoImpl.getCommunitys(communityDto);
+        List<CommunityDto> communityDtos = BeanConvertUtil.covertBeanList(
+                reportCommunityServiceDaoImpl.getCommunitys(BeanConvertUtil.beanCovertMap(communityDto)), CommunityDto.class);
 
         for (CommunityDto tmpCommunityDto : communityDtos) {
             reportFeeMonthStatisticsPo.setCommunityId(tmpCommunityDto.getCommunityId());
@@ -101,7 +102,8 @@ public class GeneratorOweFeeInnerServiceSMOImpl implements IGeneratorOweFeeInner
         FeeConfigDto feeConfigDto = new FeeConfigDto();
         feeConfigDto.setCommunityId(communityId);
 
-        List<FeeConfigDto> feeConfigDtos = reportFeeServiceDaoImpl.getFeeConfigs(feeConfigDto);
+        List<FeeConfigDto> feeConfigDtos = BeanConvertUtil.covertBeanList(reportFeeServiceDaoImpl.getFeeConfigs(
+                BeanConvertUtil.beanCovertMap(feeConfigDto)), FeeConfigDto.class);
 
         for (FeeConfigDto tmpFeeConfigDto : feeConfigDtos) {
             try {