@@ -1,56 +0,0 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.request.QuestionFileRequest; | |||
import com.tuoheng.admin.entity.vo.QuestionDetailVo; | |||
import com.tuoheng.admin.entity.vo.QuestionFileVo; | |||
import org.springframework.web.bind.annotation.*; | |||
import java.util.List; | |||
/** | |||
* 巡检附件 前端控制器 | |||
* | |||
* @author: WangHaoran | |||
* @date: 2021/9/28 | |||
*/ | |||
@RestController | |||
@RequestMapping("/inspectionFile") | |||
public class InspectionFileController { | |||
// @Autowired | |||
// private IThInspectionFileService thInspectionFileService; | |||
/** | |||
* 查询问题清单列表 | |||
* | |||
* @author: WangHaoran | |||
* @date: 2021/9/28 | |||
*/ | |||
@GetMapping("/queryQuestionFileList") | |||
public IPage<QuestionFileVo> queryQuestionFileList(QuestionFileRequest request) { | |||
return null;//thInspectionFileService.queryQuestionFileList(request); | |||
} | |||
/** | |||
* 查询问题清单 详情 | |||
* | |||
* @author: WangHaoran | |||
* @date: 2021/9/28 | |||
*/ | |||
@GetMapping("/queryQuestionDetail") | |||
public QuestionDetailVo queryQuestionDetail(Integer fileId) { | |||
return null;//thInspectionFileService.queryQuestionDetail(fileId); | |||
} | |||
/** | |||
* 查询问题清单 GIS展示 | |||
* | |||
* @author: WangHaoran | |||
* @date: 2021/9/28 | |||
*/ | |||
@GetMapping("/queryQuestionLocationList") | |||
public List<QuestionDetailVo> queryQuestionLocationList(Integer inspectionId) { | |||
return null;//thInspectionFileService.queryQuestionLocationList(inspectionId); | |||
} | |||
} |
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.domain.ThMission; | |||
import com.tuoheng.admin.entity.request.MissionQuery; | |||
import com.tuoheng.admin.entity.request.MissionRequest; | |||
import com.tuoheng.admin.entity.request.QuestionRequest; | |||
import com.tuoheng.admin.entity.vo.MissionVO; | |||
import com.tuoheng.admin.service.IMissionService; | |||
import com.tuoheng.common.exception.ServiceException; | |||
@@ -50,7 +51,7 @@ public class MissionController { | |||
//判断任务名称不能重复 | |||
LambdaQueryWrapper<ThMission> lambdaQueryWrapper= new LambdaQueryWrapper<>(); | |||
lambdaQueryWrapper.eq(ThMission::getName, request.getName()); | |||
//lambdaQueryWrapper.eq(ThMission::getTenantId, ShiroUtils.getTenantId()); | |||
lambdaQueryWrapper.eq(ThMission::getTenantId, ShiroUtils.getTenantId()); | |||
List<ThMission> missionList = missionService.getList(lambdaQueryWrapper); | |||
if(!ObjectUtils.isEmpty(missionList) || missionList.size() >0 ){ | |||
throw new ServiceException(HttpStatus.SC_BAD_REQUEST,"任务名称不能重复"); | |||
@@ -91,41 +92,4 @@ public class MissionController { | |||
return JsonResult.success(missionService.findById(id)); | |||
} | |||
/** | |||
* 查询问题以及问题类型列表 | |||
*/ | |||
/** | |||
* 修改问题 | |||
*/ | |||
/** | |||
* 查询问题详情 | |||
*/ | |||
/** | |||
* 问题确认(支持批量) | |||
*/ | |||
/** | |||
* 问题忽略(支持批量) | |||
*/ | |||
/** | |||
* 提交并生成报告 | |||
*/ | |||
} |
@@ -1,16 +1,15 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.tuoheng.admin.entity.domain.ThInspectionFile; | |||
import com.tuoheng.admin.entity.request.QueryQuestionPictureRequest; | |||
import com.tuoheng.admin.entity.request.QueryQuestionRequest; | |||
import com.tuoheng.admin.entity.request.QuestionInventoryRequest; | |||
import com.tuoheng.admin.entity.vo.QuestionInventoryVo; | |||
import com.tuoheng.admin.entity.vo.ThInspectionQuestionPictureVo; | |||
import com.tuoheng.admin.entity.vo.ThInspectionQuestionVo; | |||
import com.tuoheng.common.common.OperationEnum; | |||
import org.springframework.validation.annotation.Validated; | |||
import com.tuoheng.admin.entity.domain.Question; | |||
import com.tuoheng.admin.entity.domain.QuestionType; | |||
import com.tuoheng.admin.entity.request.QuestionRequest; | |||
import com.tuoheng.admin.entity.request.QuestionTypeQuery; | |||
import com.tuoheng.admin.service.IMissionService; | |||
import com.tuoheng.admin.service.IQuestionService; | |||
import com.tuoheng.admin.service.IQuestionTypeService; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
/** | |||
@@ -22,106 +21,73 @@ import org.springframework.web.bind.annotation.*; | |||
@RestController | |||
@RequestMapping("/question") | |||
public class QuestionController { | |||
/** | |||
* 巡检问题接口 | |||
*/ | |||
// @Autowired | |||
// private IThInspectionFileService iThInspectionFileService; | |||
/** | |||
* 查询 巡检任务问题 列表 | |||
* | |||
* @author zhu_zishuang | |||
* @date 2021/9/1 | |||
*/ | |||
@GetMapping("/findList") | |||
public IPage<ThInspectionQuestionVo> findList(QueryQuestionRequest request) { | |||
return null;//iThInspectionFileService.findList(request); | |||
} | |||
@Autowired | |||
private IQuestionService questionService; | |||
/** | |||
* 查询 巡检任务问题图片 列表 | |||
* 获取巡检问题列表(分页) | |||
* | |||
* @author zhu_zishuang | |||
* @date 2021/9/28 | |||
* @param questionQuery 查询条件 | |||
* @return | |||
*/ | |||
@GetMapping("/findPictureList") | |||
public Page<ThInspectionQuestionPictureVo> findPictureList(@Validated QueryQuestionPictureRequest request) { | |||
return null;//iThInspectionFileService.findPictureList(request); | |||
@GetMapping("/page") | |||
public JsonResult page(QuestionTypeQuery questionQuery) { | |||
return JsonResult.success(questionService.queryPage(questionQuery)); | |||
} | |||
/** | |||
* 查询 巡检任务问题图片 详情 | |||
* 添加巡检问题 | |||
* | |||
* @author zhu_zishuang | |||
* @date 2021/9/28 | |||
* @param entity 实体对象 | |||
* @return | |||
*/ | |||
@GetMapping("/findPicture") | |||
public ThInspectionQuestionPictureVo findPicture(Integer id) { | |||
return null;//iThInspectionFileService.findPicture(id); | |||
@PostMapping("") | |||
public JsonResult create(@RequestBody Question entity) { | |||
entity.setCreateUser(ShiroUtils.getUserId()); | |||
return questionService.edit(entity); | |||
} | |||
/** | |||
* 删除 巡检任务问题图片 | |||
* 删除巡检问题 | |||
* | |||
* @author zhu_zishuang | |||
* @date 2021/9/28 | |||
* @param ids 巡检问题ID | |||
* @return | |||
*/ | |||
@GetMapping("/delete") | |||
public OperationEnum delete(Integer id) { | |||
return null;//iThInspectionFileService.deleteById(id); | |||
@DeleteMapping("/{ids}") | |||
public JsonResult delete(@PathVariable("ids") Integer[] ids) { | |||
return questionService.deleteByIds(ids); | |||
} | |||
/** | |||
* 审核/修改 巡检任务问题图片 | |||
* | |||
* @author zhu_zishuang | |||
* @date 2021/9/28 | |||
*/ | |||
@PutMapping("/updateById") | |||
public OperationEnum updateById(@RequestBody ThInspectionFile thInspectionFile) { | |||
return null;//iThInspectionFileService.updateById(thInspectionFile); | |||
} | |||
/** | |||
* 生成工单 | |||
* 忽略、确认、批量忽略、批量确认、修改问题类型 | |||
* | |||
* @author WangHaoran | |||
* @date 2021/11/23 | |||
*/ | |||
@GetMapping("/generateWorkOrder") | |||
public OperationEnum generateWorkOrder(Integer inspectionId) { | |||
return null;//iThInspectionFileService.generateWorkOrder(inspectionId); | |||
@PutMapping("/status") | |||
public JsonResult check(@RequestBody QuestionRequest entity) { | |||
return questionService.check(entity); | |||
} | |||
/** | |||
* 新增 巡检任务问题图片 | |||
* 根据问题类型分类 | |||
* | |||
* @author zhu_zishuang | |||
* @date 2021/9/28 | |||
*/ | |||
@PostMapping("/addInspectionFile") | |||
public OperationEnum addInspectionFile(@RequestParam("originalImage") String originalImage, | |||
@RequestParam("aiImage") String aiImage, | |||
@RequestParam("questionId") Integer questionId, | |||
@RequestParam("inspectionId") Integer inspectionId, | |||
@RequestParam("location") String location, | |||
@RequestParam("questionDesc") String questionDesc, | |||
@RequestParam("status") Integer status, | |||
@RequestParam("sourceFileId") Integer sourceFileId, | |||
@RequestParam(value = "longitude",required = false) String longitude, | |||
@RequestParam(value = "latitude",required = false) String latitude) { | |||
return null;//iThInspectionFileService.addInspectionFile(originalImage, aiImage, questionId, inspectionId, location, questionDesc, status, sourceFileId, longitude, latitude); | |||
@GetMapping("analyze/{missionId}") | |||
public JsonResult analyze(@PathVariable("missionId") Integer missionId) { | |||
return questionService.analyze(missionId); | |||
} | |||
/** | |||
* 查询问题清单 | |||
* 根据问题类型分类 | |||
* | |||
* @author: WangHaoran | |||
* @date: 2021/9/28 | |||
*/ | |||
@GetMapping("/queryQuestionInventory") | |||
public IPage<QuestionInventoryVo> queryQuestionInventory(QuestionInventoryRequest request) { | |||
return null;//iThInspectionFileService.queryQuestionInventory(request); | |||
@GetMapping("analyze/type/{missionId}") | |||
public JsonResult analyzeType(@PathVariable("missionId") Integer missionId) { | |||
return questionService.analyzeType(missionId); | |||
} | |||
} |
@@ -1,10 +1,9 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.domain.QuestionType; | |||
import com.tuoheng.admin.entity.request.QuestionQuery; | |||
import com.tuoheng.admin.entity.request.QuestionTypeQuery; | |||
import com.tuoheng.admin.service.IQuestionTypeService; | |||
import com.tuoheng.common.common.OperationEnum; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
@@ -28,47 +27,44 @@ public class QuestionTypeController { | |||
* @param questionQuery 查询条件 | |||
* @return | |||
*/ | |||
@GetMapping("/index") | |||
public IPage<QuestionType> index(QuestionQuery questionQuery) { | |||
return questionService.queryPage(questionQuery); | |||
@GetMapping("") | |||
public JsonResult index(QuestionTypeQuery questionQuery) { | |||
return JsonResult.success(questionService.queryPage(questionQuery)); | |||
} | |||
/** | |||
* 添加巡检问题 | |||
* 添加巡检类型 | |||
* | |||
* @param entity 实体对象 | |||
* @return | |||
*/ | |||
@PostMapping("/add") | |||
public OperationEnum add(@RequestBody QuestionType entity) { | |||
@PostMapping("") | |||
public JsonResult add(@RequestBody QuestionType entity) { | |||
entity.setCreateUserName(ShiroUtils.getUserInfo().getUsername()); | |||
questionService.edit(entity); | |||
return OperationEnum.OPERATION_SUCCESS; | |||
return questionService.edit(entity); | |||
} | |||
/** | |||
* 编辑巡检问题 | |||
* 编辑巡检类型 | |||
* | |||
* @param entity 实体对象 | |||
* @return | |||
*/ | |||
@PutMapping("/edit") | |||
public OperationEnum edit(@RequestBody QuestionType entity) { | |||
@PutMapping("") | |||
public JsonResult edit(@RequestBody QuestionType entity) { | |||
entity.setUpdateUserName(ShiroUtils.getUserInfo().getUsername()); | |||
questionService.edit(entity); | |||
return OperationEnum.OPERATION_SUCCESS; | |||
return questionService.edit(entity); | |||
} | |||
/** | |||
* 删除巡检问题 | |||
* 删除巡检类型 | |||
* | |||
* @param ids 巡检问题ID | |||
* @return | |||
*/ | |||
@DeleteMapping("/{ids}") | |||
public OperationEnum delete(@PathVariable("ids") Integer[] ids) { | |||
questionService.deleteByIds(ids); | |||
return OperationEnum.OPERATION_SUCCESS; | |||
public JsonResult delete(@PathVariable("ids") Integer[] ids) { | |||
return questionService.deleteByIds(ids); | |||
} | |||
} |
@@ -0,0 +1,85 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.request.ReportRequest; | |||
import com.tuoheng.admin.entity.vo.ReportInfoVO; | |||
import com.tuoheng.admin.entity.vo.ReportVO; | |||
import com.tuoheng.admin.service.IReportService; | |||
import com.tuoheng.common.common.OperationEnum; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
/** | |||
* 巡检报告表 前端控制器 | |||
* | |||
* @author qiujinyang | |||
* @since 2021-09-29 | |||
*/ | |||
@RestController | |||
@RequestMapping("/report") | |||
public class ReportController { | |||
@Autowired | |||
private IReportService reportService; | |||
/** | |||
* 弹框,已经核实的条数和未核实的条数 | |||
* | |||
* @param missionId 任务ID | |||
* @return | |||
*/ | |||
@GetMapping("/analyze/{missionId}") | |||
public JsonResult analyze(@PathVariable("missionId") Integer missionId) { | |||
return reportService.analyze(missionId); | |||
} | |||
/** | |||
* 提交并生成报告 | |||
* | |||
* @param missionId 任务ID | |||
* @return | |||
*/ | |||
@PostMapping("/generate/{missionId}") | |||
public JsonResult generateReport(@PathVariable("missionId") Integer missionId) { | |||
return reportService.generateReport(missionId); | |||
} | |||
/** | |||
* 获取报告列表(分页) | |||
* | |||
* @param request 查询条件 | |||
* @return | |||
*/ | |||
@GetMapping("/page") | |||
public JsonResult queryPage(ReportRequest request) { | |||
return reportService.queryPage(request); | |||
} | |||
/** | |||
* 报告详情 | |||
* | |||
* @param reportId 任务Id | |||
* @return | |||
*/ | |||
@GetMapping("/{reportId}") | |||
public JsonResult detail(@PathVariable("reportId") Integer reportId) { | |||
return JsonResult.success(reportService.detail(reportId)); | |||
} | |||
/** | |||
* 导出报告word并下载 | |||
* | |||
* @param reportId 报告ID | |||
* @return | |||
*/ | |||
@GetMapping(value = "/exportReportWord") | |||
public void exportReportWord(String reportId, HttpServletRequest request, HttpServletResponse response) throws Exception{ | |||
reportService.exportReportWord(reportId, request, response); | |||
} | |||
} |
@@ -1,125 +0,0 @@ | |||
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; | |||
/** | |||
* 巡检附件表 | |||
* | |||
* @author WangHaoran | |||
* @since 2021-06-03 | |||
*/ | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_inspection_file") | |||
public class InspectionFile extends BaseEntity { | |||
/** | |||
* 图片编码 | |||
*/ | |||
private String fileCode; | |||
/** | |||
* 巡检任务ID | |||
*/ | |||
private Integer inspectionId; | |||
/** | |||
* 附件类型:1图片 2视频 | |||
*/ | |||
private Integer fileType; | |||
/** | |||
* 文件名称 | |||
*/ | |||
private String fileName; | |||
/** | |||
* 缩略图 | |||
*/ | |||
private String fileThumbnail; | |||
/** | |||
* 原图 | |||
*/ | |||
private String fileOriginal; | |||
/** | |||
* 标记图 | |||
*/ | |||
private String fileImage; | |||
/** | |||
* 文件大小 | |||
*/ | |||
private Double fileSize; | |||
/** | |||
* 纬度(原始图片纬度) | |||
*/ | |||
private String latitude; | |||
/** | |||
* 经度(原始图片经度) | |||
*/ | |||
private String longitude; | |||
/** | |||
* 位置信息 | |||
*/ | |||
private String location; | |||
/** | |||
* 高德地图经度 | |||
*/ | |||
private String gaodeLongitude; | |||
/** | |||
* 高德地图纬度 | |||
*/ | |||
private String gaodeLatitude; | |||
/** | |||
* 高德地图地址 | |||
*/ | |||
private String gaodeAddress; | |||
/** | |||
* 问题类型ID | |||
*/ | |||
private Integer questionId; | |||
/** | |||
* 图片来源:1AI 2后台 3视频 | |||
*/ | |||
private Integer source; | |||
/** | |||
* 详细描述 | |||
*/ | |||
private String questionDesc; | |||
/** | |||
* 审核状态:0待审核 1已审核 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 审核人 | |||
*/ | |||
private String checkUser; | |||
/** | |||
* 审核时间 | |||
*/ | |||
private String checkTime; | |||
/** | |||
* 租户id | |||
*/ | |||
private Integer tenantId; | |||
} |
@@ -1,73 +0,0 @@ | |||
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 | |||
* @since 2021-09-29 | |||
*/ | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_inspection_question_item") | |||
public class InspectionQuestionItem extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 巡检任务ID | |||
*/ | |||
private Integer inspectionId; | |||
/** | |||
* 巡检问题工单ID | |||
*/ | |||
private Integer inspectionQuestionId; | |||
/** | |||
* 巡检问题文件ID | |||
*/ | |||
private Integer inspectionFileId; | |||
/** | |||
* 处理状态:0待处理 1已处理 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 巡检问题文件ID | |||
*/ | |||
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; | |||
/** | |||
* 租户id | |||
*/ | |||
private Integer tenantId; | |||
} |
@@ -2,8 +2,16 @@ package com.tuoheng.admin.entity.domain; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.UpdateOrCreateEnum; | |||
import com.tuoheng.common.common.BaseEntity; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
@@ -11,53 +19,98 @@ import java.util.Date; | |||
/** | |||
* 问题工单映射实体 | |||
* | |||
* @author zhuzishuang | |||
* @date 2021/10/8 | |||
* @author qiujinyang | |||
* @date 2022/08/03 | |||
*/ | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_question") | |||
public class Question extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
public Question(int type){ | |||
if(type== UpdateOrCreateEnum.CREATE.getCode()){ | |||
setCreateUser(ShiroUtils.getUserId()); | |||
setCreateTime(new Date()); | |||
setMark(MarkTypeEnum.VALID.getCode()); | |||
} | |||
setUpdateUser(ShiroUtils.getUserId()); | |||
setUpdateTime(new Date()); | |||
} | |||
/** | |||
* 任务ID | |||
*/ | |||
private Integer missionId; | |||
/** | |||
* DSP交互ID | |||
*/ | |||
private Integer requestId; | |||
/** | |||
* 问题类型:病死树、林斑 | |||
*/ | |||
private Integer type; | |||
/** | |||
* 问题类型名称 | |||
*/ | |||
private String questionName; | |||
/** | |||
* 问题描述 | |||
*/ | |||
private String questionDesc; | |||
/** | |||
* 图片分析时间,可以通过这个时间来计算出坐标位置 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") | |||
private Date analyseTime; | |||
/** | |||
* ID | |||
* 文件编码 | |||
*/ | |||
@TableId(type = IdType.AUTO) | |||
private Integer id; | |||
private String fileCode; | |||
/** | |||
* 问题工单号 | |||
* 文件名称 | |||
*/ | |||
private String code; | |||
private String fileName; | |||
/** | |||
* 巡检ID | |||
* 原图片位置 | |||
*/ | |||
private Integer inspectionId; | |||
private String fileOriginalUrl; | |||
/** | |||
* 处理状态:1问题待指派 2问题待处理 3问题处理中 4问题已处理 | |||
* 分析后的图片位置 | |||
*/ | |||
private Boolean status; | |||
private String fileMarkerUrl; | |||
/** | |||
* 指派负责人 | |||
* 经度 | |||
*/ | |||
private Integer assignUser; | |||
private String lng; | |||
/** | |||
* 指派负责人联系方式 | |||
* 纬度 | |||
*/ | |||
private String assignContact; | |||
private String lat; | |||
/** | |||
* 指派备注 | |||
* 备注 | |||
*/ | |||
private String assignNote; | |||
private String note; | |||
/** | |||
* 指派时间 | |||
* 问题状态:1:确认,2:忽略,3:待确认 | |||
*/ | |||
private Date assignTime; | |||
private Integer status; | |||
/** |
@@ -1,11 +1,17 @@ | |||
package com.tuoheng.admin.entity.domain; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.UpdateOrCreateEnum; | |||
import com.tuoheng.common.common.BaseEntity; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
/** | |||
* 巡检问题表 | |||
* | |||
@@ -16,7 +22,19 @@ import lombok.experimental.Accessors; | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_question_type") | |||
public class QuestionType extends BaseEntity { | |||
public class QuestionType extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
public QuestionType(int type){ | |||
if(type== UpdateOrCreateEnum.CREATE.getCode()){ | |||
setCreateUser(ShiroUtils.getUserId()); | |||
setCreateTime(new Date()); | |||
setMark(MarkTypeEnum.VALID.getCode()); | |||
} | |||
setUpdateUser(ShiroUtils.getUserId()); | |||
setUpdateTime(new Date()); | |||
} | |||
/** | |||
* 项目名称:1水面 2岸线 3水质 4排口 |
@@ -0,0 +1,90 @@ | |||
package com.tuoheng.admin.entity.domain; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.UpdateOrCreateEnum; | |||
import com.tuoheng.common.common.BaseEntity; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import io.swagger.annotations.ApiModelProperty; | |||
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 | |||
* @since 2021-09-29 | |||
*/ | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_report") | |||
public class Report extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
public Report(int type){ | |||
if(type== UpdateOrCreateEnum.CREATE.getCode()){ | |||
setCreateUser(ShiroUtils.getUserId()); | |||
setCreateTime(new Date()); | |||
setMark(MarkTypeEnum.VALID.getCode()); | |||
} | |||
setUpdateUser(ShiroUtils.getUserId()); | |||
setUpdateTime(new Date()); | |||
} | |||
/** | |||
* 报告编号 | |||
*/ | |||
private String reportNo; | |||
/** | |||
* 任务Id | |||
*/ | |||
private Integer missionId; | |||
/** | |||
* 生成时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date generateTime; | |||
/** | |||
* 任务名称 | |||
*/ | |||
private String missionName; | |||
/** | |||
* 巡检机场 | |||
*/ | |||
private String airportId; | |||
/** | |||
* 巡检机场名称 | |||
*/ | |||
private String airportName; | |||
/** | |||
* 任务类型 1 日常,2 应急巡检 | |||
*/ | |||
private Integer type; | |||
/** | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date executionStartTime; | |||
/** | |||
* 租户id | |||
*/ | |||
private Integer tenantId; | |||
} |
@@ -2,9 +2,14 @@ package com.tuoheng.admin.entity.domain; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import java.io.Serializable; | |||
import java.time.LocalDateTime; | |||
import java.util.Date; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.UpdateOrCreateEnum; | |||
import com.tuoheng.common.common.BaseEntity; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
@@ -21,10 +26,20 @@ import lombok.experimental.Accessors; | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_tenant") | |||
public class Tenant extends BaseEntity { | |||
public class Tenant extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
public Tenant(int type){ | |||
if(type== UpdateOrCreateEnum.CREATE.getCode()){ | |||
setCreateUser(ShiroUtils.getUserId()); | |||
setCreateTime(new Date()); | |||
setMark(MarkTypeEnum.VALID.getCode()); | |||
} | |||
setUpdateUser(ShiroUtils.getUserId()); | |||
setUpdateTime(new Date()); | |||
} | |||
/** | |||
* 租户名称 | |||
*/ |
@@ -3,6 +3,7 @@ package com.tuoheng.admin.entity.domain; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.UpdateOrCreateEnum; | |||
import com.tuoheng.common.common.BaseEntity; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import lombok.Data; | |||
@@ -25,12 +26,14 @@ public class ThInspection extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
public ThInspection(){ | |||
// setCreateUser(ShiroUtils.getUserId()); | |||
// setUpdateUser(ShiroUtils.getUserId()); | |||
setCreateTime(new Date()); | |||
public ThInspection(int type){ | |||
if(type== UpdateOrCreateEnum.CREATE.getCode()){ | |||
setCreateUser(ShiroUtils.getUserId()); | |||
setCreateTime(new Date()); | |||
setMark(MarkTypeEnum.VALID.getCode()); | |||
} | |||
setUpdateUser(ShiroUtils.getUserId()); | |||
setUpdateTime(new Date()); | |||
setMark(MarkTypeEnum.VALID.getCode()); | |||
} | |||
/** |
@@ -1,88 +0,0 @@ | |||
package com.tuoheng.admin.entity.domain; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
/** | |||
* th_inspection_check | |||
* @author | |||
*/ | |||
@Data | |||
public class ThInspectionCheck implements Serializable { | |||
/** | |||
* ID | |||
*/ | |||
private Integer id; | |||
/** | |||
* 巡检任务ID | |||
*/ | |||
private Integer inspectionId; | |||
/** | |||
* 审核人 | |||
*/ | |||
private Integer checkUser; | |||
/** | |||
* 审核人姓名 | |||
*/ | |||
private String checkUserName; | |||
/** | |||
* 审核时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date checkTime; | |||
/** | |||
* 审核状态:1审核通过 2审核未通过 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 审核备注 | |||
*/ | |||
private String note; | |||
/** | |||
* 创建人 | |||
*/ | |||
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 static final long serialVersionUID = 1L; | |||
/** | |||
* 租户id | |||
*/ | |||
private Integer tenantId; | |||
} |
@@ -1,23 +0,0 @@ | |||
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; | |||
/** | |||
* @User qiujinyang | |||
* @Description | |||
* @Date Created by 2022/7/27 11:31 | |||
*/ | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_inspection_detail") | |||
public class ThInspectionDetail extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
} |
@@ -1,163 +0,0 @@ | |||
package com.tuoheng.admin.entity.domain; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
/** | |||
* th_inspection_file | |||
* @author | |||
*/ | |||
@Data | |||
public class ThInspectionFile implements Serializable { | |||
/** | |||
* ID | |||
*/ | |||
private Integer id; | |||
/** | |||
* 图片编码 | |||
*/ | |||
private String fileCode; | |||
/** | |||
* 巡检任务ID | |||
*/ | |||
private Integer inspectionId; | |||
/** | |||
* 附件类型:1图片 2视频 | |||
*/ | |||
private Integer fileType; | |||
/** | |||
* 文件名称 | |||
*/ | |||
private String fileName; | |||
/** | |||
* 缩略图 | |||
*/ | |||
private String fileThumbnail; | |||
/** | |||
* 原图 | |||
*/ | |||
private String fileOriginal; | |||
/** | |||
* 标记图 | |||
*/ | |||
private String fileImage; | |||
/** | |||
* 文件大小 | |||
*/ | |||
private Double fileSize; | |||
/** | |||
* 纬度(原始图片纬度) | |||
*/ | |||
private String latitude; | |||
/** | |||
* 经度(原始图片经度) | |||
*/ | |||
private String longitude; | |||
/** | |||
* 后台上传图片的拍摄时间 | |||
*/ | |||
private Long shootTime; | |||
/** | |||
* 位置信息 | |||
*/ | |||
private String location; | |||
/** | |||
* 高德地图经度 | |||
*/ | |||
private String gaodeLongitude; | |||
/** | |||
* 高德地图纬度 | |||
*/ | |||
private String gaodeLatitude; | |||
/** | |||
* 高德地图地址 | |||
*/ | |||
private String gaodeAddress; | |||
/** | |||
* 问题类型ID | |||
*/ | |||
private Integer questionId; | |||
/** | |||
* 图片来源:1AI 2后台 3视频 | |||
*/ | |||
private Integer source; | |||
/** | |||
* 详细描述 | |||
*/ | |||
private String questionDesc; | |||
/** | |||
* 审核状态:0待审核 1已审核 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 审核人 | |||
*/ | |||
private Integer checkUser; | |||
/** | |||
* 审核时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date checkTime; | |||
/** | |||
* 创建人 | |||
*/ | |||
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 static final long serialVersionUID = 1L; | |||
/** | |||
* 租户id | |||
*/ | |||
private Integer tenantId; | |||
} |
@@ -3,6 +3,7 @@ package com.tuoheng.admin.entity.domain; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.UpdateOrCreateEnum; | |||
import com.tuoheng.common.common.BaseEntity; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import io.swagger.annotations.ApiModelProperty; | |||
@@ -29,12 +30,14 @@ public class ThMission extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
public ThMission(){ | |||
// setCreateUser(ShiroUtils.getUserId()); | |||
// setUpdateUser(ShiroUtils.getUserId()); | |||
setCreateTime(new Date()); | |||
public ThMission(int type){ | |||
if(type== UpdateOrCreateEnum.CREATE.getCode()){ | |||
setCreateUser(ShiroUtils.getUserId()); | |||
setCreateTime(new Date()); | |||
setMark(MarkTypeEnum.VALID.getCode()); | |||
} | |||
setUpdateUser(ShiroUtils.getUserId()); | |||
setUpdateTime(new Date()); | |||
setMark(MarkTypeEnum.VALID.getCode()); | |||
} | |||
/** | |||
@@ -48,7 +51,7 @@ public class ThMission extends BaseEntity implements Serializable { | |||
private String name; | |||
/** | |||
* 巡检任务类型 1 常规;2 日常 | |||
* 巡检任务类型 1 日常,2 应急巡检 | |||
*/ | |||
private Integer type; | |||
@@ -77,6 +80,11 @@ public class ThMission extends BaseEntity implements Serializable { | |||
*/ | |||
private String inspectionLineName; | |||
/** | |||
* 巡检里程 | |||
*/ | |||
private String mileage; | |||
/** | |||
* 任务状态:1任务待飞行 2任务飞行中 3任务执行失败 4任务飞行完成 | |||
*/ | |||
@@ -143,7 +151,7 @@ public class ThMission extends BaseEntity implements Serializable { | |||
private String note; | |||
/** | |||
* 巡检报告是否生成 是否生成 0 未生成 1 已生成 | |||
* 巡检报告是否生成 是否生成 0 未生成 1 需修改 2 已生成 | |||
*/ | |||
private Integer reportStatus; | |||
@@ -1,42 +0,0 @@ | |||
package com.tuoheng.admin.entity.request; | |||
import com.tuoheng.common.common.BaseQuery; | |||
import lombok.Data; | |||
import javax.validation.constraints.NotNull; | |||
/** | |||
* 查询巡检问题图片请求参数 | |||
* | |||
* @author: zhu_zishuang | |||
* @date: 2021/9/26 | |||
*/ | |||
@Data | |||
public class QueryQuestionPictureRequest extends BaseQuery { | |||
/** | |||
* 巡检ID | |||
*/ | |||
@NotNull(message = "巡检ID不能为空!") | |||
private Integer inspectionId; | |||
/** | |||
* 问题类型一级分类ID | |||
*/ | |||
private Integer questionName; | |||
/** | |||
* 图片来源:1AI 2后台 3视频 | |||
*/ | |||
private Integer source; | |||
/** | |||
* 图片审核状态:0待审核 1已审核 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 巡检内容 | |||
*/ | |||
private String content; | |||
} |
@@ -1,44 +0,0 @@ | |||
package com.tuoheng.admin.entity.request; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import com.tuoheng.common.common.BaseQuery; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.util.Date; | |||
/** | |||
* 查询巡检问题请求参数 | |||
* | |||
* @author: zhu_zishuang | |||
* @date: 2021/9/26 | |||
*/ | |||
@Data | |||
public class QueryQuestionRequest extends BaseQuery { | |||
/** | |||
* 河道名称 | |||
*/ | |||
private String streamName; | |||
/** | |||
* 巡检任务编号 | |||
*/ | |||
private String inspectionCode; | |||
/** | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private Date inspectionTime; | |||
/** | |||
* 任务名称 | |||
*/ | |||
private String inspectionName; | |||
/** | |||
* 任务状态 | |||
*/ | |||
private Integer status; | |||
} |
@@ -1,34 +0,0 @@ | |||
package com.tuoheng.admin.entity.request; | |||
import com.tuoheng.common.common.BaseQuery; | |||
import lombok.Data; | |||
/** | |||
* 查询问题清单列表 请求参数 | |||
* | |||
* @author: WangHaoran | |||
* @date: 2021/9/26 | |||
*/ | |||
@Data | |||
public class QuestionFileRequest extends BaseQuery { | |||
/** | |||
* 项目名称:1河湖水面 2河湖岸线 3河湖感观水质4入河、湖异常排口 | |||
*/ | |||
private Integer name; | |||
/** | |||
* 巡检ID | |||
*/ | |||
private Integer inspectionId; | |||
/** | |||
* 图片ID | |||
*/ | |||
private Integer fileId; | |||
/** | |||
* 图片图片 | |||
*/ | |||
private String fileCode; | |||
} |
@@ -1,45 +0,0 @@ | |||
package com.tuoheng.admin.entity.request; | |||
import com.tuoheng.common.common.BaseQuery; | |||
import lombok.Data; | |||
/** | |||
* 查询问题清单 请求参数 | |||
* | |||
* @author: WangHaoran | |||
* @date: 2021/9/26 | |||
*/ | |||
@Data | |||
public class QuestionInventoryRequest extends BaseQuery { | |||
/** | |||
* 河流名称 | |||
*/ | |||
private String streamName; | |||
/** | |||
* 巡检时间 | |||
*/ | |||
private String inspectionTime; | |||
/** | |||
* 工单编码 | |||
*/ | |||
private String code; | |||
/** | |||
* 巡检编码 | |||
*/ | |||
private String inspectionCode; | |||
/** | |||
* 处理状态:1问题待指派 2问题待处理 3问题处理中 4问题已处理 | |||
*/ | |||
private String status; | |||
/** | |||
* 巡检名称 | |||
*/ | |||
private String inspectionName; | |||
} |
@@ -0,0 +1,31 @@ | |||
package com.tuoheng.admin.entity.request; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import javax.validation.constraints.NotNull; | |||
import java.io.Serializable; | |||
/** | |||
* @User qiujinyang | |||
* @Description | |||
* @Date Created by 2022/7/28 9:51 | |||
*/ | |||
@Data | |||
public class QuestionRequest implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty(value = "问题ID") | |||
@NotNull(message = "问题ID不能为空!") | |||
private Integer[] id; | |||
@ApiModelProperty(value = "问题类型") | |||
private Integer type; | |||
@ApiModelProperty(value = "问题状态:1:确认,2:忽略") | |||
@NotNull(message = "问题状态不能为空!") | |||
private Integer status; | |||
} |
@@ -3,16 +3,20 @@ package com.tuoheng.admin.entity.request; | |||
import com.tuoheng.common.common.BaseQuery; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
/** | |||
* 巡检问题查询 | |||
* | |||
* @author WangHaoran | |||
* @since 2021-09-02 | |||
* @author qiujinyang | |||
* @since 2022-08-03 | |||
*/ | |||
@Data | |||
public class QuestionQuery extends BaseQuery { | |||
public class QuestionTypeQuery extends BaseQuery implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 项目名称:1水面 2岸线 3水质 4排口 | |||
* 项目名称:1林场平面 | |||
*/ | |||
private Integer name; | |||
@@ -5,26 +5,18 @@ import com.tuoheng.common.common.BaseQuery; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.io.Serializable; | |||
/** | |||
* 报告查询 | |||
* | |||
* @author WangHaoran | |||
* @since 2021-10-8 | |||
* @author qiujinyang | |||
* @since 2022-08-04 | |||
*/ | |||
@Data | |||
public class ReportRequest extends BaseQuery { | |||
public class ReportRequest extends BaseQuery implements Serializable { | |||
/** | |||
* 河流名称 | |||
*/ | |||
private String streamName; | |||
/** | |||
* 巡检时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd") | |||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | |||
private String inspectionTime; | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 报告编号 | |||
@@ -32,22 +24,20 @@ public class ReportRequest extends BaseQuery { | |||
private String reportNo; | |||
/** | |||
* 报告ID | |||
* 任务名称 | |||
*/ | |||
private Integer reportId; | |||
private String name; | |||
/** | |||
* 巡检ID | |||
*/ | |||
private Integer inspectionId; | |||
/** | |||
* 巡检编码 | |||
* 巡检机场 | |||
*/ | |||
private String inspectionCode; | |||
private String airportId; | |||
/** | |||
* 巡检名称 | |||
* 任务类型 1 日常,2 应急巡检 | |||
*/ | |||
private String inspectionName; | |||
private Integer type; | |||
} |
@@ -1,71 +0,0 @@ | |||
package com.tuoheng.admin.entity.request; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
/** | |||
* 常规巡河问题 | |||
* | |||
* @author WangHaoran | |||
* @since 2021-07-16 | |||
*/ | |||
@Data | |||
public class UAVKHQuestionRequest implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 帧号 | |||
*/ | |||
private String fid; | |||
/** | |||
* 问题类型 | |||
*/ | |||
private String type; | |||
/** | |||
* 问题类型ID | |||
*/ | |||
private Integer typeId; | |||
/** | |||
* 图片Base64 | |||
*/ | |||
private String imgData; | |||
/** | |||
* 图片名称,包含.jpg后缀 | |||
*/ | |||
private String imgName; | |||
/** | |||
* 原始图片Base64 | |||
*/ | |||
private String imgDataOriginal; | |||
/** | |||
* 原始图片名称,包含.jpg后缀 | |||
*/ | |||
private String imgNameOriginal; | |||
/** | |||
* 巡检编码 | |||
*/ | |||
private String code; | |||
/** | |||
* 备注 | |||
*/ | |||
private String note; | |||
/** | |||
* 时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date time; | |||
} |
@@ -1,15 +0,0 @@ | |||
package com.tuoheng.admin.entity.request; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class UpdateLiveChannel { | |||
private Integer id; | |||
private Integer status; | |||
} |
@@ -1,28 +0,0 @@ | |||
package com.tuoheng.admin.entity.request; | |||
import lombok.Data; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import javax.validation.constraints.Pattern; | |||
@Data | |||
public class UploadVideoUrlRequest { | |||
/** | |||
* 巡检ID | |||
*/ | |||
@NotNull | |||
private Integer inspectionId; | |||
/** | |||
* 视频地址 | |||
*/ | |||
@NotBlank | |||
private String videoUrl; | |||
/** | |||
* 备注 | |||
*/ | |||
private String note; | |||
} |
@@ -1,40 +0,0 @@ | |||
package com.tuoheng.admin.entity.vo; | |||
import lombok.Data; | |||
@Data | |||
public class InspectionFileInfoVo { | |||
/** | |||
* 主键 | |||
*/ | |||
private Integer id; | |||
/** | |||
* 标记图地址 | |||
*/ | |||
private String fileImage; | |||
/** | |||
* 纬度 | |||
*/ | |||
private String latitude; | |||
/** | |||
* 经度 | |||
*/ | |||
private String longitude; | |||
/** | |||
* 详细描述 | |||
*/ | |||
private String content; | |||
private String handerName; | |||
private String handTime; | |||
private String handContent; | |||
private String handImg; | |||
} |
@@ -8,6 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
/** | |||
@@ -15,7 +16,7 @@ import java.util.Date; | |||
* @author : qiujinyang | |||
*/ | |||
@Data | |||
public class MissionVO { | |||
public class MissionVO implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty(value = "任务id") | |||
@@ -42,6 +43,9 @@ public class MissionVO { | |||
@ApiModelProperty(value = "巡检线路名称") | |||
private String inspectionLineName; | |||
@ApiModelProperty(value = "巡检里程") | |||
private String mileage; | |||
@ApiModelProperty(value = "任务类型 1 日常,2 应急巡检") | |||
private Integer type; | |||
@@ -1,69 +0,0 @@ | |||
package com.tuoheng.admin.entity.vo; | |||
import lombok.Data; | |||
@Data | |||
public class QuestionDetailVo { | |||
/** | |||
* 经度 | |||
*/ | |||
private String longitude; | |||
/** | |||
* 纬度 | |||
*/ | |||
private String latitude; | |||
/** | |||
* 位置信息 | |||
*/ | |||
private String location; | |||
/** | |||
* 标记图 | |||
*/ | |||
private String fileImage; | |||
/** | |||
* 项目名称:1水面 2岸线 3水质 4排口 | |||
*/ | |||
private Integer name; | |||
/** | |||
* 项目类型:1日常监测 2重点核查 | |||
*/ | |||
private Integer type; | |||
/** | |||
* 巡检内容 | |||
*/ | |||
private String content; | |||
/** | |||
* 处理后图片(多个图片逗号“,”分隔) | |||
*/ | |||
private String handlerImage; | |||
/** | |||
* 处理结果 | |||
*/ | |||
private String handlerResult; | |||
/** | |||
* 处理完成时间 | |||
*/ | |||
private String handlerTime; | |||
/** | |||
* 处理人名称 | |||
*/ | |||
private String userName; | |||
/** | |||
* 处理状态:0待处理 1已处理 | |||
*/ | |||
private Integer status; | |||
} |
@@ -1,53 +0,0 @@ | |||
package com.tuoheng.admin.entity.vo; | |||
import lombok.Data; | |||
@Data | |||
public class QuestionFileVo { | |||
/** | |||
* th_inspection_file表ID | |||
*/ | |||
private Integer id; | |||
/** | |||
* 图片编码 | |||
*/ | |||
private String fileCode; | |||
/** | |||
* 标记图地址 | |||
*/ | |||
private String fileImage; | |||
/** | |||
* 缩略图地址 | |||
*/ | |||
private String fileThumbnail; | |||
/** | |||
* 纬度 | |||
*/ | |||
private String latitude; | |||
/** | |||
* 经度 | |||
*/ | |||
private String longitude; | |||
/** | |||
* 项目名称:1水面 2岸线 3水质 4排口 | |||
*/ | |||
private Integer name; | |||
/** | |||
* 问题描述 | |||
*/ | |||
private String content; | |||
/** | |||
* 处理状态:0待处理 1已处理 | |||
*/ | |||
private Integer status; | |||
} |
@@ -1,65 +0,0 @@ | |||
package com.tuoheng.admin.entity.vo; | |||
import lombok.Data; | |||
import java.util.List; | |||
@Data | |||
public class QuestionInventoryVo { | |||
/** | |||
* th_inspection_question表ID | |||
*/ | |||
private Integer id; | |||
/** | |||
* 巡检ID | |||
*/ | |||
private Integer inspectionId; | |||
/** | |||
* 清单编码(工单编码) | |||
*/ | |||
private String code; | |||
/** | |||
* 巡检河道 | |||
*/ | |||
private String streamName; | |||
/** | |||
* 任务名称 | |||
*/ | |||
private String inspectionName; | |||
/** | |||
* 巡检编码 | |||
*/ | |||
private String inspectionCode; | |||
/** | |||
* 巡检时间 | |||
*/ | |||
private String inspectionTime; | |||
/** | |||
* 发现问题数量 | |||
*/ | |||
private Integer totalCount; | |||
/** | |||
* 未处理问题数量 | |||
*/ | |||
private Integer todoCount; | |||
/** | |||
* 处理状态:1问题待指派 2问题待处理 3问题处理中 4问题已处理 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 问题类型统计 | |||
*/ | |||
private List<QuestionTypeCountVo> typeCount; | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.tuoheng.admin.entity.vo; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
@Data | |||
public class QuestionReportVO implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty(value = "主键") | |||
private Integer id; | |||
@ApiModelProperty(value = "图片位置") | |||
private String fileMarkerUrl; | |||
@ApiModelProperty(value = "纬度") | |||
private String lat; | |||
@ApiModelProperty(value = "经度") | |||
private String lng; | |||
} |
@@ -1,17 +1,17 @@ | |||
package com.tuoheng.admin.entity.vo; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
@Data | |||
public class QuestionTypeCountVo { | |||
public class QuestionTypeCountVo implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 项目名称:1水面 2岸线 3水质 4排口 | |||
*/ | |||
@ApiModelProperty(value = "问题类型") | |||
private Integer name; | |||
/** | |||
* 数量 | |||
*/ | |||
@ApiModelProperty(value = "数量") | |||
private Integer totalCount; | |||
} |
@@ -0,0 +1,42 @@ | |||
package com.tuoheng.admin.entity.vo; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
import java.util.List; | |||
/** | |||
* 报告信息Vo | |||
*/ | |||
@Data | |||
public class ReportInfoVO implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty(value = "主键ID") | |||
private Integer id; | |||
@ApiModelProperty(value = "报告编号") | |||
private String reportNo; | |||
@ApiModelProperty(value = "任务ID") | |||
private Integer missionId; | |||
@ApiModelProperty(value = "林场信息") | |||
private String company; | |||
@ApiModelProperty(value = "林场名称") | |||
private String lcName; | |||
@ApiModelProperty(value = "气象信息") | |||
private AirWeatherVO airWeather; | |||
@ApiModelProperty(value = "任务信息") | |||
private MissionVO mission; | |||
@ApiModelProperty(value = "巡检结果") | |||
private List<QuestionTypeCountVo> content; | |||
@ApiModelProperty(value = "问题清单") | |||
private List<QuestionReportVO> questionReportList; | |||
} |
@@ -0,0 +1,51 @@ | |||
package com.tuoheng.admin.entity.vo; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
import java.util.List; | |||
/** | |||
* 报告信息Vo | |||
*/ | |||
@Data | |||
public class ReportVO implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty(value = "报告Id") | |||
private Integer id; | |||
@ApiModelProperty(value = "报告编号") | |||
private String reportNo; | |||
@ApiModelProperty(value = "任务ID") | |||
private Integer missionId; | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
@ApiModelProperty(value = "生成时间") | |||
private Date generateTime; | |||
@ApiModelProperty(value = "任务名称") | |||
private String missionName; | |||
@ApiModelProperty(value = "巡检机场") | |||
private String airportId; | |||
@ApiModelProperty(value = "巡检机场名称") | |||
private String airportName; | |||
@ApiModelProperty(value = "任务类型 1 日常,2 应急巡检") | |||
private Integer type; | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
@ApiModelProperty(value = "巡检时间") | |||
private Date executionStartTime; | |||
} |
@@ -0,0 +1,26 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
/** | |||
* 问题状态 | |||
*/ | |||
public enum QuestionStatusEnum { | |||
CONFIRM(1,"确认"), | |||
NEGLECT(2,"忽略"), | |||
NOTREVIEWED(3,"待确认"); | |||
QuestionStatusEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
public enum ReportStatusEnum { | |||
GENERATE(0,"未生成"), | |||
UPDATE(1,"需修改"), | |||
UN_GENERATE(2,"已生成"); | |||
ReportStatusEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -3,15 +3,15 @@ package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
/** | |||
* 问题处理状态 | |||
* 问题状态 | |||
*/ | |||
public enum QuestionEnum { | |||
public enum UpdateOrCreateEnum { | |||
REVIEWED(1,"已审核"), | |||
CREATE(1,"创建"), | |||
NOTREVIEWED(0,"待审核"); | |||
UPDATE(2,"更新"); | |||
QuestionEnum(int code, String description){ | |||
UpdateOrCreateEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.domain.Question; | |||
import com.tuoheng.admin.entity.domain.QuestionType; | |||
import com.tuoheng.admin.entity.vo.QuestionCountVo; | |||
import com.tuoheng.admin.entity.vo.QuestionTypeCountVo; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import java.util.List; | |||
import java.util.Map; | |||
/** | |||
* 巡检问题表 Mapper 接口 | |||
* | |||
* @author qiujinyang | |||
* @since 2022-08-03 | |||
*/ | |||
public interface QuestionMapper extends BaseMapper<Question> { | |||
List<QuestionTypeCountVo> analyze(Integer missionId, Integer tenantId); | |||
List<QuestionCountVo> analyzeType(Integer missionId, Integer tenantId); | |||
} |
@@ -13,12 +13,4 @@ import java.util.List; | |||
* @since 2021-09-02 | |||
*/ | |||
public interface QuestionTypeMapper extends BaseMapper<QuestionType> { | |||
/** | |||
* 查询巡检结果 | |||
* @param inspectionId 巡检ID | |||
* @param tenantId 租户id | |||
* @return | |||
*/ | |||
List<QuestionCountVo> queryCountByInspectionId(Integer inspectionId, Integer tenantId); | |||
} |
@@ -0,0 +1,13 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.domain.Report; | |||
/** | |||
* 巡检报告表 Mapper 接口 | |||
* | |||
* @author qiujinyang | |||
* @since 2022-08-03 | |||
*/ | |||
public interface ReportMapper extends BaseMapper<Report> { | |||
} |
@@ -1,130 +0,0 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.tuoheng.admin.entity.domain.InspectionFile; | |||
import com.tuoheng.admin.entity.domain.ThInspectionFile; | |||
import com.tuoheng.admin.entity.domain.ThMission; | |||
import com.tuoheng.admin.entity.request.QueryQuestionPictureRequest; | |||
import com.tuoheng.admin.entity.request.QueryQuestionRequest; | |||
import com.tuoheng.admin.entity.request.QuestionInventoryRequest; | |||
import com.tuoheng.admin.entity.vo.QuestionInventoryVo; | |||
import com.tuoheng.admin.entity.vo.QuestionTypeCountVo; | |||
import com.tuoheng.admin.entity.vo.ThInspectionQuestionPictureVo; | |||
import com.tuoheng.admin.entity.vo.ThInspectionQuestionVo; | |||
import org.apache.ibatis.annotations.Param; | |||
import java.util.List; | |||
public interface ThInspectionFileMapper extends BaseMapper<ThInspectionFile> { | |||
/** | |||
* 查询 巡检任务问题 列表 | |||
* | |||
* @param queryQuestionRequest 查询请求参数 | |||
* @return 任务问题列表 | |||
*/ | |||
IPage<ThInspectionQuestionVo> selectQuestionList(@Param("page") IPage page, @Param("request") QueryQuestionRequest queryQuestionRequest,@Param("tenantId") Integer tenantId); | |||
/** | |||
* 查询 巡检任务问题图片 列表 | |||
* | |||
* @param request 查询请求参数 | |||
* @return 问题图片列表 | |||
*/ | |||
List<ThInspectionQuestionPictureVo> selectPictureList(@Param("page") Page<ThInspectionQuestionPictureVo> page, @Param("request") QueryQuestionPictureRequest request,@Param("tenantId") Integer tenantId); | |||
/** | |||
* 查询 巡检任务问题图片数量 | |||
* | |||
* @param parm parm | |||
* @return | |||
*/ | |||
Integer selectCount(@Param("parm") ThInspectionFile parm); | |||
/** | |||
* 查询 巡检任务问题图片 详情 | |||
* | |||
* @param id 问题图片ID | |||
* @return 问题图片详情 | |||
*/ | |||
ThInspectionQuestionPictureVo selectPicture(Integer id,@Param("tenantId") Integer tenantId); | |||
/** | |||
* 查询问题清单 | |||
* | |||
* @param param 查询问题清单请求参数 | |||
* @return 问题清单 | |||
*/ | |||
IPage<QuestionInventoryVo> queryQuestionInventory(@Param("page") IPage page, QuestionInventoryRequest param,@Param("tenantId") Integer tenantId); | |||
/** | |||
* 根据工单ID 查询 问题类型数量统计 | |||
* | |||
* @param id 工单ID | |||
* @return 问题清单 | |||
*/ | |||
List<QuestionTypeCountVo> selectQuestionTypeCount(@Param("id") Integer id,@Param("tenantId") Integer tenantId); | |||
/** | |||
* 新增 巡检任务问题图片 | |||
* | |||
* @param record 问题图片实体 | |||
* @return 受影响的条数 | |||
*/ | |||
int insert(ThInspectionFile record); | |||
/** | |||
* 批量新增 巡检任务问题图片 | |||
* | |||
* @param records 问题图片实体 | |||
* @return 受影响的条数 | |||
*/ | |||
int batchadd(@Param("list") List<InspectionFile> records); | |||
/** | |||
* 审核/修改 巡检任务问题图片 | |||
* | |||
* @param record 问题图片实体 | |||
* @return 受影响的条数 | |||
*/ | |||
int updateByPrimaryKey(ThInspectionFile record); | |||
int updateByPrimaryKeySelective(ThInspectionFile record); | |||
/** | |||
* 查询 未审核问题图片数量 | |||
* | |||
* @param inspectionId 巡检ID | |||
* @return 未审核问题图片数量 | |||
*/ | |||
Integer getUnReviewCount(Integer inspectionId,@Param("tenantId") Integer tenantId); | |||
/** | |||
* 查询 已审核问题图片列表 | |||
* | |||
* @param inspectionId 巡检ID | |||
* @param tenantId 租户id | |||
* @return 已审核问题图片列表 | |||
*/ | |||
List<ThInspectionFile> selectReviewPictureList(Integer inspectionId,@Param("tenantId") Integer tenantId); | |||
/** | |||
* 查询 问题图片列表 | |||
* | |||
* @param inspectionId 巡检ID | |||
* @return | |||
*/ | |||
List<ThInspectionFile> selectByInspectionId(@Param("inspectionId") Integer inspectionId, @Param("fileName") String fileName,@Param("tenantId") Integer tenantId); | |||
/** | |||
* 删除任务相关的ai分析图 | |||
* | |||
* @param inspectionId 巡检任务id | |||
* @param tenantId 租户id | |||
* @return | |||
*/ | |||
Integer deleteByInspectionId(Integer inspectionId,@Param("tenantId") Integer tenantId); | |||
} |
@@ -1,14 +0,0 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.domain.InspectionQuestionItem; | |||
/** | |||
* 工单子项表 | |||
* | |||
* @author zhuzishuang | |||
* @date 2021/10/13 | |||
*/ | |||
public interface ThInspectionQuestionItemMapper extends BaseMapper<InspectionQuestionItem> { | |||
} |
@@ -1,26 +0,0 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.domain.Question; | |||
/** | |||
* 巡检任务问题工单 mapper | |||
* | |||
* @author zhuzishuang | |||
* @date 2021/9/28 | |||
*/ | |||
public interface ThInspectionQuestionMapper extends BaseMapper<Question> { | |||
int insertSelective(Question record); | |||
int deleteByPrimaryKey(Integer id); | |||
int insert(Question record); | |||
Question selectByPrimaryKey(Integer id); | |||
int updateByPrimaryKeySelective(Question record); | |||
int updateByPrimaryKey(Question record); | |||
} |
@@ -5,9 +5,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.tuoheng.admin.entity.domain.ThMission; | |||
import com.tuoheng.admin.entity.request.MissionQuery; | |||
import com.tuoheng.admin.entity.vo.AIInspectionVo; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import io.swagger.models.auth.In; | |||
import org.apache.ibatis.annotations.Param; | |||
import org.apache.ibatis.annotations.Select; | |||
import java.util.List; | |||
import java.util.Map; | |||
public interface ThMissionMapper extends BaseMapper<ThMission> { | |||
/** |
@@ -9,6 +9,7 @@ import com.tuoheng.admin.entity.request.MissionStatusRequest; | |||
import com.tuoheng.admin.entity.vo.MissionVO; | |||
import com.tuoheng.common.common.IBaseService; | |||
import com.tuoheng.common.common.OperationEnum; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import java.util.List; | |||
@@ -55,5 +56,4 @@ public interface IMissionService extends IBaseService<ThMission> { | |||
* @date: 2021/9/2 | |||
*/ | |||
OperationEnum deleteBatch(List<Integer> idList); | |||
} |
@@ -0,0 +1,32 @@ | |||
package com.tuoheng.admin.service; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.domain.Question; | |||
import com.tuoheng.admin.entity.domain.QuestionType; | |||
import com.tuoheng.admin.entity.request.QuestionRequest; | |||
import com.tuoheng.admin.entity.request.QuestionTypeQuery; | |||
import com.tuoheng.common.common.IBaseService; | |||
import com.tuoheng.common.utils.JsonResult; | |||
/** | |||
* 巡检问题表 服务类 | |||
* | |||
* @author qiujinyang | |||
* @since 2022-08-03 | |||
*/ | |||
public interface IQuestionService extends IBaseService<Question> { | |||
/** | |||
* 分页查询 | |||
* | |||
* @param query | |||
* @return | |||
*/ | |||
IPage<Question> queryPage(QuestionTypeQuery query); | |||
JsonResult check(QuestionRequest entity); | |||
JsonResult analyze(Integer missionId); | |||
JsonResult analyzeType(Integer missionId); | |||
} |
@@ -2,7 +2,7 @@ package com.tuoheng.admin.service; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.domain.QuestionType; | |||
import com.tuoheng.admin.entity.request.QuestionQuery; | |||
import com.tuoheng.admin.entity.request.QuestionTypeQuery; | |||
import com.tuoheng.common.common.IBaseService; | |||
/** | |||
@@ -19,5 +19,5 @@ public interface IQuestionTypeService extends IBaseService<QuestionType> { | |||
* @param query | |||
* @return | |||
*/ | |||
IPage<QuestionType> queryPage(QuestionQuery query); | |||
IPage<QuestionType> queryPage(QuestionTypeQuery query); | |||
} |
@@ -0,0 +1,57 @@ | |||
package com.tuoheng.admin.service; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.domain.Report; | |||
import com.tuoheng.admin.entity.request.ReportRequest; | |||
import com.tuoheng.admin.entity.vo.ReportInfoVO; | |||
import com.tuoheng.admin.entity.vo.ReportVO; | |||
import com.tuoheng.common.common.IBaseService; | |||
import com.tuoheng.common.common.OperationEnum; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
/** | |||
* 巡检报告表 服务类 | |||
* | |||
* @author WangHaoran | |||
* @since 2021-09-29 | |||
*/ | |||
public interface IReportService extends IBaseService<Report> { | |||
/** | |||
* 生成报告 | |||
* | |||
* @param missionId 任务Id | |||
* @return | |||
*/ | |||
JsonResult generateReport(Integer missionId); | |||
/** | |||
* 分页查询 | |||
* | |||
* @param request | |||
* @return | |||
*/ | |||
JsonResult queryPage(ReportRequest request); | |||
/** | |||
* 查看报告 详情 | |||
* | |||
* @param reportId | |||
* @return | |||
*/ | |||
ReportInfoVO detail(Integer reportId); | |||
/** | |||
* 导出报告word并下载 | |||
* | |||
* @param reportId 报告ID | |||
* @return | |||
*/ | |||
void exportReportWord(String reportId, HttpServletRequest request, HttpServletResponse response) throws Exception; | |||
JsonResult analyze(Integer missionId); | |||
} |
@@ -35,8 +35,8 @@ import java.util.*; | |||
/** | |||
* 巡检任务接口实现 | |||
* | |||
* @author: zhu_zishuang | |||
* @date: 2021/9/1 | |||
* @author: qiujinyang | |||
* @date: 2022/8/3 | |||
*/ | |||
@Service | |||
@Slf4j | |||
@@ -52,12 +52,13 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi | |||
@Override | |||
public Integer addMission(MissionRequest addThMissionRequest) { | |||
ThMission tm=new ThMission(); | |||
ThMission tm=new ThMission(UpdateOrCreateEnum.CREATE.getCode()); | |||
BeanUtils.copyProperties(addThMissionRequest,tm); | |||
// 根据当前时间,生成任务编码 | |||
String code = "XJRW" +CodeUtil.createCodeNo(); | |||
tm.setCode(code); | |||
tm.setReportStatus(ReportStatusEnum.GENERATE.getCode()); | |||
thMissionMapper.insert(tm); | |||
return tm.getId(); | |||
} | |||
@@ -101,7 +102,7 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi | |||
} | |||
private ThMission setStatus(MissionStatusRequest missionStatusRequest, ThMission thMission) { | |||
ThMission thMissionUpdate = new ThMission(); | |||
ThMission thMissionUpdate = new ThMission(UpdateOrCreateEnum.UPDATE.getCode()); | |||
thMissionUpdate.setId(thMission.getId()); | |||
thMissionUpdate.setPushUrl(missionStatusRequest.getPushUrl()); | |||
thMissionUpdate.setPullUrl(missionStatusRequest.getPullUrl()); | |||
@@ -119,7 +120,7 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi | |||
lambdaQueryWrapper.orderByAsc(ThMission::getExecutionStartTime); | |||
lambdaQueryWrapper.eq(ThMission::getInspectionLine, missionStatusRequest.getId()); | |||
lambdaQueryWrapper.eq(ThMission::getStatus,status); | |||
//lambdaQueryWrapper.eq(ThMission::getTenantId,ShiroUtils.getTenantId()); | |||
lambdaQueryWrapper.eq(ThMission::getTenantId,ShiroUtils.getTenantId()); | |||
List<ThMission> thMissions = thMissionMapper.selectList(lambdaQueryWrapper); | |||
ThMission thMission = thMissions.size()>0? thMissions.get(0) : null; | |||
return thMission; | |||
@@ -130,9 +131,10 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi | |||
Page<ThMission> page = new Page<>(); | |||
page.setSize(queryInspectionRequest.getLimit()); | |||
page.setCurrent(queryInspectionRequest.getPage()); | |||
//queryInspectionRequest.setTenantId(ShiroUtils.getTenantId()); | |||
queryInspectionRequest.setTenantId(ShiroUtils.getTenantId()); | |||
LambdaQueryWrapper<ThMission> queryInspection=new LambdaQueryWrapper<>(); | |||
queryParam(queryInspectionRequest, queryInspection); | |||
queryInspection.eq(ThMission::getMark,MarkTypeEnum.VALID.getCode()); | |||
IPage<ThMission> thMissionIPage = thMissionMapper.selectPage(page, queryInspection); | |||
@@ -154,29 +156,17 @@ public class MissionServiceImpl extends BaseServiceImpl<ThMissionMapper, ThMissi | |||
private void queryParam(MissionQuery queryInspectionRequest, LambdaQueryWrapper<ThMission> queryInspection) { | |||
//编号 | |||
if(!StringUtils.isEmpty(queryInspectionRequest.getCode())){ | |||
queryInspection.like(ThMission::getCode, queryInspectionRequest.getCode()); | |||
} | |||
queryInspection.like(!StringUtils.isEmpty(queryInspectionRequest.getCode()),ThMission::getCode, queryInspectionRequest.getCode()); | |||
//任务名称 | |||
if(!StringUtils.isEmpty(queryInspectionRequest.getName())){ | |||
queryInspection.like(ThMission::getName, queryInspectionRequest.getName()); | |||
} | |||
queryInspection.like(!StringUtils.isEmpty(queryInspectionRequest.getName()),ThMission::getName, queryInspectionRequest.getName()); | |||
//任务状态 | |||
if(!ObjectUtil.isEmpty(queryInspectionRequest.getStatus())){ | |||
queryInspection.eq(ThMission::getStatus, queryInspectionRequest.getStatus()); | |||
} | |||
queryInspection.eq(!ObjectUtil.isEmpty(queryInspectionRequest.getStatus()),ThMission::getStatus, queryInspectionRequest.getStatus()); | |||
//巡检机场 | |||
if(!StringUtils.isEmpty(queryInspectionRequest.getAirportId())){ | |||
queryInspection.eq(ThMission::getAirportId, queryInspectionRequest.getAirportId()); | |||
} | |||
queryInspection.eq(!StringUtils.isEmpty(queryInspectionRequest.getAirportId()),ThMission::getAirportId, queryInspectionRequest.getAirportId()); | |||
//巡检线路 | |||
if(!StringUtils.isEmpty(queryInspectionRequest.getInspectionLine())){ | |||
queryInspection.eq(ThMission::getInspectionLine, queryInspectionRequest.getInspectionLine()); | |||
} | |||
queryInspection.eq(!StringUtils.isEmpty(queryInspectionRequest.getInspectionLine()),ThMission::getInspectionLine, queryInspectionRequest.getInspectionLine()); | |||
//任务类型 | |||
if(!ObjectUtil.isEmpty(queryInspectionRequest.getInspectionType())){ | |||
queryInspection.eq(ThMission::getInspectionType, queryInspectionRequest.getInspectionType()); | |||
} | |||
queryInspection.eq(!ObjectUtil.isEmpty(queryInspectionRequest.getInspectionType()),ThMission::getInspectionType, queryInspectionRequest.getInspectionType()); | |||
} | |||
@Override |
@@ -0,0 +1,108 @@ | |||
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.conditions.update.LambdaUpdateWrapper; | |||
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.Question; | |||
import com.tuoheng.admin.entity.domain.QuestionType; | |||
import com.tuoheng.admin.entity.domain.ThMission; | |||
import com.tuoheng.admin.entity.request.QuestionRequest; | |||
import com.tuoheng.admin.entity.request.QuestionTypeQuery; | |||
import com.tuoheng.admin.entity.vo.QuestionTypeCountVo; | |||
import com.tuoheng.admin.enums.ReportStatusEnum; | |||
import com.tuoheng.admin.enums.UpdateOrCreateEnum; | |||
import com.tuoheng.admin.mapper.QuestionMapper; | |||
import com.tuoheng.admin.mapper.QuestionTypeMapper; | |||
import com.tuoheng.admin.mapper.ThMissionMapper; | |||
import com.tuoheng.admin.service.IQuestionService; | |||
import com.tuoheng.admin.service.IQuestionTypeService; | |||
import com.tuoheng.common.common.BaseServiceImpl; | |||
import com.tuoheng.common.exception.ServiceException; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import com.tuoheng.common.utils.StringUtils; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.List; | |||
import java.util.Map; | |||
/** | |||
* 巡检问题表 服务实现类 | |||
* | |||
* @author qiujinyang | |||
* @since 2022-08-03 | |||
*/ | |||
@Service | |||
public class QuestionServiceImpl extends BaseServiceImpl<QuestionMapper, Question> implements IQuestionService { | |||
@Autowired | |||
private QuestionMapper questionMapper; | |||
@Autowired | |||
private ThMissionMapper missionMapper; | |||
@Override | |||
public IPage<Question> queryPage(QuestionTypeQuery query) { | |||
if(null == query.getPage() || null == query.getLimit()){ | |||
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); | |||
} | |||
// 获取分页数据 | |||
IPage<Question> page = new Page<>(query.getPage(), query.getLimit()); | |||
IPage<Question> pageData = questionMapper.selectPage(page, new LambdaQueryWrapper<Question>() | |||
.eq(null != query.getType(), Question::getType, query.getType()) | |||
.eq(Question::getMark, 1).orderByDesc(Question::getCreateTime)); | |||
return pageData; | |||
} | |||
@Override | |||
public JsonResult<Boolean> check(QuestionRequest entity) { | |||
//根据ID的数量来判断是否是批量确认和忽略 | |||
Question question=new Question(UpdateOrCreateEnum.UPDATE.getCode()); | |||
question.setStatus(entity.getStatus()); | |||
int update; | |||
Integer qId; | |||
if(entity.getId().length>1){ | |||
qId= entity.getId()[0]; | |||
//批量 | |||
update= questionMapper.update(question, new LambdaUpdateWrapper<Question>().in(Question::getId, qId)); | |||
}else{ | |||
//单个 | |||
qId= entity.getId()[0]; | |||
question.setId(qId); | |||
question.setType(entity.getType()); | |||
update = questionMapper.updateById(question); | |||
} | |||
Integer missionId = questionMapper.selectById(qId).getMissionId(); | |||
ThMission thMission=new ThMission(UpdateOrCreateEnum.UPDATE.getCode()); | |||
thMission.setReportStatus(ReportStatusEnum.UPDATE.getCode()); | |||
thMission.setId(missionId); | |||
missionMapper.updateById(thMission); | |||
return JsonResult.success(update>0); | |||
} | |||
@Override | |||
public JsonResult analyze(Integer missionId) { | |||
List<QuestionTypeCountVo> resultMap= questionMapper.analyze(missionId, ShiroUtils.getTenantId()); | |||
return null; | |||
} | |||
@Override | |||
public JsonResult analyzeType(Integer missionId) { | |||
List<QuestionTypeCountVo> resultMap= questionMapper.analyze(missionId, ShiroUtils.getTenantId()); | |||
return null; | |||
} | |||
} |
@@ -5,7 +5,7 @@ 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.QuestionType; | |||
import com.tuoheng.admin.entity.request.QuestionQuery; | |||
import com.tuoheng.admin.entity.request.QuestionTypeQuery; | |||
import com.tuoheng.admin.mapper.QuestionTypeMapper; | |||
import com.tuoheng.admin.service.IQuestionTypeService; | |||
import com.tuoheng.common.common.BaseServiceImpl; | |||
@@ -27,7 +27,7 @@ public class QuestionTypeServiceImpl extends BaseServiceImpl<QuestionTypeMapper, | |||
private QuestionTypeMapper questionMapper; | |||
@Override | |||
public IPage<QuestionType> queryPage(QuestionQuery query) { | |||
public IPage<QuestionType> queryPage(QuestionTypeQuery query) { | |||
if(null == query.getPage() || null == query.getLimit()){ | |||
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); | |||
} |
@@ -0,0 +1,600 @@ | |||
package com.tuoheng.admin.service.impl; | |||
import cn.hutool.core.lang.Assert; | |||
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.lowagie.text.*; | |||
import com.tuoheng.admin.common.ServiceExceptionEnum; | |||
import com.tuoheng.admin.entity.domain.Question; | |||
import com.tuoheng.admin.entity.domain.Report; | |||
import com.tuoheng.admin.entity.domain.ThInspection; | |||
import com.tuoheng.admin.entity.domain.ThMission; | |||
import com.tuoheng.admin.entity.request.ReportRequest; | |||
import com.tuoheng.admin.entity.vo.*; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.ReportStatusEnum; | |||
import com.tuoheng.admin.enums.UpdateOrCreateEnum; | |||
import com.tuoheng.admin.mapper.QuestionMapper; | |||
import com.tuoheng.admin.mapper.ReportMapper; | |||
import com.tuoheng.admin.mapper.ThInspectionMapper; | |||
import com.tuoheng.admin.mapper.ThMissionMapper; | |||
import com.tuoheng.admin.service.IMissionService; | |||
import com.tuoheng.admin.service.IQuestionService; | |||
import com.tuoheng.admin.service.IReportService; | |||
import com.tuoheng.admin.service.IThInspectionService; | |||
import com.tuoheng.admin.utils.WordUtilsOld; | |||
import com.tuoheng.common.common.BaseServiceImpl; | |||
import com.tuoheng.common.common.OperationEnum; | |||
import com.tuoheng.common.config.CommonConfig; | |||
import com.tuoheng.common.config.UploadFileConfig; | |||
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.City; | |||
import com.tuoheng.system.entity.User; | |||
import com.tuoheng.system.mapper.CityMapper; | |||
import com.tuoheng.system.service.impl.UserServiceImpl; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import io.swagger.models.auth.In; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.BeanUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.core.io.UrlResource; | |||
import org.springframework.stereotype.Service; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import java.io.File; | |||
import java.io.FileInputStream; | |||
import java.io.OutputStream; | |||
import java.net.URLEncoder; | |||
import java.util.*; | |||
import java.util.List; | |||
/** | |||
* 巡检报告表 服务实现类 | |||
* | |||
* @author qiujinyang | |||
* @since 2022-08-04 | |||
*/ | |||
@Slf4j | |||
@Service | |||
public class ReportServiceImpl extends BaseServiceImpl<ReportMapper, Report> implements IReportService { | |||
@Autowired | |||
private ThInspectionMapper inspectionMapper; | |||
@Autowired | |||
private IThInspectionService inspectionService; | |||
@Autowired | |||
private ThMissionMapper missionMapper; | |||
@Autowired | |||
private ReportMapper reportMapper; | |||
@Autowired | |||
private IQuestionService questionService; | |||
@Autowired | |||
private UserServiceImpl userService; | |||
@Override | |||
public JsonResult generateReport(Integer missionId) { | |||
Assert.notNull(missionId,"任务ID为空"); | |||
String reportNo = createReportNo(); | |||
//查询巡检信息 | |||
ThMission mission = missionMapper.selectById(missionId); | |||
Assert.notNull(mission,"任务不能为空!"); | |||
//如果报告已经生成,就修改,如果未生成就创建 | |||
if(mission.getReportStatus() == ReportStatusEnum.GENERATE.getCode()){ | |||
//生成报告 | |||
Report report = setInfo(missionId, reportNo, mission); | |||
reportMapper.insert(report); | |||
}else if(mission.getReportStatus() == ReportStatusEnum.UPDATE.getCode()){ | |||
Report update = reportMapper.selectOne(new LambdaQueryWrapper<Report>().eq(Report::getMissionId, missionId)); | |||
update.setGenerateTime(new Date()); | |||
//修改报告 | |||
reportMapper.updateById(update); | |||
} | |||
//更新任务的状态 | |||
mission.setReportStatus(ReportStatusEnum.UN_GENERATE.getCode()); | |||
missionMapper.updateById(mission); | |||
return JsonResult.success(missionMapper.updateById(mission)>0); | |||
} | |||
private Report setInfo(Integer missionId, String reportNo, ThMission mission) { | |||
Report report = new Report(UpdateOrCreateEnum.CREATE.getCode()); | |||
report.setReportNo(reportNo); | |||
report.setMissionId(missionId); | |||
report.setMissionName(mission.getName()); | |||
report.setExecutionStartTime(mission.getExecutionStartTime()); | |||
report.setGenerateTime(new Date()); | |||
report.setAirportId(mission.getAirportId()); | |||
report.setAirportName(mission.getAirportName()); | |||
report.setTenantId(mission.getTenantId()); | |||
report.setType(mission.getType()); | |||
return report; | |||
} | |||
@Override | |||
public JsonResult queryPage(ReportRequest request) { | |||
if(null == request.getPage() || null == request.getLimit()){ | |||
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); | |||
} | |||
// 获取分页数据 | |||
IPage<Report> page = new Page<>(request.getPage(), request.getLimit()); | |||
IPage<Report> pageData = reportMapper.selectPage(page, new LambdaQueryWrapper<Report>() | |||
.like(StringUtils.isNotEmpty(request.getReportNo()), Report::getReportNo, request.getReportNo()) | |||
.like(StringUtils.isNotEmpty(request.getName()), Report::getMissionName, request.getName()) | |||
.eq(StringUtils.isNotEmpty(request.getAirportId()), Report::getAirportId, request.getAirportId()) | |||
.eq(ObjectUtil.isNotEmpty(request.getType()), Report::getType, request.getType()) | |||
.eq(Report::getMark, MarkTypeEnum.VALID.getCode()) | |||
.eq(Report::getTenantId, ShiroUtils.getTenantId()) | |||
.orderByDesc(Report::getCreateTime)); | |||
return JsonResult.success(pageData); | |||
} | |||
@Override | |||
public ReportInfoVO detail(Integer reportId) { | |||
ReportInfoVO reportInfoVo = new ReportInfoVO(); | |||
//查询报告 | |||
Report report = reportMapper.selectById(reportId); | |||
Integer missionId = report.getMissionId(); | |||
reportInfoVo.setMissionId(missionId); | |||
reportInfoVo.setCompany("汤山林场"); | |||
reportInfoVo.setLcName("汤山林场"); | |||
//巡查里程 | |||
ThMission thMission = missionMapper.selectById(missionId); | |||
MissionVO missionVO=new MissionVO(); | |||
BeanUtils.copyProperties(thMission,missionVO); | |||
reportInfoVo.setMission(missionVO); | |||
//添加巡检天气 | |||
reportInfoVo.setAirWeather(inspectionService.getWeather(Integer.valueOf(report.getAirportId()))); | |||
//查询巡检结果 | |||
JsonResult analyze = questionService.analyze(missionId); | |||
JsonResult jsonResult = questionService.analyzeType(missionId); | |||
//查询问题清单 | |||
List<Question> questionList = questionService.list(new LambdaQueryWrapper<Question>().eq(Question::getTenantId, ShiroUtils.getTenantId()) | |||
.eq(Question::getMissionId, missionId) | |||
); | |||
List<QuestionReportVO> questionReportVOList=new ArrayList<>(); | |||
for (Question question : questionList) { | |||
QuestionReportVO questionReportVO=new QuestionReportVO(); | |||
BeanUtils.copyProperties(question,questionReportVO); | |||
questionReportVOList.add(questionReportVO); | |||
} | |||
//问题列表 | |||
reportInfoVo.setQuestionReportList(questionReportVOList); | |||
return reportInfoVo; | |||
} | |||
@Override | |||
public void exportReportWord(String reportId, HttpServletRequest request, HttpServletResponse response) throws Exception { | |||
/*ReportVO reportInfoVo = new ReportVO(); | |||
//查询报告 | |||
Report report = reportMapper.selectOne(new LambdaQueryWrapper<Report>() | |||
.eq(Report::getId, reportId) | |||
.eq(Report::getTenantId, ShiroUtils.getTenantId())); | |||
BeanUtils.copyProperties(report, reportInfoVo); | |||
//查询巡检结果 | |||
List<QuestionCountVo> questionCountVoList = questionMapper.queryCountByInspectionId(report.getInspectionId(), ShiroUtils.getTenantId()); | |||
reportInfoVo.setInspectionResult(questionCountVoList); | |||
//查询问题清单 | |||
List<QuestionReportVO> imageList = inspectionFileMapper.queryPictureByInspectionId(report.getInspectionId(), ShiroUtils.getTenantId()); | |||
reportInfoVo.setImageList(imageList); | |||
reportInfoVo.setQuestionCount(imageList.size()); | |||
String[] inspectionPeople = report.getFlightHand().split(","); | |||
reportInfoVo.setInspectionPeopleCount(inspectionPeople.length); | |||
//创建word | |||
String fileName = report.getReportNo()+".doc"; | |||
String filePath = UploadFileConfig.uploadFolder+"/doc/"+fileName; | |||
File fd = new File(UploadFileConfig.uploadFolder+"/doc"); | |||
File f = new File(filePath); | |||
if(!fd.exists()){ | |||
fd.mkdirs(); | |||
} | |||
WordUtilsOld wordUtils = new WordUtilsOld(); | |||
try { | |||
if(!f.exists()||f.length()<1000) { | |||
f.delete(); | |||
f.createNewFile(); | |||
wordUtils.openDocument(filePath); | |||
wordUtils.getDocument().setPageSize(PageSize.A4); | |||
wordUtils.getDocument().setMargins(71f, 71f, 72f, 72f); | |||
//标题 | |||
wordUtils.insertTitlePattern("南京市河道无人机巡检报告", wordUtils.rtfGsBt1); | |||
wordUtils.insertContext("报告编号:"+reportInfoVo.getReportNo(),10,Font.NORMAL,Element.ALIGN_RIGHT,20,0,0); | |||
wordUtils.insertTitlePatternThird("一:河湖信息", wordUtils.rtfGsBt3); | |||
Table table = new Table(6);//生成一表格 | |||
table.setOffset(1f); | |||
int width[] = {1, 1, 1, 1, 1,1}; | |||
table.setWidths(width);//设置系列所占比例 | |||
table.setWidth(100); | |||
table.setAutoFillEmptyCells(true); | |||
table.setAlignment(Element.ALIGN_LEFT);//居中显示 | |||
for (int i = 0; i < 11; i++) { | |||
Cell cell = new Cell(); | |||
String str = null; | |||
cell.setVerticalAlignment(Element.ALIGN_RIGHT); | |||
cell.setHorizontalAlignment(Element.ALIGN_CENTER); | |||
Font font = new Font(); | |||
font.setSize(10.5f); | |||
font.setStyle(Font.BOLD); | |||
if (i == 0) { | |||
str = "河道基本信息";cell.setColspan(6); | |||
} else if (i == 1) { | |||
str = "责任单位"; | |||
} else if (i == 2) { | |||
str = reportInfoVo.getStreamArea(); | |||
font.setStyle(Font.NORMAL); | |||
} else if (i == 3) { | |||
str = "河流名称"; | |||
} else if (i == 4) { | |||
str = reportInfoVo.getStreamName(); | |||
font.setStyle(Font.NORMAL); | |||
} else if (i == 5) { | |||
str = "河段长度"; | |||
} else if (i == 6) { | |||
str = reportInfoVo.getStreamLength(); | |||
font.setStyle(Font.NORMAL); | |||
} else if (i == 7) { | |||
str = "起讫位置"; | |||
} else if (i == 8) { | |||
str = reportInfoVo.getStreamLocation(); | |||
font.setStyle(Font.NORMAL);cell.setColspan(3); | |||
} else if (i == 9) { | |||
str = "巡查里程"; | |||
} else if (i == 10) { | |||
str = reportInfoVo.getStreamLength(); | |||
font.setStyle(Font.NORMAL); | |||
} | |||
Paragraph p = new Paragraph(str, font); | |||
cell.add(p); | |||
table.addCell(cell); | |||
} | |||
wordUtils.getDocument().add(table); | |||
wordUtils.insertTitlePatternThird("二:巡检信息", wordUtils.rtfGsBt3); | |||
Table table2 = new Table(6);//生成一表格 | |||
table2.setOffset(1f); | |||
int width2[] = {1, 1, 1, 1, 1, 1}; | |||
table2.setWidths(width2);//设置系列所占比例 | |||
table2.setWidth(100); | |||
table2.setAutoFillEmptyCells(true); | |||
table2.setAlignment(Element.ALIGN_CENTER);//居中显示 | |||
table2.setAlignment(Element.ALIGN_MIDDLE);//垂直居中显示 | |||
for (int i = 0; i < 18; i++) { | |||
Cell cell = new Cell(); | |||
String str = null; | |||
cell.setVerticalAlignment(Element.ALIGN_LEFT); | |||
cell.setHorizontalAlignment(Element.ALIGN_CENTER); | |||
Font font = new Font(); | |||
font.setSize(10.5f); | |||
font.setStyle(Font.BOLD); | |||
if (i == 0) { | |||
str = "天气情况"; | |||
} else if (i == 1) { | |||
str = reportInfoVo.getWeather();font.setStyle(Font.NORMAL); | |||
} else if (i == 2) { | |||
str = "巡查人数"; | |||
} else if (i == 3) { | |||
str = reportInfoVo.getInspectionPeopleCount()==null?"":reportInfoVo.getInspectionPeopleCount().toString();font.setStyle(Font.NORMAL); | |||
} else if (i == 4) { | |||
str = "巡查人员"; | |||
} else if (i == 5) { | |||
str = reportInfoVo.getFlightHandName();font.setStyle(Font.NORMAL); | |||
} else if (i == 6) { | |||
str = "巡查方式"; | |||
} else if (i == 7) { | |||
if(reportInfoVo.getInspectionWay() == 1){ | |||
str = "无人机"; | |||
}else if(reportInfoVo.getInspectionWay() == 2){ | |||
str = "无人船"; | |||
}else if(reportInfoVo.getInspectionWay() == 3){ | |||
str = "人工"; | |||
} | |||
font.setStyle(Font.NORMAL); | |||
} else if (i == 8) { | |||
str = "巡查设备"; | |||
}else if (i == 9) { | |||
str = reportInfoVo.getInspectionDevice();font.setStyle(Font.NORMAL); | |||
} else if (i == 10) { | |||
str = "巡查日期"; | |||
} else if (i == 11) { | |||
str = reportInfoVo.getInspectionTime()==null?"":DateUtils.dateTime(reportInfoVo.getInspectionTime());font.setStyle(Font.NORMAL); | |||
} else if (i == 12) { | |||
str = "飞行高度"; | |||
} else if (i == 13) { | |||
str = reportInfoVo.getFlightHeight();font.setStyle(Font.NORMAL); | |||
} else if (i == 14) { | |||
str = "巡查类型"; | |||
} else if (i == 15) { | |||
if(reportInfoVo.getInspectionType() == 1){ | |||
str = "常规巡河";font.setStyle(Font.NORMAL); | |||
}else if(reportInfoVo.getInspectionType() == 2){ | |||
str = "其他";font.setStyle(Font.NORMAL); | |||
} | |||
} else if (i == 16) { | |||
str = "问题点数量"; | |||
} else if (i == 17) { str = reportInfoVo.getQuestionCount()==null?"":reportInfoVo.getQuestionCount().toString();font.setStyle(Font.NORMAL); | |||
} | |||
Paragraph p = new Paragraph(str, font); | |||
cell.add(p); | |||
table2.addCell(cell); | |||
} | |||
wordUtils.getDocument().add(table2); | |||
Map<String, Object> params = getInsCount(reportInfoVo); | |||
wordUtils.insertTitlePatternThird("三:巡检结果", wordUtils.rtfGsBt3); | |||
Table table3 = new Table(5);//生成一表格 | |||
table3.setOffset(1f); | |||
int width3[] = {1,2, 3, 14, 3}; | |||
table3.setWidths(width3);//设置系列所占比例 | |||
table3.setWidth(100); | |||
table3.setAutoFillEmptyCells(true); | |||
// table3.setAlignment(Element.ALIGN_CENTER);//居中显示 | |||
// table3.setAlignment(Element.ALIGN_MIDDLE);//垂直居中显示 | |||
for (int i = 0; i < 44; i++) { | |||
Cell cell = new Cell(); | |||
String str = null; | |||
cell.setVerticalAlignment(Element.ALIGN_CENTER); | |||
cell.setHorizontalAlignment(Element.ALIGN_CENTER); | |||
Font font = new Font(); | |||
font.setSize(10.5f); | |||
font.setStyle(Font.BOLD); | |||
if (i == 0) {str = "序号"; | |||
} else if (i == 1) {str = "项目";cell.setColspan(2); | |||
} else if (i == 2) { str = "巡检内容"; | |||
} else if (i == 3) { str = "巡检监测结果"; | |||
} else if (i == 4) { str = "一";cell.setRowspan(7); | |||
} else if (i == 5) { str = "水面";cell.setRowspan(7); | |||
} else if (i == 6) { str = "日常监测";cell.setRowspan(4); | |||
} else if (i == 7) { str = "有大面积漂浮物";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 8) { str = params.get("${totalCount1}").toString();font.setStyle(Font.NORMAL); | |||
} else if (i == 9) { str = "水生植物死亡";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 10) { str = params.get("${totalCount2}").toString();font.setStyle(Font.NORMAL); | |||
} else if (i == 11) { str = "水面有明显鱼类翻肚现象";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 12) { str = params.get("${totalCount3}").toString();font.setStyle(Font.NORMAL); | |||
} else if (i == 13) { str = "河道内存在水生植被";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 14) { str = params.get("${totalCount13}").toString();font.setStyle(Font.NORMAL); | |||
} else if (i == 15) { str = "重点核查";cell.setRowspan(3); | |||
} else if (i == 16) { str = "河道内无大面积蓝藻爆发";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 17) { str = params.get("${totalCount4}").toString();font.setStyle(Font.NORMAL); | |||
} else if (i == 18) { str = "水生动、植物大面积死亡";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 19) { str = params.get("${totalCount5}").toString();font.setStyle(Font.NORMAL); | |||
} else if (i == 20) { str = "河道无违规阻水物";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 21) { str = params.get("${totalCount6}").toString();font.setStyle(Font.NORMAL); | |||
} else if (i == 22) { str = "二";cell.setRowspan(4); | |||
} else if (i == 23) { str = "岸线";cell.setRowspan(4); | |||
} else if (i == 24) { str = "日常监测";cell.setRowspan(3); | |||
} else if (i == 25) { str = "河道养护范围内大面积毁绿、种菜";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 26) { str = params.get("${totalCount7}").toString();font.setStyle(Font.NORMAL); | |||
} else if (i == 27) { str = "河堤、栏杆等设施有损坏";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 28) { str = params.get("${totalCount8}").toString();font.setStyle(Font.NORMAL); | |||
} else if (i == 29) { str = "岸坡有大面积垃圾";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 30) { str = params.get("${totalCount9}").toString();font.setStyle(Font.NORMAL); | |||
} else if (i == 31) { str = "重点核查"; | |||
} else if (i == 32) { str = "河道蓝线内(岸上)新增违法建筑或构造物";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 33) { str = params.get("${totalCount10}").toString();font.setStyle(Font.NORMAL); | |||
} else if (i == 34) { str = "三"; | |||
} else if (i == 35) { str = "排口"; | |||
} else if (i == 36) { str = "日常监测"; | |||
} else if (i == 37) { str = "发现未备案入河排口";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 38) { str = params.get("${totalCount11}").toString();font.setStyle(Font.NORMAL); | |||
} else if (i ==39) { str = "四"; | |||
} else if (i == 40) { str = "水质"; | |||
} else if (i == 41) { str = "日常监测"; | |||
} else if (i == 42) { str = "按照相关水体标准,监测段面水质不达标";cell.setHorizontalAlignment(Element.ALIGN_LEFT);font.setStyle(Font.NORMAL); | |||
} else if (i == 43) { str = params.get("${totalCount12}").toString();font.setStyle(Font.NORMAL); | |||
} | |||
Paragraph p = new Paragraph(str, font); | |||
cell.add(p); | |||
table3.addCell(cell); | |||
}*/ | |||
/* wordUtils.getDocument().add(table3); | |||
if(reportInfoVo.getImageList().size()>0) { | |||
wordUtils.insertTitlePatternThird("四:问题清单", wordUtils.rtfGsBt3); | |||
for (int i = 0; i < reportInfoVo.getImageList().size(); i++) { | |||
QuestionReportVO inspectionFileInfoVo = reportInfoVo.getImageList().get(i); | |||
InspectionQuestionItem item = inspectionQuestionItemService.getOne(new LambdaQueryWrapper<InspectionQuestionItem>() | |||
.eq(inspectionFileInfoVo.getId() != null, InspectionQuestionItem::getInspectionFileId, inspectionFileInfoVo.getId()) | |||
.eq(InspectionQuestionItem::getTenantId, ShiroUtils.getTenantId())); | |||
if (item != null) { | |||
inspectionFileInfoVo.setHandImg(item.getHandlerImage()); | |||
inspectionFileInfoVo.setHandContent(item.getHandlerResult()); | |||
inspectionFileInfoVo.setHandTime(DateUtils.dateTime(item.getHandlerTime())); | |||
User user = userService.getOne(new LambdaQueryWrapper<User>() | |||
.eq(User::getId, item.getHandlerUser()) | |||
.eq(User::getTenantId, ShiroUtils.getTenantId())); | |||
inspectionFileInfoVo.setHanderName(user.getRealname()); | |||
} | |||
Table table4 = new Table(2);//生成一表格 | |||
table4.setOffset(1f); | |||
int width4[] = {1, 2}; | |||
table4.setWidths(width4);//设置系列所占比例 | |||
table4.setWidth(100); | |||
table4.setAutoFillEmptyCells(true); | |||
//table4.setAlignment(Element.ALIGN_LEFT);//居中显示 | |||
// table4.setAlignment(Element.ALIGN_MIDDLE);//垂直居中显示 | |||
for (int j = 0; j < 15; j++) { | |||
Cell cell = new Cell(); | |||
//cell.setVerticalAlignment(Element.ALIGN_LEFT); | |||
//cell.setHorizontalAlignment(Element.ALIGN_CENTER); | |||
String str = ""; | |||
Font font = new Font(); | |||
font.setSize(10.5f); | |||
cell.setVerticalAlignment(Element.ALIGN_CENTER); | |||
if (j == 0) { | |||
font.setSize(12); | |||
str = " 问题" + (i + 1); | |||
cell.add(new Paragraph(str, font)); | |||
cell.setColspan(2); | |||
font.setStyle(Font.BOLD); | |||
//cell.setVerticalAlignment(Element.ALIGN_LEFT); | |||
} else if (j == 1) { | |||
str = " 坐标"; | |||
cell.add(new Paragraph(str, font)); | |||
} else if (j == 2) { | |||
str = reportInfoVo.getImageList().get(i).getLongitude() + "," + reportInfoVo.getImageList().get(i).getLatitude(); | |||
cell.add(new Paragraph(str, font)); | |||
} else if (j == 3) { | |||
str = " 问题描述"; | |||
cell.add(new Paragraph(str, font)); | |||
} else if (j == 4) { | |||
str = reportInfoVo.getImageList().get(i).getContent(); | |||
cell.add(new Paragraph(str, font)); | |||
} else if (j == 5) { | |||
str = " 问题图片"; | |||
cell.add(new Paragraph(str, font)); | |||
} else if (j == 6) { | |||
Image image = null; | |||
String url = CommonConfig.imageURL + reportInfoVo.getImageList().get(i).getFileImage(); | |||
if (new UrlResource(url).exists()) { | |||
image = Image.getInstance(url); | |||
image.setAlignment(Image.ALIGN_CENTER); | |||
image.scalePercent(100); //依照比例缩放 | |||
image.setAbsolutePosition(400, 600); | |||
image.scaleToFit(300, 300);//自定义大 | |||
} else { | |||
log.error("图片不存在!" + url); | |||
} | |||
if (new UrlResource(url).exists()) { | |||
cell.add(image); | |||
} else { | |||
cell.add(new Paragraph("")); | |||
} | |||
} else if (j == 7) { | |||
str = " 处理结果"; | |||
cell.add(new Paragraph(str, font)); | |||
cell.setColspan(2); | |||
font.setStyle(Font.BOLD); | |||
} else if (j == 8) { | |||
str = " 处理人"; | |||
cell.add(new Paragraph(str, font)); | |||
} else if (j == 9) { | |||
str = inspectionFileInfoVo.getHanderName(); | |||
cell.add(new Paragraph(str, font)); | |||
} else if (j == 10) { | |||
str = " 处理时间"; | |||
cell.add(new Paragraph(str, font)); | |||
} else if (j == 11) { | |||
str = inspectionFileInfoVo.getHandTime(); | |||
cell.add(new Paragraph(str, font)); | |||
} else if (j == 12) { | |||
str = " 备注"; | |||
cell.add(new Paragraph(str, font)); | |||
} else if (j == 13) { | |||
str = inspectionFileInfoVo.getHandContent(); | |||
cell.add(new Paragraph(str, font)); | |||
} else if (j == 14) { | |||
String[] handUrls = inspectionFileInfoVo.getHandImg().split(","); | |||
for (int k = 0; k < handUrls.length; k++) { | |||
cell = new Cell(); | |||
cell.setVerticalAlignment(Element.ALIGN_CENTER); | |||
if (handUrls.length == 1) { | |||
cell.add(new Paragraph(" 结果图片", font)); | |||
} else { | |||
cell.add(new Paragraph(" 结果图片" + (k + 1), font)); | |||
} | |||
table4.addCell(cell); | |||
cell = new Cell(); | |||
Image image = null; | |||
String url = CommonConfig.imageURL + handUrls[k]; | |||
if (new UrlResource(url).exists()) { | |||
image = Image.getInstance(url); | |||
image.setAlignment(Image.ALIGN_CENTER); | |||
image.scalePercent(100); //依照比例缩放 | |||
image.setAbsolutePosition(400, 600); | |||
image.scaleToFit(300, 300);//自定义大 | |||
} else { | |||
System.out.println("图片不存在!" + url); | |||
} | |||
if (new UrlResource(url).exists()) { | |||
cell.add(image); | |||
} else { | |||
cell.add(new Paragraph("")); | |||
} | |||
table4.addCell(cell); | |||
} | |||
} | |||
if (j != 14) { | |||
table4.addCell(cell); | |||
} | |||
} | |||
wordUtils.getDocument().add(table4); | |||
} | |||
} | |||
wordUtils.closeDocument(); | |||
} | |||
//清空缓存 | |||
response.reset(); | |||
// 定义浏览器响应表头,并定义下载名 | |||
String fileName = URLEncoder.encode("南京市河道无人机巡检报告【"+ report.getReportNo() + "】.doc", "UTF-8"); | |||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName); | |||
response.setCharacterEncoding("utf-8"); | |||
//定义下载的类型 | |||
response.setContentType("application/msword;charset=UTF-8"); | |||
OutputStream out; | |||
File files = new File(UploadFileConfig.uploadFolder +"doc/",filename); | |||
FileInputStream inputStream = new FileInputStream(files); | |||
//3.通过response获取ServletOutputStream对象(out) | |||
out = response.getOutputStream(); | |||
int b = 0; | |||
byte[] buffer = new byte[512]; | |||
while (b != -1){ | |||
b = inputStream.read(buffer); | |||
//4.写到输出流(out)中 | |||
out.write(buffer,0,b); | |||
} | |||
inputStream.close(); | |||
out.close(); | |||
out.flush(); | |||
System.out.println("结束。。。。。。"); | |||
}catch (Exception e){ | |||
e.printStackTrace(); | |||
}finally { | |||
wordUtils.closeDocument(); | |||
}*/ | |||
} | |||
@Override | |||
public JsonResult analyze(Integer missionId) { | |||
JsonResult jsonResult=questionService.analyze(missionId); | |||
return null; | |||
} | |||
/** | |||
* 生成报告编号,R+年月日+随机四位数 | |||
* @return | |||
*/ | |||
public String createReportNo(){ | |||
String Date = DateUtils.dateTimeNow(DateUtils.YYYYMMDD); | |||
int randomNum = new Random().nextInt(9999) % (9999 - 1000 + 1) + 1000; | |||
String reportNo = "R" + Date + randomNum; | |||
return reportNo; | |||
} | |||
} |
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.tuoheng.admin.entity.domain.Tenant; | |||
import com.tuoheng.admin.entity.dto.TenantDto; | |||
import com.tuoheng.admin.entity.request.TenantQuery; | |||
import com.tuoheng.admin.enums.UpdateOrCreateEnum; | |||
import com.tuoheng.admin.mapper.TenantMapper; | |||
import com.tuoheng.admin.service.ITenantService; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
@@ -86,7 +87,7 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp | |||
throw new ServiceException(0, "系统中已经存在相同的账号信息"); | |||
} | |||
// 参数转换 | |||
Tenant tenant = new Tenant(); | |||
Tenant tenant = new Tenant(UpdateOrCreateEnum.CREATE.getCode()); | |||
BeanUtils.copyProperties(tenantDto, tenant); | |||
// 租户头像 | |||
if (StringUtils.isNotNull(tenantDto.getLogo()) && tenantDto.getLogo().contains(CommonConfig.imageURL)) { |
@@ -8,6 +8,7 @@ import com.tuoheng.admin.entity.domain.ThInspection; | |||
import com.tuoheng.admin.entity.domain.ThMission; | |||
import com.tuoheng.admin.entity.request.InspectionRequest; | |||
import com.tuoheng.admin.entity.vo.*; | |||
import com.tuoheng.admin.enums.UpdateOrCreateEnum; | |||
import com.tuoheng.admin.mapper.ThInspectionMapper; | |||
import com.tuoheng.admin.mapper.ThMissionMapper; | |||
import com.tuoheng.admin.service.IThInspectionService; | |||
@@ -25,7 +26,9 @@ import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.http.HttpStatus; | |||
import org.springframework.stereotype.Service; | |||
import java.time.LocalDate; | |||
import java.util.ArrayList; | |||
import java.util.Date; | |||
import java.util.List; | |||
/** | |||
@@ -64,7 +67,7 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, | |||
@Override | |||
public Integer track(InspectionRequest inspectionRequest) { | |||
ThInspection inspection=new ThInspection(); | |||
ThInspection inspection=new ThInspection(UpdateOrCreateEnum.CREATE.getCode()); | |||
BeanUtils.copyProperties(inspectionRequest,inspection); | |||
inspectionMapper.insert(inspection); | |||
return inspection.getId(); | |||
@@ -72,7 +75,6 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, | |||
@Override | |||
public List<AirPortVO> airport() throws ServiceException { | |||
//这边需要配置到yml文件里面 | |||
String url = CommonConfig.airportUrl +"/api/airportInterface/airportList"; | |||
String param="page=1&limit=10"; | |||
@@ -81,12 +83,9 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, | |||
if(!ObjectUtil.isEmpty(jsonResult.getData()) &&jsonResult.getCode() != 0) { | |||
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "获取机场信息失败,请重试"); | |||
} | |||
return JSONObject.parseArray(JSONObject.parseObject(JSONObject.toJSONString(jsonResult.getData())).get("records").toString(), AirPortVO.class); | |||
} | |||
@Override | |||
public List<AirLineVO> airLine(Integer droneId) throws ServiceException { | |||
@@ -114,8 +113,14 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, | |||
JsonResult jsonResult = JacksonUtil.json2pojo(airPortStr, JsonResult.class); | |||
if(!ObjectUtil.isEmpty(jsonResult.getData()) && jsonResult.getCode() != 0) { | |||
return JsonResult.error(JSONObject.parseArray(JSONObject.parseObject(JSONObject.toJSONString(jsonResult.getData())).get("data").toString(), AirExecuteTaskVO.class),"执行任务失败!"); | |||
}else{ | |||
}else if(ObjectUtil.isEmpty(jsonResult.getData()) && jsonResult.getCode() != 0){ | |||
return JsonResult.error(jsonResult.getMsg()); | |||
}else{ | |||
//修改执行时间为当前 | |||
thMission.setExecutionStartTime(new Date()); | |||
missionMapper.updateById(thMission); | |||
//返回执行结果 | |||
return JsonResult.success(jsonResult.getMsg()); | |||
} | |||
} | |||
@@ -152,7 +152,7 @@ file: | |||
#静态资源对外暴露的访问路径 | |||
staticAccessPath: /** | |||
#静态资源实际存储路径 | |||
uploadFolder: E:\Gitea仓库源码\tuoheng_5gai_new\uploads\ | |||
uploadFolder: E:\Gitea仓库源码\tuoheng_lc\uploads\ | |||
# Shiro | |||
shiro: |
@@ -0,0 +1,12 @@ | |||
<?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.admin.mapper.QuestionMapper"> | |||
<select id="analyze" resultType="com.tuoheng.admin.entity.vo.QuestionTypeCountVo"> | |||
select * | |||
from th_question | |||
</select> | |||
<select id="analyzeType" resultType="com.tuoheng.admin.entity.vo.QuestionCountVo"> | |||
select * | |||
from th_question | |||
</select> | |||
</mapper> |
@@ -1,22 +1,4 @@ | |||
<?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.admin.mapper.QuestionTypeMapper"> | |||
<select id="queryCountByInspectionId" resultType="com.tuoheng.admin.entity.vo.QuestionCountVo"> | |||
SELECT | |||
q.id, | |||
q.`name`, | |||
q.type, | |||
q.content, | |||
f.question_id, | |||
COUNT(f.question_id) AS totalCount | |||
FROM th_inspection_file f | |||
LEFT JOIN th_question q ON f.question_id = q.id | |||
WHERE f.inspection_id = #{inspectionId} and f.tenant_id = #{tenantId} | |||
AND f.mark = 1 | |||
AND q.mark = 1 | |||
AND f.status = 1 | |||
GROUP BY f.question_id | |||
</select> | |||
</mapper> |
@@ -1,188 +0,0 @@ | |||
<?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.admin.mapper.ThInspectionQuestionMapper"> | |||
<resultMap id="BaseResultMap" type="com.tuoheng.admin.entity.domain.Question"> | |||
<id column="id" jdbcType="INTEGER" property="id" /> | |||
<result column="code" jdbcType="VARCHAR" property="code" /> | |||
<result column="inspection_id" jdbcType="INTEGER" property="inspectionId" /> | |||
<result column="status" jdbcType="BOOLEAN" property="status" /> | |||
<result column="assign_user" jdbcType="INTEGER" property="assignUser" /> | |||
<result column="assign_contact" jdbcType="VARCHAR" property="assignContact" /> | |||
<result column="assign_note" jdbcType="VARCHAR" property="assignNote" /> | |||
<result column="assign_time" jdbcType="TIMESTAMP" property="assignTime" /> | |||
<result column="create_user" jdbcType="INTEGER" property="createUser" /> | |||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> | |||
<result column="update_user" jdbcType="INTEGER" property="updateUser" /> | |||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> | |||
<result column="mark" jdbcType="BOOLEAN" property="mark" /> | |||
</resultMap> | |||
<sql id="Base_Column_List"> | |||
id, code, inspection_id, `status`, assign_user, assign_contact, assign_note, assign_time, | |||
create_user, create_time, update_user, update_time, mark | |||
</sql> | |||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> | |||
select | |||
<include refid="Base_Column_List" /> | |||
from th_inspection_question | |||
where id = #{id,jdbcType=INTEGER} | |||
</select> | |||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> | |||
delete from th_inspection_question | |||
where id = #{id,jdbcType=INTEGER} | |||
</delete> | |||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.tuoheng.admin.entity.domain.Question" useGeneratedKeys="true"> | |||
insert into th_inspection_question (code, inspection_id, `status`, | |||
assign_user, assign_contact, assign_note, | |||
assign_time, create_user, create_time, | |||
update_user, update_time, mark | |||
) | |||
values (#{code,jdbcType=VARCHAR}, #{inspectionId,jdbcType=INTEGER}, #{status,jdbcType=BOOLEAN}, | |||
#{assignUser,jdbcType=INTEGER}, #{assignContact,jdbcType=VARCHAR}, #{assignNote,jdbcType=VARCHAR}, | |||
#{assignTime,jdbcType=TIMESTAMP}, #{createUser,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, | |||
#{updateUser,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{mark,jdbcType=BOOLEAN} | |||
) | |||
</insert> | |||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.tuoheng.admin.entity.domain.Question" useGeneratedKeys="true"> | |||
insert into th_inspection_question | |||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||
<if test="code != null"> | |||
code, | |||
</if> | |||
<if test="inspectionId != null"> | |||
inspection_id, | |||
</if> | |||
<if test="status != null"> | |||
`status`, | |||
</if> | |||
<if test="assignUser != null"> | |||
assign_user, | |||
</if> | |||
<if test="assignContact != null"> | |||
assign_contact, | |||
</if> | |||
<if test="assignNote != null"> | |||
assign_note, | |||
</if> | |||
<if test="assignTime != null"> | |||
assign_time, | |||
</if> | |||
<if test="createUser != null"> | |||
create_user, | |||
</if> | |||
<if test="createTime != null"> | |||
create_time, | |||
</if> | |||
<if test="updateUser != null"> | |||
update_user, | |||
</if> | |||
<if test="updateTime != null"> | |||
update_time, | |||
</if> | |||
<if test="mark != null"> | |||
mark, | |||
</if> | |||
<if test="tenantId != null"> | |||
tenant_id, | |||
</if> | |||
</trim> | |||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||
<if test="code != null"> | |||
#{code,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="inspectionId != null"> | |||
#{inspectionId,jdbcType=INTEGER}, | |||
</if> | |||
<if test="status != null"> | |||
#{status,jdbcType=BOOLEAN}, | |||
</if> | |||
<if test="assignUser != null"> | |||
#{assignUser,jdbcType=INTEGER}, | |||
</if> | |||
<if test="assignContact != null"> | |||
#{assignContact,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="assignNote != null"> | |||
#{assignNote,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="assignTime != null"> | |||
#{assignTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="createUser != null"> | |||
#{createUser,jdbcType=INTEGER}, | |||
</if> | |||
<if test="createTime != null"> | |||
#{createTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="updateUser != null"> | |||
#{updateUser,jdbcType=INTEGER}, | |||
</if> | |||
<if test="updateTime != null"> | |||
#{updateTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="mark != null"> | |||
#{mark,jdbcType=BOOLEAN}, | |||
</if> | |||
<if test="tenantId != null"> | |||
#{tenantId,jdbcType=INTEGER}, | |||
</if> | |||
</trim> | |||
</insert> | |||
<update id="updateByPrimaryKeySelective" parameterType="com.tuoheng.admin.entity.domain.Question"> | |||
update th_inspection_question | |||
<set> | |||
<if test="code != null"> | |||
code = #{code,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="inspectionId != null"> | |||
inspection_id = #{inspectionId,jdbcType=INTEGER}, | |||
</if> | |||
<if test="status != null"> | |||
`status` = #{status,jdbcType=BOOLEAN}, | |||
</if> | |||
<if test="assignUser != null"> | |||
assign_user = #{assignUser,jdbcType=INTEGER}, | |||
</if> | |||
<if test="assignContact != null"> | |||
assign_contact = #{assignContact,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="assignNote != null"> | |||
assign_note = #{assignNote,jdbcType=VARCHAR}, | |||
</if> | |||
<if test="assignTime != null"> | |||
assign_time = #{assignTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="createUser != null"> | |||
create_user = #{createUser,jdbcType=INTEGER}, | |||
</if> | |||
<if test="createTime != null"> | |||
create_time = #{createTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="updateUser != null"> | |||
update_user = #{updateUser,jdbcType=INTEGER}, | |||
</if> | |||
<if test="updateTime != null"> | |||
update_time = #{updateTime,jdbcType=TIMESTAMP}, | |||
</if> | |||
<if test="mark != null"> | |||
mark = #{mark,jdbcType=BOOLEAN}, | |||
</if> | |||
</set> | |||
where id = #{id,jdbcType=INTEGER} | |||
</update> | |||
<update id="updateByPrimaryKey" parameterType="com.tuoheng.admin.entity.domain.Question"> | |||
update th_inspection_question | |||
set code = #{code,jdbcType=VARCHAR}, | |||
inspection_id = #{inspectionId,jdbcType=INTEGER}, | |||
`status` = #{status,jdbcType=BOOLEAN}, | |||
assign_user = #{assignUser,jdbcType=INTEGER}, | |||
assign_contact = #{assignContact,jdbcType=VARCHAR}, | |||
assign_note = #{assignNote,jdbcType=VARCHAR}, | |||
assign_time = #{assignTime,jdbcType=TIMESTAMP}, | |||
create_user = #{createUser,jdbcType=INTEGER}, | |||
create_time = #{createTime,jdbcType=TIMESTAMP}, | |||
update_user = #{updateUser,jdbcType=INTEGER}, | |||
update_time = #{updateTime,jdbcType=TIMESTAMP}, | |||
mark = #{mark,jdbcType=BOOLEAN} | |||
where id = #{id,jdbcType=INTEGER} | |||
</update> | |||
</mapper> |
@@ -12,4 +12,5 @@ | |||
</foreach> | |||
and tenant_id = #{tenantId} | |||
</update> | |||
</mapper> |
@@ -1,7 +1,6 @@ | |||
package com.tuoheng.common.common; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.*; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; |
@@ -1,5 +1,4 @@ | |||
<?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.system.mapper.UserMapper"> | |||
</mapper> |