Commit ca158647 authored by hkl's avatar hkl

feat:1.修改bug

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