| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.system.model.TCheckAcceptRecord; |
| | | import com.ruoyi.system.model.TContract; |
| | | import com.ruoyi.system.model.THouse; |
| | | import com.ruoyi.system.query.TCheckAcceptRecordQuery; |
| | | import com.ruoyi.system.service.TCheckAcceptRecordService; |
| | | import com.ruoyi.system.service.TContractService; |
| | | import com.ruoyi.system.service.THouseService; |
| | | import com.ruoyi.system.vo.TCheckAcceptRecordVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2025-01-17 |
| | | */ |
| | | @Api(tags = "验收记录管理") |
| | | @RestController |
| | | @RequestMapping("/t-check-accept-record") |
| | | public class TCheckAcceptRecordController { |
| | | |
| | | private final TCheckAcceptRecordService checkAcceptRecordService; |
| | | private final TContractService contractService; |
| | | private final THouseService houseService; |
| | | @Autowired |
| | | public TCheckAcceptRecordController(TCheckAcceptRecordService checkAcceptRecordService, TContractService contractService, THouseService houseService) { |
| | | this.checkAcceptRecordService = checkAcceptRecordService; |
| | | this.contractService = contractService; |
| | | this.houseService = houseService; |
| | | } |
| | | |
| | | /** |
| | | * 获取验收记录管理列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:accept:list')") |
| | | @ApiOperation(value = "获取验收记录分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TCheckAcceptRecordVO>> pageList(@RequestBody TCheckAcceptRecordQuery query) { |
| | | return R.ok(checkAcceptRecordService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 通过合同id查询房屋信息 |
| | | */ |
| | | @ApiOperation(value = "通过合同id查询房屋信息") |
| | | @PostMapping(value = "/getHouseByContractId") |
| | | public R<THouse> getHouseByContractId(@RequestParam String contractId) { |
| | | TContract contract = contractService.getById(contractId); |
| | | THouse house = houseService.getById(contract.getHouseId()); |
| | | return R.ok(house); |
| | | } |
| | | |
| | | /** |
| | | * 通过房屋id查询合同信息 |
| | | */ |
| | | @ApiOperation(value = "通过房屋id查询合同信息") |
| | | @PostMapping(value = "/getContractByHouseId") |
| | | public R<TContract> getContractByHouseId(@RequestParam String houseId) { |
| | | TContract contract = contractService.getOne(Wrappers.lambdaQuery(TContract.class) |
| | | .eq(TContract::getHouseId, houseId) |
| | | .orderByDesc(TContract::getCreateTime) |
| | | .in(TContract::getStatus, 4, 6, 7) |
| | | .last("LIMIT 1")); |
| | | return R.ok(contract); |
| | | } |
| | | |
| | | /** |
| | | * 添加验收记录管理 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:accept:add')") |
| | | @Log(title = "验收记录信息-新增验收记录", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "添加验收记录") |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> add(@Validated @RequestBody TCheckAcceptRecord dto) { |
| | | // 添加验收记录 |
| | | checkAcceptRecordService.save(dto); |
| | | |
| | | // TODO 生成结算帐单 |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 查看验收记录详情 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:accept:detail')") |
| | | @ApiOperation(value = "查看验收记录详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public R<TCheckAcceptRecordVO> getDetailById(@RequestParam String id) { |
| | | TCheckAcceptRecord checkAcceptRecord = checkAcceptRecordService.getById(id); |
| | | TCheckAcceptRecordVO checkAcceptRecordVO = new TCheckAcceptRecordVO(); |
| | | BeanUtils.copyProperties(checkAcceptRecord, checkAcceptRecordVO); |
| | | // 查询合同信息 |
| | | checkAcceptRecordVO.setContract(contractService.getById(checkAcceptRecord.getContractId())); |
| | | // 查询房屋信息 |
| | | checkAcceptRecordVO.setHouse(houseService.getById(checkAcceptRecord.getHouseId())); |
| | | return R.ok(checkAcceptRecordVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除验收记录 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:accept:delete')") |
| | | @Log(title = "验收记录信息-删除验收记录", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除验收记录") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | return R.ok(checkAcceptRecordService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除验收记录 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:accept:delete')") |
| | | @Log(title = "验收记录信息-删除验收记录", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除验收记录") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | return R.ok(checkAcceptRecordService.removeByIds(ids)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.system.model.TFaultRepairMessage; |
| | | import com.ruoyi.system.query.TFaultRepairMessageQuery; |
| | | import com.ruoyi.system.service.TFaultRepairMessageService; |
| | | import com.ruoyi.system.vo.TFaultRepairMessageVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | this.tFaultRepairMessageService = tFaultRepairMessageService; |
| | | } |
| | | |
| | | /** |
| | | * 获取报修管理列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:fault:list')") |
| | | @ApiOperation(value = "获取报修分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TFaultRepairMessageVO>> pageList(@RequestBody TFaultRepairMessageQuery query) { |
| | | return R.ok(tFaultRepairMessageService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 处理维修 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:fault:update')") |
| | | @Log(title = "报修信息-处理维修", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "处理维修") |
| | | @PostMapping(value = "/update") |
| | | public R<Boolean> update(@Validated @RequestBody TFaultRepairMessage faultRepairMessage) { |
| | | faultRepairMessage.setStatus(2); |
| | | return R.ok(tFaultRepairMessageService.updateById(faultRepairMessage)); |
| | | } |
| | | |
| | | /** |
| | | * 查看报修详情 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:fault:detail')") |
| | | @ApiOperation(value = "查看报修详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public R<TFaultRepairMessageVO> getDetailById(@RequestParam String id) { |
| | | TFaultRepairMessageVO faultRepairMessageVO = tFaultRepairMessageService.getDetailById(id); |
| | | return R.ok(faultRepairMessageVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除报修 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:fault:delete')") |
| | | @Log(title = "报修信息-删除报修", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除报修") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | return R.ok(tFaultRepairMessageService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除报修 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:fault:delete')") |
| | | @Log(title = "报修信息-删除报修", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除报修") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | return R.ok(tFaultRepairMessageService.removeByIds(ids)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | * 账单类型 1=租金 2=押金 3=生活费用 |
| | | */ |
| | | public static final String DICT_TYPE_BILL_TYPE = "t_bill_type"; |
| | | /** |
| | | * 验收记录情况 1=良好 2=一般 3=较差 |
| | | */ |
| | | public static final String DICT_TYPE_CHECK_SITUATION = "t_check_situation"; |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TCheckAcceptRecord; |
| | | import com.ruoyi.system.query.TCheckAcceptRecordQuery; |
| | | import com.ruoyi.system.vo.TCheckAcceptRecordVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TCheckAcceptRecordMapper extends BaseMapper<TCheckAcceptRecord> { |
| | | |
| | | /** |
| | | * 分页查询验收记录 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TCheckAcceptRecordVO> pageList(@Param("query") TCheckAcceptRecordQuery query, @Param("pageInfo")PageInfo<TCheckAcceptRecordVO> pageInfo); |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TFaultRepairMessage; |
| | | import com.ruoyi.system.query.TFaultRepairMessageQuery; |
| | | import com.ruoyi.system.vo.TFaultRepairMessageVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TFaultRepairMessageMapper extends BaseMapper<TFaultRepairMessage> { |
| | | |
| | | /** |
| | | * 根据id查询报修管理 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | TFaultRepairMessageVO getDetailById(@Param("id") String id); |
| | | |
| | | /** |
| | | * 分页查询报修管理 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TFaultRepairMessageVO> pageList(@Param("query") TFaultRepairMessageQuery query, @Param("pageInfo")PageInfo<TFaultRepairMessageVO> pageInfo); |
| | | |
| | | } |
| | |
| | | @TableField("pictures") |
| | | private String pictures; |
| | | |
| | | @ApiModelProperty(value = "验收结果 1=合格 2=不合格") |
| | | @ApiModelProperty(value = "验收结果 1=合格 0=不合格") |
| | | @TableField("check_result") |
| | | private Boolean checkResult; |
| | | |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.common.core.domain.model.TimeRangeQueryBody; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "验收记录查询对象query") |
| | | public class TCheckAcceptRecordQuery extends TimeRangeQueryBody { |
| | | |
| | | @ApiModelProperty(value = "房屋名称") |
| | | private String houseName; |
| | | |
| | | @ApiModelProperty(value = "合同编号") |
| | | private String contractNumber; |
| | | |
| | | @ApiModelProperty(value = "验收结果 1=合格 0=不合格") |
| | | private Boolean checkResult; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "报修列表查询query") |
| | | public class TFaultRepairMessageQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | private String tenantId; |
| | | |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String contactNumber; |
| | | |
| | | @ApiModelProperty(value = "状态 1=待处理 2=已处理") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "报修类型 1=常规维修 2=紧急抢修") |
| | | private Integer repairType; |
| | | |
| | | @ApiModelProperty(value = "处理人") |
| | | private String handlePerson; |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TCheckAcceptRecord; |
| | | import com.ruoyi.system.query.TCheckAcceptRecordQuery; |
| | | import com.ruoyi.system.vo.TCheckAcceptRecordVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TCheckAcceptRecordService extends IService<TCheckAcceptRecord> { |
| | | |
| | | /** |
| | | * 获取验收记录分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TCheckAcceptRecordVO> pageList(TCheckAcceptRecordQuery query); |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TFaultRepairMessage; |
| | | import com.ruoyi.system.query.TFaultRepairMessageQuery; |
| | | import com.ruoyi.system.vo.TFaultRepairMessageVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TFaultRepairMessageService extends IService<TFaultRepairMessage> { |
| | | |
| | | /** |
| | | * 查看报修详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | TFaultRepairMessageVO getDetailById(String id); |
| | | |
| | | /** |
| | | * 获取报修分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TFaultRepairMessageVO> pageList(TFaultRepairMessageQuery query); |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.constant.DictConstants; |
| | | import com.ruoyi.common.utils.DictUtils; |
| | | import com.ruoyi.system.mapper.TCheckAcceptRecordMapper; |
| | | import com.ruoyi.system.model.TCheckAcceptRecord; |
| | | import com.ruoyi.system.query.TCheckAcceptRecordQuery; |
| | | import com.ruoyi.system.service.TCheckAcceptRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.vo.SysUserVO; |
| | | import com.ruoyi.system.vo.TCheckAcceptRecordVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TCheckAcceptRecordServiceImpl extends ServiceImpl<TCheckAcceptRecordMapper, TCheckAcceptRecord> implements TCheckAcceptRecordService { |
| | | |
| | | @Override |
| | | public PageInfo<TCheckAcceptRecordVO> pageList(TCheckAcceptRecordQuery query) { |
| | | PageInfo<TCheckAcceptRecordVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TCheckAcceptRecordVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | list.forEach(item -> { |
| | | item.setCleanSituation(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION,item.getCleanSituation())); |
| | | item.setOverallSituation(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION,item.getOverallSituation())); |
| | | item.setDeviceSituation(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION,item.getDeviceSituation())); |
| | | item.setFurnitureSituation(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION,item.getFurnitureSituation())); |
| | | }); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.TFaultRepairMessageMapper; |
| | | import com.ruoyi.system.model.TFaultRepairMessage; |
| | | import com.ruoyi.system.query.TFaultRepairMessageQuery; |
| | | import com.ruoyi.system.service.TFaultRepairMessageService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.vo.SysOperLogVO; |
| | | import com.ruoyi.system.vo.TFaultRepairMessageVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TFaultRepairMessageServiceImpl extends ServiceImpl<TFaultRepairMessageMapper, TFaultRepairMessage> implements TFaultRepairMessageService { |
| | | |
| | | @Override |
| | | public TFaultRepairMessageVO getDetailById(String id) { |
| | | return this.baseMapper.getDetailById(id); |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TFaultRepairMessageVO> pageList(TFaultRepairMessageQuery query) { |
| | | PageInfo<TFaultRepairMessageVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TFaultRepairMessageVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import com.ruoyi.system.model.TCheckAcceptRecord; |
| | | import com.ruoyi.system.model.TContract; |
| | | import com.ruoyi.system.model.THouse; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "验收记录VO") |
| | | public class TCheckAcceptRecordVO extends TCheckAcceptRecord { |
| | | |
| | | @ApiModelProperty(value = "合同信息") |
| | | private TContract contract; |
| | | |
| | | @ApiModelProperty(value = "房屋信息") |
| | | private THouse house; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import com.ruoyi.system.model.TFaultRepairMessage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "报修VO") |
| | | public class TFaultRepairMessageVO extends TFaultRepairMessage { |
| | | |
| | | @ApiModelProperty(value = "物品名称") |
| | | private String itemName; |
| | | |
| | | @ApiModelProperty(value = "物品分类名称") |
| | | private String itemTypeName; |
| | | |
| | | @ApiModelProperty(value = "用户名称") |
| | | private String residentName; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, contract_id, house_id, check_time, lease_reason, check_person, accompany_person, overall_situation, furniture_situation, device_situation, clean_situation, other_problem, pictures, check_result, check_money, create_time, update_time, create_by, update_by, disabled |
| | | id, contract_id, house_id, check_time, lease_reason, check_person, accompany_person, overall_situation, furniture_situation, device_situation, clean_situation, |
| | | other_problem, pictures, check_result, check_money, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TCheckAcceptRecordVO"> |
| | | select |
| | | t.id, |
| | | t.contract_id, |
| | | t.house_id, |
| | | t.check_time, |
| | | t.lease_reason, |
| | | t.check_person, |
| | | t.accompany_person, |
| | | t.overall_situation, |
| | | t.furniture_situation, |
| | | t.device_situation, |
| | | t.clean_situation, |
| | | t.other_problem, |
| | | t.pictures, |
| | | t.check_result, |
| | | t.check_money, |
| | | t.create_time, |
| | | t.update_time, |
| | | t.create_by, |
| | | t.update_by, |
| | | t.disabled, |
| | | c.contract_number, |
| | | h.house_name |
| | | from t_check_accept_record t |
| | | left join t_contract c on t.contract_id = c.id |
| | | left join t_house h on t.house_id = h.id |
| | | <where> |
| | | <if test="query.contractNumber != null and query.contractNumber != ''"> |
| | | AND c.contract_number LIKE concat('%', #{query.contractNumber}, '%') |
| | | </if> |
| | | <if test="query.checkResult != null"> |
| | | AND t.check_result = #{query.checkResult} |
| | | </if> |
| | | <if test="query.houseName != null and query.houseName != ''"> |
| | | AND h.house_name LIKE concat('%', #{query.houseName}, '%') |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND t.check_time >= #{query.startTime} |
| | | AND t.check_time <= #{query.endTime} |
| | | </if> |
| | | AND t.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY t.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, tenant_id, item_id,contract_id, fault_area_name, describe_name, describe_detail, fault_pictures, service_address, repair_type, visit_time, contact_number, leave_message, handle_person, handle_time, result_describe, repair_picture, attachment, status, create_time, update_time, create_by, update_by, disabled |
| | | id, tenant_id, item_id,item_type_id,contract_id, fault_area_name, describe_name, describe_detail, fault_pictures, service_address, repair_type, |
| | | visit_time, contact_number, leave_message, handle_person, handle_time, result_describe, repair_picture, attachment,attachment_name, status, |
| | | create_time,update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="getDetailById" resultType="com.ruoyi.system.vo.TFaultRepairMessageVO"> |
| | | SELECT |
| | | t.id, |
| | | t.tenant_id, |
| | | t.item_id, |
| | | t.item_type_id, |
| | | t.contract_id, |
| | | t.fault_area_name, |
| | | t.describe_name, |
| | | t.describe_detail, |
| | | t.fault_pictures, |
| | | t.service_address, |
| | | t.repair_type, |
| | | t.visit_time, |
| | | t.contact_number, |
| | | t.leave_message, |
| | | t.handle_person, |
| | | t.handle_time, |
| | | t.result_describe, |
| | | t.repair_picture, |
| | | t.attachment, |
| | | t.attachment_name, |
| | | t.status, |
| | | t.create_time, |
| | | t.update_time, |
| | | t.create_by, |
| | | t.update_by, |
| | | t.disabled, |
| | | i.item_name AS itemName, |
| | | it.type_name AS itemTypeName, |
| | | tnt.resident_name AS residentName |
| | | from t_fault_repair_message t |
| | | LEFT JOIN t_item i ON t.item_id = i.id |
| | | LEFT JOIN t_item_type it ON t.item_type_id = it.id |
| | | LEFT JOIN t_tenant tnt ON t.tenant_id = tnt.id |
| | | WHERE t.id = #{id} |
| | | </select> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TFaultRepairMessageVO"> |
| | | SELECT |
| | | t.id, |
| | | t.tenant_id, |
| | | t.item_id, |
| | | t.item_type_id, |
| | | t.contract_id, |
| | | t.fault_area_name, |
| | | t.describe_name, |
| | | t.describe_detail, |
| | | t.fault_pictures, |
| | | t.service_address, |
| | | t.repair_type, |
| | | t.visit_time, |
| | | t.contact_number, |
| | | t.leave_message, |
| | | t.handle_person, |
| | | t.handle_time, |
| | | t.result_describe, |
| | | t.repair_picture, |
| | | t.attachment, |
| | | t.attachment_name, |
| | | t.status, |
| | | t.create_time, |
| | | t.update_time, |
| | | t.create_by, |
| | | t.update_by, |
| | | t.disabled, |
| | | i.item_name AS itemName, |
| | | it.type_name AS itemTypeName, |
| | | tnt.resident_name AS residentName |
| | | from t_fault_repair_message t |
| | | LEFT JOIN t_item i ON t.item_id = i.id |
| | | LEFT JOIN t_item_type it ON t.item_type_id = it.id |
| | | LEFT JOIN t_tenant tnt ON t.tenant_id = tnt.id |
| | | <where> |
| | | <if test="query.tenantId != null and query.tenantId != ''"> |
| | | AND t.tenant_id = #{query.tenantId} |
| | | </if> |
| | | <if test="query.contactNumber != null and query.contactNumber != ''"> |
| | | AND t.contact_number LIKE CONCAT('%', #{query.contactNumber}, '%') |
| | | </if> |
| | | <if test="query.status != null"> |
| | | AND t.status = #{query.status} |
| | | </if> |
| | | <if test="query.repairType != null"> |
| | | AND t.repair_type = #{query.repairType} |
| | | </if> |
| | | <if test="query.handlePerson != null and query.handlePerson != ''"> |
| | | AND t.handle_person LIKE CONCAT('%', #{query.handlePerson}, '%') |
| | | </if> |
| | | AND t.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY t.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |