Selaa lähdekoodia

停车费功能开发完成

wuxw 6 vuotta sitten
vanhempi
commit
b25f5e7c34
20 muutettua tiedostoa jossa 986 lisäystä ja 135 poistoa
  1. 2 0
      Api/src/main/java/com/java110/api/listener/fee/ListParkingSpacesWhereFeeSetListener.java
  2. 211 0
      Api/src/main/java/com/java110/api/listener/fee/SaveParkingSpaceCreateFeeListener.java
  3. 75 0
      WebService/src/main/java/com/java110/web/components/fee/ListParkingSpaceFeeComponent.java
  4. 83 0
      WebService/src/main/java/com/java110/web/components/fee/ParkingSpaceCreateFeeAddComponent.java
  5. 5 3
      WebService/src/main/java/com/java110/web/components/fee/ParkingSpaceCreateFeeComponent.java
  6. 22 0
      WebService/src/main/java/com/java110/web/smo/feeConfig/IParkingSpaceCreateFeeSMO.java
  7. 68 0
      WebService/src/main/java/com/java110/web/smo/feeConfig/impl/ParkingSpaceCreateFeeSMOImpl.java
  8. 1 0
      WebService/src/main/resources/components/feePackage/delete-fee/deleteFee.js
  9. 63 0
      WebService/src/main/resources/components/feePackage/listParkingSpaceFee/listParkingSpaceFee.html
  10. 85 0
      WebService/src/main/resources/components/feePackage/listParkingSpaceFee/listParkingSpaceFee.js
  11. 16 42
      WebService/src/main/resources/components/feePackage/parkingSpaceCreateFee/parkingSpaceCreateFee.html
  12. 4 84
      WebService/src/main/resources/components/feePackage/parkingSpaceCreateFee/parkingSpaceCreateFee.js
  13. 90 0
      WebService/src/main/resources/components/feePackage/parkingSpaceCreateFeeAdd/parkingSpaceCreateFeeAdd.html
  14. 204 0
      WebService/src/main/resources/components/feePackage/parkingSpaceCreateFeeAdd/parkingSpaceCreateFeeAdd.js
  15. 6 4
      WebService/src/main/resources/components/ownerPackage/list-owner/listOwner.js
  16. 37 0
      WebService/src/main/resources/views/listParkingSpaceFeeFlow.html
  17. 9 0
      java110-bean/src/main/java/com/java110/dto/parking/ParkingSpaceDto.java
  18. 1 0
      java110-db/src/main/resources/mapper/community/ParkingSpaceServiceDaoImplMapper.xml
  19. 2 2
      java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml
  20. 2 0
      java110-utils/src/main/java/com/java110/utils/constant/ServiceCodeConstant.java

+ 2 - 0
Api/src/main/java/com/java110/api/listener/fee/ListParkingSpacesWhereFeeSetListener.java

@@ -80,6 +80,7 @@ public class ListParkingSpacesWhereFeeSetListener extends AbstractServiceApiList
         }
 
         ParkingSpaceDto parkingSpaceDto = BeanConvertUtil.covertBean(reqJson, ParkingSpaceDto.class);
+        parkingSpaceDto.setWithOwnerCar(true);
         //查询总记录数
         int total = parkingSpaceInnerServiceSMOImpl.queryParkingSpacesCount(BeanConvertUtil.covertBean(reqJson, ParkingSpaceDto.class));
         apiParkingSpaceVo.setTotal(total);
@@ -176,6 +177,7 @@ public class ListParkingSpacesWhereFeeSetListener extends AbstractServiceApiList
                     tmpParkingSpaceDto.setOwnerName(tmp.getOwnerName());
                     tmpParkingSpaceDto.setIdCard(tmp.getIdCard());
                     tmpParkingSpaceDto.setLink(tmp.getLink());
+                    tmpParkingSpaceDto.setCarNum(tmp.getCarNum());
                 }
             }
         }

+ 211 - 0
Api/src/main/java/com/java110/api/listener/fee/SaveParkingSpaceCreateFeeListener.java

