Commit 5eb0aff9 authored by shizhilong's avatar shizhilong

Merge remote-tracking branch 'origin/dev' into dev

parents 9dacc46c 78239ed7
......@@ -101,7 +101,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
List<MovementCourse> listResult = movementCourseService.lambdaQuery()
.eq(ObjectUtil.isNotEmpty(id), MovementCourse::getMovementMasterId, id)
.eq(MovementCourse::getDelFlag, "0")
.orderByAsc(MovementCourse::getCreateTime)
.orderByAsc(MovementCourse::getSort)
.list();
List<MovementCourseVO> resultList = new ArrayList<>();
if (listResult != null) {
......@@ -125,13 +125,16 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
.eq(ObjectUtil.isNotEmpty(movementMasterId), MovementCourseInfo::getMovementMasterId, movementMasterId)
.eq(ObjectUtil.isNotEmpty(movementCourseId), MovementCourseInfo::getMovementCourseId, movementCourseId)
.eq(MovementCourseInfo::getDelFlag, "0")
.orderByDesc(MovementCourseInfo::getTrackCode)
.orderByAsc(MovementCourseInfo::getInfoSort)
.list();
//初始化最终返回的集合
List<MovementCourseInfoOneVO> resultList = new ArrayList<>();
if (listResult != null && listResult.size() > 0) {
//获取去重后的项目名称的集合
Set<String> trackCodeList = listResult.stream().map(MovementCourseInfo::getTrackCode).collect(Collectors.toSet());
Set<String> trackCodeList1 = listResult.stream().map(MovementCourseInfo::getTrackCode).collect(Collectors.toSet());
List<String> trackCodeList = trackCodeList1.stream().collect(Collectors.toList());
//针对轨号进行倒序排序
Collections.reverse(trackCodeList);
for (String code : trackCodeList) {
//初始化最终返回的对象
MovementCourseInfoOneVO resultModel = new MovementCourseInfoOneVO();
......@@ -290,6 +293,10 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
// 如果做完了一个解析就跳过
MovementCourse movementCourse = new MovementCourse();
List<MovementCourseInfo> resultList = new ArrayList<>();
//初始化里程排序
int sort = 0;
//初始化轨号排序
int infoSort = 0;
for (int i = 0; i < column; i++) {
skipColumnNum++;
if (ObjectUtil.isEmpty(startingAndEndingMileageStr)) {
......@@ -368,6 +375,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
if (ObjectUtil.isNotEmpty(longExtent)) {
movementCourse.setLongExtent(new BigDecimal(longExtent));
}
sort ++;
courseId = IdWorker.get32UUID();
movementCourse.setId(courseId);
movementCourse.setDelFlag("0");
......@@ -376,6 +384,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
movementCourse.setCreateBy(realname);
movementCourse.setUpdateBy(realname);
movementCourse.setRemark(remark);
movementCourse.setSort(sort);
movementCourseService.save(movementCourse);
}
}
......@@ -388,7 +397,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
continue;
}
if (ObjectUtil.isNotEmpty(courseId)) {
infoSort ++;
MovementCourseInfo movementCourseInfo = new MovementCourseInfo();
movementCourseInfo.setId(IdWorker.get32UUID());
movementCourseInfo.setDelFlag("0");
......@@ -398,6 +407,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
movementCourseInfo.setUpdateTime(new Date());
movementCourseInfo.setCreateBy(realname);
movementCourseInfo.setUpdateBy(realname);
movementCourseInfo.setInfoSort(infoSort);
//获取轨号
List<Object> trackCodeList = rowRecords.get(6);
String trackCode = trackCodeList.get(i).toString().trim();
......@@ -472,6 +482,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
longExtent = "";
remark = "";
courseId = "";
infoSort = 0;
movementCourse = new MovementCourse();
}
}
......
package org.jeecg.modules.checkData.equipmentCheckData.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -65,5 +66,7 @@ public class MovementCourseDTO {
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
private String delFlag;
@ApiModelProperty("排序")
private Integer sort;
}
package org.jeecg.modules.checkData.equipmentCheckData.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -71,5 +72,6 @@ public class MovementCourseInfoDTO {
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
private String delFlag;
@ApiModelProperty("导入顺序")
private Integer infoSort;
}
......@@ -94,5 +94,8 @@ public class MovementCourse implements Serializable {
@TableField("del_flag")
private String delFlag;
@ApiModelProperty("排序")
@TableField("sort")
private Integer sort;
}
......@@ -102,5 +102,8 @@ public class MovementCourseInfo implements Serializable {
@TableField("del_flag")
private String delFlag;
@ApiModelProperty("导入顺序")
@TableField("info_sort")
private Integer infoSort;
}
......@@ -77,5 +77,6 @@ public class MovementCourseInfoVO {
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
private String delFlag;
@ApiModelProperty("导入顺序")
private Integer infoSort;
}
......@@ -71,5 +71,6 @@ public class MovementCourseVO {
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
private String delFlag;
@ApiModelProperty("排序")
private Integer sort;
}
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