Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
H
hzsomms
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZTGK
hzsomms
Commits
1d0f6df4
Commit
1d0f6df4
authored
Sep 04, 2023
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 1.设备病例本
parent
fd7f86b6
Changes
38
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
1373 additions
and
64 deletions
+1373
-64
InitData.java
...-system/src/main/java/org/jeecg/config/init/InitData.java
+8
-0
MovementRecordsMasterController.java
...checkData/controller/MovementRecordsMasterController.java
+47
-60
MovementCheckDataUnitDeviceMap.java
...ules/checkData/entity/MovementCheckDataUnitDeviceMap.java
+1
-0
MovementTqiReportUnitDeviceMap.java
...ules/checkData/entity/MovementTqiReportUnitDeviceMap.java
+8
-0
MovementRecordsMasterFace.java
...ecg/modules/checkData/face/MovementRecordsMasterFace.java
+19
-0
MovementRecordsMasterFaceImpl.java
...es/checkData/face/impl/MovementRecordsMasterFaceImpl.java
+132
-0
MovementAdditiveInfoUnitDeviceMapMapper.java
...kData/mapper/MovementAdditiveInfoUnitDeviceMapMapper.java
+5
-1
MovementCheckDataUnitDeviceMapMapper.java
...heckData/mapper/MovementCheckDataUnitDeviceMapMapper.java
+9
-0
MovementOverReportUnitDeviceMapMapper.java
...eckData/mapper/MovementOverReportUnitDeviceMapMapper.java
+4
-0
MovementTqiReportUnitDeviceMapMapper.java
...heckData/mapper/MovementTqiReportUnitDeviceMapMapper.java
+4
-0
MovementAdditiveInfoUnitDeviceMapMapper.xml
...ta/mapper/xml/MovementAdditiveInfoUnitDeviceMapMapper.xml
+28
-0
MovementCheckDataUnitDeviceMapMapper.xml
...kData/mapper/xml/MovementCheckDataUnitDeviceMapMapper.xml
+114
-0
MovementOverReportUnitDeviceMapMapper.xml
...Data/mapper/xml/MovementOverReportUnitDeviceMapMapper.xml
+29
-0
MovementTqiReportUnitDeviceMapMapper.xml
...kData/mapper/xml/MovementTqiReportUnitDeviceMapMapper.xml
+38
-0
IMovementAdditiveInfoUnitDeviceMapService.java
...ta/service/IMovementAdditiveInfoUnitDeviceMapService.java
+5
-1
IMovementCheckDataUnitDeviceMapService.java
...kData/service/IMovementCheckDataUnitDeviceMapService.java
+9
-0
IMovementOverReportUnitDeviceMapService.java
...Data/service/IMovementOverReportUnitDeviceMapService.java
+4
-0
IMovementTqiReportUnitDeviceMapService.java
...kData/service/IMovementTqiReportUnitDeviceMapService.java
+4
-0
MovementAdditiveInfoUnitDeviceMapServiceImpl.java
...ce/impl/MovementAdditiveInfoUnitDeviceMapServiceImpl.java
+7
-0
MovementCheckDataUnitDeviceMapServiceImpl.java
...rvice/impl/MovementCheckDataUnitDeviceMapServiceImpl.java
+16
-1
MovementOverReportUnitDeviceMapServiceImpl.java
...vice/impl/MovementOverReportUnitDeviceMapServiceImpl.java
+7
-0
MovementTqiReportUnitDeviceMapServiceImpl.java
...rvice/impl/MovementTqiReportUnitDeviceMapServiceImpl.java
+7
-0
RedisConstant.java
...c/main/java/org/jeecg/modules/constant/RedisConstant.java
+7
-0
ConfigGradeLimit.java
...odules/dynamicStaticAnalysis/entity/ConfigGradeLimit.java
+1
-1
WorkBatchDetailVO.java
...g/jeecg/modules/maintenanceWork/vo/WorkBatchDetailVO.java
+1
-0
UnitDeviceController.java
...g/modules/unitDevice/controller/UnitDeviceController.java
+94
-0
CaseReportCheckDataDTO.java
.../jeecg/modules/unitDevice/dto/CaseReportCheckDataDTO.java
+15
-0
IUnitDeviceFace.java
...va/org/jeecg/modules/unitDevice/face/IUnitDeviceFace.java
+26
-0
UnitDeviceFaceImpl.java
...eecg/modules/unitDevice/face/impl/UnitDeviceFaceImpl.java
+113
-0
CaseReportCheckDataDetailVO.java
...cg/modules/unitDevice/vo/CaseReportCheckDataDetailVO.java
+29
-0
CaseReportCheckDataVO.java
...rg/jeecg/modules/unitDevice/vo/CaseReportCheckDataVO.java
+105
-0
CaseReportUnitScoreVO.java
...rg/jeecg/modules/unitDevice/vo/CaseReportUnitScoreVO.java
+25
-0
CaseReportWorkBatchVO.java
...rg/jeecg/modules/unitDevice/vo/CaseReportWorkBatchVO.java
+9
-0
RailAddInstrumentCheckVO.java
...jeecg/modules/unitDevice/vo/RailAddInstrumentCheckVO.java
+75
-0
RailVehicleCheckVO.java
...a/org/jeecg/modules/unitDevice/vo/RailVehicleCheckVO.java
+92
-0
RailVehicleTqiVO.java
...ava/org/jeecg/modules/unitDevice/vo/RailVehicleTqiVO.java
+110
-0
StaticCheckVO.java
...n/java/org/jeecg/modules/unitDevice/vo/StaticCheckVO.java
+108
-0
RedisLockUtil.java
.../src/main/java/org/jeecg/modules/utils/RedisLockUtil.java
+58
-0
No files found.
jeecg-module-system/src/main/java/org/jeecg/config/init/InitData.java
View file @
1d0f6df4
...
...
@@ -7,8 +7,11 @@ import org.jeecg.modules.deviceAsset.service.IVerticalCurveManagementService;
import
org.jeecg.modules.dynamicStaticAnalysis.algorithm.AnalysisAlgorithm
;
import
org.jeecg.modules.dynamicStaticAnalysis.algorithm.SingleConsumer
;
import
org.jeecg.modules.subwayNetwork.service.ILineAliasService
;
import
org.jeecg.modules.utils.RedisLockUtil
;
import
org.jeecg.modules.utils.UnitCodeUtil
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
...
...
@@ -37,6 +40,9 @@ public class InitData implements InitializingBean {
@Resource
private
AnalysisAlgorithm
analysisAlgorithm
;
@Resource
private
RedisTemplate
<
String
,
Object
>
redisTemplate
;
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
UnitCodeUtil
.
setService
(
lineAliasService
,
...
...
@@ -45,6 +51,8 @@ public class InitData implements InitializingBean {
verticalCurveManagementService
,
railManagementService
);
RedisLockUtil
.
setService
(
redisTemplate
);
SingleConsumer
.
setService
(
analysisAlgorithm
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/controller/MovementRecordsMasterController.java
View file @
1d0f6df4
This diff is collapsed.
Click to expand it.
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/entity/MovementCheckDataUnitDeviceMap.java
View file @
1d0f6df4
...
...
@@ -85,6 +85,7 @@ public class MovementCheckDataUnitDeviceMap implements Serializable {
@TableField
(
"check_id"
)
private
String
checkId
;
@ApiModelProperty
(
"检查项目id[注:轨检车是tqi的id]"
)
@TableField
(
"check_item_id"
)
private
String
checkItemId
;
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/entity/MovementTqiReportUnitDeviceMap.java
View file @
1d0f6df4
...
...
@@ -57,24 +57,32 @@ public class MovementTqiReportUnitDeviceMap implements Serializable {
@TableField
(
"check_type"
)
private
Integer
checkType
;
@ApiModelProperty
(
"设备单元id"
)
@TableField
(
"unit_id"
)
private
String
unitId
;
@ApiModelProperty
(
"设备单元编码"
)
@TableField
(
"unit_code"
)
private
String
unitCode
;
@ApiModelProperty
(
"设备单元类型1-钢轨,2-曲线,3-竖曲线,4-道岔"
)
@TableField
(
"unit_type"
)
private
Integer
unitType
;
@ApiModelProperty
(
"设备单元类型名称"
)
@TableField
(
"unit_type_name"
)
private
String
unitTypeName
;
@ApiModelProperty
(
"设备单元起始里程"
)
@TableField
(
"unit_starting_mileage"
)
private
BigDecimal
unitStartingMileage
;
@ApiModelProperty
(
"设备单元中心里程"
)
@TableField
(
"unit_center_mileage"
)
private
BigDecimal
unitCenterMileage
;
@ApiModelProperty
(
"设备单元终点里程"
)
@TableField
(
"unit_end_mileage"
)
private
BigDecimal
unitEndMileage
;
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/face/MovementRecordsMasterFace.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
checkData
.
face
;
import
org.jeecg.modules.checkData.entity.MovementCourse
;
public
interface
MovementRecordsMasterFace
{
/**
* 保存人工检查项目
*
* @param record
*/
void
saveLabourCheckItem
(
MovementCourse
record
);
/**
* 更新人工检查项目
*
* @param record
*/
void
updateLabourCheckItem
(
MovementCourse
record
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/face/impl/MovementRecordsMasterFaceImpl.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
checkData
.
face
.
impl
;
import
org.jeecg.common.util.UUIDGenerator
;
import
org.jeecg.modules.checkData.entity.MovementCourse
;
import
org.jeecg.modules.checkData.entity.MovementCourseInfo
;
import
org.jeecg.modules.checkData.face.MovementRecordsMasterFace
;
import
org.jeecg.modules.checkData.service.IMovementCourseInfoService
;
import
org.jeecg.modules.checkData.service.IMovementCourseService
;
import
org.jeecg.modules.utils.RedisLockUtil
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collector
;
import
java.util.stream.Collectors
;
@Service
public
class
MovementRecordsMasterFaceImpl
implements
MovementRecordsMasterFace
{
@Resource
private
IMovementCourseService
movementCourseService
;
@Resource
private
IMovementCourseInfoService
movementCourseInfoService
;
@Override
public
void
saveLabourCheckItem
(
MovementCourse
record
)
{
// 保存人工项目检查表
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setDelFlag
(
"0"
);
movementCourseService
.
save
(
record
);
// 初始化下面的格子模板
List
<
MovementCourseInfo
>
movementCourseInfos
=
new
ArrayList
<>();
int
measurePoint
=
1
;
String
trackCode
=
"1"
;
for
(
int
i
=
0
;
i
<
24
;
i
++)
{
MovementCourseInfo
movementCourseInfo
=
new
MovementCourseInfo
();
movementCourseInfo
.
setMovementMasterId
(
record
.
getMovementMasterId
());
movementCourseInfo
.
setMovementCourseId
(
record
.
getId
());
movementCourseInfo
.
setMeasurePoint
(
measurePoint
);
movementCourseInfo
.
setInfoSort
(
i
+
1
);
movementCourseInfo
.
setDelFlag
(
"0"
);
movementCourseInfo
.
setTrackCode
(
trackCode
);
if
(
measurePoint
%
8
==
0
)
{
measurePoint
=
1
;
trackCode
=
String
.
valueOf
(
Integer
.
valueOf
(
trackCode
)
+
1
);
}
else
{
measurePoint
++;
}
movementCourseInfos
.
add
(
movementCourseInfo
);
}
movementCourseInfoService
.
saveBatch
(
movementCourseInfos
);
/**
* 人工检查数据排序
*/
labourCheckItemSort
(
record
.
getMovementMasterId
());
/**
* 人工检查数据单元设备映射
*/
labourCheckMappingUnitDevice
(
record
.
getMovementMasterId
());
}
@Override
public
void
updateLabourCheckItem
(
MovementCourse
record
)
{
}
/**
* 人工检查数据映射单元设备
*
* @param movementMasterId
*/
private
void
labourCheckMappingUnitDevice
(
String
movementMasterId
)
{
}
/**
* 人工检查数据
*
* @param movementMasterId
*/
private
void
labourCheckItemSort
(
String
movementMasterId
)
{
// 检查项目list
List
<
MovementCourse
>
movementCourseList
=
movementCourseService
.
lambdaQuery
()
.
eq
(
MovementCourse:
:
getMovementMasterId
,
movementMasterId
)
.
orderByAsc
(
MovementCourse:
:
getCourseStartingMileage
)
.
list
();
// 检查项目明细list
List
<
MovementCourseInfo
>
movementCourseInfoList
=
movementCourseInfoService
.
lambdaQuery
()
.
eq
(
MovementCourseInfo:
:
getMovementMasterId
,
movementMasterId
)
.
orderByAsc
(
MovementCourseInfo:
:
getInfoSort
)
.
list
();
Map
<
String
,
List
<
MovementCourseInfo
>>
movementCourseInfoMap
=
movementCourseInfoList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
MovementCourseInfo:
:
getMovementCourseId
));
for
(
int
i
=
0
;
i
<
movementCourseList
.
size
();
i
++)
{
int
sort
=
i
+
1
;
MovementCourse
movementCourse
=
movementCourseList
.
get
(
i
);
movementCourse
.
setSort
(
sort
);
// 修改明细的轨号
List
<
MovementCourseInfo
>
movementCourseInfos
=
movementCourseInfoMap
.
get
(
movementCourse
.
getId
());
int
incr
=
2
;
int
currentCheckNum
=
i
+
1
;
String
trackCode
=
String
.
valueOf
(
currentCheckNum
*
3
-
incr
);
for
(
int
j
=
0
;
j
<
movementCourseInfos
.
size
();
j
++)
{
if
(
j
!=
0
&&
j
%
8
==
0
)
{
incr
=
incr
-
1
;
trackCode
=
String
.
valueOf
(
currentCheckNum
*
3
-
incr
);
}
MovementCourseInfo
movementCourseInfo
=
movementCourseInfos
.
get
(
j
);
movementCourseInfo
.
setTrackCode
(
trackCode
);
}
}
movementCourseService
.
updateBatchById
(
movementCourseList
);
movementCourseInfoService
.
updateBatchById
(
movementCourseInfoList
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/mapper/MovementAdditiveInfoUnitDeviceMapMapper.java
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
checkData
.
mapper
;
import
org.jeecg.modules.checkData.entity.MovementAdditiveInfoUnitDeviceMap
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.jeecg.modules.checkData.entity.MovementAdditiveInfoUnitDeviceMap
;
import
org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO
;
import
java.util.List
;
/**
* <p>
...
...
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
MovementAdditiveInfoUnitDeviceMapMapper
extends
BaseMapper
<
MovementAdditiveInfoUnitDeviceMap
>
{
List
<
RailAddInstrumentCheckVO
>
getUnitDeviceData
(
String
unitDeviceId
,
int
unitDeviceType
,
String
checkId
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/mapper/MovementCheckDataUnitDeviceMapMapper.java
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
checkData
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.jeecg.modules.checkData.entity.MovementCheckDataUnitDeviceMap
;
import
org.jeecg.modules.unitDevice.dto.CaseReportCheckDataDTO
;
import
org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO
;
import
org.jeecg.modules.unitDevice.vo.StaticCheckVO
;
import
java.util.List
;
/**
* <p>
...
...
@@ -13,4 +19,7 @@ import org.jeecg.modules.checkData.entity.MovementCheckDataUnitDeviceMap;
*/
public
interface
MovementCheckDataUnitDeviceMapMapper
extends
BaseMapper
<
MovementCheckDataUnitDeviceMap
>
{
List
<
StaticCheckVO
>
getUnitDeviceData
(
String
unitDeviceId
,
int
unitDeviceType
,
int
checkType
,
String
checkId
);
Page
<
CaseReportCheckDataVO
>
queryUnitDeviceCheckRel
(
Page
<
CaseReportCheckDataVO
>
pageData
,
CaseReportCheckDataDTO
dto
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/mapper/MovementOverReportUnitDeviceMapMapper.java
View file @
1d0f6df4
...
...
@@ -2,6 +2,9 @@ package org.jeecg.modules.checkData.mapper;
import
org.jeecg.modules.checkData.entity.MovementOverReportUnitDeviceMap
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.jeecg.modules.unitDevice.vo.RailVehicleCheckVO
;
import
java.util.List
;
/**
* <p>
...
...
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
MovementOverReportUnitDeviceMapMapper
extends
BaseMapper
<
MovementOverReportUnitDeviceMap
>
{
List
<
RailVehicleCheckVO
>
getUnitDeviceData
(
String
unitDeviceId
,
int
unitDeviceType
,
String
checkId
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/mapper/MovementTqiReportUnitDeviceMapMapper.java
View file @
1d0f6df4
...
...
@@ -2,6 +2,9 @@ package org.jeecg.modules.checkData.mapper;
import
org.jeecg.modules.checkData.entity.MovementTqiReportUnitDeviceMap
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.jeecg.modules.unitDevice.vo.RailVehicleTqiVO
;
import
java.util.List
;
/**
* <p>
...
...
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
MovementTqiReportUnitDeviceMapMapper
extends
BaseMapper
<
MovementTqiReportUnitDeviceMap
>
{
List
<
RailVehicleTqiVO
>
getUnitDeviceData
(
String
unitDeviceId
,
int
unitDeviceType
,
String
checkId
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/mapper/xml/MovementAdditiveInfoUnitDeviceMapMapper.xml
View file @
1d0f6df4
...
...
@@ -2,4 +2,32 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.jeecg.modules.checkData.mapper.MovementAdditiveInfoUnitDeviceMapMapper"
>
<select
id=
"getUnitDeviceData"
resultType=
"org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO"
>
SELECT t1.id,
t1.movement_master_id checkId,
t2.ek_code checkCode,
t1.unit_id,
t1.unit_code,
t1.unit_device_code,
t1.unit_type,
t1.unit_type_name,
t1.unit_start_mileage,
t1.unit_center_mileage,
t1.unit_end_mileage,
t1.point_mileage,
t1.zontal_speed,
t1.zontal_speed_level,
t1.vertical_speed,
t1.vertical_speed_level,
t1.speed,
t1.mark,
t1.del_flag,
t1.info_sort
FROM t_djt_movement_additive_info_unit_device_map t1
LEFT JOIN t_djt_movement_records_master t2 ON t1.movement_master_id = t2.id
WHERE t1.unit_id = #{unitDeviceId}
AND t1.unit_type = #{unitDeviceType}
AND t1.movement_master_id = #{checkId}
ORDER BY t2.ek_code ASC
</select>
</mapper>
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/mapper/xml/MovementCheckDataUnitDeviceMapMapper.xml
View file @
1d0f6df4
...
...
@@ -2,4 +2,118 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.jeecg.modules.checkData.mapper.MovementCheckDataUnitDeviceMapMapper"
>
<select
id=
"getUnitDeviceData"
resultType=
"org.jeecg.modules.unitDevice.vo.StaticCheckVO"
>
SELECT t1.id,
t1.unit_id,
t1.unit_code,
t1.unit_type,
t1.unit_type_name,
t1.unit_starting_mileage,
t1.unit_center_mileage,
t1.unit_end_mileage,
t1.check_type,
t1.check_id,
t2.ek_code check_code,
t1.check_item_id,
t1.check_item_starting_mileage,
t1.check_item_end_mileage,
t1.check_item_text,
t1.check_detail_id,
t1.check_detail_starting_mileage,
t1.check_detail_end_mileage,
t1.measure_point,
t1.track_gauge,
t1.level,
t1.triangular_pit,
t1.direction,
t1.height,
t1.structure,
t1.rectification,
t1.remark
FROM t_djt_movement_check_data_unit_device_map t1
LEFT JOIN t_djt_movement_records_master t2 ON t1.check_id = t2.id
WHERE t1.unit_id = #{unitDeviceId}
AND t1.unit_type = #{unitDeviceType}
AND t1.check_type = #{checkType}
and t1.check_id = #{checkId}
ORDER BY t2.ek_code ASC
</select>
<select
id=
"queryUnitDeviceCheckRel"
resultType=
"org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO"
>
SELECT t1.unit_id,
t1.unit_type,
t1.unit_code,
t2.id checkId,
t2.type,
t2.ek_code checkCode,
t2.track_code,
t2.work_code,
t2.subway_section_id,
t2.subway_section_name,
t2.light_rail_id,
t2.light_rail_name,
t2.line_alias_id,
t2.line_alias_name,
t2.starting_mileage,
t2.end_mileage,
t2.start_level,
t2.end_level,
t2.direction,
t2.rail_num,
t2.curve_num,
t2.vertical_curve_num,
t2.switch_num,
t2.check_by,
t2.check_time,
t2.verify_by,
t2.verify_time,
t2.print_time,
t2.remark,
t2.del_flag
FROM (SELECT unit_id,
unit_type,
unit_code,
check_id
FROM (SELECT unit_id,
unit_type,
unit_code,
check_id
FROM t_djt_movement_check_data_unit_device_map
GROUP BY unit_id,
unit_type,
check_id
UNION ALL
SELECT unit_id,
unit_type,
unit_code,
movement_master_id check_id
FROM t_djt_movement_additive_info_unit_device_map
GROUP BY unit_id,
unit_type,
movement_master_id
UNION ALL
SELECT unit_id,
unit_type,
unit_code,
check_id
FROM t_djt_movement_over_report_unit_device_map
GROUP BY unit_id,
unit_type,
check_id
UNION ALL
SELECT unit_id,
unit_type,
unit_code,
check_id
FROM t_djt_movement_tqi_report_unit_device_map
GROUP BY unit_id,
unit_type,
check_id) t
GROUP BY unit_id,
check_id) t1
LEFT JOIN t_djt_movement_records_master t2 ON t1.check_id = t2.id
AND t2.del_flag = '0'
WHERE t1.unit_id = #{dto.unitId}
AND t1.unit_type = #{dto.unitType}
ORDER BY t2.create_time
</select>
</mapper>
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/mapper/xml/MovementOverReportUnitDeviceMapMapper.xml
View file @
1d0f6df4
...
...
@@ -2,4 +2,33 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.jeecg.modules.checkData.mapper.MovementOverReportUnitDeviceMapMapper"
>
<select
id=
"getUnitDeviceData"
resultType=
"org.jeecg.modules.unitDevice.vo.RailVehicleCheckVO"
>
SELECT t1.id,
t1.unit_id,
t1.unit_code,
t1.unit_type,
t1.unit_type_name,
t1.unit_starting_mileage,
t1.unit_center_mileage,
t1.unit_end_mileage,
t1.check_id,
t2.ek_code checkCode,
t1.check_type,
t1.over_report_id,
t1.over_report_mileage,
t1.over_type,
t1.over_level,
t1.peak_value,
t1.data_difference,
t1.xianxing,
t1.standard,
t1.spend,
t1.remark
FROM t_djt_movement_over_report_unit_device_map t1
LEFT JOIN t_djt_movement_records_master t2 ON t1.check_id = t2.id
WHERE t1.unit_id = #{unitDeviceId}
AND t1.unit_type = #{unitDeviceType}
AND t1.check_id = #{checkId}
ORDER BY t2.ek_code ASC
</select>
</mapper>
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/mapper/xml/MovementTqiReportUnitDeviceMapMapper.xml
View file @
1d0f6df4
...
...
@@ -2,4 +2,42 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.jeecg.modules.checkData.mapper.MovementTqiReportUnitDeviceMapMapper"
>
<select
id=
"getUnitDeviceData"
resultType=
"org.jeecg.modules.unitDevice.vo.RailVehicleTqiVO"
>
SELECT t1.id,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.check_id,
t1.check_type,
t1.unit_id,
t1.unit_code,
t1.unit_type,
t1.unit_type_name,
t1.unit_starting_mileage,
t1.unit_center_mileage,
t1.unit_end_mileage,
t1.tqi_report_id,
t1.start_mileage,
t1.end_mileage,
t1.section_name,
t1.high_low_left,
t1.high_low_right,
t1.track_left,
t1.track_right,
t1.level,
t1.track_gauge,
t1.triangular_pit,
t1.tqi_come_upon,
t1.tqi_above_standard,
t1.deduct,
t1.standard,
t1.spend
FROM t_djt_movement_tqi_report_unit_device_map t1
LEFT JOIN t_djt_movement_records_master t2 ON t1.check_id = t2.id
WHERE t1.unit_id = #{unitDeviceId}
AND t1.unit_type = #{unitDeviceType}
AND t1.check_id = #{checkId}
ORDER BY t2.ek_code ASC
</select>
</mapper>
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/service/IMovementAdditiveInfoUnitDeviceMapService.java
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
checkData
.
service
;
import
org.jeecg.modules.checkData.entity.MovementAdditiveInfoUnitDeviceMap
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.modules.checkData.entity.MovementAdditiveInfoUnitDeviceMap
;
import
org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO
;
import
java.util.List
;
/**
* <p>
...
...
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
IMovementAdditiveInfoUnitDeviceMapService
extends
IService
<
MovementAdditiveInfoUnitDeviceMap
>
{
List
<
RailAddInstrumentCheckVO
>
getUnitDeviceData
(
String
unitDeviceId
,
int
unitDeviceType
,
String
checkId
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/service/IMovementCheckDataUnitDeviceMapService.java
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
checkData
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.jeecg.modules.checkData.entity.MovementCheckDataUnitDeviceMap
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.modules.unitDevice.dto.CaseReportCheckDataDTO
;
import
org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO
;
import
org.jeecg.modules.unitDevice.vo.StaticCheckVO
;
import
java.util.List
;
/**
* <p>
...
...
@@ -13,4 +19,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
IMovementCheckDataUnitDeviceMapService
extends
IService
<
MovementCheckDataUnitDeviceMap
>
{
List
<
StaticCheckVO
>
getUnitDeviceData
(
String
unitDeviceId
,
int
unitDeviceType
,
int
checkType
,
String
checkId
);
Page
<
CaseReportCheckDataVO
>
queryUnitDeviceCheckRel
(
Page
<
CaseReportCheckDataVO
>
pageData
,
CaseReportCheckDataDTO
dto
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/service/IMovementOverReportUnitDeviceMapService.java
View file @
1d0f6df4
...
...
@@ -2,6 +2,9 @@ package org.jeecg.modules.checkData.service;
import
org.jeecg.modules.checkData.entity.MovementOverReportUnitDeviceMap
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.modules.unitDevice.vo.RailVehicleCheckVO
;
import
java.util.List
;
/**
* <p>
...
...
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
IMovementOverReportUnitDeviceMapService
extends
IService
<
MovementOverReportUnitDeviceMap
>
{
List
<
RailVehicleCheckVO
>
getUnitDeviceData
(
String
unitDeviceId
,
int
unitDeviceType
,
String
checkId
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/service/IMovementTqiReportUnitDeviceMapService.java
View file @
1d0f6df4
...
...
@@ -2,6 +2,9 @@ package org.jeecg.modules.checkData.service;
import
org.jeecg.modules.checkData.entity.MovementTqiReportUnitDeviceMap
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.modules.unitDevice.vo.RailVehicleTqiVO
;
import
java.util.List
;
/**
* <p>
...
...
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
IMovementTqiReportUnitDeviceMapService
extends
IService
<
MovementTqiReportUnitDeviceMap
>
{
List
<
RailVehicleTqiVO
>
getUnitDeviceData
(
String
unitDeviceId
,
int
unitDeviceType
,
String
checkId
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/service/impl/MovementAdditiveInfoUnitDeviceMapServiceImpl.java
View file @
1d0f6df4
...
...
@@ -4,8 +4,11 @@ import org.jeecg.modules.checkData.entity.MovementAdditiveInfoUnitDeviceMap;
import
org.jeecg.modules.checkData.mapper.MovementAdditiveInfoUnitDeviceMapMapper
;
import
org.jeecg.modules.checkData.service.IMovementAdditiveInfoUnitDeviceMapService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* <p>
* 动静态几何尺寸对应的添乘仪详情表 服务实现类
...
...
@@ -17,4 +20,8 @@ import org.springframework.stereotype.Service;
@Service
public
class
MovementAdditiveInfoUnitDeviceMapServiceImpl
extends
ServiceImpl
<
MovementAdditiveInfoUnitDeviceMapMapper
,
MovementAdditiveInfoUnitDeviceMap
>
implements
IMovementAdditiveInfoUnitDeviceMapService
{
@Override
public
List
<
RailAddInstrumentCheckVO
>
getUnitDeviceData
(
String
unitDeviceId
,
int
unitDeviceType
,
String
checkId
)
{
return
this
.
baseMapper
.
getUnitDeviceData
(
unitDeviceId
,
unitDeviceType
,
checkId
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/service/impl/MovementCheckDataUnitDeviceMapServiceImpl.java
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
checkData
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.modules.checkData.entity.MovementCheckDataUnitDeviceMap
;
import
org.jeecg.modules.checkData.mapper.MovementCheckDataUnitDeviceMapMapper
;
import
org.jeecg.modules.checkData.service.IMovementCheckDataUnitDeviceMapService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.modules.unitDevice.dto.CaseReportCheckDataDTO
;
import
org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO
;
import
org.jeecg.modules.unitDevice.vo.StaticCheckVO
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* <p>
* 动静态几何尺寸-检查数据单元映射表 服务实现类
...
...
@@ -17,4 +23,13 @@ import org.springframework.stereotype.Service;
@Service
public
class
MovementCheckDataUnitDeviceMapServiceImpl
extends
ServiceImpl
<
MovementCheckDataUnitDeviceMapMapper
,
MovementCheckDataUnitDeviceMap
>
implements
IMovementCheckDataUnitDeviceMapService
{
@Override
public
List
<
StaticCheckVO
>
getUnitDeviceData
(
String
unitDeviceId
,
int
unitDeviceType
,
int
checkType
,
String
checkId
)
{
return
this
.
baseMapper
.
getUnitDeviceData
(
unitDeviceId
,
unitDeviceType
,
checkType
,
checkId
);
}
@Override
public
Page
<
CaseReportCheckDataVO
>
queryUnitDeviceCheckRel
(
Page
<
CaseReportCheckDataVO
>
pageData
,
CaseReportCheckDataDTO
dto
)
{
return
this
.
baseMapper
.
queryUnitDeviceCheckRel
(
pageData
,
dto
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/service/impl/MovementOverReportUnitDeviceMapServiceImpl.java
View file @
1d0f6df4
...
...
@@ -4,8 +4,11 @@ import org.jeecg.modules.checkData.entity.MovementOverReportUnitDeviceMap;
import
org.jeecg.modules.checkData.mapper.MovementOverReportUnitDeviceMapMapper
;
import
org.jeecg.modules.checkData.service.IMovementOverReportUnitDeviceMapService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.modules.unitDevice.vo.RailVehicleCheckVO
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* <p>
* 动静态几何尺寸-轨检车单元设备映射 服务实现类
...
...
@@ -17,4 +20,8 @@ import org.springframework.stereotype.Service;
@Service
public
class
MovementOverReportUnitDeviceMapServiceImpl
extends
ServiceImpl
<
MovementOverReportUnitDeviceMapMapper
,
MovementOverReportUnitDeviceMap
>
implements
IMovementOverReportUnitDeviceMapService
{
@Override
public
List
<
RailVehicleCheckVO
>
getUnitDeviceData
(
String
unitDeviceId
,
int
unitDeviceType
,
String
checkId
)
{
return
this
.
baseMapper
.
getUnitDeviceData
(
unitDeviceId
,
unitDeviceType
,
checkId
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/service/impl/MovementTqiReportUnitDeviceMapServiceImpl.java
View file @
1d0f6df4
...
...
@@ -4,8 +4,11 @@ import org.jeecg.modules.checkData.entity.MovementTqiReportUnitDeviceMap;
import
org.jeecg.modules.checkData.mapper.MovementTqiReportUnitDeviceMapMapper
;
import
org.jeecg.modules.checkData.service.IMovementTqiReportUnitDeviceMapService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.modules.unitDevice.vo.RailVehicleTqiVO
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* <p>
* 轨检车-tqi单元总结报告和单元映射关联关系 服务实现类
...
...
@@ -17,4 +20,8 @@ import org.springframework.stereotype.Service;
@Service
public
class
MovementTqiReportUnitDeviceMapServiceImpl
extends
ServiceImpl
<
MovementTqiReportUnitDeviceMapMapper
,
MovementTqiReportUnitDeviceMap
>
implements
IMovementTqiReportUnitDeviceMapService
{
@Override
public
List
<
RailVehicleTqiVO
>
getUnitDeviceData
(
String
unitDeviceId
,
int
unitDeviceType
,
String
checkId
)
{
return
this
.
baseMapper
.
getUnitDeviceData
(
unitDeviceId
,
unitDeviceType
,
checkId
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/constant/RedisConstant.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
constant
;
/**
* redis常量工具类
*/
public
class
RedisConstant
{
}
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/entity/ConfigGradeLimit.java
View file @
1d0f6df4
...
...
@@ -81,7 +81,7 @@ public class ConfigGradeLimit implements Serializable {
@TableField
(
"grade_max"
)
private
BigDecimal
gradeMax
;
@ApiModelProperty
(
"设备类型 1-钢轨
2-道岔 3-曲线 4-竖曲线
"
)
@ApiModelProperty
(
"设备类型 1-钢轨
2-曲线 3-竖曲线 4-道岔
"
)
@TableField
(
"device_type"
)
private
Integer
deviceType
;
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/vo/WorkBatchDetailVO.java
View file @
1d0f6df4
...
...
@@ -57,6 +57,7 @@ public class WorkBatchDetailVO {
@ApiModelProperty
(
"设备单元起始里程"
)
private
BigDecimal
unitStartMileage
;
@ApiModelProperty
(
"设备单元中心里程"
)
private
BigDecimal
unitCenterMileage
;
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/unitDevice/controller/UnitDeviceController.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
unitDevice
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.aspect.annotation.AutoLog
;
import
org.jeecg.modules.unitDevice.dto.CaseReportCheckDataDTO
;
import
org.jeecg.modules.unitDevice.face.IUnitDeviceFace
;
import
org.jeecg.modules.unitDevice.vo.CaseReportCheckDataDetailVO
;
import
org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO
;
import
org.jeecg.modules.unitDevice.vo.CaseReportUnitScoreVO
;
import
org.jeecg.modules.unitDevice.vo.CaseReportWorkBatchVO
;
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.annotation.Resource
;
import
java.util.List
;
@Slf4j
@RestController
@RequestMapping
(
"/unitDevice/"
)
@Api
(
tags
=
"单元设备"
)
public
class
UnitDeviceController
{
@Resource
private
IUnitDeviceFace
unitDeviceFace
;
@AutoLog
(
value
=
"单元设备-检查数据列表"
)
@ApiOperation
(
value
=
"单元设备-检查数据列表"
,
notes
=
"单元设备-检查数据列表"
)
@GetMapping
(
value
=
"/queryPageList"
)
public
Result
<
IPage
<
CaseReportCheckDataVO
>>
queryPageList
(
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
CaseReportCheckDataDTO
dto
)
{
Page
<
CaseReportCheckDataVO
>
pageData
=
new
Page
<>(
pageNo
,
pageSize
);
pageData
=
unitDeviceFace
.
queryPageList
(
pageData
,
dto
);
return
Result
.
OK
(
pageData
);
}
@AutoLog
(
value
=
"单元设备-设备病历本检查数据"
)
@ApiOperation
(
value
=
"单元设备-设备病历本检查数据"
,
notes
=
"单元设备-设备病历本检查数据"
)
@GetMapping
(
value
=
"/caseReportCheckData"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"unitId"
,
value
=
"设备ID"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"unitType"
,
value
=
"设备类型 1-钢轨 2-曲线 3-竖曲线 4-道岔 "
,
required
=
true
),
@ApiImplicitParam
(
name
=
"checkId"
,
value
=
"检查id"
,
required
=
true
)
})
public
Result
<
CaseReportCheckDataDetailVO
>
caseReportCheckData
(
String
unitId
,
int
unitType
,
String
checkId
)
{
CaseReportCheckDataDetailVO
vo
=
unitDeviceFace
.
caseReportCheckData
(
unitId
,
unitType
,
checkId
);
return
Result
.
OK
(
vo
);
}
@AutoLog
(
value
=
"单元设备-设备病历本-单元得分列表"
)
@ApiOperation
(
value
=
"单元设备-设备病历本-单元得分列表"
,
notes
=
"单元设备-设备病历本-单元得分列表"
)
@GetMapping
(
value
=
"/caseReportUnitScore"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"unitId"
,
value
=
"设备ID"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"unitType"
,
value
=
"设备类型 1-钢轨 2-曲线 3-竖曲线 4-道岔 "
,
required
=
true
)
})
public
Result
<
List
<
CaseReportUnitScoreVO
>>
caseReportUnitScore
(
String
unitId
,
int
unitType
)
{
List
<
CaseReportUnitScoreVO
>
vo
=
unitDeviceFace
.
caseReportUnitScore
(
unitId
,
unitType
);
return
Result
.
OK
(
vo
);
}
@AutoLog
(
value
=
"单元设备-设备病历本-作业批次列表"
)
@ApiOperation
(
value
=
"单元设备-设备病历本-作业批次列表"
,
notes
=
"单元设备-设备病历本-作业批次列表"
)
@GetMapping
(
value
=
"/caseReportWorkBatch"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"unitId"
,
value
=
"设备ID"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"unitType"
,
value
=
"设备类型 1-钢轨 2-曲线 3-竖曲线 4-道岔 "
,
required
=
true
)
})
public
Result
<
List
<
CaseReportWorkBatchVO
>>
caseReportWorkBatch
(
String
unitId
,
int
unitType
)
{
List
<
CaseReportWorkBatchVO
>
vo
=
unitDeviceFace
.
caseReportWorkBatch
(
unitId
,
unitType
);
return
Result
.
OK
(
vo
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/unitDevice/dto/CaseReportCheckDataDTO.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
unitDevice
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"CaseReportCheckDataDTO对象"
,
description
=
"单元设备-病例报告检查数据列表"
)
public
class
CaseReportCheckDataDTO
{
@ApiModelProperty
(
"单元id"
)
private
String
unitId
;
@ApiModelProperty
(
"单元类型"
)
private
String
unitType
;
}
jeecg-module-system/src/main/java/org/jeecg/modules/unitDevice/face/IUnitDeviceFace.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
unitDevice
.
face
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.jeecg.modules.unitDevice.dto.CaseReportCheckDataDTO
;
import
org.jeecg.modules.unitDevice.vo.CaseReportCheckDataDetailVO
;
import
org.jeecg.modules.unitDevice.vo.CaseReportCheckDataVO
;
import
org.jeecg.modules.unitDevice.vo.CaseReportUnitScoreVO
;
import
org.jeecg.modules.unitDevice.vo.CaseReportWorkBatchVO
;
import
java.util.List
;
public
interface
IUnitDeviceFace
{
/**
* 病例报告-检查数据
*
* @param unitId
* @param unitType
*/
CaseReportCheckDataDetailVO
caseReportCheckData
(
String
unitId
,
int
unitType
,
String
checkId
);
Page
<
CaseReportCheckDataVO
>
queryPageList
(
Page
<
CaseReportCheckDataVO
>
pageData
,
CaseReportCheckDataDTO
dto
);
List
<
CaseReportUnitScoreVO
>
caseReportUnitScore
(
String
unitId
,
int
unitType
);
List
<
CaseReportWorkBatchVO
>
caseReportWorkBatch
(
String
unitId
,
int
unitType
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/unitDevice/face/impl/UnitDeviceFaceImpl.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
unitDevice
.
face
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.jeecg.modules.checkData.service.IMovementAdditiveInfoUnitDeviceMapService
;
import
org.jeecg.modules.checkData.service.IMovementCheckDataUnitDeviceMapService
;
import
org.jeecg.modules.checkData.service.IMovementOverReportUnitDeviceMapService
;
import
org.jeecg.modules.checkData.service.IMovementTqiReportUnitDeviceMapService
;
import
org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice
;
import
org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchUnitDeviceService
;
import
org.jeecg.modules.maintenanceWork.service.IWorkBatchDetailService
;
import
org.jeecg.modules.maintenanceWork.service.IWorkBatchService
;
import
org.jeecg.modules.unitDevice.dto.CaseReportCheckDataDTO
;
import
org.jeecg.modules.unitDevice.face.IUnitDeviceFace
;
import
org.jeecg.modules.unitDevice.vo.*
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
public
class
UnitDeviceFaceImpl
implements
IUnitDeviceFace
{
@Resource
private
IMovementCheckDataUnitDeviceMapService
movementCheckDataUnitDeviceMapService
;
@Resource
private
IMovementAdditiveInfoUnitDeviceMapService
movementAdditiveInfoUnitDeviceMapService
;
@Resource
private
IMovementOverReportUnitDeviceMapService
movementOverReportUnitDeviceMapService
;
@Resource
private
IMovementTqiReportUnitDeviceMapService
movementTqiReportUnitDeviceMapService
;
@Resource
private
IAnalysisBatchUnitDeviceService
analysisBatchUnitDeviceService
;
@Resource
private
IWorkBatchService
workBatchService
;
@Resource
private
IWorkBatchDetailService
workBatchDetailService
;
@Override
public
CaseReportCheckDataDetailVO
caseReportCheckData
(
String
unitId
,
int
unitType
,
String
checkId
)
{
CaseReportCheckDataDetailVO
vo
=
new
CaseReportCheckDataDetailVO
();
// 查询人工记录数据
List
<
StaticCheckVO
>
labourCheckVOList
=
movementCheckDataUnitDeviceMapService
.
getUnitDeviceData
(
unitId
,
unitType
,
1
,
checkId
);
vo
.
setLabourCheckVOList
(
labourCheckVOList
);
// 查询轨检仪记录数据
List
<
StaticCheckVO
>
railDeviceCheckVOList
=
movementCheckDataUnitDeviceMapService
.
getUnitDeviceData
(
unitId
,
unitType
,
2
,
checkId
);
vo
.
setRailDeviceCheckVOList
(
railDeviceCheckVOList
);
// 查询轨检车超限记录数据
List
<
RailVehicleCheckVO
>
railVehicleCheckVOList
=
movementOverReportUnitDeviceMapService
.
getUnitDeviceData
(
unitId
,
unitType
,
checkId
);
vo
.
setRailVehicleCheckVOList
(
railVehicleCheckVOList
);
// 查询轨检车TQI记录数据
List
<
RailVehicleTqiVO
>
railVehicleTqiVOList
=
movementTqiReportUnitDeviceMapService
.
getUnitDeviceData
(
unitId
,
unitType
,
checkId
);
vo
.
setRailVehicleTqiVOList
(
railVehicleTqiVOList
);
// 添乘仪记录数据
List
<
RailAddInstrumentCheckVO
>
railAddInstrumentCheckVOList
=
movementAdditiveInfoUnitDeviceMapService
.
getUnitDeviceData
(
unitId
,
unitType
,
checkId
);
vo
.
setRailAddInstrumentCheckVOList
(
railAddInstrumentCheckVOList
);
return
vo
;
}
@Override
public
Page
<
CaseReportCheckDataVO
>
queryPageList
(
Page
<
CaseReportCheckDataVO
>
pageData
,
CaseReportCheckDataDTO
dto
)
{
return
movementCheckDataUnitDeviceMapService
.
queryUnitDeviceCheckRel
(
pageData
,
dto
);
}
@Override
public
List
<
CaseReportUnitScoreVO
>
caseReportUnitScore
(
String
unitId
,
int
unitType
)
{
List
<
AnalysisBatchUnitDevice
>
records
=
analysisBatchUnitDeviceService
.
lambdaQuery
()
.
eq
(
AnalysisBatchUnitDevice:
:
getUnitId
,
unitId
)
.
eq
(
AnalysisBatchUnitDevice:
:
getUnitType
,
unitType
)
.
ne
(
AnalysisBatchUnitDevice:
:
getUnitScore
,
-
1
)
.
orderByAsc
(
AnalysisBatchUnitDevice:
:
getCreateTime
).
list
();
List
<
CaseReportUnitScoreVO
>
results
=
new
ArrayList
<>();
if
(
ObjectUtil
.
isNotEmpty
(
records
))
{
for
(
AnalysisBatchUnitDevice
record
:
records
)
{
CaseReportUnitScoreVO
result
=
new
CaseReportUnitScoreVO
();
result
.
setId
(
result
.
getId
());
result
.
setUnitScore
(
record
.
getUnitScore
());
result
.
setUnitScoreLevelStr
(
result
.
getUnitScoreLevelStr
());
result
.
setAnalysisTime
(
record
.
getCreateTime
());
}
}
return
results
;
}
@Override
public
List
<
CaseReportWorkBatchVO
>
caseReportWorkBatch
(
String
unitId
,
int
unitType
)
{
return
null
;
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/unitDevice/vo/CaseReportCheckDataDetailVO.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
unitDevice
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
@ApiModel
(
value
=
"CaseReportCheckDataDetailVO对象"
,
description
=
"单元设备-病例报告检查数据列表"
)
public
class
CaseReportCheckDataDetailVO
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"人工检查数据"
)
private
List
<
StaticCheckVO
>
labourCheckVOList
;
@ApiModelProperty
(
"轨检仪检查数据"
)
private
List
<
StaticCheckVO
>
railDeviceCheckVOList
;
@ApiModelProperty
(
"轨检车检查数据"
)
private
List
<
RailVehicleCheckVO
>
railVehicleCheckVOList
;
@ApiModelProperty
(
"轨检车TQI数据"
)
private
List
<
RailVehicleTqiVO
>
railVehicleTqiVOList
;
@ApiModelProperty
(
"添乘仪检查数据"
)
private
List
<
RailAddInstrumentCheckVO
>
railAddInstrumentCheckVOList
;
}
jeecg-module-system/src/main/java/org/jeecg/modules/unitDevice/vo/CaseReportCheckDataVO.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
unitDevice
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"CaseReportCheckDataVO对象"
,
description
=
"单元设备-病例报告检查数据列表"
)
public
class
CaseReportCheckDataVO
{
@ApiModelProperty
(
"单元id"
)
private
String
unitId
;
@ApiModelProperty
(
"单元类型"
)
private
String
unitType
;
@ApiModelProperty
(
"单元code"
)
private
String
unitCode
;
@ApiModelProperty
(
"动态几何尺寸类型(1:人工静态检查;2:轨检仪静态检查; 3:轨检车检查;4:添乘仪检查)"
)
private
String
type
;
@ApiModelProperty
(
"检查id"
)
private
String
checkId
;
@ApiModelProperty
(
"检查批次号"
)
private
String
checkCode
;
@ApiModelProperty
(
"轨检车号"
)
private
String
trackCode
;
@ApiModelProperty
(
"工单编号"
)
private
String
workCode
;
@ApiModelProperty
(
"检查区间id"
)
private
String
subwaySectionId
;
@ApiModelProperty
(
"检查区间名称"
)
private
String
subwaySectionName
;
@ApiModelProperty
(
"所属线路id"
)
private
String
lightRailId
;
@ApiModelProperty
(
"所属线路名称"
)
private
String
lightRailName
;
@ApiModelProperty
(
"所属线别id"
)
private
String
lineAliasId
;
@ApiModelProperty
(
"所属线别名称"
)
private
String
lineAliasName
;
@ApiModelProperty
(
"起始里程"
)
private
BigDecimal
startingMileage
;
@ApiModelProperty
(
"终点里程"
)
private
BigDecimal
endMileage
;
@ApiModelProperty
(
"开始速度等级"
)
private
String
startLevel
;
@ApiModelProperty
(
"结束速度等级"
)
private
String
endLevel
;
@ApiModelProperty
(
"钢轨单元数量"
)
private
Integer
railNum
;
@ApiModelProperty
(
"曲线数量"
)
private
Integer
curveNum
;
@ApiModelProperty
(
"竖曲线数量"
)
private
Integer
verticalCurveNum
;
@ApiModelProperty
(
"道岔数量"
)
private
Integer
switchNum
;
@ApiModelProperty
(
"检查人姓名"
)
private
String
checkBy
;
@ApiModelProperty
(
"检查日期"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
checkTime
;
@ApiModelProperty
(
"审核人姓名"
)
private
String
verifyBy
;
@ApiModelProperty
(
"审核时间"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
verifyTime
;
@ApiModelProperty
(
"打印日期"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
printTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
jeecg-module-system/src/main/java/org/jeecg/modules/unitDevice/vo/CaseReportUnitScoreVO.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
unitDevice
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"CaseReportUnitScoreVO对象"
,
description
=
"单元设备-病例报告分数对象"
)
public
class
CaseReportUnitScoreVO
{
private
String
id
;
@ApiModelProperty
(
"分析时间"
)
private
Date
analysisTime
;
@ApiModelProperty
(
"单元得分等级说明"
)
private
String
unitScoreLevelStr
;
@ApiModelProperty
(
"单元得分"
)
private
BigDecimal
unitScore
;
}
jeecg-module-system/src/main/java/org/jeecg/modules/unitDevice/vo/CaseReportWorkBatchVO.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
unitDevice
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"CaseReportWorkBatchVO对象"
,
description
=
"单元设备-病例报告作业批次对象"
)
public
class
CaseReportWorkBatchVO
{
}
jeecg-module-system/src/main/java/org/jeecg/modules/unitDevice/vo/RailAddInstrumentCheckVO.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
unitDevice
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"RailAddInstrumentCheckVO对象"
,
description
=
"单元设备-病例报告本-添乘仪检查报告VO"
)
public
class
RailAddInstrumentCheckVO
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"主键"
)
private
String
id
;
@ApiModelProperty
(
"动静态几何尺寸数据主表主键-》外键"
)
private
String
checkId
;
@ApiModelProperty
(
"动静态几何尺寸数据主表code"
)
private
String
checkCode
;
@ApiModelProperty
(
"设备单元id"
)
private
String
unitId
;
@ApiModelProperty
(
"设备单元编码"
)
private
String
unitCode
;
@ApiModelProperty
(
"设备单元编码"
)
private
String
unitDeviceCode
;
@ApiModelProperty
(
"设备单元类型1-钢轨,2-曲线,3-竖曲线,4-道岔"
)
private
Integer
unitType
;
@ApiModelProperty
(
"设备单元类型名称"
)
private
String
unitTypeName
;
@ApiModelProperty
(
"设备单元起始里程"
)
private
BigDecimal
unitStartMileage
;
@ApiModelProperty
(
"设备单元中心里程"
)
private
BigDecimal
unitCenterMileage
;
@ApiModelProperty
(
"设备单元终点里程"
)
private
BigDecimal
unitEndMileage
;
@ApiModelProperty
(
"测点里程"
)
private
BigDecimal
pointMileage
;
@ApiModelProperty
(
"水平加速度"
)
private
BigDecimal
zontalSpeed
;
@ApiModelProperty
(
"水平加速度等级"
)
private
Integer
zontalSpeedLevel
;
@ApiModelProperty
(
"垂直加速度"
)
private
BigDecimal
verticalSpeed
;
@ApiModelProperty
(
"垂直加速度等级"
)
private
Integer
verticalSpeedLevel
;
@ApiModelProperty
(
"速度"
)
private
BigDecimal
speed
;
@ApiModelProperty
(
"手动标记"
)
private
String
mark
;
@ApiModelProperty
(
"是否删除(0:未删除;1:已删除)"
)
private
String
delFlag
;
@ApiModelProperty
(
"排序字段"
)
private
Integer
infoSort
;
}
jeecg-module-system/src/main/java/org/jeecg/modules/unitDevice/vo/RailVehicleCheckVO.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
unitDevice
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"RailVehicleCheckVO对象"
,
description
=
"单元设备-病例报告本-轨检车检查vo"
)
public
class
RailVehicleCheckVO
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"主键"
)
private
String
id
;
@ApiModelProperty
(
"创建人"
)
private
String
createBy
;
@ApiModelProperty
(
"创建日期"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新人"
)
private
String
updateBy
;
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
"设备单元id"
)
private
String
unitId
;
@ApiModelProperty
(
"设备单元编码"
)
private
String
unitCode
;
@ApiModelProperty
(
"设备单元类型1-钢轨,2-曲线,3-竖曲线,4-道岔"
)
private
Integer
unitType
;
@ApiModelProperty
(
"设备单元类型名称"
)
private
String
unitTypeName
;
@ApiModelProperty
(
"设备单元起始里程"
)
private
BigDecimal
unitStartingMileage
;
@ApiModelProperty
(
"设备单元中心里程"
)
private
BigDecimal
unitCenterMileage
;
@ApiModelProperty
(
"设备单元终点里程"
)
private
BigDecimal
unitEndMileage
;
@ApiModelProperty
(
"检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查"
)
private
Integer
checkType
;
@ApiModelProperty
(
"检查主表id"
)
private
String
checkId
;
@ApiModelProperty
(
"动静态几何尺寸数据主表code"
)
private
String
checkCode
;
@ApiModelProperty
(
"轨检车超限表id"
)
private
String
overReportId
;
@ApiModelProperty
(
"超限里程"
)
private
BigDecimal
overReportMileage
;
@ApiModelProperty
(
"超限类型"
)
private
String
overType
;
@ApiModelProperty
(
"超限等级"
)
private
Integer
overLevel
;
@ApiModelProperty
(
"峰值(mm或g)"
)
private
String
peakValue
;
@ApiModelProperty
(
"管理数据差"
)
private
String
dataDifference
;
@ApiModelProperty
(
"线性"
)
private
String
xianxing
;
@ApiModelProperty
(
"检测标准"
)
private
String
standard
;
@ApiModelProperty
(
"速度(km/h)"
)
private
String
spend
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
jeecg-module-system/src/main/java/org/jeecg/modules/unitDevice/vo/RailVehicleTqiVO.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
unitDevice
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"RailVehicleTqiVO对象"
,
description
=
"单元设备-病例报告本-轨检车Tqivo"
)
public
class
RailVehicleTqiVO
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"主键"
)
private
String
id
;
@ApiModelProperty
(
"创建人"
)
private
String
createBy
;
@ApiModelProperty
(
"创建日期"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新人"
)
private
String
updateBy
;
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
"检查主表id"
)
private
String
checkId
;
@ApiModelProperty
(
"检查主表code"
)
private
String
checkCode
;
@ApiModelProperty
(
"检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查"
)
private
Integer
checkType
;
@ApiModelProperty
(
"设备单元id"
)
private
String
unitId
;
@ApiModelProperty
(
"设备单元编码"
)
private
String
unitCode
;
@ApiModelProperty
(
"设备单元类型1-钢轨,2-曲线,3-竖曲线,4-道岔"
)
private
Integer
unitType
;
@ApiModelProperty
(
"设备单元类型名称"
)
private
String
unitTypeName
;
@ApiModelProperty
(
"设备单元起始里程"
)
private
BigDecimal
unitStartingMileage
;
@ApiModelProperty
(
"设备单元中心里程"
)
private
BigDecimal
unitCenterMileage
;
@ApiModelProperty
(
"设备单元终点里程"
)
private
BigDecimal
unitEndMileage
;
@ApiModelProperty
(
"tqi报告id"
)
private
String
tqiReportId
;
@ApiModelProperty
(
"开始里程(m)"
)
private
BigDecimal
startMileage
;
@ApiModelProperty
(
"终点里程(m)"
)
private
BigDecimal
endMileage
;
@ApiModelProperty
(
"区间名称"
)
private
String
sectionName
;
@ApiModelProperty
(
"高低左"
)
private
String
highLowLeft
;
@ApiModelProperty
(
"高低右"
)
private
String
highLowRight
;
@ApiModelProperty
(
"轨向左"
)
private
String
trackLeft
;
@ApiModelProperty
(
"轨向右"
)
private
String
trackRight
;
@ApiModelProperty
(
"水平(mm)"
)
private
String
level
;
@ApiModelProperty
(
"轨距(mm)"
)
private
String
trackGauge
;
@ApiModelProperty
(
"三角坑(mm)"
)
private
String
triangularPit
;
@ApiModelProperty
(
"TQI数值"
)
private
String
tqiComeUpon
;
@ApiModelProperty
(
"TQI超标"
)
private
String
tqiAboveStandard
;
@ApiModelProperty
(
"扣分"
)
private
String
deduct
;
@ApiModelProperty
(
"检测标准"
)
private
String
standard
;
@ApiModelProperty
(
"速度(km/h)"
)
private
String
spend
;
}
jeecg-module-system/src/main/java/org/jeecg/modules/unitDevice/vo/StaticCheckVO.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
unitDevice
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"LabourCheckVO对象"
,
description
=
"单元设备-病例报告本-静态检查记录vo"
)
public
class
StaticCheckVO
{
@ApiModelProperty
(
"主键"
)
@TableId
(
"id"
)
private
String
id
;
@ApiModelProperty
(
"创建人"
)
private
String
createBy
;
@ApiModelProperty
(
"创建日期"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新人"
)
private
String
updateBy
;
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
"设备单元id"
)
private
String
unitId
;
@ApiModelProperty
(
"设备单元编码"
)
private
String
unitCode
;
@ApiModelProperty
(
"设备单元类型 "
)
private
Integer
unitType
;
@ApiModelProperty
(
"设备单元类型名称"
)
private
String
unitTypeName
;
@ApiModelProperty
(
"设备单元起始里程"
)
private
BigDecimal
unitStartingMileage
;
@ApiModelProperty
(
"设备单元中心里程"
)
private
BigDecimal
unitCenterMileage
;
@ApiModelProperty
(
"设备单元终点里程"
)
private
BigDecimal
unitEndMileage
;
@ApiModelProperty
(
"检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查"
)
private
Integer
checkType
;
@ApiModelProperty
(
"检查主表id"
)
private
String
checkId
;
@ApiModelProperty
(
"检查主表Code"
)
private
String
checkCode
;
@ApiModelProperty
(
"检查项目id[注:轨检车是tqi的id]"
)
private
String
checkItemId
;
@ApiModelProperty
(
"检查开始里程 [注:轨检车和添乘仪此id为null]"
)
private
BigDecimal
checkItemStartingMileage
;
@ApiModelProperty
(
"检查结束里程 [注:轨检车和添乘仪此id为null]"
)
private
BigDecimal
checkItemEndMileage
;
@ApiModelProperty
(
"检查文本"
)
private
String
checkItemText
;
@ApiModelProperty
(
"检查详情id"
)
private
String
checkDetailId
;
@ApiModelProperty
(
"检查开始里程"
)
private
BigDecimal
checkDetailStartingMileage
;
@ApiModelProperty
(
"检查结束里程"
)
private
BigDecimal
checkDetailEndMileage
;
@ApiModelProperty
(
"测点"
)
private
Integer
measurePoint
;
@ApiModelProperty
(
"轨距"
)
private
String
trackGauge
;
@ApiModelProperty
(
"水平"
)
private
String
level
;
@ApiModelProperty
(
"三角坑"
)
private
String
triangularPit
;
@ApiModelProperty
(
"方向"
)
private
String
direction
;
@ApiModelProperty
(
"高低"
)
private
String
height
;
@ApiModelProperty
(
"结构"
)
private
String
structure
;
@ApiModelProperty
(
"整改"
)
private
String
rectification
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
jeecg-module-system/src/main/java/org/jeecg/modules/utils/RedisLockUtil.java
0 → 100644
View file @
1d0f6df4
package
org
.
jeecg
.
modules
.
utils
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
java.util.concurrent.TimeUnit
;
/**
* redis 锁
*/
public
class
RedisLockUtil
{
private
RedisLockUtil
()
{
}
private
static
RedisTemplate
<
String
,
Object
>
redisTemplate
;
public
static
void
setService
(
RedisTemplate
<
String
,
Object
>
redisTemplate
)
{
RedisLockUtil
.
redisTemplate
=
redisTemplate
;
}
/**
* @param key 键
* @return
*/
public
static
boolean
lock
(
String
key
)
{
/**
* 默认期望过期时间
*/
Long
expireTime
=
6000L
;
return
lock
(
key
,
expireTime
);
}
/**
* @param key 键
* @param expireTime 过期时间
* @return
*/
public
static
boolean
lock
(
String
key
,
Long
expireTime
)
{
if
(
key
==
null
)
{
return
false
;
}
Boolean
flag
=
redisTemplate
.
hasKey
(
key
);
if
(
Boolean
.
FALSE
.
equals
(
flag
))
{
redisTemplate
.
opsForValue
().
set
(
key
,
key
,
expireTime
,
TimeUnit
.
MILLISECONDS
);
return
true
;
}
else
{
return
false
;
}
}
public
static
boolean
unlock
(
String
key
)
{
if
(
key
==
null
)
{
return
true
;
}
else
{
return
Boolean
.
TRUE
.
equals
(
redisTemplate
.
delete
(
key
));
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment