@@ -24,6 +24,10 @@ public class CommonConfig { | |||
* 高德KEY | |||
*/ | |||
public static String gaodeKey; | |||
/** | |||
* 图片域名 | |||
*/ | |||
public static String imageURL; | |||
/** | |||
* 机场url | |||
@@ -52,4 +56,14 @@ public class CommonConfig { | |||
public void setGaodeKey(String key) { | |||
gaodeKey = key; | |||
} | |||
/** | |||
* 图片域名赋值 | |||
* | |||
* @param url 域名地址 | |||
*/ | |||
@Value("${tuoheng.image-url}") | |||
public void setImageUrl(String url) { | |||
imageURL = url; | |||
} | |||
} |
@@ -1,30 +0,0 @@ | |||
package com.tuoheng.constant; | |||
import lombok.Data; | |||
/** | |||
* 机场平台接口常量类 | |||
* | |||
* @Author xiaoying | |||
* @Date 2023/1/31 17:45 | |||
*/ | |||
public class AirportConstant { | |||
public static final String AIRPORT_CLIENT = "tuoheng-airport"; | |||
public static final String AIRPORT_NAME = "机场业务平台"; | |||
/** | |||
* 创建租户 | |||
*/ | |||
public static final String CREATE_TENANT = "/api/airportInterface/addTenant"; | |||
/** | |||
* 修改租户 | |||
*/ | |||
public static final String EDIT_TENANT = "/api/airportInterface/editTenant"; | |||
/** | |||
* 删除租户 | |||
*/ | |||
public static final String DELETE_TENANT = "/api/airportInterface/delTenant"; | |||
} |
@@ -0,0 +1,45 @@ | |||
package com.tuoheng.constant; | |||
/** | |||
* 字典表-平台相关常量 | |||
*/ | |||
public class DictConstant { | |||
/** | |||
* 添加-租户 | |||
*/ | |||
public static final String ADD_TENANT = "addTenant"; | |||
/** | |||
* 编辑-租户 | |||
*/ | |||
public static final String EDIT_TENANT = "editTenant"; | |||
/** | |||
* 删除-租户 | |||
*/ | |||
public static final String DELETE_TENANT = "deleteTenant"; | |||
/** | |||
* 查询角色 | |||
*/ | |||
public static final String GET_ROLE = "getRole"; | |||
/** | |||
* 查询菜单 | |||
*/ | |||
public static final String GET_MENU = "getMenu"; | |||
/** | |||
* 系统名 | |||
*/ | |||
public static final String GET_NAME = "getName"; | |||
/** | |||
* 平台标识 | |||
*/ | |||
public static final String CLIENT = "client"; | |||
/** | |||
* pc标识 | |||
*/ | |||
public static final String ADMIN = "admin"; | |||
/** | |||
* 小程序标识 | |||
*/ | |||
public static final String MP = "mp"; | |||
} |
@@ -1,46 +0,0 @@ | |||
package com.tuoheng.constant; | |||
/** | |||
* 高速平台接口常量类 | |||
* @Author xiaoying | |||
* @Date 2023/2/23 9:32 | |||
*/ | |||
public class FreeWayConstant { | |||
/** | |||
* pc端 | |||
*/ | |||
public static final String FREEWAY_CLIENT_ADMIN = "tuoheng-freeway-admin"; | |||
/** | |||
* web端 | |||
*/ | |||
public static final String FREEWAY_CLIENT_MP = "tuoheng-freeway-mp"; | |||
public static final String FREEWAY_CLIENT="tuoheng-freeway"; | |||
public static final String FREEWAY_NAME="高速业务平台"; | |||
/** | |||
* 创建租户 | |||
*/ | |||
public static final String CREATE_TENANT = "/oidc/callback/tenant/create"; | |||
/** | |||
* 更新租户 | |||
*/ | |||
public static final String UPDATE_TENANT = "/oidc/callback/tenant/edit"; | |||
/** | |||
* 逻辑删除租户 | |||
*/ | |||
public static final String DELETE_TENANT = "/oidc/callback/tenant/deleted"; | |||
/** | |||
* 查询可用角色 | |||
*/ | |||
public static final String FIND_ROLE = "/oidc/callback/getRoleList"; | |||
/** | |||
* 查询可用角色 | |||
*/ | |||
public static final String FIND_MENU = "/oidc/callback/getMenuList/{roleId}"; | |||
} |
@@ -1,47 +0,0 @@ | |||
package com.tuoheng.constant; | |||
/** | |||
* hhz平台接口常量类 | |||
* @Author xiaoying | |||
* @Date 2022/10/18 10:52 | |||
*/ | |||
public class HhzUrlConstant { | |||
public static final String HHZ_CLIENT="tuoheng-hhz"; | |||
/** | |||
* 河湖长-pc端 | |||
*/ | |||
public static final String HHZ_CLIENT_ADMIN = "tuoheng-hhz-admin"; | |||
public static final String HHZ_CLIENT_MP = "tuoheng-hhz-mp"; | |||
public static final String HHZ_NAME="河湖长业务平台"; | |||
/** | |||
* 创建租户 | |||
*/ | |||
public static final String CREATE_TENANT = "/oidcTenant/add"; | |||
/** | |||
* 编辑租户 | |||
*/ | |||
public static final String UPDATE_TENANT = "/oidcTenant/edit"; | |||
public static final String DELETE_TENANT = "/oidcTenant/delete"; | |||
/** | |||
* 查询可用角色 | |||
*/ | |||
public static final String FIND_ROLE = "/oidcTenant/getRoleList"; | |||
/** | |||
* 查询可用角色 | |||
*/ | |||
public static final String FIND_MENU = "/oidcTenant/getMenuList/{roleId}"; | |||
} |
@@ -1,38 +0,0 @@ | |||
package com.tuoheng.constant; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2023/3/1 11:10 | |||
*/ | |||
public class PilotConstant { | |||
public static final String PILOT_CLIENT="tuoheng-pilot"; | |||
/** | |||
* 河湖长-pc端 | |||
*/ | |||
public static final String PILOT_CLIENT_ADMIN = "tuoheng-pilot-admin"; | |||
public static final String PILOT_CLIENT_MP = "tuoheng-pilot-mp"; | |||
public static final String PILOT_NAME="飞手业务平台"; | |||
/** | |||
* 创建租户 | |||
*/ | |||
public static final String CREATE_TENANT = "/oidcTenant/add"; | |||
/** | |||
* 编辑租户 | |||
*/ | |||
public static final String UPDATE_TENANT = "/oidcTenant/edit"; | |||
public static final String DELETE_TENANT = "/oidcTenant/delete"; | |||
/** | |||
* 查询可用角色 | |||
*/ | |||
public static final String FIND_ROLE = "/oidcTenant/getRoleList"; | |||
/** | |||
* 查询可用角色 | |||
*/ | |||
public static final String FIND_MENU = "/oidcTenant/getMenuList/{roleId}"; | |||
} |
@@ -1,46 +0,0 @@ | |||
package com.tuoheng.constant; | |||
/** | |||
* 航道平台接口常量类 | |||
* | |||
* @Author xiaoying | |||
* @Date 2023/2/23 9:34 | |||
*/ | |||
public class WaterWayConstant { | |||
public static final String WATERWAY_CLIENT = "tuoheng-waterway"; | |||
/** | |||
* 航道pc端 | |||
*/ | |||
public static final String WATERWAY_CLIENT_ADMIN = "tuoheng-waterway-admin"; | |||
/** | |||
* 航道小程序端 | |||
*/ | |||
public static final String WATERWAY_CLIENT_MP = "tuoheng-waterway-mp"; | |||
public static final String WATERWAY_NAME = "航道业务平台"; | |||
/** | |||
* 创建租户 | |||
*/ | |||
public static final String CREATE_TENANT = "/oidc/callback/tenant/create"; | |||
/** | |||
* 更新租户 | |||
*/ | |||
public static final String UPDATE_TENANT = "/oidc/callback/tenant/edit"; | |||
/** | |||
* 逻辑删除租户 | |||
*/ | |||
public static final String DELETE_TENANT = "/oidc/callback/tenant/deleted"; | |||
/** | |||
* 查询可用角色 | |||
*/ | |||
public static final String FIND_ROLE = "/oidc/callback/getRoleList"; | |||
/** | |||
* 查询可用角色 | |||
*/ | |||
public static final String FIND_MENU = "/oidc/callback/getMenuList/{roleId}"; | |||
} |
@@ -0,0 +1,35 @@ | |||
package com.tuoheng.controller; | |||
import com.tuoheng.service.DictService; | |||
import com.tuoheng.until.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
import javax.annotation.Resource; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2023/6/2 16:29 | |||
*/ | |||
@RestController | |||
@RequestMapping("/dict") | |||
public class DictController { | |||
@Autowired | |||
private DictService dictService; | |||
/** | |||
* 初始化平台对应字典数据 | |||
* | |||
* @param code 平台code | |||
* @return | |||
*/ | |||
@PostMapping("/init") | |||
public JsonResult init(String code) { | |||
return dictService.init(code); | |||
} | |||
} |
@@ -0,0 +1,35 @@ | |||
package com.tuoheng.controller.information; | |||
import com.tuoheng.model.query.InformationQuery; | |||
import com.tuoheng.service.information.InspectionService; | |||
import com.tuoheng.until.JsonResult; | |||
import lombok.AllArgsConstructor; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
/** | |||
* 任务表前端控制器 | |||
* | |||
* @Author xiaoying | |||
* @Date 2023/4/24 9:28 | |||
*/ | |||
@RestController | |||
@RequestMapping("/information") | |||
public class InformationController { | |||
@Autowired | |||
private InspectionService inspectionService; | |||
/** | |||
* 查询任务列表 | |||
* @return | |||
*/ | |||
@GetMapping("/index") | |||
public JsonResult index(InformationQuery query) { | |||
return inspectionService.index(query); | |||
} | |||
} |
@@ -0,0 +1,33 @@ | |||
package com.tuoheng.controller.information; | |||
import com.tuoheng.model.query.InspectionFileQuery; | |||
import com.tuoheng.service.information.InspectionFileService; | |||
import com.tuoheng.until.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
/** | |||
* 问题表前端控制器 | |||
* | |||
* @Author xiaoying | |||
* @Date 2023/4/24 9:28 | |||
*/ | |||
@RestController | |||
@RequestMapping("/file") | |||
public class InformationFileController { | |||
@Autowired | |||
private InspectionFileService inspectionFileService; | |||
/** | |||
* 查询问题列表 | |||
* | |||
* @return | |||
*/ | |||
@GetMapping("/index") | |||
public JsonResult index(InspectionFileQuery query) { | |||
return inspectionFileService.index(query); | |||
} | |||
} |
@@ -0,0 +1,33 @@ | |||
package com.tuoheng.controller.information; | |||
import com.tuoheng.model.query.ReportQuery; | |||
import com.tuoheng.service.information.ReportService; | |||
import com.tuoheng.until.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
/** | |||
* 报告表前端控制器 | |||
* | |||
* @Author xiaoying | |||
* @Date 2023/4/24 9:28 | |||
*/ | |||
@RestController | |||
@RequestMapping("/report") | |||
public class ReportController { | |||
@Autowired | |||
private ReportService reportService; | |||
/** | |||
* 查询报告列表 | |||
* | |||
* @return | |||
*/ | |||
@GetMapping("/index") | |||
public JsonResult index(ReportQuery query) { | |||
return reportService.index(query); | |||
} | |||
} |
@@ -0,0 +1,33 @@ | |||
package com.tuoheng.controller.information; | |||
import com.tuoheng.model.query.WorkorderQuery; | |||
import com.tuoheng.service.information.WorkorderService; | |||
import com.tuoheng.until.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
/** | |||
* 工单表前端控制器 | |||
* | |||
* @Author xiaoying | |||
* @Date 2023/4/24 9:28 | |||
*/ | |||
@RestController | |||
@RequestMapping("/workorder") | |||
public class WorkorderController { | |||
@Autowired | |||
private WorkorderService workorderService; | |||
/** | |||
* 查询工单列表 | |||
* | |||
* @return | |||
*/ | |||
@GetMapping("/index") | |||
public JsonResult index(WorkorderQuery query) { | |||
return workorderService.index(query); | |||
} | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.tuoheng.mapper; | |||
import com.tuoheng.model.entity.DictData; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import org.apache.ibatis.annotations.Mapper; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_dict_data(字典数据表)】的数据库操作Mapper | |||
* @createDate 2023-06-02 16:27:47 | |||
* @Entity com.tuoheng.model.entity.DictData | |||
*/ | |||
@Mapper | |||
public interface DictDataMapper extends BaseMapper<DictData> { | |||
} | |||
@@ -0,0 +1,20 @@ | |||
package com.tuoheng.mapper; | |||
import com.tuoheng.model.entity.Dict; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import org.apache.ibatis.annotations.Mapper; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_dict(字典类型表)】的数据库操作Mapper | |||
* @createDate 2023-06-02 16:27:18 | |||
* @Entity com.tuoheng.model.entity.Dict | |||
*/ | |||
@Mapper | |||
public interface DictMapper extends BaseMapper<Dict> { | |||
} | |||
@@ -0,0 +1,20 @@ | |||
package com.tuoheng.mapper.information; | |||
import com.tuoheng.model.entity.InspectionFile; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import org.apache.ibatis.annotations.Mapper; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_inspection_file】的数据库操作Mapper | |||
* @createDate 2023-04-24 09:12:58 | |||
* @Entity com.tuoheng.model.entity.InspectionFile | |||
*/ | |||
@Mapper | |||
public interface InspectionFileMapper extends BaseMapper<InspectionFile> { | |||
} | |||
@@ -0,0 +1,20 @@ | |||
package com.tuoheng.mapper.information; | |||
import com.tuoheng.model.entity.Inspection; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import org.apache.ibatis.annotations.Mapper; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_inspection】的数据库操作Mapper | |||
* @createDate 2023-04-24 09:00:07 | |||
* @Entity com.tuoheng.model.entity.Inspection | |||
*/ | |||
@Mapper | |||
public interface InspectionMapper extends BaseMapper<Inspection> { | |||
} | |||
@@ -0,0 +1,20 @@ | |||
package com.tuoheng.mapper.information; | |||
import com.tuoheng.model.entity.Report; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import org.apache.ibatis.annotations.Mapper; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_report(巡检报告表)】的数据库操作Mapper | |||
* @createDate 2023-04-24 09:14:07 | |||
* @Entity com.tuoheng.model.entity.Report | |||
*/ | |||
@Mapper | |||
public interface ReportMapper extends BaseMapper<Report> { | |||
} | |||
@@ -0,0 +1,20 @@ | |||
package com.tuoheng.mapper.information; | |||
import com.tuoheng.model.entity.Workorder; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import org.apache.ibatis.annotations.Mapper; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_workorder(全民/河长问题工单表)】的数据库操作Mapper | |||
* @createDate 2023-04-24 09:14:32 | |||
* @Entity com.tuoheng.model.entity.Workorder | |||
*/ | |||
@Mapper | |||
public interface WorkorderMapper extends BaseMapper<Workorder> { | |||
} | |||
@@ -0,0 +1,72 @@ | |||
package com.tuoheng.model.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
/** | |||
* 字典类型表 | |||
* | |||
* @TableName t_dict | |||
*/ | |||
@TableName(value = "t_dict") | |||
@Data | |||
public class Dict implements Serializable { | |||
/** | |||
* 主键 | |||
*/ | |||
@TableId(type = IdType.ASSIGN_ID) | |||
private Long id; | |||
/** | |||
* 字典名称 | |||
*/ | |||
private String dictName; | |||
/** | |||
* 字典类型 | |||
*/ | |||
private String type; | |||
/** | |||
* 状态(1正常 0停用) | |||
*/ | |||
private Integer status; | |||
/** | |||
* 创建者 | |||
*/ | |||
private String createUser; | |||
/** | |||
* 创建时间 | |||
*/ | |||
private Date createTime; | |||
/** | |||
* 更新者 | |||
*/ | |||
private String updateUser; | |||
/** | |||
* 更新时间 | |||
*/ | |||
private Date updateTime; | |||
/** | |||
* 备注 | |||
*/ | |||
private String remark; | |||
/** | |||
* 0 删除 1正常 | |||
*/ | |||
private Integer mark; | |||
@TableField(exist = false) | |||
private static final long serialVersionUID = 1L; | |||
} |
@@ -0,0 +1,91 @@ | |||
package com.tuoheng.model.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
import lombok.Data; | |||
/** | |||
* 字典数据表 | |||
* @TableName t_dict_data | |||
*/ | |||
@TableName(value ="t_dict_data") | |||
@Data | |||
public class DictData implements Serializable { | |||
/** | |||
* 主键ID | |||
*/ | |||
@TableId(type = IdType.ASSIGN_ID) | |||
private Long id; | |||
/** | |||
* 字典名称 | |||
*/ | |||
private String dictName; | |||
/** | |||
* 字典对应type | |||
*/ | |||
private String dictType; | |||
/** | |||
* 对应值 | |||
*/ | |||
private String value; | |||
/** | |||
* 字典类型 | |||
*/ | |||
private String code; | |||
/** | |||
* 状态(1正常 0停用) | |||
*/ | |||
private Integer status; | |||
/** | |||
* 创建者 | |||
*/ | |||
private String createUser; | |||
/** | |||
* 创建时间 | |||
*/ | |||
private Date createTime; | |||
/** | |||
* 更新者 | |||
*/ | |||
private String updateUser; | |||
/** | |||
* 更新时间 | |||
*/ | |||
private Date updateTime; | |||
/** | |||
* 备注 | |||
*/ | |||
private String remark; | |||
/** | |||
* 租户id | |||
*/ | |||
private String tenantId; | |||
/** | |||
* 0 删除 1正常 | |||
*/ | |||
private Integer mark; | |||
/** | |||
* 排序 | |||
*/ | |||
private Integer sort; | |||
@TableField(exist = false) | |||
private static final long serialVersionUID = 1L; | |||
} |
@@ -0,0 +1,130 @@ | |||
package com.tuoheng.model.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
/** | |||
* | |||
* @TableName t_inspection | |||
*/ | |||
@TableName(value ="t_inspection") | |||
@Data | |||
public class Inspection implements Serializable { | |||
/** | |||
* id | |||
*/ | |||
@TableId(type = IdType.AUTO) | |||
private Integer id; | |||
/** | |||
* 任务编号 | |||
*/ | |||
private String code; | |||
/** | |||
* 任务名称 | |||
*/ | |||
private String name; | |||
/** | |||
* 巡检方式 1. 机场巡检 2飞手巡检 | |||
*/ | |||
private String inspectionWay; | |||
/** | |||
* 巡检机场 | |||
*/ | |||
private String airport; | |||
/** | |||
* 巡检开始时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date inspectionTime; | |||
/** | |||
* 飞行时长 | |||
*/ | |||
private String duration; | |||
/** | |||
* 任务状态 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 来源系统标识 | |||
*/ | |||
private String clientId; | |||
/** | |||
* 所属行业 | |||
*/ | |||
private String industry; | |||
/** | |||
* 租户账号 | |||
*/ | |||
private String tenantUsername; | |||
/** | |||
* srt轨迹文件url | |||
*/ | |||
private String srtUrl; | |||
/** | |||
* 视频url | |||
*/ | |||
private String videoUrl; | |||
/** | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** | |||
* 创建人 | |||
*/ | |||
private Integer createUser; | |||
/** | |||
* 更新人 | |||
*/ | |||
private Integer updateUser; | |||
/** | |||
* 是否有效 | |||
*/ | |||
private Integer mark; | |||
/** | |||
* 任务类型 | |||
*/ | |||
private Integer inspectionType; | |||
/** | |||
* 飞行里程 | |||
*/ | |||
private String flightMileage; | |||
@TableField(exist = false) | |||
private static final long serialVersionUID = 1L; | |||
} |
@@ -0,0 +1,131 @@ | |||
package com.tuoheng.model.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
/** | |||
* | |||
* @TableName t_inspection_file | |||
*/ | |||
@TableName(value ="t_inspection_file") | |||
@Data | |||
public class InspectionFile implements Serializable { | |||
/** | |||
* ID | |||
*/ | |||
@TableId(type = IdType.AUTO) | |||
private Integer id; | |||
/** | |||
* 问题编号 | |||
*/ | |||
private String fileCode; | |||
/** | |||
* 所属任务 | |||
*/ | |||
private String inspectionName; | |||
/** | |||
* 文件名称 | |||
*/ | |||
private String fileName; | |||
/** | |||
* 缩略图 | |||
*/ | |||
private String fileThumbnail; | |||
/** | |||
* 原图 | |||
*/ | |||
private String fileOriginal; | |||
/** | |||
* 标记图 | |||
*/ | |||
private String fileImage; | |||
/** | |||
* 纬度(原始图片纬度) | |||
*/ | |||
private String latitude; | |||
/** | |||
* 经度(原始图片经度) | |||
*/ | |||
private String longitude; | |||
/** | |||
* 处理状态:0待处理 1已处理 | |||
*/ | |||
private Integer dealStatus; | |||
/** | |||
* 处理状态:0待审核 1已审核 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 租户账号 | |||
*/ | |||
private String tenantUsername; | |||
/** | |||
* 来源系统标识 | |||
*/ | |||
private String clientId; | |||
/** | |||
* 所属行业 | |||
*/ | |||
private String industry; | |||
/** | |||
* 创建人 | |||
*/ | |||
private Integer createUser; | |||
/** | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新人 | |||
*/ | |||
private Integer updateUser; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** | |||
* 有效标记 | |||
*/ | |||
private Integer mark; | |||
/** | |||
* 问题类型 | |||
*/ | |||
private String questionName; | |||
/** | |||
* 问题编号 | |||
*/ | |||
private String questionId; | |||
@TableField(exist = false) | |||
private static final long serialVersionUID = 1L; | |||
} |
@@ -0,0 +1,93 @@ | |||
package com.tuoheng.model.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
/** | |||
* 巡检报告表 | |||
* @TableName t_report | |||
*/ | |||
@TableName(value ="t_report") | |||
@Data | |||
public class Report implements Serializable { | |||
/** | |||
* ID | |||
*/ | |||
@TableId(type = IdType.AUTO) | |||
private Integer id; | |||
/** | |||
* 报告编号 | |||
*/ | |||
private String reportNo; | |||
/** | |||
* 巡检任务编码 | |||
*/ | |||
private String inspectionCode; | |||
/** | |||
* 巡检任务名称 | |||
*/ | |||
private String inspectionName; | |||
/** | |||
* 巡检方式:1巡河报告 2处理报告 | |||
*/ | |||
private Object reportType; | |||
/** | |||
* 来源系统标识 | |||
*/ | |||
private String clientId; | |||
/** | |||
* 所属行业 | |||
*/ | |||
private String industry; | |||
/** | |||
* 租户账号 | |||
*/ | |||
private String tenantUsername; | |||
/** | |||
* 创建人 | |||
*/ | |||
private Integer createUser; | |||
/** | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新人 | |||
*/ | |||
private Integer updateUser; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** | |||
* 有效标记 | |||
*/ | |||
private Integer mark; | |||
@TableField(exist = false) | |||
private static final long serialVersionUID = 1L; | |||
} |
@@ -0,0 +1,98 @@ | |||
package com.tuoheng.model.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
/** | |||
* 全民/河长问题工单表 | |||
* @TableName t_workorder | |||
*/ | |||
@TableName(value ="t_workorder") | |||
@Data | |||
public class Workorder implements Serializable { | |||
/** | |||
* ID | |||
*/ | |||
@TableId(type = IdType.AUTO) | |||
private Integer id; | |||
/** | |||
* 工单编号 | |||
*/ | |||
private String code; | |||
/** | |||
* 处理状态:1问题待指派 2问题待处理 3问题处理中 4问题已处理 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 工单完成时间 | |||
*/ | |||
private Date workCompleteTime; | |||
/** | |||
* 创建人 | |||
*/ | |||
private Integer createUser; | |||
/** | |||
* 处理人 | |||
*/ | |||
private Integer handledUser; | |||
/** | |||
* 所属行业 | |||
*/ | |||
private String industry; | |||
/** | |||
* 来源系统标识 | |||
*/ | |||
private String clientId; | |||
/** | |||
* 租户账号 | |||
*/ | |||
private String tenantUsername; | |||
/** | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新人 | |||
*/ | |||
private Integer updateUser; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** | |||
* 有效标记 | |||
*/ | |||
private Integer mark; | |||
/** | |||
* 处理人名称 | |||
*/ | |||
private String handledUserName; | |||
@TableField(exist = false) | |||
private static final long serialVersionUID = 1L; | |||
} |
@@ -0,0 +1,25 @@ | |||
package com.tuoheng.model.query; | |||
import com.tuoheng.common.BaseQuery; | |||
import lombok.Data; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2023/4/24 9:41 | |||
*/ | |||
@Data | |||
public class InformationQuery extends BaseQuery { | |||
/** | |||
* 任务名 | |||
*/ | |||
private String name; | |||
/** | |||
* 1 日常巡检 2应急 | |||
*/ | |||
private Integer inspectionType; | |||
/** | |||
* 系统来源 | |||
*/ | |||
private String clientId; | |||
} |
@@ -0,0 +1,25 @@ | |||
package com.tuoheng.model.query; | |||
import com.tuoheng.common.BaseQuery; | |||
import lombok.Data; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2023/4/25 17:16 | |||
*/ | |||
@Data | |||
public class InspectionFileQuery extends BaseQuery { | |||
/** | |||
* 问题类型 | |||
*/ | |||
private String questionName; | |||
/** | |||
* 0待审核 1已审核 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 系统标识 | |||
*/ | |||
private String clientId; | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.tuoheng.model.query; | |||
import com.tuoheng.common.BaseQuery; | |||
import lombok.Data; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2023/4/25 17:18 | |||
*/ | |||
@Data | |||
public class ReportQuery extends BaseQuery { | |||
/** | |||
* 报告编号 | |||
*/ | |||
private String reportNo; | |||
/** | |||
* 系统标识 | |||
*/ | |||
private String clientId; | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.tuoheng.model.query; | |||
import com.tuoheng.common.BaseQuery; | |||
import lombok.Data; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2023/4/25 17:20 | |||
*/ | |||
@Data | |||
public class WorkorderQuery extends BaseQuery { | |||
/** | |||
* 报告编号 | |||
*/ | |||
private String code; | |||
/** | |||
* 工单状态:1问题待指派 2问题待处理 3问题处理中 4问题已处理 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 系统标识 | |||
*/ | |||
private String clientId; | |||
} |
@@ -0,0 +1,13 @@ | |||
package com.tuoheng.service; | |||
import com.tuoheng.model.entity.DictData; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_dict_data(字典数据表)】的数据库操作Service | |||
* @createDate 2023-06-02 16:27:47 | |||
*/ | |||
public interface DictDataService extends IService<DictData> { | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.tuoheng.service; | |||
import com.tuoheng.model.entity.Dict; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
import com.tuoheng.until.JsonResult; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_dict(字典类型表)】的数据库操作Service | |||
* @createDate 2023-06-02 16:27:18 | |||
*/ | |||
public interface DictService extends IService<Dict> { | |||
/** | |||
* 初始化平台对应字典数据 | |||
* | |||
* @param code 平台code | |||
* @return | |||
*/ | |||
JsonResult init(String code); | |||
} |
@@ -0,0 +1,22 @@ | |||
package com.tuoheng.service.impl; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import com.tuoheng.model.entity.DictData; | |||
import com.tuoheng.service.DictDataService; | |||
import com.tuoheng.mapper.DictDataMapper; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_dict_data(字典数据表)】的数据库操作Service实现 | |||
* @createDate 2023-06-02 16:27:47 | |||
*/ | |||
@Service | |||
public class DictDataServiceImpl extends ServiceImpl<DictDataMapper, DictData> | |||
implements DictDataService{ | |||
} | |||
@@ -0,0 +1,78 @@ | |||
package com.tuoheng.service.impl; | |||
import cn.hutool.core.util.ObjectUtil; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import com.tuoheng.enums.MarkTypeEnum; | |||
import com.tuoheng.mapper.DictDataMapper; | |||
import com.tuoheng.mapper.PlatformMapper; | |||
import com.tuoheng.model.dto.Platform; | |||
import com.tuoheng.model.entity.Dict; | |||
import com.tuoheng.model.entity.DictData; | |||
import com.tuoheng.service.DictDataService; | |||
import com.tuoheng.service.DictService; | |||
import com.tuoheng.mapper.DictMapper; | |||
import com.tuoheng.until.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import org.springframework.transaction.annotation.Transactional; | |||
import java.util.List; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_dict(字典类型表)】的数据库操作Service实现 | |||
* @createDate 2023-06-02 16:27:18 | |||
*/ | |||
@Service | |||
public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> | |||
implements DictService { | |||
@Autowired | |||
private DictMapper dictMapper; | |||
@Autowired | |||
private DictDataMapper dictDataMapper; | |||
@Autowired | |||
private DictDataService dictDataService; | |||
@Autowired | |||
private PlatformMapper platformMapper; | |||
/** | |||
* 初始化平台对应字典数据 | |||
* | |||
* @param code 平台code | |||
* @return | |||
*/ | |||
@Override | |||
@Transactional | |||
public JsonResult init(String code) { | |||
Platform platform = platformMapper.selectOne(Wrappers.<Platform>lambdaQuery() | |||
.eq(Platform::getMark, MarkTypeEnum.VALID.getCode()) | |||
.eq(Platform::getPlatformCode, code)); | |||
if (ObjectUtil.isNull(platform)) { | |||
return JsonResult.error("对应业务平台不存在,请检查后初始化"); | |||
} | |||
List<DictData> list = dictDataMapper.selectList(Wrappers.<DictData>lambdaQuery() | |||
.eq(DictData::getMark, MarkTypeEnum.VALID.getCode()) | |||
.eq(DictData::getDictType, "tuoheng-hhz")); | |||
//添加字典表 | |||
Dict dict = new Dict(); | |||
dict.setDictName(platform.getPlatformName()); | |||
dict.setType(code); | |||
dictMapper.insert(dict); | |||
//添加对应数据 | |||
for (DictData dictData : list) { | |||
dictData.setDictType(code); | |||
dictData.setId(null); | |||
} | |||
dictDataService.saveBatch(list); | |||
return JsonResult.success("初始化成功请修改对应数据值"); | |||
} | |||
} | |||
@@ -13,9 +13,11 @@ import com.tuoheng.common.CommonConfig; | |||
import com.tuoheng.common.ServiceException; | |||
import com.tuoheng.common.ServiceExceptionEnum; | |||
import com.tuoheng.constant.*; | |||
import com.tuoheng.enums.MarkTypeEnum; | |||
import com.tuoheng.mapper.*; | |||
import com.tuoheng.model.dto.LoginUser; | |||
import com.tuoheng.model.dto.Platform; | |||
import com.tuoheng.model.entity.DictData; | |||
import com.tuoheng.model.entity.TenantEmploy; | |||
import com.tuoheng.model.entity.TenantItem; | |||
import com.tuoheng.model.param.ClientRoleDto; | |||
@@ -84,6 +86,8 @@ public class TenantServiceImpl implements TenantService { | |||
@Autowired | |||
private TenantItemMapper tenantItemMapper; | |||
@Autowired | |||
private DictDataMapper dictDataMapper; | |||
@Override | |||
@@ -191,7 +195,7 @@ public class TenantServiceImpl implements TenantService { | |||
for (ClientRoleDto clientRoleDto : list) { | |||
try { | |||
log.info("参数:{}", clientRoleDto.toString()); | |||
JsonResult result = getResult(createClientTenantDto, clientRoleDto.getClientId(), loginUser); | |||
JsonResult result = getResult(createClientTenantDto, clientRoleDto.getClientId(), DictConstant.ADD_TENANT, loginUser); | |||
if (JsonResult.SUCCESS != result.getCode()) { | |||
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), result.getMsg()); | |||
} | |||
@@ -217,28 +221,14 @@ public class TenantServiceImpl implements TenantService { | |||
//遍历获取参数进项封装 | |||
for (ClientRoleDto dto : clientRoleDtoList) { | |||
switch (dto.getClientId()) { | |||
//暂时河湖长,动态匹配其他平台 | |||
case HhzUrlConstant.HHZ_CLIENT: | |||
addClientRoleDtoList(HhzUrlConstant.HHZ_CLIENT_MP, dto, list); | |||
addClientRoleDtoList(HhzUrlConstant.HHZ_CLIENT_ADMIN, dto, list); | |||
break; | |||
case PilotConstant.PILOT_CLIENT: | |||
addClientRoleDtoList(PilotConstant.PILOT_CLIENT_ADMIN, dto, list); | |||
addClientRoleDtoList(PilotConstant.PILOT_CLIENT_MP, dto, list); | |||
break; | |||
case FreeWayConstant.FREEWAY_CLIENT: | |||
addClientRoleDtoList(FreeWayConstant.FREEWAY_CLIENT_ADMIN, dto, list); | |||
addClientRoleDtoList(FreeWayConstant.FREEWAY_CLIENT_MP, dto, list); | |||
break; | |||
case WaterWayConstant.WATERWAY_CLIENT: | |||
addClientRoleDtoList(WaterWayConstant.WATERWAY_CLIENT_ADMIN, dto, list); | |||
addClientRoleDtoList(WaterWayConstant.WATERWAY_CLIENT_MP, dto, list); | |||
break; | |||
default: | |||
break; | |||
List<DictData> dictDataList = dictDataMapper.selectList(Wrappers.<DictData>lambdaQuery() | |||
.eq(DictData::getMark, MarkTypeEnum.VALID.getCode()).eq(DictData::getCode, DictConstant.CLIENT)); | |||
for (DictData dictData : dictDataList) { | |||
if (dto.getClientId().equals(dictData.getValue())) { | |||
addClientRoleDtoList(getDictData(dictData.getDictType(), DictConstant.MP).getValue(), dto, list); | |||
addClientRoleDtoList(getDictData(dictData.getDictType(), DictConstant.ADMIN).getValue(), dto, list); | |||
} | |||
} | |||
} | |||
return list; | |||
} | |||
@@ -274,16 +264,14 @@ public class TenantServiceImpl implements TenantService { | |||
IPage<UserVo> pageData = clientUserMapper.selectByTenantIdAndPage(query, page); | |||
pageData.convert(x -> { | |||
String platformCode = x.getPlatformCode(); | |||
if (platformCode.contains(HhzUrlConstant.HHZ_CLIENT)) { | |||
x.setPlatformName(HhzUrlConstant.HHZ_NAME); | |||
} else if (platformCode.contains(WaterWayConstant.WATERWAY_CLIENT)) { | |||
x.setPlatformName(WaterWayConstant.WATERWAY_NAME); | |||
} else if (platformCode.contains(FreeWayConstant.FREEWAY_CLIENT)) { | |||
x.setPlatformName(FreeWayConstant.FREEWAY_NAME); | |||
} else if (platformCode.contains(PilotConstant.PILOT_CLIENT)) { | |||
x.setPlatformName(PilotConstant.PILOT_NAME); | |||
} else if (platformCode.contains(AirportConstant.AIRPORT_CLIENT)) { | |||
x.setPlatformName(AirportConstant.AIRPORT_NAME); | |||
//TODO 后期维护各个业务平台 | |||
List<DictData> dictDataList = dictDataMapper.selectList(Wrappers.<DictData>lambdaQuery() | |||
.eq(DictData::getMark, MarkTypeEnum.VALID.getCode()).eq(DictData::getCode, DictConstant.CLIENT)); | |||
for (DictData dictData : dictDataList) { | |||
if (platformCode.contains(dictData.getValue())) { | |||
//获取对应平台 | |||
x.setPlatformName(getDictData(dictData.getDictType(), DictConstant.GET_NAME).getValue()); | |||
} | |||
} | |||
return x; | |||
}); | |||
@@ -377,16 +365,14 @@ public class TenantServiceImpl implements TenantService { | |||
List<BusinessSystemVo> businessSystemVoList = new ArrayList<>(); | |||
for (AuthoritiesPo authoritiesPo : list) { | |||
//TODO 后期维护各个业务平台 | |||
if (authoritiesPo.getAuthority().contains(HhzUrlConstant.HHZ_CLIENT)) { | |||
businessSystemVoList.add(getbusinessSystemVo(HhzUrlConstant.HHZ_CLIENT, HhzUrlConstant.HHZ_NAME)); | |||
} else if (authoritiesPo.getAuthority().contains(AirportConstant.AIRPORT_CLIENT)) { | |||
businessSystemVoList.add(getbusinessSystemVo(AirportConstant.AIRPORT_CLIENT, AirportConstant.AIRPORT_NAME)); | |||
} else if (authoritiesPo.getAuthority().contains(WaterWayConstant.WATERWAY_CLIENT)) { | |||
businessSystemVoList.add(getbusinessSystemVo(WaterWayConstant.WATERWAY_CLIENT, WaterWayConstant.WATERWAY_NAME)); | |||
} else if (authoritiesPo.getAuthority().contains(FreeWayConstant.FREEWAY_CLIENT)) { | |||
businessSystemVoList.add(getbusinessSystemVo(FreeWayConstant.FREEWAY_CLIENT, FreeWayConstant.FREEWAY_NAME)); | |||
} else if (authoritiesPo.getAuthority().contains(PilotConstant.PILOT_CLIENT)) { | |||
businessSystemVoList.add(getbusinessSystemVo(PilotConstant.PILOT_CLIENT, PilotConstant.PILOT_NAME)); | |||
List<DictData> dictDataList = dictDataMapper.selectList(Wrappers.<DictData>lambdaQuery() | |||
.eq(DictData::getMark, MarkTypeEnum.VALID.getCode()).eq(DictData::getCode, DictConstant.CLIENT)); | |||
for (DictData dictData : dictDataList) { | |||
if (authoritiesPo.getAuthority().contains(dictData.getValue())) { | |||
//获取对应平台 | |||
Platform platform = getPlatform(dictData.getDictType()); | |||
businessSystemVoList.add(getbusinessSystemVo(dictData.getValue(), platform.getPlatformName())); | |||
} | |||
} | |||
} | |||
businessSystemVoList = businessSystemVoList.stream().distinct().collect(Collectors.toList()); | |||
@@ -541,7 +527,7 @@ public class TenantServiceImpl implements TenantService { | |||
public JsonResult deleteTenant(CreateClientTenantDto dto, LoginUser loginUser) { | |||
//通知业务系统进行删除 | |||
for (ClientRoleDto clientRoleDto : dto.getClientRoleDtoList()) { | |||
deleteResult(dto, clientRoleDto.getClientId(), loginUser); | |||
deleteResult(dto, clientRoleDto.getClientId(), DictConstant.DELETE_TENANT, loginUser); | |||
} | |||
return JsonResult.success(); | |||
} | |||
@@ -612,10 +598,10 @@ public class TenantServiceImpl implements TenantService { | |||
coincideClientRoleDtoList = clientRoleDtoList.stream().filter(t -> list.contains(t)).collect(Collectors.toList()); | |||
log.info("删除集合:{}", deleteClientRoleDtoList.toString()); | |||
log.info("交集集合:{}", coincideClientRoleDtoList.toString()); | |||
//交集集合做更新操作 | |||
//交集集合做更新操作 editTenant | |||
for (ClientRoleDto clientRoleDto : coincideClientRoleDtoList) { | |||
try { | |||
editResult(clientTenantDto, clientRoleDto.getClientId(), loginUser); | |||
editResult(clientTenantDto, clientRoleDto.getClientId(), DictConstant.EDIT_TENANT, loginUser); | |||
} catch (Exception e) { | |||
log.info("异常信息捕获,平台标识:{}", clientRoleDto.getClientId()); | |||
log.info("异常信息:{}", e.getMessage()); | |||
@@ -695,7 +681,7 @@ public class TenantServiceImpl implements TenantService { | |||
for (ClientRoleDto clientRoleDto : insertClientRoleDtoList) { | |||
try { | |||
log.info("参数:{}", clientRoleDto.toString()); | |||
JsonResult result = getResult(dto, clientRoleDto.getClientId(), loginUser); | |||
JsonResult result = getResult(dto, clientRoleDto.getClientId(), DictConstant.ADD_TENANT, loginUser); | |||
if (JsonResult.SUCCESS != result.getCode()) { | |||
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), result.getMsg()); | |||
} | |||
@@ -744,10 +730,9 @@ public class TenantServiceImpl implements TenantService { | |||
* @param loginUser | |||
* @return | |||
*/ | |||
private JsonResult getResult(CreateClientTenantDto dto, String code, LoginUser loginUser) { | |||
Platform platform = platformMapper.selectOne(Wrappers.<Platform>lambdaQuery() | |||
.eq(Platform::getPlatformCode, code) | |||
.eq(Platform::getMark, 1)); | |||
private JsonResult getResult(CreateClientTenantDto dto, String code, String dictCode, LoginUser loginUser) { | |||
//获取对应平台 | |||
Platform platform = getPlatform(code); | |||
if (ObjectUtil.isNull(platform)) { | |||
return JsonResult.error("该业务平台不存在"); | |||
} | |||
@@ -757,30 +742,11 @@ public class TenantServiceImpl implements TenantService { | |||
//设置地址 | |||
String url = platform.getPlatformUrl(); | |||
//根据不同业务平台进行动态匹配 ->并修改对应标识权限 | |||
switch (platform.getPlatformCode()) { | |||
//河湖长 | |||
case HhzUrlConstant.HHZ_CLIENT: | |||
url = url + HhzUrlConstant.CREATE_TENANT; | |||
break; | |||
//机场 | |||
case AirportConstant.AIRPORT_CLIENT: | |||
url = url + AirportConstant.CREATE_TENANT; | |||
break; | |||
//高速 | |||
case FreeWayConstant.FREEWAY_CLIENT: | |||
url = url + FreeWayConstant.CREATE_TENANT; | |||
break; | |||
//航道 | |||
case WaterWayConstant.WATERWAY_CLIENT: | |||
url = url + WaterWayConstant.CREATE_TENANT; | |||
break; | |||
//飞手 | |||
case PilotConstant.PILOT_CLIENT: | |||
url = url + PilotConstant.CREATE_TENANT; | |||
break; | |||
default: | |||
break; | |||
DictData dictData = getDictData(code, dictCode); | |||
if (ObjectUtil.isNull(dictData)) { | |||
return JsonResult.error("该业务平台对应字典表数据不存在"); | |||
} | |||
url = url + dictData.getValue(); | |||
HttpEntity httpEntity = new HttpEntity(dto, resultRequestHeader); | |||
log.info("请求url:{}", url); | |||
ResponseEntity<JsonResult> response; | |||
@@ -808,10 +774,9 @@ public class TenantServiceImpl implements TenantService { | |||
* @param loginUser | |||
* @return | |||
*/ | |||
private JsonResult deleteResult(CreateClientTenantDto dto, String code, LoginUser loginUser) { | |||
Platform platform = platformMapper.selectOne(Wrappers.<Platform>lambdaQuery() | |||
.eq(Platform::getPlatformCode, code) | |||
.eq(Platform::getMark, 1)); | |||
private JsonResult deleteResult(CreateClientTenantDto dto, String code, String dictCode, LoginUser loginUser) { | |||
//获取对应平台 | |||
Platform platform = getPlatform(code); | |||
if (ObjectUtil.isNull(platform)) { | |||
return JsonResult.error("该业务平台不存在"); | |||
} | |||
@@ -822,28 +787,11 @@ public class TenantServiceImpl implements TenantService { | |||
//设置地址(hhz平台) | |||
String url = platform.getPlatformUrl(); | |||
//根据不同业务平台进行动态匹配 | |||
switch (platform.getPlatformCode()) { | |||
//河湖长 | |||
case HhzUrlConstant.HHZ_CLIENT: | |||
url = url + HhzUrlConstant.DELETE_TENANT; | |||
break; | |||
//机场 | |||
case AirportConstant.AIRPORT_CLIENT: | |||
url = url + AirportConstant.DELETE_TENANT + CommonConstant.SLASH + dto.getTenantCode(); | |||
break; | |||
case FreeWayConstant.FREEWAY_CLIENT: | |||
url = url + FreeWayConstant.DELETE_TENANT; | |||
break; | |||
case WaterWayConstant.WATERWAY_CLIENT: | |||
url = url + WaterWayConstant.DELETE_TENANT; | |||
break; | |||
//飞手 | |||
case PilotConstant.PILOT_CLIENT: | |||
url = url + PilotConstant.DELETE_TENANT; | |||
break; | |||
default: | |||
break; | |||
DictData dictData = getDictData(code, dictCode); | |||
if (ObjectUtil.isNull(dictData)) { | |||
return JsonResult.error("该业务平台对应字典表数据不存在"); | |||
} | |||
url = url + dictData.getValue(); | |||
log.info("请求url:{}", url); | |||
ResponseEntity<JsonResult> response; | |||
try { | |||
@@ -871,10 +819,8 @@ public class TenantServiceImpl implements TenantService { | |||
* @param loginUser | |||
* @return | |||
*/ | |||
private JsonResult editResult(CreateClientTenantDto dto, String code, LoginUser loginUser) { | |||
Platform platform = platformMapper.selectOne(Wrappers.<Platform>lambdaQuery() | |||
.eq(Platform::getPlatformCode, code) | |||
.eq(Platform::getMark, 1)); | |||
private JsonResult editResult(CreateClientTenantDto dto, String code, String dictCode, LoginUser loginUser) { | |||
Platform platform = getPlatform(code); | |||
if (ObjectUtil.isNull(platform)) { | |||
return JsonResult.error("该业务平台不存在"); | |||
} | |||
@@ -884,29 +830,11 @@ public class TenantServiceImpl implements TenantService { | |||
HttpEntity httpEntity = new HttpEntity(dto, resultRequestHeader); | |||
//设置地址(hhz平台) | |||
String url = platform.getPlatformUrl(); | |||
//根据不同业务平台进行动态匹配 | |||
switch (platform.getPlatformCode()) { | |||
//河湖长 | |||
case HhzUrlConstant.HHZ_CLIENT: | |||
url = url + HhzUrlConstant.UPDATE_TENANT; | |||
break; | |||
/* //机场 | |||
case AirportConstant.AIRPORT_CLIENT: | |||
url = url + AirportConstant.DELETE_TENANT + CommonConstant.SLASH + dto.getTenantCode(); | |||
break;*/ | |||
case FreeWayConstant.FREEWAY_CLIENT: | |||
url = url + FreeWayConstant.UPDATE_TENANT; | |||
break; | |||
case WaterWayConstant.WATERWAY_CLIENT: | |||
url = url + WaterWayConstant.UPDATE_TENANT; | |||
break; | |||
//飞手 | |||
case PilotConstant.PILOT_CLIENT: | |||
url = url + PilotConstant.UPDATE_TENANT; | |||
break; | |||
default: | |||
break; | |||
DictData dictData = getDictData(code, dictCode); | |||
if (ObjectUtil.isNull(dictData)) { | |||
return JsonResult.error("该业务平台对应字典表数据不存在"); | |||
} | |||
url = url + dictData.getValue(); | |||
log.info("请求url:{}", url); | |||
ResponseEntity<JsonResult> response; | |||
try { | |||
@@ -924,4 +852,31 @@ public class TenantServiceImpl implements TenantService { | |||
} | |||
return JsonResult.success(); | |||
} | |||
/** | |||
* 获取平台数据 | |||
* | |||
* @param code | |||
* @return | |||
*/ | |||
private Platform getPlatform(String code) { | |||
return platformMapper.selectOne(Wrappers.<Platform>lambdaQuery() | |||
.eq(Platform::getPlatformCode, code) | |||
.eq(Platform::getMark, 1)); | |||
} | |||
/** | |||
* 获取字典表数据 | |||
* | |||
* @param code | |||
* @param dictCode | |||
* @return | |||
*/ | |||
private DictData getDictData(String code, String dictCode) { | |||
DictData dictData = dictDataMapper.selectOne(Wrappers.<DictData>lambdaQuery() | |||
.eq(DictData::getDictType, code) | |||
.eq(DictData::getCode, dictCode) | |||
.eq(DictData::getMark, MarkTypeEnum.VALID.getCode())); | |||
return dictData; | |||
} | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.tuoheng.service.information; | |||
import com.tuoheng.model.entity.InspectionFile; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
import com.tuoheng.model.query.InspectionFileQuery; | |||
import com.tuoheng.until.JsonResult; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_inspection_file】的数据库操作Service | |||
* @createDate 2023-04-24 09:12:58 | |||
*/ | |||
public interface InspectionFileService extends IService<InspectionFile> { | |||
/** | |||
* 查询问题列表 | |||
* | |||
* @return | |||
*/ | |||
JsonResult index(InspectionFileQuery query); | |||
} |
@@ -0,0 +1,19 @@ | |||
package com.tuoheng.service.information; | |||
import com.tuoheng.model.entity.Inspection; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
import com.tuoheng.model.query.InformationQuery; | |||
import com.tuoheng.until.JsonResult; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_inspection】的数据库操作Service | |||
* @createDate 2023-04-24 09:00:07 | |||
*/ | |||
public interface InspectionService extends IService<Inspection> { | |||
/** | |||
* 查询任务列表 | |||
* @return | |||
*/ | |||
JsonResult index(InformationQuery query); | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.tuoheng.service.information; | |||
import com.tuoheng.model.entity.Report; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
import com.tuoheng.model.query.ReportQuery; | |||
import com.tuoheng.until.JsonResult; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_report(巡检报告表)】的数据库操作Service | |||
* @createDate 2023-04-24 09:14:07 | |||
*/ | |||
public interface ReportService extends IService<Report> { | |||
/** | |||
* 查询报告列表 | |||
* | |||
* @return | |||
*/ | |||
JsonResult index(ReportQuery query); | |||
} |
@@ -0,0 +1,22 @@ | |||
package com.tuoheng.service.information; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
import com.tuoheng.model.entity.Workorder; | |||
import com.tuoheng.model.query.WorkorderQuery; | |||
import com.tuoheng.until.JsonResult; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_workorder(全民/河长问题工单表)】的数据库操作Service | |||
* @createDate 2023-04-24 09:14:32 | |||
*/ | |||
public interface WorkorderService extends IService<Workorder> { | |||
/** | |||
* 查询工单列表 | |||
* | |||
* @return | |||
*/ | |||
JsonResult index(WorkorderQuery query); | |||
} |
@@ -0,0 +1,72 @@ | |||
package com.tuoheng.service.information.impl; | |||
import cn.hutool.core.convert.Convert; | |||
import cn.hutool.core.util.ObjectUtil; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import com.tuoheng.common.CommonConfig; | |||
import com.tuoheng.enums.MarkTypeEnum; | |||
import com.tuoheng.model.entity.Inspection; | |||
import com.tuoheng.model.entity.InspectionFile; | |||
import com.tuoheng.model.query.InspectionFileQuery; | |||
import com.tuoheng.service.information.InspectionFileService; | |||
import com.tuoheng.mapper.information.InspectionFileMapper; | |||
import com.tuoheng.until.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_inspection_file】的数据库操作Service实现 | |||
* @createDate 2023-04-24 09:12:58 | |||
*/ | |||
@Service | |||
public class InspectionFileServiceImpl extends ServiceImpl<InspectionFileMapper, InspectionFile> | |||
implements InspectionFileService { | |||
@Autowired | |||
private InspectionFileMapper inspectionFileMapper; | |||
/** | |||
* 查询问题列表 | |||
* | |||
* @return | |||
*/ | |||
@Override | |||
public JsonResult index(InspectionFileQuery query) { | |||
//分页校验 | |||
query.checkParam(); | |||
//分页 | |||
IPage<InspectionFile> page = new Page<>(query.getPage(), query.getLimit()); | |||
IPage<InspectionFile> pageDate = inspectionFileMapper.selectPage(page, Wrappers.<InspectionFile>lambdaQuery() | |||
.like(ObjectUtil.isNotEmpty(query.getQuestionName()), InspectionFile::getQuestionName, query.getQuestionName()) | |||
.eq(ObjectUtil.isNotNull(query.getStatus()), InspectionFile::getStatus, query.getStatus()) | |||
.eq(ObjectUtil.isNotEmpty(query.getClientId()), InspectionFile::getClientId, query.getClientId()) | |||
.eq(InspectionFile::getMark, MarkTypeEnum.VALID.getCode()) | |||
.orderByDesc(InspectionFile::getCreateTime)); | |||
//问题图片带域名 | |||
pageDate.convert(item -> { | |||
InspectionFile inspectionFile = Convert.convert(InspectionFile.class, item); | |||
if (ObjectUtil.isNotEmpty(item.getFileOriginal())) { | |||
inspectionFile.setFileOriginal(CommonConfig.imageURL + item.getFileOriginal()); | |||
} | |||
if (ObjectUtil.isNotEmpty(item.getFileImage())) { | |||
inspectionFile.setFileImage(CommonConfig.imageURL + item.getFileImage()); | |||
} | |||
if (ObjectUtil.isNotEmpty(item.getFileThumbnail())) { | |||
inspectionFile.setFileThumbnail(CommonConfig.imageURL + item.getFileThumbnail()); | |||
} | |||
return inspectionFile; | |||
}); | |||
return JsonResult.success(pageDate); | |||
} | |||
} | |||
@@ -0,0 +1,58 @@ | |||
package com.tuoheng.service.information.impl; | |||
import cn.hutool.core.util.ObjectUtil; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import com.tuoheng.enums.MarkTypeEnum; | |||
import com.tuoheng.mapper.information.InspectionMapper; | |||
import com.tuoheng.model.entity.Inspection; | |||
import com.tuoheng.model.entity.InspectionFile; | |||
import com.tuoheng.model.query.InformationQuery; | |||
import com.tuoheng.service.information.InspectionService; | |||
import com.tuoheng.until.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_inspection】的数据库操作Service实现 | |||
* @createDate 2023-04-24 09:00:07 | |||
*/ | |||
@Service | |||
public class InspectionServiceImpl extends ServiceImpl<InspectionMapper, Inspection> | |||
implements InspectionService { | |||
@Autowired | |||
private InspectionMapper inspectionMapper; | |||
/** | |||
* 查询任务列表 | |||
* | |||
* @param query | |||
* @return | |||
*/ | |||
@Override | |||
public JsonResult index(InformationQuery query) { | |||
//分页校验 | |||
query.checkParam(); | |||
//分页 | |||
IPage<Inspection> page = new Page <>(query.getPage(), query.getLimit()); | |||
IPage<Inspection> pageDate = inspectionMapper.selectPage(page, Wrappers.<Inspection>lambdaQuery() | |||
.like(ObjectUtil.isNotEmpty(query.getName()), Inspection::getName, query.getName()) | |||
.eq(ObjectUtil.isNotNull(query.getInspectionType()), Inspection::getInspectionType, query.getInspectionType()) | |||
.eq(ObjectUtil.isNotEmpty(query.getClientId()), Inspection::getClientId, query.getClientId()) | |||
.eq(Inspection::getMark, MarkTypeEnum.VALID.getCode()) | |||
.orderByDesc(Inspection::getCreateTime)); | |||
return JsonResult.success(pageDate); | |||
} | |||
} | |||
@@ -0,0 +1,54 @@ | |||
package com.tuoheng.service.information.impl; | |||
import cn.hutool.core.util.ObjectUtil; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import com.tuoheng.enums.MarkTypeEnum; | |||
import com.tuoheng.mapper.information.ReportMapper; | |||
import com.tuoheng.model.entity.Report; | |||
import com.tuoheng.model.query.ReportQuery; | |||
import com.tuoheng.service.information.ReportService; | |||
import com.tuoheng.until.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_report(巡检报告表)】的数据库操作Service实现 | |||
* @createDate 2023-04-24 09:14:07 | |||
*/ | |||
@Service | |||
public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> | |||
implements ReportService { | |||
@Autowired | |||
private ReportMapper reportMapper; | |||
/** | |||
* 查询报告列表 | |||
* | |||
* @param query | |||
* @return | |||
*/ | |||
@Override | |||
public JsonResult index(ReportQuery query) { | |||
//分页校验 | |||
query.checkParam(); | |||
//分页 | |||
IPage<Report> page = new Page<>(query.getPage(), query.getLimit()); | |||
IPage<Report> pageDate = reportMapper.selectPage(page, Wrappers.<Report>lambdaQuery() | |||
.like(ObjectUtil.isNotEmpty(query.getReportNo()), Report::getReportNo, query.getReportNo()) | |||
.eq(ObjectUtil.isNotEmpty(query.getClientId()), Report::getClientId, query.getClientId()) | |||
.eq(Report::getMark, MarkTypeEnum.VALID.getCode()) | |||
.orderByDesc(Report::getCreateTime)); | |||
return JsonResult.success(pageDate); | |||
} | |||
} | |||
@@ -0,0 +1,54 @@ | |||
package com.tuoheng.service.information.impl; | |||
import cn.hutool.core.util.ObjectUtil; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import com.tuoheng.enums.MarkTypeEnum; | |||
import com.tuoheng.mapper.information.WorkorderMapper; | |||
import com.tuoheng.model.entity.Workorder; | |||
import com.tuoheng.model.query.WorkorderQuery; | |||
import com.tuoheng.service.information.WorkorderService; | |||
import com.tuoheng.until.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_workorder(全民/河长问题工单表)】的数据库操作Service实现 | |||
* @createDate 2023-04-24 09:14:32 | |||
*/ | |||
@Service | |||
public class WorkorderServiceImpl extends ServiceImpl<WorkorderMapper, Workorder> | |||
implements WorkorderService { | |||
@Autowired | |||
private WorkorderMapper workorderMapper; | |||
/** | |||
* 查询工单列表 | |||
* | |||
* @param query | |||
* @return | |||
*/ | |||
@Override | |||
public JsonResult index(WorkorderQuery query) { | |||
//分页校验 | |||
query.checkParam(); | |||
//分页 | |||
IPage<Workorder> page = new Page<>(query.getPage(), query.getLimit()); | |||
IPage<Workorder> pageDate = workorderMapper.selectPage(page, Wrappers.<Workorder>lambdaQuery() | |||
.like(ObjectUtil.isNotEmpty(query.getCode()), Workorder::getCode, query.getCode()) | |||
.eq(ObjectUtil.isNotNull(query.getStatus()), Workorder::getStatus, query.getStatus()) | |||
.eq(ObjectUtil.isNotEmpty(query.getClientId()), Workorder::getClientId, query.getClientId()) | |||
.eq(Workorder::getMark, MarkTypeEnum.VALID.getCode()) | |||
.orderByDesc(Workorder::getCreateTime)); | |||
return JsonResult.success(pageDate); | |||
} | |||
} | |||
@@ -1,16 +1,20 @@ | |||
package com.tuoheng.third.service.impl; | |||
import cn.hutool.core.date.DateUtil; | |||
import cn.hutool.core.util.ObjectUtil; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.tuoheng.common.CommonConfig; | |||
import com.tuoheng.common.ServiceException; | |||
import com.tuoheng.constant.*; | |||
import com.tuoheng.constant.CommonConstant; | |||
import com.tuoheng.constant.DictConstant; | |||
import com.tuoheng.constant.DspConstant; | |||
import com.tuoheng.enums.MarkTypeEnum; | |||
import com.tuoheng.mapper.DictDataMapper; | |||
import com.tuoheng.mapper.PlatformMapper; | |||
import com.tuoheng.model.dto.ClientRoleListDto; | |||
import com.tuoheng.model.dto.LoginUser; | |||
import com.tuoheng.model.dto.Platform; | |||
import com.tuoheng.model.dto.RoleDto; | |||
import com.tuoheng.model.entity.DictData; | |||
import com.tuoheng.third.request.ThirdRequest; | |||
import com.tuoheng.third.service.ThirdService; | |||
import com.tuoheng.third.vo.*; | |||
@@ -20,7 +24,6 @@ import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.core.ParameterizedTypeReference; | |||
import org.springframework.http.*; | |||
import org.springframework.stereotype.Service; | |||
import org.springframework.util.LinkedMultiValueMap; | |||
import org.springframework.web.client.RestTemplate; | |||
import java.util.*; | |||
@@ -38,6 +41,8 @@ public class ThirdServiceImpl implements ThirdService { | |||
private PlatformMapper platformMapper; | |||
@Autowired | |||
private RestTemplate restTemplate; | |||
@Autowired | |||
private DictDataMapper dictDataMapper; | |||
/** | |||
* dsp -获取算法实例 | |||
@@ -140,28 +145,12 @@ public class ThirdServiceImpl implements ThirdService { | |||
RoleMenuVo vo = new RoleMenuVo(); | |||
RoleMenuListVo roleMenuListVo = new RoleMenuListVo(); | |||
vo.setRoleId(request.getRoleId()); | |||
String url = ""; | |||
switch (platform.getPlatformCode()) { | |||
//河湖长 | |||
case HhzUrlConstant.HHZ_CLIENT: | |||
url = String.format(Locale.ENGLISH, "%s%s", platform.getPlatformUrl(), HhzUrlConstant.FIND_MENU); | |||
break; | |||
//高速 | |||
case FreeWayConstant.FREEWAY_CLIENT: | |||
url = String.format(Locale.ENGLISH, "%s%s", platform.getPlatformUrl(), FreeWayConstant.FIND_MENU); | |||
break; | |||
//航道 | |||
case WaterWayConstant.WATERWAY_CLIENT: | |||
url = String.format(Locale.ENGLISH, "%s%s", platform.getPlatformUrl(), WaterWayConstant.FIND_MENU); | |||
break; | |||
//飞手 | |||
case PilotConstant.PILOT_CLIENT: | |||
url = String.format(Locale.ENGLISH, "%s%s", platform.getPlatformUrl(), PilotConstant.FIND_MENU); | |||
default: | |||
break; | |||
DictData dictData = getDictData(request.getClientId(), DictConstant.GET_MENU); | |||
if (ObjectUtil.isNull(dictData)) { | |||
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "该业务平台对应字典表数据不存在"); | |||
} | |||
url = String.format(Locale.ENGLISH, "%s%s", platform.getPlatformUrl(), dictData.getValue()); | |||
ParameterizedTypeReference<JsonResult<RoleMenuVo>> parameterizedTypeReference = | |||
new ParameterizedTypeReference<JsonResult<RoleMenuVo>>() { | |||
}; | |||
@@ -214,30 +203,11 @@ public class ThirdServiceImpl implements ThirdService { | |||
clientRoleListDto.setClientId(platform.getPlatformCode()); | |||
String url = platform.getPlatformUrl(); | |||
//根据不同业务平台进行动态匹配 ->并修改对应标识权限 | |||
switch (platform.getPlatformCode()) { | |||
//河湖长 | |||
case HhzUrlConstant.HHZ_CLIENT: | |||
url = url + HhzUrlConstant.FIND_ROLE; | |||
break; | |||
////机场 | |||
//case AirportConstant.AIRPORT_CLIENT: | |||
// url = url + AirportConstant.CREATE_TENANT; | |||
// break; | |||
//高速 | |||
case FreeWayConstant.FREEWAY_CLIENT: | |||
url = url + FreeWayConstant.FIND_ROLE; | |||
break; | |||
//航道 | |||
case WaterWayConstant.WATERWAY_CLIENT: | |||
url = url + WaterWayConstant.FIND_ROLE; | |||
break; | |||
//飞手 | |||
case PilotConstant.PILOT_CLIENT: | |||
url = url + PilotConstant.FIND_ROLE; | |||
break; | |||
default: | |||
break; | |||
DictData dictData = getDictData(clientId, DictConstant.GET_ROLE); | |||
if (ObjectUtil.isNull(dictData)) { | |||
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "该业务平台对应字典表数据不存在"); | |||
} | |||
url = url + dictData.getValue(); | |||
ParameterizedTypeReference<JsonResult<List<RoleDto>>> parameterizedTypeReference = | |||
new ParameterizedTypeReference<JsonResult<List<RoleDto>>>() { | |||
}; | |||
@@ -260,4 +230,19 @@ public class ThirdServiceImpl implements ThirdService { | |||
return clientRoleListDto; | |||
} | |||
/** | |||
* 获取字典表数据 | |||
* | |||
* @param type | |||
* @param dictCode | |||
* @return | |||
*/ | |||
private DictData getDictData(String type, String dictCode) { | |||
DictData dictData = dictDataMapper.selectOne(Wrappers.<DictData>lambdaQuery() | |||
.eq(DictData::getDictType, type) | |||
.eq(DictData::getCode, dictCode) | |||
.eq(DictData::getMark, MarkTypeEnum.VALID.getCode())); | |||
return dictData; | |||
} | |||
} |
@@ -73,4 +73,6 @@ tuoheng: | |||
#dsp配置地址 | |||
dsp-url: http://106.15.64.139:7011/api/web/dsp | |||
# 高德Key | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
# 图片域名 | |||
image-url: https://image.t-aaron.com/ |
@@ -72,4 +72,6 @@ tuoheng: | |||
#dsp配置地址 | |||
dsp-url: https://dsp-portal.t-aaron.com/api/web/dsp | |||
# 高德Key | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
# 图片域名 | |||
image-url: https://image.t-aaron.com/ |
@@ -72,4 +72,6 @@ tuoheng: | |||
#dsp配置地址 | |||
dsp-url: http://106.15.64.139:7011/api/web/dsp | |||
# 高德Key | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
# 图片域名 | |||
image-url: https://image.t-aaron.com/ |
@@ -0,0 +1,31 @@ | |||
<?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.tuoheng.mapper.DictDataMapper"> | |||
<resultMap id="BaseResultMap" type="com.tuoheng.model.entity.DictData"> | |||
<id property="id" column="id" jdbcType="BIGINT"/> | |||
<result property="dictName" column="dict_name" jdbcType="VARCHAR"/> | |||
<result property="dictType" column="dict_type" jdbcType="VARCHAR"/> | |||
<result property="value" column="value" jdbcType="VARCHAR"/> | |||
<result property="code" column="code" jdbcType="VARCHAR"/> | |||
<result property="status" column="status" jdbcType="TINYINT"/> | |||
<result property="createUser" column="create_user" jdbcType="VARCHAR"/> | |||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> | |||
<result property="updateUser" column="update_user" jdbcType="VARCHAR"/> | |||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> | |||
<result property="remark" column="remark" jdbcType="VARCHAR"/> | |||
<result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/> | |||
<result property="mark" column="mark" jdbcType="TINYINT"/> | |||
<result property="sort" column="sort" jdbcType="INTEGER"/> | |||
</resultMap> | |||
<sql id="Base_Column_List"> | |||
id,dict_name,dict_type, | |||
value,code,status, | |||
create_user,create_time,update_user, | |||
update_time,remark,tenant_id, | |||
mark,sort | |||
</sql> | |||
</mapper> |
@@ -0,0 +1,26 @@ | |||
<?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.tuoheng.mapper.DictMapper"> | |||
<resultMap id="BaseResultMap" type="com.tuoheng.model.entity.Dict"> | |||
<id property="id" column="id" jdbcType="BIGINT"/> | |||
<result property="dictName" column="dict_name" jdbcType="VARCHAR"/> | |||
<result property="type" column="type" jdbcType="VARCHAR"/> | |||
<result property="status" column="status" jdbcType="TINYINT"/> | |||
<result property="createUser" column="create_user" jdbcType="VARCHAR"/> | |||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> | |||
<result property="updateUser" column="update_user" jdbcType="VARCHAR"/> | |||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> | |||
<result property="remark" column="remark" jdbcType="VARCHAR"/> | |||
<result property="mark" column="mark" jdbcType="TINYINT"/> | |||
</resultMap> | |||
<sql id="Base_Column_List"> | |||
id,dict_name,type, | |||
status,create_user,create_time, | |||
update_user,update_time,remark, | |||
mark | |||
</sql> | |||
</mapper> |
@@ -0,0 +1,41 @@ | |||
<?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.tuoheng.mapper.information.InspectionFileMapper"> | |||
<resultMap id="BaseResultMap" type="com.tuoheng.model.entity.InspectionFile"> | |||
<id property="id" column="id" jdbcType="OTHER"/> | |||
<result property="fileCode" column="file_code" jdbcType="VARCHAR"/> | |||
<result property="inspectionName" column="inspection_name" jdbcType="VARCHAR"/> | |||
<result property="fileName" column="file_name" jdbcType="VARCHAR"/> | |||
<result property="fileThumbnail" column="file_thumbnail" jdbcType="VARCHAR"/> | |||
<result property="fileOriginal" column="file_original" jdbcType="VARCHAR"/> | |||
<result property="fileImage" column="file_image" jdbcType="VARCHAR"/> | |||
<result property="latitude" column="latitude" jdbcType="VARCHAR"/> | |||
<result property="longitude" column="longitude" jdbcType="VARCHAR"/> | |||
<result property="dealStatus" column="deal_status" jdbcType="TINYINT"/> | |||
<result property="status" column="status" jdbcType="TINYINT"/> | |||
<result property="tenantUsername" column="tenant_username" jdbcType="VARCHAR"/> | |||
<result property="clientId" column="client_id" jdbcType="VARCHAR"/> | |||
<result property="industry" column="industry" jdbcType="VARCHAR"/> | |||
<result property="createUser" column="create_user" jdbcType="INTEGER"/> | |||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> | |||
<result property="updateUser" column="update_user" jdbcType="INTEGER"/> | |||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> | |||
<result property="mark" column="mark" jdbcType="TINYINT"/> | |||
<result property="questionName" column="question_name" jdbcType="VARCHAR"/> | |||
<result property="questionId" column="question_id" jdbcType="VARCHAR"/> | |||
</resultMap> | |||
<sql id="Base_Column_List"> | |||
id,file_code,inspection_name, | |||
file_name,file_thumbnail,file_original, | |||
file_image,latitude,longitude, | |||
deal_status,status,tenant_username, | |||
client_id,industry,create_user, | |||
create_time,update_user,update_time, | |||
mark,question_name,question_id | |||
</sql> | |||
</mapper> |
@@ -0,0 +1,39 @@ | |||
<?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.tuoheng.mapper.information.InspectionMapper"> | |||
<resultMap id="BaseResultMap" type="com.tuoheng.model.entity.Inspection"> | |||
<id property="id" column="id" jdbcType="INTEGER"/> | |||
<result property="code" column="code" jdbcType="VARCHAR"/> | |||
<result property="name" column="name" jdbcType="VARCHAR"/> | |||
<result property="inspectionWay" column="inspection_way" jdbcType="VARCHAR"/> | |||
<result property="airport" column="airport" jdbcType="VARCHAR"/> | |||
<result property="inspectionTime" column="inspection_time" jdbcType="TIMESTAMP"/> | |||
<result property="duration" column="duration" jdbcType="VARCHAR"/> | |||
<result property="status" column="status" jdbcType="TINYINT"/> | |||
<result property="clientId" column="client_id" jdbcType="VARCHAR"/> | |||
<result property="industry" column="industry" jdbcType="VARCHAR"/> | |||
<result property="tenantUsername" column="tenant_username" jdbcType="VARCHAR"/> | |||
<result property="srtUrl" column="srt_url" jdbcType="VARCHAR"/> | |||
<result property="videoUrl" column="video_url" jdbcType="VARCHAR"/> | |||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> | |||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> | |||
<result property="createUser" column="create_user" jdbcType="INTEGER"/> | |||
<result property="updateUser" column="update_user" jdbcType="INTEGER"/> | |||
<result property="mark" column="mark" jdbcType="TINYINT"/> | |||
<result property="inspectionType" column="inspection_type" jdbcType="INTEGER"/> | |||
<result property="flightMileage" column="flight_Mileage" jdbcType="VARCHAR"/> | |||
</resultMap> | |||
<sql id="Base_Column_List"> | |||
id,code,name, | |||
inspection_way,airport,inspection_time, | |||
duration,status,client_id, | |||
industry,tenant_username,srt_url, | |||
video_url,create_time,update_time, | |||
create_user,update_user,mark, | |||
inspection_type,flight_Mileage | |||
</sql> | |||
</mapper> |
@@ -0,0 +1,30 @@ | |||
<?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.tuoheng.mapper.information.ReportMapper"> | |||
<resultMap id="BaseResultMap" type="com.tuoheng.model.entity.Report"> | |||
<id property="id" column="id" jdbcType="SMALLINT"/> | |||
<result property="reportNo" column="report_no" jdbcType="VARCHAR"/> | |||
<result property="inspectionCode" column="inspection_code" jdbcType="VARCHAR"/> | |||
<result property="inspectionName" column="inspection_name" jdbcType="VARCHAR"/> | |||
<result property="reportType" column="report_type" jdbcType="OTHER"/> | |||
<result property="clientId" column="client_id" jdbcType="VARCHAR"/> | |||
<result property="industry" column="industry" jdbcType="VARCHAR"/> | |||
<result property="tenantUsername" column="tenant_username" jdbcType="VARCHAR"/> | |||
<result property="createUser" column="create_user" jdbcType="INTEGER"/> | |||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> | |||
<result property="updateUser" column="update_user" jdbcType="INTEGER"/> | |||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> | |||
<result property="mark" column="mark" jdbcType="TINYINT"/> | |||
</resultMap> | |||
<sql id="Base_Column_List"> | |||
id,report_no,inspection_code, | |||
inspection_name,report_type,client_id, | |||
industry,tenant_username,create_user, | |||
create_time,update_user,update_time, | |||
mark | |||
</sql> | |||
</mapper> |
@@ -0,0 +1,31 @@ | |||
<?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.tuoheng.mapper.information.WorkorderMapper"> | |||
<resultMap id="BaseResultMap" type="com.tuoheng.model.entity.Workorder"> | |||
<id property="id" column="id" jdbcType="OTHER"/> | |||
<result property="code" column="code" jdbcType="VARCHAR"/> | |||
<result property="status" column="status" jdbcType="TINYINT"/> | |||
<result property="workCompleteTime" column="work_complete_time" jdbcType="TIMESTAMP"/> | |||
<result property="createUser" column="create_user" jdbcType="INTEGER"/> | |||
<result property="handledUser" column="handled_user" jdbcType="INTEGER"/> | |||
<result property="industry" column="industry" jdbcType="VARCHAR"/> | |||
<result property="clientId" column="client_id" jdbcType="VARCHAR"/> | |||
<result property="tenantUsername" column="tenant_username" jdbcType="VARCHAR"/> | |||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> | |||
<result property="updateUser" column="update_user" jdbcType="INTEGER"/> | |||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> | |||
<result property="mark" column="mark" jdbcType="TINYINT"/> | |||
<result property="handledUserName" column="handled_user_name" jdbcType="VARCHAR"/> | |||
</resultMap> | |||
<sql id="Base_Column_List"> | |||
id,code,status, | |||
work_complete_time,create_user,handled_user, | |||
industry,client_id,tenant_username, | |||
create_time,update_user,update_time, | |||
mark,handled_user_name | |||
</sql> | |||
</mapper> |
@@ -0,0 +1,78 @@ | |||
spring: | |||
# 注册中心consul地址 | |||
cloud: | |||
consul: | |||
host: 192.168.11.13 # consul 所在服务地址 | |||
port: 8500 # consul 服务端口 | |||
discovery: | |||
## consul ip地址 | |||
hostname: 192.168.11.13 | |||
# 注册到consul的服务名称 | |||
service-name: ${spring.application.name} # 服务提供者名称 | |||
instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${server.port} #实例ID | |||
heartbeat: | |||
enabled: true | |||
prefer-ip-address: true | |||
health-check-path: /actuator/health #健康检查 | |||
health-check-interval: 10s | |||
# 配置数据源 | |||
datasource: | |||
# 使用阿里的Druid连接池 | |||
type: com.alibaba.druid.pool.DruidDataSource | |||
driver-class-name: com.mysql.cj.jdbc.Driver | |||
# 填写你数据库的url、登录名、密码和数据库名 | |||
url: jdbc:mysql://192.168.11.13:3306/tuoheng_oidc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false | |||
username: root | |||
password: idontcare | |||
druid: | |||
# 连接池的配置信息 | |||
# 初始连接数 | |||
initialSize: 5 | |||
# 最小连接池数量 | |||
minIdle: 5 | |||
# 最大连接池数量 | |||
maxActive: 20 | |||
# 配置获取连接等待超时的时间 | |||
maxWait: 60000 | |||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 | |||
timeBetweenEvictionRunsMillis: 60000 | |||
# 配置一个连接在池中最小生存的时间,单位是毫秒 | |||
minEvictableIdleTimeMillis: 300000 | |||
# 配置一个连接在池中最大生存的时间,单位是毫秒 | |||
maxEvictableIdleTimeMillis: 900000 | |||
# 配置检测连接是否有效 | |||
validationQuery: SELECT 1 FROM DUAL | |||
testWhileIdle: true | |||
testOnBorrow: false | |||
testOnReturn: false | |||
# Redis数据源 | |||
redis: | |||
# 缓存库默认索引0 | |||
database: 0 | |||
# Redis服务器地址 | |||
host: 192.168.11.13 | |||
# Redis服务器连接端口 | |||
port: 6379 | |||
# Redis服务器连接密码(默认为空) | |||
password: | |||
# 连接超时时间(毫秒) | |||
timeout: 6000 | |||
# 默认的数据过期时间,主要用于shiro权限管理 | |||
expire: 2592000 | |||
jedis: | |||
pool: | |||
max-active: 1000 # 连接池最大连接数(使用负值表示没有限制) | |||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) | |||
max-idle: 10 # 连接池中的最大空闲连接 | |||
min-idle: 1 # 连接池中的最小空闲连接 | |||
# 自定义配置 | |||
tuoheng: | |||
#airport配置地址 | |||
airport-url: https://airport-test.t-aaron.com | |||
#dsp配置地址 | |||
dsp-url: http://106.15.64.139:7011/api/web/dsp | |||
# 高德Key | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
# 图片域名 | |||
image-url: https://image.t-aaron.com/ |
@@ -73,4 +73,6 @@ tuoheng: | |||
#dsp配置地址 | |||
dsp-url: http://106.15.64.139:7011/api/web/dsp | |||
# 高德Key | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
# 图片域名 | |||
image-url: https://image.t-aaron.com/ |
@@ -72,4 +72,6 @@ tuoheng: | |||
#dsp配置地址 | |||
dsp-url: https://dsp-portal.t-aaron.com/api/web/dsp | |||
# 高德Key | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
# 图片域名 | |||
image-url: https://image.t-aaron.com/ |
@@ -72,4 +72,6 @@ tuoheng: | |||
#dsp配置地址 | |||
dsp-url: http://106.15.64.139:7011/api/web/dsp | |||
# 高德Key | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a | |||
# 图片域名 | |||
image-url: https://image.t-aaron.com/ |