Commit a7ffe6ed authored by hkl's avatar hkl

Merge branch 'dev-hkl' into 'dev'

Dev hkl

See merge request !44
parents 84b4f9fd 4e3cfb57
...@@ -29,8 +29,7 @@ public class CodeGenerate { ...@@ -29,8 +29,7 @@ public class CodeGenerate {
// 表名 // 表名
String[] tables = { String[] tables = {
"t_dsa_analysis_batch", "t_dsa_config_grade_limit",
"t_dsa_analysis_batch_check_data_map",
}; };
...@@ -58,7 +57,7 @@ public class CodeGenerate { ...@@ -58,7 +57,7 @@ public class CodeGenerate {
// 设置过滤前缀 // 设置过滤前缀
.strategyConfig(builder -> { .strategyConfig(builder -> {
builder.addInclude(tables) // 设置需要生成的表名 builder.addInclude(tables) // 设置需要生成的表名
.addTablePrefix("t_sn", "t_da","t_ek","t_xd","t_dsg","t_djt","t_jh","t_dsa"); // 设置过滤表前缀 .addTablePrefix("t_sn", "t_da", "t_ek", "t_xd", "t_dsg", "t_djt", "t_jh", "t_dsa"); // 设置过滤表前缀
// entity实体策略 // entity实体策略
builder.entityBuilder() builder.entityBuilder()
......
...@@ -4,7 +4,8 @@ import org.jeecg.modules.deviceAsset.service.ICurveManagementService; ...@@ -4,7 +4,8 @@ import org.jeecg.modules.deviceAsset.service.ICurveManagementService;
import org.jeecg.modules.deviceAsset.service.IRailManagementService; import org.jeecg.modules.deviceAsset.service.IRailManagementService;
import org.jeecg.modules.deviceAsset.service.ISwitchManagementService; import org.jeecg.modules.deviceAsset.service.ISwitchManagementService;
import org.jeecg.modules.deviceAsset.service.IVerticalCurveManagementService; import org.jeecg.modules.deviceAsset.service.IVerticalCurveManagementService;
import org.jeecg.modules.deviceAsset.service.impl.RailManagementServiceImpl; 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.subwayNetwork.service.ILineAliasService;
import org.jeecg.modules.utils.UnitCodeUtil; import org.jeecg.modules.utils.UnitCodeUtil;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
...@@ -32,6 +33,10 @@ public class InitData implements InitializingBean { ...@@ -32,6 +33,10 @@ public class InitData implements InitializingBean {
@Resource @Resource
private IRailManagementService railManagementService; private IRailManagementService railManagementService;
@Resource
private AnalysisAlgorithm analysisAlgorithm;
@Override @Override
public void afterPropertiesSet() throws Exception { public void afterPropertiesSet() throws Exception {
UnitCodeUtil.setService(lineAliasService, UnitCodeUtil.setService(lineAliasService,
...@@ -39,5 +44,7 @@ public class InitData implements InitializingBean { ...@@ -39,5 +44,7 @@ public class InitData implements InitializingBean {
curveManagementService, curveManagementService,
verticalCurveManagementService, verticalCurveManagementService,
railManagementService); railManagementService);
SingleConsumer.setService(analysisAlgorithm);
} }
} }
...@@ -12,7 +12,7 @@ import org.springframework.stereotype.Component; ...@@ -12,7 +12,7 @@ import org.springframework.stereotype.Component;
public class SystemInitRunner implements ApplicationRunner { public class SystemInitRunner implements ApplicationRunner {
@Override @Override
public void run(ApplicationArguments args) throws Exception { public void run(ApplicationArguments args) throws Exception {
// 开启消费者 // 单独开启消费者线程
new Thread(SingleConsumer::consume).start(); new Thread(SingleConsumer::consume).start();
} }
} }
package org.jeecg.modules.constant;
/**
* @Description: 通用常量
* @author: hkl
* @data: 2023-08-01 16:41:33
*/
public class DictConstant {
/**
* 设备速度等级
*/
public static final String EQUIPMENT_SPEED_OPTS = "equipment_speed_opts";
}
...@@ -21,5 +21,5 @@ public interface RailManagementMapper extends BaseMapper<RailManagement> { ...@@ -21,5 +21,5 @@ public interface RailManagementMapper extends BaseMapper<RailManagement> {
Page<RailManagementVO> queryPageList(Page<RailManagementVO> pageData, RailManagementDTO dto); Page<RailManagementVO> queryPageList(Page<RailManagementVO> pageData, RailManagementDTO dto);
List<Map<String, Object>> getLineSpecialRail(String lineAliasId); List<Map<String, Object>> getLineSpecialRail(String lightRailId, String lineAliasId);
} }
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
</select> </select>
<select id="getLineSpecialRail" resultType="java.util.Map"> <select id="getLineSpecialRail" resultType="java.util.Map">
SELECT SELECT
id,
unitCode, unitCode,
startMileage, startMileage,
endMileage, endMileage,
...@@ -35,38 +36,47 @@ ...@@ -35,38 +36,47 @@
FROM FROM
( (
SELECT SELECT
t1.id,
t1.unit_code unitCode, t1.unit_code unitCode,
t1.curve_mileage_zh startMileage, t1.curve_mileage_zh startMileage,
t1.curve_mileage_hz endMileage, t1.curve_mileage_hz endMileage,
'曲线' type '曲线' type
FROM FROM
t_da_curve_management t1 t_da_curve_management t1
LEFT JOIN t_sn_train_station t2 ON t1.section_id = t1.id
WHERE WHERE
t1.line_alias_id = #{lineAliasId} t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
UNION ALL UNION ALL
SELECT SELECT
unit_code unitCode, t1.id,
starting_mileage startMileage, t1.unit_code unitCode,
end_mileage endMileage, t1.starting_mileage startMileage,
t1.end_mileage endMileage,
'竖曲线' type '竖曲线' type
FROM FROM
t_da_vertical_curve_management t_da_vertical_curve_management t1
LEFT JOIN t_sn_train_station t2 ON t1.section_id = t1.id
WHERE WHERE
line_alias_id = #{lineAliasId} t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
UNION ALL UNION ALL
SELECT SELECT
unit_code unitCode, t1.id,
byroad_pre_mileage startMileage, t1.unit_code unitCode,
byroad_end_mileage endMileage, t1.byroad_pre_mileage startMileage,
t1.byroad_end_mileage endMileage,
'道岔' type '道岔' type
FROM FROM
t_da_switch_management 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 WHERE
line_alias_id = #{lineAliasId} t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
) t ) t
ORDER BY ORDER BY
t.startMileage t.startMileage
......
...@@ -30,5 +30,5 @@ public interface IRailManagementService extends IService<RailManagement> { ...@@ -30,5 +30,5 @@ public interface IRailManagementService extends IService<RailManagement> {
* *
* @param lineAliasId 线别ID * @param lineAliasId 线别ID
*/ */
List<Map<String, Object>> getLineSpecialRail(String lineAliasId); List<Map<String, Object>> getLineSpecialRail(String lightRailId, String lineAliasId);
} }
...@@ -2,12 +2,9 @@ package org.jeecg.modules.deviceAsset.service.impl; ...@@ -2,12 +2,9 @@ package org.jeecg.modules.deviceAsset.service.impl;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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 ognl.IntHashMap;
import org.jeecg.common.util.UUIDGenerator; import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.deviceAsset.dto.RailManagementDTO; import org.jeecg.modules.deviceAsset.dto.RailManagementDTO;
import org.jeecg.modules.deviceAsset.entity.RailManagement; import org.jeecg.modules.deviceAsset.entity.RailManagement;
...@@ -188,7 +185,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper, ...@@ -188,7 +185,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper,
* @param lineAliasId * @param lineAliasId
*/ */
private void generationCore(LightRail lightRail, List<RailManagement> allRailList, String lineAliasId) { private void generationCore(LightRail lightRail, List<RailManagement> allRailList, String lineAliasId) {
List<Map<String, Object>> lineSpecialRailList = this.getLineSpecialRail(lineAliasId); List<Map<String, Object>> lineSpecialRailList = this.getLineSpecialRail(lightRail.getId(),lineAliasId);
BigDecimal lineStartMileage = BigDecimal.ZERO; BigDecimal lineStartMileage = BigDecimal.ZERO;
BigDecimal endMileage = lightRail.getUpLineMileage(); BigDecimal endMileage = lightRail.getUpLineMileage();
...@@ -271,7 +268,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper, ...@@ -271,7 +268,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper,
@Override @Override
public List<Map<String, Object>> getLineSpecialRail(String lineAliasId) { public List<Map<String, Object>> getLineSpecialRail(String lightRailId, String lineAliasId) {
return this.baseMapper.getLineSpecialRail(lineAliasId); return this.baseMapper.getLineSpecialRail(lightRailId,lineAliasId);
} }
} }
...@@ -3,6 +3,10 @@ package org.jeecg.modules.dynamicStaticAnalysis.algorithm; ...@@ -3,6 +3,10 @@ package org.jeecg.modules.dynamicStaticAnalysis.algorithm;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
/**
* @author hkl
* 换冲区
*/
public class Buffer { public class Buffer {
/** /**
* 缓冲队列最大缓存能力 * 缓冲队列最大缓存能力
...@@ -11,7 +15,7 @@ public class Buffer { ...@@ -11,7 +15,7 @@ public class Buffer {
/** /**
* 缓冲队列 * 缓冲队列
* 这个队列是一个基于链表的阻塞队列,它的容量可以是有界的或无界的。 * 这个队列是一个基于链表的阻塞队列,它的容量可以是有界的或无界的。
* 当使用有界容量时,如果队列已满,新插入操作会被阻塞,直到有空间可用。 * 当使用有界容量时,如果队列已满,新插入操作会被阻塞,直到有空间可用。
* 因为队列可以无限增长(无界),所以在插入元素时不会发生阻塞。 * 因为队列可以无限增长(无界),所以在插入元素时不会发生阻塞。
*/ */
public static final BlockingQueue<String> queue = new LinkedBlockingQueue<>(MAX_CAPACITY); public static final BlockingQueue<String> queue = new LinkedBlockingQueue<>(MAX_CAPACITY);
......
...@@ -13,10 +13,10 @@ public class MultiProducer { ...@@ -13,10 +13,10 @@ public class MultiProducer {
public static void produce(String analysisBatchId) { public static void produce(String analysisBatchId) {
try { try {
Buffer.queue.put(analysisBatchId); Buffer.queue.put(analysisBatchId);
log.info("MultiProducer[生产者]|线程id:【" + Thread.currentThread().getId() + "】=============分析批次ID:【" + analysisBatchId+"】"); log.info("MultiProducer[生产者]|线程id:【" + Thread.currentThread().getId() + "】=============分析批次ID:【" + analysisBatchId + "】");
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
log.error("MultiProducer:"); log.info("MultiProducer[生产者]|线程id:【" + Thread.currentThread().getId() + "】=============分析批次ID:【" + analysisBatchId + "】异常信息:" + e.getMessage());
} }
} }
} }
...@@ -8,16 +8,29 @@ import lombok.extern.slf4j.Slf4j; ...@@ -8,16 +8,29 @@ import lombok.extern.slf4j.Slf4j;
*/ */
@Slf4j @Slf4j
public class SingleConsumer { public class SingleConsumer {
private static AnalysisAlgorithm analysisAlgorithm;
public static void setService(AnalysisAlgorithm analysisAlgorithm) {
SingleConsumer.analysisAlgorithm = analysisAlgorithm;
}
public static void consume() { public static void consume() {
try {
while (true) { while (true) {
try {
String analysisBatchId = Buffer.queue.take(); String analysisBatchId = Buffer.queue.take();
log.info("SingleConsumer[消费者]|线程id:【" + Thread.currentThread().getId() + "】=============分析批次ID:【" + analysisBatchId+"】"); log.info("SingleConsumer[消费者]|线程id:【" + Thread.currentThread().getId() + "】=============分析批次ID:【" + analysisBatchId + "】");
analysisAlgorithm.analysis(analysisBatchId);
} catch (Exception e) {
log.info("SingleConsumer[消费者]|线程id:【" + Thread.currentThread().getId() + "】异常信息:" + e.getCause());
e.printStackTrace();
} }
} catch (InterruptedException e) {
e.printStackTrace();
} }
} }
} }
package org.jeecg.modules.dynamicStaticAnalysis.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigGradeLimit;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailVehicleCheck;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigGradeLimitService;
import org.springframework.web.bind.annotation.*;
import org.jeecg.common.system.base.controller.JeecgController;
import java.util.List;
/**
* <p>
* 动静态分析-配置-单元化管理阈值 前端控制器
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@RestController
@RequestMapping("/dynamicStaticAnalysis/configGradeLimit")
@Api(tags = "动静态分析-配置参数-单元化管理阈值")
public class ConfigGradeLimitController extends JeecgController<ConfigGradeLimit, IConfigGradeLimitService> {
@AutoLog(value = "动静态分析-配置参数-单元化管理阈值-获取记录")
@ApiOperation(value = "动静态分析-配置参数-单元化管理阈值-获取记录", notes = "动静态分析-配置参数-单元化管理阈值-获取记录")
@GetMapping(value = "/listRecord")
public Result<List<ConfigGradeLimit>> listRecord() {
List<ConfigGradeLimit> records = this.service.listRecord();
return Result.OK(records);
}
@AutoLog(value = "动静态分析-配置参数-单元化管理阈值-更新参数")
@ApiOperation(value = "动静态分析-配置参数-单元化管理阈值-更新参数", notes = "动静态分析-配置参数-单元化管理阈值-更新参数")
@PostMapping(value = "/updateRecord")
public Result<String> updateRecord(@RequestBody ConfigGradeLimit record) {
this.service.updateById(record);
return Result.OK("操作成功");
}
}
package org.jeecg.modules.dynamicStaticAnalysis.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigInstrumentCheck;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailDeviceCheck;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailVehicleCheck;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigInstrumentCheckService;
import org.springframework.web.bind.annotation.*;
import org.jeecg.common.system.base.controller.JeecgController;
import java.util.List;
/**
* <p>
* 动静态分析-配置-添乘仪检查超限权值 前端控制器
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@RestController
@RequestMapping("/dynamicStaticAnalysis/configInstrumentCheck")
@Api(tags = "动静态分析-配置参数-添乘仪检查超限权值")
public class ConfigInstrumentCheckController extends JeecgController<ConfigInstrumentCheck, IConfigInstrumentCheckService> {
@AutoLog(value = "动静态分析-配置参数-添乘仪检查超限权值-获取记录")
@ApiOperation(value = "动静态分析-配置参数-添乘仪检查超限权值-获取记录", notes = "动静态分析-配置参数-添乘仪检查超限权值-获取记录")
@GetMapping(value = "/oneRecord")
public Result<ConfigInstrumentCheck> oneRecord() {
ConfigInstrumentCheck oneRecord = this.service.lambdaQuery()
.eq(ConfigInstrumentCheck::getDelFlag, 0)
.last("limit 1")
.one();
return Result.OK(oneRecord);
}
@AutoLog(value = "动静态分析-配置参数-添乘仪检查超限权值-更新参数")
@ApiOperation(value = "动静态分析-配置参数-添乘仪检查超限权值-更新参数", notes = "动静态分析-配置参数-添乘仪检查超限权值-更新参数")
@PostMapping(value = "/updateRecord")
public Result<String> updateRecord(@RequestBody ConfigInstrumentCheck record) {
this.service.updateById(record);
return Result.OK("操作成功");
}
}
package org.jeecg.modules.dynamicStaticAnalysis.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigLabourCheck;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigLabourCheckService;
import org.springframework.web.bind.annotation.*;
/**
* <p>
* 动静态分析-配置-人工检查超限权值 前端控制器
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@RestController
@RequestMapping("/dynamicStaticAnalysis/config/labourCheck")
@Api(tags = "动静态分析-配置参数-人工检查超限权值")
public class ConfigLabourCheckController extends JeecgController<ConfigLabourCheck, IConfigLabourCheckService> {
@AutoLog(value = "动静态分析-配置参数-人工检查超限权值-获取记录")
@ApiOperation(value = "动静态分析-配置参数-人工检查超限权值-获取记录", notes = "动静态分析-配置参数-人工检查超限权值-获取记录")
@GetMapping(value = "/oneRecord")
public Result<ConfigLabourCheck> oneRecord() {
ConfigLabourCheck oneRecord = this.service.lambdaQuery()
.eq(ConfigLabourCheck::getDelFlag, 0)
.last("limit 1")
.one();
return Result.OK(oneRecord);
}
@AutoLog(value = "动静态分析-配置参数-人工检查超限权值-更新参数")
@ApiOperation(value = "动静态分析-配置参数-人工检查超限权值-更新参数", notes = "动静态分析-配置参数-人工检查超限权值-更新参数")
@PostMapping(value = "/updateRecord")
public Result<String> updateRecord(@RequestBody ConfigLabourCheck record) {
this.service.updateById(record);
return Result.OK("操作成功");
}
}
package org.jeecg.modules.dynamicStaticAnalysis.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigLabourCheck;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailDeviceCheck;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigRailDeviceCheckService;
import org.springframework.web.bind.annotation.*;
import org.jeecg.common.system.base.controller.JeecgController;
/**
* <p>
* 动静态分析-配置-轨检仪检查超限权值 前端控制器
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@RestController
@RequestMapping("/dynamicStaticAnalysis/configRailDeviceCheck")
@Api(tags = "动静态分析-配置参数-轨检仪检查超限权值")
public class ConfigRailDeviceCheckController extends JeecgController<ConfigRailDeviceCheck, IConfigRailDeviceCheckService> {
@AutoLog(value = "动静态分析-配置参数-人工检查超限权值-获取记录")
@ApiOperation(value = "动静态分析-配置参数-人工检查超限权值-获取记录", notes = "动静态分析-配置参数-人工检查超限权值-获取记录")
@GetMapping(value = "/oneRecord")
public Result<ConfigRailDeviceCheck> oneRecord() {
ConfigRailDeviceCheck oneRecord = this.service.lambdaQuery()
.eq(ConfigRailDeviceCheck::getDelFlag, 0)
.last("limit 1")
.one();
return Result.OK(oneRecord);
}
@AutoLog(value = "动静态分析-配置参数-人工检查超限权值-更新参数")
@ApiOperation(value = "动静态分析-配置参数-人工检查超限权值-更新参数", notes = "动静态分析-配置参数-人工检查超限权值-更新参数")
@PostMapping(value = "/updateRecord")
public Result<String> updateRecord(@RequestBody ConfigRailDeviceCheck record) {
this.service.updateById(record);
return Result.OK("操作成功");
}
}
package org.jeecg.modules.dynamicStaticAnalysis.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailVehicleCheck;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigRailVehicleCheckService;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* <p>
* 动静态分析-配置-轨检车检查超限权值 前端控制器
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@RestController
@RequestMapping("/dynamicStaticAnalysis/configRailVehicleCheck")
@Api(tags = "动静态分析-配置参数-轨检车检查超限权值")
public class ConfigRailVehicleCheckController extends JeecgController<ConfigRailVehicleCheck, IConfigRailVehicleCheckService> {
@AutoLog(value = "动静态分析-配置参数-轨检车检查超限权值-获取记录")
@ApiOperation(value = "动静态分析-配置参数-轨检车检查超限权值-获取记录", notes = "动静态分析-配置参数-轨检车检查超限权值-获取记录")
@GetMapping(value = "/listRecord")
public Result<List<ConfigRailVehicleCheck>> listRecord() {
List<ConfigRailVehicleCheck> records = this.service.listRecord();
return Result.OK(records);
}
@AutoLog(value = "动静态分析-配置参数-轨检车检查超限权值-更新参数")
@ApiOperation(value = "动静态分析-配置参数-轨检车检查超限权值-更新参数", notes = "动静态分析-配置参数-轨检车检查超限权值-更新参数")
@PostMapping(value = "/updateRecord")
public Result<String> updateRecord(@RequestBody ConfigRailVehicleCheck record) {
this.service.updateById(record);
return Result.OK("操作成功");
}
}
package org.jeecg.modules.dynamicStaticAnalysis.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailVehicleTql;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigRailVehicleTqlService;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* <p>
* 动静态分析-配置-轨检车TQI超限权值 前端控制器
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@RestController
@RequestMapping("/dynamicStaticAnalysis/configRailVehicleTql")
@Api(tags = "动静态分析-配置参数-轨检车TQI超限权值")
public class ConfigRailVehicleTqlController extends JeecgController<ConfigRailVehicleTql, IConfigRailVehicleTqlService> {
@AutoLog(value = "动静态分析-配置参数-轨检车TQI超限权值-获取记录")
@ApiOperation(value = "动静态分析-配置参数-轨检车TQI超限权值-获取记录", notes = "动静态分析-配置参数-轨检车TQI超限权值-获取记录")
@GetMapping(value = "/listRecord")
public Result<List<ConfigRailVehicleTql>> listRecord() {
List<ConfigRailVehicleTql> records = this.service.listRecord();
return Result.OK(records);
}
@AutoLog(value = "动静态分析-配置参数-轨检车TQI超限权值-更新参数")
@ApiOperation(value = "动静态分析-配置参数-轨检车TQI超限权值-更新参数", notes = "动静态分析-配置参数-轨检车TQI超限权值-更新参数")
@PostMapping(value = "/updateRecord")
public Result<String> updateRecord(@RequestBody ConfigRailVehicleTql record) {
this.service.updateById(record);
return Result.OK("操作成功");
}
}
...@@ -55,17 +55,17 @@ public class AnalysisBatch implements Serializable { ...@@ -55,17 +55,17 @@ public class AnalysisBatch implements Serializable {
@TableField("light_rail_id") @TableField("light_rail_id")
private String lightRailId; private String lightRailId;
// @ApiModelProperty("所属线路名称") @ApiModelProperty("所属线路名称")
// @TableField("light_rail_name") @TableField("light_rail_name")
// private String lightRailName; private String lightRailName;
@ApiModelProperty("所属线别id") @ApiModelProperty("所属线别id")
@TableField("line_alias_id") @TableField("line_alias_id")
private String lineAliasId; private String lineAliasId;
// @ApiModelProperty("所属线别名称") @ApiModelProperty("所属线别名称")
// @TableField("line_alias_name") @TableField("line_alias_name")
// private String lineAliasName; private String lineAliasName;
@ApiModelProperty("起始里程") @ApiModelProperty("起始里程")
@TableField("starting_mileage") @TableField("starting_mileage")
......
package org.jeecg.modules.dynamicStaticAnalysis.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 动静态分析-配置-单元化管理阈值
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@Getter
@Setter
@TableName("t_dsa_config_grade_limit")
@ApiModel(value = "ConfigGradeLimit对象", description = "动静态分析-配置-单元化管理阈值")
public class ConfigGradeLimit implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("速度下限")
@TableField("speed_min")
private Integer speedMin;
@ApiModelProperty("速度上限")
@TableField("speed_max")
private Integer speedMax;
@ApiModelProperty("数据字典值")
@TableField("dict_value")
private String dictValue;
@ApiModelProperty("数据字典标签")
@TableField("dict_label")
private String dictLabel;
@ApiModelProperty("评价等级 1-优良 2-合格 3-失格 ")
@TableField("grade_level")
private Integer gradeLevel;
@ApiModelProperty("最小评分")
@TableField("grade_min")
private Integer gradeMin;
@ApiModelProperty("最大评分")
@TableField("grade_max")
private Integer gradeMax;
@ApiModelProperty("设备类型 1-钢轨 2-道岔 3-曲线 4-竖曲线")
@TableField("device_type")
private Integer deviceType;
@ApiModelProperty("是否删除(0:未删除; 1:已删除)")
@TableField("del_flag")
private String delFlag;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
}
package org.jeecg.modules.dynamicStaticAnalysis.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 动静态分析-配置-添乘仪检查超限权值
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@Getter
@Setter
@TableName("t_dsa_config_instrument_check")
@ApiModel(value = "ConfigInstrumentCheck对象", description = "动静态分析-配置-添乘仪检查超限权值")
public class ConfigInstrumentCheck implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("钢轨")
@TableField("rail")
private String rail;
@ApiModelProperty("曲线")
@TableField("curve")
private String curve;
@ApiModelProperty("竖曲线")
@TableField("vertical_curve")
private String verticalCurve;
@ApiModelProperty("道岔")
@TableField("rail_switch")
private String railSwitch;
@ApiModelProperty("是否删除(0:未删除; 1:已删除)")
@TableField("del_flag")
private String delFlag;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
}
package org.jeecg.modules.dynamicStaticAnalysis.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 动静态分析-配置-人工检查超限权值
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@Getter
@Setter
@TableName("t_dsa_config_labour_check")
@ApiModel(value = "ConfigLabourCheck对象", description = "动静态分析-配置-人工检查超限权值")
public class ConfigLabourCheck implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("钢轨")
@TableField("rail")
private String rail;
@ApiModelProperty("曲线")
@TableField("curve")
private String curve;
@ApiModelProperty("竖曲线")
@TableField("vertical_curve")
private String verticalCurve;
@ApiModelProperty("道岔")
@TableField("rail_switch")
private String railSwitch;
@ApiModelProperty("是否删除(0:未删除; 1:已删除)")
@TableField("del_flag")
private String delFlag;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
}
package org.jeecg.modules.dynamicStaticAnalysis.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 动静态分析-配置-轨检仪检查超限权值
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@Getter
@Setter
@TableName("t_dsa_config_rail_device_check")
@ApiModel(value = "ConfigRailDeviceCheck对象", description = "动静态分析-配置-轨检仪检查超限权值")
public class ConfigRailDeviceCheck implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("钢轨")
@TableField("rail")
private String rail;
@ApiModelProperty("曲线")
@TableField("curve")
private String curve;
@ApiModelProperty("竖曲线")
@TableField("vertical_curve")
private String verticalCurve;
@ApiModelProperty("道岔")
@TableField("rail_switch")
private String railSwitch;
@ApiModelProperty("是否删除(0:未删除; 1:已删除)")
@TableField("del_flag")
private String delFlag;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
}
package org.jeecg.modules.dynamicStaticAnalysis.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 动静态分析-配置-轨检车检查超限权值
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@Getter
@Setter
@TableName("t_dsa_config_rail_vehicle_check")
@ApiModel(value = "ConfigRailVehicleCheck对象", description = "动静态分析-配置-轨检车检查超限权值")
public class ConfigRailVehicleCheck implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("速度等级")
@TableField("speed_expression")
private String speedExpression;
@ApiModelProperty("数据字典值")
@TableField("dict_value")
private String dictValue;
@ApiModelProperty("数据字典标签")
@TableField("dict_label")
private String dictLabel;
@ApiModelProperty("速度下限")
@TableField("speed_min")
private Integer speedMin;
@ApiModelProperty("速度上限")
@TableField("speed_max")
private Integer speedMax;
@ApiModelProperty("钢轨")
@TableField("rail")
private String rail;
@ApiModelProperty("曲线")
@TableField("curve")
private String curve;
@ApiModelProperty("竖曲线")
@TableField("vertical_curve")
private String verticalCurve;
@ApiModelProperty("道岔")
@TableField("rail_switch")
private String railSwitch;
@ApiModelProperty("是否删除(0:未删除; 1:已删除)")
@TableField("del_flag")
private String delFlag;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
}
package org.jeecg.modules.dynamicStaticAnalysis.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 动静态分析-配置-轨检车TQI超限权值
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@Getter
@Setter
@TableName("t_dsa_config_rail_vehicle_tql")
@ApiModel(value = "ConfigRailVehicleTql对象", description = "动静态分析-配置-轨检车TQI超限权值")
public class ConfigRailVehicleTql implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("速度等级")
@TableField("speed_expression")
private String speedExpression;
@ApiModelProperty("速度下限")
@TableField("speed_min")
private Integer speedMin;
@ApiModelProperty("速度上限")
@TableField("speed_max")
private Integer speedMax;
@ApiModelProperty("数据字典值")
@TableField("dict_value")
private String dictValue;
@ApiModelProperty("数据字典标签")
@TableField("dict_label")
private String dictLabel;
@ApiModelProperty("钢轨")
@TableField("rail")
private String rail;
@ApiModelProperty("曲线")
@TableField("curve")
private String curve;
@ApiModelProperty("竖曲线")
@TableField("vertical_curve")
private String verticalCurve;
@ApiModelProperty("道岔")
@TableField("rail_switch")
private String railSwitch;
@ApiModelProperty("是否删除(0:未删除; 1:已删除)")
@TableField("del_flag")
private String delFlag;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import java.util.List;
import java.util.Map;
/**
* <p>
* 动静态分析-算法sql
* </p>
*
* @author hkl
* @since 2023-07-25
*/
public interface AnalysisAlgorithmMapper {
/**
* 获取单元设备
*
* @param lightRailId 线路id
* @param lineAliasId 线别id
*/
List<Map<String,Object>> getUnitDevice(String lightRailId, String lineAliasId);
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigGradeLimit;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 动静态分析-配置-单元化管理阈值 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-08-01
*/
public interface ConfigGradeLimitMapper extends BaseMapper<ConfigGradeLimit> {
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigInstrumentCheck;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 动静态分析-配置-添乘仪检查超限权值 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-08-01
*/
public interface ConfigInstrumentCheckMapper extends BaseMapper<ConfigInstrumentCheck> {
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigLabourCheck;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 动静态分析-配置-人工检查超限权值 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-08-01
*/
public interface ConfigLabourCheckMapper extends BaseMapper<ConfigLabourCheck> {
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailDeviceCheck;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 动静态分析-配置-轨检仪检查超限权值 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-08-01
*/
public interface ConfigRailDeviceCheckMapper extends BaseMapper<ConfigRailDeviceCheck> {
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailVehicleCheck;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 动静态分析-配置-轨检车检查超限权值 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-08-01
*/
public interface ConfigRailVehicleCheckMapper extends BaseMapper<ConfigRailVehicleCheck> {
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailVehicleTql;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 动静态分析-配置-轨检车TQI超限权值 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-08-01
*/
public interface ConfigRailVehicleTqlMapper extends BaseMapper<ConfigRailVehicleTql> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisAlgorithmMapper">
<select id="getUnitDevice" resultType="java.util.Map">
SELECT id,
unitCode,
startMileage,
endMileage,
type
FROM (SELECT t1.id,
t1.unit_code unitCode,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
'钢轨' type
FROM t_da_rail_management t1
WHERE t1.line_alias_id = #{lineAliasId}
AND t1.light_rail_id = #{lightRailId}
UNION ALL
SELECT t1.id,
t1.unit_code unitCode,
t1.curve_mileage_zh startMileage,
t1.curve_mileage_hz endMileage,
'曲线' type
FROM t_da_curve_management t1
LEFT JOIN t_sn_train_station t2 ON t1.section_id = t1.id
WHERE t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
UNION ALL
SELECT t1.id,
t1.unit_code unitCode,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
'竖曲线' type
FROM t_da_vertical_curve_management t1
LEFT JOIN t_sn_train_station t2 ON t1.section_id = t1.id
WHERE t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
UNION ALL
SELECT t1.id,
t1.unit_code unitCode,
t1.byroad_pre_mileage startMileage,
t1.byroad_end_mileage endMileage,
'道岔' type
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 = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}) t
ORDER BY t.startMileage
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigGradeLimitMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigInstrumentCheckMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigLabourCheckMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigRailDeviceCheckMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigRailVehicleCheckMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigRailVehicleTqlMapper">
</mapper>
package org.jeecg.modules.dynamicStaticAnalysis.service;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigGradeLimit;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 动静态分析-配置-单元化管理阈值 服务类
* </p>
*
* @author hkl
* @since 2023-08-01
*/
public interface IConfigGradeLimitService extends IService<ConfigGradeLimit> {
List<ConfigGradeLimit> listRecord();
}
package org.jeecg.modules.dynamicStaticAnalysis.service;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigInstrumentCheck;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 动静态分析-配置-添乘仪检查超限权值 服务类
* </p>
*
* @author hkl
* @since 2023-08-01
*/
public interface IConfigInstrumentCheckService extends IService<ConfigInstrumentCheck> {
List<ConfigInstrumentCheck> listRecord();
}
package org.jeecg.modules.dynamicStaticAnalysis.service;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigLabourCheck;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 动静态分析-配置-人工检查超限权值 服务类
* </p>
*
* @author hkl
* @since 2023-08-01
*/
public interface IConfigLabourCheckService extends IService<ConfigLabourCheck> {
}
package org.jeecg.modules.dynamicStaticAnalysis.service;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailDeviceCheck;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 动静态分析-配置-轨检仪检查超限权值 服务类
* </p>
*
* @author hkl
* @since 2023-08-01
*/
public interface IConfigRailDeviceCheckService extends IService<ConfigRailDeviceCheck> {
}
package org.jeecg.modules.dynamicStaticAnalysis.service;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailVehicleCheck;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 动静态分析-配置-轨检车检查超限权值 服务类
* </p>
*
* @author hkl
* @since 2023-08-01
*/
public interface IConfigRailVehicleCheckService extends IService<ConfigRailVehicleCheck> {
List<ConfigRailVehicleCheck> listRecord();
}
package org.jeecg.modules.dynamicStaticAnalysis.service;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailVehicleTql;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 动静态分析-配置-轨检车TQI超限权值 服务类
* </p>
*
* @author hkl
* @since 2023-08-01
*/
public interface IConfigRailVehicleTqlService extends IService<ConfigRailVehicleTql> {
List<ConfigRailVehicleTql> listRecord();
}
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -5,6 +5,7 @@ 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 org.jeecg.common.util.UUIDGenerator; import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.dynamicStaticAnalysis.algorithm.MultiProducer;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchQueryDTO; import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchQueryDTO;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchSaveOrUpdateDTO; import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchSaveOrUpdateDTO;
import org.jeecg.modules.dynamicStaticAnalysis.dto.CheckBatchDTO; import org.jeecg.modules.dynamicStaticAnalysis.dto.CheckBatchDTO;
...@@ -73,6 +74,9 @@ public class AnalysisBatchServiceImpl extends ServiceImpl<AnalysisBatchMapper, A ...@@ -73,6 +74,9 @@ public class AnalysisBatchServiceImpl extends ServiceImpl<AnalysisBatchMapper, A
for (AnalysisBatchCheckDataMap analysisBatchCheckDataMap : analysisBatchCheckDataMaps) { for (AnalysisBatchCheckDataMap analysisBatchCheckDataMap : analysisBatchCheckDataMaps) {
analysisBatchCheckDataMapMapper.insert(analysisBatchCheckDataMap); analysisBatchCheckDataMapMapper.insert(analysisBatchCheckDataMap);
} }
// 执行分析
MultiProducer.produce(analysisBatch.getId());
} }
@Override @Override
...@@ -111,6 +115,9 @@ public class AnalysisBatchServiceImpl extends ServiceImpl<AnalysisBatchMapper, A ...@@ -111,6 +115,9 @@ public class AnalysisBatchServiceImpl extends ServiceImpl<AnalysisBatchMapper, A
for (AnalysisBatchCheckDataMap analysisBatchCheckDataMap : analysisBatchCheckDataMaps) { for (AnalysisBatchCheckDataMap analysisBatchCheckDataMap : analysisBatchCheckDataMaps) {
analysisBatchCheckDataMapMapper.insert(analysisBatchCheckDataMap); analysisBatchCheckDataMapMapper.insert(analysisBatchCheckDataMap);
} }
// 执行分析
MultiProducer.produce(analysisBatch.getId());
} }
@Override @Override
......
package org.jeecg.modules.dynamicStaticAnalysis.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.constant.DictConstant;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigGradeLimit;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigGradeLimitMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigGradeLimitService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.system.entity.SysDict;
import org.jeecg.modules.system.entity.SysDictItem;
import org.jeecg.modules.system.mapper.SysDictItemMapper;
import org.jeecg.modules.system.mapper.SysDictMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
/**
* <p>
* 动静态分析-配置-单元化管理阈值 服务实现类
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@Service
public class ConfigGradeLimitServiceImpl extends ServiceImpl<ConfigGradeLimitMapper, ConfigGradeLimit> implements IConfigGradeLimitService {
@Resource
private SysDictMapper sysDictMapper;
@Resource
private SysDictItemMapper sysDictItemMapper;
@Override
public List<ConfigGradeLimit> listRecord() {
List<ConfigGradeLimit> records = this.lambdaQuery().eq(ConfigGradeLimit::getDelFlag, "0").list();
if (ObjectUtil.isEmpty(records)) {
records = this.initConfigGradeLimit();
}
return records;
}
/**
* 初始化参数
*
* @return
*/
private List<ConfigGradeLimit> initConfigGradeLimit() {
List<ConfigGradeLimit> result = new ArrayList<>(64);
// 1.动态查找速度等级
// 字典
LambdaQueryWrapper<SysDict> sysDictWrapper = Wrappers.lambdaQuery();
sysDictWrapper.eq(SysDict::getDictCode, DictConstant.EQUIPMENT_SPEED_OPTS).last("limit 1");
SysDict sysDict = sysDictMapper.selectOne(sysDictWrapper);
// 字典项目
LambdaQueryWrapper<SysDictItem> sysDictItemWrapper = Wrappers.lambdaQuery();
sysDictItemWrapper.eq(SysDictItem::getDictId, sysDict.getId());
List<SysDictItem> sysDictItems = sysDictItemMapper.selectList(sysDictItemWrapper);
// 2.循环生成
// 1-钢轨 2-道岔 3-曲线 4-竖曲线
List<Integer> deviceTypeList = IntStream.range(1, 5).boxed().collect(Collectors.toList());
for (Integer deviceType : deviceTypeList) {
for (SysDictItem sysDictItem : sysDictItems) {
// 优良
ConfigGradeLimit a = new ConfigGradeLimit();
a.setId(UUIDGenerator.generate());
a.setDictLabel(sysDictItem.getItemText());
a.setDictValue(sysDictItem.getItemValue());
a.setDeviceType(deviceType);
a.setGradeLevel(1); //1-优良
a.setGradeMin(0);
a.setGradeMax(100);
result.add(a);
// 合格
ConfigGradeLimit b = new ConfigGradeLimit();
b.setId(UUIDGenerator.generate());
b.setDictLabel(sysDictItem.getItemText());
b.setDictValue(sysDictItem.getItemValue());
b.setDeviceType(deviceType);
b.setGradeLevel(1); //2-合格
b.setGradeMin(100);
b.setGradeMax(200);
result.add(b);
// 失格
ConfigGradeLimit c = new ConfigGradeLimit();
c.setId(UUIDGenerator.generate());
c.setDictLabel(sysDictItem.getItemText());
c.setDictValue(sysDictItem.getItemValue());
c.setDeviceType(deviceType);
c.setGradeLevel(3); //3-失格
c.setGradeMin(200);
c.setGradeMax(99999);
result.add(c);
}
}
this.saveBatch(result);
return result;
}
}
package org.jeecg.modules.dynamicStaticAnalysis.service.impl;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigInstrumentCheck;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailVehicleTql;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigInstrumentCheckMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigInstrumentCheckService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 动静态分析-配置-添乘仪检查超限权值 服务实现类
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@Service
public class ConfigInstrumentCheckServiceImpl extends ServiceImpl<ConfigInstrumentCheckMapper, ConfigInstrumentCheck> implements IConfigInstrumentCheckService {
@Override
public List<ConfigInstrumentCheck> listRecord() {
List<ConfigInstrumentCheck> records = this.lambdaQuery().eq(ConfigInstrumentCheck::getDelFlag, "0").list();
return records;
}
}
package org.jeecg.modules.dynamicStaticAnalysis.service.impl;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigLabourCheck;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigLabourCheckMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigLabourCheckService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 动静态分析-配置-人工检查超限权值 服务实现类
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@Service
public class ConfigLabourCheckServiceImpl extends ServiceImpl<ConfigLabourCheckMapper, ConfigLabourCheck> implements IConfigLabourCheckService {
}
package org.jeecg.modules.dynamicStaticAnalysis.service.impl;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailDeviceCheck;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigRailDeviceCheckMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigRailDeviceCheckService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 动静态分析-配置-轨检仪检查超限权值 服务实现类
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@Service
public class ConfigRailDeviceCheckServiceImpl extends ServiceImpl<ConfigRailDeviceCheckMapper, ConfigRailDeviceCheck> implements IConfigRailDeviceCheckService {
}
package org.jeecg.modules.dynamicStaticAnalysis.service.impl;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailVehicleCheck;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigRailVehicleCheckMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigRailVehicleCheckService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 动静态分析-配置-轨检车检查超限权值 服务实现类
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@Service
public class ConfigRailVehicleCheckServiceImpl extends ServiceImpl<ConfigRailVehicleCheckMapper, ConfigRailVehicleCheck> implements IConfigRailVehicleCheckService {
/**
* 获取json资源path
*/
public String getResourcePath() {
String jsonPath = "org/jeecg/modules/dynamicStaticAnalysis/template";
return Thread.currentThread().getContextClassLoader().getResource(jsonPath).getPath();
}
@Override
public List<ConfigRailVehicleCheck> listRecord() {
List<ConfigRailVehicleCheck> records = this.lambdaQuery().eq(ConfigRailVehicleCheck::getDelFlag, "0").list();
return records;
}
}
package org.jeecg.modules.dynamicStaticAnalysis.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.dynamicStaticAnalysis.entity.ConfigRailVehicleTql;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.ConfigRailVehicleTqlMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IConfigRailVehicleTqlService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 动静态分析-配置-轨检车TQI超限权值 服务实现类
* </p>
*
* @author hkl
* @since 2023-08-01
*/
@Service
public class ConfigRailVehicleTqlServiceImpl extends ServiceImpl<ConfigRailVehicleTqlMapper, ConfigRailVehicleTql> implements IConfigRailVehicleTqlService {
@Override
public List<ConfigRailVehicleTql> listRecord() {
List<ConfigRailVehicleTql> records = this.lambdaQuery().eq(ConfigRailVehicleTql::getDelFlag, "0").list();
return records;
}
}
{
"name": "人工检查超限权值-曲线",
"height": "0.01",
"trackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01"
}
\ No newline at end of file
{
"name": "人工检查超限权值-竖曲线",
"height": "0.01",
"trackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01"
}
\ No newline at end of file
{
"name": "人工检查超限权值-道岔",
"height": "0.01",
"trackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01"
}
\ No newline at end of file
{
"name": "人工检查超限权值-钢轨",
"height": "0.01",
"trackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01"
}
\ No newline at end of file
{
"name": "添乘仪检查超限权值-曲线",
"verticalSpend": "0.01",
"transverseSpend": "0.01"
}
\ No newline at end of file
{
"name": "添乘仪检查超限权值-竖曲线",
"verticalSpend": "0.01",
"transverseSpend": "0.01"
}
\ No newline at end of file
{
"name": "添乘仪检查超限权值-道岔",
"verticalSpend": "0.01",
"transverseSpend": "0.01"
}
\ No newline at end of file
{
"name": "添乘仪检查超限权值-钢轨",
"verticalSpend": "0.01",
"transverseSpend": "0.01"
}
\ No newline at end of file
{
"name": "轨检仪检查超限权值-曲线",
"height": "0.01",
"trackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01"
}
\ No newline at end of file
{
"name": "轨检仪检查超限权值-竖曲线",
"height": "0.01",
"trackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01"
}
\ No newline at end of file
{
"name": "轨检仪检查超限权值-道岔",
"height": "0.01",
"trackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01"
}
\ No newline at end of file
{
"name": "轨检仪检查超限权值-钢轨",
"height": "0.01",
"trackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01"
}
\ No newline at end of file
{
"name": "轨检车TQI超限权值-曲线",
"tqi": "0.01",
"height": "0.01",
"trackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01"
}
\ No newline at end of file
{
"name": "轨检车TQI超限权值-竖曲线",
"tqi": "0.01",
"height": "0.01",
"trackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01"
}
\ No newline at end of file
{
"name": "轨检车TQI超限权值-道岔",
"tqi": "0.01",
"height": "0.01",
"trackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01"
}
\ No newline at end of file
{
"name": "轨检车TQI超限权值-钢轨",
"tqi": "0.01",
"height": "0.01",
"trackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01"
}
\ No newline at end of file
{
"name": "轨检车检查超限权值-曲线",
"height": "0.01",
"bigTrackGauge": "0.01",
"smallTrackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01",
"verticalSpend": "0.01",
"transverseSpend": "0.01",
"gaugeChange": "0.01",
"curvatureChange": "0.01"
}
\ No newline at end of file
{
"name": "轨检车检查超限权值-竖曲线",
"height": "0.01",
"bigTrackGauge": "0.01",
"smallTrackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01",
"verticalSpend": "0.01",
"transverseSpend": "0.01",
"gaugeChange": "0.01",
"curvatureChange": "0.01"
}
\ No newline at end of file
{
"name": "轨检车检查超限权值-道岔",
"height": "0.01",
"bigTrackGauge": "0.01",
"smallTrackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01",
"verticalSpend": "0.01",
"transverseSpend": "0.01",
"gaugeChange": "0.01",
"curvatureChange": "0.01"
}
\ No newline at end of file
{
"name": "轨检车检查超限权值-钢轨",
"height": "0.01",
"bigTrackGauge": "0.01",
"smallTrackGauge": "0.01",
"direction": "0.01",
"triangularPit": "0.01",
"level": "0.01",
"verticalSpend": "0.01",
"transverseSpend": "0.01",
"gaugeChange": "0.01",
"curvatureChange": "0.01"
}
\ No newline at end of file
...@@ -59,10 +59,7 @@ ...@@ -59,10 +59,7 @@
true isLeaf true isLeaf
FROM FROM
t_sn_light_rail t_sn_light_rail
<where> WHERE status = 1
1=1
AND status = 1
</where>
<!-- UNION ALL <!-- UNION ALL
SELECT SELECT
concat(id,'-2') id, concat(id,'-2') id,
......
...@@ -36,19 +36,19 @@ ...@@ -36,19 +36,19 @@
</select> </select>
<select id="getTreeSubwaySectionList" resultType="org.jeecg.modules.subwayNetwork.vo.SectionStationNode"> <select id="getTreeSubwaySectionList" resultType="org.jeecg.modules.subwayNetwork.vo.SectionStationNode">
SELECT t.id, SELECT t.id,
t.section_name label, t.section_name label,
'2' level, '2' level,
t.light_rail_id parent, t.light_rail_id parent,
t.line_alias_id, t.line_alias_id,
t3.line_alias_code,
t.light_rail_id, t.light_rail_id,
t.section_starting_mileage startMileage, t.section_starting_mileage startMileage,
TRUNCATE((t.section_end_mileage + t.section_starting_mileage) / 2, 3) centerMileage, TRUNCATE((t.section_end_mileage + t.section_starting_mileage) / 2, 3) centerMileage,
t.section_end_mileage endMileage, t.section_end_mileage endMileage,
true isLeaf true isLeaf
FROM t_sn_subway_section t left join t_sn_light_rail t2 ON t.light_rail_id = t2.id FROM t_sn_subway_section t
<where> LEFT JOIN t_sn_light_rail t2 ON t.light_rail_id = t2.id
1=1 LEFT JOIN t_sn_line_alias t3 ON t.line_alias_id = t3.id
AND t2.status = 1 WHERE t2.status = 1
</where>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -39,16 +39,15 @@ ...@@ -39,16 +39,15 @@
'3' level, '3' level,
t2.section_id parent, t2.section_id parent,
t1.line_alias_id, t1.line_alias_id,
t4.line_alias_code,
t1.starting_mileage startMileage, t1.starting_mileage startMileage,
t1.center_mileage centerMileage, t1.center_mileage centerMileage,
t1.end_mileage endMileage, t1.end_mileage endMileage,
true isLeaf true isLeaf
FROM FROM t_sn_train_station t1
t_sn_train_station t1 LEFT JOIN t_sn_section_station_map t2 ON t1.id = t2.station_id LEFT JOIN t_sn_section_station_map t2 ON t1.id = t2.station_id
LEFT JOIN t_sn_light_rail t3 on t1.light_rail_id = t3.id and t2.light_rail_id = t3.id LEFT JOIN t_sn_light_rail t3 on t1.light_rail_id = t3.id and t2.light_rail_id = t3.id
<where> LEFT JOIN t_sn_line_alias t4 ON t1.line_alias_id = t4.id
1=1 WHERE t3.status = 1
AND t3.status = 1
</where>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
package org.jeecg.modules.subwayNetwork.vo; package org.jeecg.modules.subwayNetwork.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
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;
...@@ -28,6 +26,9 @@ public class SectionStationNode { ...@@ -28,6 +26,9 @@ public class SectionStationNode {
@ApiModelProperty(value = "线别id") @ApiModelProperty(value = "线别id")
private String lineAliasId; private String lineAliasId;
@ApiModelProperty(value = "线别code【冠号】")
private String lineAliasCode;
@ApiModelProperty(value = "起始里程") @ApiModelProperty(value = "起始里程")
private BigDecimal startMileage; private BigDecimal startMileage;
......
...@@ -12,9 +12,6 @@ import org.jeecg.modules.deviceAsset.service.IVerticalCurveManagementService; ...@@ -12,9 +12,6 @@ import org.jeecg.modules.deviceAsset.service.IVerticalCurveManagementService;
import org.jeecg.modules.subwayNetwork.entity.LineAlias; import org.jeecg.modules.subwayNetwork.entity.LineAlias;
import org.jeecg.modules.subwayNetwork.service.ILineAliasService; import org.jeecg.modules.subwayNetwork.service.ILineAliasService;
import java.util.List;
import java.util.Map;
/** /**
* @describe:单元编码生成工具 * @describe:单元编码生成工具
*/ */
...@@ -184,18 +181,4 @@ public class UnitCodeUtil { ...@@ -184,18 +181,4 @@ public class UnitCodeUtil {
return String.format("%0" + numLength + "d", num); return String.format("%0" + numLength + "d", num);
} }
/**
* 钢轨智能单元生成
*
* @param lineAliasId 线别ID
*/
public static void railIntelligentGeneration(String lineAliasId) {
List<Map<String, Object>> lineSpecialRail = railManagementService.getLineSpecialRail(lineAliasId);
// 1.判断完整的线路有没有空白部分(指剩余区间既不是道岔、曲线、竖曲线、钢轨的部分),只需要填空白部分,空白部分一定是钢轨,按照25一根的逻辑余数自成一根;
// 2.如果不存在空白部分,则定义道岔曲线竖曲线为绝对正确里程值,并且定义为特殊钢轨,相邻两个特殊钢轨之间的里程区间按照25一根的逻辑余数自成一根。
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment