Commit 98ac3988 authored by tangwei's avatar tangwei

迁移数据字典

parent e5ff4e0e
package com.yeejoin.amos.boot.biz.common.dao.mapper;
import org.apache.ibatis.annotations.Mapper;
/**
* MyBatis BaseMapper
* @author DELL
*/
@Mapper
public interface BaseMapper {
}
//package com.yeejoin.amos.boot.biz.common.dao.mapper;
//
//import org.apache.ibatis.annotations.Mapper;
//
///**
// * MyBatis BaseMapper
// * @author DELL
// */
//@Mapper
//public interface BaseMapper {
//}
package com.yeejoin.amos.boot.biz.common.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
/**
* 数据字典 Mapper 接口
*
* @author tb
* @date 2021-06-07
*/
public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
}
package com.yeejoin.amos.boot.biz.common.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 数据字典
*
* @author tb
* @date 2021-06-07
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="DataDictionaryDto", description="数据字典")
public class DataDictionaryDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "code")
private String code;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "类型")
private String type;
@ApiModelProperty(value = "父级")
private Long parent;
@ApiModelProperty(value = "操作人名称")
private String recUserName;
}
package com.yeejoin.amos.boot.biz.common.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 数据字典
*
* @author tb
* @date 2021-06-07
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cb_data_dictionary")
@ApiModel(value="DataDictionary对象", description="数据字典")
public class DataDictionary extends BaseEntity {
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "code")
private String code;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "类型")
private String type;
@ApiModelProperty(value = "父级")
private Long parent;
//新加排序字段
@ApiModelProperty(value = "排序字段")
private int sortNum;
}
package com.yeejoin.amos.boot.biz.common.service;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import java.util.List;
/**
* 数据字典 服务类
*
* @author tb
* @date 2021-06-07
*/
public interface IDataDictionaryService {
Object getFireChemical(String type) throws Exception;
Object gwmcDataDictionary(String type) throws Exception;
List<MenuFrom> getGWMCDataDictionary(String type) throws Exception;
}
package com.yeejoin.amos.boot.biz.common.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
import com.yeejoin.amos.boot.biz.common.dto.DataDictionaryDto;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService;
import com.yeejoin.amos.boot.biz.common.utils.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import java.util.Collection;
import java.util.List;
/**
* 数据字典 服务实现类
*
* @author tb
* @date 2021-06-07
*/
@Service
public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, DataDictionary, DataDictionaryMapper> implements IDataDictionaryService {
@Autowired
RedisUtils redisUtils;
@Value("${redis.cache.failure.time}")
private long time;
@Override
public Object getFireChemical(String type) throws Exception {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", type);
queryWrapper.orderByAsc("sort_num");
if (redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE + type)) {
Object obj = redisUtils.get(RedisKey.DATA_DICTIONARY_CODE + type);
return obj;
} else {
Collection<DataDictionary> list = this.list(queryWrapper);
List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0,
"getName", "getParent", null);
MenuFrom Me = new MenuFrom("-1", "-1", "-1", "危化品库", "危化品库", "危化品库", "-1", null);
Me.setIsLeaf(false);
Me.setChildren(menus);
redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(Me), time);
return Me;
}
}
@Override
public Object gwmcDataDictionary(String type) throws Exception {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", type);
queryWrapper.orderByAsc("sort_num");
if (redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE + type)) {
Object obj = redisUtils.get(RedisKey.DATA_DICTIONARY_CODE + type);
return obj;
} else {
Collection<DataDictionary> list = this.list(queryWrapper);
List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
, "getParent", null);
redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(menus), time);
return menus;
}
}
public List<MenuFrom> getGWMCDataDictionary(String type) throws Exception {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", type);
queryWrapper.orderByAsc("sort_num");
Collection<DataDictionary> list = this.list(queryWrapper);
List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
, "getParent", null);
return menus;
}
}
package com.yeejoin.amos.boot.module.common.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 数据字典
*
* @author tb
* @date 2021-06-07
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="DataDictionaryDto", description="数据字典")
public class DataDictionaryDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "code")
private String code;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "类型")
private String type;
@ApiModelProperty(value = "父级")
private Long parent;
@ApiModelProperty(value = "操作人名称")
private String recUserName;
}
//package com.yeejoin.amos.boot.module.common.api.dto;
//
//import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
///**
//* 数据字典
//*
//* @author tb
//* @date 2021-06-07
//*/
//@Data
//@EqualsAndHashCode(callSuper = true)
//@ApiModel(value="DataDictionaryDto", description="数据字典")
//public class DataDictionaryDto extends BaseDto {
// private static final long serialVersionUID = 1L;
//
//
// @ApiModelProperty(value = "code")
// private String code;
//
// @ApiModelProperty(value = "名称")
// private String name;
//
// @ApiModelProperty(value = "类型")
// private String type;
//
// @ApiModelProperty(value = "父级")
// private Long parent;
//
// @ApiModelProperty(value = "操作人名称")
// private String recUserName;
//
//}
package com.yeejoin.amos.boot.module.common.api.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 数据字典
*
* @author tb
* @date 2021-06-07
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cb_data_dictionary")
@ApiModel(value="DataDictionary对象", description="数据字典")
public class DataDictionary extends BaseEntity {
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "code")
private String code;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "类型")
private String type;
@ApiModelProperty(value = "父级")
private Long parent;
//新加排序字段
@ApiModelProperty(value = "排序字段")
private int sortNum;
}
//package com.yeejoin.amos.boot.module.common.api.entity;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.experimental.Accessors;
///**
//* 数据字典
//*
//* @author tb
//* @date 2021-06-07
//*/
//@Data
//@EqualsAndHashCode(callSuper = true)
//@Accessors(chain = true)
//@TableName("cb_data_dictionary")
//@ApiModel(value="DataDictionary对象", description="数据字典")
//public class DataDictionary extends BaseEntity {
// /**
// *
// */
// private static final long serialVersionUID = 1L;
//
// @ApiModelProperty(value = "code")
// private String code;
//
// @ApiModelProperty(value = "名称")
// private String name;
//
// @ApiModelProperty(value = "类型")
// private String type;
//
// @ApiModelProperty(value = "父级")
// private Long parent;
//
// //新加排序字段
// @ApiModelProperty(value = "排序字段")
// private int sortNum;
//
//}
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.api.feign;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.component.feign.config.InnerInvokException;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
......@@ -17,7 +18,7 @@ import java.util.Map;
*
* @author Dell
*/
@FeignClient(name = "AMOS-EQUIPMANAGE", path = "equip", configuration = {MultipartSupportConfig.class})
@FeignClient(name = "AMOS-EQUIPMANAGE-122", path = "equip", configuration = {MultipartSupportConfig.class})
public interface EquipFeignClient {
/**
......@@ -114,4 +115,11 @@ public interface EquipFeignClient {
**/
@RequestMapping(value = "/car/getTeamCarList", method = RequestMethod.GET)
ResponseModel<List<Map<String, Object>>> getTeamCarList(@RequestParam Double longitude, @RequestParam Double latitude);
/**
* 车辆信息详情
**/
@RequestMapping(value = "/car/getCarDetailById/{id}", method = RequestMethod.GET)
ResponseModel<Map<String, Object>> getCarDetailById(@PathVariable Long id);
}
package com.yeejoin.amos.boot.module.common.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
/**
* 数据字典 Mapper 接口
*
* @author tb
* @date 2021-06-07
*/
public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
}
//package com.yeejoin.amos.boot.module.common.api.mapper;
//
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
//
///**
//* 数据字典 Mapper 接口
//*
//* @author tb
//* @date 2021-06-07
//*/
//public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
//
//}
package com.yeejoin.amos.boot.module.common.api.service;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import java.util.List;
/**
* 数据字典 服务类
*
* @author tb
* @date 2021-06-07
*/
public interface IDataDictionaryService {
Object getFireChemical(String type) throws Exception;
Object gwmcDataDictionary(String type) throws Exception;
List<MenuFrom> getGWMCDataDictionary(String type) throws Exception;
}
//package com.yeejoin.amos.boot.module.common.api.service;
//
//import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
//
//import java.util.List;
//
///**
// * 数据字典 服务类
// *
// * @author tb
// * @date 2021-06-07
// */
//public interface IDataDictionaryService {
//
//
// Object getFireChemical(String type) throws Exception;
//
// Object gwmcDataDictionary(String type) throws Exception;
//
// List<MenuFrom> getGWMCDataDictionary(String type) throws Exception;
//}
package com.yeejoin.amos.boot.module.jcs.api.dto;
import lombok.Data;
@Data
public class AircraftListTreeDto {
private String id;
private String name;
}
package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
......@@ -10,5 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2021-06-29
*/
public interface AircraftMapper extends BaseMapper<Aircraft> {
List<AircraftListTreeDto> getAircraft();
}
package com.yeejoin.amos.boot.module.jcs.api.service;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft;
/**
......@@ -13,4 +17,7 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft;
public interface IAircraftService {
AircraftDto queryByAircraftSeq(String agencyCode, Long seq);
Aircraft queryByaircraftModel(String seq);
List<AircraftListTreeDto> getAircraft();
}
<?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="com.yeejoin.amos.boot.module.jcs.api.mapper.AircraftMapper">
<select id="getAircraft" resultType="com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto">
select jc_aircraft.aircraft_model id,jc_aircraft.aircraft_model name
from jc_aircraft where is_delete=0
</select>
</mapper>
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService;
import com.yeejoin.amos.boot.biz.common.utils.WordConverterUtils;
import com.yeejoin.amos.boot.module.command.api.dao.SeismometeorologyDtoDao;
import com.yeejoin.amos.boot.module.command.api.dto.SeismometeorologyDto;
......@@ -785,11 +786,18 @@ public class CommandController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "车辆资源", notes = "车辆资源")
public ResponseModel<List<Map<String,Object>>> getTeamCarList(RequestData par) {
List<Map<String,Object>> list= equipFeignClient.getTeamCarList(par.getLongitude(),par.getLatitude()).getResult();
ResponseModel<List<Map<String, Object>>> date= equipFeignClient.getTeamCarList(par.getLongitude(),par.getLatitude());
return ResponseHelper.buildResponse(list);
return ResponseHelper.buildResponse(date!=null?date.getResult():null);
}
@TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/fireCar")
@ApiOperation(httpMethod = "GET", value = "车辆资源详情", notes = "车辆资源详情")
public ResponseModel<Map<String,Object>> getCarDetailById(Long id ) {
ResponseModel<Map<String, Object>> date= equipFeignClient.getCarDetailById(id);
return ResponseHelper.buildResponse(date!=null?date.getResult():null);
}
......
......@@ -4,31 +4,23 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.dto.ExcelDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireChemicalDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.api.entity.FireExperts;
import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FireExpertsServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.utils.BeanDtoVoUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import java.util.stream.Collectors;
......
package com.yeejoin.amos.boot.module.common.biz.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.utils.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.yeejoin.amos.boot.module.common.api.dto.DataDictionaryDto;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.api.mapper.DataDictionaryMapper;
import com.yeejoin.amos.boot.module.common.api.service.IDataDictionaryService;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import java.util.Collection;
import java.util.List;
/**
* 数据字典 服务实现类
*
* @author tb
* @date 2021-06-07
*/
@Service
public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, DataDictionary, DataDictionaryMapper> implements IDataDictionaryService {
@Autowired
RedisUtils redisUtils;
@Value("${redis.cache.failure.time}")
private long time;
@Override
public Object getFireChemical(String type) throws Exception {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", type);
queryWrapper.orderByAsc("sort_num");
if (redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE + type)) {
Object obj = redisUtils.get(RedisKey.DATA_DICTIONARY_CODE + type);
return obj;
} else {
Collection<DataDictionary> list = this.list(queryWrapper);
List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0,
"getName", "getParent", null);
MenuFrom Me = new MenuFrom("-1", "-1", "-1", "危化品库", "危化品库", "危化品库", "-1", null);
Me.setIsLeaf(false);
Me.setChildren(menus);
redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(Me), time);
return Me;
}
}
@Override
public Object gwmcDataDictionary(String type) throws Exception {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", type);
queryWrapper.orderByAsc("sort_num");
if (redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE + type)) {
Object obj = redisUtils.get(RedisKey.DATA_DICTIONARY_CODE + type);
return obj;
} else {
Collection<DataDictionary> list = this.list(queryWrapper);
List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
, "getParent", null);
redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(menus), time);
return menus;
}
}
public List<MenuFrom> getGWMCDataDictionary(String type) throws Exception {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", type);
queryWrapper.orderByAsc("sort_num");
Collection<DataDictionary> list = this.list(queryWrapper);
List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
, "getParent", null);
return menus;
}
}
//package com.yeejoin.amos.boot.module.common.biz.service.impl;
//
//
//import com.alibaba.fastjson.JSON;
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.yeejoin.amos.boot.biz.common.utils.*;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Service;
//import org.typroject.tyboot.core.rdbms.service.BaseService;
//
//import com.yeejoin.amos.boot.module.common.api.dto.DataDictionaryDto;
//import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
//import com.yeejoin.amos.boot.module.common.api.mapper.DataDictionaryMapper;
//import com.yeejoin.amos.boot.module.common.api.service.IDataDictionaryService;
//import org.typroject.tyboot.core.restful.utils.ResponseHelper;
//
//import java.util.Collection;
//import java.util.List;
//
///**
// * 数据字典 服务实现类
// *
// * @author tb
// * @date 2021-06-07
// */
//@Service
//public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, DataDictionary, DataDictionaryMapper> implements IDataDictionaryService {
// @Autowired
// RedisUtils redisUtils;
//
// @Value("${redis.cache.failure.time}")
// private long time;
//
//
// @Override
// public Object getFireChemical(String type) throws Exception {
// QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("type", type);
// queryWrapper.orderByAsc("sort_num");
//
// if (redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE + type)) {
// Object obj = redisUtils.get(RedisKey.DATA_DICTIONARY_CODE + type);
// return obj;
// } else {
// Collection<DataDictionary> list = this.list(queryWrapper);
// List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0,
// "getName", "getParent", null);
// MenuFrom Me = new MenuFrom("-1", "-1", "-1", "危化品库", "危化品库", "危化品库", "-1", null);
// Me.setIsLeaf(false);
// Me.setChildren(menus);
// redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(Me), time);
// return Me;
// }
// }
//
// @Override
// public Object gwmcDataDictionary(String type) throws Exception {
// QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("type", type);
// queryWrapper.orderByAsc("sort_num");
//
// if (redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE + type)) {
// Object obj = redisUtils.get(RedisKey.DATA_DICTIONARY_CODE + type);
// return obj;
// } else {
// Collection<DataDictionary> list = this.list(queryWrapper);
// List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
// , "getParent", null);
// redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(menus), time);
// return menus;
// }
// }
//
// public List<MenuFrom> getGWMCDataDictionary(String type) throws Exception {
// QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("type", type);
// queryWrapper.orderByAsc("sort_num");
//
// Collection<DataDictionary> list = this.list(queryWrapper);
// List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
// , "getParent", null);
// return menus;
//
// }
//}
......@@ -19,12 +19,13 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormColumnDto;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInitDto;
import com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto;
import com.yeejoin.amos.boot.module.common.api.dto.SelectItem;
import com.yeejoin.amos.boot.module.common.api.dto.SelectItems;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import com.yeejoin.amos.boot.module.common.api.mapper.DynamicFormColumnMapper;
import com.yeejoin.amos.boot.module.common.api.service.IDynamicFormColumnService;
......
......@@ -15,10 +15,11 @@ import org.typroject.tyboot.core.rdbms.annotation.Operator;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.api.entity.Firefighters;
import com.yeejoin.amos.boot.module.common.api.mapper.FirefightersMapper;
import com.yeejoin.amos.boot.module.common.api.service.IFirefightersService;
......
package com.yeejoin.amos.boot.module.common.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import com.yeejoin.amos.boot.module.common.api.entity.RescueEquipment;
import com.yeejoin.amos.boot.module.common.api.entity.SpecialPositionStaff;
......
package com.yeejoin.amos.boot.module.common.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import com.yeejoin.amos.boot.module.common.api.entity.SpecialPositionStaff;
import com.yeejoin.amos.boot.module.common.api.mapper.SpecialPositionStaffMapper;
......
......@@ -5,12 +5,15 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.ExcelDto;
import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AircraftServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataSourcesImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections.map.HashedMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......@@ -25,7 +28,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
......@@ -129,4 +134,61 @@ public class AircraftController extends BaseController {
return ResponseHelper.buildResponse(aircraftServiceImpl.queryForAircraftPage(page, false, aircraftModel,
engineTypeCode, fuelTypeCode));
}
/**
*
*
* @param 获取航空器型号列表
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getAircraft")
@ApiOperation(httpMethod = "GET", value = "获取航空器型号列表", notes = "获取航空器型号列表")
public ResponseModel<List<AircraftListTreeDto>> getAircraft() {
return ResponseHelper.buildResponse(aircraftServiceImpl.getAircraft());
}
/**
*
* 获取24小时内的航班号
*
* **/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getAircraftNum")
@ApiOperation(httpMethod = "GET", value = "获取24小时内的航班号", notes = "获取24小时内的航班号")
public ResponseModel<List<Map<String, Object>>> getAircraftNum() {
List<Map<String, Object>> list= new ArrayList<>();
Map<String, Object> map=new HashedMap();
Map<String, Object> map1=new HashedMap();
map.put("id", "1");map.put("name", "测试");
map1.put("id", "12");map1.put("name", "测试2");
list.add(map1);
list.add(map);
return ResponseHelper.buildResponse(list);
}
/**
*
* 通过航班号,查询最新的航班信息
*
* **/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getAircraftDetails/{num}")
@ApiOperation(httpMethod = "GET", value = "通过航班号,查询最新的航班信息", notes = "通过航班号,查询最新的航班信息")
public ResponseModel<Map<String, Object>> getAircraftDetails(@PathVariable String num) {
Map<String, Object> map1=new HashedMap();
map1.put("aircraftModel", "型号1");
map1.put("landingTime", new Date());
map1.put("fuelQuantity", "12");
map1.put("passengerCapacity", "测试2");
return ResponseHelper.buildResponse(map1);
}
}
......@@ -19,8 +19,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedSMSDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.SchedulingReportingDto;
......
......@@ -6,6 +6,7 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.exception.BaseException;
......@@ -20,6 +21,7 @@ import org.typroject.tyboot.core.restful.exception.instance.DataNotFound;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel;
import com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
......@@ -40,6 +42,9 @@ import com.yeejoin.amos.feign.systemctl.model.FileInfoModel;
@Service
public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, AircraftMapper> implements IAircraftService {
@Autowired
AircraftMapper aircraftMapper;
/**
* <pre>
* 保存
......@@ -254,4 +259,10 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
Aircraft aircraft = this.getOne(queryWrapper);
return aircraft;
}
@Override
public List<AircraftListTreeDto> getAircraft() {
return aircraftMapper.getAircraft();
}
}
......@@ -12,8 +12,8 @@ import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormInitDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertListvalue;
......
......@@ -4,13 +4,13 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.EnumsUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo;
......
......@@ -26,18 +26,18 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamCardDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamListDto;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersZhDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.enums.ExcelSelectData;
import com.yeejoin.amos.boot.module.common.api.excel.DataSources;
import com.yeejoin.amos.boot.module.common.api.mapper.DataDictionaryMapper;
import com.yeejoin.amos.boot.module.common.api.service.IKeySiteService;
import com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceImpl;
......
......@@ -39,7 +39,8 @@ import java.net.UnknownHostException;
"org.typroject.tyboot.face.*.orm.dao*",
"org.typroject.tyboot.core.auth.face.orm.dao*",
"org.typroject.tyboot.component.*.face.orm.dao*",
"com.yeejoin.amos.boot.module.*.api.mapper"})
"com.yeejoin.amos.boot.module.*.api.mapper",
"com.yeejoin.amos.boot.biz.common.dao.mapper" })
@ComponentScan(basePackages = { "org.typroject", "com.yeejoin.amos" })
public class AmosJcsApplication
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment