Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
0cce2f66
由
康伟
编写于
2024-09-18 17:36:03 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei: 后端---隐患排序记录
1 个父辈
941497f7
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
53 行增加
和
1 行删除
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/entity/DangerInspectionRecord.java
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/DangerInspectionRecordServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/safe/controller/DangerInspectionRecordController.java
查看文件 @
0cce2f6
...
...
@@ -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
;
}
}
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/controller/app/APPDangerInspectionController.java
查看文件 @
0cce2f6
...
...
@@ -61,7 +61,6 @@ public class APPDangerInspectionController {
dangerInspection
.
setLastInspectionTime
(
inspection
.
getReportDate
()
);
}
else
{
dangerInspection
=
new
DangerLevelManage
();
dangerInspection
.
setLastInspectionTime
(
""
);
}
if
(
dangerInspection
==
null
)
{
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/entity/DangerInspectionRecord.java
查看文件 @
0cce2f6
...
...
@@ -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)"
)
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/DangerInspectionRecordServiceImpl.java
查看文件 @
0cce2f6
...
...
@@ -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!
Cancel
请
注册
或
登录
后发表评论