package com.tuoheng.controller.information; | package com.tuoheng.controller.information; | ||||
import com.tuoheng.model.query.InspectionFileQuery; | |||||
import com.tuoheng.service.information.InspectionFileService; | 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.beans.factory.annotation.Autowired; | ||||
import org.springframework.web.bind.annotation.GetMapping; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | import org.springframework.web.bind.annotation.RequestMapping; | ||||
import org.springframework.web.bind.annotation.RestController; | import org.springframework.web.bind.annotation.RestController; | ||||
/** | /** | ||||
* 问题表前端控制器 | * 问题表前端控制器 | ||||
* | |||||
* @Author xiaoying | * @Author xiaoying | ||||
* @Date 2023/4/24 9:28 | * @Date 2023/4/24 9:28 | ||||
*/ | */ | ||||
@Autowired | @Autowired | ||||
private InspectionFileService inspectionFileService; | private InspectionFileService inspectionFileService; | ||||
/** | |||||
* 查询问题列表 | |||||
* | |||||
* @return | |||||
*/ | |||||
@GetMapping("/index") | |||||
public JsonResult index(InspectionFileQuery query) { | |||||
return inspectionFileService.index(query); | |||||
} | |||||
} | } |
package com.tuoheng.controller.information; | package com.tuoheng.controller.information; | ||||
import com.tuoheng.model.query.ReportQuery; | |||||
import com.tuoheng.service.information.ReportService; | import com.tuoheng.service.information.ReportService; | ||||
import com.tuoheng.until.JsonResult; | |||||
import org.springframework.beans.factory.annotation.Autowired; | 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.RequestMapping; | ||||
import org.springframework.web.bind.annotation.RestController; | import org.springframework.web.bind.annotation.RestController; | ||||
/** | /** | ||||
* 报告表前端控制器 | * 报告表前端控制器 | ||||
* | |||||
* @Author xiaoying | * @Author xiaoying | ||||
* @Date 2023/4/24 9:28 | * @Date 2023/4/24 9:28 | ||||
*/ | */ | ||||
@Autowired | @Autowired | ||||
private ReportService reportService; | private ReportService reportService; | ||||
/** | |||||
* 查询报告列表 | |||||
* | |||||
* @return | |||||
*/ | |||||
@GetMapping("/index") | |||||
public JsonResult index(ReportQuery query) { | |||||
return reportService.index(query); | |||||
} | |||||
} | } |
package com.tuoheng.controller.information; | package com.tuoheng.controller.information; | ||||
import com.tuoheng.model.query.WorkorderQuery; | |||||
import com.tuoheng.service.information.WorkorderService; | import com.tuoheng.service.information.WorkorderService; | ||||
import com.tuoheng.until.JsonResult; | |||||
import org.springframework.beans.factory.annotation.Autowired; | 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.RequestMapping; | ||||
import org.springframework.web.bind.annotation.RestController; | import org.springframework.web.bind.annotation.RestController; | ||||
/** | /** | ||||
* 工单表前端控制器 | * 工单表前端控制器 | ||||
* | |||||
* @Author xiaoying | * @Author xiaoying | ||||
* @Date 2023/4/24 9:28 | * @Date 2023/4/24 9:28 | ||||
*/ | */ | ||||
@Autowired | @Autowired | ||||
private WorkorderService workorderService; | private WorkorderService workorderService; | ||||
/** | |||||
* 查询工单列表 | |||||
* | |||||
* @return | |||||
*/ | |||||
@GetMapping("/index") | |||||
public JsonResult index(WorkorderQuery query) { | |||||
return workorderService.index(query); | |||||
} | |||||
} | } |
* 有效标记 | * 有效标记 | ||||
*/ | */ | ||||
private Integer mark; | private Integer mark; | ||||
/** | |||||
* 问题类型 | |||||
*/ | |||||
private String questionName; | |||||
/** | |||||
* 问题编号 | |||||
*/ | |||||
private String questionId; | |||||
@TableField(exist = false) | @TableField(exist = false) | ||||
private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; |
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; | |||||
} |
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; | |||||
} |
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; | |||||
} |
import com.tuoheng.model.entity.InspectionFile; | import com.tuoheng.model.entity.InspectionFile; | ||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.tuoheng.model.query.InspectionFileQuery; | |||||
import com.tuoheng.until.JsonResult; | |||||
/** | /** | ||||
* @author 小影 | * @author 小影 | ||||
* @createDate 2023-04-24 09:12:58 | * @createDate 2023-04-24 09:12:58 | ||||
*/ | */ | ||||
public interface InspectionFileService extends IService<InspectionFile> { | public interface InspectionFileService extends IService<InspectionFile> { | ||||
/** | |||||
* 查询问题列表 | |||||
* | |||||
* @return | |||||
*/ | |||||
JsonResult index(InspectionFileQuery query); | |||||
} | } |
import com.tuoheng.model.entity.Report; | import com.tuoheng.model.entity.Report; | ||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.tuoheng.model.query.ReportQuery; | |||||
import com.tuoheng.until.JsonResult; | |||||
/** | /** | ||||
* @author 小影 | * @author 小影 | ||||
* @createDate 2023-04-24 09:14:07 | * @createDate 2023-04-24 09:14:07 | ||||
*/ | */ | ||||
public interface ReportService extends IService<Report> { | public interface ReportService extends IService<Report> { | ||||
/** | |||||
* 查询报告列表 | |||||
* | |||||
* @return | |||||
*/ | |||||
JsonResult index(ReportQuery query); | |||||
} | } |
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.tuoheng.model.entity.Workorder; | import com.tuoheng.model.entity.Workorder; | ||||
import com.tuoheng.model.query.WorkorderQuery; | |||||
import com.tuoheng.until.JsonResult; | |||||
/** | /** | ||||
* @author 小影 | * @author 小影 | ||||
*/ | */ | ||||
public interface WorkorderService extends IService<Workorder> { | public interface WorkorderService extends IService<Workorder> { | ||||
/** | |||||
* 查询工单列表 | |||||
* | |||||
* @return | |||||
*/ | |||||
JsonResult index(WorkorderQuery query); | |||||
} | } |
package com.tuoheng.service.information.impl; | 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.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.entity.InspectionFile; | ||||
import com.tuoheng.model.query.InspectionFileQuery; | |||||
import com.tuoheng.service.information.InspectionFileService; | import com.tuoheng.service.information.InspectionFileService; | ||||
import com.tuoheng.mapper.information.InspectionFileMapper; | import com.tuoheng.mapper.information.InspectionFileMapper; | ||||
import com.tuoheng.until.JsonResult; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.stereotype.Service; | 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 | @Service | ||||
public class InspectionFileServiceImpl extends ServiceImpl<InspectionFileMapper, InspectionFile> | 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); | |||||
} | |||||
} | } | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
import com.tuoheng.enums.MarkTypeEnum; | |||||
import com.tuoheng.mapper.information.InspectionMapper; | import com.tuoheng.mapper.information.InspectionMapper; | ||||
import com.tuoheng.model.entity.Inspection; | import com.tuoheng.model.entity.Inspection; | ||||
import com.tuoheng.model.entity.InspectionFile; | |||||
import com.tuoheng.model.query.InformationQuery; | import com.tuoheng.model.query.InformationQuery; | ||||
import com.tuoheng.service.information.InspectionService; | import com.tuoheng.service.information.InspectionService; | ||||
import com.tuoheng.until.JsonResult; | import com.tuoheng.until.JsonResult; | ||||
.like(ObjectUtil.isNotEmpty(query.getName()), Inspection::getName, query.getName()) | .like(ObjectUtil.isNotEmpty(query.getName()), Inspection::getName, query.getName()) | ||||
.eq(ObjectUtil.isNotNull(query.getInspectionType()), Inspection::getInspectionType, query.getInspectionType()) | .eq(ObjectUtil.isNotNull(query.getInspectionType()), Inspection::getInspectionType, query.getInspectionType()) | ||||
.eq(ObjectUtil.isNotEmpty(query.getClientId()), Inspection::getClientId, query.getClientId()) | .eq(ObjectUtil.isNotEmpty(query.getClientId()), Inspection::getClientId, query.getClientId()) | ||||
.eq(Inspection::getMark, MarkTypeEnum.VALID.getCode()) | |||||
.orderByDesc(Inspection::getCreateTime)); | .orderByDesc(Inspection::getCreateTime)); | ||||
return JsonResult.success(pageDate); | return JsonResult.success(pageDate); | ||||
} | } | ||||
} | } |
package com.tuoheng.service.information.impl; | 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.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.entity.Report; | ||||
import com.tuoheng.model.query.ReportQuery; | |||||
import com.tuoheng.service.information.ReportService; | 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; | 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 | @Service | ||||
public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> | 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); | |||||
} | |||||
} | } | ||||
package com.tuoheng.service.information.impl; | 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.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.entity.Workorder; | ||||
import com.tuoheng.model.query.WorkorderQuery; | |||||
import com.tuoheng.service.information.WorkorderService; | 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; | 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 | @Service | ||||
public class WorkorderServiceImpl extends ServiceImpl<WorkorderMapper, Workorder> | 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); | |||||
} | |||||
} | } | ||||
<mapper namespace="com.tuoheng.mapper.information.InspectionFileMapper"> | <mapper namespace="com.tuoheng.mapper.information.InspectionFileMapper"> | ||||
<resultMap id="BaseResultMap" type="com.tuoheng.model.entity.InspectionFile"> | <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> | </resultMap> | ||||
<sql id="Base_Column_List"> | <sql id="Base_Column_List"> | ||||
deal_status,status,tenant_username, | deal_status,status,tenant_username, | ||||
client_id,industry,create_user, | client_id,industry,create_user, | ||||
create_time,update_user,update_time, | create_time,update_user,update_time, | ||||
mark | |||||
mark,question_name,question_id | |||||
</sql> | </sql> | ||||
</mapper> | </mapper> |