7 files modified
1 files added
| | |
| | | import org.springblade.jfpt.deploy.service.IDeployService; |
| | | import org.springblade.jfpt.equipment.entity.Equipment; |
| | | import org.springblade.jfpt.equipment.feign.DeptFeignApi; |
| | | import org.springblade.jfpt.equipment.feign.RegionFeignApi; |
| | | import org.springblade.jfpt.equipment.service.IEquipmentService; |
| | | import org.springblade.jfpt.equipment.vo.EquipmentVO; |
| | | import org.springblade.jfpt.equipment.vo.EquipmentVOS; |
| | | import org.springblade.jfpt.equipment.wrapper.EqWrapper; |
| | | import org.springblade.system.entity.Region; |
| | | import org.springblade.system.user.entity.User; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | |
| | | private final org.springblade.jfpt.catalog.service.catalogService catalogService; |
| | | |
| | | private final DeptFeignApi deptFeignApi; |
| | | |
| | | private final RegionFeignApi regionFeignApi; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | if (equipment.getHeartbeat() != null && equipment.getHeartbeat().equals("")) { |
| | | equipment.setHeartbeat(null); |
| | | } |
| | | //判断省市区的值是否为数字或者中文字符串 |
| | | if(null!=equipment.getProvince()){ |
| | | //如果不是数字,则需调用接口匹配数据(直接取区、县参数) |
| | | if (!equipment.getDistrict().matches("^[0-9]*$") && !equipment.getCity().matches("^[0-9]*$")){ |
| | | Region region = regionFeignApi.selRegionDetail(equipment.getDistrict(),equipment.getCity()); |
| | | if (null!=region){ |
| | | //封装数据 |
| | | equipment.setProvince(region.getProvinceCode()); |
| | | equipment.setCity(region.getCityCode()); |
| | | equipment.setDistrict(region.getDistrictCode()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // String deviceName = equipment.getDeviceName(); |
| | | // String deviceNumber = equipment.getDeviceNumber(); |
| New file |
| | |
| | | package org.springblade.jfpt.equipment.feign; |
| | | |
| | | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.system.entity.Region; |
| | | import org.springblade.system.vo.RegionVO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | @FeignClient(value = "blade-system") |
| | | public interface RegionFeignApi { |
| | | |
| | | /** |
| | | * 根据区县名称查询行政信息 |
| | | * @param districtName 区,县名称 |
| | | * @param cityName 市名称 |
| | | * @return |
| | | */ |
| | | @GetMapping("/region/selRegionDetail") |
| | | Region selRegionDetail(@RequestParam("districtName") String districtName, |
| | | @RequestParam("cityName") String cityName); |
| | | } |
| | |
| | | ExcelUtil.export(response, "行政区划模板", "行政区划表", list, RegionExcel.class); |
| | | } |
| | | |
| | | /** |
| | | * 根据区县名称查询行政信息 |
| | | * @param districtName 区,县名称 |
| | | * @param cityName 市名称 |
| | | * @return |
| | | */ |
| | | @GetMapping("/selRegionDetail") |
| | | public Region selRegionDetail(String districtName,String cityName){ |
| | | return regionService.selRegionDetail(districtName,cityName); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | List<RegionExcel> exportRegion(@Param("ew") Wrapper<Region> queryWrapper); |
| | | |
| | | /** |
| | | * 根据区县名称查询行政信息 |
| | | * @param districtName 区,县名称 |
| | | * @param cityName 市名称 |
| | | * @return |
| | | */ |
| | | Region selRegionDetail(@Param("districtName")String districtName,@Param("cityName") String cityName); |
| | | } |
| | |
| | | SELECT * FROM blade_region ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | <!--根据区县名称查询行政信息--> |
| | | <select id="selRegionDetail" resultType="org.springblade.system.entity.Region"> |
| | | SELECT * FROM blade_region where district_name = #{districtName} and city_name = #{cityName} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | */ |
| | | List<RegionExcel> exportRegion(Wrapper<Region> queryWrapper); |
| | | |
| | | /** |
| | | * 根据区县名称查询行政信息 |
| | | * @param districtName 区,县名称 |
| | | * @param cityName 市名称 |
| | | * @return |
| | | */ |
| | | Region selRegionDetail(String districtName,String cityName); |
| | | } |
| | |
| | | public List<RegionExcel> exportRegion(Wrapper<Region> queryWrapper) { |
| | | return baseMapper.exportRegion(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | | * 根据区县名称查询行政信息 |
| | | * @param districtName 区,县名称 |
| | | * @param cityName 市名称 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Region selRegionDetail(String districtName,String cityName) { |
| | | return baseMapper.selRegionDetail(districtName,cityName); |
| | | } |
| | | } |
| | |
| | | <result column="work_status" property="work_status"/> |
| | | <result column="jd" property="jd"/> |
| | | <result column="wd" property="wd"/> |
| | | <result column="dept_name" property="deptName"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectUserPage" resultMap="userResultMap"> |
| | |
| | | </select> |
| | | |
| | | <!--查询处警人员列表--> |
| | | <select id="selectSecurityUserPageList" resultType="org.springblade.system.user.vo.UsersVo"> |
| | | SELECT bu.id,bu.name,bu.code,bu.real_name realName,bu.account, |
| | | bu.email,bu.phone,bu.birthday,bu.create_time createTime, |
| | | <select id="selectSecurityUserPageList" resultMap="userResultMaps"> |
| | | SELECT bu.id,bu.name,bu.code,bu.real_name,bu.account, |
| | | bu.email,bu.phone,bu.birthday,bu.create_time, |
| | | bu.sex,ifnull(bu.online_status,0) online_status, |
| | | bd.dept_name deptName,p.jd,p.wd FROM blade_user bu |
| | | bd.dept_name,p.jd,p.wd FROM blade_user bu |
| | | LEFT JOIN |
| | | jfpt.sys_position p |
| | | on |