Просмотр исходного кода

优化停车字母车辆 问题

java110 лет назад: 5
Родитель
Сommit
ff7a5c59fc

+ 1 - 1
java110-db/src/main/resources/mapper/fee/FeeReceiptServiceDaoImplMapper.xml

@@ -161,7 +161,7 @@
         FROM
         fee_receipt t
         LEFT JOIN fee_receipt_detail tt ON t.receipt_id = tt.receipt_id
-        LEFT JOIN owner_car oc ON oc.car_id = t.obj_id
+        LEFT JOIN owner_car oc ON oc.car_id = t.obj_id and oc.car_type_cd='1001'
         LEFT JOIN building_owner bo ON bo.member_id = oc.owner_id
         LEFT JOIN building_owner_room_rel borr ON bo.owner_id = borr.owner_id
         LEFT JOIN building_room b ON borr.room_id = b.room_id

+ 6 - 6
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml

@@ -857,7 +857,7 @@
         left join building_room br on pf.payer_obj_id = br.room_id and pf.payer_obj_type = '3333' and br.status_cd = '0'
         left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
         left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
-        left join owner_car oc on pf.payer_obj_id = oc.car_id and oc.status_cd = '0'
+        left join owner_car oc on pf.payer_obj_id = oc.car_id and oc.status_cd = '0' and oc.car_type_cd='1001'
         left join pay_fee_attrs pfa on t.fee_id = pfa.fee_id and pfa.spec_cd = '390002'
         left join pay_fee_detail_discount pfdd on t.detail_id = pfdd.detail_id and pfdd.status_cd = '0'
         left join fee_discount fd on pfdd.discount_id = fd.discount_id and fd.status_cd = '0'
@@ -923,7 +923,7 @@
         left join building_room br on pf.payer_obj_id = br.room_id and pf.payer_obj_type = '3333' and br.status_cd = '0'
         left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
         left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
-        left join owner_car oc on pf.payer_obj_id = oc.car_id and oc.status_cd = '0'
+        left join owner_car oc on pf.payer_obj_id = oc.car_id and oc.status_cd = '0'  and oc.car_type_cd='1001'
         left join pay_fee_attrs pfa on t.fee_id = pfa.fee_id and pfa.spec_cd = '390002'
         left join pay_fee_detail_discount pfdd on t.detail_id = pfdd.detail_id and pfdd.status_cd = '0'
         left join fee_discount fd on pfdd.discount_id = fd.discount_id and fd.status_cd = '0'
@@ -987,7 +987,7 @@
         left join building_room br on pf.payer_obj_id = br.room_id and pf.payer_obj_type = '3333' and br.status_cd = '0'
         left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
         left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
-        left join owner_car oc on pf.payer_obj_id = oc.car_id and oc.status_cd = '0'
+        left join owner_car oc on pf.payer_obj_id = oc.car_id and oc.status_cd = '0'  and oc.car_type_cd='1001'
         left join pay_fee_attrs pfa on t.fee_id = pfa.fee_id and pfa.spec_cd = '390002'
         where t.status_cd = '0'
         <if test="roomNum !=null and roomNum != ''">
@@ -1047,7 +1047,7 @@
         left join building_room br on pf.payer_obj_id = br.room_id and pf.payer_obj_type = '3333' and br.status_cd = '0'
         left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
         left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
-        left join owner_car oc on pf.payer_obj_id = oc.car_id and oc.status_cd = '0'
+        left join owner_car oc on pf.payer_obj_id = oc.car_id and oc.status_cd = '0'  and oc.car_type_cd='1001'
         left join pay_fee_attrs pfa on t.fee_id = pfa.fee_id and pfa.spec_cd = '390002'
         left join pay_fee_detail_discount pfdd on t.detail_id = pfdd.detail_id and pfdd.status_cd = '0'
         left join fee_discount fd on pfdd.discount_id = fd.discount_id and fd.status_cd = '0'
@@ -1229,7 +1229,7 @@
         left join building_room br on t.payer_obj_id = br.room_id and t.payer_obj_type = '3333' and br.status_cd = '0'
         left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
         left join f_floor f on f.floor_id = bu.floor_id and f.status_cd = '0'
