Parcourir la source

物业费管理催缴

LIVE_YE il y a 4 mois
Parent
commit
9bdbb4e83c

+ 22 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/houseInfo/PropertyFeeController.java

@@ -115,4 +115,26 @@ public class PropertyFeeController extends BaseController
         return propertyFeeService.statistics(propertyFee);
     }
 
+    /**
+     * 物业费催缴
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:fee:callPayment')")
+    @Log(title = "物业费管理", businessType = BusinessType.DELETE)
+    @GetMapping("/callPayment/{houseId}")
+    public AjaxResult CallPayment(@PathVariable Long houseId)
+    {
+        return propertyFeeService.CallPayment(houseId);
+    }
+
+    /**
+     * 物业费催缴(一键催缴)
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:fee:callPaymentAll')")
+    @Log(title = "物业费管理", businessType = BusinessType.DELETE)
+    @GetMapping("/callPaymentAll")
+    public AjaxResult CallPaymentAll(PropertyFee propertyFee)
+    {
+        return propertyFeeService.CallPaymentAll(propertyFee);
+    }
+
 }

+ 4 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IPropertyFeeService.java

@@ -62,4 +62,8 @@ public interface IPropertyFeeService
     public int deletePropertyFeeByPropertyId(Long propertyId);
 
     AjaxResult statistics(PropertyFee propertyFee);
+
+    AjaxResult CallPayment(Long houseId);
+
+    AjaxResult CallPaymentAll(PropertyFee propertyFee);
 }

+ 31 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PropertyFeeServiceImpl.java

@@ -6,9 +6,11 @@ import java.util.List;
 import java.util.Map;
 
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.ResidentInfo;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.houseInfo.PropertyFee;
+import com.ruoyi.system.mapper.ResidentInfoMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.PropertyFeeMapper;
@@ -26,6 +28,9 @@ public class PropertyFeeServiceImpl implements IPropertyFeeService
     @Autowired
     private PropertyFeeMapper propertyFeeMapper;
 
+    @Autowired
+    private ResidentInfoMapper residentInfoMapper;
+
     /**
      * 查询物业费管理
      * 
@@ -142,4 +147,30 @@ public class PropertyFeeServiceImpl implements IPropertyFeeService
         map.put("wjnhf",wjnhf);
         return AjaxResult.success(map);
     }
+
+    @Override
+    public AjaxResult CallPayment(Long houseId) {
+        //查询户主信息
+        ResidentInfo residentInfo = new ResidentInfo();
+        residentInfo.setHouseId(houseId);
+        residentInfo.setIsHouseholder("Y");
+        List<ResidentInfo> residentInfos = residentInfoMapper.selectResidentInfoList(residentInfo);
+        if(residentInfos!=null && residentInfos.size()>0){
+            //todo 拿到户主手机号发送短信
+
+            return AjaxResult.success("催缴成功,已通知户主缴费");
+        }
+        return AjaxResult.error("催缴失败,当前房屋无户主信息");
+    }
+
+    @Override
+    public AjaxResult CallPaymentAll(PropertyFee propertyFee) {
+        //查询所有未缴费信息
+        propertyFee.setIsExpense("N");
+        List<PropertyFee> propertyFees = propertyFeeMapper.selectPropertyFeeList(propertyFee);
+        //todo 通过房屋id拿到户主手机号发送短信
+
+
+        return AjaxResult.success("催缴成功,已通知户主缴费");
+    }
 }