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

优化 一次性费用缴费时间处理

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

+ 8 - 2
java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java

@@ -510,7 +510,9 @@ public class ComputeFeeSMOImpl implements IComputeFeeSMO {
         int hours = new Double((cycle - Math.floor(cycle)) * futureDay * 24).intValue();
         endCalender.add(Calendar.HOUR, hours);
         if (FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())) {
-            if (!StringUtil.isEmpty(feeDto.getCurDegrees())) {
+            if(feeDto.getDeadlineTime() != null){
+               endCalender.setTime(feeDto.getDeadlineTime());
+            }else if (!StringUtil.isEmpty(feeDto.getCurDegrees())) {
                 endCalender.setTime(feeDto.getCurReadingTime());
             } else if (feeDto.getImportFeeEndTime() == null) {
                 endCalender.setTime(feeDto.getConfigEndTime());
@@ -836,7 +838,10 @@ public class ComputeFeeSMOImpl implements IComputeFeeSMO {
             return targetEndDateAndOweMonth;
         }
         if (FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())) {
-            if (!StringUtil.isEmpty(feeDto.getCurDegrees())) {
+            //先取 deadlineTime
+            if(feeDto.getDeadlineTime() != null){
+                targetEndDate = feeDto.getDeadlineTime();
+            }else if (!StringUtil.isEmpty(feeDto.getCurDegrees())) {
                 targetEndDate = feeDto.getCurReadingTime();
             } else if (feeDto.getImportFeeEndTime() == null) {
                 targetEndDate = feeDto.getConfigEndTime();
@@ -906,6 +911,7 @@ public class ComputeFeeSMOImpl implements IComputeFeeSMO {
     }
 
     public Map getTargetEndDateAndOweMonth(FeeDto feeDto) {
+
         if (FeeDto.PAYER_OBJ_TYPE_CAR.equals(feeDto.getPayerObjType())) {
             OwnerCarDto ownerCarDto = new OwnerCarDto();
             ownerCarDto.setCommunityId(feeDto.getCommunityId());

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

@@ -142,7 +142,7 @@
         configStartTime,pfc.end_time configEndTime,pfc.payment_cd paymentCd,pfc.payment_cycle paymentCycle,td4.name
         billTypeName,pfa.value importFeeName,ifd.end_time importFeeEndTime,mw.cur_degrees curDegrees,mw.pre_degrees
         preDegrees,
-        mw.pre_reading_time preReadingTime,mw.cur_reading_time curReadingTime
+        mw.pre_reading_time preReadingTime,mw.cur_reading_time curReadingTime,pfa1.`value` deadlineTime
         from pay_fee t
         INNER join pay_fee_config pfc on t.fee_type_cd = pfc.fee_type_cd and t.config_id = pfc.config_id and
         pfc.status_cd = '0'
@@ -154,6 +154,7 @@
         left join t_dict td4 on pfc.bill_type = td4.status_cd and td4.table_name = 'pay_fee_config' and
         td4.table_columns = 'bill_type'
         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 pay_fee_attrs pfa1 on t.fee_id = pfa1.fee_id and pfa.spec_cd = '390010' 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'
         LEFT JOIN meter_water mw on t.fee_id = mw.fee_id and mw.status_cd = '0' and mw.community_id = t.community_id
         <if test="ownerId != null and ownerId != ''">

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

@@ -63,7 +63,7 @@
         storeTypeCd,
         t.community_id communityId,pfa.value importFeeName,ifd.end_time importFeeEndTime,mw.cur_degrees
         curDegrees,mw.pre_degrees preDegrees,
-        mw.pre_reading_time preReadingTime,mw.cur_reading_time curReadingTime
+        mw.pre_reading_time preReadingTime,mw.cur_reading_time curReadingTime,pfa1.`value` deadlineTime
         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'
@@ -71,6 +71,7 @@
         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 pay_fee_attrs pfa1 on t.fee_id = pfa1.fee_id and pfa.spec_cd = '390010' 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'
         LEFT JOIN meter_water mw on t.fee_id = mw.fee_id and mw.status_cd = '0' and mw.community_id = t.community_id
         where t.status_cd = '0'

+ 3 - 1
service-api/src/main/java/com/java110/api/bmo/fee/impl/FeeBMOImpl.java

@@ -395,7 +395,9 @@ public class FeeBMOImpl extends ApiBaseBMO implements IFeeBMO {
         } else {
             endCalender.add(Calendar.MONTH, Integer.parseInt(paramInJson.getString("cycles")));
             if (FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())) {
-                if (!StringUtil.isEmpty(feeDto.getCurDegrees())) {
+                if(feeDto.getDeadlineTime() != null){
+                    endCalender.setTime(feeDto.getDeadlineTime());
+                }else if (!StringUtil.isEmpty(feeDto.getCurDegrees())) {
                     endCalender.setTime(feeDto.getCurReadingTime());
                 } else if (feeDto.getImportFeeEndTime() == null) {
                     endCalender.setTime(feeDto.getConfigEndTime());

+ 3 - 1
service-fee/src/main/java/com/java110/fee/bmo/impl/QueryOweFeeImpl.java

@@ -579,7 +579,9 @@ public class QueryOweFeeImpl implements IQueryOweFee {
             return targetEndDateAndOweMonth;
         }
         if (FeeDto.FEE_FLAG_ONCE.equals(feeDto.getFeeFlag())) {
-            if (!StringUtil.isEmpty(feeDto.getCurDegrees())) {
+            if(feeDto.getDeadlineTime() != null){
+                targetEndDate = feeDto.getDeadlineTime();
+            }else if(!StringUtil.isEmpty(feeDto.getCurDegrees())) {
                 targetEndDate = feeDto.getCurReadingTime();
             } else if (feeDto.getImportFeeEndTime() == null) {
                 targetEndDate = feeDto.getConfigEndTime();