瀏覽代碼

新增大数据相关表(任务,问题,工单,报告)数据查询接口

tags/v2.5.0
xiaoying 1 年之前
父節點
當前提交
a2df91df99
共有 15 個檔案被更改,包括 289 行新增39 行删除
  1. +14
    -1
      tuoheng_oidc_admin/src/main/java/com/tuoheng/controller/information/InformationFileController.java
  2. +14
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/controller/information/ReportController.java
  3. +14
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/controller/information/WorkorderController.java
  4. +11
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/model/entity/InspectionFile.java
  5. +25
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/model/query/InspectionFileQuery.java
  6. +21
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/model/query/ReportQuery.java
  7. +24
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/model/query/WorkorderQuery.java
  8. +8
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/InspectionFileService.java
  9. +8
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/ReportService.java
  10. +9
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/WorkorderService.java
  11. +39
    -5
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/impl/InspectionFileServiceImpl.java
  12. +3
    -1
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/impl/InspectionServiceImpl.java
  13. +38
    -6
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/impl/ReportServiceImpl.java
  14. +38
    -6
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/impl/WorkorderServiceImpl.java
  15. +23
    -20
      tuoheng_oidc_admin/src/main/resources/mapper/InspectionFileMapper.xml

+ 14
- 1
tuoheng_oidc_admin/src/main/java/com/tuoheng/controller/information/InformationFileController.java 查看文件

@@ -1,13 +1,16 @@
package com.tuoheng.controller.information;

import com.tuoheng.model.query.InspectionFileQuery;
import com.tuoheng.service.information.InspectionFileService;
import com.tuoheng.service.information.InspectionService;
import com.tuoheng.until.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* 问题表前端控制器
*
* @Author xiaoying
* @Date 2023/4/24 9:28
*/
@@ -17,4 +20,14 @@ public class InformationFileController {

@Autowired
private InspectionFileService inspectionFileService;

/**
* 查询问题列表
*
* @return
*/
@GetMapping("/index")
public JsonResult index(InspectionFileQuery query) {
return inspectionFileService.index(query);
}
}

+ 14
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/controller/information/ReportController.java 查看文件

@@ -1,12 +1,16 @@
package com.tuoheng.controller.information;

import com.tuoheng.model.query.ReportQuery;
import com.tuoheng.service.information.ReportService;
import com.tuoheng.until.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* 报告表前端控制器
*
* @Author xiaoying
* @Date 2023/4/24 9:28
*/
@@ -16,4 +20,14 @@ public class ReportController {

@Autowired
private ReportService reportService;

/**
* 查询报告列表
*
* @return
*/
@GetMapping("/index")
public JsonResult index(ReportQuery query) {
return reportService.index(query);
}
}

+ 14
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/controller/information/WorkorderController.java 查看文件

@@ -1,12 +1,16 @@
package com.tuoheng.controller.information;

import com.tuoheng.model.query.WorkorderQuery;
import com.tuoheng.service.information.WorkorderService;
import com.tuoheng.until.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* 工单表前端控制器
*
* @Author xiaoying
* @Date 2023/4/24 9:28
*/
@@ -16,4 +20,14 @@ public class WorkorderController {

@Autowired
private WorkorderService workorderService;

/**
* 查询工单列表
*
* @return
*/
@GetMapping("/index")
public JsonResult index(WorkorderQuery query) {
return workorderService.index(query);
}
}

+ 11
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/model/entity/InspectionFile.java 查看文件

@@ -110,6 +110,17 @@ public class InspectionFile implements Serializable {
* 有效标记
*/
private Integer mark;
/**
* 问题类型
*/
private String questionName;
/**
* 问题编号
*/
private String questionId;




@TableField(exist = false)
private static final long serialVersionUID = 1L;

+ 25
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/model/query/InspectionFileQuery.java 查看文件

@@ -0,0 +1,25 @@
package com.tuoheng.model.query;

import com.tuoheng.common.BaseQuery;
import lombok.Data;

/**
* @Author xiaoying
* @Date 2023/4/25 17:16
*/
@Data
public class InspectionFileQuery extends BaseQuery {
/**
* 问题类型
*/
private String questionName;
/**
* 0待审核 1已审核
*/
private Integer status;
/**
* 系统标识
*/
private String clientId;

}

+ 21
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/model/query/ReportQuery.java 查看文件

@@ -0,0 +1,21 @@
package com.tuoheng.model.query;

import com.tuoheng.common.BaseQuery;
import lombok.Data;

/**
* @Author xiaoying
* @Date 2023/4/25 17:18
*/
@Data
public class ReportQuery extends BaseQuery {
/**
* 报告编号
*/
private String reportNo;
/**
* 系统标识
*/
private String clientId;

}

+ 24
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/model/query/WorkorderQuery.java 查看文件

@@ -0,0 +1,24 @@
package com.tuoheng.model.query;

import com.tuoheng.common.BaseQuery;
import lombok.Data;

/**
* @Author xiaoying
* @Date 2023/4/25 17:20
*/
@Data
public class WorkorderQuery extends BaseQuery {
/**
* 报告编号
*/
private String code;
/**
* 工单状态:1问题待指派 2问题待处理 3问题处理中 4问题已处理
*/
private Integer status;
/**
* 系统标识
*/
private String clientId;
}

+ 8
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/InspectionFileService.java 查看文件

@@ -2,6 +2,8 @@ package com.tuoheng.service.information;

import com.tuoheng.model.entity.InspectionFile;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tuoheng.model.query.InspectionFileQuery;
import com.tuoheng.until.JsonResult;

/**
* @author 小影
@@ -9,5 +11,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @createDate 2023-04-24 09:12:58
*/
public interface InspectionFileService extends IService<InspectionFile> {
/**
* 查询问题列表
*
* @return
*/
JsonResult index(InspectionFileQuery query);

}

+ 8
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/ReportService.java 查看文件

@@ -2,6 +2,8 @@ package com.tuoheng.service.information;

import com.tuoheng.model.entity.Report;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tuoheng.model.query.ReportQuery;
import com.tuoheng.until.JsonResult;

/**
* @author 小影
@@ -9,5 +11,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @createDate 2023-04-24 09:14:07
*/
public interface ReportService extends IService<Report> {
/**
* 查询报告列表
*
* @return
*/
JsonResult index(ReportQuery query);

}

+ 9
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/WorkorderService.java 查看文件

@@ -2,6 +2,8 @@ package com.tuoheng.service.information;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tuoheng.model.entity.Workorder;
import com.tuoheng.model.query.WorkorderQuery;
import com.tuoheng.until.JsonResult;

/**
* @author 小影
@@ -10,4 +12,11 @@ import com.tuoheng.model.entity.Workorder;
*/
public interface WorkorderService extends IService<Workorder> {

/**
* 查询工单列表
*
* @return
*/
JsonResult index(WorkorderQuery query);

}

+ 39
- 5
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/impl/InspectionFileServiceImpl.java 查看文件

@@ -1,20 +1,54 @@
package com.tuoheng.service.information.impl;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tuoheng.enums.MarkTypeEnum;
import com.tuoheng.model.entity.Inspection;
import com.tuoheng.model.entity.InspectionFile;
import com.tuoheng.model.query.InspectionFileQuery;
import com.tuoheng.service.information.InspectionFileService;
import com.tuoheng.mapper.information.InspectionFileMapper;
import com.tuoheng.until.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 小影
* @description 针对表【t_inspection_file】的数据库操作Service实现
* @createDate 2023-04-24 09:12:58
*/
* @author 小影
* @description 针对表【t_inspection_file】的数据库操作Service实现
* @createDate 2023-04-24 09:12:58
*/
@Service
public class InspectionFileServiceImpl extends ServiceImpl<InspectionFileMapper, InspectionFile>
implements InspectionFileService{
implements InspectionFileService {

@Autowired
private InspectionFileMapper inspectionFileMapper;


/**
* 查询问题列表
*
* @return
*/
@Override
public JsonResult index(InspectionFileQuery query) {
//分页校验
query.checkParam();
//分页
IPage<InspectionFile> page = new Page<>(query.getPage(), query.getLimit());

IPage<InspectionFile> pageDate = inspectionFileMapper.selectPage(page, Wrappers.<InspectionFile>lambdaQuery()
.like(ObjectUtil.isNotEmpty(query.getQuestionName()), InspectionFile::getQuestionName, query.getQuestionName())
.eq(ObjectUtil.isNotNull(query.getStatus()), InspectionFile::getStatus, query.getStatus())
.eq(ObjectUtil.isNotEmpty(query.getClientId()), InspectionFile::getClientId, query.getClientId())
.eq(InspectionFile::getMark, MarkTypeEnum.VALID.getCode())
.orderByDesc(InspectionFile::getCreateTime));

return JsonResult.success(pageDate);
}
}



+ 3
- 1
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/impl/InspectionServiceImpl.java 查看文件

@@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tuoheng.enums.MarkTypeEnum;
import com.tuoheng.mapper.information.InspectionMapper;
import com.tuoheng.model.entity.Inspection;
import com.tuoheng.model.entity.InspectionFile;
import com.tuoheng.model.query.InformationQuery;
import com.tuoheng.service.information.InspectionService;
import com.tuoheng.until.JsonResult;
@@ -44,9 +46,9 @@ public class InspectionServiceImpl extends ServiceImpl<InspectionMapper, Inspect
.like(ObjectUtil.isNotEmpty(query.getName()), Inspection::getName, query.getName())
.eq(ObjectUtil.isNotNull(query.getInspectionType()), Inspection::getInspectionType, query.getInspectionType())
.eq(ObjectUtil.isNotEmpty(query.getClientId()), Inspection::getClientId, query.getClientId())
.eq(Inspection::getMark, MarkTypeEnum.VALID.getCode())
.orderByDesc(Inspection::getCreateTime));


return JsonResult.success(pageDate);
}
}

+ 38
- 6
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/impl/ReportServiceImpl.java 查看文件

@@ -1,20 +1,52 @@
package com.tuoheng.service.information.impl;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tuoheng.enums.MarkTypeEnum;
import com.tuoheng.mapper.information.ReportMapper;
import com.tuoheng.model.entity.Report;
import com.tuoheng.model.query.ReportQuery;
import com.tuoheng.service.information.ReportService;
import com.tuoheng.mapper.information.ReportMapper;
import com.tuoheng.until.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 小影
* @description 针对表【t_report(巡检报告表)】的数据库操作Service实现
* @createDate 2023-04-24 09:14:07
*/
* @author 小影
* @description 针对表【t_report(巡检报告表)】的数据库操作Service实现
* @createDate 2023-04-24 09:14:07
*/
@Service
public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report>
implements ReportService{
implements ReportService {

@Autowired
private ReportMapper reportMapper;


/**
* 查询报告列表
*
* @param query
* @return
*/
@Override
public JsonResult index(ReportQuery query) {
//分页校验
query.checkParam();
//分页
IPage<Report> page = new Page<>(query.getPage(), query.getLimit());

IPage<Report> pageDate = reportMapper.selectPage(page, Wrappers.<Report>lambdaQuery()
.like(ObjectUtil.isNotEmpty(query.getReportNo()), Report::getReportNo, query.getReportNo())
.eq(ObjectUtil.isNotEmpty(query.getClientId()), Report::getClientId, query.getClientId())
.eq(Report::getMark, MarkTypeEnum.VALID.getCode())
.orderByDesc(Report::getCreateTime));
return JsonResult.success(pageDate);
}
}



+ 38
- 6
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/information/impl/WorkorderServiceImpl.java 查看文件

@@ -1,20 +1,52 @@
package com.tuoheng.service.information.impl;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tuoheng.enums.MarkTypeEnum;
import com.tuoheng.mapper.information.WorkorderMapper;
import com.tuoheng.model.entity.Workorder;
import com.tuoheng.model.query.WorkorderQuery;
import com.tuoheng.service.information.WorkorderService;
import com.tuoheng.mapper.information.WorkorderMapper;
import com.tuoheng.until.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 小影
* @description 针对表【t_workorder(全民/河长问题工单表)】的数据库操作Service实现
* @createDate 2023-04-24 09:14:32
*/
* @author 小影
* @description 针对表【t_workorder(全民/河长问题工单表)】的数据库操作Service实现
* @createDate 2023-04-24 09:14:32
*/
@Service
public class WorkorderServiceImpl extends ServiceImpl<WorkorderMapper, Workorder>
implements WorkorderService{
implements WorkorderService {

@Autowired
private WorkorderMapper workorderMapper;
/**
* 查询工单列表
*
* @param query
* @return
*/
@Override
public JsonResult index(WorkorderQuery query) {

//分页校验
query.checkParam();
//分页
IPage<Workorder> page = new Page<>(query.getPage(), query.getLimit());

IPage<Workorder> pageDate = workorderMapper.selectPage(page, Wrappers.<Workorder>lambdaQuery()
.like(ObjectUtil.isNotEmpty(query.getCode()), Workorder::getCode, query.getCode())
.eq(ObjectUtil.isNotNull(query.getStatus()), Workorder::getStatus, query.getStatus())
.eq(ObjectUtil.isNotEmpty(query.getClientId()), Workorder::getClientId, query.getClientId())
.eq(Workorder::getMark, MarkTypeEnum.VALID.getCode())
.orderByDesc(Workorder::getCreateTime));
return JsonResult.success(pageDate);
}
}



+ 23
- 20
tuoheng_oidc_admin/src/main/resources/mapper/InspectionFileMapper.xml 查看文件

@@ -5,25 +5,28 @@
<mapper namespace="com.tuoheng.mapper.information.InspectionFileMapper">

<resultMap id="BaseResultMap" type="com.tuoheng.model.entity.InspectionFile">
<id property="id" column="id" jdbcType="OTHER"/>
<result property="fileCode" column="file_code" jdbcType="VARCHAR"/>
<result property="inspectionName" column="inspection_name" jdbcType="VARCHAR"/>
<result property="fileName" column="file_name" jdbcType="VARCHAR"/>
<result property="fileThumbnail" column="file_thumbnail" jdbcType="VARCHAR"/>
<result property="fileOriginal" column="file_original" jdbcType="VARCHAR"/>
<result property="fileImage" column="file_image" jdbcType="VARCHAR"/>
<result property="latitude" column="latitude" jdbcType="VARCHAR"/>
<result property="longitude" column="longitude" jdbcType="VARCHAR"/>
<result property="dealStatus" column="deal_status" jdbcType="TINYINT"/>
<result property="status" column="status" jdbcType="TINYINT"/>
<result property="tenantUsername" column="tenant_username" jdbcType="VARCHAR"/>
<result property="clientId" column="client_id" jdbcType="VARCHAR"/>
<result property="industry" column="industry" jdbcType="VARCHAR"/>
<result property="createUser" column="create_user" jdbcType="OTHER"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateUser" column="update_user" jdbcType="OTHER"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="mark" column="mark" jdbcType="TINYINT"/>
<id property="id" column="id" jdbcType="OTHER"/>
<result property="fileCode" column="file_code" jdbcType="VARCHAR"/>
<result property="inspectionName" column="inspection_name" jdbcType="VARCHAR"/>
<result property="fileName" column="file_name" jdbcType="VARCHAR"/>
<result property="fileThumbnail" column="file_thumbnail" jdbcType="VARCHAR"/>
<result property="fileOriginal" column="file_original" jdbcType="VARCHAR"/>
<result property="fileImage" column="file_image" jdbcType="VARCHAR"/>
<result property="latitude" column="latitude" jdbcType="VARCHAR"/>
<result property="longitude" column="longitude" jdbcType="VARCHAR"/>
<result property="dealStatus" column="deal_status" jdbcType="TINYINT"/>
<result property="status" column="status" jdbcType="TINYINT"/>
<result property="tenantUsername" column="tenant_username" jdbcType="VARCHAR"/>
<result property="clientId" column="client_id" jdbcType="VARCHAR"/>
<result property="industry" column="industry" jdbcType="VARCHAR"/>
<result property="createUser" column="create_user" jdbcType="OTHER"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateUser" column="update_user" jdbcType="OTHER"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="mark" column="mark" jdbcType="TINYINT"/>
<result property="questionName" column="question_name" jdbcType="VARCHAR"/>
<result property="questionId" column="question_id" jdbcType="VARCHAR"/>

</resultMap>

<sql id="Base_Column_List">
@@ -33,6 +36,6 @@
deal_status,status,tenant_username,
client_id,industry,create_user,
create_time,update_user,update_time,
mark
mark,question_name,question_id
</sql>
</mapper>

Loading…
取消
儲存