| New file |
| | |
| | | package com.java110.api.listener.dict; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiDataFlowListener; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.smo.dict.DictInnerServiceSMO; |
| | | import com.java110.dto.Dict.DictDto; |
| | | import com.java110.dto.Dict.DictQueryDto; |
| | | import com.java110.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <br> |
| | | * Created by 离歌笑 on 10/22/2019 |
| | | * <p> |
| | | */ |
| | | @Java110Listener("queryDictListener") |
| | | public class QueryDictListener extends AbstractServiceApiDataFlowListener { |
| | | |
| | | @Autowired |
| | | private DictInnerServiceSMO dictInnerServiceSMO; |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeConstant.SERVICE_CODE_DICT_TYPE; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.GET; |
| | | } |
| | | |
| | | @Override |
| | | public void soService(ServiceDataFlowEvent event) { |
| | | DataFlowContext dataFlowContext = event.getDataFlowContext(); |
| | | //获取查询参数 |
| | | JSONObject reqJson = event.getDataFlowContext().getReqJson(); |
| | | List<DictDto> dictDtos = this.dictInnerServiceSMO.queryDict(BeanConvertUtil.covertBean(reqJson,DictQueryDto.class)); |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(dictDtos), HttpStatus.OK); |
| | | dataFlowContext.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 0; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.community.dao; |
| | | |
| | | import com.java110.dto.Dict.DictDto; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <br> |
| | | * Created by hu ping on 10/22/2019 |
| | | * <p> |
| | | */ |
| | | public interface IDictDao { |
| | | |
| | | List<DictDto> queryDict(Map param); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.dao.impl; |
| | | |
| | | import com.java110.community.dao.IDictDao; |
| | | import com.java110.dto.Dict.DictDto; |
| | | import org.mybatis.spring.SqlSessionTemplate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <br> |
| | | * Created by hu ping on 10/22/2019 |
| | | * <p> |
| | | */ |
| | | @Repository |
| | | public class DictDaoImpl implements IDictDao { |
| | | |
| | | @Autowired |
| | | private SqlSessionTemplate sqlSessionTemplate; |
| | | |
| | | @Override |
| | | public List<DictDto> queryDict(Map param) { |
| | | List<DictDto> dicts = this.sqlSessionTemplate.selectList("dictDaoImpl.queryDict", param); |
| | | return dicts; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.community.smo.impl; |
| | | |
| | | import com.java110.community.dao.IDictDao; |
| | | import com.java110.core.smo.dict.DictInnerServiceSMO; |
| | | import com.java110.dto.Dict.DictDto; |
| | | import com.java110.dto.Dict.DictQueryDto; |
| | | 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.List; |
| | | |
| | | /** |
| | | * <br> |
| | | * Created by hu ping on 10/22/2019 |
| | | * <p> |
| | | */ |
| | | @RestController |
| | | public class DictInnerServiceSMOImpl implements DictInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IDictDao iDictDao; |
| | | |
| | | @Override |
| | | public List<DictDto> queryDict(@RequestBody DictQueryDto queryDto) { |
| | | return this.iDictDao.queryDict(BeanConvertUtil.beanCovertMap(queryDto)); |
| | | } |
| | | } |
| | |
| | | java110.mappingPath=classpath:mapper/community/**/*.xml,classpath:mapper/service/*.xml |
| | | java110.mappingPath=classpath:mapper/community/**/*.xml,classpath:mapper/service/*.xml,classpath:mapper/dict/*.xml |
| | | |
| | | |
| | |
| | | spring: |
| | | profiles: |
| | | active: test |
| | | active: dev |
| | |
| | | return carServiceSMOImpl.saveCar(pd); |
| | | } |
| | | |
| | | public ResponseEntity<String> listCarType(IPageData pd){ |
| | | return this.carServiceSMOImpl.listCarType(pd); |
| | | } |
| | | |
| | | |
| | | public ICarServiceSMO getCarServiceSMOImpl() { |
| | | return carServiceSMOImpl; |
| | |
| | | * @return 返回 ResponseEntity对象包含 http状态 信息 body信息 |
| | | */ |
| | | ResponseEntity<String> deleteCar(IPageData pd); |
| | | |
| | | /** |
| | | * 获取车辆类型 |
| | | * @param pd 页面请求数据封装 |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> listCarType(IPageData pd); |
| | | } |
| | |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> listCarType(IPageData pd) { |
| | | //获取请求参数 |
| | | JSONObject reqParam = JSONObject.parseObject(pd.getReqData()); |
| | | //拉取数据 |
| | | String url=ServiceConstant.SERVICE_API_URL.concat("/api/dict.type").concat(mapToUrlParam(reqParam)); |
| | | ResponseEntity<String> responseEntity = this.callCenterService(restTemplate, pd, "",url , HttpMethod.GET); |
| | | return responseEntity; |
| | | } |
| | | |
| | | /** |
| | | * 删除小区楼 校验 |
| | | * |
| | |
| | | <div class="col-sm-10"> |
| | | <select class="custom-select" v-model="addCarInfo.carType"> |
| | | <option selected disabled value="">必填,请选择类型</option> |
| | | <option value="9901">家用小汽车</option> |
| | | <option value="9902">客车</option> |
| | | <option value="9903">货车</option> |
| | | <option v-for="carType in carTypes" :key="carType.statusCd" v-bind:value="carType.name">{{carType.name}}</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | carType:'', |
| | | carColor:'', |
| | | carRemark:"" |
| | | } |
| | | }, |
| | | carTypes:[ |
| | | { |
| | | key:'9901', |
| | | value:'家用小汽车' |
| | | }, |
| | | { |
| | | key:'9902', |
| | | value:'客车' |
| | | }, |
| | | { |
| | | key:'9903', |
| | | value:'货车' |
| | | } |
| | | ] |
| | | }, |
| | | watch:{ |
| | | addCarInfo:{ |
| | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | var param={ |
| | | params: { |
| | | name: 'owner_car', |
| | | type: 'car_type' |
| | | } |
| | | } |
| | | //发送get请求 |
| | | vc.http.get('hireParkingSpace', |
| | | 'listCarType', |
| | | param, |
| | | function (json, res) { |
| | | var carTypes = JSON.parse(json); |
| | | |
| | | vc.component.carTypes = carTypes; |
| | | }, function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | }, |
| | | _initEvent:function(){ |
| | | vc.on('addCar', 'onIndex', function(_index){ |
| | |
| | | <div class="row"> |
| | | <div class="col-lg-8"> |
| | | <div class="form-group"> |
| | | <label>公司名称 *</label> |
| | | <label>公司名称</label> <span class="required">*</span> |
| | | <input id="name" v-model="companyBaseInfo.name" type="text" class="form-control required" aria-required="true" /> |
| | | </div> |
| | | <div class="dropdown"> |
| | | <label>公司地址 *</label> |
| | | <div class="dropdown form-group"> |
| | | <label>公司地址</label> <span class="required">*</span> |
| | | |
| | | <select id="pro" class="btn btn-secondary dropdown-toggle" > |
| | | <option value="">请选择省</option> |
| | |
| | | <input name="address" v-model="companyBaseInfo.address" type="text" class="form-control required" aria-required="true" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label>联系电话 *</label> |
| | | <input name="tel" v-model="companyBaseInfo.tel" type="number" class="form-control required" aria-required="true" /> |
| | | <label>联系电话</label> <span class="required">*</span> |
| | | <input name="tel" v-model="companyBaseInfo.tel" type="text" class="form-control required" aria-required="true" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label>公司业务 *</label> |
| | | <label>公司业务</label> <span class="required">*</span> |
| | | <select name="storeTypeCd" v-model="companyBaseInfo.storeTypeCd" class="form-control required" aria-required="true"> |
| | | <option v-for="storeType in storeTypes" v-bind:value="storeType.storeTypeCd">{{storeType.name}}</option> |
| | | </select> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label>附近建筑 *</label> |
| | | <label>附近建筑</label> <span class="required">*</span> |
| | | <input name="nearbyLandmarks" v-model="companyBaseInfo.nearbyLandmarks" type="text" class="form-control required" aria-required="true" /> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="row"> |
| | | <div class="col-lg-8"> |
| | | <div class="form-group"> |
| | | <label>证件号码 *</label> |
| | | <label>证件号码</label> <span class="required">*</span> |
| | | <input v-model="companyCerdentialsInfo.value" type="text" class="form-control required" aria-required="true" /> |
| | | </div> |
| | | </div> |
| | | <div class="col-lg-8"> |
| | | <div class="form-group"> |
| | | <label>有效期*</label> |
| | | <label>有效期</label> <span class="required">*</span> |
| | | <input v-model="companyCerdentialsInfo.validityPeriod" size="16" type="text" placeholder="请选择时间(yyyy-mm-dd)" readonly class="form-control form-control-sm company_time"> |
| | | |
| | | </div> |
| | |
| | | <div class="row"> |
| | | <div class="col-lg-8"> |
| | | <div class="form-group"> |
| | | <label>公司法人 *</label> |
| | | <label>公司法人 </label> <span class="required">*</span> |
| | | <input v-model="companyExtendInfo.corporation" type="text" class="form-control required" aria-required="true" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label>注册资本(万元) *</label> |
| | | <label>注册资本(万元) </label> <span class="required">*</span> |
| | | <input v-model="companyExtendInfo.registeredCapital" type="text" class="form-control required" aria-required="true" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label>成立日期*</label> |
| | | <label>成立日期</label> <span class="required">*</span> |
| | | <input v-model="companyExtendInfo.foundingTime" size="16" type="text" placeholder="请选择时间(yyyy-mm-dd) " readonly class="form-control form-control-sm extend_time"> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label>登记机关 *</label> |
| | | <label>登记机关 </label> <span class="required">*</span> |
| | | <input v-model="companyExtendInfo.registrationAuthority" type="text" placeholder="填写营业执照上的登记机关" class="form-control required" aria-required="true" /> |
| | | |
| | | </div> |
| | | <div class="form-group"> |
| | | <label>经营范围 *</label> |
| | | <label>经营范围 </label> <span class="required">*</span> |
| | | <textarea v-model="companyExtendInfo.scope" rows="20" cols="180" class="form-control required" aria-required="true" /> |
| | | </div> |
| | | </div> |
| | |
| | | width:80%; |
| | | margin: 20px auto 50px auto; |
| | | } |
| | | |
| | | .form-group span.required { |
| | | color: #f00; |
| | | font-size: 100%; |
| | | } |
| New file |
| | |
| | | package com.java110.dto.Dict; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <br> |
| | | * Created by hu ping on 10/22/2019 |
| | | * <p> |
| | | */ |
| | | public class DictDto implements Serializable { |
| | | |
| | | private String statusCd; |
| | | private String name; |
| | | private String description; |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getDescription() { |
| | | return description; |
| | | } |
| | | |
| | | public void setDescription(String description) { |
| | | this.description = description; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.dto.Dict; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <br> |
| | | * Created by hu ping on 10/22/2019 |
| | | * <p> |
| | | */ |
| | | public class DictQueryDto implements Serializable { |
| | | |
| | | private String name; |
| | | private String type; |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.core.smo.dict; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.Dict.DictDto; |
| | | import com.java110.dto.Dict.DictQueryDto; |
| | | 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; |
| | | |
| | | /** |
| | | * <br> |
| | | * Created by hu ping on 10/22/2019 |
| | | * <p> |
| | | */ |
| | | @FeignClient(name = "community-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/dictApi") |
| | | public interface DictInnerServiceSMO { |
| | | |
| | | @RequestMapping(value = "/queryDict",method = RequestMethod.POST) |
| | | List<DictDto> queryDict(@RequestBody DictQueryDto queryDto); |
| | | |
| | | } |
| 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="dictDaoImpl"> |
| | | <select id="queryDict" resultType="com.java110.dto.Dict.DictDto" parameterType="Map"> |
| | | SELECT * FROM t_dict WHERE table_name=#{name} AND table_columns=#{type} |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | public static final String SERVICE_CODE_LIST_NOTICES = "notice.listNotices"; |
| | | |
| | | /** |
| | | * 查询数据字典 |
| | | */ |
| | | public static final String SERVICE_CODE_DICT_TYPE="dict.type"; |
| | | |
| | | } |