Kaynağa Gözat

优化代码

java110 6 yıl önce
ebeveyn
işleme
9b5849d505
21 değiştirilmiş dosya ile 1129 ekleme ve 126 silme
  1. 3 3
      Api/src/main/java/com/java110/api/bmo/inspectionPlanStaff/IInspectionPlanStaffBMO.java
  2. 14 30
      Api/src/main/java/com/java110/api/bmo/inspectionPlanStaff/impl/InspectionPlanStaffBMOImpl.java
  3. 89 0
      Api/src/main/java/com/java110/api/listener/fee/ListBillListener.java
  4. 74 0
      Api/src/main/java/com/java110/api/listener/fee/ListBillOweFeeListener.java
  5. 3 13
      Api/src/main/java/com/java110/api/listener/inspectionPlanStaff/DeleteInspectionPlanStaffListener.java
  6. 3 14
      Api/src/main/java/com/java110/api/listener/inspectionPlanStaff/SaveInspectionPlanStaffListener.java
  7. 3 15
      Api/src/main/java/com/java110/api/listener/inspectionPlanStaff/UpdateInspectionPlanStaffListener.java
  8. 5 0
      CommunityService/src/main/java/com/java110/community/listener/inspectionPlanStaff/AbstractInspectionPlanStaffBusinessServiceDataFlowListener.java
  9. 15 17
      CommunityService/src/main/java/com/java110/community/listener/inspectionPlanStaff/DeleteInspectionPlanStaffInfoListener.java
  10. 2 2
      CommunityService/src/main/java/com/java110/community/listener/inspectionPlanStaff/SaveInspectionPlanStaffInfoListener.java
  11. 15 17
      CommunityService/src/main/java/com/java110/community/listener/inspectionPlanStaff/UpdateInspectionPlanStaffInfoListener.java
  12. 40 7
      FeeService/src/main/java/com/java110/fee/dao/IFeeServiceDao.java
  13. 68 0
      FeeService/src/main/java/com/java110/fee/dao/impl/FeeServiceDaoImpl.java
  14. 64 3
      FeeService/src/main/java/com/java110/fee/smo/impl/FeeInnerServiceSMOImpl.java
  15. 107 0
      java110-bean/src/main/java/com/java110/dto/fee/BillDto.java
  16. 144 0
      java110-bean/src/main/java/com/java110/dto/fee/BillOweFeeDto.java
  17. 78 0
      java110-bean/src/main/java/com/java110/po/inspection/InspectionPlanStaffPo.java
  18. 176 0
      java110-bean/src/main/java/com/java110/result/ResultVo.java
  19. 40 1
      java110-core/src/main/java/com/java110/core/smo/fee/IFeeInnerServiceSMO.java
  20. 175 4
      java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml
  21. 11 0
      java110-utils/src/main/java/com/java110/utils/constant/ServiceCodeFeeConfigConstant.java

+ 3 - 3
Api/src/main/java/com/java110/api/bmo/inspectionPlanStaff/IInspectionPlanStaffBMO.java

@@ -13,7 +13,7 @@ public interface IInspectionPlanStaffBMO extends IApiBaseBMO {
      * @param dataFlowContext
      * @return
      */
-     JSONObject addInspectionPlanStaff(JSONObject paramInJson, DataFlowContext dataFlowContext);
+     void addInspectionPlanStaff(JSONObject paramInJson, DataFlowContext dataFlowContext);
 
     /**
      * 添加执行计划人信息
@@ -22,7 +22,7 @@ public interface IInspectionPlanStaffBMO extends IApiBaseBMO {
      * @param dataFlowContext 数据上下文
      * @return 订单服务能够接受的报文
      */
-     JSONObject updateInspectionPlanStaff(JSONObject paramInJson, DataFlowContext dataFlowContext);
+     void updateInspectionPlanStaff(JSONObject paramInJson, DataFlowContext dataFlowContext);
 
     /**
      * 删除执行计划人
@@ -31,7 +31,7 @@ public interface IInspectionPlanStaffBMO extends IApiBaseBMO {
      * @param dataFlowContext 数据上下文
      * @return 订单服务能够接受的报文
      */
-     JSONObject deleteInspectionPlanStaff(JSONObject paramInJson, DataFlowContext dataFlowContext);
+     void deleteInspectionPlanStaff(JSONObject paramInJson, DataFlowContext dataFlowContext);
 
 
 

+ 14 - 30
Api/src/main/java/com/java110/api/bmo/inspectionPlanStaff/impl/InspectionPlanStaffBMOImpl.java

@@ -6,6 +6,7 @@ import com.java110.api.bmo.inspectionPlanStaff.IInspectionPlanStaffBMO;
 import com.java110.core.context.DataFlowContext;
 import com.java110.core.smo.inspectionPlanStaff.IInspectionPlanStaffInnerServiceSMO;
 import com.java110.dto.inspectionPlanStaff.InspectionPlanStaffDto;
+import com.java110.po.inspection.InspectionPlanStaffPo;
 import com.java110.utils.constant.BusinessTypeConstant;
 import com.java110.utils.constant.CommonConstant;
 import com.java110.utils.util.Assert;
@@ -29,19 +30,14 @@ public class InspectionPlanStaffBMOImpl extends ApiBaseBMO implements IInspectio
      * @param dataFlowContext 数据上下文
      * @return 订单服务能够接受的报文
      */
-    public JSONObject addInspectionPlanStaff(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+    public void addInspectionPlanStaff(JSONObject paramInJson, DataFlowContext dataFlowContext) {
 
+        paramInJson.put("ipStaffId", "-1");
+
+        InspectionPlanStaffPo inspectionPlanStaffPo = BeanConvertUtil.covertBean(paramInJson, InspectionPlanStaffPo.class);
+
+        super.insert(dataFlowContext, inspectionPlanStaffPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_PLAN_STAFF);
 
-        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
-        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_PLAN_STAFF);
-        business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ);
-        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
-        JSONObject businessInspectionPlanStaff = new JSONObject();
-        businessInspectionPlanStaff.putAll(paramInJson);
-        businessInspectionPlanStaff.put("ipStaffId", "-1");
-        //计算 应收金额
-        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessInspectionPlanStaff", businessInspectionPlanStaff);
-        return business;
     }
 
 
@@ -52,7 +48,7 @@ public class InspectionPlanStaffBMOImpl extends ApiBaseBMO implements IInspectio
      * @param dataFlowContext 数据上下文
      * @return 订单服务能够接受的报文
      */
