Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
941497f7
由
康伟
编写于
2024-09-18 17:23:30 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei: 移动端---巡检接口
1 个父辈
3a1d6e9b
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
226 行增加
和
18 行删除
sk-module-biz/src/main/java/com/skua/modules/guest/util/DateUtil.java
sk-module-biz/src/main/java/com/skua/modules/safe/controller/DangerInspectInfoController.java
sk-module-biz/src/main/java/com/skua/modules/safe/controller/DangerInspectItemController.java
sk-module-biz/src/main/java/com/skua/modules/safe/controller/DangerInspectionInfoController.java
sk-module-biz/src/main/java/com/skua/modules/safe/controller/DangerInspectionItemController.java
sk-module-biz/src/main/java/com/skua/modules/safe/controller/DangerInspectionRecordController.java
sk-module-biz/src/main/java/com/skua/modules/safe/controller/app/APPDangerInspectionController.java
sk-module-biz/src/main/java/com/skua/modules/safe/controller/app/APPDangerInspectionRecordController.java
sk-module-biz/src/main/java/com/skua/modules/safe/entity/DangerInspectItem.java
sk-module-biz/src/main/java/com/skua/modules/safe/entity/DangerInspectionInfo.java
sk-module-biz/src/main/java/com/skua/modules/safe/entity/DangerInspectionItem.java
sk-module-biz/src/main/java/com/skua/modules/safe/entity/DangerInspectionRecord.java
sk-module-biz/src/main/java/com/skua/modules/safe/entity/DangerLevelManage.java
sk-module-biz/src/main/java/com/skua/modules/safe/service/IDangerInspectionRecordService.java
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/DangerInspectInfoServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/DangerInspectionRecordServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/guest/util/DateUtil.java
查看文件 @
941497f
...
...
@@ -250,6 +250,13 @@ public class DateUtil {
return
date
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDateTime
();
}
/***
* 获取当前时间
* @return
*/
public
static
String
getCurrentDate
(){
return
formatDate
(
new
Date
(),
null
);
}
/***
* 字符串日期格式化
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/controller/DangerInspectInfoController.java
查看文件 @
941497f
...
...
@@ -74,7 +74,7 @@ public class DangerInspectInfoController {
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
Result
<
IPage
<
DangerInspectInfo
>>
result
=
new
Result
<
IPage
<
DangerInspectInfo
>>();
QueryWrapper
<
DangerInspectInfo
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
dangerInspectInfo
,
req
.
getParameterMap
());
QueryWrapper
<
DangerInspectInfo
>
queryWrapper
=
new
QueryWrapper
<>();
//
QueryGenerator.initQueryWrapper(dangerInspectInfo, req.getParameterMap());
Page
<
DangerInspectInfo
>
page
=
new
Page
<
DangerInspectInfo
>(
pageNo
,
pageSize
);
queryWrapper
.
eq
(
"danger_id"
,
dangerInspectInfo
.
getDangerId
());
queryWrapper
.
orderByDesc
(
"create_time"
);
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/controller/DangerInspectItemController.java
查看文件 @
941497f
...
...
@@ -73,7 +73,7 @@ public class DangerInspectItemController {
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
Result
<
IPage
<
DangerInspectItem
>>
result
=
new
Result
<
IPage
<
DangerInspectItem
>>();
QueryWrapper
<
DangerInspectItem
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
dangerInspectItem
,
req
.
getParameterMap
());
QueryWrapper
<
DangerInspectItem
>
queryWrapper
=
new
QueryWrapper
<>();
//
QueryGenerator.initQueryWrapper(dangerInspectItem, req.getParameterMap());
Page
<
DangerInspectItem
>
page
=
new
Page
<
DangerInspectItem
>(
pageNo
,
pageSize
);
IPage
<
DangerInspectItem
>
pageList
=
dangerInspectItemService
.
page
(
page
,
queryWrapper
);
queryWrapper
.
eq
(
"inspect_obj_id"
,
dangerInspectItem
.
getInspectObjId
());
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/controller/DangerInspectionInfoController.java
查看文件 @
941497f
...
...
@@ -73,7 +73,7 @@ public class DangerInspectionInfoController {
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
Result
<
IPage
<
DangerInspectionInfo
>>
result
=
new
Result
<
IPage
<
DangerInspectionInfo
>>();
QueryWrapper
<
DangerInspectionInfo
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
dangerInspectionInfo
,
req
.
getParameterMap
());
QueryWrapper
<
DangerInspectionInfo
>
queryWrapper
=
new
QueryWrapper
<>();
//
QueryGenerator.initQueryWrapper(dangerInspectionInfo, req.getParameterMap());
Page
<
DangerInspectionInfo
>
page
=
new
Page
<
DangerInspectionInfo
>(
pageNo
,
pageSize
);
IPage
<
DangerInspectionInfo
>
pageList
=
dangerInspectionInfoService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/controller/DangerInspectionItemController.java
查看文件 @
941497f
...
...
@@ -73,7 +73,7 @@ public class DangerInspectionItemController {
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
Result
<
IPage
<
DangerInspectionItem
>>
result
=
new
Result
<
IPage
<
DangerInspectionItem
>>();
QueryWrapper
<
DangerInspectionItem
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
dangerInspectionItem
,
req
.
getParameterMap
());
QueryWrapper
<
DangerInspectionItem
>
queryWrapper
=
new
QueryWrapper
<>();
//
QueryGenerator.initQueryWrapper(dangerInspectionItem, req.getParameterMap());
Page
<
DangerInspectionItem
>
page
=
new
Page
<
DangerInspectionItem
>(
pageNo
,
pageSize
);
queryWrapper
.
eq
(
"inspect_obj_id"
,
dangerInspectionItem
.
getInspectObjId
());
queryWrapper
.
orderByDesc
(
"create_time"
);
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/controller/DangerInspectionRecordController.java
查看文件 @
941497f
...
...
@@ -73,8 +73,9 @@ public class DangerInspectionRecordController {
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
Result
<
IPage
<
DangerInspectionRecord
>>
result
=
new
Result
<
IPage
<
DangerInspectionRecord
>>();
QueryWrapper
<
DangerInspectionRecord
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
dangerInspectionRecord
,
req
.
getParameterMap
());
QueryWrapper
<
DangerInspectionRecord
>
queryWrapper
=
new
QueryWrapper
<>();
//
QueryGenerator.initQueryWrapper(dangerInspectionRecord, req.getParameterMap());
Page
<
DangerInspectionRecord
>
page
=
new
Page
<
DangerInspectionRecord
>(
pageNo
,
pageSize
);
queryWrapper
.
eq
(
"danger_id"
,
dangerInspectionRecord
.
getDangerId
());
IPage
<
DangerInspectionRecord
>
pageList
=
dangerInspectionRecordService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/controller/app/APPDangerInspectionController.java
查看文件 @
941497f
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
com.skua.core.api.vo.Result
;
import
com.skua.core.aspect.annotation.AutoLog
;
import
com.skua.core.context.BaseContextHandler
;
import
com.skua.modules.guest.util.DateUtil
;
import
com.skua.modules.safe.entity.*
;
import
com.skua.modules.safe.mapper.DangerInspectionItemMapper
;
import
com.skua.modules.safe.service.*
;
...
...
@@ -39,7 +40,6 @@ public class APPDangerInspectionController {
@Autowired
private
IDangerInspectionItemService
inspectionItemService
;
//巡检对象,检查项
/**
* <pre>
* 扫描二维码进入:风险点详情
...
...
@@ -60,6 +60,8 @@ public class APPDangerInspectionController {
if
(
inspection
!=
null
){
dangerInspection
.
setLastInspectionTime
(
inspection
.
getReportDate
()
);
}
else
{
dangerInspection
=
new
DangerLevelManage
();
dangerInspection
.
setLastInspectionTime
(
""
);
}
if
(
dangerInspection
==
null
)
{
...
...
@@ -127,8 +129,8 @@ public class APPDangerInspectionController {
return
result
;
}
@AutoLog
(
value
=
"
巡查内容对象-保存
"
)
@ApiOperation
(
value
=
"
巡查内容对象-保存"
,
notes
=
"巡查内容对象-保存
"
)
@AutoLog
(
value
=
"
风险巡检-提交巡检记录
"
)
@ApiOperation
(
value
=
"
风险巡检-保存巡检记录"
,
notes
=
"风险巡检-保存巡检记录
"
)
@PostMapping
(
value
=
"/saveInspectionInf"
)
public
Result
<
DangerInspectInfo
>
updateDangerInspectionInfo
(
@RequestBody
DangerInspectionInfo
dangerInspectionInfo
)
{
Result
<
DangerInspectInfo
>
result
=
new
Result
<
DangerInspectInfo
>();
...
...
@@ -141,14 +143,25 @@ public class APPDangerInspectionController {
}
return
result
;
}
@AutoLog
(
value
=
"结束巡检"
)
@ApiOperation
(
value
=
"
结束巡检"
,
notes
=
"
结束巡检"
)
@AutoLog
(
value
=
"
风险巡检-
结束巡检"
)
@ApiOperation
(
value
=
"
风险巡检-结束巡检"
,
notes
=
"风险巡检-
结束巡检"
)
@PostMapping
(
value
=
"/endInspection"
)
public
Result
<
DangerInspect
Info
>
endInspection
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
Result
<
DangerInspect
Info
>
result
=
new
Result
<
DangerInspectInfo
>();
public
Result
<
DangerInspect
ionRecord
>
endInspection
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
Result
<
DangerInspect
ionRecord
>
result
=
new
Result
<
DangerInspectionRecord
>();
try
{
DangerInspectionRecord
inspectionRecord
=
inspectionRecordService
.
getById
(
id
);
if
(
inspectionRecord
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
inspectionRecord
.
setEndDate
(
DateUtil
.
getCurrentDate
()
)
;
inspectionRecord
.
setStatus
(
"2"
);
//结束状态
inspectionRecordService
.
updateById
(
inspectionRecord
);
result
.
setResult
(
inspectionRecord
);
result
.
setSuccess
(
true
);
}
//inspectionRecordService.(id);
result
.
success
(
"添加成功!"
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
...
...
@@ -157,5 +170,8 @@ public class APPDangerInspectionController {
return
result
;
}
/*************************************************************************************************/
//作废
}
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/controller/app/APPDangerInspectionRecordController.java
0 → 100644
查看文件 @
941497f
package
com
.
skua
.
modules
.
safe
.
controller
.
app
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.skua.core.api.vo.Result
;
import
com.skua.core.aspect.annotation.AutoLog
;
import
com.skua.core.query.QueryGenerator
;
import
com.skua.modules.safe.entity.DangerInspectionRecord
;
import
com.skua.modules.safe.entity.DangerLevelManage
;
import
com.skua.modules.safe.service.IDangerInspectionItemService
;
import
com.skua.modules.safe.service.IDangerInspectionRecordService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
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.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
@Slf4j
@Api
(
tags
=
"隐患排查记录"
)
@RestController
(
"appDangerInspectionRecordController"
)
@RequestMapping
(
"/app/safe/dangerInspectionRecord"
)
public
class
APPDangerInspectionRecordController
{
@Autowired
private
IDangerInspectionRecordService
dangerInspectionRecordService
;
@Autowired
private
IDangerInspectionRecordService
inspectionRecordService
;
//巡检对象
/**
* <pre>
* 分页列表查询
* </pre>
* @param dangerInspectionRecord
* @param pageNo
* @param pageSize
* @param req
* @return
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"隐患排查记录-分页列表查询"
)
@ApiOperation
(
value
=
"隐患排查记录-分页列表查询"
,
notes
=
"隐患排查记录-分页列表查询"
)
@GetMapping
(
value
=
"/list"
)
public
Result
<
IPage
<
DangerInspectionRecord
>>
queryPageList
(
DangerInspectionRecord
dangerInspectionRecord
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
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
);
queryWrapper
.
eq
(
"danger_id"
,
dangerInspectionRecord
.
getDangerId
());
if
(
StringUtils
.
isNotBlank
(
dangerInspectionRecord
.
getStartTime
())){
queryWrapper
.
ge
(
"report_date"
,
dangerInspectionRecord
.
getStartTime
()
)
;
}
if
(
StringUtils
.
isNotBlank
(
dangerInspectionRecord
.
getEndTime
())){
queryWrapper
.
le
(
"report_date"
,
dangerInspectionRecord
.
getEndTime
()
)
;
}
// queryWrapper.eq("report_user", BaseContextHandler.getUserId());
IPage
<
DangerInspectionRecord
>
pageList
=
dangerInspectionRecordService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
}
/**
* <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
;
}
}
\ No newline at end of file
sk-module-biz/src/main/java/com/skua/modules/safe/entity/DangerInspectItem.java
查看文件 @
941497f
...
...
@@ -23,7 +23,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"danger_inspect_item对象"
,
description
=
"风险检查项"
)
public
class
DangerInspectItem
{
public
class
DangerInspectItem
implements
Serializable
{
/**id*/
@TableId
(
type
=
IdType
.
ID_WORKER_STR
)
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/entity/DangerInspectionInfo.java
查看文件 @
941497f
...
...
@@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"danger_inspection_info对象"
,
description
=
"巡检对象"
)
public
class
DangerInspectionInfo
{
public
class
DangerInspectionInfo
implements
Serializable
{
/**id*/
@TableId
(
type
=
IdType
.
ID_WORKER_STR
)
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/entity/DangerInspectionItem.java
查看文件 @
941497f
...
...
@@ -23,7 +23,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"danger_inspection_item对象"
,
description
=
"风险检查项记录"
)
public
class
DangerInspectionItem
{
public
class
DangerInspectionItem
implements
Serializable
{
/**id*/
@TableId
(
type
=
IdType
.
ID_WORKER_STR
)
...
...
@@ -46,6 +46,12 @@ public class DangerInspectionItem {
@Excel
(
name
=
"选项类型(0:选择,1 是否 2 文本)"
,
width
=
15
)
@ApiModelProperty
(
value
=
"选项类型(0:选择,1 是否 2 文本)"
)
private
String
itemType
;
/**选项状态(0:异常,1正常)*/
@Excel
(
name
=
"检查值"
,
width
=
15
)
@ApiModelProperty
(
value
=
"检查值"
)
private
String
itemValue
;
/**选项状态(0:异常,1正常)*/
@Excel
(
name
=
"选项状态(0:异常,1正常)"
,
width
=
15
)
@ApiModelProperty
(
value
=
"选项状态(0:异常,1正常)"
)
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/entity/DangerInspectionRecord.java
查看文件 @
941497f
...
...
@@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"danger_inspection_record对象"
,
description
=
"巡检记录"
)
public
class
DangerInspectionRecord
{
public
class
DangerInspectionRecord
implements
Serializable
{
/**id*/
@TableId
(
type
=
IdType
.
ID_WORKER_STR
)
...
...
@@ -47,6 +47,14 @@ public class DangerInspectionRecord {
@Excel
(
name
=
"上报时间"
,
width
=
15
)
@ApiModelProperty
(
value
=
"上报时间"
)
private
String
reportDate
;
/**上报时间*/
@Excel
(
name
=
"结束时间"
,
width
=
15
)
@ApiModelProperty
(
value
=
"结束时间"
)
private
String
endDate
;
/**巡检状态(0:未开始,1:开始,2:结束,3:作废)*/
@Excel
(
name
=
"巡检状态(0:未开始,1:开始,2:结束,3:作废)"
,
width
=
15
)
@ApiModelProperty
(
value
=
"巡检状态(0:未开始,1:开始,2:结束,3:作废)"
)
...
...
@@ -83,4 +91,13 @@ public class DangerInspectionRecord {
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"巡检对象集合"
)
private
List
<
DangerInspectionInfo
>
inspectionInfoList
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"条件:开始时间"
)
private
String
startTime
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"条件:结束时间"
)
private
String
endTime
;
}
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/entity/DangerLevelManage.java
查看文件 @
941497f
...
...
@@ -2,6 +2,8 @@ package com.skua.modules.safe.entity;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
...
...
@@ -25,7 +27,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"danger_level_manage对象"
,
description
=
"风险分级管控清单"
)
public
class
DangerLevelManage
{
public
class
DangerLevelManage
implements
Serializable
{
/**id*/
@TableId
(
type
=
IdType
.
UUID
)
...
...
@@ -133,4 +135,8 @@ public class DangerLevelManage {
@ApiModelProperty
(
value
=
"上次巡检时间"
)
private
String
lastInspectionTime
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"巡检内容对象集合"
)
private
List
<
DangerInspectionInfo
>
inspectionInfoList
;
}
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/service/IDangerInspectionRecordService.java
查看文件 @
941497f
...
...
@@ -3,6 +3,7 @@ package com.skua.modules.safe.service;
import
com.skua.modules.safe.entity.DangerInspectionInfo
;
import
com.skua.modules.safe.entity.DangerInspectionRecord
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.skua.modules.safe.entity.DangerLevelManage
;
import
java.util.List
;
...
...
@@ -26,4 +27,13 @@ public interface IDangerInspectionRecordService extends IService<DangerInspectio
* @return
*/
public
DangerInspectionRecord
startInspection
(
String
dangerId
,
String
status
,
String
userId
);
/***
* 查询巡查集合
* @param dangerId
* @param startTime
* @param endDate
* @return
*/
public
DangerLevelManage
queryListByDangerId
(
String
dangerId
,
String
startTime
,
String
endDate
);
}
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/DangerInspectInfoServiceImpl.java
查看文件 @
941497f
...
...
@@ -87,6 +87,7 @@ public class DangerInspectInfoServiceImpl extends ServiceImpl<DangerInspectInfoM
if
(
dangerInspectInfo
.
getItemList
()
!=
null
){
for
(
DangerInspectItem
dangerInspectItem
:
dangerInspectInfo
.
getItemList
()){
dangerInspectItem
.
setInspectObjId
(
dangerInspectInfo
.
getId
()
)
;
dangerInspectItem
.
setDangerId
(
dangerInspectInfo
.
getDangerId
());
inspectItemMapper
.
insert
(
dangerInspectItem
)
;
}
}
...
...
@@ -105,6 +106,7 @@ public class DangerInspectInfoServiceImpl extends ServiceImpl<DangerInspectInfoM
if
(
dangerInspectInfo
.
getItemList
()
!=
null
){
for
(
DangerInspectItem
dangerInspectItem
:
dangerInspectInfo
.
getItemList
()){
dangerInspectItem
.
setInspectObjId
(
dangerInspectInfo
.
getId
()
)
;
dangerInspectItem
.
setDangerId
(
dangerInspectInfo
.
getDangerId
());
inspectItemMapper
.
insert
(
dangerInspectItem
)
;
}
}
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/DangerInspectionRecordServiceImpl.java
查看文件 @
941497f
...
...
@@ -89,6 +89,7 @@ public class DangerInspectionRecordServiceImpl extends ServiceImpl<DangerInspect
inspectionInfo
.
setInspectMethod
(
dangerInspectInfo
.
getInspectMethod
());
inspectionInfo
.
setInspectStandard
(
dangerInspectInfo
.
getInspectStandard
()
);
inspectionInfo
.
setReportUser
(
userId
)
;
inspectionInfo
.
setInspectObjId
(
dangerInspectInfo
.
getId
()
);
dangerInspectionInfoMapper
.
insert
(
inspectionInfo
);
//搜索检查内容对象,检查项目
...
...
@@ -153,4 +154,46 @@ public class DangerInspectionRecordServiceImpl extends ServiceImpl<DangerInspect
return
inspectionInfoList
;
}
/***
* 查询巡查集合
* @param dangerId
* @param startTime
* @param endDate
* @return
*/
public
DangerLevelManage
queryListByDangerId
(
String
dangerId
,
String
startTime
,
String
endDate
){
DangerLevelManage
dangerLevelManage
=
dangerLevelManageMapper
.
selectById
(
dangerId
);
//巡查对象
LambdaQueryWrapper
<
DangerInspectionInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<
DangerInspectionInfo
>();
queryWrapper
.
eq
(
DangerInspectionInfo:
:
getDangerId
,
dangerId
);
queryWrapper
.
orderByAsc
(
DangerInspectionInfo:
:
getCreateTime
);
List
<
DangerInspectionInfo
>
inspectionInfoList
=
dangerInspectionInfoMapper
.
selectList
(
queryWrapper
);
if
(
inspectionInfoList
!=
null
&&
!
inspectionInfoList
.
isEmpty
()){
LambdaQueryWrapper
<
DangerInspectionItem
>
queryItemWrapper
=
new
LambdaQueryWrapper
<
DangerInspectionItem
>();
List
<
DangerInspectionItem
>
itemList
=
null
;
for
(
DangerInspectionInfo
info
:
inspectionInfoList
){
queryItemWrapper
.
eq
(
DangerInspectionItem:
:
getInspectionInfoId
,
info
.
getId
());
queryItemWrapper
.
orderByAsc
(
DangerInspectionItem:
:
getCreateTime
);
itemList
=
dangerInspectionItemMapper
.
selectList
(
queryItemWrapper
);
if
(
itemList
!=
null
)
info
.
setInspectionItemList
(
itemList
)
;
}
dangerLevelManage
.
setInspectionInfoList
(
inspectionInfoList
);
}
return
dangerLevelManage
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论