@@ -0,0 +1,211 @@
+package com.java110.api.listener.fee;
+
+import com.alibaba.fastjson.JSONArray;
+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.parkingSpace.IParkingSpaceInnerServiceSMO;
+import com.java110.dto.fee.FeeConfigDto;
+import com.java110.dto.parking.ParkingSpaceDto;
+import com.java110.entity.center.AppService;
+import com.java110.event.service.api.ServiceDataFlowEvent;
+import com.java110.utils.constant.BusinessTypeConstant;
+import com.java110.utils.constant.CommonConstant;
+import com.java110.utils.constant.ServiceCodeConstant;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.DateUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.util.List;
+
+/**
+ * @ClassName SaveParkingSpaceCreateFeeListener
+ * @Description TODO
+ * @Author wuxw
+ * @Date 2020/1/31 15:57
+ * @Version 1.0
+ * add by wuxw 2020/1/31
+ **/
+@Java110Listener("saveParkingSpaceCreateFeeListener")
+public class SaveParkingSpaceCreateFeeListener extends AbstractServiceApiListener {
+    private static Logger logger = LoggerFactory.getLogger(SaveParkingSpaceCreateFeeListener.class);
+
+    private static final int DEFAULT_ADD_FEE_COUNT = 200;
+
+    @Autowired
+    private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl;
+
+    @Autowired
+    private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl;
+
+    @Override
+    public String getServiceCode() {
+        return ServiceCodeConstant.SERVICE_CODE_SAVE_PARKING_SPEC_CREATE_FEE;
+    }
+
+    @Override
+    public HttpMethod getHttpMethod() {
+        return HttpMethod.POST;
+    }
+
+    @Override
+    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
+        // super.validatePageInfo(pd);
+        Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区ID");
+        Assert.hasKeyAndValue(reqJson, "locationTypeCd", "未包含收费类型");
+        Assert.hasKeyAndValue(reqJson, "locationObjId", "未包含收费对象");
+        Assert.hasKeyAndValue(reqJson, "configId", "未包含收费项目");
+        Assert.hasKeyAndValue(reqJson, "billType", "未包含出账类型");
+        Assert.hasKeyAndValue(reqJson, "storeId", "未包含商户ID");
+    }
+
+    @Override
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+        logger.debug("ServiceDataFlowEvent : {}", event);
+        List<ParkingSpaceDto> parkingSpaceDtos = null;
+        FeeConfigDto feeConfigDto = new FeeConfigDto();
+        feeConfigDto.setCommunityId(reqJson.getString("communityId"));
+        feeConfigDto.setConfigId(reqJson.getString("configId"));
+        List<FeeConfigDto> feeConfigDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto);
+        Assert.listOnlyOne(feeConfigDtos, "当前费用项ID不存在或存在多条" + reqJson.getString("configId"));
+        reqJson.put("feeTypeCd", feeConfigDtos.get(0).getFeeTypeCd());
+        reqJson.put("feeFlag", feeConfigDtos.get(0).getFeeFlag());
+        //判断收费范围
+        ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto();
+        parkingSpaceDto.setState(reqJson.containsKey("parkingSpaceState") ? reqJson.getString("parkingSpaceState") : "");
+        if (reqJson.containsKey("parkingSpaceState") && "SH".equals(reqJson.getString("parkingSpaceState"))) {
+            parkingSpaceDto.setState("");
+            parkingSpaceDto.setStates(new String[]{"S", "H"});
+        }
+        if ("1000".equals(reqJson.getString("locationTypeCd"))) {//小区
+
+            parkingSpaceDto.setCommunityId(reqJson.getString("communityId"));
+            parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto);
+
+        } else if ("2000".equals(reqJson.getString("locationTypeCd"))) {//停车场
+            //ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto();
+            parkingSpaceDto.setCommunityId(reqJson.getString("communityId"));
+            parkingSpaceDto.setPaId(reqJson.getString("locationObjId"));
+            parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto);
+
+        } else if ("3000".equals(reqJson.getString("locationTypeCd"))) {//停车位
+            //ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto();
+            parkingSpaceDto.setCommunityId(reqJson.getString("communityId"));
+            parkingSpaceDto.setPsId(reqJson.getString("locationObjId"));
+            parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto);
+        } else {
+            throw new IllegalArgumentException("收费范围错误");
+        }
+
+        if (parkingSpaceDtos == null || parkingSpaceDtos.size() < 1) {
+            throw new IllegalArgumentException("未查到需要付费的房屋");
+        }
+
+        dealParkingSpaceFee(parkingSpaceDtos, context, reqJson, event);
+    }
+
+    private void dealParkingSpaceFee(List<ParkingSpaceDto> parkingSpaceDtos, DataFlowContext context, JSONObject reqJson, ServiceDataFlowEvent event) {
+
+        AppService service = event.getAppService();
+
+
+        HttpHeaders header = new HttpHeaders();
+        context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D");
+        JSONArray businesses = new JSONArray();
+        JSONObject paramInObj = null;
+        ResponseEntity<String> responseEntity = null;
+        int failParkingSpaces = 0;
+        //添加单元信息
+        for (int parkingSpaceIndex = 0; parkingSpaceIndex < parkingSpaceDtos.size(); parkingSpaceIndex++) {
+
+            businesses.add(addFee(parkingSpaceDtos.get(parkingSpaceIndex), reqJson, context));
+
+            if (parkingSpaceIndex % DEFAULT_ADD_FEE_COUNT == 0 && parkingSpaceIndex != 0) {
+                paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders());
+                //将 rest header 信息传递到下层服务中去
+                super.freshHttpHeader(header, context.getRequestCurrentHeaders());
+
+                responseEntity = this.callService(context, service.getServiceCode(), paramInObj);
+
+                if (responseEntity.getStatusCode() != HttpStatus.OK) {
+                    failParkingSpaces += businesses.size();
+                }
+
+                businesses = new JSONArray();
+            }
+        }
+        if (businesses != null && businesses.size() > 0) {
+
+            paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders());
+            //将 rest header 信息传递到下层服务中去
+            super.freshHttpHeader(header, context.getRequestCurrentHeaders());
+            responseEntity = this.callService(context, service.getServiceCode(), paramInObj);
+            if (responseEntity.getStatusCode() != HttpStatus.OK) {
+                failParkingSpaces += businesses.size();
+            }
+        }
+
+        JSONObject paramOut = new JSONObject();
+        paramOut.put("totalParkingSpace", parkingSpaceDtos.size());
+        paramOut.put("successParkingSpace", parkingSpaceDtos.size() - failParkingSpaces);
+        paramOut.put("errorParkingSpace", failParkingSpaces);
+
+        responseEntity = new ResponseEntity<>(paramOut.toJSONString(), HttpStatus.OK);
+
+        context.setResponseEntity(responseEntity);
+    }
+
+    /**
+     * 添加物业费用
+     *
+     * @param paramInJson     接口调用放传入入参
+     * @param dataFlowContext 数据上下文
+     * @return 订单服务能够接受的报文
+     */
+    private JSONObject addFee(ParkingSpaceDto parkingSpaceDto, JSONObject paramInJson, DataFlowContext dataFlowContext) {
+
+
+        JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
+        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_FEE_INFO);
+        business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 1);
+        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
+        JSONObject businessUnit = new JSONObject();
+        businessUnit.put("feeId", "-1");
+        businessUnit.put("configId", paramInJson.getString("configId"));
+        businessUnit.put("feeTypeCd", paramInJson.getString("feeTypeCd"));
+        businessUnit.put("incomeObjId", paramInJson.getString("storeId"));
+        businessUnit.put("amount", "-1.00");
+        businessUnit.put("startTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
+        businessUnit.put("endTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
+        businessUnit.put("communityId", paramInJson.getString("communityId"));
+        businessUnit.put("payerObjId", parkingSpaceDto.getPsId());
+        businessUnit.put("payerObjType", "6666");
+        businessUnit.put("feeFlag", paramInJson.getString("feeFlag"));
+        businessUnit.put("state", "2008001");
+        businessUnit.put("userId", dataFlowContext.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID));
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessFee", businessUnit);
+
+        return business;
+    }
+
+    @Override
+    public int getOrder() {
+        return DEFAULT_ORDER;
+    }
+
+    public IParkingSpaceInnerServiceSMO getParkingSpaceInnerServiceSMOImpl() {
+        return parkingSpaceInnerServiceSMOImpl;
+    }
+
+    public void setParkingSpaceInnerServiceSMOImpl(IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl) {
+        this.parkingSpaceInnerServiceSMOImpl = parkingSpaceInnerServiceSMOImpl;
+    }
+}

+ 75 - 0
WebService/src/main/java/com/java110/web/components/fee/ListParkingSpaceFeeComponent.java

@@ -0,0 +1,75 @@
+package com.java110.web.components.fee;
+
+
+import com.java110.core.context.IPageData;
+import com.java110.web.smo.feeConfig.IDeleteFeeSMO;
+import com.java110.web.smo.feeConfig.IListFeeConfigsSMO;
+import com.java110.web.smo.feeConfig.IListFeeSMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 费用项组件管理类
+ * <p>
+ * add by wuxw
+ * <p>
+ * 2019-06-29
+ */
+@Component("listParkingSpaceFee")
+public class ListParkingSpaceFeeComponent {
+
+    @Autowired
+    private IListFeeConfigsSMO listFeeConfigsSMOImpl;
+
+    @Autowired
+    private IListFeeSMO listFeeSMOImpl;
+
+    @Autowired
+    private IDeleteFeeSMO deleteFeeSMOImpl;
+
+    /**
+     * 查询费用项列表
+     *
+     * @param pd 页面数据封装
+     * @return 返回 ResponseEntity 对象
+     */
+    public ResponseEntity<String> list(IPageData pd) {
+        return listFeeSMOImpl.list(pd);
+    }
+    /**
+     * 查询费用项列表
+     *
+     * @param pd 页面数据封装
+     * @return 返回 ResponseEntity 对象
+     */
+    public ResponseEntity<String> deleteFee(IPageData pd) {
+        return deleteFeeSMOImpl.deleteFee(pd);
+    }
+
+
+    public IListFeeConfigsSMO getListFeeConfigsSMOImpl() {
+        return listFeeConfigsSMOImpl;
+    }
+
+    public void setListFeeConfigsSMOImpl(IListFeeConfigsSMO listFeeConfigsSMOImpl) {
+        this.listFeeConfigsSMOImpl = listFeeConfigsSMOImpl;
+    }
+
+    public IListFeeSMO getListFeeSMOImpl() {
+        return listFeeSMOImpl;
+    }
+
+    public void setListFeeSMOImpl(IListFeeSMO listFeeSMOImpl) {
+        this.listFeeSMOImpl = listFeeSMOImpl;
+    }
+
+    public IDeleteFeeSMO getDeleteFeeSMOImpl() {
+        return deleteFeeSMOImpl;
+    }
+
+    public void setDeleteFeeSMOImpl(IDeleteFeeSMO deleteFeeSMOImpl) {
+        this.deleteFeeSMOImpl = deleteFeeSMOImpl;
+    }
+}

