18个文件已修改
1 文件已重命名
48个文件已添加
| | |
| | | import com.java110.dto.activities.ActivitiesDto; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeActivitiesConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.api.activities.ApiActivitiesDataVo; |
| | | import com.java110.vo.api.activities.ApiActivitiesVo; |
| | |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含小区信息"); |
| | | super.validatePageInfo(reqJson); |
| | | } |
| | | |
| | |
| | | import com.java110.core.smo.parkingSpace.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.dto.FeeDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.ParkingSpaceDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.vo.api.ApiParkingSpaceFeeVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import com.java110.core.smo.parkingSpace.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.core.smo.room.IRoomInnerServiceSMO; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.ParkingSpaceDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.vo.api.ApiIndexStatisticVo; |
| New file |
| | |
| | | package com.java110.api.listener.parkingArea; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.utils.constant.ServiceCodeParkingAreaConstant; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 保存小区侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("deleteParkingAreaListener") |
| | | public class DeleteParkingAreaListener extends AbstractServiceApiListener { |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "必填,请填写小区信息"); |
| | | Assert.hasKeyAndValue(reqJson, "paId", "停车场ID不能为空"); |
| | | |
| | | } |
| | | |
| | | @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(deleteParkingArea(reqJson, context)); |
| | | |
| | | JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders()); |
| | | |
| | | //将 rest header 信息传递到下层服务中去 |
| | | super.freshHttpHeader(header, context.getRequestCurrentHeaders()); |
| | | |
| | | ResponseEntity<String> responseEntity = this.callService(context, service.getServiceCode(), paramInObj); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeParkingAreaConstant.DELETE_PARKINGAREA; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | private JSONObject deleteParkingArea(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_DELETE_PARKING_AREA); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | JSONObject businessParkingArea = new JSONObject(); |
| | | businessParkingArea.putAll(paramInJson); |
| | | //计算 应收金额 |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessParkingArea", businessParkingArea); |
| | | return business; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.parkingArea; |
| | | |
| | | 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.parkingSpace.IParkingAreaInnerServiceSMO; |
| | | import com.java110.dto.parking.ParkingAreaDto; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeParkingAreaConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.api.parkingArea.ApiParkingAreaDataVo; |
| | | import com.java110.vo.api.parkingArea.ApiParkingAreaVo; |
| | | 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("listParkingAreasListener") |
| | | public class ListParkingAreasListener extends AbstractServiceApiListener { |
| | | |
| | | @Autowired |
| | | private IParkingAreaInnerServiceSMO parkingAreaInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeParkingAreaConstant.LIST_PARKINGAREAS; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.GET; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | public IParkingAreaInnerServiceSMO getParkingAreaInnerServiceSMOImpl() { |
| | | return parkingAreaInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setParkingAreaInnerServiceSMOImpl(IParkingAreaInnerServiceSMO parkingAreaInnerServiceSMOImpl) { |
| | | this.parkingAreaInnerServiceSMOImpl = parkingAreaInnerServiceSMOImpl; |
| | | } |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "必填,请填写小区信息"); |
| | | super.validatePageInfo(reqJson); |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | ParkingAreaDto parkingAreaDto = BeanConvertUtil.covertBean(reqJson, ParkingAreaDto.class); |
| | | |
| | | int count = parkingAreaInnerServiceSMOImpl.queryParkingAreasCount(parkingAreaDto); |
| | | |
| | | List<ApiParkingAreaDataVo> parkingAreas = null; |
| | | |
| | | if (count > 0) { |
| | | parkingAreas = BeanConvertUtil.covertBeanList(parkingAreaInnerServiceSMOImpl.queryParkingAreas(parkingAreaDto), ApiParkingAreaDataVo.class); |
| | | } else { |
| | | parkingAreas = new ArrayList<>(); |
| | | } |
| | | |
| | | ApiParkingAreaVo apiParkingAreaVo = new ApiParkingAreaVo(); |
| | | |
| | | apiParkingAreaVo.setTotal(count); |
| | | apiParkingAreaVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row"))); |
| | | apiParkingAreaVo.setParkingAreas(parkingAreas); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiParkingAreaVo), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.parkingArea; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ServiceCodeParkingAreaConstant; |
| | | |
| | | |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 保存小区侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("saveParkingAreaListener") |
| | | public class SaveParkingAreaListener extends AbstractServiceApiListener { |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "num", "必填,请填写停车场编号"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "必填,请填写小区信息"); |
| | | Assert.hasKeyAndValue(reqJson, "typeCd", "必填,请选择停车场类型"); |
| | | Assert.hasKeyAndValue(reqJson, "remark", "必填,请填写备注"); |
| | | |
| | | } |
| | | |
| | | @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(addParkingArea(reqJson, context)); |
| | | |
| | | JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders()); |
| | | |
| | | //将 rest header 信息传递到下层服务中去 |
| | | super.freshHttpHeader(header, context.getRequestCurrentHeaders()); |
| | | |
| | | ResponseEntity<String> responseEntity = this.callService(context, service.getServiceCode(), paramInObj); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeParkingAreaConstant.ADD_PARKINGAREA; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | private JSONObject addParkingArea(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_PARKING_AREA); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | JSONObject businessParkingArea = new JSONObject(); |
| | | businessParkingArea.putAll(paramInJson); |
| | | businessParkingArea.put("paId", "-1"); |
| | | //计算 应收金额 |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessParkingArea", businessParkingArea); |
| | | return business; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.parkingArea; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | 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.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeParkingAreaConstant; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 保存停车场侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("updateParkingAreaListener") |
| | | public class UpdateParkingAreaListener extends AbstractServiceApiListener { |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "paId", "停车场ID不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "num", "必填,请填写停车场编号"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "必填,请填写小区信息"); |
| | | Assert.hasKeyAndValue(reqJson, "typeCd", "必填,请选择停车场类型"); |
| | | Assert.hasKeyAndValue(reqJson, "remark", "必填,请填写备注"); |
| | | |
| | | } |
| | | |
| | | @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(updateParkingArea(reqJson, context)); |
| | | |
| | | JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders()); |
| | | |
| | | //将 rest header 信息传递到下层服务中去 |
| | | super.freshHttpHeader(header, context.getRequestCurrentHeaders()); |
| | | |
| | | ResponseEntity<String> responseEntity = this.callService(context, service.getServiceCode(), paramInObj); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeParkingAreaConstant.UPDATE_PARKINGAREA; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加停车场信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | private JSONObject updateParkingArea(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PARKING_AREA); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | JSONObject businessParkingArea = new JSONObject(); |
| | | businessParkingArea.putAll(paramInJson); |
| | | //计算 应收金额 |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessParkingArea", businessParkingArea); |
| | | return business; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.smo.parkingSpace.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.dto.ParkingSpaceDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import org.slf4j.Logger; |
| | |
| | | import com.java110.core.smo.parkingSpace.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.dto.FeeDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.ParkingSpaceDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import org.slf4j.Logger; |
| | |
| | | import com.java110.core.smo.owner.IOwnerCarInnerServiceSMO; |
| | | import com.java110.core.smo.parkingSpace.IParkingSpaceInnerServiceSMO; |
| | | |
| | | import com.java110.dto.ParkingSpaceDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.api.ApiParkingSpaceDataVo; |
| | | import com.java110.vo.api.ApiParkingSpaceVo; |
| | | import com.java110.vo.api.owner.ApiOwnerCarDataVo; |
| | | import com.java110.vo.api.owner.ApiOwnerCarVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiDataFlowListener; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.core.annotation.Java110Listener; |
| | |
| | | import com.java110.core.smo.owner.IOwnerCarInnerServiceSMO; |
| | | import com.java110.core.smo.parkingSpace.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.ParkingSpaceDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.vo.api.ApiParkingSpaceDataVo; |
| | | import com.java110.vo.api.ApiParkingSpaceVo; |
| | |
| | | import com.java110.core.smo.owner.IOwnerCarInnerServiceSMO; |
| | | import com.java110.core.smo.parkingSpace.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.ParkingSpaceDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.vo.api.ApiParkingSpaceDataVo; |
| | | import com.java110.vo.api.ApiParkingSpaceVo; |
| | |
| | | import com.java110.core.smo.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.core.smo.parkingSpace.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.dto.FeeConfigDto; |
| | | import com.java110.dto.ParkingSpaceDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import org.slf4j.Logger; |
| New file |
| | |
| | | package com.java110.community.dao; |
| | | |
| | | |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.entity.merchant.BoMerchant; |
| | | import com.java110.entity.merchant.BoMerchantAttr; |
| | | import com.java110.entity.merchant.Merchant; |
| | | import com.java110.entity.merchant.MerchantAttr; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 停车场组件内部之间使用,没有给外围系统提供服务能力 |
| | | * 停车场服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 新建客户,修改客户,删除客户,查询客户等功能 |
| | | * |
| | | * Created by wuxw on 2016/12/27. |
| | | */ |
| | | public interface IParkingAreaServiceDao { |
| | | |
| | | /** |
| | | * 保存 停车场信息 |
| | | * @param businessParkingAreaInfo 停车场信息 封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | void saveBusinessParkingAreaInfo(Map businessParkingAreaInfo) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询停车场信息(business过程) |
| | | * 根据bId 查询停车场信息 |
| | | * @param info bId 信息 |
| | | * @return 停车场信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getBusinessParkingAreaInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存 停车场信息 Business数据到 Instance中 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveParkingAreaInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询停车场信息(instance过程) |
| | | * 根据bId 查询停车场信息 |
| | | * @param info bId 信息 |
| | | * @return 停车场信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getParkingAreaInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改停车场信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateParkingAreaInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询停车场总数 |
| | | * |
| | | * @param info 停车场信息 |
| | | * @return 停车场数量 |
| | | */ |
| | | int queryParkingAreasCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.community.dao.IParkingAreaServiceDao; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.DateUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 停车场服务 与数据库交互 |
| | | * Created by wuxw on 2017/4/5. |
| | | */ |
| | | @Service("parkingAreaServiceDaoImpl") |
| | | //@Transactional |
| | | public class ParkingAreaServiceDaoImpl extends BaseServiceDao implements IParkingAreaServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ParkingAreaServiceDaoImpl.class); |
| | | |
| | | /** |
| | | * 停车场信息封装 |
| | | * |
| | | * @param businessParkingAreaInfo 停车场信息 封装 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveBusinessParkingAreaInfo(Map businessParkingAreaInfo) throws DAOException { |
| | | businessParkingAreaInfo.put("month", DateUtil.getCurrentMonth()); |
| | | // 查询business_user 数据是否已经存在 |
| | | logger.debug("保存停车场信息 入参 businessParkingAreaInfo : {}", businessParkingAreaInfo); |
| | | int saveFlag = sqlSessionTemplate.insert("parkingAreaServiceDaoImpl.saveBusinessParkingAreaInfo", businessParkingAreaInfo); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存停车场数据失败:" + JSONObject.toJSONString(businessParkingAreaInfo)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询停车场信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 停车场信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getBusinessParkingAreaInfo(Map info) throws DAOException { |
| | | |
| | | logger.debug("查询停车场信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessParkingAreaInfos = sqlSessionTemplate.selectList("parkingAreaServiceDaoImpl.getBusinessParkingAreaInfo", info); |
| | | |
| | | return businessParkingAreaInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 保存停车场信息 到 instance |
| | | * |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveParkingAreaInfoInstance(Map info) throws DAOException { |
| | | logger.debug("保存停车场信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("parkingAreaServiceDaoImpl.saveParkingAreaInfoInstance", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存停车场信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询停车场信息(instance) |
| | | * |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getParkingAreaInfo(Map info) throws DAOException { |
| | | logger.debug("查询停车场信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessParkingAreaInfos = sqlSessionTemplate.selectList("parkingAreaServiceDaoImpl.getParkingAreaInfo", info); |
| | | |
| | | return businessParkingAreaInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改停车场信息 |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateParkingAreaInfoInstance(Map info) throws DAOException { |
| | | logger.debug("修改停车场信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("parkingAreaServiceDaoImpl.updateParkingAreaInfoInstance", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改停车场信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询停车场数量 |
| | | * |
| | | * @param info 停车场信息 |
| | | * @return 停车场数量 |
| | | */ |
| | | @Override |
| | | public int queryParkingAreasCount(Map info) { |
| | | logger.debug("查询停车场数据 入参 info : {}", info); |
| | | |
| | | List<Map> businessParkingAreaInfos = sqlSessionTemplate.selectList("parkingAreaServiceDaoImpl.queryParkingAreasCount", info); |
| | | if (businessParkingAreaInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessParkingAreaInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.listener.parkingArea; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.community.dao.IParkingAreaServiceDao; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.event.service.AbstractBusinessServiceDataFlowListener; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 停车场 服务侦听 父类 |
| | | * Created by wuxw on 2018/7/4. |
| | | */ |
| | | public abstract class AbstractParkingAreaBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener { |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractParkingAreaBusinessServiceDataFlowListener.class); |
| | | |
| | | |
| | | /** |
| | | * 获取 DAO工具类 |
| | | * |
| | | * @return |
| | | */ |
| | | public abstract IParkingAreaServiceDao getParkingAreaServiceDaoImpl(); |
| | | |
| | | /** |
| | | * 刷新 businessParkingAreaInfo 数据 |
| | | * 主要将 数据库 中字段和 接口传递字段建立关系 |
| | | * |
| | | * @param businessParkingAreaInfo |
| | | */ |
| | | protected void flushBusinessParkingAreaInfo(Map businessParkingAreaInfo, String statusCd) { |
| | | businessParkingAreaInfo.put("newBId", businessParkingAreaInfo.get("b_id")); |
| | | businessParkingAreaInfo.put("operate", businessParkingAreaInfo.get("operate")); |
| | | businessParkingAreaInfo.put("typeCd", businessParkingAreaInfo.get("type_cd")); |
| | | businessParkingAreaInfo.put("num", businessParkingAreaInfo.get("num")); |
| | | businessParkingAreaInfo.put("paId", businessParkingAreaInfo.get("pa_id")); |
| | | businessParkingAreaInfo.put("remark", businessParkingAreaInfo.get("remark")); |
| | | businessParkingAreaInfo.put("communityId", businessParkingAreaInfo.get("community_id")); |
| | | businessParkingAreaInfo.remove("bId"); |
| | | businessParkingAreaInfo.put("statusCd", statusCd); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中 |
| | | * |
| | | * @param businessParkingArea 停车场信息 |
| | | */ |
| | | protected void autoSaveDelBusinessParkingArea(Business business, JSONObject businessParkingArea) { |
| | | //自动插入DEL |
| | | Map info = new HashMap(); |
| | | info.put("paId", businessParkingArea.getString("paId")); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | List<Map> currentParkingAreaInfos = getParkingAreaServiceDaoImpl().getParkingAreaInfo(info); |
| | | if (currentParkingAreaInfos == null || currentParkingAreaInfos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "未找到需要修改数据信息,入参错误或数据有问题,请检查" + info); |
| | | } |
| | | |
| | | Map currentParkingAreaInfo = currentParkingAreaInfos.get(0); |
| | | |
| | | currentParkingAreaInfo.put("bId", business.getbId()); |
| | | |
| | | currentParkingAreaInfo.put("operate", currentParkingAreaInfo.get("operate")); |
| | | currentParkingAreaInfo.put("typeCd", currentParkingAreaInfo.get("type_cd")); |
| | | currentParkingAreaInfo.put("num", currentParkingAreaInfo.get("num")); |
| | | currentParkingAreaInfo.put("paId", currentParkingAreaInfo.get("pa_id")); |
| | | currentParkingAreaInfo.put("remark", currentParkingAreaInfo.get("remark")); |
| | | currentParkingAreaInfo.put("communityId", currentParkingAreaInfo.get("community_id")); |
| | | |
| | | |
| | | currentParkingAreaInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | getParkingAreaServiceDaoImpl().saveBusinessParkingAreaInfo(currentParkingAreaInfo); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.listener.parkingArea; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.community.dao.IParkingAreaServiceDao; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 删除停车场信息 侦听 |
| | | * <p> |
| | | * 处理节点 |
| | | * 1、businessParkingArea:{} 停车场基本信息节点 |
| | | * 2、businessParkingAreaAttr:[{}] 停车场属性信息节点 |
| | | * 3、businessParkingAreaPhoto:[{}] 停车场照片信息节点 |
| | | * 4、businessParkingAreaCerdentials:[{}] 停车场证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("deleteParkingAreaInfoListener") |
| | | @Transactional |
| | | public class DeleteParkingAreaInfoListener extends AbstractParkingAreaBusinessServiceDataFlowListener { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(DeleteParkingAreaInfoListener.class); |
| | | @Autowired |
| | | IParkingAreaServiceDao parkingAreaServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 3; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_DELETE_PARKING_AREA; |
| | | } |
| | | |
| | | /** |
| | | * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessParkingArea 节点 |
| | | if (data.containsKey("businessParkingArea")) { |
| | | //处理 businessParkingArea 节点 |
| | | if (data.containsKey("businessParkingArea")) { |
| | | Object _obj = data.get("businessParkingArea"); |
| | | JSONArray businessParkingAreas = null; |
| | | if (_obj instanceof JSONObject) { |
| | | businessParkingAreas = new JSONArray(); |
| | | businessParkingAreas.add(_obj); |
| | | } else { |
| | | businessParkingAreas = (JSONArray) _obj; |
| | | } |
| | | //JSONObject businessParkingArea = data.getJSONObject("businessParkingArea"); |
| | | for (int _parkingAreaIndex = 0; _parkingAreaIndex < businessParkingAreas.size(); _parkingAreaIndex++) { |
| | | JSONObject businessParkingArea = businessParkingAreas.getJSONObject(_parkingAreaIndex); |
| | | doBusinessParkingArea(business, businessParkingArea); |
| | | if (_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("paId", businessParkingArea.getString("paId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除 instance数据 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | |
| | | //停车场信息 |
| | | Map info = new HashMap(); |
| | | info.put("bId", business.getbId()); |
| | | info.put("operate", StatusConstant.OPERATE_DEL); |
| | | |
| | | //停车场信息 |
| | | List<Map> businessParkingAreaInfos = parkingAreaServiceDaoImpl.getBusinessParkingAreaInfo(info); |
| | | if (businessParkingAreaInfos != null && businessParkingAreaInfos.size() > 0) { |
| | | for (int _parkingAreaIndex = 0; _parkingAreaIndex < businessParkingAreaInfos.size(); _parkingAreaIndex++) { |
| | | Map businessParkingAreaInfo = businessParkingAreaInfos.get(_parkingAreaIndex); |
| | | flushBusinessParkingAreaInfo(businessParkingAreaInfo, StatusConstant.STATUS_CD_INVALID); |
| | | parkingAreaServiceDaoImpl.updateParkingAreaInfoInstance(businessParkingAreaInfo); |
| | | dataFlowContext.addParamOut("paId", businessParkingAreaInfo.get("pa_id")); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * 从business表中查询到DEL的数据 将instance中的数据更新回来 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId", bId); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_INVALID); |
| | | |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId", business.getbId()); |
| | | delInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | //停车场信息 |
| | | List<Map> parkingAreaInfo = parkingAreaServiceDaoImpl.getParkingAreaInfo(info); |
| | | if (parkingAreaInfo != null && parkingAreaInfo.size() > 0) { |
| | | |
| | | //停车场信息 |
| | | List<Map> businessParkingAreaInfos = parkingAreaServiceDaoImpl.getBusinessParkingAreaInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if (businessParkingAreaInfos == null || businessParkingAreaInfos.size() == 0) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR, "撤单失败(parkingArea),程序内部异常,请检查! " + delInfo); |
| | | } |
| | | for (int _parkingAreaIndex = 0; _parkingAreaIndex < businessParkingAreaInfos.size(); _parkingAreaIndex++) { |
| | | Map businessParkingAreaInfo = businessParkingAreaInfos.get(_parkingAreaIndex); |
| | | flushBusinessParkingAreaInfo(businessParkingAreaInfo, StatusConstant.STATUS_CD_VALID); |
| | | parkingAreaServiceDaoImpl.updateParkingAreaInfoInstance(businessParkingAreaInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 处理 businessParkingArea 节点 |
| | | * |
| | | * @param business 总的数据节点 |
| | | * @param businessParkingArea 停车场节点 |
| | | */ |
| | | private void doBusinessParkingArea(Business business, JSONObject businessParkingArea) { |
| | | |
| | | Assert.jsonObjectHaveKey(businessParkingArea, "paId", "businessParkingArea 节点下没有包含 paId 节点"); |
| | | |
| | | if (businessParkingArea.getString("paId").startsWith("-")) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "paId 错误,不能自动生成(必须已经存在的paId)" + businessParkingArea); |
| | | } |
| | | //自动插入DEL |
| | | autoSaveDelBusinessParkingArea(business, businessParkingArea); |
| | | } |
| | | |
| | | public IParkingAreaServiceDao getParkingAreaServiceDaoImpl() { |
| | | return parkingAreaServiceDaoImpl; |
| | | } |
| | | |
| | | public void setParkingAreaServiceDaoImpl(IParkingAreaServiceDao parkingAreaServiceDaoImpl) { |
| | | this.parkingAreaServiceDaoImpl = parkingAreaServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.community.listener.parkingArea; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.community.dao.IParkingAreaServiceDao; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 保存 停车场信息 侦听 |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("saveParkingAreaInfoListener") |
| | | @Transactional |
| | | public class SaveParkingAreaInfoListener extends AbstractParkingAreaBusinessServiceDataFlowListener{ |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveParkingAreaInfoListener.class); |
| | | |
| | | @Autowired |
| | | private IParkingAreaServiceDao parkingAreaServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_SAVE_PARKING_AREA; |
| | | } |
| | | |
| | | /** |
| | | * 保存停车场信息 business 表中 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessParkingArea 节点 |
| | | if(data.containsKey("businessParkingArea")){ |
| | | Object bObj = data.get("businessParkingArea"); |
| | | JSONArray businessParkingAreas = null; |
| | | if(bObj instanceof JSONObject){ |
| | | businessParkingAreas = new JSONArray(); |
| | | businessParkingAreas.add(bObj); |
| | | }else { |
| | | businessParkingAreas = (JSONArray)bObj; |
| | | } |
| | | //JSONObject businessParkingArea = data.getJSONObject("businessParkingArea"); |
| | | for (int bParkingAreaIndex = 0; bParkingAreaIndex < businessParkingAreas.size();bParkingAreaIndex++) { |
| | | JSONObject businessParkingArea = businessParkingAreas.getJSONObject(bParkingAreaIndex); |
| | | doBusinessParkingArea(business, businessParkingArea); |
| | | if(bObj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("paId", businessParkingArea.getString("paId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * business 数据转移到 instance |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_ADD); |
| | | |
| | | //停车场信息 |
| | | List<Map> businessParkingAreaInfo = parkingAreaServiceDaoImpl.getBusinessParkingAreaInfo(info); |
| | | if( businessParkingAreaInfo != null && businessParkingAreaInfo.size() >0) { |
| | | reFreshShareColumn(info, businessParkingAreaInfo.get(0)); |
| | | parkingAreaServiceDaoImpl.saveParkingAreaInfoInstance(info); |
| | | if(businessParkingAreaInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("paId", businessParkingAreaInfo.get(0).get("pa_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 刷 分片字段 |
| | | * |
| | | * @param info 查询对象 |
| | | * @param businessInfo 小区ID |
| | | */ |
| | | private void reFreshShareColumn(Map info, Map businessInfo) { |
| | | |
| | | if (info.containsKey("communityId")) { |
| | | return; |
| | | } |
| | | |
| | | if (!businessInfo.containsKey("community_id")) { |
| | | return; |
| | | } |
| | | |
| | | info.put("communityId", businessInfo.get("community_id")); |
| | | } |
| | | /** |
| | | * 撤单 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | Map paramIn = new HashMap(); |
| | | paramIn.put("bId",bId); |
| | | paramIn.put("statusCd",StatusConstant.STATUS_CD_INVALID); |
| | | //停车场信息 |
| | | List<Map> parkingAreaInfo = parkingAreaServiceDaoImpl.getParkingAreaInfo(info); |
| | | if(parkingAreaInfo != null && parkingAreaInfo.size() > 0){ |
| | | reFreshShareColumn(paramIn, parkingAreaInfo.get(0)); |
| | | parkingAreaServiceDaoImpl.updateParkingAreaInfoInstance(paramIn); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessParkingArea 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessParkingArea 停车场节点 |
| | | */ |
| | | private void doBusinessParkingArea(Business business,JSONObject businessParkingArea){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessParkingArea,"paId","businessParkingArea 节点下没有包含 paId 节点"); |
| | | |
| | | if(businessParkingArea.getString("paId").startsWith("-")){ |
| | | //刷新缓存 |
| | | //flushParkingAreaId(business.getDatas()); |
| | | |
| | | businessParkingArea.put("paId",GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_paId)); |
| | | |
| | | } |
| | | |
| | | businessParkingArea.put("bId",business.getbId()); |
| | | businessParkingArea.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存停车场信息 |
| | | parkingAreaServiceDaoImpl.saveBusinessParkingAreaInfo(businessParkingArea); |
| | | |
| | | } |
| | | |
| | | public IParkingAreaServiceDao getParkingAreaServiceDaoImpl() { |
| | | return parkingAreaServiceDaoImpl; |
| | | } |
| | | |
| | | public void setParkingAreaServiceDaoImpl(IParkingAreaServiceDao parkingAreaServiceDaoImpl) { |
| | | this.parkingAreaServiceDaoImpl = parkingAreaServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.community.listener.parkingArea; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.community.dao.IParkingAreaServiceDao; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 修改停车场信息 侦听 |
| | | * <p> |
| | | * 处理节点 |
| | | * 1、businessParkingArea:{} 停车场基本信息节点 |
| | | * 2、businessParkingAreaAttr:[{}] 停车场属性信息节点 |
| | | * 3、businessParkingAreaPhoto:[{}] 停车场照片信息节点 |
| | | * 4、businessParkingAreaCerdentials:[{}] 停车场证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E4%BF%AE%E6%94%B9%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("updateParkingAreaInfoListener") |
| | | @Transactional |
| | | public class UpdateParkingAreaInfoListener extends AbstractParkingAreaBusinessServiceDataFlowListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateParkingAreaInfoListener.class); |
| | | @Autowired |
| | | private IParkingAreaServiceDao parkingAreaServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 2; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PARKING_AREA; |
| | | } |
| | | |
| | | /** |
| | | * business过程 |
| | | * |
| | | * @param dataFlowContext 上下文对象 |
| | | * @param business 业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessParkingArea 节点 |
| | | if (data.containsKey("businessParkingArea")) { |
| | | //处理 businessParkingArea 节点 |
| | | if (data.containsKey("businessParkingArea")) { |
| | | Object _obj = data.get("businessParkingArea"); |
| | | JSONArray businessParkingAreas = null; |
| | | if (_obj instanceof JSONObject) { |
| | | businessParkingAreas = new JSONArray(); |
| | | businessParkingAreas.add(_obj); |
| | | } else { |
| | | businessParkingAreas = (JSONArray) _obj; |
| | | } |
| | | //JSONObject businessParkingArea = data.getJSONObject("businessParkingArea"); |
| | | for (int _parkingAreaIndex = 0; _parkingAreaIndex < businessParkingAreas.size(); _parkingAreaIndex++) { |
| | | JSONObject businessParkingArea = businessParkingAreas.getJSONObject(_parkingAreaIndex); |
| | | doBusinessParkingArea(business, businessParkingArea); |
| | | if (_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("paId", businessParkingArea.getString("paId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * business to instance 过程 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId", business.getbId()); |
| | | info.put("operate", StatusConstant.OPERATE_ADD); |
| | | |
| | | //停车场信息 |
| | | List<Map> businessParkingAreaInfos = parkingAreaServiceDaoImpl.getBusinessParkingAreaInfo(info); |
| | | if (businessParkingAreaInfos != null && businessParkingAreaInfos.size() > 0) { |
| | | for (int _parkingAreaIndex = 0; _parkingAreaIndex < businessParkingAreaInfos.size(); _parkingAreaIndex++) { |
| | | Map businessParkingAreaInfo = businessParkingAreaInfos.get(_parkingAreaIndex); |
| | | flushBusinessParkingAreaInfo(businessParkingAreaInfo, StatusConstant.STATUS_CD_VALID); |
| | | parkingAreaServiceDaoImpl.updateParkingAreaInfoInstance(businessParkingAreaInfo); |
| | | if (businessParkingAreaInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("paId", businessParkingAreaInfo.get("pa_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId", bId); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId", business.getbId()); |
| | | delInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | //停车场信息 |
| | | List<Map> parkingAreaInfo = parkingAreaServiceDaoImpl.getParkingAreaInfo(info); |
| | | if (parkingAreaInfo != null && parkingAreaInfo.size() > 0) { |
| | | |
| | | //停车场信息 |
| | | List<Map> businessParkingAreaInfos = parkingAreaServiceDaoImpl.getBusinessParkingAreaInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if (businessParkingAreaInfos == null || businessParkingAreaInfos.size() == 0) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR, "撤单失败(parkingArea),程序内部异常,请检查! " + delInfo); |
| | | } |
| | | for (int _parkingAreaIndex = 0; _parkingAreaIndex < businessParkingAreaInfos.size(); _parkingAreaIndex++) { |
| | | Map businessParkingAreaInfo = businessParkingAreaInfos.get(_parkingAreaIndex); |
| | | flushBusinessParkingAreaInfo(businessParkingAreaInfo, StatusConstant.STATUS_CD_VALID); |
| | | parkingAreaServiceDaoImpl.updateParkingAreaInfoInstance(businessParkingAreaInfo); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 处理 businessParkingArea 节点 |
| | | * |
| | | * @param business 总的数据节点 |
| | | * @param businessParkingArea 停车场节点 |
| | | */ |
| | | private void doBusinessParkingArea(Business business, JSONObject businessParkingArea) { |
| | | |
| | | Assert.jsonObjectHaveKey(businessParkingArea, "paId", "businessParkingArea 节点下没有包含 paId 节点"); |
| | | |
| | | if (businessParkingArea.getString("paId").startsWith("-")) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "paId 错误,不能自动生成(必须已经存在的paId)" + businessParkingArea); |
| | | } |
| | | //自动保存DEL |
| | | autoSaveDelBusinessParkingArea(business, businessParkingArea); |
| | | |
| | | businessParkingArea.put("bId", business.getbId()); |
| | | businessParkingArea.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存停车场信息 |
| | | parkingAreaServiceDaoImpl.saveBusinessParkingAreaInfo(businessParkingArea); |
| | | |
| | | } |
| | | |
| | | |
| | | public IParkingAreaServiceDao getParkingAreaServiceDaoImpl() { |
| | | return parkingAreaServiceDaoImpl; |
| | | } |
| | | |
| | | public void setParkingAreaServiceDaoImpl(IParkingAreaServiceDao parkingAreaServiceDaoImpl) { |
| | | this.parkingAreaServiceDaoImpl = parkingAreaServiceDaoImpl; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.smo.impl; |
| | | |
| | | |
| | | import com.java110.community.dao.IParkingAreaServiceDao; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.core.smo.parkingSpace.IParkingAreaInnerServiceSMO; |
| | | import com.java110.core.smo.user.IUserInnerServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.parking.ParkingAreaDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorInnerServiceSMOImpl |
| | | * @Description 停车场内部服务实现类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:20 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @RestController |
| | | public class ParkingAreaInnerServiceSMOImpl extends BaseServiceSMO implements IParkingAreaInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IParkingAreaServiceDao parkingAreaServiceDaoImpl; |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public List<ParkingAreaDto> queryParkingAreas(@RequestBody ParkingAreaDto parkingAreaDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = parkingAreaDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | parkingAreaDto.setPage((page - 1) * parkingAreaDto.getRow()); |
| | | } |
| | | |
| | | List<ParkingAreaDto> parkingAreas = BeanConvertUtil.covertBeanList(parkingAreaServiceDaoImpl.getParkingAreaInfo(BeanConvertUtil.beanCovertMap(parkingAreaDto)), ParkingAreaDto.class); |
| | | |
| | | return parkingAreas; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public int queryParkingAreasCount(@RequestBody ParkingAreaDto parkingAreaDto) { |
| | | return parkingAreaServiceDaoImpl.queryParkingAreasCount(BeanConvertUtil.beanCovertMap(parkingAreaDto)); |
| | | } |
| | | |
| | | public IParkingAreaServiceDao getParkingAreaServiceDaoImpl() { |
| | | return parkingAreaServiceDaoImpl; |
| | | } |
| | | |
| | | public void setParkingAreaServiceDaoImpl(IParkingAreaServiceDao parkingAreaServiceDaoImpl) { |
| | | this.parkingAreaServiceDaoImpl = parkingAreaServiceDaoImpl; |
| | | } |
| | | |
| | | public IUserInnerServiceSMO getUserInnerServiceSMOImpl() { |
| | | return userInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setUserInnerServiceSMOImpl(IUserInnerServiceSMO userInnerServiceSMOImpl) { |
| | | this.userInnerServiceSMOImpl = userInnerServiceSMOImpl; |
| | | } |
| | | } |
| | |
| | | import com.java110.core.smo.parkingSpace.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.core.smo.user.IUserInnerServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.ParkingSpaceDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| New file |
| | |
| | | package com.java110.web.components.parkingArea; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.parkingArea.IAddParkingAreaSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 添加停车场组件 |
| | | */ |
| | | @Component("addParkingArea") |
| | | public class AddParkingAreaComponent { |
| | | |
| | | @Autowired |
| | | private IAddParkingAreaSMO addParkingAreaSMOImpl; |
| | | |
| | | /** |
| | | * 添加停车场数据 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> save(IPageData pd){ |
| | | return addParkingAreaSMOImpl.saveParkingArea(pd); |
| | | } |
| | | |
| | | public IAddParkingAreaSMO getAddParkingAreaSMOImpl() { |
| | | return addParkingAreaSMOImpl; |
| | | } |
| | | |
| | | public void setAddParkingAreaSMOImpl(IAddParkingAreaSMO addParkingAreaSMOImpl) { |
| | | this.addParkingAreaSMOImpl = addParkingAreaSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.parkingArea; |
| | | |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | 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("chooseParkingArea") |
| | | public class ChooseParkingAreaComponent { |
| | | |
| | | @Autowired |
| | | private IListParkingAreasSMO listParkingAreasSMOImpl; |
| | | |
| | | /** |
| | | * 查询应用列表 |
| | | * |
| | | * @param pd 页面数据封装 |
| | | * @return 返回 ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> list(IPageData pd) { |
| | | return listParkingAreasSMOImpl.listParkingAreas(pd); |
| | | } |
| | | |
| | | public IListParkingAreasSMO getListParkingAreasSMOImpl() { |
| | | return listParkingAreasSMOImpl; |
| | | } |
| | | |
| | | public void setListParkingAreasSMOImpl(IListParkingAreasSMO listParkingAreasSMOImpl) { |
| | | this.listParkingAreasSMOImpl = listParkingAreasSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.parkingArea; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.parkingArea.IDeleteParkingAreaSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 添加停车场组件 |
| | | */ |
| | | @Component("deleteParkingArea") |
| | | public class DeleteParkingAreaComponent { |
| | | |
| | | @Autowired |
| | | private IDeleteParkingAreaSMO deleteParkingAreaSMOImpl; |
| | | |
| | | /** |
| | | * 添加停车场数据 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> delete(IPageData pd){ |
| | | return deleteParkingAreaSMOImpl.deleteParkingArea(pd); |
| | | } |
| | | |
| | | public IDeleteParkingAreaSMO getDeleteParkingAreaSMOImpl() { |
| | | return deleteParkingAreaSMOImpl; |
| | | } |
| | | |
| | | public void setDeleteParkingAreaSMOImpl(IDeleteParkingAreaSMO deleteParkingAreaSMOImpl) { |
| | | this.deleteParkingAreaSMOImpl = deleteParkingAreaSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.parkingArea; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.parkingArea.IEditParkingAreaSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 编辑小区组件 |
| | | */ |
| | | @Component("editParkingArea") |
| | | public class EditParkingAreaComponent { |
| | | |
| | | @Autowired |
| | | private IEditParkingAreaSMO editParkingAreaSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区数据 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> update(IPageData pd){ |
| | | return editParkingAreaSMOImpl.updateParkingArea(pd); |
| | | } |
| | | |
| | | public IEditParkingAreaSMO getEditParkingAreaSMOImpl() { |
| | | return editParkingAreaSMOImpl; |
| | | } |
| | | |
| | | public void setEditParkingAreaSMOImpl(IEditParkingAreaSMO editParkingAreaSMOImpl) { |
| | | this.editParkingAreaSMOImpl = editParkingAreaSMOImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.components.parkingArea; |
| | | |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | 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("parkingAreaManage") |
| | | public class ParkingAreaManageComponent { |
| | | |
| | | @Autowired |
| | | private IListParkingAreasSMO listParkingAreasSMOImpl; |
| | | |
| | | /** |
| | | * 查询停车场列表 |
| | | * |
| | | * @param pd 页面数据封装 |
| | | * @return 返回 ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> list(IPageData pd) { |
| | | return listParkingAreasSMOImpl.listParkingAreas(pd); |
| | | } |
| | | |
| | | public IListParkingAreasSMO getListParkingAreasSMOImpl() { |
| | | return listParkingAreasSMOImpl; |
| | | } |
| | | |
| | | public void setListParkingAreasSMOImpl(IListParkingAreasSMO listParkingAreasSMOImpl) { |
| | | this.listParkingAreasSMOImpl = listParkingAreasSMOImpl; |
| | | } |
| | | } |
| | |
| | | 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.activities.IListActivitiessSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | Assert.hasKeyAndValue(paramIn, "communityId", "请求报文中未包含小区信息"); |
| | | |
| | | super.validatePageInfo(pd); |
| | | |
| | | //super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_ACTIVITIES); |
| New file |
| | |
| | | package com.java110.web.smo.parkingArea; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 添加停车场接口 |
| | | * |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | public interface IAddParkingAreaSMO { |
| | | |
| | | /** |
| | | * 添加停车场 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | ResponseEntity<String> saveParkingArea(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.parkingArea; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 添加停车场接口 |
| | | * |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | public interface IDeleteParkingAreaSMO { |
| | | |
| | | /** |
| | | * 添加停车场 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | ResponseEntity<String> deleteParkingArea(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.parkingArea; |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 修改停车场接口 |
| | | * |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | public interface IEditParkingAreaSMO { |
| | | |
| | | /** |
| | | * 修改小区 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象 |
| | | */ |
| | | ResponseEntity<String> updateParkingArea(IPageData pd); |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.parkingArea; |
| | | |
| | | import com.java110.utils.exception.SMOException; |
| | | import com.java110.core.context.IPageData; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 停车场管理服务接口类 |
| | | * |
| | | * add by wuxw 2019-06-29 |
| | | */ |
| | | public interface IListParkingAreasSMO { |
| | | |
| | | /** |
| | | * 查询停车场信息 |
| | | * @param pd 页面数据封装 |
| | | * @return ResponseEntity 对象数据 |
| | | * @throws SMOException 业务代码层 |
| | | */ |
| | | ResponseEntity<String> listParkingAreas(IPageData pd) throws SMOException; |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.parkingArea.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.component.AbstractComponentSMO; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.web.smo.parkingArea.IAddParkingAreaSMO; |
| | | 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; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加小区服务实现类 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Service("addParkingAreaSMOImpl") |
| | | public class AddParkingAreaSMOImpl extends AbstractComponentSMO implements IAddParkingAreaSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | //super.validatePageInfo(pd); |
| | | |
| | | //Assert.hasKeyAndValue(paramIn, "xxx", "xxx"); |
| | | Assert.hasKeyAndValue(paramIn, "num", "必填,请填写停车场编号"); |
| | | Assert.hasKeyAndValue(paramIn, "communityId", "必填,请填写小区信息"); |
| | | Assert.hasKeyAndValue(paramIn, "typeCd", "必填,请选择停车场类型"); |
| | | Assert.hasKeyAndValue(paramIn, "remark", "必填,请填写备注"); |
| | | |
| | | |
| | | //super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_PARKINGAREA); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) { |
| | | ResponseEntity<String> responseEntity = null; |
| | | super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/parkingArea.saveParkingArea", |
| | | HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> saveParkingArea(IPageData pd) { |
| | | return super.businessProcess(pd); |
| | | } |
| | | |
| | | public RestTemplate getRestTemplate() { |
| | | return restTemplate; |
| | | } |
| | | |
| | | public void setRestTemplate(RestTemplate restTemplate) { |
| | | this.restTemplate = restTemplate; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.parkingArea.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.component.AbstractComponentSMO; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.web.smo.parkingArea.IDeleteParkingAreaSMO; |
| | | 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; |
| | | |
| | | |
| | | /** |
| | | * 添加小区服务实现类 |
| | | * delete by wuxw 2019-06-30 |
| | | */ |
| | | @Service("deleteParkingAreaSMOImpl") |
| | | public class DeleteParkingAreaSMOImpl extends AbstractComponentSMO implements IDeleteParkingAreaSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | //super.validatePageInfo(pd); |
| | | |
| | | //Assert.hasKeyAndValue(paramIn, "xxx", "xxx"); |
| | | Assert.hasKeyAndValue(paramIn, "communityId", "必填,请填写小区信息"); |
| | | Assert.hasKeyAndValue(paramIn, "paId", "停车场ID不能为空"); |
| | | |
| | | |
| | | //super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_PARKINGAREA); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) { |
| | | ResponseEntity<String> responseEntity = null; |
| | | super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/parkingArea.deleteParkingArea", |
| | | HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> deleteParkingArea(IPageData pd) { |
| | | return super.businessProcess(pd); |
| | | } |
| | | |
| | | public RestTemplate getRestTemplate() { |
| | | return restTemplate; |
| | | } |
| | | |
| | | public void setRestTemplate(RestTemplate restTemplate) { |
| | | this.restTemplate = restTemplate; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.parkingArea.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.component.AbstractComponentSMO; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.web.smo.parkingArea.IEditParkingAreaSMO; |
| | | 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; |
| | | |
| | | /** |
| | | * 添加停车场服务实现类 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Service("eidtParkingAreaSMOImpl") |
| | | public class EditParkingAreaSMOImpl extends AbstractComponentSMO implements IEditParkingAreaSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | //super.validatePageInfo(pd); |
| | | |
| | | Assert.hasKeyAndValue(paramIn, "paId", "停车场ID不能为空"); |
| | | Assert.hasKeyAndValue(paramIn, "communityId", "必填,请填写小区信息"); |
| | | Assert.hasKeyAndValue(paramIn, "num", "必填,请填写停车场编号"); |
| | | Assert.hasKeyAndValue(paramIn, "typeCd", "必填,请选择停车场类型"); |
| | | Assert.hasKeyAndValue(paramIn, "remark", "必填,请填写备注"); |
| | | |
| | | |
| | | //super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST__PARKINGAREA); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) { |
| | | ResponseEntity<String> responseEntity = null; |
| | | super.validateStoreStaffCommunityRelationship(pd, restTemplate); |
| | | |
| | | responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(), |
| | | ServiceConstant.SERVICE_API_URL + "/api/parkingArea.updateParkingArea", |
| | | HttpMethod.POST); |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> updateParkingArea(IPageData pd) { |
| | | return super.businessProcess(pd); |
| | | } |
| | | |
| | | public RestTemplate getRestTemplate() { |
| | | return restTemplate; |
| | | } |
| | | |
| | | public void setRestTemplate(RestTemplate restTemplate) { |
| | | this.restTemplate = restTemplate; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.web.smo.parkingArea.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.BeanConvertUtil; |
| | | import com.java110.web.smo.parkingArea.IListParkingAreasSMO; |
| | | 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; |
| | | |
| | | /** |
| | | * 查询parkingArea服务类 |
| | | */ |
| | | @Service("listParkingAreasSMOImpl") |
| | | public class ListParkingAreasSMOImpl extends AbstractComponentSMO implements IListParkingAreasSMO { |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | public ResponseEntity<String> listParkingAreas(IPageData pd) throws SMOException { |
| | | return businessProcess(pd); |
| | | } |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | | |
| | | super.validatePageInfo(pd); |
| | | |
| | | //super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.AGENT_HAS_LIST_PARKINGAREA); |
| | | } |
| | | |
| | | @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/parkingArea.listParkingAreas" + mapToUrlParam(paramIn); |
| | | |
| | | |
| | | ResponseEntity<String> responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | apiUrl, |
| | | HttpMethod.GET); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | public RestTemplate getRestTemplate() { |
| | | return restTemplate; |
| | | } |
| | | |
| | | public void setRestTemplate(RestTemplate restTemplate) { |
| | | this.restTemplate = restTemplate; |
| | | } |
| | | } |
| | |
| | | |
| | | vc.component.activitiesManageInfo.conditions.page = _page; |
| | | vc.component.activitiesManageInfo.conditions.row = _rows; |
| | | vc.component.activitiesManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId; |
| | | var param = { |
| | | params: vc.component.activitiesManageInfo.conditions |
| | | }; |
| | |
| | | (function(vc){ |
| | | (function(vc) { |
| | | |
| | | vc.extends({ |
| | | propTypes: { |
| | | callBackListener:vc.propTypes.string, //父组件名称 |
| | | callBackFunction:vc.propTypes.string //父组件监听方法 |
| | | callBackListener: vc.propTypes.string, |
| | | //父组件名称 |
| | | callBackFunction: vc.propTypes.string //父组件监听方法 |
| | | }, |
| | | data:{ |
| | | addMenuGroupInfo:{ |
| | | gId:'', |
| | | name:'', |
| | | icon:'', |
| | | label:'', |
| | | seq:'', |
| | | description:'', |
| | | data: { |
| | | addMenuGroupInfo: { |
| | | gId: '', |
| | | name: '', |
| | | icon: '', |
| | | label: '', |
| | | seq: '', |
| | | description: '', |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | _initMethod: function() { |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('addMenuGroup','openAddMenuGroupModal',function(){ |
| | | }, |
| | | _initEvent: function() { |
| | | vc.on('addMenuGroup', 'openAddMenuGroupModal', |
| | | function() { |
| | | $('#addMenuGroupModel').modal('show'); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | addMenuGroupValidate(){ |
| | | methods: { |
| | | addMenuGroupValidate() { |
| | | return vc.validate.validate({ |
| | | addMenuGroupInfo:vc.component.addMenuGroupInfo |
| | | },{ |
| | | 'addMenuGroupInfo.name':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"组名称不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"2,10", |
| | | errInfo:"组名称必须在2至10字符之间" |
| | | }, |
| | | addMenuGroupInfo: vc.component.addMenuGroupInfo |
| | | }, |
| | | { |
| | | 'addMenuGroupInfo.name': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "组名称不能为空" |
| | | }, |
| | | { |
| | | limit: "maxin", |
| | | param: "2,10", |
| | | errInfo: "组名称必须在2至10字符之间" |
| | | }, |
| | | ], |
| | | 'addMenuGroupInfo.icon':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"icon不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"2,20", |
| | | errInfo:"icon必须在2至20字符之间" |
| | | }, |
| | | 'addMenuGroupInfo.icon': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "icon不能为空" |
| | | }, |
| | | { |
| | | limit: "maxin", |
| | | param: "2,20", |
| | | errInfo: "icon必须在2至20字符之间" |
| | | }, |
| | | ], |
| | | 'addMenuGroupInfo.label':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"标签不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"1,20", |
| | | errInfo:"标签错误" |
| | | }, |
| | | 'addMenuGroupInfo.label': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "标签不能为空" |
| | | }, |
| | | { |
| | | limit: "maxin", |
| | | param: "1,20", |
| | | errInfo: "标签错误" |
| | | }, |
| | | ], |
| | | 'addMenuGroupInfo.seq':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"序列不能为空" |
| | | }, |
| | | { |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"序列必须为整数" |
| | | }, |
| | | 'addMenuGroupInfo.seq': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "序列不能为空" |
| | | }, |
| | | { |
| | | limit: "num", |
| | | param: "", |
| | | errInfo: "序列必须为整数" |
| | | }, |
| | | ], |
| | | 'addMenuGroupInfo.description':[ |
| | | { |
| | | limit:"maxLength", |
| | | param:"200", |
| | | errInfo:"备注内容不能超过200" |
| | | }, |
| | | 'addMenuGroupInfo.description': [{ |
| | | limit: "maxLength", |
| | | param: "200", |
| | | errInfo: "备注内容不能超过200" |
| | | }, |
| | | ], |
| | | |
| | | |
| | | |
| | | |
| | | }); |
| | | }, |
| | | saveMenuGroupInfo:function(){ |
| | | if(!vc.component.addMenuGroupValidate()){ |
| | | saveMenuGroupInfo: function() { |
| | | if (!vc.component.addMenuGroupValidate()) { |
| | | vc.toast(vc.validate.errInfo); |
| | | |
| | | return ; |
| | | return; |
| | | } |
| | | |
| | | //vc.component.addMenuGroupInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | //不提交数据将数据 回调给侦听处理 |
| | | if(vc.notNull($props.callBackListener)){ |
| | | vc.emit($props.callBackListener,$props.callBackFunction,vc.component.addMenuGroupInfo); |
| | | if (vc.notNull($props.callBackListener)) { |
| | | vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addMenuGroupInfo); |
| | | $('#addMenuGroupModel').modal('hide'); |
| | | return ; |
| | | return; |
| | | } |
| | | |
| | | vc.http.post( |
| | | 'addMenuGroup', |
| | | 'save', |
| | | JSON.stringify(vc.component.addMenuGroupInfo), |
| | | { |
| | | emulateJSON:true |
| | | }, |
| | | function(json,res){ |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if(res.status == 200){ |
| | | //关闭model |
| | | $('#addMenuGroupModel').modal('hide'); |
| | | vc.component.clearAddMenuGroupInfo(); |
| | | vc.emit('menuGroupManage','listMenuGroup',{}); |
| | | vc.http.post('addMenuGroup', 'save', JSON.stringify(vc.component.addMenuGroupInfo), { |
| | | emulateJSON: true |
| | | }, |
| | | function(json, res) { |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if (res.status == 200) { |
| | | //关闭model |
| | | $('#addMenuGroupModel').modal('hide'); |
| | | vc.component.clearAddMenuGroupInfo(); |
| | | vc.emit('menuGroupManage', 'listMenuGroup', {}); |
| | | |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | return; |
| | | } |
| | | vc.message(json); |
| | | |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | }, |
| | | function(errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | vc.message(errInfo); |
| | | |
| | | }); |
| | | }); |
| | | }, |
| | | clearAddMenuGroupInfo:function(){ |
| | | clearAddMenuGroupInfo: function() { |
| | | vc.component.addMenuGroupInfo = { |
| | | name:'', |
| | | icon:'', |
| | | label:'', |
| | | seq:'', |
| | | description:'', |
| | | name: '', |
| | | icon: '', |
| | | label: '', |
| | | seq: '', |
| | | description: '', |
| | | |
| | | }; |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc); |
| | | })(window.vc); |
| New file |
| | |
| | | <div id = "addParkingAreaModel" 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"><input v-model="addFloorInfo.name" type="text" placeholder="必填,请填写名称" class="form-control"></div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">楼编号</label> |
| | | <div class="col-sm-10"><input v-model="addFloorInfo.floorNum" type="email" placeholder="必填,请填写编号" class="form-control"></div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">备注</label> |
| | | <div class="col-sm-10"><input v-model="addFloorInfo.remark" type="tel" placeholder="可填,请填写备注" class="form-control"></div> |
| | | </div>--> |
| | | |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">停车场编号</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="addParkingAreaInfo.num" type="text" placeholder="必填,请填写停车场编号" class="form-control"> |
| | | </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="addParkingAreaInfo.typeCd"> |
| | | <option selected disabled value="">必填,请选择停车场类型</option> |
| | | <option value="1001">地上停车场</option> |
| | | <option value="2001">地下停车场</option> |
| | | </select> </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">备注</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="addParkingAreaInfo.remark" type="text" placeholder="必填,请填写备注" class="form-control"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="ibox-content"> |
| | | <button class="btn btn-primary float-right" type="button" v-on:click="saveParkingAreaInfo()" ><i class="fa fa-check"></i> 保存</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> |
| New file |
| | |
| | | (function(vc) { |
| | | |
| | | vc.extends({ |
| | | propTypes: { |
| | | callBackListener: vc.propTypes.string, |
| | | //父组件名称 |
| | | callBackFunction: vc.propTypes.string //父组件监听方法 |
| | | }, |
| | | data: { |
| | | addParkingAreaInfo: { |
| | | paId: '', |
| | | num: '', |
| | | typeCd: '', |
| | | remark: '', |
| | | } |
| | | }, |
| | | _initMethod: function() { |
| | | |
| | | }, |
| | | _initEvent: function() { |
| | | vc.on('addParkingArea', 'openAddParkingAreaModal', |
| | | function() { |
| | | $('#addParkingAreaModel').modal('show'); |
| | | }); |
| | | }, |
| | | methods: { |
| | | addParkingAreaValidate() { |
| | | return vc.validate.validate({ |
| | | addParkingAreaInfo: vc.component.addParkingAreaInfo |
| | | }, |
| | | { |
| | | 'addParkingAreaInfo.num': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "停车场编号不能为空" |
| | | }, |
| | | { |
| | | limit: "maxin", |
| | | param: "1,12", |
| | | errInfo: "停车场编号不能超过12位" |
| | | }, |
| | | ], |
| | | 'addParkingAreaInfo.typeCd': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "停车场类型不能为空" |
| | | }, |
| | | { |
| | | limit: "num", |
| | | param: "", |
| | | errInfo: "停车场类型格式错误" |
| | | }, |
| | | ], |
| | | 'addParkingAreaInfo.remark': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "备注不能为空" |
| | | }, |
| | | { |
| | | limit: "maxin", |
| | | param: "1,4000", |
| | | errInfo: "备注太长" |
| | | }, |
| | | ], |
| | | |
| | | }); |
| | | }, |
| | | saveParkingAreaInfo: function() { |
| | | if (!vc.component.addParkingAreaValidate()) { |
| | | vc.toast(vc.validate.errInfo); |
| | | |
| | | return; |
| | | } |
| | | |
| | | vc.component.addParkingAreaInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | //不提交数据将数据 回调给侦听处理 |
| | | if (vc.notNull($props.callBackListener)) { |
| | | vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addParkingAreaInfo); |
| | | $('#addParkingAreaModel').modal('hide'); |
| | | return; |
| | | } |
| | | |
| | | vc.http.post('addParkingArea', 'save', JSON.stringify(vc.component.addParkingAreaInfo), { |
| | | emulateJSON: true |
| | | }, |
| | | function(json, res) { |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if (res.status == 200) { |
| | | //关闭model |
| | | $('#addParkingAreaModel').modal('hide'); |
| | | vc.component.clearAddParkingAreaInfo(); |
| | | vc.emit('parkingAreaManage', 'listParkingArea', {}); |
| | | |
| | | return; |
| | | } |
| | | vc.message(json); |
| | | |
| | | }, |
| | | function(errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | |
| | | }); |
| | | }, |
| | | clearAddParkingAreaInfo: function() { |
| | | vc.component.addParkingAreaInfo = { |
| | | num: '', |
| | | typeCd: '', |
| | | remark: '', |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| New file |
| | |
| | | <div id = "chooseParkingAreaModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="chooseParkingAreaModelLabel" aria-hidden="true" > |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <h3 class="modal-title" id="chooseParkingAreaModelLabel">选择停车场</h3> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| | | <span aria-hidden="true">×</span> |
| | | </button> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <div class=" row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox "> |
| | | <div class="row"> |
| | | |
| | | <div class="col-sm-7 m-b-xs"> |
| | | </div> |
| | | <div class="col-sm-5"> |
| | | <div class="input-group"> |
| | | <input placeholder="输入停车场名称" type="text" v-model="chooseParkingAreaInfo._currentParkingAreaName" class="form-control form-control-sm"> |
| | | <span class="input-group-append"> |
| | | <button type="button" class="btn btn-sm btn-primary" v-on:click="queryParkingAreas()">查询</button> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="table-responsive" style="margin-top:15px"> |
| | | <table class="table table-striped"> |
| | | <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> |
| | | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="parkingArea in chooseParkingAreaInfo.parkingAreas"> |
| | | <td class="text-center">{{parkingArea.paId}}</td> |
| | | <td class="text-center">{{parkingArea.num}}</td> |
| | | <td class="text-center">{{parkingArea.typeCd}}</td> |
| | | <td class="text-center">{{parkingArea.remark}}</td> |
| | | |
| | | <td> |
| | | <button class="btn btn-primary btn-xs" v-on:click="chooseParkingArea(parkingArea)">选择</button> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc){ |
| | | vc.extends({ |
| | | propTypes: { |
| | | emitChooseParkingArea:vc.propTypes.string, |
| | | emitLoadData:vc.propTypes.string |
| | | }, |
| | | data:{ |
| | | chooseParkingAreaInfo:{ |
| | | parkingAreas:[], |
| | | _currentParkingAreaName:'', |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('chooseParkingArea','openChooseParkingAreaModel',function(_param){ |
| | | $('#chooseParkingAreaModel').modal('show'); |
| | | vc.component._refreshChooseParkingAreaInfo(); |
| | | vc.component._loadAllParkingAreaInfo(1,10,''); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _loadAllParkingAreaInfo:function(_page,_row,_name){ |
| | | var param = { |
| | | params:{ |
| | | page:_page, |
| | | row:_row, |
| | | communityId:vc.getCurrentCommunity().communityId, |
| | | name:_name |
| | | } |
| | | }; |
| | | |
| | | //发送get请求 |
| | | vc.http.get('chooseParkingArea', |
| | | 'list', |
| | | param, |
| | | function(json){ |
| | | var _parkingAreaInfo = JSON.parse(json); |
| | | vc.component.chooseParkingAreaInfo.parkingAreas = _parkingAreaInfo.parkingAreas; |
| | | },function(){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | chooseParkingArea:function(_parkingArea){ |
| | | if(_parkingArea.hasOwnProperty('name')){ |
| | | _parkingArea.parkingAreaName = _parkingArea.name; |
| | | } |
| | | vc.emit($props.emitChooseParkingArea,'chooseParkingArea',_parkingArea); |
| | | vc.emit($props.emitLoadData,'listParkingAreaData',{ |
| | | parkingAreaId:_parkingArea.parkingAreaId |
| | | }); |
| | | $('#chooseParkingAreaModel').modal('hide'); |
| | | }, |
| | | queryParkingAreas:function(){ |
| | | vc.component._loadAllParkingAreaInfo(1,10,vc.component.chooseParkingAreaInfo._currentParkingAreaName); |
| | | }, |
| | | _refreshChooseParkingAreaInfo:function(){ |
| | | vc.component.chooseParkingAreaInfo._currentParkingAreaName = ""; |
| | | } |
| | | } |
| | | |
| | | }); |
| | | })(window.vc); |
| New file |
| | |
| | | <div class="modal fade" id="deleteParkingAreaModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> |
| | | <div class="modal-dialog" role="document"> |
| | | <div class="modal-content"> |
| | | <div class="modal-header"> |
| | | <h5 class="modal-title" id="exampleModalLabel">请确认您的操作!</h5> |
| | | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| | | <span aria-hidden="true">×</span> |
| | | </button> |
| | | </div> |
| | | <div class="modal-body"> |
| | | <tr align="center"><th>确定删除停车场</th></tr> |
| | | </div> |
| | | <div class="modal-footer"> |
| | | <button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteParkingAreaModel()">点错了</button> |
| | | <button type="button" class="btn btn-primary" v-on:click="deleteParkingArea()">确认删除</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | (function(vc,vm){ |
| | | |
| | | vc.extends({ |
| | | data:{ |
| | | deleteParkingAreaInfo:{ |
| | | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('deleteParkingArea','openDeleteParkingAreaModal',function(_params){ |
| | | |
| | | vc.component.deleteParkingAreaInfo = _params; |
| | | $('#deleteParkingAreaModel').modal('show'); |
| | | |
| | | }); |
| | | }, |
| | | methods:{ |
| | | deleteParkingArea:function(){ |
| | | vc.component.deleteParkingAreaInfo.communityId=vc.getCurrentCommunity().communityId; |
| | | vc.http.post( |
| | | 'deleteParkingArea', |
| | | 'delete', |
| | | JSON.stringify(vc.component.deleteParkingAreaInfo), |
| | | { |
| | | emulateJSON:true |
| | | }, |
| | | function(json,res){ |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if(res.status == 200){ |
| | | //关闭model |
| | | $('#deleteParkingAreaModel').modal('hide'); |
| | | vc.emit('parkingAreaManage','listParkingArea',{}); |
| | | return ; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | vc.message(json); |
| | | |
| | | }); |
| | | }, |
| | | closeDeleteParkingAreaModel:function(){ |
| | | $('#deleteParkingAreaModel').modal('hide'); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc,window.vc.component); |
| New file |
| | |
| | | <div id = "editParkingAreaModel" 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"> |
| | | <input v-model="editParkingAreaInfo.num" type="text" placeholder="必填,请填写停车场编号" class="form-control"> |
| | | </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="editParkingAreaInfo.typeCd"> |
| | | <option selected disabled value="">必填,请选择停车场类型</option> |
| | | <option value="1001">地上停车场</option> |
| | | <option value="2001">地下停车场</option> |
| | | </select> </div> |
| | | </div> |
| | | <div class="form-group row"> |
| | | <label class="col-sm-2 col-form-label">备注</label> |
| | | <div class="col-sm-10"> |
| | | <input v-model="editParkingAreaInfo.remark" type="text" placeholder="必填,请填写备注" class="form-control"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="ibox-content"> |
| | | <button class="btn btn-primary float-right" type="button" v-on:click="editParkingArea()" ><i class="fa fa-check"></i> 保存</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> |
| New file |
| | |
| | | (function(vc, vm) { |
| | | |
| | | vc.extends({ |
| | | data: { |
| | | editParkingAreaInfo: { |
| | | paId: '', |
| | | num: '', |
| | | typeCd: '', |
| | | remark: '', |
| | | |
| | | } |
| | | }, |
| | | _initMethod: function() { |
| | | |
| | | }, |
| | | _initEvent: function() { |
| | | vc.on('editParkingArea', 'openEditParkingAreaModal', |
| | | function(_params) { |
| | | vc.component.refreshEditParkingAreaInfo(); |
| | | $('#editParkingAreaModel').modal('show'); |
| | | vc.copyObject(_params, vc.component.editParkingAreaInfo); |
| | | vc.component.editParkingAreaInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | }); |
| | | }, |
| | | methods: { |
| | | editParkingAreaValidate: function() { |
| | | return vc.validate.validate({ |
| | | editParkingAreaInfo: vc.component.editParkingAreaInfo |
| | | }, |
| | | { |
| | | 'editParkingAreaInfo.num': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "停车场编号不能为空" |
| | | }, |
| | | { |
| | | limit: "maxin", |
| | | param: "1,12", |
| | | errInfo: "停车场编号不能超过12位" |
| | | }, |
| | | ], |
| | | 'editParkingAreaInfo.typeCd': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "停车场类型不能为空" |
| | | }, |
| | | { |
| | | limit: "num", |
| | | param: "", |
| | | errInfo: "停车场类型格式错误" |
| | | }, |
| | | ], |
| | | 'editParkingAreaInfo.remark': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "备注不能为空" |
| | | }, |
| | | { |
| | | limit: "maxin", |
| | | param: "1,4000", |
| | | errInfo: "备注太长" |
| | | }, |
| | | ], |
| | | 'editParkingAreaInfo.paId': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "停车场ID不能为空" |
| | | }] |
| | | |
| | | }); |
| | | }, |
| | | editParkingArea: function() { |
| | | vc.component.editParkingAreaInfo.communityId = vc.getCurrentCommunity().communityId; |
| | | |
| | | if (!vc.component.editParkingAreaValidate()) { |
| | | vc.toast(vc.validate.errInfo); |
| | | return; |
| | | } |
| | | |
| | | vc.http.post('editParkingArea', 'update', JSON.stringify(vc.component.editParkingAreaInfo), { |
| | | emulateJSON: true |
| | | }, |
| | | function(json, res) { |
| | | //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); |
| | | if (res.status == 200) { |
| | | //关闭model |
| | | $('#editParkingAreaModel').modal('hide'); |
| | | vc.emit('parkingAreaManage', 'listParkingArea', {}); |
| | | return; |
| | | } |
| | | vc.message(json); |
| | | }, |
| | | function(errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | |
| | | vc.message(errInfo); |
| | | }); |
| | | }, |
| | | refreshEditParkingAreaInfo: function() { |
| | | vc.component.editParkingAreaInfo = { |
| | | paId: '', |
| | | num: '', |
| | | typeCd: '', |
| | | remark: '', |
| | | |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc, window.vc.component); |
| New file |
| | |
| | | <div id="component" class="wrapper wrapper-content animated fadeInRight ecommerce"> |
| | | <div class="row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox "> |
| | | <div class="ibox-title"> |
| | | <h5>查询条件</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row"> |
| | | <div class="col-sm-4" > |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入停车场编号" v-model="parkingAreaManageInfo.conditions.num" class=" form-control"> |
| | | </div> </div><div class="col-sm-4" > |
| | | <select class="custom-select" v-model="parkingAreaManageInfo.conditions.typeCd"> |
| | | <option selected value="">请选择停车场类型</option> |
| | | <option value="1001">地上停车场</option> |
| | | <option value="2001">地下停车场</option> |
| | | </select> </div><div class="col-sm-3" > |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="请输入停车场ID" v-model="parkingAreaManageInfo.conditions.paId" class=" form-control"> |
| | | </div> </div><div class="col-sm-1"> |
| | | <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryParkingAreaMethod()"> |
| | | <i class="glyphicon glyphicon-search"></i> 查询 |
| | | </button> |
| | | </div></div> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox"> |
| | | <div class="ibox-title"> |
| | | <h5>停车场信息</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddParkingAreaModal()"> |
| | | <i class="glyphicon glyphicon-plus"></i> |
| | | 添加停车场 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | |
| | | <table class="footable table table-stripped toggle-arrow-tiny" |
| | | data-page-size="15" |
| | | > |
| | | <thead> |
| | | <tr> |
| | | <th class="text-center">停车场ID</th> |
| | | <th class="text-center">停车场编号</th> |
| | | <th class="text-center">停车场类型</th> |
| | | <th class="text-center">操作</th> |
| | | |
| | | |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="parkingArea in parkingAreaManageInfo.parkingAreas"> |
| | | <td class="text-center">{{parkingArea.paId}}</td> |
| | | <td class="text-center">{{parkingArea.num}}</td> |
| | | <td class="text-center">{{parkingArea.typeCd}}</td> |
| | | <td class="text-center"><div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openEditParkingAreaModel(parkingArea)">修改</button> |
| | | </div> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" v-on:click="_openDeleteParkingAreaModel(parkingArea)">删除</button> |
| | | </div></td> |
| | | |
| | | </tr> |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td colspan="7"> |
| | | <ul class="pagination float-right"></ul> |
| | | </td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | <!-- 分页 --> |
| | | <vc:create name="pagination"></vc:create> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <vc:create name="addParkingArea" |
| | | callBackListener="" |
| | | callBackFunction="" |
| | | ></vc:create> |
| | | <vc:create name="editParkingArea"></vc:create> |
| | | <vc:create name="deleteParkingArea"></vc:create> |
| | | |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 入驻小区 |
| | | **/ |
| | | (function(vc){ |
| | | var DEFAULT_PAGE = 1; |
| | | var DEFAULT_ROWS = 10; |
| | | vc.extends({ |
| | | data:{ |
| | | parkingAreaManageInfo:{ |
| | | parkingAreas:[], |
| | | total:0, |
| | | records:1, |
| | | moreCondition:false, |
| | | num:'', |
| | | conditions:{ |
| | | num:'', |
| | | typeCd:'', |
| | | paId:'', |
| | | |
| | | } |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | vc.component._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }, |
| | | _initEvent:function(){ |
| | | |
| | | vc.on('parkingAreaManage','listParkingArea',function(_param){ |
| | | vc.component._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }); |
| | | vc.on('pagination','page_event',function(_currentPage){ |
| | | vc.component._listParkingAreas(_currentPage,DEFAULT_ROWS); |
| | | }); |
| | | }, |
| | | methods:{ |
| | | _listParkingAreas:function(_page, _rows){ |
| | | |
| | | vc.component.parkingAreaManageInfo.conditions.page = _page; |
| | | vc.component.parkingAreaManageInfo.conditions.row = _rows; |
| | | vc.component.parkingAreaManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId; |
| | | var param = { |
| | | params:vc.component.parkingAreaManageInfo.conditions |
| | | }; |
| | | |
| | | //发送get请求 |
| | | vc.http.get('parkingAreaManage', |
| | | 'list', |
| | | param, |
| | | function(json,res){ |
| | | var _parkingAreaManageInfo=JSON.parse(json); |
| | | vc.component.parkingAreaManageInfo.total = _parkingAreaManageInfo.total; |
| | | vc.component.parkingAreaManageInfo.records = _parkingAreaManageInfo.records; |
| | | vc.component.parkingAreaManageInfo.parkingAreas = _parkingAreaManageInfo.parkingAreas; |
| | | vc.emit('pagination','init',{ |
| | | total:vc.component.parkingAreaManageInfo.records, |
| | | currentPage:_page |
| | | }); |
| | | },function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | _openAddParkingAreaModal:function(){ |
| | | vc.emit('addParkingArea','openAddParkingAreaModal',{}); |
| | | }, |
| | | _openEditParkingAreaModel:function(_parkingArea){ |
| | | vc.emit('editParkingArea','openEditParkingAreaModal',_parkingArea); |
| | | }, |
| | | _openDeleteParkingAreaModel:function(_parkingArea){ |
| | | vc.emit('deleteParkingArea','openDeleteParkingAreaModal',_parkingArea); |
| | | }, |
| | | _queryParkingAreaMethod:function(){ |
| | | vc.component._listParkingAreas(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | |
| | | }, |
| | | _moreCondition:function(){ |
| | | if(vc.component.parkingAreaManageInfo.moreCondition){ |
| | | vc.component.parkingAreaManageInfo.moreCondition = false; |
| | | }else{ |
| | | vc.component.parkingAreaManageInfo.moreCondition = true; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | }); |
| | | })(window.vc); |
| New file |
| | |
| | | <div class="row"> |
| | | <div class="col-lg-12"> |
| | | <div class="ibox "> |
| | | <div class="ibox-title"> |
| | | <h5>停车场信息</h5> |
| | | <div class="ibox-tools" style="top:10px;"> |
| | | <button type="button" v-if="viewParkingAreaInfo.index != 2" class="btn btn-primary btn-sm" style="margin-right:10px;" v-on:click="_openSelectParkingAreaInfoModel()"> |
| | | <i class="glyphicon glyphicon-search"></i> 选择停车场</button> |
| | | |
| | | <button type="button" v-if="viewParkingAreaInfo.index != 2" class="btn btn-primary btn-sm" v-on:click="_openAddParkingAreaInfoModel()"> |
| | | <i class="glyphicon glyphicon-plus"></i> 添加停车场</button> |
| | | </div> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row"> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >停车场编号:</label> |
| | | <label class="">{{viewParkingAreaInfo.num}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >停车场类型:</label> |
| | | <label class="">{{viewParkingAreaInfo.typeCd}}</label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-4"> |
| | | <div class="form-group"> |
| | | <label class="col-form-label" >备注:</label> |
| | | <label class="">{{viewParkingAreaInfo.remark}}</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="addParkingArea" |
| | | callBackListener="viewParkingAreaInfo" |
| | | callBackFunction="chooseParkingArea" |
| | | ></vc:create> |
| | | |
| | | |
| | | <vc:create name="chooseParkingArea" |
| | | emitChooseParkingArea="viewParkingAreaInfo" |
| | | emitLoadData="viewParkingAreaInfo" |
| | | ></vc:create> |
| | | </div> |
| New file |
| | |
| | | /** |
| | | 停车场 组件 |
| | | **/ |
| | | (function(vc) { |
| | | |
| | | vc.extends({ |
| | | propTypes: { |
| | | callBackListener: vc.propTypes.string, |
| | | //父组件名称 |
| | | callBackFunction: vc.propTypes.string //父组件监听方法 |
| | | }, |
| | | data: { |
| | | viewParkingAreaInfo: { |
| | | index: 0, |
| | | flowComponent: 'viewParkingAreaInfo', |
| | | num: '', |
| | | typeCd: '', |
| | | remark: '', |
| | | |
| | | } |
| | | }, |
| | | _initMethod: function() { |
| | | //根据请求参数查询 查询 业主信息 |
| | | vc.component._loadParkingAreaInfoData(); |
| | | }, |
| | | _initEvent: function() { |
| | | vc.on('viewParkingAreaInfo', 'chooseParkingArea', |
| | | function(_app) { |
| | | vc.copyObject(_app, vc.component.viewParkingAreaInfo); |
| | | vc.emit($props.callBackListener, $props.callBackFunction, vc.component.viewParkingAreaInfo); |
| | | }); |
| | | |
| | | vc.on('viewParkingAreaInfo', 'onIndex', |
| | | function(_index) { |
| | | vc.component.viewParkingAreaInfo.index = _index; |
| | | }); |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | _openSelectParkingAreaInfoModel() { |
| | | vc.emit('chooseParkingArea', 'openChooseParkingAreaModel', {}); |
| | | }, |
| | | _openAddParkingAreaInfoModel() { |
| | | vc.emit('addParkingArea', 'openAddParkingAreaModal', {}); |
| | | }, |
| | | _loadParkingAreaInfoData: function() { |
| | | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | })(window.vc); |
| New file |
| | |
| | | <!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="parkingAreaManage"></vc:create> |
| | | </div> |
| | | |
| | | <vc:create name="copyright"></vc:create> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <vc:create name="commonBottom"></vc:create> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | |
| | | |
| | | **1\. 删除停车场** |
| | | ###### 接口功能 |
| | | > API服务做删除停车场时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://parkingArea-service/parkingAreaApi/service](http://parkingArea-service/parkingAreaApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessParkingAreaInfo|1|Object|-|小区成员|小区成员| |
| | | |businessParkingAreaInfo|paId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://parkingArea-service/parkingAreaApi/service](http://parkingArea-service/parkingAreaApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "541100050001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessParkingAreaInfo": { |
| | | "paId":"填写存在的值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 保存停车场** |
| | | ###### 接口功能 |
| | | > API服务做保存停车场时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://parkingArea-service/parkingAreaApi/service](http://parkingArea-service/parkingAreaApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessParkingAreaInfo|1|Object|-|小区成员|小区成员| |
| | | |businessParkingAreaInfo|typeCd|1|String|30|-|-| |
| | | |businessParkingAreaInfo|num|1|String|30|-|-| |
| | | |businessParkingAreaInfo|paId|1|String|30|-|-| |
| | | |businessParkingAreaInfo|remark|1|String|30|-|-| |
| | | |businessParkingAreaInfo|communityId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://parkingArea-service/parkingAreaApi/service](http://parkingArea-service/parkingAreaApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "541100030001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessParkingAreaInfo": { |
| | | "typeCd":"填写具体值", |
| | | "num":"填写具体值", |
| | | "paId":"填写具体值", |
| | | "remark":"填写具体值", |
| | | "communityId":"填写具体值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | |
| | | |
| | | **1\. 修改停车场** |
| | | ###### 接口功能 |
| | | > API服务做修改停车场时调用该接口 |
| | | |
| | | ###### URL |
| | | > [http://parkingArea-service/parkingAreaApi/service](http://parkingArea-service/parkingAreaApi/service) |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > POST |
| | | |
| | | ###### 协议接口 |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-:| |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |-|business|1|Array|-|业务节点|-| |
| | | |
| | | ###### orders |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|orders|1|Object|-|订单节点|-| |
| | | |orders|appId|1|String|10|系统ID|由中心服务提供| |
| | | |orders|transactionId|1|String|30|交互流水|appId+'00'+YYYYMMDD+10位序列| |
| | | |orders|userId|1|String|30|用户ID|已有用户ID| |
| | | |orders|orderTypeCd|1|String|4|订单类型|查看订单类型说明| |
| | | |orders|requestTime|1|String|14|请求时间|YYYYMMDDhhmmss| |
| | | |orders|remark|1|String|200|备注|备注| |
| | | |orders|sign|?|String|64|签名|查看加密说明| |
| | | |orders|attrs|?|Array|-|订单属性|-| |
| | | |attrs|specCd|1|String|12|规格编码|由中心服务提供| |
| | | |attrs|value|1|String|50|属性值|-| |
| | | |orders|response|1|Object|-|返回结果节点|-| |
| | | |response|code|1|String|4|返回状态|查看状态说明| |
| | | |response|message|1|String|200|返回状态描述|-| |
| | | |
| | | ###### business |
| | | |父元素名称|参数名称|约束|类型|长度|描述|取值说明| |
| | | | :-: | :-: | :-: | :-: | :-: | :-: | :-: | |
| | | |-|business|?|Array|-|业务节点|-| |
| | | |business|businessTypeCd|1|String|12|业务类型编码|500100030002| |
| | | |business|datas|1|Object|-|数据节点|不同的服务下的节点不一样| |
| | | |datas|businessParkingAreaInfo|1|Object|-|小区成员|小区成员| |
| | | |businessParkingAreaInfo|typeCd|1|String|30|-|-| |
| | | |businessParkingAreaInfo|num|1|String|30|-|-| |
| | | |businessParkingAreaInfo|paId|1|String|30|-|-| |
| | | |businessParkingAreaInfo|remark|1|String|30|-|-| |
| | | |businessParkingAreaInfo|communityId|1|String|30|-|-| |
| | | |
| | | |
| | | ###### 返回协议 |
| | | |
| | | 当http返回状态不为200 时请求处理失败 body内容为失败的原因 |
| | | |
| | | 当http返回状态为200时请求处理成功,body内容为返回内容, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ###### 举例 |
| | | > 地址:[http://parkingArea-service/parkingAreaApi/service](http://parkingArea-service/parkingAreaApi/service) |
| | | |
| | | ``` javascript |
| | | 请求头信息: |
| | | Content-Type:application/json |
| | | |
| | | 请求报文: |
| | | |
| | | { |
| | | "orders": { |
| | | "appId": "外系统ID,分配得到", |
| | | "transactionId": "100000000020180409224736000001", |
| | | "userId": "用户ID", |
| | | "orderTypeCd": "订单类型,查询,受理", |
| | | "requestTime": "20180409224736", |
| | | "remark": "备注", |
| | | "sign": "这个服务是否要求MD5签名", |
| | | "businessType":"I", |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | }, |
| | | "business": { |
| | | "businessTypeCd": "541100040001", |
| | | "bId":"1234567892", |
| | | "remark": "备注", |
| | | "datas": { |
| | | "businessParkingAreaInfo": { |
| | | "typeCd":"填写具体值", |
| | | "num":"填写具体值", |
| | | "paId":"填写具体值", |
| | | "remark":"填写具体值", |
| | | "communityId":"填写具体值" |
| | | } |
| | | }, |
| | | "attrs": [{ |
| | | "specCd": "配置的字段ID", |
| | | "value": "具体值" |
| | | }] |
| | | } |
| | | } |
| | | |
| | | 返回报文: |
| | | { |
| | | "orderTypeCd": "D", |
| | | "response": { |
| | | "code": "0000", |
| | | "message": "成功" |
| | | }, |
| | | "responseTime": "20190418102004", |
| | | "bId": "202019041810750003", |
| | | "businessType": "B", |
| | | "transactionId": "3a5a411ec65a4c3f895935638aa1d2bc", |
| | | "dataFlowId": "44fde86d39ce46f4b4aab5f6b14f3947" |
| | | } |
| | | |
| | | ``` |
| New file |
| | |
| | | package com.java110.dto.parking; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | | * @Description 停车场数据层封装 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 8:52 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | public class ParkingAreaDto extends PageDto implements Serializable { |
| | | |
| | | private String typeCd; |
| | | private String num; |
| | | private String paId; |
| | | private String remark; |
| | | private String communityId; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getTypeCd() { |
| | | return typeCd; |
| | | } |
| | | |
| | | public void setTypeCd(String typeCd) { |
| | | this.typeCd = typeCd; |
| | | } |
| | | |
| | | public String getNum() { |
| | | return num; |
| | | } |
| | | |
| | | public void setNum(String num) { |
| | | this.num = num; |
| | | } |
| | | |
| | | public String getPaId() { |
| | | return paId; |
| | | } |
| | | |
| | | public void setPaId(String paId) { |
| | | this.paId = paId; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | } |
| File was renamed from java110-bean/src/main/java/com/java110/dto/ParkingSpaceDto.java |
| | |
| | | package com.java110.dto; |
| | | package com.java110.dto.parking; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| New file |
| | |
| | | package com.java110.vo.api.parkingArea; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class ApiParkingAreaDataVo implements Serializable { |
| | | |
| | | private String paId; |
| | | private String num; |
| | | private String typeCd; |
| | | private String remark; |
| | | public String getPaId() { |
| | | return paId; |
| | | } |
| | | public void setPaId(String paId) { |
| | | this.paId = paId; |
| | | } |
| | | public String getNum() { |
| | | return num; |
| | | } |
| | | public void setNum(String num) { |
| | | this.num = num; |
| | | } |
| | | public String getTypeCd() { |
| | | return typeCd; |
| | | } |
| | | public void setTypeCd(String typeCd) { |
| | | this.typeCd = typeCd; |
| | | } |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.vo.api.parkingArea; |
| | | |
| | | import com.java110.vo.MorePageVo; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | public class ApiParkingAreaVo extends MorePageVo implements Serializable { |
| | | List<ApiParkingAreaDataVo> parkingAreas; |
| | | |
| | | |
| | | public List<ApiParkingAreaDataVo> getParkingAreas() { |
| | | return parkingAreas; |
| | | } |
| | | |
| | | public void setParkingAreas(List<ApiParkingAreaDataVo> parkingAreas) { |
| | | this.parkingAreas = parkingAreas; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110; |
| | | |
| | | |
| | | import com.java110.code.Data; |
| | | import com.java110.code.GeneratorAbstractBussiness; |
| | | import com.java110.code.GeneratorDeleteInfoListener; |
| | | import com.java110.code.GeneratorDtoBean; |
| | | import com.java110.code.GeneratorIInnerServiceSMO; |
| | | import com.java110.code.GeneratorIServiceDaoListener; |
| | | import com.java110.code.GeneratorInnerServiceSMOImpl; |
| | | import com.java110.code.GeneratorSaveInfoListener; |
| | | import com.java110.code.GeneratorServiceDaoImplListener; |
| | | import com.java110.code.GeneratorServiceDaoImplMapperListener; |
| | | import com.java110.code.GeneratorUpdateInfoListener; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Hello world! |
| | | */ |
| | | public class parkingAreaGeneratorApplication { |
| | | |
| | | protected parkingAreaGeneratorApplication() { |
| | | // prevents calls from subclass |
| | | throw new UnsupportedOperationException(); |
| | | } |
| | | |
| | | /** |
| | | * 代码生成器 入口方法 |
| | | * 此处生成的mapper文件包含过程表和实例表的sql,所以要求两张表的特殊字段也要写上 |
| | | * BusinessTypeCd |
| | | * @param args 参数 |
| | | */ |
| | | public static void main(String[] args) { |
| | | Data data = new Data(); |
| | | data.setId("paId"); |
| | | data.setName("parkingArea"); |
| | | data.setDesc("停车场"); |
| | | data.setShareParam("communityId"); |
| | | data.setShareColumn("community_id"); |
| | | data.setNewBusinessTypeCd("BUSINESS_TYPE_SAVE_PARKING_AREA"); |
| | | data.setUpdateBusinessTypeCd("BUSINESS_TYPE_UPDATE_PARKING_AREA"); |
| | | data.setDeleteBusinessTypeCd("BUSINESS_TYPE_DELETE_PARKING_AREA"); |
| | | data.setNewBusinessTypeCdValue("541100030001"); |
| | | data.setUpdateBusinessTypeCdValue("541100040001"); |
| | | data.setDeleteBusinessTypeCdValue("541100050001"); |
| | | data.setBusinessTableName("business_parking_area"); |
| | | data.setTableName("parking_area"); |
| | | Map<String, String> param = new HashMap<String, String>(); |
| | | param.put("paId", "pa_id"); //map的key为你自定义的字段名就是驼峰命名法的那个,value为数据库表的字段名 |
| | | param.put("num", "num"); |
| | | param.put("communityId", "community_id"); |
| | | param.put("typeCd", "type_cd"); |
| | | param.put("remark", "remark"); |
| | | param.put("statusCd", "status_cd"); |
| | | param.put("operate", "operate"); |
| | | param.put("bId", "b_id"); |
| | | data.setParams(param); |
| | | GeneratorSaveInfoListener generatorSaveInfoListener = new GeneratorSaveInfoListener(); |
| | | generatorSaveInfoListener.generator(data); |
| | | |
| | | GeneratorAbstractBussiness generatorAbstractBussiness = new GeneratorAbstractBussiness(); |
| | | generatorAbstractBussiness.generator(data); |
| | | |
| | | GeneratorIServiceDaoListener generatorIServiceDaoListener = new GeneratorIServiceDaoListener(); |
| | | generatorIServiceDaoListener.generator(data); |
| | | |
| | | GeneratorServiceDaoImplListener generatorServiceDaoImplListener = new GeneratorServiceDaoImplListener(); |
| | | generatorServiceDaoImplListener.generator(data); |
| | | |
| | | GeneratorServiceDaoImplMapperListener generatorServiceDaoImplMapperListener = null; |
| | | generatorServiceDaoImplMapperListener = new GeneratorServiceDaoImplMapperListener(); |
| | | generatorServiceDaoImplMapperListener.generator(data); |
| | | |
| | | GeneratorUpdateInfoListener generatorUpdateInfoListener = new GeneratorUpdateInfoListener(); |
| | | generatorUpdateInfoListener.generator(data); |
| | | |
| | | GeneratorDeleteInfoListener generatorDeleteInfoListener = new GeneratorDeleteInfoListener(); |
| | | generatorDeleteInfoListener.generator(data); |
| | | |
| | | GeneratorInnerServiceSMOImpl generatorInnerServiceSMOImpl = new GeneratorInnerServiceSMOImpl(); |
| | | generatorInnerServiceSMOImpl.generator(data); |
| | | |
| | | GeneratorDtoBean generatorDtoBean = new GeneratorDtoBean(); |
| | | generatorDtoBean.generator(data); |
| | | |
| | | GeneratorIInnerServiceSMO generatorIInnerServiceSMO = new GeneratorIInnerServiceSMO(); |
| | | generatorIInnerServiceSMO.generator(data); |
| | | } |
| | | } |
| | |
| | | { |
| | | "templateName":"活动", |
| | | "templateCode":"activities", |
| | | "templateKey":"activitiesId", |
| | | "templateKeyName":"活动ID", |
| | | "searchCode": "title", |
| | | "searchName": "活动标题", |
| | | "templateName":"停车场", |
| | | "templateCode":"parkingArea", |
| | | "templateKey":"paId", |
| | | "templateKeyName":"停车场ID", |
| | | "searchCode": "num", |
| | | "searchName": "停车场编号", |
| | | "conditions": [ |
| | | { |
| | | "name": "活动标题", |
| | | "name": "停车场编号", |
| | | "inputType": "input", |
| | | "code": "title", |
| | | "code": "num", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "活动类型", |
| | | "name": "停车场类型", |
| | | "inputType": "select", |
| | | "selectValue":"10001,10002", |
| | | "selectValueName":"小区文化,其他", |
| | | "selectValue":"1001,2001", |
| | | "selectValueName":"地上停车场,地下停车场", |
| | | "code": "typeCd", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "员工名称", |
| | | "name": "停车场ID", |
| | | "inputType": "input", |
| | | "code": "userName", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "活动ID", |
| | | "inputType": "input", |
| | | "code": "activitiesId", |
| | | "code": "paId", |
| | | "whereCondition": "equal" |
| | | } |
| | | ], |
| | | "columns":[ |
| | | { |
| | | "code":"title", |
| | | "cnCode":"活动标题", |
| | | "desc":"必填,请填写业活动标题", |
| | | "code":"num", |
| | | "cnCode":"停车场编号", |
| | | "desc":"必填,请填写停车场编号", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxin", |
| | | "limitParam":"1,200", |
| | | "limitErrInfo":"活动标题不能超过200位", |
| | | "limitParam":"1,12", |
| | | "limitErrInfo":"停车场编号不能超过12位", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "typeCd", |
| | | "cnCode":"活动类型", |
| | | "desc":"必填,请选择活动类型", |
| | | "cnCode":"停车场类型", |
| | | "desc":"必填,请选择停车场类型", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "select", |
| | | "selectValue":"10001,10002", |
| | | "selectValueName":"小区文化,其他", |
| | | "selectValue":"1001,2001", |
| | | "selectValueName":"地上停车场,地下停车场", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"活动类型格式错误", |
| | | "limitErrInfo":"停车场类型格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "headerImg", |
| | | "cnCode":"头部照片", |
| | | "desc":"必填,请选择头部照片", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"maxin", |
| | | "limitParam":"1,200", |
| | | "limitErrInfo":"头部照片格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "context", |
| | | "cnCode":"活动内容", |
| | | "desc":"必填,请填写活动内容", |
| | | "code": "remark", |
| | | "cnCode":"备注", |
| | | "desc":"必填,请填写备注", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"maxin", |
| | | "limitParam":"1,4000", |
| | | "limitErrInfo":"活动内容太长", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "startTime", |
| | | "cnCode":"开始时间", |
| | | "desc":"必填,请选择开始时间", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"date", |
| | | "limitParam":"", |
| | | "limitErrInfo":"开始时间格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "endTime", |
| | | "cnCode":"结束时间", |
| | | "desc":"必填,请选择结束时间", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"date", |
| | | "limitParam":"", |
| | | "limitErrInfo":"结束时间格式错误", |
| | | "show": true |
| | | "limitErrInfo":"备注太长", |
| | | "show": false |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | { |
| | | "templateName":"活动", |
| | | "templateCode":"activities", |
| | | "templateKey":"activitiesId", |
| | | "templateKeyName":"活动ID", |
| | | "searchCode": "title", |
| | | "searchName": "活动标题", |
| | | "conditions": [ |
| | | { |
| | | "name": "活动标题", |
| | | "inputType": "input", |
| | | "code": "title", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "活动类型", |
| | | "inputType": "select", |
| | | "selectValue":"10001,10002", |
| | | "selectValueName":"小区文化,其他", |
| | | "code": "typeCd", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "员工名称", |
| | | "inputType": "input", |
| | | "code": "userName", |
| | | "whereCondition": "equal" |
| | | }, |
| | | { |
| | | "name": "活动ID", |
| | | "inputType": "input", |
| | | "code": "activitiesId", |
| | | "whereCondition": "equal" |
| | | } |
| | | ], |
| | | "columns":[ |
| | | { |
| | | "code":"title", |
| | | "cnCode":"活动标题", |
| | | "desc":"必填,请填写业活动标题", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType":"input", |
| | | "limit":"maxin", |
| | | "limitParam":"1,200", |
| | | "limitErrInfo":"活动标题不能超过200位", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "typeCd", |
| | | "cnCode":"活动类型", |
| | | "desc":"必填,请选择活动类型", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "select", |
| | | "selectValue":"10001,10002", |
| | | "selectValueName":"小区文化,其他", |
| | | "limit":"num", |
| | | "limitParam":"", |
| | | "limitErrInfo":"活动类型格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "headerImg", |
| | | "cnCode":"头部照片", |
| | | "desc":"必填,请选择头部照片", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"maxin", |
| | | "limitParam":"1,200", |
| | | "limitErrInfo":"头部照片格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "context", |
| | | "cnCode":"活动内容", |
| | | "desc":"必填,请填写活动内容", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"maxin", |
| | | "limitParam":"1,4000", |
| | | "limitErrInfo":"活动内容太长", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "startTime", |
| | | "cnCode":"开始时间", |
| | | "desc":"必填,请选择开始时间", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"date", |
| | | "limitParam":"", |
| | | "limitErrInfo":"开始时间格式错误", |
| | | "show": true |
| | | }, |
| | | { |
| | | "code": "endTime", |
| | | "cnCode":"结束时间", |
| | | "desc":"必填,请选择结束时间", |
| | | "required":true, |
| | | "hasDefaultValue":false, |
| | | "inputType": "input", |
| | | "limit":"date", |
| | | "limitParam":"", |
| | | "limitErrInfo":"结束时间格式错误", |
| | | "show": true |
| | | } |
| | | ] |
| | | } |
| | |
| | | public static final String CODE_PREFIX_advertItemId = "97"; |
| | | public static final String CODE_PREFIX_appUserId = "98"; |
| | | public static final String CODE_PREFIX_activitiesId = "99"; |
| | | public static final String CODE_PREFIX_paId = "10"; |
| | | |
| | | |
| | | /** |
| New file |
| | |
| | | package com.java110.core.smo.parkingSpace; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.parking.ParkingAreaDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName IParkingAreaInnerServiceSMO |
| | | * @Description 停车场接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "community-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/parkingAreaApi") |
| | | public interface IParkingAreaInnerServiceSMO { |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * @param parkingAreaDto 数据对象分享 |
| | | * @return ParkingAreaDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryParkingAreas", method = RequestMethod.POST) |
| | | List<ParkingAreaDto> queryParkingAreas(@RequestBody ParkingAreaDto parkingAreaDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param parkingAreaDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryParkingAreasCount", method = RequestMethod.POST) |
| | | int queryParkingAreasCount(@RequestBody ParkingAreaDto parkingAreaDto); |
| | | } |
| | |
| | | package com.java110.core.smo.parkingSpace; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.ParkingSpaceDto; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | CREATE INDEX idx_ps_ps_id ON parking_space(ps_id); |
| | | CREATE INDEX idx_ps_b_id ON parking_space(b_id); |
| | | |
| | | -- 车辆进出场 |
| | | create table business_car_inout( |
| | | inout_id varchar(30) not null comment '进出ID', |
| | | b_id VARCHAR(30) NOT NULL COMMENT '业务Id', |
| | | community_id varchar(30) not null comment '小区ID', |
| | | car_num varchar(12) not null comment '车牌号', |
| | | state VARCHAR(12) NOT NULL COMMENT '状态,100300 进场状态 100400 支付完成 100500 离场状态 100600 支付超时重新支付', |
| | | in_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '进场时间', |
| | | out_time TIMESTAMP COMMENT '离场时间', |
| | | create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | operate VARCHAR(4) NOT NULL COMMENT '数据状态,添加ADD,修改MOD 删除DEL' |
| | | ); |
| | | |
| | | create table car_inout( |
| | | inout_id varchar(30) not null comment '进出ID', |
| | | b_id VARCHAR(30) NOT NULL COMMENT '业务Id', |
| | | community_id varchar(30) not null comment '小区ID', |
| | | car_num varchar(12) not null comment '车牌号', |
| | | state VARCHAR(12) NOT NULL COMMENT '状态,100300 进场状态 100400 支付完成 100500 离场状态 100600 支付超时重新支付', |
| | | in_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '进场时间', |
| | | out_time TIMESTAMP COMMENT '离场时间', |
| | | create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | status_cd VARCHAR(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,S 保存,0, 在用 1失效' |
| | | ); |
| | | |
| | | create table business_car_inout_detail( |
| | | detail_id varchar(30) not null comment '详情ID', |
| | | inout_id varchar(30) not null comment '进出ID', |
| | | b_id VARCHAR(30) NOT NULL COMMENT '业务Id', |
| | | community_id varchar(30) not null comment '小区ID', |
| | | machine_id varchar(30) not null comment '设备ID', |
| | | machine_code varchar(30) not null comment '设备编码', |
| | | inout varchar(12) not null comment '1010 进场 2020 出场', |
| | | car_num varchar(12) not null comment '车牌号', |
| | | create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | operate VARCHAR(4) NOT NULL COMMENT '数据状态,添加ADD,修改MOD 删除DEL' |
| | | ); |
| | | |
| | | create table car_inout_detail( |
| | | detail_id varchar(30) not null comment '详情ID', |
| | | inout_id varchar(30) not null comment '进出ID', |
| | | b_id VARCHAR(30) NOT NULL COMMENT '业务Id', |
| | | community_id varchar(30) not null comment '小区ID', |
| | | machine_id varchar(30) not null comment '设备ID', |
| | | machine_code varchar(30) not null comment '设备编码', |
| | | inout varchar(12) not null comment '1010 进场 2020 出场', |
| | | car_num varchar(12) not null comment '车牌号', |
| | | create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | status_cd VARCHAR(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,S 保存,0, 在用 1失效' |
| | | ); |
| | | |
| | | -- 车辆黑白名单 |
| | | create table business_car_black_white( |
| | | bw_id varchar(30) not null comment '黑白名单ID', |
| | | b_id VARCHAR(30) NOT NULL COMMENT '业务Id', |
| | | community_id varchar(30) not null comment '小区ID', |
| | | black_white varchar(12) not null comment '黑白名单标识 1111 黑名单 2222 白名单', |
| | | car_num varchar(12) not null comment '车牌号', |
| | | start_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '开始时间', |
| | | end_time TIMESTAMP NOT NULL COMMENT '结束时间', |
| | | create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | operate VARCHAR(4) NOT NULL COMMENT '数据状态,添加ADD,修改MOD 删除DEL' |
| | | ); |
| | | |
| | | -- 车辆黑白名单 |
| | | create table car_black_white( |
| | | bw_id varchar(30) not null comment '黑白名单ID', |
| | | b_id VARCHAR(30) NOT NULL COMMENT '业务Id', |
| | | community_id varchar(30) not null comment '小区ID', |
| | | black_white varchar(12) not null comment '黑白名单标识 1111 黑名单 2222 白名单', |
| | | car_num varchar(12) not null comment '车牌号', |
| | | start_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '开始时间', |
| | | end_time TIMESTAMP NOT NULL COMMENT '结束时间', |
| | | create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
| | | status_cd VARCHAR(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,S 保存,0, 在用 1失效' |
| | | ); |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="parkingAreaServiceDaoImpl"> |
| | | |
| | | <!-- 保存停车场信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessParkingAreaInfo" parameterType="Map"> |
| | | insert into business_parking_area( |
| | | operate,type_cd,num,pa_id,remark,community_id,b_id |
| | | ) values ( |
| | | #{operate},#{typeCd},#{num},#{paId},#{remark},#{communityId},#{bId} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询停车场信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessParkingAreaInfo" parameterType="Map" resultType="Map"> |
| | | select t.operate,t.type_cd,t.type_cd typeCd,t.num,t.pa_id,t.pa_id paId,t.remark,t.community_id,t.community_id communityId,t.b_id,t.b_id bId |
| | | from business_parking_area t |
| | | where 1 =1 |
| | | <if test="operate !=null and operate != ''"> |
| | | and t.operate= #{operate} |
| | | </if> |
| | | <if test="typeCd !=null and typeCd != ''"> |
| | | and t.type_cd= #{typeCd} |
| | | </if> |
| | | <if test="num !=null and num != ''"> |
| | | and t.num= #{num} |
| | | </if> |
| | | <if test="paId !=null and paId != ''"> |
| | | and t.pa_id= #{paId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存停车场信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveParkingAreaInfoInstance" parameterType="Map"> |
| | | insert into parking_area( |
| | | type_cd,num,pa_id,remark,status_cd,community_id,b_id |
| | | ) select t.type_cd,t.num,t.pa_id,t.remark,'0',t.community_id,t.b_id from business_parking_area t where 1=1 |
| | | and t.operate= 'ADD' |
| | | <if test="typeCd !=null and typeCd != ''"> |
| | | and t.type_cd= #{typeCd} |
| | | </if> |
| | | <if test="num !=null and num != ''"> |
| | | and t.num= #{num} |
| | | </if> |
| | | <if test="paId !=null and paId != ''"> |
| | | and t.pa_id= #{paId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询停车场信息 add by wuxw 2018-07-03 --> |
| | | <select id="getParkingAreaInfo" parameterType="Map" resultType="Map"> |
| | | select t.type_cd,t.type_cd typeCd,t.num,t.pa_id,t.pa_id paId,t.remark,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId |
| | | from parking_area t |
| | | where 1 =1 |
| | | <if test="typeCd !=null and typeCd != ''"> |
| | | and t.type_cd= #{typeCd} |
| | | </if> |
| | | <if test="num !=null and num != ''"> |
| | | and t.num= #{num} |
| | | </if> |
| | | <if test="paId !=null and paId != ''"> |
| | | and t.pa_id= #{paId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改停车场信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateParkingAreaInfoInstance" parameterType="Map"> |
| | | update parking_area t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="typeCd !=null and typeCd != ''"> |
| | | , t.type_cd= #{typeCd} |
| | | </if> |
| | | <if test="num !=null and num != ''"> |
| | | , t.num= #{num} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | where 1=1 <if test="paId !=null and paId != ''"> |
| | | and t.pa_id= #{paId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询停车场数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryParkingAreasCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from parking_area t |
| | | where 1 =1 |
| | | <if test="typeCd !=null and typeCd != ''"> |
| | | and t.type_cd= #{typeCd} |
| | | </if> |
| | | <if test="num !=null and num != ''"> |
| | | and t.num= #{num} |
| | | </if> |
| | | <if test="paId !=null and paId != ''"> |
| | | and t.pa_id= #{paId} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | public static final String BUSINESS_TYPE_DELETE_ROOM_INFO = "530100050001"; |
| | | |
| | | /** |
| | | * 增加停车场 |
| | | */ |
| | | public static final String BUSINESS_TYPE_SAVE_PARKING_AREA = "541100030001"; |
| | | |
| | | /** |
| | | * 修改车位 |
| | | */ |
| | | public static final String BUSINESS_TYPE_UPDATE_PARKING_AREA = "541100040001"; |
| | | |
| | | |
| | | /** |
| | | * 删除车位 |
| | | */ |
| | | public static final String BUSINESS_TYPE_DELETE_PARKING_AREA = "541100050001"; |
| | | |
| | | /** |
| | | * 增加车位 |
| | | */ |
| | | public static final String BUSINESS_TYPE_SAVE_PARKING_SPACE = "540100030001"; |
| New file |
| | |
| | | package com.java110.utils.constant; |
| | | |
| | | /** |
| | | * 停车场常量类 |
| | | * Created by wuxw on 2017/5/20. |
| | | */ |
| | | public class ServiceCodeParkingAreaConstant { |
| | | |
| | | /** |
| | | * 添加 停车场 |
| | | */ |
| | | public static final String ADD_PARKINGAREA = "parkingArea.saveParkingArea"; |
| | | |
| | | |
| | | /** |
| | | * 修改 停车场 |
| | | */ |
| | | public static final String UPDATE_PARKINGAREA = "parkingArea.updateParkingArea"; |
| | | /** |
| | | * 删除 停车场 |
| | | */ |
| | | public static final String DELETE_PARKINGAREA = "parkingArea.deleteParkingArea"; |
| | | |
| | | |
| | | /** |
| | | * 查询 停车场 |
| | | */ |
| | | public static final String LIST_PARKINGAREAS = "parkingArea.listParkingAreas"; |
| | | |
| | | |
| | | } |