2b1b530a 康伟

kangwei : 隐患排查对象接口

1 个父辈 831cef07
......@@ -36,6 +36,7 @@
<artifactId>sk-module-system</artifactId>
<version>1.0.0</version>
</dependency>
<!-- 自定义报表-->
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>sk-module-datafill</artifactId>
......
package com.skua.modules.safe.controller.app;
import java.util.Date;
import java.util.List;
import com.skua.core.api.vo.Result;
......@@ -166,7 +167,7 @@ public class APPDangerInspectionController {
if(inspectionRecord==null) {
result.error500("未找到对应实体");
}else {
inspectionRecord.setEndDate(DateUtil.getCurrentDate() ) ;
inspectionRecord.setEndDate(DateUtil.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss") ) ;
inspectionRecord.setStatus("2");//结束状态
inspectionRecordService.updateById(inspectionRecord);
......
......@@ -58,7 +58,7 @@ public class APPDangerInspectionRecordController {
Result<IPage<DangerInspectionRecord>> result = new Result<IPage<DangerInspectionRecord>>();
QueryWrapper<DangerInspectionRecord> queryWrapper = new QueryWrapper<DangerInspectionRecord>();// QueryGenerator.initQueryWrapper(dangerInspectionRecord, req.getParameterMap());
Page<DangerInspectionRecord> page = new Page<DangerInspectionRecord>(pageNo, pageSize);
if(dangerInspectionRecord.getDangerId() != null ){
if(dangerInspectionRecord.getDangerId() != null && dangerInspectionRecord.getDangerId().length() > 0 ){
queryWrapper.eq("danger_id", dangerInspectionRecord.getDangerId());
}
if(StringUtils.isNotBlank(dangerInspectionRecord.getStartTime())){
......
......@@ -26,8 +26,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="danger_inspection_record对象", description="巡检记录")
public class DangerInspectionRecord implements Serializable{
public class DangerInspectionRecord {
/**id*/
@TableId(type = IdType.ID_WORKER_STR)
@ApiModelProperty(value = "id")
......@@ -35,6 +34,7 @@ public class DangerInspectionRecord implements Serializable{
/**厂id*/
@Excel(name = "厂id", width = 15)
@ApiModelProperty(value = "厂id")
@Dict(dictTable = "sys_depart", dicCode="id", dicText = "depart_name")
private String departId;
/**风险等级编号*/
@Excel(name = "风险等级编号", width = 15)
......@@ -110,4 +110,7 @@ public class DangerInspectionRecord implements Serializable{
@ApiModelProperty(value = "条件:结束时间")
private String endTime;
}
......
......@@ -15,6 +15,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
......@@ -75,7 +76,7 @@ public class DangerInspectionRecordServiceImpl extends ServiceImpl<DangerInspect
dangerInspectionRecord.setDangerId( dangerId );
dangerInspectionRecord.setStatus( status);
dangerInspectionRecord.setReportUser( userId );
dangerInspectionRecord.setReportDate(DateUtil.getCurrentDate());
dangerInspectionRecord.setReportDate(DateUtil.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss"));
this.baseMapper.insert( dangerInspectionRecord ) ;
......
......@@ -2,6 +2,7 @@ package com.skua.modules.safe.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.skua.modules.safe.entity.DangerInspectionInfo;
import com.skua.modules.safe.entity.DangerInspectionRecord;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -9,6 +10,9 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.util.List;
/**
* 检查内容对象
*/
......@@ -23,11 +27,9 @@ public class DangerInspectionRecordVO {
@ApiModelProperty(value = "风险等级编号")
private String dangerId;
@ApiModelProperty(value = "巡检记录编号")
private String inspectionRecord;
@TableField(exist=false)
@ApiModelProperty(value = "条件:开始时间")
private String startTime;
......@@ -35,4 +37,9 @@ public class DangerInspectionRecordVO {
@TableField(exist=false)
@ApiModelProperty(value = "条件:结束时间")
private String endTime;
@TableField(exist=false)
@ApiModelProperty(value = "巡检对象集合")
private List<DangerInspectionInfo> inspectionInfoList ;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!