+ 83 - 0
WebService/src/main/java/com/java110/web/components/fee/ParkingSpaceCreateFeeAddComponent.java

@@ -0,0 +1,83 @@
+package com.java110.web.components.fee;
+
+
+import com.java110.core.context.IPageData;
+import com.java110.web.smo.feeConfig.IListFeeConfigsSMO;
+import com.java110.web.smo.feeConfig.IParkingSpaceCreateFeeSMO;
+import com.java110.web.smo.feeConfig.IRoomCreateFeeSMO;
+import com.java110.web.smo.parkingArea.IListParkingAreasSMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 费用项组件管理类
+ * <p>
+ * add by wuxw
+ * <p>
+ * 2019-06-29
+ */
+@Component("parkingSpaceCreateFeeAdd")
+public class ParkingSpaceCreateFeeAddComponent {
+
+    @Autowired
+    private IListFeeConfigsSMO listFeeConfigsSMOImpl;
+
+    @Autowired
+    private IParkingSpaceCreateFeeSMO parkingSpaceCreateFeeSMOImpl;
+
+    @Autowired
+    private IListParkingAreasSMO listParkingAreasSMOImpl;
+
+
+
+    /**
+     * 查询费用项列表
+     *
+     * @param pd 页面数据封装
+     * @return 返回 ResponseEntity 对象
+     */
+    public ResponseEntity<String> list(IPageData pd) {
+        return listFeeConfigsSMOImpl.listFeeConfigs(pd);
+    }
+
+
+    public ResponseEntity<String> listParkingArea(IPageData pd){
+        return listParkingAreasSMOImpl.listParkingAreas(pd);
+    }
+
+    /**
+     * 批量创建费用
+     * @param pd
+     * @return
+     */
+    public ResponseEntity<String> save(IPageData pd) {
+        return parkingSpaceCreateFeeSMOImpl.createFee(pd);
+    }
+
+    public IListFeeConfigsSMO getListFeeConfigsSMOImpl() {
+        return listFeeConfigsSMOImpl;
+    }
+
+    public void setListFeeConfigsSMOImpl(IListFeeConfigsSMO listFeeConfigsSMOImpl) {
+        this.listFeeConfigsSMOImpl = listFeeConfigsSMOImpl;
+    }
+
+    public IParkingSpaceCreateFeeSMO getParkingSpaceCreateFeeSMOImpl() {
+        return parkingSpaceCreateFeeSMOImpl;
+    }
+
+    public void setParkingSpaceCreateFeeSMOImpl(IParkingSpaceCreateFeeSMO parkingSpaceCreateFeeSMOImpl) {
+        this.parkingSpaceCreateFeeSMOImpl = parkingSpaceCreateFeeSMOImpl;
+    }
+
+    public IListParkingAreasSMO getListParkingAreasSMOImpl() {
+        return listParkingAreasSMOImpl;
+    }
+
+    public void setListParkingAreasSMOImpl(IListParkingAreasSMO listParkingAreasSMOImpl) {
+        this.listParkingAreasSMOImpl = listParkingAreasSMOImpl;
+    }
+
+}

+ 5 - 3
WebService/src/main/java/com/java110/web/components/fee/ParkingSpaceCreateFeeComponent.java

@@ -3,6 +3,7 @@ package com.java110.web.components.fee;
 import com.java110.core.context.IPageData;
 import com.java110.web.smo.IFloorServiceSMO;
 import com.java110.web.smo.IUnitServiceSMO;
+import com.java110.web.smo.feeConfig.IListParkingSpacesWhereFeeSetSMO;
 import com.java110.web.smo.feeConfig.IListRoomsWhereFeeSetSMO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
@@ -26,11 +27,12 @@ public class ParkingSpaceCreateFeeComponent {
     private IUnitServiceSMO unitServiceSMOImpl;
 
     @Autowired
-    private IListRoomsWhereFeeSetSMO listRoomsWhereFeeSetSMOImpl;
+    private IListParkingSpacesWhereFeeSetSMO listParkingSpacesWhereFeeSetSMOImpl;
 
-    public ResponseEntity<String> listParkingSpace(IPageData pd){
-        return listRoomsWhereFeeSetSMOImpl.listRooms(pd);
+    public ResponseEntity<String> listParkingSpace(IPageData pd) {
+        return listParkingSpacesWhereFeeSetSMOImpl.listParkingSpaces(pd);
     }
+
     /**
      * 根据 floorId 查询单元信息
      *

+ 22 - 0
WebService/src/main/java/com/java110/web/smo/feeConfig/IParkingSpaceCreateFeeSMO.java

@@ -0,0 +1,22 @@
+package com.java110.web.smo.feeConfig;
+
+import com.java110.core.context.IPageData;
+import com.java110.utils.exception.SMOException;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 费用项管理服务接口类
+ * <p>
+ * add by wuxw 2019-06-29
+ */
+public interface IParkingSpaceCreateFeeSMO {
+
+    /**
+     * 查询费用项信息
+     *
+     * @param pd 页面数据封装
+     * @return ResponseEntity 对象数据
+     * @throws SMOException 业务代码层
+     */
+    ResponseEntity<String> createFee(IPageData pd) throws SMOException;
+}

+ 68 - 0
WebService/src/main/java/com/java110/web/smo/feeConfig/impl/ParkingSpaceCreateFeeSMOImpl.java

@@ -0,0 +1,68 @@
+package com.java110.web.smo.feeConfig.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.component.AbstractComponentSMO;
+import com.java110.core.context.IPageData;
+import com.java110.entity.component.ComponentValidateResult;
+import com.java110.utils.constant.ServiceConstant;
+import com.java110.utils.exception.SMOException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.web.smo.feeConfig.IParkingSpaceCreateFeeSMO;
+import com.java110.web.smo.feeConfig.IRoomCreateFeeSMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.Map;
+
+/**
+ * 查询feeConfig服务类
+ */
+@Service("parkingSpaceCreateFeeSMOImpl")
+public class ParkingSpaceCreateFeeSMOImpl extends AbstractComponentSMO implements IParkingSpaceCreateFeeSMO {
+
+    @Autowired
+    private RestTemplate restTemplate;
+
+    @Override
+    public ResponseEntity<String> createFee(IPageData pd) throws SMOException {
+        return businessProcess(pd);
+    }
+
+    @Override
+    protected void validate(IPageData pd, JSONObject paramIn) {
+        Assert.hasKeyAndValue(paramIn, "communityId", "未包含小区ID");
+        Assert.hasKeyAndValue(paramIn, "locationTypeCd", "未包含收费范围");
+        Assert.hasKeyAndValue(paramIn, "locationObjId", "未包含收费对象");
+        Assert.hasKeyAndValue(paramIn, "configId", "未包含收费项目");
+        Assert.hasKeyAndValue(paramIn, "billType", "未包含出账类型");
+    }
+
+    @Override
+    protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) {
+        ComponentValidateResult result = super.validateStoreStaffCommunityRelationship(pd, restTemplate);
+
+        Map paramMap = BeanConvertUtil.beanCovertMap(result);
+        paramIn.putAll(paramMap);
+
+        String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/fee.saveParkingSpaceCreateFee";
+
+
+        ResponseEntity<String> responseEntity = this.callCenterService(restTemplate, pd, JSONObject.toJSONString(paramIn),
+                apiUrl,
+                HttpMethod.POST);
+
+        return responseEntity;
+    }
+
+    public RestTemplate getRestTemplate() {
+        return restTemplate;
+    }
+
+    public void setRestTemplate(RestTemplate restTemplate) {
+        this.restTemplate = restTemplate;
+    }
+}

+ 1 - 0
WebService/src/main/resources/components/feePackage/delete-fee/deleteFee.js

@@ -33,6 +33,7 @@
                             //关闭model
                             $('#deleteFeeModel').modal('hide');
                             vc.emit('listRoomFee','notify',{});
+                            vc.emit('listParkingSpaceFee','notify',{});
                             vc.toast("删除费用成功");
                             return ;
                         }