-    public JSONObject updateInspectionPlanStaff(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+    public void updateInspectionPlanStaff(JSONObject paramInJson, DataFlowContext dataFlowContext) {
 
         InspectionPlanStaffDto inspectionPlanStaffDto = new InspectionPlanStaffDto();
         inspectionPlanStaffDto.setIpStaffId(paramInJson.getString("ipStaffId"));
@@ -61,17 +57,12 @@ public class InspectionPlanStaffBMOImpl extends ApiBaseBMO implements IInspectio
 
         Assert.listOnlyOne(inspectionPlanStaffDtos, "未找到需要修改的活动 或多条数据");
 
-
-        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
-        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PLAN_STAFF);
-        business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ);
-        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
         JSONObject businessInspectionPlanStaff = new JSONObject();
         businessInspectionPlanStaff.putAll(BeanConvertUtil.beanCovertMap(inspectionPlanStaffDtos.get(0)));
         businessInspectionPlanStaff.putAll(paramInJson);
-        //计算 应收金额
-        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessInspectionPlanStaff", businessInspectionPlanStaff);
-        return business;
+        InspectionPlanStaffPo inspectionPlanStaffPo = BeanConvertUtil.covertBean(businessInspectionPlanStaff, InspectionPlanStaffPo.class);
+
+        super.update(dataFlowContext, inspectionPlanStaffPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PLAN_STAFF);
     }
 
 
@@ -82,18 +73,11 @@ public class InspectionPlanStaffBMOImpl extends ApiBaseBMO implements IInspectio
      * @param dataFlowContext 数据上下文
      * @return 订单服务能够接受的报文
      */
-    public JSONObject deleteInspectionPlanStaff(JSONObject paramInJson, DataFlowContext dataFlowContext) {
+    public void deleteInspectionPlanStaff(JSONObject paramInJson, DataFlowContext dataFlowContext) {
 
+        InspectionPlanStaffPo inspectionPlanStaffPo = BeanConvertUtil.covertBean(paramInJson, InspectionPlanStaffPo.class);
 
-        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
-        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_DELETE_PLAN_STAFF);
-        business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ);
-        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
-        JSONObject businessInspectionPlanStaff = new JSONObject();
-        businessInspectionPlanStaff.putAll(paramInJson);
-        //计算 应收金额
-        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessInspectionPlanStaff", businessInspectionPlanStaff);
-        return business;
+        super.delete(dataFlowContext, inspectionPlanStaffPo, BusinessTypeConstant.BUSINESS_TYPE_DELETE_PLAN_STAFF);
     }
 
 }

+ 89 - 0
Api/src/main/java/com/java110/api/listener/fee/ListBillListener.java

@@ -0,0 +1,89 @@
+package com.java110.api.listener.fee;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.listener.AbstractServiceApiListener;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.smo.fee.IFeeConfigInnerServiceSMO;
+import com.java110.core.smo.fee.IFeeInnerServiceSMO;
+import com.java110.core.smo.parkingSpace.IParkingSpaceInnerServiceSMO;
+import com.java110.core.smo.room.IRoomInnerServiceSMO;
+import com.java110.dto.RoomDto;
+import com.java110.dto.fee.BillDto;
+import com.java110.dto.fee.FeeDto;
+import com.java110.dto.parking.ParkingSpaceDto;
+import com.java110.event.service.api.ServiceDataFlowEvent;
+import com.java110.result.ResultVo;
+import com.java110.utils.constant.ServiceCodeFeeConfigConstant;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.api.fee.ApiFeeDataVo;
+import com.java110.vo.api.fee.ApiFeeVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * 查询账单侦听类
+ */
+@Java110Listener("listBillListener")
+public class ListBillListener extends AbstractServiceApiListener {
+
+    @Autowired
+    private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl;
+
+    @Autowired
+    private IFeeInnerServiceSMO feeInnerServiceSMOImpl;
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeFeeConfigConstant.LIST_BILL;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.GET;
+    }
+
+
+    public IFeeConfigInnerServiceSMO getFeeConfigInnerServiceSMOImpl() {
+        return feeConfigInnerServiceSMOImpl;
+    }
+
+    public void setFeeConfigInnerServiceSMOImpl(IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl) {
+        this.feeConfigInnerServiceSMOImpl = feeConfigInnerServiceSMOImpl;
+    }
+
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+        Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区ID");
+
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+
+        BillDto billDto = BeanConvertUtil.covertBean(reqJson, BillDto.class);
+
+        int count = feeInnerServiceSMOImpl.queryBillCount(billDto);
+        List<BillDto> billDtos = null;
+        if (count > 0) {
+            billDtos = feeInnerServiceSMOImpl.queryBills(billDto);
+        } else {
+            billDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, billDtos);
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        context.setResponseEntity(responseEntity);
+
+    }
+}

+ 74 - 0
Api/src/main/java/com/java110/api/listener/fee/ListBillOweFeeListener.java

@@ -0,0 +1,74 @@
+package com.java110.api.listener.fee;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.listener.AbstractServiceApiListener;
+import com.java110.core.annotation.Java110Listener;
+import com.java110.core.context.DataFlowContext;
+import com.java110.core.smo.fee.IFeeConfigInnerServiceSMO;
+import com.java110.core.smo.fee.IFeeInnerServiceSMO;
+import com.java110.dto.fee.BillDto;
+import com.java110.dto.fee.BillOweFeeDto;
+import com.java110.event.service.api.ServiceDataFlowEvent;
+import com.java110.result.ResultVo;
+import com.java110.utils.constant.ServiceCodeFeeConfigConstant;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * 查询账单侦听类
+ */
+@Java110Listener("listBillOweFeeListener")
+public class ListBillOweFeeListener extends AbstractServiceApiListener {
+
+    @Autowired
+    private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl;
+
+    @Autowired
+    private IFeeInnerServiceSMO feeInnerServiceSMOImpl;
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeFeeConfigConstant.LIST_BILL_OWE_FEE;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.GET;
+    }
+
+
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+        Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区ID");
+
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+
+        BillOweFeeDto billOweFeeDto = BeanConvertUtil.covertBean(reqJson, BillOweFeeDto.class);
+
+        int count = feeInnerServiceSMOImpl.queryBillOweFeeCount(billOweFeeDto);
+        List<BillOweFeeDto> billOweFeeDtos = null;
+        if (count > 0) {
+            billOweFeeDtos = feeInnerServiceSMOImpl.queryBillOweFees(billOweFeeDto);
+        } else {
+            billOweFeeDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, billOweFeeDtos);
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        context.setResponseEntity(responseEntity);
+
+    }
+}

+ 3 - 13
Api/src/main/java/com/java110/api/listener/inspectionPlanStaff/DeleteInspectionPlanStaffListener.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.api.bmo.inspectionPlanStaff.IInspectionPlanStaffBMO;
 import com.java110.api.listener.AbstractServiceApiListener;
