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
1f79342d
Commit
1f79342d
authored
Aug 14, 2023
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.调整程序bug
parent
9234c3b2
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
161 additions
and
46 deletions
+161
-46
RailManagementMapper.xml
...g/modules/deviceAsset/mapper/xml/RailManagementMapper.xml
+9
-5
AnalysisAlgorithmMapper.xml
...amicStaticAnalysis/mapper/xml/AnalysisAlgorithmMapper.xml
+10
-6
WorkBatchController.java
...dules/maintenanceWork/controller/WorkBatchController.java
+4
-4
UnitDeviceDTO.java
.../org/jeecg/modules/maintenanceWork/dto/UnitDeviceDTO.java
+7
-0
WorkBatchSaveOrUpdateDTO.java
...modules/maintenanceWork/dto/WorkBatchSaveOrUpdateDTO.java
+2
-2
WorkBatchTransfiniteSaveDTO.java
...ules/maintenanceWork/dto/WorkBatchTransfiniteSaveDTO.java
+1
-1
WorkBatchDetailMapper.java
...modules/maintenanceWork/mapper/WorkBatchDetailMapper.java
+4
-0
WorkBatchMapper.java
...jeecg/modules/maintenanceWork/mapper/WorkBatchMapper.java
+5
-0
WorkBatchDetailMapper.xml
...ules/maintenanceWork/mapper/xml/WorkBatchDetailMapper.xml
+20
-0
WorkBatchMapper.xml
...cg/modules/maintenanceWork/mapper/xml/WorkBatchMapper.xml
+76
-0
IWorkBatchService.java
...cg/modules/maintenanceWork/service/IWorkBatchService.java
+1
-2
WorkBatchServiceImpl.java
...es/maintenanceWork/service/impl/WorkBatchServiceImpl.java
+18
-23
WorkBatchDetailVO.java
...g/jeecg/modules/maintenanceWork/vo/WorkBatchDetailVO.java
+1
-3
WorkBatchVO.java
...ava/org/jeecg/modules/maintenanceWork/vo/WorkBatchVO.java
+3
-0
No files found.
jeecg-module-system/src/main/java/org/jeecg/modules/deviceAsset/mapper/xml/RailManagementMapper.xml
View file @
1f79342d
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
deviceCode,
deviceCode,
startMileage,
startMileage,
endMileage,
endMileage,
ROUND((startMileage + endMileage) / 2, 3)
centerMileage,
centerMileage,
type,
type,
typeName
typeName
FROM (
FROM (
...
@@ -42,8 +42,9 @@
...
@@ -42,8 +42,9 @@
t1.rail_code deviceCode,
t1.rail_code deviceCode,
t1.starting_mileage startMileage,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
t1.end_mileage endMileage,
ROUND((t1.starting_mileage + t1.end_mileage) / 2, 3) centerMileage,
1 type,
1 type,
'钢轨' typeName
'钢轨'
typeName
FROM t_da_rail_management t1
FROM t_da_rail_management t1
WHERE t1.line_alias_id = #{lineAliasId}
WHERE t1.line_alias_id = #{lineAliasId}
AND t1.light_rail_id = #{lightRailId}
AND t1.light_rail_id = #{lightRailId}
...
@@ -55,8 +56,9 @@
...
@@ -55,8 +56,9 @@
t1.curve_code deviceCode,
t1.curve_code deviceCode,
t1.curve_mileage_zh startMileage,
t1.curve_mileage_zh startMileage,
t1.curve_mileage_hz endMileage,
t1.curve_mileage_hz endMileage,
ROUND((t1.curve_mileage_zh + t1.curve_mileage_hz) / 2, 3) centerMileage,
2 type,
2 type,
'曲线' typeName
'曲线'
typeName
FROM t_da_curve_management t1
FROM t_da_curve_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE t1.line_alias_id = #{lineAliasId}
WHERE t1.line_alias_id = #{lineAliasId}
...
@@ -69,8 +71,9 @@
...
@@ -69,8 +71,9 @@
t1.vertical_curve_code deviceCode,
t1.vertical_curve_code deviceCode,
t1.starting_mileage startMileage,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
t1.end_mileage endMileage,
ROUND((t1.starting_mileage + t1.end_mileage) / 2, 3) centerMileage,
3 type,
3 type,
'竖曲线' typeName
'竖曲线'
typeName
FROM t_da_vertical_curve_management t1
FROM t_da_vertical_curve_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE t1.line_alias_id = #{lineAliasId}
WHERE t1.line_alias_id = #{lineAliasId}
...
@@ -83,8 +86,9 @@
...
@@ -83,8 +86,9 @@
t1.switch_code deviceCode,
t1.switch_code deviceCode,
t1.byroad_pre_mileage startMileage,
t1.byroad_pre_mileage startMileage,
t1.byroad_end_mileage endMileage,
t1.byroad_end_mileage endMileage,
ROUND((t1.byroad_pre_mileage + t1.byroad_end_mileage) / 2, 3) centerMileage,
4 type,
4 type,
'道岔' typeName
'道岔'
typeName
FROM t_da_switch_management t1
FROM t_da_switch_management t1
LEFT JOIN t_sn_section_station_map t2 ON t1.section_station_map_id = t2.id
LEFT JOIN t_sn_section_station_map t2 ON t1.section_station_map_id = t2.id
LEFT JOIN t_sn_subway_section t3 ON t2.section_id = t3.id AND t3.line_alias_id = t1.line_alias_id
LEFT JOIN t_sn_subway_section t3 ON t2.section_id = t3.id AND t3.line_alias_id = t1.line_alias_id
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/mapper/xml/AnalysisAlgorithmMapper.xml
View file @
1f79342d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
deviceCode,
deviceCode,
startMileage,
startMileage,
endMileage,
endMileage,
ROUND((startMileage + endMileage) / 2, 3)
centerMileage,
centerMileage,
type,
type,
typeName
typeName
FROM (SELECT t1.id,
FROM (SELECT t1.id,
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
t1.rail_code deviceCode,
t1.rail_code deviceCode,
t1.starting_mileage startMileage,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
t1.end_mileage endMileage,
ROUND((t1.starting_mileage + t1.end_mileage) / 2, 3) centerMileage,
1 type,
1 type,
'钢轨' typeName
'钢轨' typeName
FROM t_da_rail_management t1
FROM t_da_rail_management t1
...
@@ -29,10 +30,11 @@
...
@@ -29,10 +30,11 @@
t1.curve_code deviceCode,
t1.curve_code deviceCode,
t1.curve_mileage_zh startMileage,
t1.curve_mileage_zh startMileage,
t1.curve_mileage_hz endMileage,
t1.curve_mileage_hz endMileage,
ROUND((t1.curve_mileage_zh + t1.curve_mileage_hz) / 2, 3) centerMileage,
2 type,
2 type,
'曲线' typeName
'曲线' typeName
FROM t_da_curve_management t1
FROM t_da_curve_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE t1.line_alias_id = #{lineAliasId}
WHERE t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
AND t2.light_rail_id = #{lightRailId}
...
@@ -43,10 +45,11 @@
...
@@ -43,10 +45,11 @@
t1.vertical_curve_code deviceCode,
t1.vertical_curve_code deviceCode,
t1.starting_mileage startMileage,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
t1.end_mileage endMileage,
ROUND((t1.starting_mileage + t1.end_mileage) / 2, 3) centerMileage,
3 type,
3 type,
'竖曲线' typeName
'竖曲线' typeName
FROM t_da_vertical_curve_management t1
FROM t_da_vertical_curve_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE t1.line_alias_id = #{lineAliasId}
WHERE t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
AND t2.light_rail_id = #{lightRailId}
...
@@ -57,14 +60,15 @@
...
@@ -57,14 +60,15 @@
t1.switch_code deviceCode,
t1.switch_code deviceCode,
t1.byroad_pre_mileage startMileage,
t1.byroad_pre_mileage startMileage,
t1.byroad_end_mileage endMileage,
t1.byroad_end_mileage endMileage,
ROUND((t1.byroad_pre_mileage + t1.byroad_end_mileage) / 2, 3) centerMileage,
4 type,
4 type,
'道岔' typeName
'道岔' typeName
FROM t_da_switch_management t1
FROM t_da_switch_management t1
LEFT JOIN t_sn_section_station_map t2 ON t1.section_station_map_id = t2.id
LEFT JOIN t_sn_section_station_map t2 ON t1.section_station_map_id = t2.id
LEFT JOIN t_sn_subway_section t3 ON t2.section_id = t3.id AND t3.line_alias_id = t1.line_alias_id
LEFT JOIN t_sn_subway_section t3 ON t2.section_id = t3.id AND t3.line_alias_id = t1.line_alias_id
WHERE t1.line_alias_id = #{lineAliasId}
WHERE t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
AND t2.light_rail_id = #{lightRailId}
) t
) t
ORDER BY t.startMileage
ORDER BY t.startMileage
</select>
</select>
</mapper>
</mapper>
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/controller/WorkBatchController.java
View file @
1f79342d
...
@@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.*;
...
@@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.*;
import
org.jeecg.common.system.base.controller.JeecgController
;
import
org.jeecg.common.system.base.controller.JeecgController
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -85,9 +84,10 @@ public class WorkBatchController extends JeecgController<WorkBatch, IWorkBatchSe
...
@@ -85,9 +84,10 @@ public class WorkBatchController extends JeecgController<WorkBatch, IWorkBatchSe
@AutoLog
(
value
=
"维修作业管理-作业计划批次管理-获取里程单元设备"
)
@AutoLog
(
value
=
"维修作业管理-作业计划批次管理-获取里程单元设备"
)
@ApiOperation
(
value
=
"维修作业管理-作业计划批次管理-获取里程单元设备"
,
notes
=
"维修作业管理-作业计划批次管理-获取里程单元设备"
)
@ApiOperation
(
value
=
"维修作业管理-作业计划批次管理-获取里程单元设备"
,
notes
=
"维修作业管理-作业计划批次管理-获取里程单元设备"
)
@PostMapping
(
value
=
"/getUnitDeviceList"
)
@PostMapping
(
value
=
"/getUnitDeviceList"
)
public
Result
<
List
<
Map
<
String
,
Object
>>>
getUnitDeviceList
(
@RequestBody
UnitDeviceDTO
dto
)
{
public
Result
<
Page
<
Map
<
String
,
Object
>>>
getUnitDevicePage
(
@RequestBody
UnitDeviceDTO
dto
)
{
List
<
Map
<
String
,
Object
>>
records
=
this
.
service
.
getUnitDeviceList
(
dto
);
Page
<
Map
<
String
,
Object
>>
pageData
=
new
Page
<>(
dto
.
getPageNo
(),
dto
.
getPageSize
());
return
Result
.
OK
(
records
);
pageData
=
this
.
service
.
getUnitDevicePage
(
pageData
,
dto
);
return
Result
.
OK
(
pageData
);
}
}
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/dto/UnitDeviceDTO.java
View file @
1f79342d
...
@@ -3,12 +3,19 @@ package org.jeecg.modules.maintenanceWork.dto;
...
@@ -3,12 +3,19 @@ package org.jeecg.modules.maintenanceWork.dto;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
@Data
@Data
@ApiModel
(
value
=
"UnitDeviceDTO对象"
,
description
=
"fsf1"
)
@ApiModel
(
value
=
"UnitDeviceDTO对象"
,
description
=
"fsf1"
)
public
class
UnitDeviceDTO
{
public
class
UnitDeviceDTO
{
@ApiModelProperty
(
"车站id"
)
private
Integer
pageNo
;
@ApiModelProperty
(
"车站id"
)
private
Integer
pageSize
;
@ApiModelProperty
(
"车站id"
)
@ApiModelProperty
(
"车站id"
)
private
String
lightRailId
;
private
String
lightRailId
;
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/dto/WorkBatchSaveOrUpdateDTO.java
View file @
1f79342d
...
@@ -60,6 +60,6 @@ public class WorkBatchSaveOrUpdateDTO {
...
@@ -60,6 +60,6 @@ public class WorkBatchSaveOrUpdateDTO {
@ApiModelProperty
(
"作业状态 0-未作业 1-已作业"
)
@ApiModelProperty
(
"作业状态 0-未作业 1-已作业"
)
private
Integer
workStatus
;
private
Integer
workStatus
;
@ApiModelProperty
(
"
单元设备列表
"
)
@ApiModelProperty
(
"
详情列表【就是】
"
)
private
List
<
DispatchDTO
>
unitDevice
List
;
private
List
<
DispatchDTO
>
detail
List
;
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/dto/WorkBatchTransfiniteSaveDTO.java
View file @
1f79342d
...
@@ -55,5 +55,5 @@ public class WorkBatchTransfiniteSaveDTO {
...
@@ -55,5 +55,5 @@ public class WorkBatchTransfiniteSaveDTO {
private
String
team
;
private
String
team
;
@ApiModelProperty
(
"派工列表"
)
@ApiModelProperty
(
"派工列表"
)
private
List
<
DispatchDTO
>
d
ispatch
List
;
private
List
<
DispatchDTO
>
d
etail
List
;
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/mapper/WorkBatchDetailMapper.java
View file @
1f79342d
...
@@ -2,6 +2,9 @@ package org.jeecg.modules.maintenanceWork.mapper;
...
@@ -2,6 +2,9 @@ package org.jeecg.modules.maintenanceWork.mapper;
import
org.jeecg.modules.maintenanceWork.entity.WorkBatchDetail
;
import
org.jeecg.modules.maintenanceWork.entity.WorkBatchDetail
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.jeecg.modules.maintenanceWork.vo.WorkBatchDetailVO
;
import
java.util.List
;
/**
/**
* <p>
* <p>
...
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
*/
public
interface
WorkBatchDetailMapper
extends
BaseMapper
<
WorkBatchDetail
>
{
public
interface
WorkBatchDetailMapper
extends
BaseMapper
<
WorkBatchDetail
>
{
List
<
WorkBatchDetailVO
>
queryListByWorkBatchId
(
String
workBatchId
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/mapper/WorkBatchMapper.java
View file @
1f79342d
package
org
.
jeecg
.
modules
.
maintenanceWork
.
mapper
;
package
org
.
jeecg
.
modules
.
maintenanceWork
.
mapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.jeecg.modules.maintenanceWork.dto.UnitDeviceDTO
;
import
org.jeecg.modules.maintenanceWork.dto.WorkBatchDTO
;
import
org.jeecg.modules.maintenanceWork.dto.WorkBatchDTO
;
import
org.jeecg.modules.maintenanceWork.entity.WorkBatch
;
import
org.jeecg.modules.maintenanceWork.entity.WorkBatch
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.jeecg.modules.maintenanceWork.vo.WorkBatchVO
;
import
org.jeecg.modules.maintenanceWork.vo.WorkBatchVO
;
import
java.util.Map
;
/**
/**
* <p>
* <p>
* 维修作业管理-作业计划批次管理表 Mapper 接口
* 维修作业管理-作业计划批次管理表 Mapper 接口
...
@@ -17,4 +20,6 @@ import org.jeecg.modules.maintenanceWork.vo.WorkBatchVO;
...
@@ -17,4 +20,6 @@ import org.jeecg.modules.maintenanceWork.vo.WorkBatchVO;
public
interface
WorkBatchMapper
extends
BaseMapper
<
WorkBatch
>
{
public
interface
WorkBatchMapper
extends
BaseMapper
<
WorkBatch
>
{
Page
<
WorkBatchVO
>
listRecord
(
Page
<
WorkBatchVO
>
pageData
,
WorkBatchDTO
dto
);
Page
<
WorkBatchVO
>
listRecord
(
Page
<
WorkBatchVO
>
pageData
,
WorkBatchDTO
dto
);
Page
<
Map
<
String
,
Object
>>
getUnitDevicePage
(
Page
<
Map
<
String
,
Object
>>
pageData
,
UnitDeviceDTO
dto
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/mapper/xml/WorkBatchDetailMapper.xml
View file @
1f79342d
...
@@ -2,4 +2,24 @@
...
@@ -2,4 +2,24 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.jeecg.modules.maintenanceWork.mapper.WorkBatchDetailMapper"
>
<mapper
namespace=
"org.jeecg.modules.maintenanceWork.mapper.WorkBatchDetailMapper"
>
<select
id=
"queryListByWorkBatchId"
resultType=
"org.jeecg.modules.maintenanceWork.vo.WorkBatchDetailVO"
>
SELECT t1.id,
t1.work_batch_id,
t1.work_batch_code,
t1.analysis_batch_unit_device_id,
t1.unit_id,
t1.unit_code,
t1.unit_type,
t1.unit_type_name,
t1.unit_device_code,
t1.unit_starting_mileage,
t1.unit_center_mileage,
t1.unit_end_mileage,
t1.unit_score_level,
t1.unit_score_level_str,
t1.unit_score,
t1.remark
FROM t_mw_work_batch_detail t1
WHERE t1.work_batch_id = #{workBatchId}
</select>
</mapper>
</mapper>
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/mapper/xml/WorkBatchMapper.xml
View file @
1f79342d
...
@@ -31,4 +31,80 @@
...
@@ -31,4 +31,80 @@
AND t2.work_batch_code like concat('%',#{dto.workBatchCode},'%')
AND t2.work_batch_code like concat('%',#{dto.workBatchCode},'%')
</if>
</if>
</select>
</select>
<select
id=
"getUnitDevicePage"
resultType=
"java.util.Map"
>
SELECT id,
unitCode,
deviceCode,
startMileage,
endMileage,
centerMileage,
type,
typeName
FROM (SELECT t1.id,
t1.unit_code unitCode,
t1.rail_code deviceCode,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
ROUND((t1.starting_mileage + t1.end_mileage) / 2, 3) centerMileage,
1 type,
'钢轨' typeName
FROM t_da_rail_management t1
WHERE t1.line_alias_id = #{dto.lineAliasId}
AND t1.light_rail_id = #{dto.lightRailId}
UNION ALL
SELECT t1.id,
t1.unit_code unitCode,
t1.curve_code deviceCode,
t1.curve_mileage_zh startMileage,
t1.curve_mileage_hz endMileage,
ROUND((t1.curve_mileage_zh + t1.curve_mileage_hz) / 2, 3) centerMileage,
2 type,
'曲线' typeName
FROM t_da_curve_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE t1.line_alias_id = #{dto.lineAliasId}
AND t2.light_rail_id = #{dto.lightRailId}
UNION ALL
SELECT t1.id,
t1.unit_code unitCode,
t1.vertical_curve_code deviceCode,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
ROUND((t1.starting_mileage + t1.end_mileage) / 2, 3) centerMileage,
3 type,
'竖曲线' typeName
FROM t_da_vertical_curve_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE t1.line_alias_id = #{dto.lineAliasId}
AND t2.light_rail_id = #{dto.lightRailId}
UNION ALL
SELECT t1.id,
t1.unit_code unitCode,
t1.switch_code deviceCode,
t1.byroad_pre_mileage startMileage,
t1.byroad_end_mileage endMileage,
ROUND((t1.byroad_pre_mileage + t1.byroad_end_mileage) / 2, 3) centerMileage,
4 type,
'道岔' typeName
FROM t_da_switch_management t1
LEFT JOIN t_sn_section_station_map t2 ON t1.section_station_map_id = t2.id
LEFT JOIN t_sn_subway_section t3 ON t2.section_id = t3.id AND t3.line_alias_id = t1.line_alias_id
WHERE t1.line_alias_id = #{dto.lineAliasId}
AND t2.light_rail_id = #{dto.lightRailId}
) t
<if
test=
"dto.startMileage != null"
>
AND t.centerMileage >= #{dto.startMileage}
</if>
<if
test=
"dto.endMileage != null"
>
AND t.centerMileage
<![CDATA[ <= ]]>
#{dto.endMileage}
</if>
ORDER BY t.startMileage
</select>
</mapper>
</mapper>
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/service/IWorkBatchService.java
View file @
1f79342d
...
@@ -6,7 +6,6 @@ import org.jeecg.modules.maintenanceWork.entity.WorkBatch;
...
@@ -6,7 +6,6 @@ import org.jeecg.modules.maintenanceWork.entity.WorkBatch;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.modules.maintenanceWork.vo.WorkBatchVO
;
import
org.jeecg.modules.maintenanceWork.vo.WorkBatchVO
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -29,7 +28,7 @@ public interface IWorkBatchService extends IService<WorkBatch> {
...
@@ -29,7 +28,7 @@ public interface IWorkBatchService extends IService<WorkBatch> {
void
transfiniteSaveRecord
(
WorkBatchTransfiniteSaveDTO
dto
);
void
transfiniteSaveRecord
(
WorkBatchTransfiniteSaveDTO
dto
);
List
<
Map
<
String
,
Object
>>
getUnitDeviceList
(
UnitDeviceDTO
dto
);
Page
<
Map
<
String
,
Object
>>
getUnitDevicePage
(
Page
<
Map
<
String
,
Object
>>
pageData
,
UnitDeviceDTO
dto
);
void
batchSaveRecord
(
AnalysisBatchSaveDTO
dto
);
void
batchSaveRecord
(
AnalysisBatchSaveDTO
dto
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/service/impl/WorkBatchServiceImpl.java
View file @
1f79342d
package
org
.
jeecg
.
modules
.
maintenanceWork
.
service
.
impl
;
package
org
.
jeecg
.
modules
.
maintenanceWork
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.common.util.UUIDGenerator
;
import
org.jeecg.common.util.UUIDGenerator
;
import
org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice
;
import
org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice
;
import
org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisAlgorithmMapper
;
import
org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceMapper
;
import
org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceMapper
;
import
org.jeecg.modules.maintenanceWork.dto.*
;
import
org.jeecg.modules.maintenanceWork.dto.*
;
import
org.jeecg.modules.maintenanceWork.entity.WorkBatch
;
import
org.jeecg.modules.maintenanceWork.entity.WorkBatch
;
...
@@ -16,14 +15,11 @@ import org.jeecg.modules.maintenanceWork.entity.WorkBatchDetail;
...
@@ -16,14 +15,11 @@ import org.jeecg.modules.maintenanceWork.entity.WorkBatchDetail;
import
org.jeecg.modules.maintenanceWork.mapper.WorkBatchDetailMapper
;
import
org.jeecg.modules.maintenanceWork.mapper.WorkBatchDetailMapper
;
import
org.jeecg.modules.maintenanceWork.mapper.WorkBatchMapper
;
import
org.jeecg.modules.maintenanceWork.mapper.WorkBatchMapper
;
import
org.jeecg.modules.maintenanceWork.service.IWorkBatchService
;
import
org.jeecg.modules.maintenanceWork.service.IWorkBatchService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.modules.maintenanceWork.vo.WorkBatchDetailVO
;
import
org.jeecg.modules.maintenanceWork.vo.WorkBatchVO
;
import
org.jeecg.modules.maintenanceWork.vo.WorkBatchVO
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -40,17 +36,23 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
...
@@ -40,17 +36,23 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
@Resource
@Resource
private
WorkBatchDetailMapper
workBatchDetailMapper
;
private
WorkBatchDetailMapper
workBatchDetailMapper
;
@Resource
private
AnalysisAlgorithmMapper
analysisAlgorithmMapper
;
@Resource
@Resource
private
AnalysisBatchUnitDeviceMapper
analysisBatchUnitDeviceMapper
;
private
AnalysisBatchUnitDeviceMapper
analysisBatchUnitDeviceMapper
;
@Override
@Override
public
Page
<
WorkBatchVO
>
listRecord
(
Page
<
WorkBatchVO
>
pageData
,
WorkBatchDTO
dto
)
{
public
Page
<
WorkBatchVO
>
listRecord
(
Page
<
WorkBatchVO
>
pageData
,
WorkBatchDTO
dto
)
{
return
this
.
baseMapper
.
listRecord
(
pageData
,
dto
);
Page
<
WorkBatchVO
>
pageRecords
=
this
.
baseMapper
.
listRecord
(
pageData
,
dto
);
for
(
WorkBatchVO
record
:
pageRecords
.
getRecords
())
{
List
<
WorkBatchDetailVO
>
detailList
=
workBatchDetailMapper
.
queryListByWorkBatchId
(
record
.
getId
());
record
.
setDetailList
(
detailList
);
}
return
pageRecords
;
}
}
@Override
@Override
public
void
saveRecord
(
WorkBatchSaveOrUpdateDTO
dto
)
{
public
void
saveRecord
(
WorkBatchSaveOrUpdateDTO
dto
)
{
// 保存主信息
// 保存主信息
...
@@ -68,7 +70,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
...
@@ -68,7 +70,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
LambdaQueryWrapper
<
WorkBatchDetail
>
delWrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
WorkBatchDetail
>
delWrapper
=
Wrappers
.
lambdaQuery
();
delWrapper
.
eq
(
WorkBatchDetail:
:
getWorkBatchId
,
dto
.
getId
());
delWrapper
.
eq
(
WorkBatchDetail:
:
getWorkBatchId
,
dto
.
getId
());
workBatchDetailMapper
.
delete
(
delWrapper
);
workBatchDetailMapper
.
delete
(
delWrapper
);
List
<
DispatchDTO
>
transfiniteList
=
dto
.
get
UnitDevice
List
();
List
<
DispatchDTO
>
transfiniteList
=
dto
.
get
Detail
List
();
for
(
DispatchDTO
dispatchDTO
:
transfiniteList
)
{
for
(
DispatchDTO
dispatchDTO
:
transfiniteList
)
{
WorkBatchDetail
workBatchDetail
=
new
WorkBatchDetail
();
WorkBatchDetail
workBatchDetail
=
new
WorkBatchDetail
();
workBatchDetail
.
setId
(
UUIDGenerator
.
generate
());
workBatchDetail
.
setId
(
UUIDGenerator
.
generate
());
...
@@ -107,7 +109,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
...
@@ -107,7 +109,7 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
workBatch
.
setSource
(
2
);
// 超限页面
workBatch
.
setSource
(
2
);
// 超限页面
this
.
save
(
workBatch
);
this
.
save
(
workBatch
);
List
<
DispatchDTO
>
transfiniteList
=
dto
.
getD
ispatch
List
();
List
<
DispatchDTO
>
transfiniteList
=
dto
.
getD
etail
List
();
for
(
DispatchDTO
transfiniteDTO
:
transfiniteList
)
{
for
(
DispatchDTO
transfiniteDTO
:
transfiniteList
)
{
WorkBatchDetail
workBatchDetail
=
new
WorkBatchDetail
();
WorkBatchDetail
workBatchDetail
=
new
WorkBatchDetail
();
workBatchDetail
.
setId
(
UUIDGenerator
.
generate
());
workBatchDetail
.
setId
(
UUIDGenerator
.
generate
());
...
@@ -131,17 +133,10 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
...
@@ -131,17 +133,10 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getUnitDeviceList
(
UnitDeviceDTO
dto
)
{
public
Page
<
Map
<
String
,
Object
>>
getUnitDevicePage
(
Page
<
Map
<
String
,
Object
>>
pageData
,
UnitDeviceDTO
dto
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
unitDeviceList
=
analysisAlgorithmMapper
.
getUnitDevice
(
dto
.
getLightRailId
(),
dto
.
getLineAliasId
());
return
this
.
baseMapper
.
getUnitDevicePage
(
pageData
,
dto
);
for
(
Map
<
String
,
Object
>
unitDevice
:
unitDeviceList
)
{
BigDecimal
centerMileage
=
Convert
.
toBigDecimal
(
unitDevice
.
get
(
"centerMileage"
));
if
(
dto
.
getStartMileage
().
compareTo
(
centerMileage
)
<=
0
&&
dto
.
getEndMileage
().
compareTo
(
centerMileage
)
>
0
)
{
resultList
.
add
(
unitDevice
);
}
}
return
resultList
;
}
}
@Override
@Override
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/vo/WorkBatchDetailVO.java
View file @
1f79342d
...
@@ -23,10 +23,8 @@ import lombok.Setter;
...
@@ -23,10 +23,8 @@ import lombok.Setter;
* @since 2023-08-09
* @since 2023-08-09
*/
*/
@Data
@Data
@ApiModel
(
value
=
"WorkBatchDetail对象"
,
description
=
"维修作业管理-作业计划批次管理明细表"
)
@ApiModel
(
value
=
"WorkBatchDetailVO对象"
,
description
=
"维修作业管理-作业计划批次管理明细表"
)
public
class
WorkBatchDetailVO
{
public
class
WorkBatchDetailVO
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"主键"
)
@ApiModelProperty
(
"主键"
)
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/vo/WorkBatchVO.java
View file @
1f79342d
...
@@ -7,6 +7,7 @@ import lombok.Data;
...
@@ -7,6 +7,7 @@ import lombok.Data;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* <p>
* <p>
...
@@ -72,5 +73,7 @@ public class WorkBatchVO {
...
@@ -72,5 +73,7 @@ public class WorkBatchVO {
@ApiModelProperty
(
"是否删除 0-未删除 1-已删除"
)
@ApiModelProperty
(
"是否删除 0-未删除 1-已删除"
)
private
String
delFlag
;
private
String
delFlag
;
@ApiModelProperty
(
"详情List"
)
private
List
<
WorkBatchDetailVO
>
detailList
;
}
}
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