+ 63 - 0
WebService/src/main/resources/components/feePackage/listParkingSpaceFee/listParkingSpaceFee.html

@@ -0,0 +1,63 @@
+<div id="component">
+    <div class="row">
+        <div class="col-lg-12">
+            <div class="ibox">
+                <div class="ibox-title">
+                    <h5>{{listParkingSpaceCreateFeeInfo.parkingSpaceName}}费用</h5>
+                    <div class="ibox-tools" style="top:10px;">
+                        <!--                        <button type="button" class="btn btn-primary btn-sm"-->
+                        <!--                                style="margin-left:10px" v-on:click="_openParkingSpaceCreateFeeAddModal(null,true)">-->
+                        <!--                            <i class="glyphicon glyphicon-plus"></i> 批量创建-->
+                        <!--                        </button>-->
+
+                    </div>
+                </div>
+                <div class="ibox-content">
+
+                    <table class="footable table table-stripped toggle-arrow-tiny" style="margin-top:10px"
+                           data-page-size="10">
+
+                        <thead>
+                        <tr>
+                            <th class="text-center">费用项ID</th>
+                            <th class="text-center">费用标识</th>
+                            <th class="text-center">费用类型</th>
+                            <th class="text-center">费用项目</th>
+                            <th class="text-center">开始时间</th>
+                            <th class="text-center">到期时间</th>
+                            <th class="text-center">状态</th>
+                            <th class="text-center">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr v-for="fee in listParkingSpaceCreateFeeInfo.fees">
+                            <td class="text-center">{{fee.feeId}}</td>
+                            <td class="text-center">{{fee.feeFlagName}}</td>
+                            <td class="text-center">{{fee.feeTypeCdName}}</td>
+                            <td class="text-center">{{fee.feeName}}</td>
+                            <td class="text-center">{{fee.startTime}}</td>
+                            <td class="text-center">{{fee.endTime}}</td>
+                            <td class="text-center">{{fee.stateName}}</td>
+                            <td class="text-right">
+                                <button class="btn btn-link btn-xs"
+                                        v-on:click="_payFee(fee)">缴费
+                                </button>
+                                <button class="btn btn-link btn-xs"
+                                        v-on:click="_payFeeHis(fee)">缴费历史
+                                </button>
+                                <button class="btn btn-link btn-xs" v-if="fee.isDefault == 'F'"
+                                        v-on:click="_deleteFee(fee)">取消费用
+                                </button>
+                            </td>
+                        </tr>
+                        </tbody>
+                    </table>
+                    <!-- 分页 -->
+                    <vc:create name="pagination"></vc:create>
+
+                </div>
+            </div>
+        </div>
+    </div>
+    <vc:create name="deleteFee"></vc:create>
+</div>

+ 85 - 0
WebService/src/main/resources/components/feePackage/listParkingSpaceFee/listParkingSpaceFee.js

@@ -0,0 +1,85 @@
+(function(vc){
+    var DEFAULT_PAGE = 1;
+    var DEFAULT_ROWS = 10;
+    vc.extends({
+        data:{
+            listParkingSpaceCreateFeeInfo:{
+                fees:[],
+                parkingSpaceName:'',
+                psId:'',
+                total: 0,
+                records: 1,
+            }
+        },
+        _initMethod:function(){
+            if(vc.notNull(vc.getParam("num"))){
+                  vc.component.listParkingSpaceCreateFeeInfo.parkingSpaceName = vc.getParam('areaNum')+"号停车场"+vc.getParam('num')+"号车位";
+                  vc.component.listParkingSpaceCreateFeeInfo.psId = vc.getParam('psId');
+            };
+            vc.component._loadListParkingSpaceCreateFeeInfo(1,10);
+        },
+        _initEvent:function(){
+            vc.on('listParkingSpaceFee','notify',function(_param){
+                vc.component._loadListParkingSpaceCreateFeeInfo(DEFAULT_PAGE, DEFAULT_ROWS);
+            });
+            vc.on('pagination', 'page_event',
+                function(_currentPage) {
+                    vc.component._loadListParkingSpaceCreateFeeInfo(_currentPage, DEFAULT_ROWS);
+                });
+        },
+        methods:{
+            _loadListParkingSpaceCreateFeeInfo:function(_page,_row){
+                var param = {
+                    params:{
+                        page:_page,
+                        row:_row,
+                        communityId:vc.getCurrentCommunity().communityId,
+                        payerObjId:vc.component.listParkingSpaceCreateFeeInfo.psId
+                    }
+                };
+
+                //发送get请求
+               vc.http.get('listParkingSpaceFee',
+                            'list',
+                             param,
+                             function(json){
+                                var _feeConfigInfo = JSON.parse(json);
+                                vc.component.listParkingSpaceCreateFeeInfo.total = _feeConfigInfo.total;
+                                vc.component.listParkingSpaceCreateFeeInfo.records = _feeConfigInfo.records;
+                                vc.component.listParkingSpaceCreateFeeInfo.fees = _feeConfigInfo.fees;
+                                vc.emit('pagination', 'init', {
+                                    total: _feeConfigInfo.records,
+                                    currentPage: _page
+                                });
+                             },function(){
+                                console.log('请求失败处理');
+                             }
+                           );
+            },
+            _payFee:function(_fee){
+               vc.jumpToPage('/flow/payFeeOrderFlow?'+vc.objToGetParam(_fee));
+            },
+            _payFeeHis:function(_fee){
+               vc.jumpToPage('/flow/propertyFeeFlow?'+vc.objToGetParam(_fee));
+            },
+            _deleteFee:function(_fee){
+
+                var dateA = new Date(_fee.startTime);
+                var dateB = new Date();
+                if(dateA.setHours(0, 0, 0, 0) != dateB.setHours(0, 0, 0, 0)){
+                    vc.toast("只能取消当天添加的费用");
+                    return;
+                }
+
+                vc.emit('deleteFee','openDeleteFeeModal',{
+                         communityId:vc.getCurrentCommunity().communityId,
+                         feeId:_fee.feeId
+                });
+            },
+            _refreshListParkingSpaceCreateFeeInfo:function(){
+                vc.component.listParkingSpaceCreateFeeInfo._currentFeeConfigName = "";
+            }
+        }
+
+    });
+})(window.vc);