+import com.java110.api.listener.AbstractServiceApiPlusListener;
 import com.java110.core.annotation.Java110Listener;
 import com.java110.core.context.DataFlowContext;
 import com.java110.entity.center.AppService;
@@ -22,7 +23,7 @@ import org.springframework.http.ResponseEntity;
  * add by wuxw 2019-06-30
  */
 @Java110Listener("deleteInspectionPlanStaffListener")
-public class DeleteInspectionPlanStaffListener extends AbstractServiceApiListener {
+public class DeleteInspectionPlanStaffListener extends AbstractServiceApiPlusListener {
 
     @Autowired
     private IInspectionPlanStaffBMO inspectionPlanStaffBMOImpl;
@@ -39,18 +40,7 @@ public class DeleteInspectionPlanStaffListener extends AbstractServiceApiListene
     @Override
     protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
 
-        HttpHeaders header = new HttpHeaders();
-        context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D");
-        JSONArray businesses = new JSONArray();
-
-        AppService service = event.getAppService();
-
-        //添加单元信息
-        businesses.add(inspectionPlanStaffBMOImpl.deleteInspectionPlanStaff(reqJson, context));
-
-        ResponseEntity<String> responseEntity = inspectionPlanStaffBMOImpl.callService(context, service.getServiceCode(), businesses);
-
-        context.setResponseEntity(responseEntity);
+       inspectionPlanStaffBMOImpl.deleteInspectionPlanStaff(reqJson, context);
     }
 
     @Override

+ 3 - 14
Api/src/main/java/com/java110/api/listener/inspectionPlanStaff/SaveInspectionPlanStaffListener.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.api.bmo.inspectionPlanStaff.IInspectionPlanStaffBMO;
 import com.java110.api.listener.AbstractServiceApiListener;
+import com.java110.api.listener.AbstractServiceApiPlusListener;
 import com.java110.core.annotation.Java110Listener;
 import com.java110.core.context.DataFlowContext;
 import com.java110.entity.center.AppService;
@@ -22,7 +23,7 @@ import org.springframework.http.ResponseEntity;
  * add by wuxw 2019-06-30
  */
 @Java110Listener("saveInspectionPlanStaffListener")
-public class SaveInspectionPlanStaffListener extends AbstractServiceApiListener {
+public class SaveInspectionPlanStaffListener extends AbstractServiceApiPlusListener {
 
     @Autowired
     private IInspectionPlanStaffBMO inspectionPlanStaffBMOImpl;
@@ -42,19 +43,7 @@ public class SaveInspectionPlanStaffListener extends AbstractServiceApiListener
 
     @Override
     protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        HttpHeaders header = new HttpHeaders();
-        context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D");
-        JSONArray businesses = new JSONArray();
-
-        AppService service = event.getAppService();
-
-        //添加单元信息
-        businesses.add(inspectionPlanStaffBMOImpl.addInspectionPlanStaff(reqJson, context));
-
-        ResponseEntity<String> responseEntity = inspectionPlanStaffBMOImpl.callService(context, service.getServiceCode(), businesses);
-
-        context.setResponseEntity(responseEntity);
+        inspectionPlanStaffBMOImpl.addInspectionPlanStaff(reqJson, context);
     }
 
     @Override

+ 3 - 15
Api/src/main/java/com/java110/api/listener/inspectionPlanStaff/UpdateInspectionPlanStaffListener.java

@@ -3,7 +3,7 @@ package com.java110.api.listener.inspectionPlanStaff;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.api.bmo.inspectionPlanStaff.IInspectionPlanStaffBMO;
-import com.java110.api.listener.AbstractServiceApiListener;
+import com.java110.api.listener.AbstractServiceApiPlusListener;
 import com.java110.core.annotation.Java110Listener;
 import com.java110.core.context.DataFlowContext;
 import com.java110.entity.center.AppService;
@@ -22,7 +22,7 @@ import org.springframework.http.ResponseEntity;
  * add by wuxw 2019-06-30
  */
 @Java110Listener("updateInspectionPlanStaffListener")
-public class UpdateInspectionPlanStaffListener extends AbstractServiceApiListener {
+public class UpdateInspectionPlanStaffListener extends AbstractServiceApiPlusListener {
 
     @Autowired
     private IInspectionPlanStaffBMO inspectionPlanStaffBMOImpl;
@@ -42,19 +42,7 @@ public class UpdateInspectionPlanStaffListener extends AbstractServiceApiListene
 
     @Override
     protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        HttpHeaders header = new HttpHeaders();
-        context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D");
-        JSONArray businesses = new JSONArray();
-
-        AppService service = event.getAppService();
-
-        //添加单元信息
-        businesses.add(inspectionPlanStaffBMOImpl.updateInspectionPlanStaff(reqJson, context));
-
-        ResponseEntity<String> responseEntity = inspectionPlanStaffBMOImpl.callService(context, service.getServiceCode(), businesses);
-
-        context.setResponseEntity(responseEntity);
+        inspectionPlanStaffBMOImpl.updateInspectionPlanStaff(reqJson, context);
     }
 
     @Override

+ 5 - 0
CommunityService/src/main/java/com/java110/community/listener/inspectionPlanStaff/AbstractInspectionPlanStaffBusinessServiceDataFlowListener.java

@@ -83,6 +83,11 @@ public abstract class AbstractInspectionPlanStaffBusinessServiceDataFlowListener
 
         currentInspectionPlanStaffInfo.put("operate", StatusConstant.OPERATE_DEL);
         getInspectionPlanStaffServiceDaoImpl().saveBusinessInspectionPlanStaffInfo(currentInspectionPlanStaffInfo);
+        for (Object key : currentInspectionPlanStaffInfo.keySet()) {
+            if (businessInspectionPlanStaff.get(key) == null) {
+                businessInspectionPlanStaff.put(key.toString(), currentInspectionPlanStaffInfo.get(key));
+            }
+        }
     }
 
 

+ 15 - 17
CommunityService/src/main/java/com/java110/community/listener/inspectionPlanStaff/DeleteInspectionPlanStaffInfoListener.java

@@ -62,26 +62,24 @@ public class DeleteInspectionPlanStaffInfoListener extends AbstractInspectionPla
         Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理");
 
         //处理 businessInspectionPlanStaff 节点
-        if (data.containsKey("businessInspectionPlanStaff")) {
-            //处理 businessInspectionPlanStaff 节点
-            if (data.containsKey("businessInspectionPlanStaff")) {
-                Object _obj = data.get("businessInspectionPlanStaff");
-                JSONArray businessInspectionPlanStaffs = null;
+        if (data.containsKey(BusinessTypeConstant.BUSINESS_TYPE_DELETE_PLAN_STAFF)) {
+            Object _obj = data.get(BusinessTypeConstant.BUSINESS_TYPE_DELETE_PLAN_STAFF);
+            JSONArray businessInspectionPlanStaffs = null;
+            if (_obj instanceof JSONObject) {
+                businessInspectionPlanStaffs = new JSONArray();
+                businessInspectionPlanStaffs.add(_obj);
+            } else {
+                businessInspectionPlanStaffs = (JSONArray) _obj;
+            }
+            //JSONObject businessInspectionPlanStaff = data.getJSONObject("businessInspectionPlanStaff");
+            for (int _inspectionPlanStaffIndex = 0; _inspectionPlanStaffIndex < businessInspectionPlanStaffs.size(); _inspectionPlanStaffIndex++) {
+                JSONObject businessInspectionPlanStaff = businessInspectionPlanStaffs.getJSONObject(_inspectionPlanStaffIndex);
+                doBusinessInspectionPlanStaff(business, businessInspectionPlanStaff);
                 if (_obj instanceof JSONObject) {
-                    businessInspectionPlanStaffs = new JSONArray();
-                    businessInspectionPlanStaffs.add(_obj);
-                } else {
-                    businessInspectionPlanStaffs = (JSONArray) _obj;
-                }
-                //JSONObject businessInspectionPlanStaff = data.getJSONObject("businessInspectionPlanStaff");
-                for (int _inspectionPlanStaffIndex = 0; _inspectionPlanStaffIndex < businessInspectionPlanStaffs.size(); _inspectionPlanStaffIndex++) {
-                    JSONObject businessInspectionPlanStaff = businessInspectionPlanStaffs.getJSONObject(_inspectionPlanStaffIndex);
-                    doBusinessInspectionPlanStaff(business, businessInspectionPlanStaff);
-                    if (_obj instanceof JSONObject) {
-                        dataFlowContext.addParamOut("ipStaffId", businessInspectionPlanStaff.getString("ipStaffId"));
-                    }
+                    dataFlowContext.addParamOut("ipStaffId", businessInspectionPlanStaff.getString("ipStaffId"));
                 }
             }
+
         }
 
 

+ 2 - 2
CommunityService/src/main/java/com/java110/community/listener/inspectionPlanStaff/SaveInspectionPlanStaffInfoListener.java

@@ -54,8 +54,8 @@ public class SaveInspectionPlanStaffInfoListener extends AbstractInspectionPlanS
         Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理");
 
         //处理 businessInspectionPlanStaff 节点
-        if (data.containsKey("businessInspectionPlanStaff")) {
-            Object bObj = data.get("businessInspectionPlanStaff");
+        if (data.containsKey(BusinessTypeConstant.BUSINESS_TYPE_SAVE_PLAN_STAFF)) {
+            Object bObj = data.get(BusinessTypeConstant.BUSINESS_TYPE_SAVE_PLAN_STAFF);
             JSONArray businessInspectionPlanStaffs = null;
             if (bObj instanceof JSONObject) {
                 businessInspectionPlanStaffs = new JSONArray();

+ 15 - 17
CommunityService/src/main/java/com/java110/community/listener/inspectionPlanStaff/UpdateInspectionPlanStaffInfoListener.java

@@ -63,26 +63,24 @@ public class UpdateInspectionPlanStaffInfoListener extends AbstractInspectionPla
         Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理");
 
         //处理 businessInspectionPlanStaff 节点
-        if (data.containsKey("businessInspectionPlanStaff")) {
-            //处理 businessInspectionPlanStaff 节点
-            if (data.containsKey("businessInspectionPlanStaff")) {
-                Object _obj = data.get("businessInspectionPlanStaff");
-                JSONArray businessInspectionPlanStaffs = null;
+        if (data.containsKey(BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PLAN_STAFF)) {
+            Object _obj = data.get(BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PLAN_STAFF);
+            JSONArray businessInspectionPlanStaffs = null;
+            if (_obj instanceof JSONObject) {
+                businessInspectionPlanStaffs = new JSONArray();
+                businessInspectionPlanStaffs.add(_obj);
+            } else {
+                businessInspectionPlanStaffs = (JSONArray) _obj;
+            }
+            //JSONObject businessInspectionPlanStaff = data.getJSONObject("businessInspectionPlanStaff");
+            for (int _inspectionPlanStaffIndex = 0; _inspectionPlanStaffIndex < businessInspectionPlanStaffs.size(); _inspectionPlanStaffIndex++) {
+                JSONObject businessInspectionPlanStaff = businessInspectionPlanStaffs.getJSONObject(_inspectionPlanStaffIndex);
+                doBusinessInspectionPlanStaff(business, businessInspectionPlanStaff);
                 if (_obj instanceof JSONObject) {
-                    businessInspectionPlanStaffs = new JSONArray();
-                    businessInspectionPlanStaffs.add(_obj);
-                } else {
-                    businessInspectionPlanStaffs = (JSONArray) _obj;
-                }
-                //JSONObject businessInspectionPlanStaff = data.getJSONObject("businessInspectionPlanStaff");
-                for (int _inspectionPlanStaffIndex = 0; _inspectionPlanStaffIndex < businessInspectionPlanStaffs.size(); _inspectionPlanStaffIndex++) {
-                    JSONObject businessInspectionPlanStaff = businessInspectionPlanStaffs.getJSONObject(_inspectionPlanStaffIndex);
-                    doBusinessInspectionPlanStaff(business, businessInspectionPlanStaff);
-                    if (_obj instanceof JSONObject) {
-                        dataFlowContext.addParamOut("ipStaffId", businessInspectionPlanStaff.getString("ipStaffId"));
-                    }
+                    dataFlowContext.addParamOut("ipStaffId", businessInspectionPlanStaff.getString("ipStaffId"));
                 }
             }
+
         }
     }
 

+ 40 - 7
FeeService/src/main/java/com/java110/fee/dao/IFeeServiceDao.java

@@ -11,23 +11,24 @@ import java.util.Map;
  * 费用组件内部之间使用,没有给外围系统提供服务能力
  * 费用服务接口类,要求全部以字符串传输,方便微服务化
  * 新建客户,修改客户,删除客户,查询客户等功能
- *
+ * <p>
  * Created by wuxw on 2016/12/27.
  */
 public interface IFeeServiceDao {
 
     /**
      * 保存 费用信息
+     *
      * @param businessFeeInfo 费用信息 封装
      * @throws DAOException 操作数据库异常
      */
     void saveBusinessFeeInfo(Map businessFeeInfo) throws DAOException;
 
 
-
     /**
      * 查询费用信息(business过程)
      * 根据bId 查询费用信息
+     *
      * @param info bId 信息
      * @return 费用信息
      * @throws DAOException DAO异常
@@ -35,21 +36,19 @@ public interface IFeeServiceDao {
     List<Map> getBusinessFeeInfo(Map info) throws DAOException;
 
 
-
-
     /**
      * 保存 费用信息 Business数据到 Instance中
+     *
      * @param info
      * @throws DAOException DAO异常
      */
     void saveFeeInfoInstance(Map info) throws DAOException;
 
 
-
-
     /**
      * 查询费用信息(instance过程)
      * 根据bId 查询费用信息
+     *
      * @param info bId 信息
      * @return 费用信息
      * @throws DAOException DAO异常
@@ -57,9 +56,9 @@ public interface IFeeServiceDao {
     List<Map> getFeeInfo(Map info) throws DAOException;
 
 
-
     /**
      * 修改费用信息
+     *
      * @param info 修改信息
      * @throws DAOException DAO异常
      */
@@ -74,4 +73,38 @@ public interface IFeeServiceDao {
      */
     int queryFeesCount(Map info);
 
+    /**
+     * 查询费用账期
+     *
+     * @param info 费用信息
+     * @return 费用数量
+     */
+    public int queryBillCount(Map info);
+
+    /**
+     * 查询账期
+     *
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    public List<Map> queryBills(Map info) throws DAOException;
+
+    /**
+     * 查询账单欠费总数
+     *
+     * @param info 费用信息
+     * @return 费用数量
+     */
+    public int queryBillOweFeeCount(Map info);
+
+    /**
+     * 查询账单欠费
+     *
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    public List<Map> queryBillOweFees(Map info) throws DAOException;
+
 }

+ 68 - 0
FeeService/src/main/java/com/java110/fee/dao/impl/FeeServiceDaoImpl.java

@@ -125,5 +125,73 @@ public class FeeServiceDaoImpl extends BaseServiceDao implements IFeeServiceDao
         return Integer.parseInt(businessFeeInfos.get(0).get("count").toString());
     }
 
+    /**
+     * 查询费用账期
+     * @param info 费用信息
+     * @return 费用数量
+     */
+    @Override
+    public int queryBillCount(Map info) {
+        logger.debug("查询费用数据 入参 info : {}",info);
+
+        List<Map> businessFeeInfos = sqlSessionTemplate.selectList("feeServiceDaoImpl.queryBillCount", info);
+        if (businessFeeInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessFeeInfos.get(0).get("count").toString());
+    }
+
+
+    /**
+     * 查询账期
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> queryBills(Map info) throws DAOException {
+        logger.debug("查询费用信息 入参 info : {}",info);
+
+        List<Map> businessFeeInfos = sqlSessionTemplate.selectList("feeServiceDaoImpl.queryBills",info);
+
+        return businessFeeInfos;
+    }
+
+
+    /**
+     * 查询账单欠费总数
+     * @param info 费用信息
+     * @return 费用数量
+     */
+    @Override
+    public int queryBillOweFeeCount(Map info) {
+        logger.debug("查询费用数据 入参 info : {}",info);
+
+        List<Map> businessFeeInfos = sqlSessionTemplate.selectList("feeServiceDaoImpl.queryBillOweFeeCount", info);
+        if (businessFeeInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessFeeInfos.get(0).get("count").toString());
+    }
+
+
+    /**
+     * 查询账单欠费
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> queryBillOweFees(Map info) throws DAOException {
+        logger.debug("查询费用信息 入参 info : {}",info);
+
+        List<Map> businessFeeInfos = sqlSessionTemplate.selectList("feeServiceDaoImpl.queryBillOweFees",info);
+
+        return businessFeeInfos;
+    }
+
+
 
 }

+ 64 - 3
FeeService/src/main/java/com/java110/fee/smo/impl/FeeInnerServiceSMOImpl.java

@@ -1,6 +1,8 @@
 package com.java110.fee.smo.impl;
 
 
+import com.java110.dto.fee.BillDto;
+import com.java110.dto.fee.BillOweFeeDto;
 import com.java110.fee.dao.IFeeServiceDao;
 import com.java110.utils.util.BeanConvertUtil;
 import com.java110.core.base.smo.BaseServiceSMO;
@@ -34,7 +36,7 @@ public class FeeInnerServiceSMOImpl extends BaseServiceSMO implements IFeeInnerS
     private IUserInnerServiceSMO userInnerServiceSMOImpl;
 
     @Override
-    public List<FeeDto> queryFees(@RequestBody  FeeDto feeDto) {
+    public List<FeeDto> queryFees(@RequestBody FeeDto feeDto) {
 
         //校验是否传了 分页信息
 
@@ -63,7 +65,7 @@ public class FeeInnerServiceSMOImpl extends BaseServiceSMO implements IFeeInnerS
     /**
      * 从用户列表中查询用户,将用户中的信息 刷新到 floor对象中
      *
-     * @param fee 小区费用信息
+     * @param fee   小区费用信息
      * @param users 用户列表
      */
     private void refreshFee(FeeDto fee, List<UserDto> users) {
@@ -91,7 +93,66 @@ public class FeeInnerServiceSMOImpl extends BaseServiceSMO implements IFeeInnerS
 
     @Override
     public int queryFeesCount(@RequestBody FeeDto feeDto) {
-        return feeServiceDaoImpl.queryFeesCount(BeanConvertUtil.beanCovertMap(feeDto));    }
+        return feeServiceDaoImpl.queryFeesCount(BeanConvertUtil.beanCovertMap(feeDto));
+    }
+
+
+    @Override
+    public int queryBillCount(@RequestBody BillDto billDto) {
+        return feeServiceDaoImpl.queryBillCount(BeanConvertUtil.beanCovertMap(billDto));
+    }
+
+    /**
+     * 查询账期
+     *
+     * @param billDto
+     * @return
+     */
+    @Override
+    public List<BillDto> queryBills(@RequestBody BillDto billDto) {
+
+        //校验是否传了 分页信息
+
+        int page = billDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            billDto.setPage((page - 1) * billDto.getRow());
+        }
+
+        List<BillDto> billDtos = BeanConvertUtil.covertBeanList(feeServiceDaoImpl.queryBills(BeanConvertUtil.beanCovertMap(billDto)), BillDto.class);
+
+        return billDtos;
+
+    }
+
+
+    @Override
+    public int queryBillOweFeeCount(@RequestBody BillOweFeeDto billDto) {
+        return feeServiceDaoImpl.queryBillOweFeeCount(BeanConvertUtil.beanCovertMap(billDto));
+    }
+
+    /**
+     * 查询账期
+     *
+     * @param billDto
+     * @return
+     */
+    @Override
+    public List<BillOweFeeDto> queryBillOweFees(@RequestBody BillOweFeeDto billDto) {
+
+        //校验是否传了 分页信息
+
+        int page = billDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            billDto.setPage((page - 1) * billDto.getRow());
+        }
+
+        List<BillOweFeeDto> billOweFeeDtos = BeanConvertUtil.covertBeanList(feeServiceDaoImpl.queryBillOweFees(BeanConvertUtil.beanCovertMap(billDto)), BillOweFeeDto.class);
+
+        return billOweFeeDtos;
+
+    }
 
     public IFeeServiceDao getFeeServiceDaoImpl() {
         return feeServiceDaoImpl;

+ 107 - 0
java110-bean/src/main/java/com/java110/dto/fee/BillDto.java

@@ -0,0 +1,107 @@
+package com.java110.dto.fee;
+
+import com.java110.dto.PageDto;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName BillDto
+ * @Description TODO
+ * @Author wuxw
+ * @Date 2020/5/28 17:11
+ * @Version 1.0
+ * add by wuxw 2020/5/28
+ **/
+public class BillDto extends PageDto implements Serializable {
+
+    private String billId;
+    private String billName;
+    private String receivable;
+    private String receipts;
+    private String billTime;
+    private String communityId;
+    private String configId;
+    private String createTime;
+    private String remark;
+    private String curBill;
+
+    public String getBillId() {
+        return billId;
+    }
+
+    public void setBillId(String billId) {
+        this.billId = billId;
+    }
+
+    public String getBillName() {
+        return billName;
+    }
+
+    public void setBillName(String billName) {
+        this.billName = billName;
+    }
+
+    public String getReceivable() {
+        return receivable;
+    }
+
+    public void setReceivable(String receivable) {
+        this.receivable = receivable;
+    }
+
+    public String getReceipts() {
+        return receipts;
+    }
+
+    public void setReceipts(String receipts) {
+        this.receipts = receipts;
+    }
+
+    public String getBillTime() {
+        return billTime;
+    }
+
+    public void setBillTime(String billTime) {
+        this.billTime = billTime;
+    }
+
+    public String getCommunityId() {
+        return communityId;
+    }
+
+    public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+    public String getConfigId() {
+        return configId;
+    }
+
+    public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getCurBill() {
+        return curBill;
+    }
+
+    public void setCurBill(String curBill) {
+        this.curBill = curBill;
+    }
+}

+ 144 - 0
java110-bean/src/main/java/com/java110/dto/fee/BillOweFeeDto.java

@@ -0,0 +1,144 @@
+package com.java110.dto.fee;
+
+import com.java110.dto.PageDto;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName BillOweFeeDto
+ * @Description TODO
+ * @Author wuxw
+ * @Date 2020/5/28 17:42
+ * @Version 1.0
+ * add by wuxw 2020/5/28
+ **/
+public class BillOweFeeDto extends PageDto implements Serializable {
+
+    private String oweId;
+    private String billId;
+    private String feeId;
+    private String billAmountOwed;
+    private String amountOwed;
+    private String feeEndTime;
+    private String ownerId;
+    private String ownerName;
+    private String ownerTel;
+    private String payerObjName;
+    private String payerObjType;
+    private String communityId;
+    private String state;
+    private String createTime;
+
+
+    public String getOweId() {
+        return oweId;
+    }
+
+    public void setOweId(String oweId) {
+        this.oweId = oweId;
+    }
+
+    public String getBillId() {
+        return billId;
+    }
+
+    public void setBillId(String billId) {
+        this.billId = billId;
+    }
+
+    public String getFeeId() {
+        return feeId;
+    }
+
+    public void setFeeId(String feeId) {
+        this.feeId = feeId;
+    }
+
+    public String getBillAmountOwed() {
+        return billAmountOwed;
+    }
+
+    public void setBillAmountOwed(String billAmountOwed) {
+        this.billAmountOwed = billAmountOwed;
+    }
+
+    public String getAmountOwed() {
+        return amountOwed;
+    }
+
+    public void setAmountOwed(String amountOwed) {
+        this.amountOwed = amountOwed;
+    }
+
+    public String getFeeEndTime() {
+        return feeEndTime;
+    }
+
+    public void setFeeEndTime(String feeEndTime) {
+        this.feeEndTime = feeEndTime;
+    }
+
+    public String getOwnerId() {
+        return ownerId;
+    }
+
+    public void setOwnerId(String ownerId) {
+        this.ownerId = ownerId;
+    }
+
+    public String getOwnerName() {
+        return ownerName;
+    }
+
+    public void setOwnerName(String ownerName) {
+        this.ownerName = ownerName;
+    }
+
+    public String getOwnerTel() {
+        return ownerTel;
+    }
+
+    public void setOwnerTel(String ownerTel) {
+        this.ownerTel = ownerTel;
+    }
+
+    public String getPayerObjName() {
+        return payerObjName;
+    }
+
+    public void setPayerObjName(String payerObjName) {
+        this.payerObjName = payerObjName;
+    }
+
+    public String getPayerObjType() {
+        return payerObjType;
+    }
+
+    public void setPayerObjType(String payerObjType) {
+        this.payerObjType = payerObjType;
+    }
+
+    public String getCommunityId() {
+        return communityId;
+    }
+
+    public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+}

+ 78 - 0
java110-bean/src/main/java/com/java110/po/inspection/InspectionPlanStaffPo.java

@@ -0,0 +1,78 @@
+package com.java110.po.inspection;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName InspectionPlanStaffPo
+ * @Description TODO
+ * @Author wuxw
+ * @Date 2020/5/28 19:07
+ * @Version 1.0
+ * add by wuxw 2020/5/28
+ **/
+public class InspectionPlanStaffPo implements Serializable {
+
+    private String ipStaffId;
+    private String inspectionPlanId;
+    private String communityId;
+    private String staffId;
+    private String staffName;
+    private String startTime;
+    private String endTime;
+
+    public String getIpStaffId() {
+        return ipStaffId;
+    }
+
+    public void setIpStaffId(String ipStaffId) {
+        this.ipStaffId = ipStaffId;
+    }
+
+    public String getInspectionPlanId() {
+        return inspectionPlanId;
+    }
+
+    public void setInspectionPlanId(String inspectionPlanId) {
+        this.inspectionPlanId = inspectionPlanId;
+    }
+
+    public String getCommunityId() {
+        return communityId;
+    }
+
+    public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+    public String getStaffId() {
+        return staffId;
+    }
+
+    public void setStaffId(String staffId) {
+        this.staffId = staffId;
+    }
+
+    public String getStaffName() {
+        return staffName;
+    }
+
+    public void setStaffName(String staffName) {
+        this.staffName = staffName;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+}

+ 176 - 0
java110-bean/src/main/java/com/java110/result/ResultVo.java

@@ -0,0 +1,176 @@
+package com.java110.result;
+
+import com.alibaba.fastjson.JSONObject;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName ResultVo
+ * @Description TODO
+ * @Author wuxw
+ * @Date 2020/5/28 18:41
+ * @Version 1.0
+ * add by wuxw 2020/5/28
+ **/
+public class ResultVo implements Serializable {
+
+    public static final int CODE_ERROR = 404;// 未知异常
+
+    public static final int CODE_OK = 200; // 成功
+
+    public static final int CODE_UNAUTHORIZED = 401; //认证失败
+
+
+    public static final String MSG_ERROR = "未知异常";// 未知异常
+
+    public static final String MSG_OK = "成功"; // 成功
+
+    public static final String MSG_UNAUTHORIZED = "认证失败"; //认证失败
+
+    // 分页页数
+    private int page;
+    // 行数
+    private int rows;
+
+    //页数
+    private int records;
+
+    // 总记录数
+    private int total;
+
+    //状态嘛
+    private int code;
+
+    //错误提示
+    private String msg;
+
+    //数据对象
+    private Object data;
+
+    public ResultVo() {
+    }
+
+    public ResultVo(int code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    public ResultVo(Object data) {
+        this.code = CODE_OK;
+        this.msg = MSG_OK;
+        this.data = data;
+    }
+
+    public ResultVo(int records, int total, Object data) {
+        this.code = CODE_OK;
+        this.msg = MSG_OK;
+        this.records = records;
+        this.total = total;
+        this.data = data;
+    }
+
+    public ResultVo(int code, String msg, Object data) {
+        this.code = code;
+        this.msg = msg;
+        this.data = data;
+    }
+
+    public ResultVo(int records, int total, int code, String msg, Object data) {
+        this.records = records;
+        this.total = total;
+        this.code = code;
+        this.msg = msg;
+        this.data = data;
+    }
+
+    public int getPage() {
+        return page;
+    }
+
+    public void setPage(int page) {
+        this.page = page;
+    }
+
+    public int getRows() {
+        return rows;
+    }
+
+    public void setRows(int rows) {
+        this.rows = rows;
+    }
+
+    public int getRecords() {
+        return records;
+    }
+
+    public void setRecords(int records) {
+        this.records = records;
+    }
+
+    public int getTotal() {
+        return total;
+    }
+
+    public void setTotal(int total) {
+        this.total = total;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public Object getData() {
+        return data;
+    }
+
+    public void setData(Object data) {
+        this.data = data;
+    }
+
+    @Override
+    public String toString() {
+        return JSONObject.toJSONString(this);
+    }
+
+    /**
+     * 创建ResponseEntity对象
+     * @param records 页数
+     * @param total 总记录数
+     * @param data 数据对象
+     * @return
+     */
+    public static ResponseEntity<String> createResponseEntity(int records, int total, Object data) {
+        ResultVo resultVo = new ResultVo(records, total, data);
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+        return responseEntity;
+    }
+
+    /**
+     * 创建ResponseEntity对象
+     * @param records 页数
+     * @param total 总记录数
+     * @param code 状态嘛
+     * @param msg 返回信息
+     * @param data 数据对象
+     * @return
+     */
+    public static ResponseEntity<String> createResponseEntity(int records, int total, int code, String msg, Object data) {
+        ResultVo resultVo = new ResultVo(records, total, code, msg, data);
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+        return responseEntity;
+    }
+}

+ 40 - 1
java110-core/src/main/java/com/java110/core/smo/fee/IFeeInnerServiceSMO.java

@@ -1,7 +1,10 @@
 package com.java110.core.smo.fee;
 
 import com.java110.core.feign.FeignConfiguration;
+import com.java110.dto.fee.BillDto;
+import com.java110.dto.fee.BillOweFeeDto;
 import com.java110.dto.fee.FeeDto;
+import com.java110.utils.util.BeanConvertUtil;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -24,7 +27,6 @@ public interface IFeeInnerServiceSMO {
     /**
      * <p>查询小区楼信息</p>
      *
-     *
      * @param feeDto 数据对象分享
      * @return FeeDto 对象数据
      */
@@ -39,4 +41,41 @@ public interface IFeeInnerServiceSMO {
      */
     @RequestMapping(value = "/queryFeesCount", method = RequestMethod.POST)
     int queryFeesCount(@RequestBody FeeDto feeDto);
+
+
+    /**
+     * 查询 账期信息 总数
+     *
+     * @param billDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryBillCount", method = RequestMethod.POST)
+    public int queryBillCount(@RequestBody BillDto billDto);
+
+    /**
+     * 查询 账期信息
+     *
+     * @param billDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryBills", method = RequestMethod.POST)
+    public List<BillDto> queryBills(@RequestBody BillDto billDto);
+
+    /**
+     * 查询 欠费数量
+     *
+     * @param billDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryBillOweFeeCount", method = RequestMethod.POST)
+    public int queryBillOweFeeCount(@RequestBody BillOweFeeDto billDto);
+
+    /**
+     * 查询 欠费信息
+     *
+     * @param billDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryBillOweFees", method = RequestMethod.POST)
+    public List<BillOweFeeDto> queryBillOweFees(@RequestBody BillOweFeeDto billDto);
 }

+ 175 - 4
java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml

@@ -20,7 +20,8 @@
         select t.amount,t.operate,t.income_obj_id,t.income_obj_id incomeObjId,t.fee_type_cd,t.fee_type_cd
         feeTypeCd,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,t.fee_id,t.fee_id feeId,t.user_id,t.user_id userId,t.payer_obj_id,t.payer_obj_id
-        payerObjId,t.fee_flag,t.fee_flag feeFlag,t.state,t.config_id,t.config_id configId,t.payer_obj_type,t.payer_obj_type payerObjType
+        payerObjId,t.fee_flag,t.fee_flag feeFlag,t.state,t.config_id,t.config_id
+        configId,t.payer_obj_type,t.payer_obj_type payerObjType
         from business_pay_fee t
         where 1 =1
         <if test="amount !=null and amount != ''">
@@ -135,8 +136,10 @@
         endTime,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId,t.user_id,t.user_id
         userId,t.payer_obj_id,t.payer_obj_id payerObjId,pfc.square_price squarePrice,pfc.additional_amount
         additionalAmount,t.fee_flag,t.fee_flag feeFlag,t.state,t.config_id,t.config_id configId,
-        pfc.fee_name feeName,td1.name feeTypeCdName,td2.name stateName,td3.name feeFlagName,pfc.computing_formula computingFormula,
-        t.payer_obj_type,t.payer_obj_type payerObjType,pfc.is_default isDefault,pfc.start_time configStartTime,pfc.end_time configEndTime
+        pfc.fee_name feeName,td1.name feeTypeCdName,td2.name stateName,td3.name feeFlagName,pfc.computing_formula
+        computingFormula,
+        t.payer_obj_type,t.payer_obj_type payerObjType,pfc.is_default isDefault,pfc.start_time
+        configStartTime,pfc.end_time configEndTime
         from pay_fee t,pay_fee_config pfc,t_dict td1,t_dict td2,t_dict td3
         where 1 =1
         and t.fee_type_cd = pfc.fee_type_cd
@@ -311,7 +314,7 @@
             and t.end_time &lt; #{arrearsEndTime}
         </if>
         <if test="noArrearsEndTime != null">
-            and t.end_time &gt;  #{noArrearsEndTime}
+            and t.end_time &gt; #{noArrearsEndTime}
         </if>
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
@@ -348,7 +351,175 @@
             and t.payer_obj_type = #{payerObjType}
         </if>
 
+    </select>
+
+
+    <!-- 查询账期 -->
+    <select id="queryBills" parameterType="Map" resultType="Map">
+        select
+            t.bill_id billId,
+            t.bill_name billName,
+            t.receivable,
+            t.receipts,
+            t.bill_time billTime,
+            t.community_id communityId,
+            t.config_id configId,
+            t.cur_bill curBill
+        from bill t
+        where 1 =1
+        <if test="billId !=null and billId != ''">
+            and t.bill_id= #{billId}
+        </if>
+        <if test="billName !=null and billName != ''">
+            and t.bill_name= #{billName}
+        </if>
+        <if test="receivable !=null and receivable != ''">
+            and t.receivable= #{receivable}
+        </if>
+        <if test="receipts !=null">
+            and t.receipts= #{receipts}
+        </if>
+        <if test="billTime !=null">
+            and t.bill_time= #{billTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="configId != null and configId != ''">
+            and t.config_id = #{configId}
+        </if>
+        <if test="curBill != null and curBill != ''">
+            and t.cur_bill = #{curBill}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
+    </select>
+
+    <!-- 查询账期 -->
+    <select id="queryBillCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from bill t
+        where 1 =1
+        <if test="billId !=null and billId != ''">
+            and t.bill_id= #{billId}
+        </if>
+        <if test="billName !=null and billName != ''">
+            and t.bill_name= #{billName}
+        </if>
+        <if test="receivable !=null and receivable != ''">
+            and t.receivable= #{receivable}
+        </if>
+        <if test="receipts !=null">
+            and t.receipts= #{receipts}
+        </if>
+        <if test="billTime !=null">
+            and t.bill_time= #{billTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="configId != null and configId != ''">
+            and t.config_id = #{configId}
+        </if>
+        <if test="curBill != null and curBill != ''">
+            and t.cur_bill = #{curBill}
+        </if>
+    </select>
+
+
+    <!-- 查询账期 -->
+    <select id="queryBillOweFees" parameterType="Map" resultType="Map">
+        select
+            t.owe_id oweId,
+            t.bill_id billId,
+            t.fee_id feeId,
+            t.bill_amount_owed billAmountOwed,
+            t.amount_owed amountOwed,
+            t.fee_end_time feeEndTime,
+            t.owner_id ownerId,
+            t.owner_name ownerName,
+            t.owner_tel ownerTel,
+            t.payer_obj_name payerObjName,
+            t.payer_obj_type payerObjType,
+            t.community_id communityId,
+            t.state,
+            t.create_time createTime
+        from bill_owe_fee t
+        where 1 =1
+        <if test="oweId !=null and oweId != ''">
+            and t.owe_id= #{oweId}
+        </if>
+        <if test="billId !=null and billId != ''">
+            and t.bill_id= #{billId}
+        </if>
+        <if test="feeId !=null and feeId != ''">
+            and t.fee_id= #{feeId}
+        </if>
+        <if test="billAmountOwed !=null and billAmountOwed != ''">
+            and t.bill_amount_owed= #{billAmountOwed}
+        </if>
+        <if test="amountOwed !=null and amountOwed != ''">
+            and t.amount_owed= #{amountOwed}
+        </if>
+        <if test="feeEndTime != null">
+            and t.fee_end_time = #{feeEndTime}
+        </if>
+        <if test="ownerId != null and ownerId != ''">
+            and t.owner_id = #{ownerId}
+        </if>
+        <if test="ownerName != null and ownerName != ''">
+            and t.owner_name = #{ownerName}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
+    </select>
 
+    <!-- 查询账期 -->
+    <select id="queryBillOweFeeCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from bill_owe_fee t
+        where 1 =1
+        <if test="oweId !=null and oweId != ''">
+            and t.owe_id= #{oweId}
+        </if>
+        <if test="billId !=null and billId != ''">
+            and t.bill_id= #{billId}
+        </if>
+        <if test="feeId !=null and feeId != ''">
+            and t.fee_id= #{feeId}
+        </if>
+        <if test="billAmountOwed !=null and billAmountOwed != ''">
+            and t.bill_amount_owed= #{billAmountOwed}
+        </if>
+        <if test="amountOwed !=null and amountOwed != ''">
+            and t.amount_owed= #{amountOwed}
+        </if>
+        <if test="feeEndTime != null">
+            and t.fee_end_time = #{feeEndTime}
+        </if>
+        <if test="ownerId != null and ownerId != ''">
+            and t.owner_id = #{ownerId}
+        </if>
+        <if test="ownerName != null and ownerName != ''">
+            and t.owner_name = #{ownerName}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
     </select>
 
+
 </mapper>

+ 11 - 0
java110-utils/src/main/java/com/java110/utils/constant/ServiceCodeFeeConfigConstant.java

@@ -45,4 +45,15 @@ public class ServiceCodeFeeConfigConstant {
     public static final String LIST_FEE = "fee.listFee";
 
 
+    /**
+     * 查询 账单信息
+     */
+    public static final String LIST_BILL = "fee.listBill";
+
+    /**
+     * 查询 账单信息
+     */
+    public static final String LIST_BILL_OWE_FEE = "fee.listBillOweFee";
+
+
 }