Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
f4d0b938
由
康伟
编写于
2024-09-25 18:28:32 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei : 隐患排查统计接口
1 个父辈
2b1b530a
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
91 行增加
和
5 行删除
sk-module-biz/src/main/java/com/skua/modules/safe/controller/app/APPDangerInspectionRecordController.java
sk-module-biz/src/main/java/com/skua/modules/safe/mapper/DangerInspectionRecordMapper.java
sk-module-biz/src/main/java/com/skua/modules/safe/mapper/xml/DangerInspectionRecordMapper.xml
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/DangerInspectionRecordServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/safe/vo/DangerInspectionRecordVO.java
sk-module-biz/src/main/java/com/skua/modules/safe/vo/InspectionRecordStatisticsVO.java
sk-module-equipment/src/main/java/com/skua/modules/supplies/controller/web/EquipmentSparepartSuppliesController.java
sk-module-biz/src/main/java/com/skua/modules/safe/controller/app/APPDangerInspectionRecordController.java
查看文件 @
f4d0b93
...
...
@@ -13,6 +13,7 @@ import com.skua.modules.safe.service.IDangerInspectionItemService;
import
com.skua.modules.safe.service.IDangerInspectionRecordService
;
import
com.skua.modules.safe.vo.DangerInspectionRecordVO
;
import
com.skua.modules.safe.vo.DangerLevelManageVO
;
import
com.skua.modules.safe.vo.InspectionRecordStatisticsVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -67,6 +68,15 @@ public class APPDangerInspectionRecordController {
if
(
StringUtils
.
isNotBlank
(
dangerInspectionRecord
.
getEndTime
())){
queryWrapper
.
le
(
"report_date"
,
dangerInspectionRecord
.
getEndTime
()
)
;
}
if
(
StringUtils
.
isNotBlank
(
dangerInspectionRecord
.
getDangerName
())){
queryWrapper
.
like
(
"danger_name"
,
dangerInspectionRecord
.
getDangerName
()
)
;
}
if
(
StringUtils
.
isNotBlank
(
dangerInspectionRecord
.
getStatus
())){
queryWrapper
.
eq
(
"status"
,
dangerInspectionRecord
.
getStatus
()
)
;
}
if
(
StringUtils
.
isNotBlank
(
dangerInspectionRecord
.
getStartTime
())){
queryWrapper
.
ge
(
"report_date"
,
dangerInspectionRecord
.
getStartTime
()
)
;
}
// queryWrapper.eq("report_user", BaseContextHandler.getUserId());
IPage
<
DangerInspectionRecord
>
pageList
=
dangerInspectionRecordService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
...
...
@@ -98,6 +108,18 @@ public class APPDangerInspectionRecordController {
}
return
result
;
}
//Statistics
@AutoLog
(
value
=
"隐患排查记录:根据风险点统计记录"
)
@ApiOperation
(
value
=
"隐患排查记录:根据风险点统计记录"
,
notes
=
"隐患排查记录:根据风险点统计记录"
)
@GetMapping
(
value
=
"/statistics"
)
public
Result
<
InspectionRecordStatisticsVO
>
statistics
(
@RequestParam
(
name
=
"dangerId"
)
String
dangerId
)
{
Result
<
InspectionRecordStatisticsVO
>
result
=
new
Result
<
InspectionRecordStatisticsVO
>();
InspectionRecordStatisticsVO
statisticsVO
=
inspectionRecordService
.
queryByStatistics
(
dangerId
);
result
.
setResult
(
statisticsVO
);
result
.
setSuccess
(
true
);
return
result
;
}
}
\ No newline at end of file
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/mapper/DangerInspectionRecordMapper.java
查看文件 @
f4d0b93
...
...
@@ -3,6 +3,7 @@ package com.skua.modules.safe.mapper;
import
java.util.List
;
import
com.skua.modules.safe.vo.DangerLevelManageVO
;
import
com.skua.modules.safe.vo.InspectionRecordStatisticsVO
;
import
org.apache.ibatis.annotations.Param
;
import
com.skua.modules.safe.entity.DangerInspectionRecord
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -24,4 +25,11 @@ public interface DangerInspectionRecordMapper extends BaseMapper<DangerInspectio
* @return
*/
public
DangerLevelManageVO
queryDangerLevelAndInspectionRecord
(
@Param
(
"inspectionRecordId"
)
String
inspectionRecordId
);
/***
* 根据风险点统计记录
* @param dangerId
* @return
*/
public
InspectionRecordStatisticsVO
queryByStatistics
(
@Param
(
"dangerId"
)
String
dangerId
);
}
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/mapper/xml/DangerInspectionRecordMapper.xml
查看文件 @
f4d0b93
...
...
@@ -12,4 +12,13 @@
where ir.id = #{inspectionRecordId}
</select>
<!-- 根据风险点统计记录 -->
<select
id=
"queryByStatistics"
resultType=
"com.skua.modules.safe.vo.InspectionRecordStatisticsVO"
>
select
(select count(1) from danger_inspection_record t1 where t1.danger_id =#{dangerId}) as 'total_num',
(select count(1) from danger_inspection_record t2 where t2.status = 1 and t2.danger_id =#{dangerId}) as 'un_complete_num',
(select count(1) from danger_inspection_record t3 where t3.status = 2 and t3.danger_id =#{dangerId}) as 'complete_num'
from dual
</select>
</mapper>
\ No newline at end of file
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/service/IDangerInspectionRecordService.java
查看文件 @
f4d0b93
...
...
@@ -5,6 +5,7 @@ import com.skua.modules.safe.entity.DangerInspectionRecord;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.skua.modules.safe.entity.DangerLevelManage
;
import
com.skua.modules.safe.vo.DangerLevelManageVO
;
import
com.skua.modules.safe.vo.InspectionRecordStatisticsVO
;
import
java.util.List
;
...
...
@@ -53,4 +54,11 @@ public interface IDangerInspectionRecordService extends IService<DangerInspectio
* @return
*/
public
DangerLevelManageVO
queryListByRecordId
(
String
inspectionRecordId
);
/***
* 根据风险点统计记录
* @param dangerId
* @return
*/
public
InspectionRecordStatisticsVO
queryByStatistics
(
String
dangerId
);
}
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/DangerInspectionRecordServiceImpl.java
查看文件 @
f4d0b93
...
...
@@ -7,6 +7,7 @@ import com.skua.modules.safe.entity.*;
import
com.skua.modules.safe.mapper.*
;
import
com.skua.modules.safe.service.IDangerInspectionRecordService
;
import
com.skua.modules.safe.vo.DangerLevelManageVO
;
import
com.skua.modules.safe.vo.InspectionRecordStatisticsVO
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -259,5 +260,12 @@ public class DangerInspectionRecordServiceImpl extends ServiceImpl<DangerInspect
return
dangerLevelManageVO
;
}
/***
* 根据风险点统计记录
* @param dangerId
* @return
*/
public
InspectionRecordStatisticsVO
queryByStatistics
(
String
dangerId
){
return
this
.
baseMapper
.
queryByStatistics
(
dangerId
);
}
}
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/vo/DangerInspectionRecordVO.java
查看文件 @
f4d0b93
...
...
@@ -27,9 +27,18 @@ public class DangerInspectionRecordVO {
@ApiModelProperty
(
value
=
"风险等级编号"
)
private
String
dangerId
;
@ApiModelProperty
(
value
=
"巡检记录编号"
)
private
String
inspectionRecord
;
@Excel
(
name
=
"风险等级名称"
,
width
=
15
)
@ApiModelProperty
(
value
=
"风险等级名称"
)
private
String
dangerName
;
@ApiModelProperty
(
value
=
"巡检状态(1:开始,2:结束)"
)
private
String
status
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"条件:开始时间"
)
private
String
startTime
;
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/vo/InspectionRecordStatisticsVO.java
0 → 100644
查看文件 @
f4d0b93
package
com
.
skua
.
modules
.
safe
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
/**
* @auther kangwei
* @create 2024-09-25-18:03
*/
@Data
@ApiModel
(
value
=
"InspectionRecord 隐患排查统计对象"
,
description
=
"隐患排查统计对象"
)
public
class
InspectionRecordStatisticsVO
{
@ApiModelProperty
(
value
=
"全部数据"
)
private
Integer
totalNum
;
@ApiModelProperty
(
value
=
"未完成数量"
)
private
Integer
unCompleteNum
;
//未处理数量
@ApiModelProperty
(
value
=
"完成数量"
)
private
Integer
completeNum
;
//已经处理数据
}
sk-module-equipment/src/main/java/com/skua/modules/supplies/controller/web/EquipmentSparepartSuppliesController.java
查看文件 @
f4d0b93
...
...
@@ -91,7 +91,6 @@ public class EquipmentSparepartSuppliesController {
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料信息表-分页列表查询"
)
@ApiOperation
(
value
=
"物料信息表-分页列表查询"
,
notes
=
"物料信息表-分页列表查询"
)
@GetMapping
(
value
=
"/list"
)
...
...
@@ -214,11 +213,9 @@ public class EquipmentSparepartSuppliesController {
}
supplies
.
setStorageNum
(
BigDecimal
.
valueOf
(
totalSum
));
}
}
return
equipmentSparepartSuppliesVOS
;
}
/**
* <pre>
* 添加
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论