+ 16 - 42
WebService/src/main/resources/components/feePackage/parkingSpaceCreateFee/parkingSpaceCreateFee.html

@@ -5,9 +5,9 @@
                 <div class="ibox-title">
                     <h5>查询条件</h5>
                     <div class="ibox-tools" style="top:10px;">
-                        <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
-                                v-on:click="_moreCondition()">{{parkingSpaceCreateFeeInfo.moreCondition == true?'隐藏':'更多'}}
-                        </button>
+<!--                        <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"-->
+<!--                                v-on:click="_moreCondition()">{{parkingSpaceCreateFeeInfo.moreCondition == true?'隐藏':'更多'}}-->
+<!--                        </button>-->
                     </div>
                 </div>
                 <div class="ibox-content">
@@ -15,32 +15,23 @@
 
                         <div class="col-sm-4">
                             <div class="form-group input-group">
-                                <input type="text" placeholder="请选择楼栋"
-                                       v-model="parkingSpaceCreateFeeInfo.conditions.floorName" class=" form-control">
-                                <div class="input-group-prepend">
-                                    <button type="button" class="btn btn-primary btn-sm"
-                                            v-on:click="_openChooseFloorMethod()"><i
-                                            class="glyphicon glyphicon-search"></i> 选择
-                                    </button>
-                                </div>
+                                    <input type="text" placeholder="请填写车位编码" class="form-control form-control-sm"
+                                           v-model="parkingSpaceCreateFeeInfo.conditions.num">
                             </div>
 
                         </div>
                         <div class="col-sm-3">
                             <div class="form-group">
-                                <select class="form-control-sm form-control input-s-sm inline"
-                                        v-model="parkingSpaceCreateFeeInfo.conditions.unitId">
-                                    <option selected value="">请选择单元</option>
-                                    <option v-for="(unit,index) in parkingSpaceUnits" :key="index" v-bind:value="unit.unitId">
-                                        {{unit.unitNum}}单元
-                                    </option>
-                                </select>
+                                <div class="form-group">
+                                    <input type="text" placeholder="请填写车牌号" class="form-control form-control-sm"
+                                           v-model="parkingSpaceCreateFeeInfo.conditions.carNum">
+                                </div>
                             </div>
                         </div>
                         <div class="col-sm-4">
                             <div class="form-group">
-                                <input type="text" placeholder="请填写房屋编号" class="form-control form-control-sm"
-                                       v-model="parkingSpaceCreateFeeInfo.conditions.parkingSpaceNum">
+                                <input type="text" placeholder="请填写车位ID" class="form-control form-control-sm"
+                                       v-model="parkingSpaceCreateFeeInfo.conditions.psId">
                             </div>
                         </div>
                         <div class="col-sm-1">
@@ -50,23 +41,6 @@
                         </div>
 
                     </div>
-                    <div class="row" v-if="parkingSpaceCreateFeeInfo.moreCondition == true">
-                        <div class="col-sm-4">
-                            <div class="form-group">
-                                <input type="text" placeholder="请填写房屋ID" class="form-control form-control-sm"
-                                       v-model="parkingSpaceCreateFeeInfo.conditions.psId">
-                            </div>
-                        </div>
-                        <div class="col-sm-3">
-                            <input type="text" placeholder="请填写业主名称" class="form-control form-control-sm"
-                                   v-model="parkingSpaceCreateFeeInfo.conditions.ownerName">
-                        </div>
-                        <div class="col-sm-4">
-                            <input type="text" placeholder="请填写业主身份证号" class="form-control form-control-sm"
-                                   v-model="parkingSpaceCreateFeeInfo.conditions.idCard">
-                        </div>
-                    </div>
-
                 </div>
             </div>
         </div>
@@ -76,7 +50,7 @@
         <div class="col-lg-12">
             <div class="ibox">
                 <div class="ibox-title">
-                    <h5>房屋信息</h5>
+                    <h5>车位信息</h5>
                     <div class="ibox-tools" style="top:10px;">
                         <button type="button" class="btn btn-primary btn-sm"
                                 style="margin-left:10px" v-on:click="_openParkingSpaceCreateFeeAddModal(null,true)">
@@ -96,6 +70,7 @@
                         <tr>
                             <th>车位ID</th>
                             <th data-hide="phone">车位编号</th>
+                            <th data-hide="phone">车牌号</th>
                             <th data-hide="phone">业主ID</th>
                             <th data-hide="phone">业主名称</th>
                             <th data-hide="phone">业主身份证</th>
@@ -111,6 +86,9 @@
                             <td>
                                 {{parkingSpace.areaNum}}号停车场{{parkingSpace.num}}号车位
                             </td>
+                            <td>
+                                {{parkingSpace.carNum}}
+                            </td>
                             <td>
                                 {{parkingSpace.ownerId}}
                             </td>
@@ -146,10 +124,6 @@
             </div>
         </div>
     </div>
-    <vc:create name="searchFloor"
-               emitChooseFloor="parkingSpace"
-               emitLoadData="parkingSpace"
-    ></vc:create>
 
     <vc:create name="parkingSpaceCreateFeeAdd"
     ></vc:create>

+ 4 - 84
WebService/src/main/resources/components/feePackage/parkingSpaceCreateFee/parkingSpaceCreateFee.js

@@ -14,31 +14,20 @@
                 floorId:'',
                 unitId:'',
                 state:'',
