@@ -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); | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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; |
@@ -0,0 +1,25 @@ | |||
package com.tuoheng.model.query; | |||
import com.tuoheng.common.BaseQuery; | |||
import lombok.Data; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2023/4/25 17:16 | |||
*/ | |||
@Data | |||
public class InspectionFileQuery extends BaseQuery { | |||
/** | |||
* 问题类型 | |||
*/ | |||
private String questionName; | |||
/** | |||
* 0待审核 1已审核 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 系统标识 | |||
*/ | |||
private String clientId; | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.tuoheng.model.query; | |||
import com.tuoheng.common.BaseQuery; | |||
import lombok.Data; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2023/4/25 17:18 | |||
*/ | |||
@Data | |||
public class ReportQuery extends BaseQuery { | |||
/** | |||
* 报告编号 | |||
*/ | |||
private String reportNo; | |||
/** | |||
* 系统标识 | |||
*/ | |||
private String clientId; | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.tuoheng.model.query; | |||
import com.tuoheng.common.BaseQuery; | |||
import lombok.Data; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2023/4/25 17:20 | |||
*/ | |||
@Data | |||
public class WorkorderQuery extends BaseQuery { | |||
/** | |||
* 报告编号 | |||
*/ | |||
private String code; | |||
/** | |||
* 工单状态:1问题待指派 2问题待处理 3问题处理中 4问题已处理 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 系统标识 | |||
*/ | |||
private String clientId; | |||
} |
@@ -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); | |||
} |
@@ -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); | |||
} |
@@ -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); | |||
} |
@@ -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); | |||
} | |||
} | |||
@@ -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); | |||
} | |||
} |
@@ -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); | |||
} | |||
} | |||
@@ -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); | |||
} | |||
} | |||
@@ -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> |