Commit 6aba953e authored by hkl's avatar hkl

feat:1.bug修复

parent 61c13642
...@@ -93,6 +93,7 @@ public class ShiroConfig { ...@@ -93,6 +93,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/auth/2step-code", "anon");//登录验证码 filterChainDefinitionMap.put("/auth/2step-code", "anon");//登录验证码
filterChainDefinitionMap.put("/sys/common/static/**", "anon");//图片预览 &下载文件不限制token filterChainDefinitionMap.put("/sys/common/static/**", "anon");//图片预览 &下载文件不限制token
filterChainDefinitionMap.put("/sys/common/pdf/**", "anon");//pdf预览 filterChainDefinitionMap.put("/sys/common/pdf/**", "anon");//pdf预览
filterChainDefinitionMap.put("/sys/common/excelTemplate/**", "anon");//excel模板
filterChainDefinitionMap.put("/generic/**", "anon");//pdf预览需要文件 filterChainDefinitionMap.put("/generic/**", "anon");//pdf预览需要文件
filterChainDefinitionMap.put("/sys/getLoginQrcode/**", "anon"); //登录二维码 filterChainDefinitionMap.put("/sys/getLoginQrcode/**", "anon"); //登录二维码
...@@ -114,6 +115,7 @@ public class ShiroConfig { ...@@ -114,6 +115,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/**/*.ttf", "anon"); filterChainDefinitionMap.put("/**/*.ttf", "anon");
filterChainDefinitionMap.put("/**/*.woff", "anon"); filterChainDefinitionMap.put("/**/*.woff", "anon");
filterChainDefinitionMap.put("/**/*.woff2", "anon"); filterChainDefinitionMap.put("/**/*.woff2", "anon");
filterChainDefinitionMap.put("/**/*.xlsx", "anon");
filterChainDefinitionMap.put("/druid/**", "anon"); filterChainDefinitionMap.put("/druid/**", "anon");
filterChainDefinitionMap.put("/swagger-ui.html", "anon"); filterChainDefinitionMap.put("/swagger-ui.html", "anon");
...@@ -123,15 +125,10 @@ public class ShiroConfig { ...@@ -123,15 +125,10 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/sys/annountCement/show/**", "anon"); filterChainDefinitionMap.put("/sys/annountCement/show/**", "anon");
//积木报表排除
filterChainDefinitionMap.put("/test/**", "anon"); filterChainDefinitionMap.put("/test/**", "anon");
//websocket排除 //websocket排除
filterChainDefinitionMap.put("/websocket/**", "anon");//系统通知和公告 filterChainDefinitionMap.put("/websocket/**", "anon");//系统通知和公告
filterChainDefinitionMap.put("/newsWebsocket/**", "anon");//CMS模块
filterChainDefinitionMap.put("/vxeSocket/**", "anon");//JVxeTable无痕刷新示例
// update-begin--author:liusq Date:20230522 for:[issues/4829]访问不存在的url时会提示Token失效,请重新登录呢 // update-begin--author:liusq Date:20230522 for:[issues/4829]访问不存在的url时会提示Token失效,请重新登录呢
//错误路径排除 //错误路径排除
......
...@@ -65,10 +65,6 @@ ...@@ -65,10 +65,6 @@
<properties> <properties>
<package.environment>dev</package.environment> <package.environment>dev</package.environment>
</properties> </properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile> </profile>
<!-- 黄康林本地配置--> <!-- 黄康林本地配置-->
...@@ -79,12 +75,16 @@ ...@@ -79,12 +75,16 @@
</properties> </properties>
</profile> </profile>
<!-- 测试环境--> <!-- 测试环境 -->
<profile> <profile>
<id>test</id> <id>test</id>
<properties> <properties>
<package.environment>test</package.environment> <package.environment>test</package.environment>
</properties> </properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile> </profile>
<!-- 压测环境--> <!-- 压测环境-->
......
...@@ -554,6 +554,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec ...@@ -554,6 +554,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e); throw new RuntimeException(e);
} }
return Result.ok("操作成功"); return Result.ok("操作成功");
......
...@@ -260,7 +260,19 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp ...@@ -260,7 +260,19 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
@Override @Override
public void updateRecord(RailInspectionEquipmentItem record) { public void updateRecord(RailInspectionEquipmentItem record) {
this.updateById(record);
this.lambdaUpdate()
.set(RailInspectionEquipmentItem::getRemark, record.getRemark())
.set(RailInspectionEquipmentItem::getCourseStartingMileage, record.getCourseStartingMileage())
.set(RailInspectionEquipmentItem::getCourseEndMileage, record.getCourseEndMileage())
.set(RailInspectionEquipmentItem::getCurveRadius, record.getCurveRadius())
.set(RailInspectionEquipmentItem::getLongExtent, record.getLongExtent())
.set(RailInspectionEquipmentItem::getSlopeRatio, record.getSlopeRatio())
.set(RailInspectionEquipmentItem::getSuperHigh, record.getSuperHigh())
.set(RailInspectionEquipmentItem::getWiden, record.getWiden())
.eq(RailInspectionEquipmentItem::getId, record.getId())
.update();
// this.updateById(record);
} }
@Override @Override
......
...@@ -5,9 +5,11 @@ import cn.hutool.core.util.ObjectUtil; ...@@ -5,9 +5,11 @@ import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.modules.deviceAsset.dto.CurveManagementDTO; import org.jeecg.modules.deviceAsset.dto.CurveManagementDTO;
import org.jeecg.modules.deviceAsset.entity.CurveManagement; import org.jeecg.modules.deviceAsset.entity.CurveManagement;
import org.jeecg.modules.deviceAsset.service.ICurveManagementService; import org.jeecg.modules.deviceAsset.service.ICurveManagementService;
...@@ -79,4 +81,18 @@ public class CurveManagementController extends JeecgController<CurveManagement, ...@@ -79,4 +81,18 @@ public class CurveManagementController extends JeecgController<CurveManagement,
this.service.removeByIds(Arrays.asList(ids.split(","))); this.service.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
@AutoLog(value = "资产管理-曲线管理-校验曲线编码重复")
@ApiOperation(value = "资产管理-曲线管理-校验曲线编码重复", notes = "资产管理-曲线管理-校验曲线编码重复")
@GetMapping(value = "/checkCurveCodeRepeat")
public Result<String> checkCurveCodeRepeat(String id, String lightRailId, String curveCode) {
Long count = 0L;
if (ObjectUtil.isNotEmpty(lightRailId)) {
count = this.service.checkCurveCodeRepeat(id, lightRailId, curveCode);
}
if (count > 0) {
throw JeecgBootException.error("");
}
return Result.OK("未重复");
}
} }
...@@ -8,6 +8,7 @@ import io.swagger.annotations.Api; ...@@ -8,6 +8,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.util.UUIDGenerator; import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.deviceAsset.dto.FastenerManagementDTO; import org.jeecg.modules.deviceAsset.dto.FastenerManagementDTO;
...@@ -83,4 +84,19 @@ public class FastenerManagementController extends JeecgController<FastenerManage ...@@ -83,4 +84,19 @@ public class FastenerManagementController extends JeecgController<FastenerManage
this.service.removeByIds(Arrays.asList(ids.split(","))); this.service.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
@AutoLog(value = "资产管理-扣件管理-校验扣件管理编码重复")
@ApiOperation(value = "资产管理-扣件管理-校验扣件管理编码重复", notes = "资产管理-扣件管理-校验扣件管理编码重复")
@GetMapping(value = "/checkFastenerCodeRepeat")
public Result<String> checkFastenerCodeRepeat(String id, String lightRailId, String fastenerCode) {
Long count = 0L;
if (ObjectUtil.isNotEmpty(lightRailId)) {
count = this.service.checkFastenerCodeRepeat(id, lightRailId, fastenerCode);
}
if (count > 0) {
throw JeecgBootException.error("");
}
return Result.OK("未重复");
}
} }
package org.jeecg.modules.deviceAsset.controller; package org.jeecg.modules.deviceAsset.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -9,6 +10,7 @@ import io.swagger.annotations.ApiImplicitParams; ...@@ -9,6 +10,7 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
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;
...@@ -17,6 +19,9 @@ import org.jeecg.modules.deviceAsset.vo.RailManagementVO; ...@@ -17,6 +19,9 @@ import org.jeecg.modules.deviceAsset.vo.RailManagementVO;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
...@@ -70,15 +75,60 @@ public class RailManagementController extends JeecgController<RailManagement, IR ...@@ -70,15 +75,60 @@ public class RailManagementController extends JeecgController<RailManagement, IR
} }
// @AutoLog(value = "资产管理-钢轨管理-智能生成")
// @ApiOperation(value = "资产管理-钢轨管理-智能生成", notes = "资产管理-钢轨管理-智能生成")
// @GetMapping(value = "/intelligentGeneration")
// @ApiImplicitParams({
// @ApiImplicitParam(name = "lightRailId", value = "线路id")
// })
// public Result<String> intelligentGeneration(String lightRailId) {
// this.service.intelligentGeneration(lightRailId);
// return Result.OK("生成成功");
// }
@AutoLog(value = "资产管理-钢轨管理-智能生成") @AutoLog(value = "资产管理-钢轨管理-智能生成")
@ApiOperation(value = "资产管理-钢轨管理-智能生成", notes = "资产管理-钢轨管理-智能生成") @ApiOperation(value = "资产管理-钢轨管理-智能生成", notes = "资产管理-钢轨管理-智能生成")
@GetMapping(value = "/intelligentGeneration") @GetMapping(value = "/intelligentGeneration")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "lightRailId", value = "线路id") @ApiImplicitParam(name = "lightRailId", value = "线路id"),
@ApiImplicitParam(name = "lineAliasId", value = "线别id")
}) })
public Result<String> intelligentGeneration(String lightRailId) { public Result<String> intelligentGeneration(String lightRailId,String lineAliasId) {
this.service.intelligentGeneration(lightRailId); // this.service.intelligentGeneration(lightRailId);
this.service.intelligentGeneration(lightRailId,lineAliasId);
return Result.OK("生成成功"); return Result.OK("生成成功");
} }
@AutoLog(value = "资产管理-钢轨管理-校验钢轨编码重复")
@ApiOperation(value = "资产管理-钢轨管理-校验钢轨编码重复", notes = "资产管理-钢轨管理-校验钢轨编码重复")
@GetMapping(value = "/checkRailCodeRepeat")
public Result<String> checkRailCodeRepeat(String id, String lightRailId, String railCode) {
Long count = 0L;
if (ObjectUtil.isNotEmpty(lightRailId)) {
count = this.service.checkRailCodeRepeat(id, lightRailId, railCode);
}
if (count > 0) {
throw JeecgBootException.error("");
}
return Result.OK("未重复");
}
@AutoLog(value = "资产管理-钢轨管理-获取新增时候参数")
@ApiOperation(value = "资产管理-钢轨管理-获取新增时候参数", notes = "资产管理-钢轨管理-获取新增时候参数")
@GetMapping(value = "/getAddParams")
@ApiImplicitParams({
@ApiImplicitParam(name = "lightRailId", value = "线路id"),
@ApiImplicitParam(name = "lineAliasId", value = "线别id"),
@ApiImplicitParam(name = "sectionId", value = "区间id"),
})
public Result<Map<String, Object>> getAddParams(String lightRailId, String lineAliasId, String sectionId) {
// 1.如果没有钢轨数据,返回区间里程
// 2.如果有钢轨有空隙就返回空隙
// 3.如果钢轨没有空隙返回区间里程
// 4.如果返回过长的里程
Map<String, Object> map = this.service.getAddParams(lightRailId,lineAliasId,sectionId);
return Result.OK(map);
}
} }
...@@ -8,6 +8,7 @@ import io.swagger.annotations.Api; ...@@ -8,6 +8,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.util.UUIDGenerator; import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.deviceAsset.dto.FastenerManagementDTO; import org.jeecg.modules.deviceAsset.dto.FastenerManagementDTO;
import org.jeecg.modules.deviceAsset.dto.SignBoardManagementDTO; import org.jeecg.modules.deviceAsset.dto.SignBoardManagementDTO;
...@@ -87,4 +88,18 @@ public class SignBoardManagementController extends JeecgController<SignBoardMana ...@@ -87,4 +88,18 @@ public class SignBoardManagementController extends JeecgController<SignBoardMana
this.service.removeByIds(Arrays.asList(ids.split(","))); this.service.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
@AutoLog(value = "资产管理-轨行区标识管理-校验轨行区标识牌编码重复")
@ApiOperation(value = "资产管理-轨行区标识管理-校验轨行区标识牌编码重复", notes = "资产管理-轨行区标识管理-校验轨行区标识牌编码重复")
@GetMapping(value = "/checkSignBoardCodeRepeat")
public Result<String> checkSignBoardCodeRepeat(String id, String lightRailId, String signBoardCode) {
Long count = 0L;
if (ObjectUtil.isNotEmpty(lightRailId)) {
count = this.service.checkSignBoardCodeRepeat(id, lightRailId, signBoardCode);
}
if (count > 0) {
throw JeecgBootException.error("");
}
return Result.OK("未重复");
}
} }
...@@ -8,6 +8,7 @@ import io.swagger.annotations.Api; ...@@ -8,6 +8,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.util.UUIDGenerator; import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.deviceAsset.dto.SignBoardManagementDTO; import org.jeecg.modules.deviceAsset.dto.SignBoardManagementDTO;
import org.jeecg.modules.deviceAsset.dto.SleeperManagementDTO; import org.jeecg.modules.deviceAsset.dto.SleeperManagementDTO;
...@@ -88,4 +89,18 @@ public class SleeperManagementController extends JeecgController<SleeperManageme ...@@ -88,4 +89,18 @@ public class SleeperManagementController extends JeecgController<SleeperManageme
this.service.removeByIds(Arrays.asList(ids.split(","))); this.service.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
@AutoLog(value = "资产管理-轨枕管理-校验轨枕牌编码重复")
@ApiOperation(value = "资产管理-轨枕管理-校验轨枕牌编码重复", notes = "资产管理-轨枕管理-校验轨枕牌编码重复")
@GetMapping(value = "/checkSleeperCodeRepeat")
public Result<String> checkSleeperCodeRepeat(String id, String lightRailId, String sleeperCode) {
Long count = 0L;
if (ObjectUtil.isNotEmpty(lightRailId)) {
count = this.service.checkSleeperCodeRepeat(id, lightRailId, sleeperCode);
}
if (count > 0) {
throw JeecgBootException.error("");
}
return Result.OK("未重复");
}
} }
...@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.deviceAsset.dto.SwitchManagementQueryDTO; import org.jeecg.modules.deviceAsset.dto.SwitchManagementQueryDTO;
import org.jeecg.modules.deviceAsset.entity.SwitchManagement; import org.jeecg.modules.deviceAsset.entity.SwitchManagement;
...@@ -80,5 +81,18 @@ public class SwitchManagementController extends JeecgController<SwitchManagement ...@@ -80,5 +81,18 @@ public class SwitchManagementController extends JeecgController<SwitchManagement
this.service.removeByIds(Arrays.asList(ids.split(","))); this.service.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
@AutoLog(value = "资产管理-道岔管理-校验道岔编码重复")
@ApiOperation(value = "资产管理-道岔管理-校验道岔编码重复", notes = "资产管理-轨枕管理-校验道岔编码重复")
@GetMapping(value = "/checkSwitchCodeRepeat")
public Result<String> checkSwitchCodeRepeat(String id, String lightRailId, String switchCode) {
Long count = 0L;
if (ObjectUtil.isNotEmpty(lightRailId)) {
count = this.service.checkSwitchCodeRepeat(id, lightRailId, switchCode);
}
if (count > 0) {
throw JeecgBootException.error("");
}
return Result.OK("未重复");
}
} }
...@@ -11,6 +11,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -11,6 +11,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.util.UUIDGenerator; import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.deviceAsset.dto.TrackBedManagementDTO; import org.jeecg.modules.deviceAsset.dto.TrackBedManagementDTO;
...@@ -100,4 +101,19 @@ public class TrackBedManagementController extends JeecgController<TrackBedManage ...@@ -100,4 +101,19 @@ public class TrackBedManagementController extends JeecgController<TrackBedManage
return Result.OK(listResult); return Result.OK(listResult);
} }
@AutoLog(value = "资产管理-道床管理-校验道床编码重复")
@ApiOperation(value = "资产管理-道床管理-校验道床编码重复", notes = "资产管理-道床管理-校验道床编码重复")
@GetMapping(value = "/checkTrackBedCodeRepeat")
public Result<String> checkTrackBedCodeRepeat(String id, String lightRailId, String trackBedCode) {
Long count = 0L;
if (ObjectUtil.isNotEmpty(lightRailId)) {
count = this.service.checkTrackBedCodeRepeat(id, lightRailId, trackBedCode);
}
if (count > 0) {
throw JeecgBootException.error("");
}
return Result.OK("未重复");
}
} }
...@@ -8,6 +8,7 @@ import io.swagger.annotations.Api; ...@@ -8,6 +8,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.modules.deviceAsset.dto.CurveManagementDTO; import org.jeecg.modules.deviceAsset.dto.CurveManagementDTO;
import org.jeecg.modules.deviceAsset.dto.VerticalCurveManagementDTO; import org.jeecg.modules.deviceAsset.dto.VerticalCurveManagementDTO;
import org.jeecg.modules.deviceAsset.entity.CurveManagement; import org.jeecg.modules.deviceAsset.entity.CurveManagement;
...@@ -81,4 +82,19 @@ public class VerticalCurveManagementController extends JeecgController<VerticalC ...@@ -81,4 +82,19 @@ public class VerticalCurveManagementController extends JeecgController<VerticalC
this.service.removeByIds(Arrays.asList(ids.split(","))); this.service.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
@AutoLog(value = "资产管理-竖曲线管理-校验竖曲线编码重复")
@ApiOperation(value = "资产管理-竖曲线管理-校验竖曲线编码重复", notes = "资产管理-竖曲线管理-校验竖曲线编码重复")
@GetMapping(value = "/checkVerticalCurveCodeRepeat")
public Result<String> checkVerticalCurveCodeRepeat(String id, String lightRailId, String verticalCurveCode) {
Long count = 0L;
if (ObjectUtil.isNotEmpty(lightRailId)) {
count = this.service.checkVerticalCurveCodeRepeat(id, lightRailId, verticalCurveCode);
}
if (count > 0) {
throw JeecgBootException.error("");
}
return Result.OK("未重复");
}
} }
...@@ -11,4 +11,6 @@ import org.jeecg.modules.deviceAsset.vo.CurveManagementQueryVO; ...@@ -11,4 +11,6 @@ import org.jeecg.modules.deviceAsset.vo.CurveManagementQueryVO;
*/ */
public interface CurveManagementMapper extends BaseMapper<CurveManagement> { public interface CurveManagementMapper extends BaseMapper<CurveManagement> {
Page<CurveManagementQueryVO> queryPageList(Page<CurveManagementQueryVO> pageData, CurveManagementDTO dto); Page<CurveManagementQueryVO> queryPageList(Page<CurveManagementQueryVO> pageData, CurveManagementDTO dto);
Long checkCurveCodeRepeat(String id, String lightRailId, String curveCode);
} }
...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.FastenerManagementVO; ...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.FastenerManagementVO;
public interface FastenerManagementMapper extends BaseMapper<FastenerManagement> { public interface FastenerManagementMapper extends BaseMapper<FastenerManagement> {
Page<FastenerManagementVO> queryPageList(Page<FastenerManagementVO> pageData, FastenerManagementDTO dto); Page<FastenerManagementVO> queryPageList(Page<FastenerManagementVO> pageData, FastenerManagementDTO dto);
Long checkFastenerCodeRepeat(String id, String lightRailId, String fastenerCode);
} }
...@@ -22,4 +22,6 @@ public interface RailManagementMapper extends BaseMapper<RailManagement> { ...@@ -22,4 +22,6 @@ 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 lightRailId, String lineAliasId); List<Map<String, Object>> getLineSpecialRail(String lightRailId, String lineAliasId);
Long checkRailCodeRepeat(String id, String lightRailId, String railCode);
} }
...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.SignBoardManagementVO; ...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.SignBoardManagementVO;
public interface SignBoardManagementMapper extends BaseMapper<SignBoardManagement> { public interface SignBoardManagementMapper extends BaseMapper<SignBoardManagement> {
Page<SignBoardManagementVO> queryPageList(Page<SignBoardManagementVO> pageData, SignBoardManagementDTO dto); Page<SignBoardManagementVO> queryPageList(Page<SignBoardManagementVO> pageData, SignBoardManagementDTO dto);
Long checkSignBoardCodeRepeat(String id, String lightRailId, String signBoardCode);
} }
...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.SleeperManagementVO; ...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.SleeperManagementVO;
public interface SleeperManagementMapper extends BaseMapper<SleeperManagement> { public interface SleeperManagementMapper extends BaseMapper<SleeperManagement> {
Page<SleeperManagementVO> queryPageList(Page<SleeperManagementVO> pageData, SleeperManagementDTO dto); Page<SleeperManagementVO> queryPageList(Page<SleeperManagementVO> pageData, SleeperManagementDTO dto);
Long checkSleeperCodeRepeat(String id, String lightRailId, String sleeperCode);
} }
...@@ -12,4 +12,6 @@ import org.jeecg.modules.deviceAsset.vo.SwitchManagementQueryVO; ...@@ -12,4 +12,6 @@ import org.jeecg.modules.deviceAsset.vo.SwitchManagementQueryVO;
public interface SwitchManagementMapper extends BaseMapper<SwitchManagement> { public interface SwitchManagementMapper extends BaseMapper<SwitchManagement> {
Page<SwitchManagementQueryVO> queryPageList(Page<SwitchManagementQueryVO> pageData, SwitchManagementQueryDTO dto); Page<SwitchManagementQueryVO> queryPageList(Page<SwitchManagementQueryVO> pageData, SwitchManagementQueryDTO dto);
Long checkSwitchCodeRepeat(String id, String lightRailId, String switchCode);
} }
...@@ -21,4 +21,6 @@ public interface TrackBedManagementMapper extends BaseMapper<TrackBedManagement> ...@@ -21,4 +21,6 @@ public interface TrackBedManagementMapper extends BaseMapper<TrackBedManagement>
Page<TrackBedManagementVO> queryPageList(Page<TrackBedManagementVO> pageData, TrackBedManagementDTO dto); Page<TrackBedManagementVO> queryPageList(Page<TrackBedManagementVO> pageData, TrackBedManagementDTO dto);
List<TrackBedManagement> getTrackBedById(String id); List<TrackBedManagement> getTrackBedById(String id);
Long checkTrackBedCodeRepeat(String id, String lightRailId, String trackBedCode);
} }
...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.VerticalCurveManagementVO; ...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.VerticalCurveManagementVO;
public interface VerticalCurveManagementMapper extends BaseMapper<VerticalCurveManagement> { public interface VerticalCurveManagementMapper extends BaseMapper<VerticalCurveManagement> {
Page<VerticalCurveManagementVO> queryPageList(Page<VerticalCurveManagementVO> pageData, VerticalCurveManagementDTO dto); Page<VerticalCurveManagementVO> queryPageList(Page<VerticalCurveManagementVO> pageData, VerticalCurveManagementDTO dto);
Long checkVerticalCurveCodeRepeat(String id, String lightRailId, String verticalCurveCode);
} }
...@@ -29,4 +29,22 @@ ...@@ -29,4 +29,22 @@
</if> </if>
order by t1.line_alias_id,t1.curve_mileage_zh order by t1.line_alias_id,t1.curve_mileage_zh
</select> </select>
<select id="checkCurveCodeRepeat" resultType="java.lang.Long">
SELECT
count(1)
FROM
t_da_curve_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE 1=1
<if test="id != null and id != ''">
AND t1.id != #{id}
</if>
<if test="curveCode != null and curveCode != ''">
AND t1.curve_code = #{curveCode}
</if>
<if test="lightRailId != null and lightRailId != ''">
AND t2.light_rail_id = #{lightRailId}
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -34,4 +34,21 @@ ...@@ -34,4 +34,21 @@
AND t4.status = 1 AND t4.status = 1
</where> </where>
</select> </select>
<select id="checkFastenerCodeRepeat" resultType="java.lang.Long">
SELECT
count(1)
FROM
t_da_fastener_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE 1=1
<if test="id != null and id != ''">
AND t1.id != #{id}
</if>
<if test="fastenerCode != null and fastenerCode != ''">
AND t1.fastener_code = #{fastenerCode}
</if>
<if test="lightRailId != null and lightRailId != ''">
AND t2.light_rail_id = #{lightRailId}
</if>
</select>
</mapper> </mapper>
...@@ -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 id, SELECT id,
sectionId,
unitCode, unitCode,
deviceCode, deviceCode,
startMileage, startMileage,
...@@ -36,8 +37,8 @@ ...@@ -36,8 +37,8 @@
type, type,
typeName typeName
FROM ( FROM (
<!-- SELECT t1.id,
SELECT t1.id, t1.section_id sectionId,
t1.unit_code unitCode, t1.unit_code unitCode,
t1.rail_code deviceCode, t1.rail_code deviceCode,
t1.starting_mileage startMileage, t1.starting_mileage startMileage,
...@@ -50,8 +51,9 @@ ...@@ -50,8 +51,9 @@
AND t1.light_rail_id = #{lightRailId} AND t1.light_rail_id = #{lightRailId}
UNION ALL UNION ALL
-->
SELECT t1.id, SELECT t1.id,
t1.section_id sectionId,
t1.unit_code unitCode, t1.unit_code unitCode,
t1.curve_code deviceCode, t1.curve_code deviceCode,
t1.curve_mileage_zh startMileage, t1.curve_mileage_zh startMileage,
...@@ -67,6 +69,7 @@ ...@@ -67,6 +69,7 @@
UNION ALL UNION ALL
SELECT t1.id, SELECT t1.id,
t1.section_id sectionId,
t1.unit_code unitCode, t1.unit_code unitCode,
t1.vertical_curve_code deviceCode, t1.vertical_curve_code deviceCode,
t1.starting_mileage startMileage, t1.starting_mileage startMileage,
...@@ -82,6 +85,7 @@ ...@@ -82,6 +85,7 @@
UNION ALL UNION ALL
SELECT t1.id, SELECT t1.id,
t2.section_id sectionId,
t1.unit_code unitCode, t1.unit_code unitCode,
t1.switch_code deviceCode, t1.switch_code deviceCode,
t1.byroad_pre_mileage startMileage, t1.byroad_pre_mileage startMileage,
...@@ -97,4 +101,21 @@ ...@@ -97,4 +101,21 @@
) t ) t
ORDER BY t.startMileage ORDER BY t.startMileage
</select> </select>
<select id="checkRailCodeRepeat" resultType="java.lang.Long">
SELECT
count(1)
FROM
t_da_rail_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE 1=1
<if test="id != null and id != ''">
AND t1.id != #{id}
</if>
<if test="railCode != null and railCode != ''">
AND t1.rail_code = #{railCode}
</if>
<if test="lightRailId != null and lightRailId != ''">
AND t2.light_rail_id = #{lightRailId}
</if>
</select>
</mapper> </mapper>
...@@ -29,4 +29,21 @@ ...@@ -29,4 +29,21 @@
AND t3.status = 1 AND t3.status = 1
</where> </where>
</select> </select>
<select id="checkSignBoardCodeRepeat" resultType="java.lang.Long">
SELECT
count(1)
FROM
t_da_sign_board_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE 1=1
<if test="id != null and id != ''">
AND t1.id != #{id}
</if>
<if test="signBoardCode != null and signBoardCode != ''">
AND t1.sign_board_code = #{signBoardCode}
</if>
<if test="lightRailId != null and lightRailId != ''">
AND t2.light_rail_id = #{lightRailId}
</if>
</select>
</mapper> </mapper>
...@@ -34,4 +34,21 @@ ...@@ -34,4 +34,21 @@
AND t4.status = 1 AND t4.status = 1
</where> </where>
</select> </select>
<select id="checkSleeperCodeRepeat" resultType="java.lang.Long">
SELECT
count(1)
FROM
t_da_sleeper_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE 1=1
<if test="id != null and id != ''">
AND t1.id != #{id}
</if>
<if test="sleeperCode != null and sleeperCode != ''">
AND t1.sleeper_code = #{sleeperCode}
</if>
<if test="lightRailId != null and lightRailId != ''">
AND t2.light_rail_id = #{lightRailId}
</if>
</select>
</mapper> </mapper>
...@@ -37,4 +37,22 @@ ...@@ -37,4 +37,22 @@
AND t4.status = 1 AND t4.status = 1
</where> </where>
</select> </select>
<select id="checkSwitchCodeRepeat" resultType="java.lang.Long">
SELECT
count(1)
FROM
t_da_switch_management t1
LEFT JOIN t_sn_section_station_map t2 ON t1.section_station_map_id = t2.id
WHERE 1=1
<if test="id != null and id != ''">
AND t1.id != #{id}
</if>
<if test="switchCode != null and switchCode != ''">
AND t1.switch_code = #{switchCode}
</if>
<if test="lightRailId != null and lightRailId != ''">
AND t2.light_rail_id = #{lightRailId}
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -37,4 +37,21 @@ ...@@ -37,4 +37,21 @@
LEFT JOIN t_da_track_bed_management t2 ON t1.trak_bed_management_id = t2.id LEFT JOIN t_da_track_bed_management t2 ON t1.trak_bed_management_id = t2.id
WHERE t1.records_master_check_id = #{id} WHERE t1.records_master_check_id = #{id}
</select> </select>
<select id="checkTrackBedCodeRepeat" resultType="java.lang.Long">
SELECT
count(1)
FROM
t_da_track_bed_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE 1=1
<if test="id != null and id != ''">
AND t1.id != #{id}
</if>
<if test="trackBedCode != null and trackBedCode != ''">
AND t1.track_bed_code = #{trackBedCode}
</if>
<if test="lightRailId != null and lightRailId != ''">
AND t2.light_rail_id = #{lightRailId}
</if>
</select>
</mapper> </mapper>
...@@ -29,4 +29,22 @@ ...@@ -29,4 +29,22 @@
AND t3.status = 1 AND t3.status = 1
</where> </where>
</select> </select>
<select id="checkVerticalCurveCodeRepeat" resultType="java.lang.Long">
SELECT
count(1)
FROM
t_da_vertical_curve_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
WHERE 1=1
<if test="id != null and id != ''">
AND t1.id != #{id}
</if>
<if test="verticalCurveCode != null and verticalCurveCode != ''">
AND t1.vertical_curve_code = #{verticalCurveCode}
</if>
<if test="lightRailId != null and lightRailId != ''">
AND t2.light_rail_id = #{lightRailId}
</if>
</select>
</mapper> </mapper>
...@@ -14,4 +14,6 @@ public interface ICurveManagementService extends IService<CurveManagement> { ...@@ -14,4 +14,6 @@ public interface ICurveManagementService extends IService<CurveManagement> {
Page<CurveManagementQueryVO> queryPageList(Page<CurveManagementQueryVO> pageData, CurveManagementDTO dto); Page<CurveManagementQueryVO> queryPageList(Page<CurveManagementQueryVO> pageData, CurveManagementDTO dto);
void edit(CurveManagement curveManagement); void edit(CurveManagement curveManagement);
Long checkCurveCodeRepeat(String id, String lightRailId, String curveCode);
} }
...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.FastenerManagementVO; ...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.FastenerManagementVO;
public interface IFastenerManagementService extends IService<FastenerManagement> { public interface IFastenerManagementService extends IService<FastenerManagement> {
Page<FastenerManagementVO> queryPageList(Page<FastenerManagementVO> pageData, FastenerManagementDTO dto); Page<FastenerManagementVO> queryPageList(Page<FastenerManagementVO> pageData, FastenerManagementDTO dto);
Long checkFastenerCodeRepeat(String id, String lightRailId, String fastenerCode);
} }
...@@ -25,10 +25,16 @@ public interface IRailManagementService extends IService<RailManagement> { ...@@ -25,10 +25,16 @@ public interface IRailManagementService extends IService<RailManagement> {
void intelligentGeneration(String lightRailId); void intelligentGeneration(String lightRailId);
void intelligentGeneration(String lightRailId,String lineAliasId);
/** /**
* 获取线路的特殊钢轨 * 获取线路的特殊钢轨
* *
* @param lineAliasId 线别ID * @param lineAliasId 线别ID
*/ */
List<Map<String, Object>> getLineSpecialRail(String lightRailId, String lineAliasId); List<Map<String, Object>> getLineSpecialRail(String lightRailId, String lineAliasId);
Long checkRailCodeRepeat(String id, String lightRailId, String railCode);
Map<String, Object> getAddParams(String lightRailId, String lineAliasId, String sectionId);
} }
...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.SignBoardManagementVO; ...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.SignBoardManagementVO;
public interface ISignBoardManagementService extends IService<SignBoardManagement> { public interface ISignBoardManagementService extends IService<SignBoardManagement> {
Page<SignBoardManagementVO> queryPageList(Page<SignBoardManagementVO> pageData, SignBoardManagementDTO dto); Page<SignBoardManagementVO> queryPageList(Page<SignBoardManagementVO> pageData, SignBoardManagementDTO dto);
Long checkSignBoardCodeRepeat(String id, String lightRailId, String signBoardCode);
} }
...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.SleeperManagementVO; ...@@ -17,4 +17,6 @@ import org.jeecg.modules.deviceAsset.vo.SleeperManagementVO;
public interface ISleeperManagementService extends IService<SleeperManagement> { public interface ISleeperManagementService extends IService<SleeperManagement> {
Page<SleeperManagementVO> queryPageList(Page<SleeperManagementVO> pageData, SleeperManagementDTO dto); Page<SleeperManagementVO> queryPageList(Page<SleeperManagementVO> pageData, SleeperManagementDTO dto);
Long checkSleeperCodeRepeat(String id, String lightRailId, String sleeperCode);
} }
...@@ -17,4 +17,6 @@ public interface ISwitchManagementService extends IService<SwitchManagement> { ...@@ -17,4 +17,6 @@ public interface ISwitchManagementService extends IService<SwitchManagement> {
Page<SwitchManagementQueryVO> queryPageList(Page<SwitchManagementQueryVO> pageData, SwitchManagementQueryDTO dto); Page<SwitchManagementQueryVO> queryPageList(Page<SwitchManagementQueryVO> pageData, SwitchManagementQueryDTO dto);
void edit(SwitchManagement switchManagement); void edit(SwitchManagement switchManagement);
Long checkSwitchCodeRepeat(String id, String lightRailId, String switchCode);
} }
...@@ -23,4 +23,6 @@ public interface ITrackBedManagementService extends IService<TrackBedManagement> ...@@ -23,4 +23,6 @@ public interface ITrackBedManagementService extends IService<TrackBedManagement>
List<TrackBedManagement> queryList(); List<TrackBedManagement> queryList();
List<TrackBedManagement> getTrackBedById(String id); List<TrackBedManagement> getTrackBedById(String id);
Long checkTrackBedCodeRepeat(String id, String lightRailId, String trackBedCode);
} }
...@@ -19,4 +19,6 @@ public interface IVerticalCurveManagementService extends IService<VerticalCurveM ...@@ -19,4 +19,6 @@ public interface IVerticalCurveManagementService extends IService<VerticalCurveM
Page<VerticalCurveManagementVO> queryPageList(Page<VerticalCurveManagementVO> pageData, VerticalCurveManagementDTO dto); Page<VerticalCurveManagementVO> queryPageList(Page<VerticalCurveManagementVO> pageData, VerticalCurveManagementDTO dto);
void edit(VerticalCurveManagement verticalCurveManagement); void edit(VerticalCurveManagement verticalCurveManagement);
Long checkVerticalCurveCodeRepeat(String id, String lightRailId, String curveCode);
} }
...@@ -47,4 +47,9 @@ public class CurveManagementServiceImpl extends ServiceImpl<CurveManagementMappe ...@@ -47,4 +47,9 @@ public class CurveManagementServiceImpl extends ServiceImpl<CurveManagementMappe
} }
} }
@Override
public Long checkCurveCodeRepeat(String id, String lightRailId, String curveCode) {
return this.baseMapper.checkCurveCodeRepeat(id,lightRailId,curveCode);
}
} }
...@@ -24,4 +24,9 @@ public class FastenerManagementServiceImpl extends ServiceImpl<FastenerManagemen ...@@ -24,4 +24,9 @@ public class FastenerManagementServiceImpl extends ServiceImpl<FastenerManagemen
public Page<FastenerManagementVO> queryPageList(Page<FastenerManagementVO> pageData, FastenerManagementDTO dto) { public Page<FastenerManagementVO> queryPageList(Page<FastenerManagementVO> pageData, FastenerManagementDTO dto) {
return this.baseMapper.queryPageList(pageData, dto); return this.baseMapper.queryPageList(pageData, dto);
} }
@Override
public Long checkFastenerCodeRepeat(String id, String lightRailId, String fastenerCode) {
return this.baseMapper.checkFastenerCodeRepeat(id,lightRailId,fastenerCode);
}
} }
...@@ -24,4 +24,9 @@ public class SignBoardManagementServiceImpl extends ServiceImpl<SignBoardManagem ...@@ -24,4 +24,9 @@ public class SignBoardManagementServiceImpl extends ServiceImpl<SignBoardManagem
public Page<SignBoardManagementVO> queryPageList(Page<SignBoardManagementVO> pageData, SignBoardManagementDTO dto) { public Page<SignBoardManagementVO> queryPageList(Page<SignBoardManagementVO> pageData, SignBoardManagementDTO dto) {
return this.baseMapper.queryPageList(pageData,dto); return this.baseMapper.queryPageList(pageData,dto);
} }
@Override
public Long checkSignBoardCodeRepeat(String id, String lightRailId, String signBoardCode) {
return this.baseMapper.checkSignBoardCodeRepeat(id,lightRailId,signBoardCode);
}
} }
...@@ -24,4 +24,9 @@ public class SleeperManagementServiceImpl extends ServiceImpl<SleeperManagementM ...@@ -24,4 +24,9 @@ public class SleeperManagementServiceImpl extends ServiceImpl<SleeperManagementM
public Page<SleeperManagementVO> queryPageList(Page<SleeperManagementVO> pageData, SleeperManagementDTO dto) { public Page<SleeperManagementVO> queryPageList(Page<SleeperManagementVO> pageData, SleeperManagementDTO dto) {
return this.baseMapper.queryPageList(pageData, dto); return this.baseMapper.queryPageList(pageData, dto);
} }
@Override
public Long checkSleeperCodeRepeat(String id, String lightRailId, String sleeperCode) {
return this.baseMapper.checkSleeperCodeRepeat(id,lightRailId,sleeperCode);
}
} }
...@@ -44,4 +44,9 @@ public class SwitchManagementServiceImpl extends ServiceImpl<SwitchManagementMap ...@@ -44,4 +44,9 @@ public class SwitchManagementServiceImpl extends ServiceImpl<SwitchManagementMap
this.updateById(switchManagement); this.updateById(switchManagement);
} }
} }
@Override
public Long checkSwitchCodeRepeat(String id, String lightRailId, String switchCode) {
return this.baseMapper.checkSwitchCodeRepeat(id,lightRailId,switchCode);
}
} }
...@@ -24,7 +24,7 @@ public class TrackBedManagementServiceImpl extends ServiceImpl<TrackBedManagemen ...@@ -24,7 +24,7 @@ public class TrackBedManagementServiceImpl extends ServiceImpl<TrackBedManagemen
@Override @Override
public Page<TrackBedManagementVO> queryPageList(Page<TrackBedManagementVO> pageData, TrackBedManagementDTO dto) { public Page<TrackBedManagementVO> queryPageList(Page<TrackBedManagementVO> pageData, TrackBedManagementDTO dto) {
return this.baseMapper.queryPageList(pageData,dto); return this.baseMapper.queryPageList(pageData, dto);
} }
@Override @Override
...@@ -36,4 +36,9 @@ public class TrackBedManagementServiceImpl extends ServiceImpl<TrackBedManagemen ...@@ -36,4 +36,9 @@ public class TrackBedManagementServiceImpl extends ServiceImpl<TrackBedManagemen
public List<TrackBedManagement> getTrackBedById(String id) { public List<TrackBedManagement> getTrackBedById(String id) {
return this.baseMapper.getTrackBedById(id); return this.baseMapper.getTrackBedById(id);
} }
@Override
public Long checkTrackBedCodeRepeat(String id, String lightRailId, String trackBedCode) {
return this.baseMapper.checkTrackBedCodeRepeat(id, lightRailId, trackBedCode);
}
} }
...@@ -39,4 +39,9 @@ public class VerticalCurveManagementServiceImpl extends ServiceImpl<VerticalCurv ...@@ -39,4 +39,9 @@ public class VerticalCurveManagementServiceImpl extends ServiceImpl<VerticalCurv
this.updateById(verticalCurveManagement); this.updateById(verticalCurveManagement);
} }
} }
@Override
public Long checkVerticalCurveCodeRepeat(String id, String lightRailId, String verticalCurveCode) {
return this.baseMapper.checkVerticalCurveCodeRepeat(id,lightRailId,verticalCurveCode);
}
} }
...@@ -138,16 +138,15 @@ public class WorkBatchController extends JeecgController<WorkBatch, IWorkBatchSe ...@@ -138,16 +138,15 @@ public class WorkBatchController extends JeecgController<WorkBatch, IWorkBatchSe
public Result<WorkUnitDeviceModifyVO> getUnitDeviceModify(String workBatchDetailId) { public Result<WorkUnitDeviceModifyVO> getUnitDeviceModify(String workBatchDetailId) {
WorkBatchDetail workBatchDetail = workBatchDetailService.getById(workBatchDetailId); WorkBatchDetail workBatchDetail = workBatchDetailService.getById(workBatchDetailId);
WorkUnitDeviceModifyVO vo = new WorkUnitDeviceModifyVO(); WorkUnitDeviceModifyVO vo = new WorkUnitDeviceModifyVO();
vo.setWorkBatchDetailId(workBatchDetail.getId()); vo.setWorkBatchDetailId(workBatchDetail.getId());
vo.setReformRemark(workBatchDetail.getReformRemark());
List<WorkBatchDetailModifyVO> detailList = workBatchDetailModifyService.getUnitDeviceModify(workBatchDetailId);
vo.setDetailList(detailList);
if (ObjectUtil.isNotEmpty(workBatchDetail)) {
List<WorkBatchDetailModifyVO> detailList = workBatchDetailModifyService.getUnitDeviceModify(workBatchDetailId);
vo.setDetailList(detailList);
}
return Result.ok(vo); return Result.ok(vo);
} }
} }
...@@ -113,6 +113,10 @@ public class WorkBatchDetail implements Serializable { ...@@ -113,6 +113,10 @@ public class WorkBatchDetail implements Serializable {
@TableField("reform_remark") @TableField("reform_remark")
private String reformRemark; private String reformRemark;
@ApiModelProperty("维修日期")
@TableField("maintenance_date")
private Date maintenanceDate;
@ApiModelProperty("维修建议") @ApiModelProperty("维修建议")
@TableField("remark") @TableField("remark")
private String remark; private String remark;
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
t1.unit_score_level, t1.unit_score_level,
t1.unit_score_level_str, t1.unit_score_level_str,
t1.unit_score, t1.unit_score,
t1.reform_remark,
t1.remark t1.remark
FROM t_mw_work_batch_detail t1 FROM t_mw_work_batch_detail t1
WHERE t1.work_batch_id in WHERE t1.work_batch_id in
......
...@@ -124,6 +124,8 @@ ...@@ -124,6 +124,8 @@
SELECT SELECT
t1.workBatchDetailId, t1.workBatchDetailId,
t1.unit_id, t1.unit_id,
t1.maintenance_date,
t1.reform_remark,
t2.id workBatchId, t2.id workBatchId,
t2.create_by, t2.create_by,
t2.create_time, t2.create_time,
...@@ -143,7 +145,7 @@ ...@@ -143,7 +145,7 @@
t2.work_status, t2.work_status,
t2.del_flag t2.del_flag
FROM FROM
( SELECT work_batch_id, unit_id, unit_type,id as workBatchDetailId FROM t_mw_work_batch_detail WHERE unit_id = #{dto.unitId} AND unit_type = #{dto.unitType} ) t1 ( SELECT work_batch_id, unit_id, unit_type,id as workBatchDetailId ,maintenance_date,reform_remark FROM t_mw_work_batch_detail WHERE unit_id = #{dto.unitId} AND unit_type = #{dto.unitType} ) t1
LEFT JOIN t_mw_work_batch t2 ON t1.work_batch_id = t2.id AND t2.del_flag = '0' LEFT JOIN t_mw_work_batch t2 ON t1.work_batch_id = t2.id AND t2.del_flag = '0'
ORDER BY t2.create_time ORDER BY t2.create_time
</select> </select>
......
...@@ -75,6 +75,9 @@ public class WorkBatchDetailVO { ...@@ -75,6 +75,9 @@ public class WorkBatchDetailVO {
@ApiModelProperty("备注") @ApiModelProperty("备注")
private String remark; private String remark;
@ApiModelProperty("整改备注")
private String reformRemark;
@ApiModelProperty("超限list") @ApiModelProperty("超限list")
private List<AnalysisBatchUnitDeviceTransfiniteVO> transfiniteList; private List<AnalysisBatchUnitDeviceTransfiniteVO> transfiniteList;
} }
...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -22,9 +23,6 @@ public class WorkUnitDeviceModifyVO implements Serializable { ...@@ -22,9 +23,6 @@ public class WorkUnitDeviceModifyVO implements Serializable {
@ApiModelProperty("作业计划详情id") @ApiModelProperty("作业计划详情id")
private String workBatchDetailId; private String workBatchDetailId;
@ApiModelProperty("整改备注")
private String reformRemark;
@ApiModelProperty("整改详情") @ApiModelProperty("整改详情")
private List<WorkBatchDetailModifyVO> detailList; private List<WorkBatchDetailModifyVO> detailList;
} }
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<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,
'3' level, '4' level,
concat(t.light_rail_id, '-', t.line_alias_id) parent, concat(t.light_rail_id, '-', t.line_alias_id) parent,
t.line_alias_id, t.line_alias_id,
t3.line_alias_code, t3.line_alias_code,
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
</select> </select>
<select id="getTreeTrainStationList" resultType="org.jeecg.modules.subwayNetwork.vo.SectionStationNode"> <select id="getTreeTrainStationList" resultType="org.jeecg.modules.subwayNetwork.vo.SectionStationNode">
SELECT SELECT
concat(t2.section_id,'-',t1.id) id, t1.id,
t1.station_name label, t1.station_name label,
'3' level, '4' level,
concat(t1.light_rail_id,'-',t1.line_alias_id) parent, concat(t1.light_rail_id,'-',t1.line_alias_id) parent,
t1.line_alias_id, t1.line_alias_id,
t4.line_alias_code, t4.line_alias_code,
...@@ -46,8 +46,7 @@ ...@@ -46,8 +46,7 @@
t1.end_mileage endMileage, t1.end_mileage endMileage,
true isLeaf true isLeaf
FROM t_sn_train_station t1 FROM t_sn_train_station t1
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
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_line_alias t4 ON t1.line_alias_id = t4.id LEFT JOIN t_sn_line_alias t4 ON t1.line_alias_id = t4.id
WHERE t3.status = 1 WHERE t3.status = 1
ORDER BY startMileage,line_alias_id ORDER BY startMileage,line_alias_id
......
package org.jeecg.modules.subwayNetwork.service.impl; package org.jeecg.modules.subwayNetwork.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
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;
...@@ -20,6 +24,7 @@ import org.springframework.stereotype.Service; ...@@ -20,6 +24,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -109,9 +114,20 @@ public class LightRailServiceImpl extends ServiceImpl<LightRailMapper, LightRail ...@@ -109,9 +114,20 @@ public class LightRailServiceImpl extends ServiceImpl<LightRailMapper, LightRail
} }
/** /**
* 首页的树结构请修改为“线路->线别->车站、区间”这种树型结构 * 格式:
* <p> * 线路1
* 车站1、车站1~车站2区间、车站2 * |_
* 线别1
* |_
* | 车站
* | |_车站1
* | ...
* | |_车站n
* |_
* 区间
* |_区间1
* ...
* |_区间n
* *
* @return * @return
*/ */
...@@ -161,6 +177,132 @@ public class LightRailServiceImpl extends ServiceImpl<LightRailMapper, LightRail ...@@ -161,6 +177,132 @@ public class LightRailServiceImpl extends ServiceImpl<LightRailMapper, LightRail
} }
// 2.2 // 2.2
// 2.2.1 组装区间
if (ObjectUtil.isNotEmpty(subwaySectionList)) {
// 定义一个虚拟区间map
Map<String, SectionStationNode> virtualSectionMap = new HashMap<>();
for (SectionStationNode sectionStationNode : subwaySectionList) {
SectionStationNode virtualSectionNode = virtualSectionMap.get(sectionStationNode.getParent());
if (virtualSectionNode == null) {
// 生成一个虚拟节点
virtualSectionNode = new SectionStationNode();
BeanUtil.copyProperties(sectionStationNode, virtualSectionNode);
String lineAliasId = sectionStationNode.getParent();
String virtualNodeId = "virtual_section_node_" + lineAliasId;
virtualSectionNode.setId(virtualNodeId);
virtualSectionNode.setLabel("区间");
virtualSectionNode.setLevel("3");
virtualSectionNode.setIsLeaf(false);
// 将属于这个线别的区间都归属到这个虚拟节点下面
sectionStationNode.setParent(virtualNodeId);
List<SectionStationNode> virtualSectionNodeChildren = new ArrayList<>();
virtualSectionNodeChildren.add(sectionStationNode);
virtualSectionNode.setChildren(virtualSectionNodeChildren);
virtualSectionMap.put(lineAliasId, virtualSectionNode);
} else {
// 将属于这个线别的区间都归属到这个虚拟节点下面
sectionStationNode.setParent(virtualSectionNode.getId());
virtualSectionNode.getChildren().add(sectionStationNode);
// 改变当前虚拟节点的结束和中点里程,结束里程等于最后一个节点的节点结束里程
BigDecimal startMileage = virtualSectionNode.getStartMileage();
BigDecimal centerMileage;
BigDecimal endMileage = sectionStationNode.getEndMileage();
centerMileage = startMileage.add(endMileage).divide(new BigDecimal("2"), 3, RoundingMode.HALF_UP);
virtualSectionNode.setCenterMileage(centerMileage);
virtualSectionNode.setEndMileage(endMileage);
}
}
// 将虚拟区间添加到线别
for (SectionStationNode lineAliasNode : lineAliasList) {
SectionStationNode virtualSectionNode = virtualSectionMap.get(lineAliasNode.getId());
if (null != virtualSectionNode) {
lineAliasNode.setChildren(CollectionUtil.newArrayList(virtualSectionNode));
lineAliasNode.setIsLeaf(false);
}
}
}
// 2.2.2 组装车站
if (ObjectUtil.isNotEmpty(trainStationList)) {
// 定义一个虚拟车站map
Map<String, SectionStationNode> virtualtrainStationMap = new HashMap<>();
for (SectionStationNode trainStationNode : trainStationList) {
SectionStationNode virtualTrainStationNode = virtualtrainStationMap.get(trainStationNode.getParent());
if (virtualTrainStationNode == null) {
// 生成一个虚拟节点
virtualTrainStationNode = new SectionStationNode();
BeanUtil.copyProperties(trainStationNode, virtualTrainStationNode);
String lineAliasId = trainStationNode.getParent();
String virtualNodeId = "virtual_station_node_" + lineAliasId;
virtualTrainStationNode.setId(virtualNodeId);
virtualTrainStationNode.setLabel("车站");
virtualTrainStationNode.setLevel("3");
virtualTrainStationNode.setIsLeaf(false);
// 将属于这个线别的区间都归属到这个虚拟节点下面
trainStationNode.setParent(virtualNodeId);
List<SectionStationNode> virtualTrainStationNodeChildren = new ArrayList<>();
virtualTrainStationNodeChildren.add(trainStationNode);
virtualTrainStationNode.setChildren(virtualTrainStationNodeChildren);
virtualtrainStationMap.put(lineAliasId, virtualTrainStationNode);
} else {
// 将属于这个线别的区间都归属到这个虚拟节点下面
trainStationNode.setParent(virtualTrainStationNode.getId());
virtualTrainStationNode.getChildren().add(trainStationNode);
// 改变当前虚拟节点的结束和中点里程,结束里程等于最后一个节点的节点结束里程
BigDecimal startMileage = trainStationNode.getStartMileage();
BigDecimal centerMileage;
BigDecimal endMileage = trainStationNode.getEndMileage();
centerMileage = startMileage.add(endMileage).divide(new BigDecimal("2"), 3, RoundingMode.HALF_UP);
virtualTrainStationNode.setCenterMileage(centerMileage);
virtualTrainStationNode.setEndMileage(endMileage);
}
}
// 将虚拟车站添加到线别上面
for (SectionStationNode lineAliasNode : lineAliasList) {
SectionStationNode virtualSectionNode = virtualtrainStationMap.get(lineAliasNode.getId());
if (null != virtualSectionNode) {
List<SectionStationNode> children = lineAliasNode.getChildren();
if (children == null) {
children = new ArrayList<>();
}
children.add(virtualSectionNode);
lineAliasNode.setChildren(children);
lineAliasNode.setIsLeaf(false);
}
}
}
/* // 2.2
// 2.2.1 组装车站,区间【车站1、车站1~车站2区间、车站2】 // 2.2.1 组装车站,区间【车站1、车站1~车站2区间、车站2】
Map<String, SectionStationNode> subwaySectionMap = subwaySectionList.stream().collect(Collectors.toMap(SectionStationNode::getId, value -> value)); Map<String, SectionStationNode> subwaySectionMap = subwaySectionList.stream().collect(Collectors.toMap(SectionStationNode::getId, value -> value));
Map<String, List<SectionStationNode>> subwayAndtrainStationSectionMap = new HashMap<>(); Map<String, List<SectionStationNode>> subwayAndtrainStationSectionMap = new HashMap<>();
...@@ -206,7 +348,7 @@ public class LightRailServiceImpl extends ServiceImpl<LightRailMapper, LightRail ...@@ -206,7 +348,7 @@ public class LightRailServiceImpl extends ServiceImpl<LightRailMapper, LightRail
lineAliasNode.setIsLeaf(false); lineAliasNode.setIsLeaf(false);
} }
} }
*/
return lightRailList; return lightRailList;
} }
} }
package org.jeecg.modules.system.controller; package org.jeecg.modules.system.controller;
import cn.hutool.core.io.resource.ClassPathResource;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -176,42 +177,6 @@ public class CommonController { ...@@ -176,42 +177,6 @@ public class CommonController {
return ""; return "";
} }
// @PostMapping(value = "/upload2")
// public Result<?> upload2(HttpServletRequest request, HttpServletResponse response) {
// Result<?> result = new Result<>();
// try {
// String ctxPath = uploadpath;
// String fileName = null;
// String bizPath = "files";
// String tempBizPath = request.getParameter("biz");
// if(oConvertUtils.isNotEmpty(tempBizPath)){
// bizPath = tempBizPath;
// }
// String nowday = new SimpleDateFormat("yyyyMMdd").format(new Date());
// File file = new File(ctxPath + File.separator + bizPath + File.separator + nowday);
// if (!file.exists()) {
// file.mkdirs();// 创建文件根目录
// }
// MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
// MultipartFile mf = multipartRequest.getFile("file");// 获取上传文件对象
// String orgName = mf.getOriginalFilename();// 获取文件名
// fileName = orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.indexOf("."));
// String savePath = file.getPath() + File.separator + fileName;
// File savefile = new File(savePath);
// FileCopyUtils.copy(mf.getBytes(), savefile);
// String dbpath = bizPath + File.separator + nowday + File.separator + fileName;
// if (dbpath.contains("\\")) {
// dbpath = dbpath.replace("\\", "/");
// }
// result.setMessage(dbpath);
// result.setSuccess(true);
// } catch (IOException e) {
// result.setSuccess(false);
// result.setMessage(e.getMessage());
// log.error(e.getMessage(), e);
// }
// return result;
// }
/** /**
* 预览图片&下载文件 * 预览图片&下载文件
...@@ -276,6 +241,63 @@ public class CommonController { ...@@ -276,6 +241,63 @@ public class CommonController {
} }
@GetMapping(value = "/excelTemplate/**")
@ApiOperation(value = "excelTemplate 下载", notes = "excelTemplate 下载")
public void excelTemplate(HttpServletRequest request, HttpServletResponse response) {
// ISO-8859-1 ==> UTF-8 进行编码转换
String excelPath = extractPathFromPattern(request);
if (oConvertUtils.isEmpty(excelPath) || CommonConstant.STRING_NULL.equals(excelPath)) {
return;
}
// 其余处理略
InputStream inputStream = null;
OutputStream outputStream = null;
try {
excelPath = excelPath.replace("..", "").replace("../", "");
ClassPathResource classPathResource = new ClassPathResource("templates/excel/" + excelPath);
String filePath = classPathResource.getUrl().getFile();
File file = new File(filePath);
if (!file.exists()) {
response.setStatus(404);
throw new RuntimeException("文件[" + excelPath + "]不存在..");
}
// 设置强制下载不打开
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"), "iso-8859-1"));
response.addHeader("Cache-Control", "no-cache");
inputStream = new BufferedInputStream(new FileInputStream(filePath));
outputStream = response.getOutputStream();
byte[] buf = new byte[4096];
int len;
while ((len = inputStream.read(buf)) > 0) {
outputStream.write(buf, 0, len);
}
response.flushBuffer();
} catch (IOException e) {
log.error("预览文件失败" + e.getMessage());
response.setStatus(404);
e.printStackTrace();
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
log.error(e.getMessage(), e);
}
}
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
log.error(e.getMessage(), e);
}
}
}
}
// /** // /**
// * 下载文件 // * 下载文件
// * 请求地址:http://localhost:8080/common/download/{user/20190119/e1fe9925bc315c60addea1b98eb1cb1349547719_1547866868179.jpg} // * 请求地址:http://localhost:8080/common/download/{user/20190119/e1fe9925bc315c60addea1b98eb1cb1349547719_1547866868179.jpg}
......
...@@ -43,10 +43,10 @@ public class CaseReportWorkBatchVO { ...@@ -43,10 +43,10 @@ public class CaseReportWorkBatchVO {
@ApiModelProperty("作业终止时间") @ApiModelProperty("作业终止时间")
private Date workEndTime; private Date workEndTime;
@ApiModelProperty("作业终止时间") @ApiModelProperty("作业开始里程")
private BigDecimal workStartMileage; private BigDecimal workStartMileage;
@ApiModelProperty("作业终止时间") @ApiModelProperty("做成结束里程")
private BigDecimal workEndMileage; private BigDecimal workEndMileage;
@ApiModelProperty("作业班组") @ApiModelProperty("作业班组")
...@@ -61,6 +61,12 @@ public class CaseReportWorkBatchVO { ...@@ -61,6 +61,12 @@ public class CaseReportWorkBatchVO {
@ApiModelProperty("作业单元数量") @ApiModelProperty("作业单元数量")
private Integer workUnitDeviceNum; private Integer workUnitDeviceNum;
@ApiModelProperty("维修日期")
private Date maintenanceDate;
@ApiModelProperty("整改备注")
private String reformRemark;
@ApiModelProperty("备注") @ApiModelProperty("备注")
@TableField("remark") @TableField("remark")
private String remark; private String remark;
......
...@@ -167,7 +167,7 @@ mybatis-plus: ...@@ -167,7 +167,7 @@ mybatis-plus:
table-underline: true table-underline: true
configuration: configuration:
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段 # 返回类型为Map,显示null对应的字段
call-setters-on-nulls: true call-setters-on-nulls: true
# 驼峰 # 驼峰
......
...@@ -287,6 +287,8 @@ ...@@ -287,6 +287,8 @@
<nonFilteredFileExtension>eot</nonFilteredFileExtension> <nonFilteredFileExtension>eot</nonFilteredFileExtension>
<nonFilteredFileExtension>ttf</nonFilteredFileExtension> <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
<nonFilteredFileExtension>svg</nonFilteredFileExtension> <nonFilteredFileExtension>svg</nonFilteredFileExtension>
<nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
</nonFilteredFileExtensions> </nonFilteredFileExtensions>
</configuration> </configuration>
</plugin> </plugin>
......
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