Commit ca158647 authored by hkl's avatar hkl

feat:1.修改bug

parent 063d0581
...@@ -649,8 +649,8 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec ...@@ -649,8 +649,8 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
movementCourseInfoService.lambdaUpdate() movementCourseInfoService.lambdaUpdate()
.set(jsonObject.containsKey("trackGauge"), MovementCourseInfo::getTrackCode, jsonObject.get("trackGauge")) // .set(jsonObject.containsKey("trackGauge"), MovementCourseInfo::getTrackCode, jsonObject.get("trackGauge"))
.set(jsonObject.containsKey("level"), MovementCourseInfo::getLevel, jsonObject.get("level")) .set(jsonObject.containsKey("level"), MovementCourseInfo::getLevel, jsonObject.get("level")) // 水平
.set(jsonObject.containsKey("triangularPit"), MovementCourseInfo::getTriangularPit, jsonObject.get("triangularPit")) .set(jsonObject.containsKey("triangularPit"), MovementCourseInfo::getTriangularPit, jsonObject.get("triangularPit"))
.set(jsonObject.containsKey("direction"), MovementCourseInfo::getDirection, jsonObject.get("direction")) .set(jsonObject.containsKey("direction"), MovementCourseInfo::getDirection, jsonObject.get("direction"))
.set(jsonObject.containsKey("height"), MovementCourseInfo::getHeight, jsonObject.get("height")) .set(jsonObject.containsKey("height"), MovementCourseInfo::getHeight, jsonObject.get("height"))
......
...@@ -86,7 +86,7 @@ public class AnalysisBatchController extends JeecgController<AnalysisBatch, IAna ...@@ -86,7 +86,7 @@ public class AnalysisBatchController extends JeecgController<AnalysisBatch, IAna
if (dto.getStartingMileage().compareTo(dto.getEndMileage()) > 0) { if (dto.getStartingMileage().compareTo(dto.getEndMileage()) > 0) {
throw new JeecgBootException("起始里程不能大于结束里程"); throw new JeecgBootException("起始里程不能大于结束里程");
} }
// //
AnalysisBatch exist = this.service.lambdaQuery().eq(AnalysisBatch::getAnalysisBatchCode, dto.getAnalysisBatchCode()) AnalysisBatch exist = this.service.lambdaQuery().eq(AnalysisBatch::getAnalysisBatchCode, dto.getAnalysisBatchCode())
.last("limit 1") .last("limit 1")
.one(); .one();
...@@ -108,6 +108,15 @@ public class AnalysisBatchController extends JeecgController<AnalysisBatch, IAna ...@@ -108,6 +108,15 @@ public class AnalysisBatchController extends JeecgController<AnalysisBatch, IAna
if (dto.getStartingMileage().compareTo(dto.getEndMileage()) > 0) { if (dto.getStartingMileage().compareTo(dto.getEndMileage()) > 0) {
throw new JeecgBootException("起始里程不能大于结束里程"); throw new JeecgBootException("起始里程不能大于结束里程");
} }
// 去重
AnalysisBatch exist = this.service.lambdaQuery()
.eq(AnalysisBatch::getAnalysisBatchCode, dto.getAnalysisBatchCode())
.ne(AnalysisBatch::getId, dto.getId())
.last("limit 1")
.one();
if (exist != null) {
throw new JeecgBootException("【" + dto.getAnalysisBatchCode() + "】分析批次已存在");
}
this.service.updateRecord(dto); this.service.updateRecord(dto);
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
<if test="dto.analysisBatchCode != null and dto.analysisBatchCode != ''"> <if test="dto.analysisBatchCode != null and dto.analysisBatchCode != ''">
AND t1.analysis_batch_code like concat('%',#{dto.analysisBatchCode},'%') AND t1.analysis_batch_code like concat('%',#{dto.analysisBatchCode},'%')
</if> </if>
ORDER BY update_time desc
</select> </select>
<select id="listRecordDetail" resultType="org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO"> <select id="listRecordDetail" resultType="org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO">
SELECT SELECT
......
package org.jeecg.modules.maintenanceWork.controller; package org.jeecg.modules.maintenanceWork.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;
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.dynamicStaticAnalysis.entity.AnalysisBatch;
import org.jeecg.modules.maintenanceWork.dto.*; import org.jeecg.modules.maintenanceWork.dto.*;
import org.jeecg.modules.maintenanceWork.entity.WorkBatch; import org.jeecg.modules.maintenanceWork.entity.WorkBatch;
import org.jeecg.modules.maintenanceWork.entity.WorkBatchDetail; import org.jeecg.modules.maintenanceWork.entity.WorkBatchDetail;
...@@ -58,6 +61,15 @@ public class WorkBatchController extends JeecgController<WorkBatch, IWorkBatchSe ...@@ -58,6 +61,15 @@ public class WorkBatchController extends JeecgController<WorkBatch, IWorkBatchSe
@ApiOperation(value = "维修作业管理-作业计划批次管理-维修作业管理页面新增", notes = "维修作业管理-作业计划批次管理-维修作业管理页面新增") @ApiOperation(value = "维修作业管理-作业计划批次管理-维修作业管理页面新增", notes = "维修作业管理-作业计划批次管理-维修作业管理页面新增")
@PostMapping(value = "/saveRecord") @PostMapping(value = "/saveRecord")
public Result<String> saveRecord(@RequestBody WorkBatchSaveOrUpdateDTO dto) { public Result<String> saveRecord(@RequestBody WorkBatchSaveOrUpdateDTO dto) {
// 去重
WorkBatch exist = this.service.lambdaQuery()
.eq(WorkBatch::getWorkBatchCode, dto.getWorkBatchCode())
.ne(ObjectUtil.isNotEmpty(dto.getId()), WorkBatch::getId, dto.getId())
.last("limit 1")
.one();
if (exist != null) {
throw new JeecgBootException("【" + dto.getWorkBatchCode() + "】作业批次已存在");
}
this.service.saveRecord(dto); this.service.saveRecord(dto);
...@@ -68,7 +80,13 @@ public class WorkBatchController extends JeecgController<WorkBatch, IWorkBatchSe ...@@ -68,7 +80,13 @@ public class WorkBatchController extends JeecgController<WorkBatch, IWorkBatchSe
@ApiOperation(value = "维修作业管理-作业计划批次管理-超限页面新增", notes = "维修作业管理-作业计划批次管理-超限页面新增") @ApiOperation(value = "维修作业管理-作业计划批次管理-超限页面新增", notes = "维修作业管理-作业计划批次管理-超限页面新增")
@PostMapping(value = "/transfiniteSaveRecord") @PostMapping(value = "/transfiniteSaveRecord")
public Result<String> transfiniteSaveRecord(@RequestBody WorkBatchTransfiniteSaveDTO dto) { public Result<String> transfiniteSaveRecord(@RequestBody WorkBatchTransfiniteSaveDTO dto) {
WorkBatch exist = this.service.lambdaQuery()
.eq(WorkBatch::getWorkBatchCode, dto.getWorkBatchCode())
.last("limit 1")
.one();
if (exist != null) {
throw new JeecgBootException("【" + dto.getWorkBatchCode() + "】作业批次已存在");
}
this.service.transfiniteSaveRecord(dto); this.service.transfiniteSaveRecord(dto);
return Result.OK("操作成功"); return Result.OK("操作成功");
...@@ -78,10 +96,16 @@ public class WorkBatchController extends JeecgController<WorkBatch, IWorkBatchSe ...@@ -78,10 +96,16 @@ public class WorkBatchController extends JeecgController<WorkBatch, IWorkBatchSe
@ApiOperation(value = "维修作业管理-作业计划批次管理-超限页面新增", notes = "维修作业管理-作业计划批次管理-超限页面新增") @ApiOperation(value = "维修作业管理-作业计划批次管理-超限页面新增", notes = "维修作业管理-作业计划批次管理-超限页面新增")
@PostMapping(value = "/batchSaveRecord") @PostMapping(value = "/batchSaveRecord")
public Result<String> batchSaveRecord(@RequestBody AnalysisBatchSaveDTO dto) { public Result<String> batchSaveRecord(@RequestBody AnalysisBatchSaveDTO dto) {
WorkBatch exist = this.service.lambdaQuery()
.eq(WorkBatch::getWorkBatchCode, dto.getWorkBatchCode())
.last("limit 1")
.one();
if (exist != null) {
throw new JeecgBootException("【" + dto.getWorkBatchCode() + "】作业批次已存在");
}
this.service.batchSaveRecord(dto); this.service.batchSaveRecord(dto);
return Result.OK("操作成功"); return Result.OK("操作成功");
} }
......
...@@ -34,15 +34,9 @@ public class WorkBatchDTO { ...@@ -34,15 +34,9 @@ public class WorkBatchDTO {
@ApiModelProperty("所属线路id") @ApiModelProperty("所属线路id")
private String lightRailId; private String lightRailId;
@ApiModelProperty("所属线路名称")
private String lightRailName;
@ApiModelProperty("所属线别id") @ApiModelProperty("所属线别id")
private String lineAliasId; private String lineAliasId;
@ApiModelProperty("所属线别名称")
private String lineAliasName;
@ApiModelProperty("作业终止时间") @ApiModelProperty("作业终止时间")
private Date workEndTime; private Date workEndTime;
......
...@@ -30,6 +30,12 @@ ...@@ -30,6 +30,12 @@
<if test="dto.workBatchCode != null and dto.workBatchCode != ''"> <if test="dto.workBatchCode != null and dto.workBatchCode != ''">
AND t1.work_batch_code like concat('%',#{dto.workBatchCode},'%') AND t1.work_batch_code like concat('%',#{dto.workBatchCode},'%')
</if> </if>
<if test="dto.lightRailId != null and dto.lightRailId != ''">
AND t1.light_rail_id = #{dto.lightRailId}
</if>
<if test="dto.lineAliasId != null and dto.lineAliasId != ''">
AND t1.line_alias_id = #{dto.lineAliasId}
</if>
</select> </select>
<select id="getUnitDevicePage" resultType="java.util.Map"> <select id="getUnitDevicePage" resultType="java.util.Map">
......
...@@ -33,6 +33,8 @@ import java.util.*; ...@@ -33,6 +33,8 @@ import java.util.*;
@Slf4j @Slf4j
public class LightRailController extends JeecgController<LightRail, ILightRailService> { public class LightRailController extends JeecgController<LightRail, ILightRailService> {
@AutoLog(value = "线路车站-轻轨线路-分页列表查询") @AutoLog(value = "线路车站-轻轨线路-分页列表查询")
@ApiOperation(value = "线路车站-轻轨线路-分页列表查询", notes = "线路车站-轻轨线路-分页列表查询") @ApiOperation(value = "线路车站-轻轨线路-分页列表查询", notes = "线路车站-轻轨线路-分页列表查询")
@PostMapping(value = "/list") @PostMapping(value = "/list")
...@@ -70,6 +72,9 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe ...@@ -70,6 +72,9 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe
@GetMapping(value = "/delete") @GetMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) { public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
this.service.removeById(id); this.service.removeById(id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
} }
......
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