-        left join owner_car oc on t.payer_obj_id = oc.car_id and t.payer_obj_type = '6666' and oc.status_cd = '0'
+        left join owner_car oc on t.payer_obj_id = oc.car_id and t.payer_obj_type = '6666' and oc.status_cd = '0'  and oc.car_type_cd='1001'
         where t.state = '2008001'
         and t.status_cd = '0'
         <if test="communityId !=null and communityId != ''">
@@ -1253,7 +1253,7 @@
         left join building_room br on t.payer_obj_id = br.room_id and t.payer_obj_type = '3333' and br.status_cd = '0'
         left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0'
         left join f_floor f on f.floor_id = bu.floor_id and f.status_cd = '0'
-        left join owner_car oc on t.payer_obj_id = oc.car_id and t.payer_obj_type = '6666' and oc.status_cd = '0'
+        left join owner_car oc on t.payer_obj_id = oc.car_id and t.payer_obj_type = '6666' and oc.status_cd = '0'  and oc.car_type_cd='1001'
         where t.state = '2008001'
         and t.status_cd = '0'
         <if test="communityId !=null and communityId != ''">

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

@@ -50,7 +50,7 @@
         from pay_fee t
         INNER JOIN pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0'
         left join building_room br on t.payer_obj_id = br.room_id and t.payer_obj_type = '3333' and br.status_cd = '0'
-        left join owner_car oc on t.payer_obj_id = oc.car_id and t.payer_obj_type = '6666' and oc.status_cd = '0'
+        left join owner_car oc on t.payer_obj_id = oc.car_id and t.payer_obj_type = '6666' and oc.status_cd = '0'  and oc.car_type_cd='1001'
         left join s_store ss on t.income_obj_id = ss.store_id and ss.status_cd = '0'
         LEFT JOIN pay_fee_attrs pfa on t.fee_id = pfa.fee_id and pfa.spec_cd = '390002' and pfa.status_cd = '0'
         left join import_fee_detail ifd on t.fee_id = ifd.fee_id and ifd.status_cd = '0' and t.fee_flag = '2006012'

+ 1 - 0
java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml

@@ -548,6 +548,7 @@
         and oc.owner_id = t.owner_id
         AND oc.`status_cd` = '0'
         AND ps.`status_cd` = '0'
+        and oc.car_type_cd='1001'
         AND t.`status_cd` = '0'
         <if test="psIds != null ">
             and ps.ps_id in

+ 14 - 10
service-api/src/main/java/com/java110/api/listener/fee/PayFeeListener.java

@@ -142,16 +142,20 @@ public class PayFeeListener extends AbstractServiceApiDataFlowListener {
             ownerCarDto.setCarId(paramObj.getString("carPayerObjId"));
             List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
             //车位费用续租
-            if (ownerCarDtos != null && ownerCarDtos.size() == 1 && ownerCarDtos.get(0).getEndTime().getTime() < feeEndTime.getTime()) {
-                JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
-                business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_OWNER_CAR);
-                business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 1);
-                business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
-                OwnerCarPo ownerCarPo = new OwnerCarPo();
-                ownerCarPo.setCarId(ownerCarDtos.get(0).getCarId());
-                ownerCarPo.setEndTime(DateUtil.getFormatTimeString(feeEndTime, DateUtil.DATE_FORMATE_STRING_A));
-                business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(OwnerCarPo.class.getSimpleName(), BeanConvertUtil.beanCovertMap(ownerCarPo));
-                businesses.add(business);
+            if (ownerCarDtos != null) {
+                for (OwnerCarDto tmpOwnerCarDto : ownerCarDtos) {
+                    if (tmpOwnerCarDto.getEndTime().getTime() < feeEndTime.getTime()) {
+                        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
+                        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_OWNER_CAR);
+                        business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 1);
+                        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
+                        OwnerCarPo ownerCarPo = new OwnerCarPo();
+                        ownerCarPo.setMemberId(tmpOwnerCarDto.getMemberId());
+                        ownerCarPo.setEndTime(DateUtil.getFormatTimeString(feeEndTime, DateUtil.DATE_FORMATE_STRING_A));
+                        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(OwnerCarPo.class.getSimpleName(), BeanConvertUtil.beanCovertMap(ownerCarPo));
+                        businesses.add(business);
+                    }
+                }
             }
         }