@@ -0,0 +1,61 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.entity.request.index.GetAirportDetailDto; | |||
import com.tuoheng.admin.entity.request.index.GetQuestionListDto; | |||
import com.tuoheng.admin.service.IndexService; | |||
import com.tuoheng.common.common.BaseQuery; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import io.swagger.annotations.ApiOperation; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.validation.annotation.Validated; | |||
import org.springframework.web.bind.annotation.*; | |||
/** | |||
* @author chenjiandong | |||
* @description: TODO | |||
* @date 2022/12/26 10:10 | |||
*/ | |||
@RestController | |||
@RequestMapping("/index") | |||
@ApiOperation(value = "首页") | |||
@Slf4j | |||
public class IndexGisController { | |||
@Autowired | |||
private IndexService indexService; | |||
/** | |||
* 获取任务列表 | |||
* @param baseQuery | |||
* @return | |||
*/ | |||
@PostMapping("/getMissionList") | |||
public JsonResult getMissionList(@RequestBody BaseQuery baseQuery) { | |||
log.info("Index getMissionList start..."); | |||
return JsonResult.success(indexService.getMissionList(baseQuery)); | |||
} | |||
/** | |||
* 获取机场详细信息 | |||
* @param getAirportDetailDto | |||
* @return | |||
*/ | |||
@PostMapping("/getAirportDetail") | |||
public JsonResult getAirportDetail(@RequestBody GetAirportDetailDto getAirportDetailDto) { | |||
log.info("Index getAirportDetail start... param:{}", getAirportDetailDto.toString()); | |||
return indexService.getAirportDetail(getAirportDetailDto); | |||
} | |||
/** | |||
* 获取问题列表 | |||
* @param getQuestionListDto | |||
* @return | |||
*/ | |||
@PostMapping("/getQuestionList") | |||
public JsonResult getQuestionList(@RequestBody @Validated GetQuestionListDto getQuestionListDto) { | |||
log.info("Index getQuestionList start... param:{}", getQuestionListDto.toString()); | |||
return JsonResult.success(indexService.getQuestionList(getQuestionListDto)); | |||
} | |||
} |
@@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import javax.validation.Valid; | |||
import java.io.UnsupportedEncodingException; | |||
import java.util.List; | |||
/** | |||
@@ -46,7 +47,7 @@ public class InspectionController { | |||
*/ | |||
@GetMapping("/airport") | |||
@ApiOperation(value = "获取巡检机场", notes = "获取巡检机场") | |||
public JsonResult airport(BaseQuery baseQuery) { | |||
public JsonResult airport(BaseQuery baseQuery) throws UnsupportedEncodingException { | |||
return JsonResult.success(inspectionService.airport()); | |||
} | |||
@@ -22,7 +22,7 @@ import java.util.Map; | |||
* @since 2021-09-02 | |||
*/ | |||
@RestController | |||
@RequestMapping("/question/type") | |||
@RequestMapping("/question") | |||
public class QuestionTypeController { | |||
@Autowired | |||
@@ -31,7 +31,7 @@ public class QuestionTypeController { | |||
/** | |||
* 获取巡检问题列表 | |||
*/ | |||
@GetMapping("") | |||
@GetMapping("/type") | |||
public JsonResult getQuestionType() { | |||
return JsonResult.success(questionTypeService.list()); | |||
} |
@@ -0,0 +1,35 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.entity.request.WorkOrderRequest; | |||
import com.tuoheng.admin.service.IWorkOrderService; | |||
import com.tuoheng.common.utils.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 Wanghaoran | |||
* @since 2022-12-27 | |||
*/ | |||
@RestController | |||
@RequestMapping("/workOrder") | |||
public class WorkOrderController { | |||
@Autowired | |||
private IWorkOrderService workOrderService; | |||
/** | |||
* 获取工单列表(分页) | |||
* | |||
* @param request 查询条件 | |||
* @return | |||
*/ | |||
@GetMapping("/page") | |||
public JsonResult queryPage(WorkOrderRequest request) { | |||
return workOrderService.queryPage(request); | |||
} | |||
} |
@@ -0,0 +1,55 @@ | |||
package com.tuoheng.admin.entity.domain; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import com.tuoheng.common.common.BaseEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
/** | |||
* 巡检问题处理结果映射实体 | |||
* | |||
* @author WangHaoran | |||
* @date 2022/12/27 | |||
*/ | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_question_handle") | |||
public class QuestionHandle extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 巡检问题文件ID | |||
*/ | |||
private Integer questionId; | |||
/** | |||
* 处理人 | |||
*/ | |||
private Integer handlerUser; | |||
/** | |||
* 处理后图片(多个图片逗号“,”分隔) | |||
*/ | |||
private String handlerImage; | |||
/** | |||
* 处理结果 | |||
*/ | |||
private String handlerResult; | |||
/** | |||
* 处理时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date handlerTime; | |||
} |
@@ -0,0 +1,81 @@ | |||
package com.tuoheng.admin.entity.domain; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import com.tuoheng.common.common.BaseEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
/** | |||
* 巡检问题工单映射实体 | |||
* | |||
* @author WangHaoran | |||
* @date 2022/12/27 | |||
*/ | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_work_order") | |||
public class WorkOrder extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 问题工单号 | |||
*/ | |||
private String code; | |||
/** | |||
* 工单状态:5待分配 10处理中(已分配) 15已完成 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 指派负责人,多个用,隔开 | |||
*/ | |||
private String assignUser; | |||
/** | |||
* 指派备注 | |||
*/ | |||
private String assignNote; | |||
/** | |||
* 指派时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date assignTime; | |||
/** | |||
* 完成时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date finishTime; | |||
/** | |||
* 问题总数 | |||
*/ | |||
@TableField(exist = false) | |||
private Integer questionTotal; | |||
/** | |||
* 未处理问题数 | |||
*/ | |||
@TableField(exist = false) | |||
private Integer unhandledTotal; | |||
/** | |||
* 指派负责人名称 | |||
*/ | |||
@TableField(exist = false) | |||
private String assignUserName; | |||
} |
@@ -0,0 +1,45 @@ | |||
package com.tuoheng.admin.entity.domain; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.tuoheng.common.common.BaseEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
import java.io.Serializable; | |||
/** | |||
* 巡检问题工单子表映射实体 | |||
* | |||
* @author WangHaoran | |||
* @date 2022/12/27 | |||
*/ | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_work_order_question") | |||
public class WorkOrderQuestion extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 巡检问题工单ID | |||
*/ | |||
private Integer workOrderId; | |||
/** | |||
* 巡检问题文件ID | |||
*/ | |||
private Integer questionId; | |||
/** | |||
* 处理状态:0待处理 1已处理 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 处理人员 | |||
*/ | |||
private Integer handleUser; | |||
} |
@@ -0,0 +1,54 @@ | |||
package com.tuoheng.admin.entity.dto.index; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import lombok.experimental.Accessors; | |||
/** | |||
* @author chenjiandong | |||
* @description: TODO | |||
* @date 2022/12/28 14:53 | |||
*/ | |||
@Data | |||
@AllArgsConstructor | |||
@NoArgsConstructor | |||
@Accessors(chain = true) | |||
public class AirportDetailDto { | |||
/** | |||
* 风速 | |||
*/ | |||
private String wspd; | |||
/** | |||
* 风向 | |||
*/ | |||
private String wdir; | |||
/** | |||
* 大气压力 | |||
*/ | |||
private String hpa; | |||
/** | |||
* 空气湿度 | |||
*/ | |||
private String hum; | |||
/** | |||
* 空气温度 | |||
*/ | |||
private String tmp; | |||
/** | |||
* 机场状态 | |||
*/ | |||
private String status; | |||
/** | |||
* 可选挂载 | |||
*/ | |||
private String mountName; | |||
} |
@@ -0,0 +1,62 @@ | |||
package com.tuoheng.admin.entity.dto.index; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import lombok.experimental.Accessors; | |||
/** | |||
* @author chenjiandong | |||
* @description: TODO | |||
* @date 2022/12/27 17:55 | |||
*/ | |||
@Data | |||
@AllArgsConstructor | |||
@NoArgsConstructor | |||
@Accessors(chain = true) | |||
public class QuestionListDto { | |||
private Integer questionId; | |||
private String missionId; | |||
/** | |||
* 任务名称 | |||
*/ | |||
private String missionName; | |||
private String type; | |||
/** | |||
* 问题类型 | |||
*/ | |||
private String typeName; | |||
/** | |||
* 巡检时间 | |||
*/ | |||
private String inspectionTime; | |||
/** | |||
* 问题图片 | |||
*/ | |||
private String fileMarkerUrl; | |||
/** | |||
* 处理结果 | |||
*/ | |||
private String handlerResult; | |||
/** | |||
* 多张处理图片,","相隔 | |||
*/ | |||
private String handlerImage; | |||
private Integer handlerUserId; | |||
private Integer handlerUserName; | |||
private String handlerTime; | |||
} |
@@ -0,0 +1,33 @@ | |||
package com.tuoheng.admin.entity.request; | |||
import com.tuoheng.common.common.BaseQuery; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
@Data | |||
public class WorkOrderRequest extends BaseQuery implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 问题工单号 | |||
*/ | |||
private String code; | |||
/** | |||
* 工单状态:5待分配 10处理中(已分配) 15已完成 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 开始时间 | |||
*/ | |||
private String createStartTime; | |||
/** | |||
* 结束时间 | |||
*/ | |||
private String createEndTime; | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.tuoheng.admin.entity.request.index; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import lombok.experimental.Accessors; | |||
/** | |||
* @author chenjiandong | |||
* @description: TODO | |||
* @date 2022/12/27 17:09 | |||
*/ | |||
@Data | |||
@AllArgsConstructor | |||
@NoArgsConstructor | |||
@Accessors(chain = true) | |||
public class GetAirportDetailDto { | |||
private Integer airportId; | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.tuoheng.admin.entity.request.index; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import lombok.experimental.Accessors; | |||
import javax.validation.constraints.NotEmpty; | |||
/** | |||
* @author chenjiandong | |||
* @description: TODO | |||
* @date 2022/12/27 17:09 | |||
*/ | |||
@Data | |||
public class GetQuestionListDto { | |||
@NotEmpty(message = "startTime can not be empty!") | |||
private String startTime; | |||
@NotEmpty(message = "endTime can not be empty!") | |||
private String endTime; | |||
} |
@@ -0,0 +1,67 @@ | |||
package com.tuoheng.admin.entity.vo; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.util.Date; | |||
@Data | |||
public class WorkOrderInfoVO { | |||
/** | |||
* 问题工单号 | |||
*/ | |||
private String code; | |||
/** | |||
* 工单状态:5待分配 10处理中(已分配) 15已完成 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 指派负责人,多个用,隔开 | |||
*/ | |||
private String assignUser; | |||
/** | |||
* 指派备注 | |||
*/ | |||
private String assignNote; | |||
/** | |||
* 指派时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date assignTime; | |||
/** | |||
* 完成时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date finishTime; | |||
/** | |||
* 问题总数 | |||
*/ | |||
private Integer questionTotal; | |||
/** | |||
* 未处理问题数 | |||
*/ | |||
private Integer unhandledTotal; | |||
/** | |||
* 指派负责人名称 | |||
*/ | |||
private String assignUserName; | |||
/** | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
} |
@@ -0,0 +1,19 @@ | |||
package com.tuoheng.admin.entity.vo.index; | |||
import lombok.Data; | |||
/** | |||
* @author chenjiandong | |||
* @description: TODO | |||
* @date 2022/12/26 10:29 | |||
*/ | |||
@Data | |||
public class IndexMissionVO { | |||
private Integer missionId; | |||
private String missionName; | |||
private Integer status; | |||
} |
@@ -0,0 +1,7 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.domain.QuestionHandle; | |||
public interface QuestionHandleMapper extends BaseMapper<QuestionHandle> { | |||
} |
@@ -2,6 +2,8 @@ package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.domain.Question; | |||
import com.tuoheng.admin.entity.dto.index.QuestionListDto; | |||
import com.tuoheng.admin.entity.request.index.GetQuestionListDto; | |||
import com.tuoheng.admin.entity.vo.QuestionCountVO; | |||
import com.tuoheng.admin.entity.vo.QuestionTypeCountVO; | |||
@@ -18,4 +20,7 @@ public interface QuestionMapper extends BaseMapper<Question> { | |||
List<QuestionCountVO> analyze(Integer missionId); | |||
List<QuestionTypeCountVO> analyzeType(Integer missionId, Integer tenantId); | |||
List<QuestionListDto> getIndexQuestion(GetQuestionListDto getQuestionListDto); | |||
} |
@@ -0,0 +1,7 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.domain.WorkOrder; | |||
public interface WorkOrderMapper extends BaseMapper<WorkOrder> { | |||
} |
@@ -0,0 +1,7 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.domain.WorkOrderQuestion; | |||
public interface WorkOrderQuestionMapper extends BaseMapper<WorkOrderQuestion> { | |||
} |
@@ -9,6 +9,7 @@ import com.tuoheng.common.common.IBaseService; | |||
import com.tuoheng.common.exception.ServiceException; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import java.io.UnsupportedEncodingException; | |||
import java.util.List; | |||
/** | |||
@@ -23,7 +24,7 @@ public interface IThInspectionService extends IBaseService<ThInspection> { | |||
Integer track(InspectionRequest inspectionRequest) throws ServiceException; | |||
List<AirPortVO> airport() throws ServiceException; | |||
List<AirPortVO> airport() throws ServiceException, UnsupportedEncodingException; | |||
List<AirLineVO> airLine(Integer droneId) throws ServiceException; | |||
@@ -0,0 +1,10 @@ | |||
package com.tuoheng.admin.service; | |||
import com.tuoheng.admin.entity.domain.WorkOrder; | |||
import com.tuoheng.admin.entity.request.WorkOrderRequest; | |||
import com.tuoheng.common.common.IBaseService; | |||
import com.tuoheng.common.utils.JsonResult; | |||
public interface IWorkOrderService extends IBaseService<WorkOrder> { | |||
JsonResult queryPage(WorkOrderRequest request); | |||
} |
@@ -0,0 +1,26 @@ | |||
package com.tuoheng.admin.service; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.dto.index.QuestionListDto; | |||
import com.tuoheng.admin.entity.request.index.GetAirportDetailDto; | |||
import com.tuoheng.admin.entity.request.index.GetQuestionListDto; | |||
import com.tuoheng.admin.entity.vo.MissionVO; | |||
import com.tuoheng.common.common.BaseQuery; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import java.util.List; | |||
/** | |||
* @author chenjiandong | |||
* @description: TODO | |||
* @date 2022/12/26 10:24 | |||
*/ | |||
public interface IndexService { | |||
IPage<MissionVO> getMissionList(BaseQuery baseQuery); | |||
JsonResult getAirportDetail(GetAirportDetailDto getAirportDetailDto); | |||
List<QuestionListDto> getQuestionList(GetQuestionListDto getQuestionListDto); | |||
} |
@@ -0,0 +1,128 @@ | |||
package com.tuoheng.admin.service.impl; | |||
import cn.hutool.core.util.ObjectUtil; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.tuoheng.admin.entity.domain.Question; | |||
import com.tuoheng.admin.entity.domain.ThMission; | |||
import com.tuoheng.admin.entity.dto.index.AirportDetailDto; | |||
import com.tuoheng.admin.entity.dto.index.QuestionListDto; | |||
import com.tuoheng.admin.entity.request.index.GetAirportDetailDto; | |||
import com.tuoheng.admin.entity.request.index.GetQuestionListDto; | |||
import com.tuoheng.admin.entity.vo.MissionVO; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.mapper.QuestionMapper; | |||
import com.tuoheng.admin.mapper.ThMissionMapper; | |||
import com.tuoheng.admin.service.IndexService; | |||
import com.tuoheng.common.common.BaseQuery; | |||
import com.tuoheng.common.config.CommonConfig; | |||
import com.tuoheng.common.utils.HttpUtils; | |||
import com.tuoheng.common.utils.JacksonUtil; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.BeanUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import org.springframework.transaction.annotation.Transactional; | |||
import java.math.BigDecimal; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import java.util.Objects; | |||
/** | |||
* @author chenjiandong | |||
* @description: TODO | |||
* @date 2022/12/26 10:24 | |||
*/ | |||
@Service | |||
@Slf4j | |||
public class IndexServiceImpl implements IndexService { | |||
@Autowired | |||
private ThMissionMapper thMissionMapper; | |||
@Autowired | |||
private QuestionMapper questionMapper; | |||
@Override | |||
@Transactional(readOnly = true) | |||
public IPage<MissionVO> getMissionList(BaseQuery baseQuery){ | |||
Page<ThMission> page = new Page<>(); | |||
page.setSize(baseQuery.getLimit() != null ? baseQuery.getLimit() : 10); | |||
page.setCurrent(baseQuery.getPage() != null ? baseQuery.getPage() : 0); | |||
LambdaQueryWrapper<ThMission> queryMission=new LambdaQueryWrapper<>(); | |||
queryMission.eq(ThMission::getMark,MarkTypeEnum.VALID.getCode()).orderByDesc(ThMission::getCreateTime); | |||
IPage<ThMission> thMissionIPage = thMissionMapper.selectPage(page, queryMission); | |||
List<ThMission> records = thMissionIPage.getRecords(); | |||
List<MissionVO> result=new ArrayList<>(); | |||
records.forEach(mission->{ | |||
MissionVO missionVO=new MissionVO(); | |||
BeanUtils.copyProperties(mission,missionVO); | |||
//获取最后一次的飞行时间 | |||
result.add(missionVO); | |||
}); | |||
IPage<MissionVO> resultPage=new Page<>(); | |||
resultPage.setCurrent(thMissionIPage.getCurrent()); | |||
resultPage.setPages(thMissionIPage.getPages()); | |||
resultPage.setSize(thMissionIPage.getSize()); | |||
resultPage.setTotal(thMissionIPage.getTotal()); | |||
resultPage.setRecords(result); | |||
return resultPage; | |||
} | |||
@Override | |||
public JsonResult getAirportDetail(GetAirportDetailDto getAirportDetailDto){ | |||
String url = CommonConfig.airportUrl +"/api/airportInterface/getAirportStatus"; | |||
String param = "airportId=" + getAirportDetailDto.getAirportId(); | |||
String result = HttpUtils.sendGet(url, param); | |||
JsonResult jsonResult = JacksonUtil.json2pojo(result, JsonResult.class); | |||
AirportDetailDto airportDetailDto = new AirportDetailDto(); | |||
JSONObject dataObject = (JSONObject) JSONObject.toJSON(jsonResult.getData()); | |||
JSONObject wthJson = dataObject.getJSONObject("WTH"); | |||
if(Objects.nonNull(wthJson)){ | |||
JSONObject parmJson = wthJson.getJSONObject("parm"); | |||
airportDetailDto.setWspd(parmJson.getString("WSPD") + "m/s") | |||
.setWdir(parmJson.getString("WDIR") + "度"); | |||
//用角度表示风向,是把圆周分成360度,北风(N)是0度(即360度),东风(E)是90度,南风(S)是180度,西风(W)是270度 | |||
BigDecimal hpa = parmJson.getBigDecimal("Hpa"); | |||
BigDecimal mpa = hpa.divide(new BigDecimal(100000), 1, BigDecimal.ROUND_HALF_UP); | |||
airportDetailDto.setHpa(mpa + "Mpa"); | |||
} | |||
JSONObject tahJson = dataObject.getJSONObject("TAH"); | |||
if(Objects.nonNull(tahJson)){ | |||
JSONObject parmJson = wthJson.getJSONObject("parm"); | |||
BigDecimal hum = parmJson.getBigDecimal("Hum").divide(new BigDecimal(10), 1, BigDecimal.ROUND_HALF_UP); | |||
airportDetailDto.setHum(hum + "rh"); | |||
BigDecimal tmp = parmJson.getBigDecimal("Tmp").divide(new BigDecimal(10), 1, BigDecimal.ROUND_HALF_UP); | |||
airportDetailDto.setTmp(tmp + "℃"); | |||
} | |||
JSONObject mountJson = dataObject.getJSONObject("mount"); | |||
if(Objects.nonNull(mountJson)){ | |||
airportDetailDto.setMountName(mountJson.getString("cameraName") + "、" + | |||
mountJson.getString("megaphoneName") + "、" + | |||
mountJson.getString("searchlightName") | |||
); | |||
} | |||
airportDetailDto.setStatus(dataObject.getString("status")); | |||
return JsonResult.success(airportDetailDto); | |||
} | |||
@Override | |||
@Transactional(readOnly = true) | |||
public List<QuestionListDto> getQuestionList(GetQuestionListDto getQuestionListDto){ | |||
if(ObjectUtil.isNotEmpty(getQuestionListDto.getStartTime()) && ObjectUtil.isNotEmpty(getQuestionListDto.getEndTime())){ | |||
getQuestionListDto.setStartTime(getQuestionListDto.getStartTime() + " 00:00:00"); | |||
getQuestionListDto.setEndTime(getQuestionListDto.getEndTime() + " 23:59:59"); | |||
} | |||
List<QuestionListDto> questionListDtoList = questionMapper.getIndexQuestion(getQuestionListDto); | |||
return questionListDtoList; | |||
} | |||
} |
@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil; | |||
import com.alibaba.fastjson.JSONArray; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.tuoheng.admin.entity.domain.Tenant; | |||
import com.tuoheng.admin.entity.domain.ThInspection; | |||
import com.tuoheng.admin.entity.domain.ThMission; | |||
import com.tuoheng.admin.entity.request.InspectionRequest; | |||
@@ -14,6 +15,7 @@ import com.tuoheng.admin.entity.vo.*; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.TaskStatusEnum; | |||
import com.tuoheng.admin.enums.UpdateOrCreateEnum; | |||
import com.tuoheng.admin.mapper.TenantMapper; | |||
import com.tuoheng.admin.mapper.ThInspectionMapper; | |||
import com.tuoheng.admin.mapper.ThMissionMapper; | |||
import com.tuoheng.admin.service.IMissionService; | |||
@@ -30,6 +32,8 @@ import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.http.HttpStatus; | |||
import org.springframework.stereotype.Service; | |||
import java.io.UnsupportedEncodingException; | |||
import java.net.URLEncoder; | |||
import java.time.LocalDate; | |||
import java.util.ArrayList; | |||
import java.util.Date; | |||
@@ -52,6 +56,9 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, | |||
@Autowired | |||
private ThMissionMapper missionMapper; | |||
@Autowired | |||
private TenantMapper tenantMapper; | |||
@Autowired | |||
private RedisUtils redisUtils; | |||
@@ -96,10 +103,11 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, | |||
} | |||
@Override | |||
public List<AirPortVO> airport() throws ServiceException { | |||
public List<AirPortVO> airport() throws ServiceException, UnsupportedEncodingException { | |||
//这边需要配置到yml文件里面 | |||
Tenant tenant = tenantMapper.selectById(ShiroUtils.getTenantId()); | |||
String url = CommonConfig.airportUrl +"/api/airportInterface/airportList"; | |||
String param="page=1&limit=10"; | |||
String param = "page=1&limit=1000&tenantName=" + URLEncoder.encode(tenant.getName(), "UTF-8"); | |||
String airPortStr = HttpUtils.sendGet(url, param); | |||
JsonResult jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); | |||
if(ObjectUtil.isEmpty(jsonResult) || (!ObjectUtil.isEmpty(jsonResult.getData()) &&jsonResult.getCode() != 0)) { |
@@ -0,0 +1,96 @@ | |||
package com.tuoheng.admin.service.impl; | |||
import cn.hutool.core.util.ObjectUtil; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.tuoheng.admin.common.ServiceExceptionEnum; | |||
import com.tuoheng.admin.entity.domain.WorkOrder; | |||
import com.tuoheng.admin.entity.domain.WorkOrderQuestion; | |||
import com.tuoheng.admin.entity.request.WorkOrderRequest; | |||
import com.tuoheng.admin.entity.vo.WorkOrderInfoVO; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.mapper.WorkOrderMapper; | |||
import com.tuoheng.admin.mapper.WorkOrderQuestionMapper; | |||
import com.tuoheng.admin.service.IWorkOrderService; | |||
import com.tuoheng.common.common.BaseServiceImpl; | |||
import com.tuoheng.common.exception.ServiceException; | |||
import com.tuoheng.common.utils.DateUtils; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import com.tuoheng.common.utils.StringUtils; | |||
import com.tuoheng.system.entity.User; | |||
import com.tuoheng.system.mapper.UserMapper; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.BeanUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.Arrays; | |||
import java.util.Date; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
@Slf4j | |||
@Service | |||
public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkOrder> implements IWorkOrderService { | |||
@Autowired | |||
private WorkOrderMapper workOrderMapper; | |||
@Autowired | |||
private WorkOrderQuestionMapper workOrderQuestionMapper; | |||
@Autowired | |||
private UserMapper userMapper; | |||
@Override | |||
public JsonResult queryPage(WorkOrderRequest request) { | |||
if(null == request.getPage() || null == request.getLimit()){ | |||
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); | |||
} | |||
Date startDate = null; | |||
Date endDate = null; | |||
if(StringUtils.isNotEmpty(request.getCreateStartTime()) && StringUtils.isNotEmpty(request.getCreateEndTime())){ | |||
String startTime = request.getCreateStartTime() + "00:00:00"; | |||
String endTime = request.getCreateEndTime() + "23:59:59"; | |||
startDate = DateUtils.dateTime(DateUtils.YYYY_MM_DD, startTime); | |||
endDate = DateUtils.dateTime(DateUtils.YYYY_MM_DD, endTime); | |||
} | |||
// 获取分页数据 | |||
IPage<WorkOrder> page = new Page<>(request.getPage(), request.getLimit()); | |||
IPage<WorkOrder> pageData = workOrderMapper.selectPage(page, new LambdaQueryWrapper<WorkOrder>() | |||
.like(StringUtils.isNotEmpty(request.getCode()), WorkOrder::getCode, request.getCode()) | |||
.eq(ObjectUtil.isNotEmpty(request.getStatus()), WorkOrder::getStatus, request.getStatus()) | |||
.between(ObjectUtil.isNotNull(startDate),WorkOrder::getCreateTime, startDate, endDate) | |||
.eq(WorkOrder::getMark, MarkTypeEnum.VALID.getCode()) | |||
.orderByDesc(WorkOrder::getCreateTime)); | |||
pageData.getRecords().stream().map(vo -> { | |||
//查询问题总数 | |||
Integer questionTotal = workOrderQuestionMapper.selectCount(new LambdaQueryWrapper<WorkOrderQuestion>() | |||
.eq(WorkOrderQuestion::getWorkOrderId, vo.getId())); | |||
vo.setQuestionTotal(questionTotal); | |||
//查询未处理问题数 | |||
Integer unhandledTotal = workOrderQuestionMapper.selectCount(new LambdaQueryWrapper<WorkOrderQuestion>() | |||
.eq(WorkOrderQuestion::getWorkOrderId, vo.getId()) | |||
.eq(WorkOrderQuestion::getStatus, 0)); | |||
vo.setUnhandledTotal(unhandledTotal); | |||
//处理人员名称 | |||
if (StringUtils.isNotEmpty(vo.getAssignUser())) { | |||
List<String> assignUser = Arrays.asList(vo.getAssignUser().split(",")); | |||
List<Integer> assignUserInteger = assignUser.stream().map(Integer::parseInt).collect(Collectors.toList()); | |||
List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().in(User::getId, assignUserInteger)); | |||
List<String> assignUserNameList = userList.stream().map(User::getRealname).collect(Collectors.toList()); | |||
vo.setAssignUserName(String.join(",", assignUserNameList)); | |||
} | |||
return vo; | |||
}).collect(Collectors.toList()); | |||
return JsonResult.success(pageData); | |||
} | |||
} |
@@ -1,220 +0,0 @@ | |||
# 端口配置 | |||
server: | |||
port: 9099 | |||
servlet: | |||
# 项目的前缀名 | |||
context-path: /api | |||
tomcat: | |||
basedir: /data/java/tuoheng_lc/uploads/doc | |||
# 自定义配置 | |||
tuoheng: | |||
# 图片域名 | |||
image-url: https://image.t-aaron.com/ | |||
# OSS域名 | |||
oss-url: https://ta-tech-image.oss-cn-shanghai.aliyuncs.com | |||
# 机场域名 | |||
airport-url: https://airport.t-aaron.com/ | |||
# 视频域名 | |||
video-url: https://vod.play.t-aaron.com/ | |||
# 高德Key | |||
gaodeKey: 8eb26a06684d34501e5a56dcc2f5af15 | |||
# 通道地址 | |||
live-channel-domain-url: https://streaming.t-aaron.com/ | |||
# DSP服务域名 | |||
#dsp-domain-url: http://192.168.11.241:1011/ | |||
dsp-domain-url: https://dsp-portal.t-aaron.com/ | |||
# DSP回调地址 | |||
dsp-callback-url: https://lcxj.t-aaron.com/api/question/{requestId}/callback | |||
#阿里云 | |||
aliyuncsVod: | |||
accessKeyId: LTAI5tE7KWN9fsuGU7DyfYF4 | |||
accessKeySecret: yPPCyfsqWgrTuoz5H4sisY0COclx8E | |||
roleArn: acs:ram::1399733914954856:role/ramosstest | |||
bucketName: ta-tech-image | |||
spring: | |||
# 配置数据源 | |||
datasource: | |||
# 使用阿里的Druid连接池 | |||
type: com.alibaba.druid.pool.DruidDataSource | |||
driver-class-name: com.mysql.cj.jdbc.Driver | |||
# 填写你数据库的url、登录名、密码和数据库名 | |||
url: jdbc:mysql://localhost:3306/tuoheng_lc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false | |||
username: root | |||
password: TH144#2022 | |||
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 | |||
# 打开PSCache,并且指定每个连接上PSCache的大小 | |||
poolPreparedStatements: true | |||
maxPoolPreparedStatementPerConnectionSize: 20 | |||
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 | |||
filters: stat,wall,log4j | |||
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录 | |||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 | |||
# 配置DruidStatFilter | |||
webStatFilter: | |||
enabled: true | |||
url-pattern: "/*" | |||
exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*" | |||
# 配置DruidStatViewServlet | |||
statViewServlet: | |||
url-pattern: "/druid/*" | |||
# IP白名单(没有配置或者为空,则允许所有访问) | |||
allow: 127.0.0.1,192.168.163.1 | |||
# IP黑名单 (存在共同时,deny优先于allow) | |||
deny: 192.168.1.73 | |||
# 禁用HTML页面上的“Reset All”功能 | |||
reset-enable: false | |||
# 登录名 | |||
login-username: admin | |||
# 登录密码 | |||
login-password: 123456 | |||
# Redis数据源 | |||
redis: | |||
# 缓存库默认索引0 | |||
database: 0 | |||
# Redis服务器地址 | |||
host: 127.0.0.1 | |||
# Redis服务器连接端口 | |||
port: 6379 | |||
# Redis服务器连接密码(默认为空) | |||
password: | |||
# 连接超时时间(毫秒) | |||
timeout: 6000 | |||
# 默认的数据过期时间,主要用于shiro权限管理 | |||
expire: 2592000 | |||
jedis: | |||
pool: | |||
max-active: 1000 # 连接池最大连接数(使用负值表示没有限制) | |||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) | |||
max-idle: 10 # 连接池中的最大空闲连接 | |||
min-idle: 1 # 连接池中的最小空闲连接 | |||
servlet: | |||
multipart: | |||
# 过滤springmvc的文件上传 | |||
enabled: false | |||
# 单个文件最大值 | |||
max-file-size: 50MB | |||
# 上传文件总的最大值 | |||
max-request-size: 100MB | |||
#邮件配置 | |||
mail: | |||
# 设置邮箱主机 | |||
host: smtp.qq.com | |||
# 开启邮箱POP3/SMTP服务,获取客户端授权码(注意并不是邮箱密码,而是授权码) | |||
password: | |||
# 邮箱的用户名 | |||
username: | |||
properties: | |||
mail: | |||
smtp: | |||
# 设置是否需要认证,如果为true,那么用户名和密码就必须的。如果设置false,可以不设置用户名和密码,当然也得看你的对接的平台是否支持无密码进行访问的。 | |||
auth: true | |||
starttls: | |||
# STARTTLS[1] 是对纯文本通信协议的扩展。它提供一种方式将纯文本连接升级为加密连接(TLS或SSL),而不是另外使用一个端口作加密通信。 | |||
enable: true | |||
require: true | |||
alisms: | |||
accessKeyId: | |||
accessKeySecret: | |||
regionId: cn-hangzhou | |||
signName: 拓恒 | |||
templateCode: | |||
kafka: | |||
common: | |||
enable: false | |||
bootstrap-servers: 101.132.127.1:19092 | |||
alg-online-results-topic: alg-task-results | |||
alg-online-results-group-id: alg-task-group-prod | |||
alg-offline-tasks-topic: alg-offline-tasks | |||
alg-online-tasks-topic: alg-online-tasks | |||
file: | |||
#上传的服务器上的映射文件夹 | |||
accessPath: /uploads/ | |||
#静态资源对外暴露的访问路径 | |||
staticAccessPath: /** | |||
#静态资源实际存储路径 | |||
uploadFolder: /data/java/tuoheng_lc/tuoheng_lc_web/dist/lc/ | |||
docDownLoad: http://139.196.193.144:8088 | |||
# Shiro | |||
shiro: | |||
cipher-key: f/SX5TIve5WWzT4aQlABJA== | |||
cookie-name: shiro-cookie2 | |||
user: | |||
# 登录地址 | |||
loginUrl: /login | |||
# 权限认证失败地址 | |||
unauthorizedUrl: /unauth | |||
# 首页地址 | |||
indexUrl: /index | |||
# 验证码开关 | |||
captchaEnabled: true | |||
# 验证码类型 math 数组计算 char 字符 | |||
captchaType: math | |||
cookie: | |||
# 设置Cookie的域名 默认空,即当前访问的域名 | |||
domain: | |||
# 设置cookie的有效访问路径 | |||
path: / | |||
# 设置HttpOnly属性 | |||
httpOnly: true | |||
# 设置Cookie的过期时间,天为单位 | |||
maxAge: 30 | |||
session: | |||
# Session超时时间(默认30分钟) | |||
expireTime: 300 | |||
# 同步session到数据库的周期(默认1分钟) | |||
dbSyncPeriod: 1 | |||
# 相隔多久检查一次session的有效性,默认就是10分钟 | |||
validationInterval: 10 | |||
# 代码生成 | |||
generate: | |||
# 作者 | |||
author: 拓恒 | |||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool | |||
packageName: com.tuoheng.system | |||
# 模块名 | |||
moduleName: tuoheng-system | |||
# 自动去除表前缀,默认是true | |||
autoRemovePre: true | |||
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔) | |||
tablePrefix: sys_ | |||
xxl: | |||
enable: false | |||
job: | |||
admin: | |||
addresses: http://172.16.1.31:8110/xxl-job-admin | |||
accessToken: tuoheng | |||
executor: | |||
appname: xxl-job-executor-lc | |||
address: | |||
ip: | |||
# 多个后台,端口号不能相同 | |||
port: 9999 | |||
logpath: /data/java/logs/xxl-job/jobhandler | |||
logretentiondays: 15 |
@@ -13,7 +13,7 @@ tuoheng: | |||
# OSS域名 | |||
oss-url: https://ta-tech-image.oss-cn-shanghai.aliyuncs.com | |||
# 机场域名 | |||
airport-url: https://airport.t-aaron.com/ | |||
airport-url: http://192.168.11.22:9060/ | |||
# 视频域名 | |||
video-url: https://vod.play.t-aaron.com/ | |||
# 高德Key | |||
@@ -142,14 +142,6 @@ spring: | |||
regionId: cn-hangzhou | |||
signName: 拓恒 | |||
templateCode: | |||
kafka: | |||
common: | |||
enable: false | |||
bootstrap-servers: 192.168.11.13:9092 | |||
alg-online-results-topic: alg-task-results | |||
alg-online-results-group-id: alg-task-group-dev | |||
alg-offline-tasks-topic: alg-offline-tasks | |||
alg-online-tasks-topic: alg-online-tasks | |||
file: | |||
#上传的服务器上的映射文件夹 | |||
accessPath: /uploads/ |
@@ -13,7 +13,7 @@ tuoheng: | |||
# OSS域名 | |||
oss-url: https://ta-tech-image.oss-cn-shanghai.aliyuncs.com | |||
# 机场域名 | |||
airport-url: https://airport.t-aaron.com/ | |||
airport-url: http://192.168.11.22:9060/ | |||
# 视频域名 | |||
video-url: http://vod.play.t-aaron.com/ | |||
# 高德Key | |||
@@ -142,14 +142,6 @@ spring: | |||
regionId: cn-hangzhou | |||
signName: 拓恒 | |||
templateCode: | |||
kafka: | |||
common: | |||
enable: false | |||
bootstrap-servers: 192.168.11.13:9092 | |||
alg-online-results-topic: alg-task-results | |||
alg-online-results-group-id: alg-task-group-local | |||
alg-offline-tasks-topic: alg-offline-tasks | |||
alg-online-tasks-topic: alg-online-tasks | |||
file: | |||
#上传的服务器上的映射文件夹 | |||
accessPath: /uploads/ |
@@ -143,7 +143,6 @@ spring: | |||
regionId: cn-hangzhou | |||
signName: 拓恒 | |||
templateCode: | |||
file: | |||
#上传的服务器上的映射文件夹 | |||
accessPath: /uploads/ |
@@ -13,7 +13,7 @@ tuoheng: | |||
# OSS域名 | |||
oss-url: https://ta-tech-image.oss-cn-shanghai.aliyuncs.com | |||
# 机场域名 | |||
airport-url: https://airport.t-aaron.com/ | |||
airport-url: https://airport-test.t-aaron.com/ | |||
# 视频域名 | |||
video-url: https://vod.play.t-aaron.com/ | |||
# 高德Key | |||
@@ -21,10 +21,9 @@ tuoheng: | |||
# 通道地址 | |||
live-channel-domain-url: https://streaming.t-aaron.com/ | |||
# DSP服务域名 | |||
#dsp-domain-url: http://192.168.11.241:1011/ | |||
dsp-domain-url: http://139.196.193.144:47821/ | |||
dsp-domain-url: http://172.15.1.11:7011/ | |||
# DSP回调地址 | |||
dsp-callback-url: http://139.196.193.144:9099/api/question/{requestId}/callback | |||
dsp-callback-url: http://106.15.120.154:9099/api/question/{requestId}/callback | |||
#阿里云 | |||
aliyuncsVod: | |||
accessKeyId: LTAI5tE7KWN9fsuGU7DyfYF4 | |||
@@ -39,9 +38,9 @@ spring: | |||
type: com.alibaba.druid.pool.DruidDataSource | |||
driver-class-name: com.mysql.cj.jdbc.Driver | |||
# 填写你数据库的url、登录名、密码和数据库名 | |||
url: jdbc:mysql://192.168.11.242:3306/tuoheng_lc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false | |||
url: jdbc:mysql://rm-uf6z740323e8053pj4o.mysql.rds.aliyuncs.com:3306/tuoheng_lc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false | |||
username: root | |||
password: idontcare | |||
password: TH22#2022 | |||
druid: | |||
# 连接池的配置信息 | |||
# 初始连接数 | |||
@@ -94,7 +93,7 @@ spring: | |||
# 缓存库默认索引0 | |||
database: 0 | |||
# Redis服务器地址 | |||
host: 192.168.11.242 | |||
host: r-uf6cdzjifj20jszykr.redis.rds.aliyuncs.com | |||
# Redis服务器连接端口 | |||
port: 6379 | |||
# Redis服务器连接密码(默认为空) | |||
@@ -142,14 +141,6 @@ spring: | |||
regionId: cn-hangzhou | |||
signName: 拓恒 | |||
templateCode: | |||
kafka: | |||
common: | |||
enable: false | |||
bootstrap-servers: 192.168.11.242:9092 | |||
alg-online-results-topic: alg-task-results | |||
alg-online-results-group-id: hhz-test | |||
alg-offline-tasks-topic: alg-offline-tasks | |||
alg-online-tasks-topic: alg-online-tasks | |||
file: | |||
#上传的服务器上的映射文件夹 | |||
accessPath: /uploads/ | |||
@@ -157,7 +148,7 @@ file: | |||
staticAccessPath: /** | |||
#静态资源实际存储路径 | |||
uploadFolder: /data/java/tuoheng_lc/tuoheng_lc_web/dist/lc/ | |||
docDownLoad: http://192.168.11.241:8088 | |||
docDownLoad: http://106.15.120.154:8088 | |||
# Shiro | |||
shiro: |
@@ -7,10 +7,27 @@ | |||
where q.mission_id=#{missionId} | |||
group by q.status; | |||
</select> | |||
<select id="analyzeType" resultType="com.tuoheng.admin.entity.vo.QuestionTypeCountVO"> | |||
select q.type,count(q.id) as quantity | |||
from th_question q | |||
where q.mission_id=#{missionId} and q.status=1 | |||
group by q.type; | |||
</select> | |||
<select id="getIndexQuestion" parameterType="com.tuoheng.admin.entity.request.index.GetQuestionListDto" resultType="com.tuoheng.admin.entity.dto.index.QuestionListDto"> | |||
select a.create_time,a.id as questionId, a.mission_id as missionId, a.type, b.content as typeName, | |||
a.mission_name as missionName, c.execution_start_time as inspectionTime, | |||
a.file_marker_url as fileMarkerUrl, d.handler_result as handlerResult, | |||
d.handler_image as handlerImage, d.handler_user as handlerUserId, e.realname as handlerUserName, | |||
d.handler_time as handlerTime | |||
from th_question a | |||
inner join th_question_type b on b.code = a.type and b.mark = 1 | |||
inner join th_mission c on c.id = a.mission_id and c.mark = 1 | |||
left join th_question_handle d on d.question_id = a.id | |||
left join sys_user e on e.id = d.handler_user | |||
where a.mark = 1 and a.create_time BETWEEN #{startTime} AND #{endTime} | |||
order by a.create_time desc limit 200 | |||
</select> | |||
</mapper> |