0cce2f66 康伟

kangwei: 后端---隐患排序记录

1 个父辈 941497f7
......@@ -15,6 +15,7 @@ import com.skua.core.query.QueryGenerator;
import com.skua.core.service.ISequenceService;
import com.skua.core.util.ConvertUtils;
import com.skua.modules.safe.entity.DangerInspectionRecord;
import com.skua.modules.safe.entity.DangerLevelManage;
import com.skua.modules.safe.service.IDangerInspectionRecordService;
import java.util.Date;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -22,6 +23,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
......@@ -52,6 +54,8 @@ public class DangerInspectionRecordController {
@Autowired
private IDangerInspectionRecordService dangerInspectionRecordService;
@Autowired
private IDangerInspectionRecordService inspectionRecordService ;//巡检对象
/**
* <pre>
* 分页列表查询
......@@ -76,6 +80,24 @@ public class DangerInspectionRecordController {
QueryWrapper<DangerInspectionRecord> queryWrapper = new QueryWrapper<>();//QueryGenerator.initQueryWrapper(dangerInspectionRecord, req.getParameterMap());
Page<DangerInspectionRecord> page = new Page<DangerInspectionRecord>(pageNo, pageSize);
queryWrapper.eq("danger_id", dangerInspectionRecord.getDangerId());
if(StringUtils.isNotBlank(dangerInspectionRecord.getDangerName())){
queryWrapper.like("danger_name", dangerInspectionRecord.getDangerName() ) ;
}
if(StringUtils.isNotBlank(dangerInspectionRecord.getDepartId())){
queryWrapper.eq("depart_id", dangerInspectionRecord.getDepartId() ) ;
}
if(StringUtils.isNotBlank(dangerInspectionRecord.getStatus())){
queryWrapper.eq("status", dangerInspectionRecord.getStatus() ) ;
}
if(StringUtils.isNotBlank(dangerInspectionRecord.getStartTime())){
queryWrapper.ge("report_date", dangerInspectionRecord.getStartTime() ) ;
}
if(StringUtils.isNotBlank(dangerInspectionRecord.getEndTime())){
queryWrapper.le("report_date", dangerInspectionRecord.getEndTime() ) ;
}
IPage<DangerInspectionRecord> pageList = dangerInspectionRecordService.page(page, queryWrapper);
result.setSuccess(true);
result.setResult(pageList);
......@@ -275,4 +297,29 @@ public class DangerInspectionRecordController {
return Result.ok("文件导入失败!");
}
/**
* <pre>
* 扫描二维码进入:风险点详情
* </pre>
* @param dangerInspectionRecord
* @return
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog(value = "风险点:巡检情况列表")
@ApiOperation(value="风险点:巡检情况列表", notes="风险点:巡检情况列表")
@GetMapping(value = "/detail")
public Result<DangerLevelManage> queryById(DangerInspectionRecord dangerInspectionRecord) {
Result<DangerLevelManage> result = new Result<DangerLevelManage>();
DangerLevelManage dangerLevelManage = inspectionRecordService.queryListByDangerId(dangerInspectionRecord.getDangerId(),dangerInspectionRecord.getStartTime(),dangerInspectionRecord.getEndDate());
if(dangerLevelManage == null) {
result.error500("未找到对应实体");
}else {
result.setResult(dangerLevelManage);
result.setSuccess(true);
}
return result;
}
}
......
......@@ -61,7 +61,6 @@ public class APPDangerInspectionController {
dangerInspection.setLastInspectionTime( inspection.getReportDate() );
}else{
dangerInspection = new DangerLevelManage();
dangerInspection.setLastInspectionTime("");
}
if(dangerInspection==null) {
......
......@@ -39,6 +39,11 @@ public class DangerInspectionRecord implements Serializable{
@Excel(name = "风险等级编号", width = 15)
@ApiModelProperty(value = "风险等级编号")
private String dangerId;
/**风险等级编号*/
@Excel(name = "风险等级名称", width = 15)
@ApiModelProperty(value = "风险等级名称")
private String dangerName;
/**上报人(用户id)*/
@Excel(name = "上报人(用户id)", width = 15)
@ApiModelProperty(value = "上报人(用户id)")
......
......@@ -61,6 +61,7 @@ public class DangerInspectionRecordServiceImpl extends ServiceImpl<DangerInspect
DangerLevelManage dangerLevelManage = dangerLevelManageMapper.selectById(dangerId );
dangerInspection = new DangerInspectionRecord();
dangerInspection.setDepartId(dangerLevelManage.getDepartId());
dangerInspection.setDangerName(dangerLevelManage.getDangerName() );//风险等级名称
dangerInspection.setDangerId( dangerId );
dangerInspection.setStatus( status);
dangerInspection.setReportUser( userId );
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!