-                parkingSpaceNum:'',
+                num:'',
                 moreCondition:false,
                 conditions:{
-                    floorId:'',
-                    floorName:'',
-                    unitId:'',
-                    parkingSpaceNum:'',
                     psId:'',
-                    state:'',
-                    section:''
+                    num:'',
+                    carNum:''
                 }
             }
         },
         _initMethod:function(){
-            vc.component.parkingSpaceCreateFeeInfo.conditions.floorId = vc.getParam("floorId");
-            vc.component.parkingSpaceCreateFeeInfo.conditions.floorName = vc.getParam("floorName");
             vc.component.listParkingSpace(DEFAULT_PAGE,DEFAULT_ROW);
         },
         _initEvent:function(){
-            vc.on('parkingSpace','chooseFloor',function(_param){
-                vc.component.parkingSpaceCreateFeeInfo.conditions.floorId = _param.floorId;
-                vc.component.parkingSpaceCreateFeeInfo.conditions.floorName = _param.floorName;
-                vc.component.loadUnits(_param.floorId);
 
-            });
             vc.on('pagination','page_event',function(_currentPage){
                 vc.component.listParkingSpace(_currentPage,DEFAULT_ROW);
             });
@@ -84,87 +73,18 @@
             _openViewParkingSpaceCreateFee:function(_parkingSpace){
                  vc.jumpToPage("/flow/listParkingSpaceFeeFlow?"+vc.objToGetParam(_parkingSpace));
             },
-            /**
-                根据楼ID加载房屋
-            **/
-            loadUnits:function(_floorId){
-                vc.component.addParkingSpaceUnits = [];
-                var param = {
-                    params:{
-                        floorId:_floorId,
-                        communityId:vc.getCurrentCommunity().communityId
-                    }
-                }
-                vc.http.get(
-                    'parkingSpaceCreateFee',
-                    'loadUnits',
-                     param,
-                     function(json,res){
-                        //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
-                        if(res.status == 200){
-                            var tmpUnits = JSON.parse(json);
-                            vc.component.parkingSpaceUnits = tmpUnits;
-
-                            return ;
-                        }
-                        vc.message(json);
-                     },
-                     function(errInfo,error){
-                        console.log('请求失败处理');
-
-                        vc.message(errInfo);
-                     });
-            },
             _queryParkingSpaceMethod:function(){
                 vc.component.listParkingSpace(DEFAULT_PAGE,DEFAULT_ROW);
             },
-            _loadDataByParam: function(){
-                vc.component.parkingSpaceCreateFeeInfo.conditions.floorId = vc.getParam("floorId");
-                vc.component.parkingSpaceCreateFeeInfo.conditions.floorId = vc.getParam("floorName");
-                //如果 floodId 没有传 则,直接结束
-               /* if(!vc.notNull(vc.component.parkingSpaceCreateFeeInfo.conditions.floorId)){
-                    return ;
-                }*/
 
-                var param = {
-                    params:{
-                        communityId:vc.getCurrentCommunity().communityId,
-                        floorId:vc.component.parkingSpaceCreateFeeInfo.conditions.floorId
-                    }
-                }
-
-                vc.http.get(
-                    'parkingSpaceCreateFee',
-                    'loadFloor',
-                     param,
-                     function(json,res){
-                        if(res.status == 200){
-                            var _floorInfo = JSON.parse(json);
-                            var _tmpFloor = _floorInfo.apiFloorDataVoList[0];
-                            /*vc.emit('parkingSpaceSelectFloor','chooseFloor', _tmpFloor);
-                            */
-
-                            return ;
-                        }
-                        vc.message(json);
-                     },
-                     function(errInfo,error){
-                        console.log('请求失败处理');
-
-                        vc.message(errInfo);
-                     });
-
-            },
             _moreCondition:function(){
                 if(vc.component.parkingSpaceCreateFeeInfo.moreCondition){
                     vc.component.parkingSpaceCreateFeeInfo.moreCondition = false;
                 }else{
                     vc.component.parkingSpaceCreateFeeInfo.moreCondition = true;
                 }
-            },
-            _openChooseFloorMethod:function(){
-                vc.emit('searchFloor','openSearchFloorModel',{});
             }
+
         }
     });
 })(window.vc);

+ 90 - 0
WebService/src/main/resources/components/feePackage/parkingSpaceCreateFeeAdd/parkingSpaceCreateFeeAdd.html

@@ -0,0 +1,90 @@
+<div id="parkingSpaceCreateFeeAddModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
+     aria-hidden="true">
+    <div class="modal-dialog modal-lg">
+        <div class="modal-content">
+            <div class="modal-body">
+                <h3 class="m-t-none m-b ">创建费用</h3>
+                <div class="ibox-content">
+                    <div>
+                        <div>
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-form-label">收费范围</label>
+                                <div class="col-sm-10">
+                                    <select class="custom-select" v-model="parkingSpaceCreateFeeAddInfo.locationTypeCd" v-if="parkingSpaceCreateFeeAddInfo.isMore == true">
+                                        <option selected disabled value="">必填,请选择收费范围</option>
+                                        <option value="1000">小区</option>
+                                        <option value="2000">停车场</option>
+                                    </select>
+                                    <input v-model="parkingSpaceCreateFeeAddInfo.locationTypeCdName" v-if="parkingSpaceCreateFeeAddInfo.isMore == false" disabled = "disabled" type="text" placeholder="必填,请填写收费范围"
+                                           class="form-control">
+
+                                </div>
+                            </div>
+                            <div class="form-group row" v-if="parkingSpaceCreateFeeAddInfo.locationTypeCd == '2000'">
+                                <label class="col-sm-2 col-form-label">停车场</label>
+                                <div class="col-sm-10">
+                                    <select class="custom-select" v-model="parkingSpaceCreateFeeAddInfo.locationObjId" >
+                                        <option selected disabled value="">必填,请选择停车场</option>
+                                        <option v-for="(item,index) in parkingSpaceCreateFeeAddInfo.parkingAreas" :key="index"
+                                                v-bind:value="item.paId">{{item.num}}号停车场
+                                        </option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-form-label">费用类型</label>
+                                <div class="col-sm-10">
+                                    <select class="custom-select" v-model="parkingSpaceCreateFeeAddInfo.feeTypeCd" @change="_changeFeeTypeCd(parkingSpaceCreateFeeAddInfo.feeTypeCd)">
+                                        <option selected disabled value="">必填,请选择费用类型</option>
+                                        <option v-for="(item,index) in parkingSpaceCreateFeeAddInfo.feeTypeCds" :key="index"
+                                                v-bind:value="item.statusCd">{{item.name}}
+                                        </option>
+                                    </select></div>
+                            </div>
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-form-label">收费项目</label>
+                                <div class="col-sm-10">
+                                    <select class="custom-select" v-model="parkingSpaceCreateFeeAddInfo.configId">
+                                        <option selected disabled value="">必填,请选择收费项目</option>
+                                        <option v-for="(item,index) in parkingSpaceCreateFeeAddInfo.feeConfigs" :key="index"
+                                                v-bind:value="item.configId">{{item.feeName}}
+                                        </option>
+                                    </select></div>
+                            </div>
+                            <div class="form-group row" >
+                                <label class="col-sm-2 col-form-label">出账类型</label>
+                                <div class="col-sm-10">
+                                    <select class="custom-select" v-model="parkingSpaceCreateFeeAddInfo.billType">
+                                        <option selected disabled value="">必填,请选择出账类型</option>
+                                        <option  value="001">每年1月1日</option>
+                                        <option  value="002">每月1日</option>
+                                        <option  value="003">每日</option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="form-group row" >
+                                <label class="col-sm-2 col-form-label">车位状态</label>
+                                <div class="col-sm-10">
+                                    <select class="custom-select" v-model="parkingSpaceCreateFeeAddInfo.parkingSpaceState">
+                                        <option selected disabled value="">必填,请选择车位状态</option>
+                                        <option  value="S">已售</option>
+                                        <option  value="H">已出租</option>
+                                        <option  value="F">空闲</option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="ibox-content">
+                                <button class="btn btn-primary float-right" type="button"
+                                        v-on:click="saveParkingSpaceCreateFeeInfo()"><i class="fa fa-check"></i>&nbsp;提交
+                                </button>
+                                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
+                                        data-dismiss="modal">取消
+                                </button>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 204 - 0
WebService/src/main/resources/components/feePackage/parkingSpaceCreateFeeAdd/parkingSpaceCreateFeeAdd.js

@@ -0,0 +1,204 @@
+(function(vc) {
+
+    vc.extends({
+        data: {
+            parkingSpaceCreateFeeAddInfo: {
+                feeTypeCds:[],
+                feeConfigs:[],
+                parkingAreas:[],
+                locationTypeCd: '',
+                locationObjId: '',
+                psId: '',
+                feeTypeCd:'',
+                configId:'',
+                billType:'',
+                parkingSpaceState:'',
+                isMore:false,
+                locationTypeCdName:'',
+            }
+        },
+        _initMethod: function() {
+            vc.getDict('pay_fee_config',"fee_type_cd",function(_data){
+                vc.component.parkingSpaceCreateFeeAddInfo.feeTypeCds = _data;
+            });
+
+            vc.component._loadParkingAreas();
+
+        },
+        _initEvent: function() {
+            vc.on('parkingSpaceCreateFeeAdd', 'openParkingSpaceCreateFeeAddModal',
+            function(_parkingSpace) {
+                vc.component.parkingSpaceCreateFeeAddInfo.isMore =_parkingSpace.isMore;
+                if(!_parkingSpace.isMore){
+                    vc.component.parkingSpaceCreateFeeAddInfo.locationTypeCd = '3000';
+                    vc.component.parkingSpaceCreateFeeAddInfo.locationObjId = _parkingSpace.parkingSpace.psId;
+                    vc.component.parkingSpaceCreateFeeAddInfo.psId = _parkingSpace.parkingSpace.psId;
+                    var parkingSpace =  _parkingSpace.parkingSpace;
+                    vc.component.parkingSpaceCreateFeeAddInfo.locationTypeCdName = parkingSpace.areaNum +'号停车场'+parkingSpace.num+'号车位';
+                }
+                $('#parkingSpaceCreateFeeAddModel').modal('show');
+
+            });
+        },
+        methods: {
+
+            parkingSpaceCreateFeeAddValidate() {
+                return vc.validate.validate({
+                    parkingSpaceCreateFeeAddInfo: vc.component.parkingSpaceCreateFeeAddInfo
+                },
+                {
+                    'parkingSpaceCreateFeeAddInfo.locationTypeCd': [{
+                        limit: "required",
+                        param: "",
+                        errInfo: "收费范围不能为空"
+                    },
+                    {
+                        limit: "num",
+                        param: "",
+                        errInfo: "收费范围格式错误"
+                    },
+                    ],
+                    'parkingSpaceCreateFeeAddInfo.locationObjId': [{
+                        limit: "required",
+                        param: "",
+                        errInfo: "收费对象不能为空"
+                    }
+                    ],
+                    'parkingSpaceCreateFeeAddInfo.feeTypeCd': [{
+                        limit: "required",
+                        param: "",
+                        errInfo: "费用类型不能为空"
+                    }
+                    ],
+                    'parkingSpaceCreateFeeAddInfo.configId': [{
+                        limit: "required",
+                        param: "",
+                        errInfo: "费用项目不能为空"
+                    }
+                    ],
+                    'parkingSpaceCreateFeeAddInfo.billType': [{
+                        limit: "required",
+                        param: "",
+                        errInfo: "出账类型不能为空"
+                    }
+                    ],
+                     'parkingSpaceCreateFeeAddInfo.parkingSpaceState': [{
+                         limit: "required",
+                         param: "",
+                         errInfo: "出账类型不能为空"
+                     }
+                     ]
+                });
+            },
+            saveParkingSpaceCreateFeeInfo: function() {
+
+                vc.component.parkingSpaceCreateFeeAddInfo.communityId = vc.getCurrentCommunity().communityId;
+                if (vc.component.parkingSpaceCreateFeeAddInfo.locationTypeCd == '1000') { // 小区ID
+                    vc.component.parkingSpaceCreateFeeAddInfo.locationObjId = vc.component.parkingSpaceCreateFeeAddInfo.communityId;
+                } else if (vc.component.parkingSpaceCreateFeeAddInfo.locationTypeCd == '2000') {
+                } else if (vc.component.parkingSpaceCreateFeeAddInfo.locationTypeCd == '3000') {
+                    vc.component.parkingSpaceCreateFeeAddInfo.locationObjId = vc.component.parkingSpaceCreateFeeAddInfo.psId;
+                } else {
+                    vc.toast("收费范围错误");
+                    return;
+                }
+
+                if (!vc.component.parkingSpaceCreateFeeAddValidate()) {
+                    vc.toast(vc.validate.errInfo);
+                    return;
+                }
+
+                vc.component.parkingSpaceCreateFeeAddInfo.communityId = vc.getCurrentCommunity().communityId;
+
+                vc.http.post('parkingSpaceCreateFeeAdd', 'save', JSON.stringify(vc.component.parkingSpaceCreateFeeAddInfo), {
+                    emulateJSON: true
+                },
+                function(json, res) {
+                    //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
+                    if (res.status == 200) {
+                        //关闭model
+                        var _json = JSON.parse(json);
+                        $('#parkingSpaceCreateFeeAddModel').modal('hide');
+                        vc.component.clearAddFeeConfigInfo();
+                        vc.toast("创建收费成功,总共["+_json.totalParkingSpace+"]车位,成功["+_json.successParkingSpace+"],失败["+_json.errorParkingSpace+"]",8000);
+                        return;
+                    }
+                    vc.message(json);
+
+                },
+                function(errInfo, error) {
+                    console.log('请求失败处理');
+
+                    vc.message(errInfo);
+
+                });
+            },
+            clearAddFeeConfigInfo: function() {
+                var _feeTypeCds = vc.component.parkingSpaceCreateFeeAddInfo.feeTypeCds;
+                var _parkingAreas = vc.component.parkingSpaceCreateFeeAddInfo.parkingAreas;
+                vc.component.parkingSpaceCreateFeeAddInfo = {
+                     feeTypeCds:[],
+                    feeConfigs:[],
+                    parkingAreas:[],
+                    locationTypeCd: '',
+                    locationObjId: '',
+                    psId: '',
+                    feeTypeCd:'',
+                    configId:'',
+                    billType:'',
+                    parkingSpaceState:'',
+                    isMore:false,
+                    locationTypeCdName:'',
+                };
+
+                vc.component.parkingSpaceCreateFeeAddInfo.feeTypeCds = _feeTypeCds;
+                vc.component.parkingSpaceCreateFeeAddInfo.parkingAreas = _parkingAreas;
+            },
+            _changeFeeTypeCd:function(_feeTypeCd){
+
+                var param = {
+                    params: {
+                        page:1,
+                        row:20,
+                        communityId:vc.getCurrentCommunity().communityId,
+                        feeTypeCd:_feeTypeCd,
+                        isDefault:'F'
+                    }
+                };
+
+                //发送get请求
+                vc.http.get('parkingSpaceCreateFeeAdd', 'list', param,
+                function(json, res) {
+                    var _feeConfigManageInfo = JSON.parse(json);
+                    vc.component.parkingSpaceCreateFeeAddInfo.feeConfigs = _feeConfigManageInfo.feeConfigs;
+                },
+                function(errInfo, error) {
+                    console.log('请求失败处理');
+                });
+            },
+            _loadParkingAreas:function(_feeTypeCd){
+
+                var param = {
+                    params: {
+                        page:1,
+                        row:20,
+                        communityId:vc.getCurrentCommunity().communityId,
+                    }
+                };
+
+                //发送get请求
+                vc.http.get('parkingSpaceCreateFeeAdd', 'listParkingArea', param,
+                function(json, res) {
+                    if(res.status == 200){
+                        var _parkingAreaInfo = JSON.parse(json);
+                        vc.component.parkingSpaceCreateFeeAddInfo.parkingAreas = _parkingAreaInfo.parkingAreas;
+                    }
+                },
+                function(errInfo, error) {
+                    console.log('请求失败处理');
+                });
+            }
+        }
+    });
+
+})(window.vc);

+ 6 - 4
WebService/src/main/resources/components/ownerPackage/list-owner/listOwner.js

@@ -51,7 +51,7 @@
             });
 
             vc.on('listOwner', 'chooseParkingSpace', function (_parkingSpace) {
-                vc.jumpToPage("/flow/parkingSpaceFeeFlow?ownerId=" + vc.component.listOwnerInfo._currentOwnerId + "&psId=" + _parkingSpace.psId);
+                vc.jumpToPage("/flow/listParkingSpaceFeeFlow?" + vc.objToGetParam(_parkingSpace));
             });
 
             vc.on("listOwner", "notify", function (_param) {
@@ -152,7 +152,7 @@
                             vc.jumpToPage("/flow/ownerRepairFlow?ownerId=" + _owner.ownerId + "&roomId=" + rooms[0].roomId);
                         } else if (rooms.length == 0) {
                             //vc.message("当前业主未查询到房屋信息");
-vc.toast("当前业主未查询到房屋信息");
+                            vc.toast("当前业主未查询到房屋信息");
                         } else {
 
                             vc.emit('searchRoom', 'showOwnerRooms', rooms);
@@ -179,7 +179,8 @@ vc.toast("当前业主未查询到房屋信息");
                         var listRoomData = JSON.parse(json);
                         var rooms = listRoomData.rooms;
                         if (rooms.length == 1) {
-                            vc.jumpToPage("/flow/propertyFeeFlow?ownerId=" + _owner.ownerId + "&roomId=" + rooms[0].roomId);
+                            vc.jumpToPage("/flow/listRoomFeeFlow?" + vc.objToGetParam(rooms[0]));
+
                         } else if (rooms.length == 0) {
                             //vc.message("当前业主未查询到房屋信息");
                             vc.toast("当前业主未查询到房屋信息");
@@ -209,7 +210,8 @@ vc.toast("当前业主未查询到房屋信息");
                         var listParkingSpaceData = JSON.parse(json);
                         var parkingSpaces = listParkingSpaceData.parkingSpaces;
                         if (parkingSpaces.length == 1) {
-                            vc.jumpToPage("/flow/parkingSpaceFeeFlow?ownerId=" + _owner.ownerId + "&psId=" + parkingSpaces[0].psId);
+                            //vc.jumpToPage("/flow/parkingSpaceFeeFlow?ownerId=" + _owner.ownerId + "&psId=" + parkingSpaces[0].psId);
+                            vc.jumpToPage("/flow/listParkingSpaceFeeFlow?" + vc.objToGetParam(parkingSpaces[0]));
                         } else if (parkingSpaces.length == 0) {
                             //vc.message("当前业主未查询到车位信息");
                             vc.toast("当前业主未查询到车位信息");

+ 37 - 0
WebService/src/main/resources/views/listParkingSpaceFeeFlow.html

@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html lang="en"
+      xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:th="http://www.thymeleaf.org"
+      xmlns:vc="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8"/>
+    <title>车位费用|java110</title>
+    <vc:create name="commonTop"></vc:create>
+</head>
+<body>
+<vc:create name="bodyTop"></vc:create>
+<div id="wrapper">
+    <vc:create name="menu"></vc:create>
+
+
+    <div id="page-wrapper" class="gray-bg dashbard-1">
+        <div class="row border-bottom">
+            <vc:create name="nav"></vc:create>
+        </div>
+        <div class="wrapper wrapper-content" style="padding-bottom: 0px;">
+            <vc:create name="breadcrumb"></vc:create>
+        </div>
+        <!-- id="component" -->
+        <div  class="wrapper wrapper-content animated fadeInRight">
+            <vc:create name="listParkingSpaceFee"></vc:create>
+        </div>
+
+
+        <vc:create name="copyright"></vc:create>
+
+    </div>
+</div>
+
+<vc:create name="commonBottom"></vc:create>
+</body>
+</html>

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/parking/ParkingSpaceDto.java

@@ -41,6 +41,7 @@ public class ParkingSpaceDto extends PageDto implements Serializable {
     private Date createTime;
 
     private String statusCd = "0";
+    private boolean withOwnerCar =false;
 
 
     public String getArea() {
@@ -212,4 +213,12 @@ public class ParkingSpaceDto extends PageDto implements Serializable {
     public void setLink(String link) {
         this.link = link;
     }
+
+    public boolean isWithOwnerCar() {
+        return withOwnerCar;
+    }
+
+    public void setWithOwnerCar(boolean withOwnerCar) {
+        this.withOwnerCar = withOwnerCar;
+    }
 }

+ 1 - 0
java110-db/src/main/resources/mapper/community/ParkingSpaceServiceDaoImplMapper.xml

@@ -114,6 +114,7 @@
             pa.type_cd typeCd
         FROM
           parking_space t,t_dict td,parking_area pa
+
         <where>
             t.state = td.status_cd
             and td.table_name='parking_space'

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

@@ -77,8 +77,8 @@
         insert into pay_fee(
         amount,income_obj_id,fee_type_cd,start_time,status_cd,end_time,community_id,b_id,fee_id,user_id,payer_obj_id,fee_flag,state,config_id,payer_obj_type
         ) select
-        t.amount,t.income_obj_id,t.fee_type_cd,t.start_time,'0',t.end_time,t.community_id,t.b_id,t.fee_id,t.user_id,t.payer_obj_id,t.payer_obj_type
-        ,t.fee_flag,t.state,t.config_id
+        t.amount,t.income_obj_id,t.fee_type_cd,t.start_time,'0',t.end_time,t.community_id,t.b_id,t.fee_id,t.user_id,t.payer_obj_id
+        ,t.fee_flag,t.state,t.config_id,t.payer_obj_type
         from business_pay_fee t where 1=1
         <if test="amount !=null and amount != ''">
             and t.amount= #{amount}

+ 2 - 0
java110-utils/src/main/java/com/java110/utils/constant/ServiceCodeConstant.java

@@ -499,6 +499,8 @@ public class ServiceCodeConstant {
 
     //设置费用
     public static final String SERVICE_CODE_SAVE_ROOM_CREATE_FEE = "fee.saveRoomCreateFee";
+    //设置费用
+    public static final String SERVICE_CODE_SAVE_PARKING_SPEC_CREATE_FEE = "fee.saveParkingSpaceCreateFee";
 
     //设置房屋费用
     public static final String SERVICE_CODE_DELETE_FEE = "fee.deleteFee";