Commit a263cc96 authored by hkl's avatar hkl

Merge branch 'dev-hkl' into 'dev'

feat:1.单元编号划分

See merge request !26
parents 00ee3c3e d53815de
package org.jeecg.modules.checkData.dynamicStaticGeometricData.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.checkData.dynamicStaticGeometricData.dto.RailInspectionEquipmentDTO;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipment;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentVO;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.service.IRailInspectionEquipmentService;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
/**
* <p>
* 检查数据-动静态几何尺寸数据-轨检仪静态检查数据 前端控制器
* </p>
*
* @author hkl
* @since 2023-07-16
*/
@RestController
@RequestMapping("/checkData/dynamicStaticGeometricData/railInspectionEquipment")
public class RailInspectionEquipmentController extends JeecgController<RailInspectionEquipment, IRailInspectionEquipmentService> {
@AutoLog(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-分页列表查询")
@ApiOperation(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-分页列表查询", notes = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<RailInspectionEquipmentVO>> queryPageList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
RailInspectionEquipmentDTO dto) {
Page<RailInspectionEquipmentVO> pageData = new Page<>(pageNo, pageSize);
pageData = this.service.queryPageList(pageData, dto);
return Result.OK(pageData);
}
@AutoLog(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-编辑")
@ApiOperation(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-编辑", notes = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-编辑")
@PostMapping(value = "/edit")
public Result<String> edit(@RequestBody RailInspectionEquipment railInspectionEquipment) {
this.service.edit(railInspectionEquipment);
return Result.OK("编辑成功!");
}
@AutoLog(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-通过id删除")
@ApiOperation(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-通过id删除", notes = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-通过id删除")
@GetMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
this.service.removeById(id);
return Result.OK("删除成功!");
}
@AutoLog(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-批量删除")
@ApiOperation(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-批量删除", notes = "资产管理-扣件管理-批量删除")
@GetMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.service.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
}
package org.jeecg.modules.checkData.dynamicStaticGeometricData.controller; package org.jeecg.modules.checkData.dynamicStaticGeometricData.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import io.swagger.annotations.ApiImplicitParam;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.*; 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.modules.checkData.dynamicStaticGeometricData.dto.RailInspectionEquipmentDTO; import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItem; import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItem;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetailVO; import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetailVO;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemVO; import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemVO;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentVO;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.service.IRailInspectionEquipmentItemService; import org.jeecg.modules.checkData.dynamicStaticGeometricData.service.IRailInspectionEquipmentItemService;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.jeecg.common.system.base.controller.JeecgController; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.transaction.Transactional;
import java.util.List; import java.util.List;
/** /**
...@@ -30,16 +29,17 @@ import java.util.List; ...@@ -30,16 +29,17 @@ import java.util.List;
*/ */
@RestController @RestController
@RequestMapping("/checkData/dynamicStaticGeometricData/railInspectionEquipmentItem") @RequestMapping("/checkData/dynamicStaticGeometricData/railInspectionEquipmentItem")
@ApiOperation("检查数据-动静态几何尺寸数据-轨检仪静态检查数据-检查项目")
public class RailInspectionEquipmentItemController extends JeecgController<RailInspectionEquipmentItem, IRailInspectionEquipmentItemService> { public class RailInspectionEquipmentItemController extends JeecgController<RailInspectionEquipmentItem, IRailInspectionEquipmentItemService> {
@AutoLog(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-项目列表查询") @AutoLog(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-项目列表查询")
@ApiOperation(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-项目列表查询", notes = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-项目列表查询") @ApiOperation(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-项目列表查询", notes = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-项目列表查询")
@GetMapping(value = "/list") @GetMapping(value = "/list")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "railInspectionEquipmentId", value = "轨检仪静态检查数据id") @ApiImplicitParam(name = "id", value = "轨检仪静态检查数据id")
}) })
public Result<List<RailInspectionEquipmentItemVO>> queryList(String railInspectionEquipmentId) { public Result<List<RailInspectionEquipmentItemVO>> queryList(String id) {
List<RailInspectionEquipmentItemVO> record = this.service.queryList(railInspectionEquipmentId); List<RailInspectionEquipmentItemVO> record = this.service.queryList(id);
return Result.OK(record); return Result.OK(record);
} }
...@@ -47,10 +47,10 @@ public class RailInspectionEquipmentItemController extends JeecgController<RailI ...@@ -47,10 +47,10 @@ public class RailInspectionEquipmentItemController extends JeecgController<RailI
@ApiOperation(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-项目明细列表", notes = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-项目明细列表") @ApiOperation(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-项目明细列表", notes = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-项目明细列表")
@GetMapping(value = "/detailList") @GetMapping(value = "/detailList")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "railInspectionEquipmentItemId", value = "轨检仪静态检查项目id") @ApiImplicitParam(name = "itemId", value = "轨检仪静态检查项目id")
}) })
public Result<List<RailInspectionEquipmentItemDetailVO>> detailList(String railInspectionEquipmentItemId) { public Result<List<RailInspectionEquipmentItemDetailVO>> detailList(String itemId) {
List<RailInspectionEquipmentItemDetailVO> record = this.service.detailList(railInspectionEquipmentItemId); List<RailInspectionEquipmentItemDetailVO> record = this.service.detailList(itemId);
return Result.OK(record); return Result.OK(record);
} }
...@@ -59,12 +59,12 @@ public class RailInspectionEquipmentItemController extends JeecgController<RailI ...@@ -59,12 +59,12 @@ public class RailInspectionEquipmentItemController extends JeecgController<RailI
@AutoLog(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-导入") @AutoLog(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-导入")
@ApiOperation(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-导入", notes = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-导入") @ApiOperation(value = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-导入", notes = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-导入")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "railInspectionEquipmentId", value = "轨检仪静态检查数据id"), @ApiImplicitParam(name = "id", value = "轨检仪静态检查数据id"),
@ApiImplicitParam(name = "file", value = "文件"), @ApiImplicitParam(name = "file", value = "文件"),
}) })
public Result<String> uploadFile(String railInspectionEquipmentId, MultipartFile file) { public Result<String> uploadFile(String id, MultipartFile file) {
this.service.uploadFile(railInspectionEquipmentId, file); this.service.uploadFile(id, file);
return Result.ok("操作成功"); return Result.ok("操作成功");
} }
......
package org.jeecg.modules.checkData.dynamicStaticGeometricData.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 检查数据-动静态几何尺寸数据-轨检仪静态检查数据
* </p>
*
* @author hkl
* @since 2023-07-16
*/
@Data
@ApiModel(value = "RailInspectionEquipment对象", description = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据")
public class RailInspectionEquipmentDTO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
private String id;
@ApiModelProperty("检查批次编号")
private String ekCode;
}
package org.jeecg.modules.checkData.dynamicStaticGeometricData.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 检查数据-动静态几何尺寸数据-轨检仪静态检查数据-检查项目
* </p>
*
* @author hkl
* @since 2023-07-16
*/
@Data
@ApiModel(value = "RailInspectionEquipmentItem对象", description = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-检查项目")
public class RailInspectionEquipmentItemDTO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
private String id;
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("创建日期")
private Date createTime;
@ApiModelProperty("更新人")
private String updateBy;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("动静态几何尺寸数据主表主键-》外键")
private String movementMasterId;
@ApiModelProperty("检查起始里程(m)")
private BigDecimal courseStartingMileage;
@ApiModelProperty("检查终点里程(m)")
private BigDecimal courseEndMileage;
@ApiModelProperty("曲线半径(m)")
private BigDecimal curveRadius;
@ApiModelProperty("超高(mm)")
private BigDecimal superHigh;
@ApiModelProperty("加宽(mm)")
private BigDecimal widen;
@ApiModelProperty("顺坡率(‰)")
private BigDecimal slopeRatio;
@ApiModelProperty("长度(m)")
private BigDecimal longExtent;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
private String delFlag;
@ApiModelProperty("导入排序")
private Integer sort;
}
package org.jeecg.modules.checkData.dynamicStaticGeometricData.dto;
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.Data;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 检查数据-动静态几何尺寸数据-轨检仪静态检查数据-检查项目-明细表
* </p>
*
* @author hkl
* @since 2023-07-16
*/
@Data
@ApiModel(value = "RailInspectionEquipmentItemDetail对象", description = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-检查项目-明细表")
public class RailInspectionEquipmentItemDetailDTO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
private String id;
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("创建日期")
private Date createTime;
@ApiModelProperty("更新人")
private String updateBy;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("轨检仪静态检查数据id")
private String railInspectionEquipmentId;
@ApiModelProperty("轨检仪静态检查数据检查项id")
private String railInspectionEquipmentItemId;
@ApiModelProperty("轨号")
private String trackCode;
@ApiModelProperty("测点")
private Integer measurePoint;
@ApiModelProperty("轨距")
private String trackGauge;
@ApiModelProperty("水平")
private String level;
@ApiModelProperty("三角坑")
private String triangularPit;
@ApiModelProperty("方向")
private String direction;
@ApiModelProperty("高低")
private String height;
@ApiModelProperty("结构")
private String structure;
@ApiModelProperty("整改")
private String rectification;
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
private String delFlag;
@ApiModelProperty("排序字段")
private Integer infoSort;
}
package org.jeecg.modules.checkData.dynamicStaticGeometricData.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.math.BigDecimal;
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-07-16
*/
@Getter
@Setter
@TableName("t_dsg_rail_inspection_equipment")
@ApiModel(value = "RailInspectionEquipment对象", description = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据")
public class RailInspectionEquipment 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("动态几何尺寸类型(1:人工静态检查;2:轨检仪静态检查)")
@TableField("type")
private String type;
@ApiModelProperty("检查批次编号")
@TableField("ek_code")
private String ekCode;
@ApiModelProperty("工单编号")
@TableField("work_code")
private String workCode;
@ApiModelProperty("检查区间id")
@TableField("subway_section_id")
private String subwaySectionId;
@ApiModelProperty("检查区间名称")
@TableField("subway_section_name")
private String subwaySectionName;
@ApiModelProperty("所属线路id")
@TableField("light_rail_id")
private String lightRailId;
@ApiModelProperty("所属线路名称")
@TableField("light_rail_name")
private String lightRailName;
@ApiModelProperty("所属线别id")
@TableField("line_alias_id")
private String lineAliasId;
@ApiModelProperty("所属线别名称")
@TableField("line_alias_name")
private String lineAliasName;
@ApiModelProperty("起始里程")
@TableField("starting_mileage")
private BigDecimal startingMileage;
@ApiModelProperty("终点里程")
@TableField("end_mileage")
private BigDecimal endMileage;
@ApiModelProperty("钢轨单元数量")
@TableField("rail_num")
private Integer railNum;
@ApiModelProperty("曲线数量")
@TableField("curve_num")
private Integer curveNum;
@ApiModelProperty("竖曲线数量")
@TableField("vertical_curve_num")
private Integer verticalCurveNum;
@ApiModelProperty("道岔数量")
@TableField("switch_num")
private Integer switchNum;
@ApiModelProperty("检查人姓名")
@TableField("check_by")
private String checkBy;
@ApiModelProperty("检查日期")
@TableField("check_time")
private Date checkTime;
@ApiModelProperty("审核人姓名")
@TableField("verify_by")
private String verifyBy;
@ApiModelProperty("审核时间")
@TableField("verify_time")
private Date verifyTime;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
@TableField("del_flag")
private String delFlag;
}
...@@ -56,9 +56,9 @@ public class RailInspectionEquipmentItemDetail implements Serializable { ...@@ -56,9 +56,9 @@ public class RailInspectionEquipmentItemDetail implements Serializable {
@TableField("rail_inspection_equipment_item_id") @TableField("rail_inspection_equipment_item_id")
private String railInspectionEquipmentItemId; private String railInspectionEquipmentItemId;
@ApiModelProperty("轨号") @ApiModelProperty("检查项目")
@TableField("track_code") @TableField("check_item")
private String trackCode; private String checkItem;
@ApiModelProperty("测点") @ApiModelProperty("测点")
@TableField("measure_point") @TableField("measure_point")
...@@ -76,21 +76,9 @@ public class RailInspectionEquipmentItemDetail implements Serializable { ...@@ -76,21 +76,9 @@ public class RailInspectionEquipmentItemDetail implements Serializable {
@TableField("triangular_pit") @TableField("triangular_pit")
private String triangularPit; private String triangularPit;
@ApiModelProperty("方向") @ApiModelProperty("轨向、高低及其它")
@TableField("direction") @TableField("other")
private String direction; private String other;
@ApiModelProperty("高低")
@TableField("height")
private String height;
@ApiModelProperty("结构")
@TableField("structure")
private String structure;
@ApiModelProperty("整改")
@TableField("rectification")
private String rectification;
@ApiModelProperty("是否删除(0:未删除;1:已删除)") @ApiModelProperty("是否删除(0:未删除;1:已删除)")
@TableField("del_flag") @TableField("del_flag")
......
...@@ -2,6 +2,9 @@ package org.jeecg.modules.checkData.dynamicStaticGeometricData.mapper; ...@@ -2,6 +2,9 @@ package org.jeecg.modules.checkData.dynamicStaticGeometricData.mapper;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetail; import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetailVO;
import java.util.List;
/** /**
* <p> * <p>
...@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface RailInspectionEquipmentItemDetailMapper extends BaseMapper<RailInspectionEquipmentItemDetail> { public interface RailInspectionEquipmentItemDetailMapper extends BaseMapper<RailInspectionEquipmentItemDetail> {
List<RailInspectionEquipmentItemDetailVO> detailList(String itemId);
} }
package org.jeecg.modules.checkData.dynamicStaticGeometricData.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.dto.RailInspectionEquipmentDTO;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentVO;
/**
* <p>
* 检查数据-动静态几何尺寸数据-轨检仪静态检查数据 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-07-16
*/
public interface RailInspectionEquipmentMapper extends BaseMapper<RailInspectionEquipment> {
Page<RailInspectionEquipmentVO> queryPageList(Page<RailInspectionEquipmentVO> pageData, RailInspectionEquipmentDTO dto);
}
...@@ -2,4 +2,26 @@ ...@@ -2,4 +2,26 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.checkData.dynamicStaticGeometricData.mapper.RailInspectionEquipmentItemDetailMapper"> <mapper namespace="org.jeecg.modules.checkData.dynamicStaticGeometricData.mapper.RailInspectionEquipmentItemDetailMapper">
<select id="detailList"
resultType="org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetailVO">
SELECT
t1.id,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.rail_inspection_equipment_id,
t1.rail_inspection_equipment_item_id,
t1.check_item,
t1.measure_point,
t1.track_gauge,
t1.level,
t1.triangular_pit,
t1.other,
t1.del_flag,
t1.info_sort
FROM
t_dsg_rail_inspection_equipment_item_detail t1
WHERE rail_inspection_equipment_item_id = #{itemId}
</select>
</mapper> </mapper>
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
resultType="org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemVO"> resultType="org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemVO">
SELECT SELECT
t1.id, t1.id,
t1.id itemId,
t1.create_by, t1.create_by,
t1.create_time, t1.create_time,
t1.update_by, t1.update_by,
......
<?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.checkData.dynamicStaticGeometricData.mapper.RailInspectionEquipmentMapper">
<select id="queryPageList"
resultType="org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentVO">
SELECT
t1.id,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.type,
t1.ek_code,
t1.work_code,
t1.subway_section_id,
t1.subway_section_name,
t1.light_rail_id,
t1.light_rail_name,
t1.line_alias_id,
t1.line_alias_name,
t1.starting_mileage,
t1.end_mileage,
t1.rail_num,
t1.curve_num,
t1.vertical_curve_num,
t1.switch_num,
t1.check_by,
t1.check_time,
t1.verify_by,
t1.verify_time,
t1.remark,
t1.del_flag
FROM t_dsg_rail_inspection_equipment t1
WHERE t1.del_flag = '0'
<if test="dto.ekCode != null and dto.ekCode != ''">
AND t1.ek_code like concat('%',#{dto.ekCode},'%')
</if>
<if test="dto.subwaySectionId != null and dto.subwaySectionId != ''">
AND t1.subway_section_id = #{dto.subwaySectionId}
</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>
order by t1.create_time desc
</select>
</mapper>
...@@ -18,9 +18,9 @@ import java.util.List; ...@@ -18,9 +18,9 @@ import java.util.List;
*/ */
public interface IRailInspectionEquipmentItemService extends IService<RailInspectionEquipmentItem> { public interface IRailInspectionEquipmentItemService extends IService<RailInspectionEquipmentItem> {
List<RailInspectionEquipmentItemVO> queryList(String railInspectionEquipmentId); List<RailInspectionEquipmentItemVO> queryList(String masterId);
void uploadFile(String railInspectionEquipmentId, MultipartFile file); void uploadFile(String masterId, MultipartFile file);
List<RailInspectionEquipmentItemDetailVO> detailList(String railInspectionEquipmentItemId); List<RailInspectionEquipmentItemDetailVO> detailList(String masterId);
} }
package org.jeecg.modules.checkData.dynamicStaticGeometricData.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.dto.RailInspectionEquipmentDTO;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipment;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentVO;
/**
* <p>
* 检查数据-动静态几何尺寸数据-轨检仪静态检查数据 服务类
* </p>
*
* @author hkl
* @since 2023-07-16
*/
public interface IRailInspectionEquipmentService extends IService<RailInspectionEquipment> {
Page<RailInspectionEquipmentVO> queryPageList(Page<RailInspectionEquipmentVO> pageData, RailInspectionEquipmentDTO dto);
void edit(RailInspectionEquipment railInspectionEquipment);
}
package org.jeecg.modules.checkData.dynamicStaticGeometricData.service.impl; package org.jeecg.modules.checkData.dynamicStaticGeometricData.service.impl;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItem; import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItem;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetail; import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetail;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetailVO; import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentItemDetailVO;
...@@ -13,6 +19,9 @@ import org.springframework.stereotype.Service; ...@@ -13,6 +19,9 @@ import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -30,23 +39,156 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp ...@@ -30,23 +39,156 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
private RailInspectionEquipmentItemDetailMapper railInspectionEquipmentItemDetailMapper; private RailInspectionEquipmentItemDetailMapper railInspectionEquipmentItemDetailMapper;
@Override @Override
public List<RailInspectionEquipmentItemVO> queryList(String railInspectionEquipmentId) { public List<RailInspectionEquipmentItemVO> queryList(String masterId) {
return this.baseMapper.queryList(railInspectionEquipmentId); return this.baseMapper.queryList(masterId);
} }
@Override @Override
public void uploadFile(String railInspectionEquipmentId, MultipartFile file) { public void uploadFile(String masterId, MultipartFile file) {
throw new NullPointerException(); try {
//读取第一个sheet页的数据
ExcelReader reader = ExcelUtil.getReader(file.getInputStream(), 0);
//读取Excel中所有的数据,以行保存
List<List<Object>> rowRecords = reader.read();
List<RailInspectionEquipmentItem> items = new ArrayList<>();
List<RailInspectionEquipmentItemDetail> itemDetails = new ArrayList<>();
for (int i = 0; i < rowRecords.size(); ) {
List<Object> cols = rowRecords.get(i);
String titleHeader = Convert.toStr(cols.get(1));
if (ObjectUtil.isNotEmpty(titleHeader) && (titleHeader.contains("杭地2号") || titleHeader.contains("正线"))) {
// 检查起始里程
BigDecimal courseStartingMileage = Convert.toBigDecimal(cols.get(3));
// 检查终点里程
BigDecimal courseEndMileage = Convert.toBigDecimal(cols.get(6));
// 曲线半径
BigDecimal curveRadius = null;
if (ObjectUtil.isNotEmpty(cols.get(18).toString().trim())) {
curveRadius = Convert.toBigDecimal(cols.get(18).toString().trim());
}
// 超高
BigDecimal superHigh = null;
if (ObjectUtil.isNotEmpty(cols.get(22).toString().trim())) {
superHigh = Convert.toBigDecimal(cols.get(22).toString().trim());
}
// 顺坡率
BigDecimal slopeRatio = null;
if (ObjectUtil.isNotEmpty(cols.get(28).toString().trim())) {
slopeRatio = Convert.toBigDecimal(cols.get(28).toString().trim());
} }
RailInspectionEquipmentItem item = new RailInspectionEquipmentItem();
item.setId(UUIDGenerator.generate());
item.setCourseStartingMileage(courseStartingMileage);
item.setCourseEndMileage(courseEndMileage);
item.setCurveRadius(curveRadius);
item.setSuperHigh(superHigh);
item.setSlopeRatio(slopeRatio);
items.add(item);
@Override
public List<RailInspectionEquipmentItemDetailVO> detailList(String railInspectionEquipmentItemId) {
LambdaQueryWrapper<RailInspectionEquipmentItemDetail> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(RailInspectionEquipmentItemDetail::getRailInspectionEquipmentItemId,railInspectionEquipmentItemId);
int skipRow = analysisItemDetail(i, titleHeader, item.getId(), rowRecords, itemDetails);
i = i + skipRow;
}
}
for (int i = 0; i < items.size(); i++) {
RailInspectionEquipmentItem item = items.get(i);
item.setSort(i + 1);
item.setDelFlag("0");
item.setRailInspectionEquipmentId(masterId);
}
// 项目信息-先删除,再导入
this.lambdaUpdate().eq(RailInspectionEquipmentItem::getRailInspectionEquipmentId, masterId).remove();
LambdaQueryWrapper<RailInspectionEquipmentItemDetail> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(RailInspectionEquipmentItemDetail::getRailInspectionEquipmentId, masterId);
railInspectionEquipmentItemDetailMapper.delete(queryWrapper);
this.saveBatch(items);
itemDetails.forEach(itemDetail -> {
itemDetail.setRailInspectionEquipmentId(masterId);
railInspectionEquipmentItemDetailMapper.insert(itemDetail);
});
} catch (IOException io) {
log.error("读取文件失败");
}
}
private int analysisItemDetail(int rows, String titleHeader, String itemId, List<List<Object>> rowRecords, List<RailInspectionEquipmentItemDetail> itemDetails) {
// 解析检查项目:3行:跳过2行不解析
List<Object> checkItems = rowRecords.get(rows + 2);
// 解析规矩轨距:1行
List<Object> trackGauges = rowRecords.get(rows + 4);
// 解析水平 :1行
List<Object> levels = rowRecords.get(rows + 5);
// 解析三角坑:1行
List<Object> triangularPits = rowRecords.get(rows + 6);
// 解析轨向、高低及其它 1行
List<Object> others = rowRecords.get(rows + 7);
List<RailInspectionEquipmentItemDetail> itemDetails = railInspectionEquipmentItemDetailMapper.selectList(lambdaQueryWrapper);
return null; int measurePoint = 1;
int sort = 1;
for (int i = 2; i < 32; i++) {
RailInspectionEquipmentItemDetail itemDetail = new RailInspectionEquipmentItemDetail();
itemDetail.setId(UUIDGenerator.generate());
itemDetail.setRailInspectionEquipmentItemId(itemId);
// 检查项目
String checkItem = checkItems.get(i).toString();
itemDetail.setCheckItem(checkItem);
//轨距
String trackGauge = trackGauges.get(i).toString();
itemDetail.setTrackGauge(trackGauge);
//水平
String level = levels.get(i).toString();
itemDetail.setLevel(level);
//三角坑
String triangularPit = triangularPits.get(i).toString();
itemDetail.setTriangularPit(triangularPit);
//解析轨向、高低及其它
String other = others.get(i).toString();
itemDetail.setOther(other);
// 测点
itemDetail.setMeasurePoint(measurePoint - 1);
if (measurePoint % 10 == 0) {
measurePoint = 1;
} else {
measurePoint++;
}
itemDetail.setInfoSort(sort++);
itemDetails.add(itemDetail);
}
// 解析临修日期及内容 1行:空白不解析
// 解析轨 距 1行:空白不解析
// 解析水 平 1行:空白不解析
// 解析三角坑 1行:空白不解析
// 解析轨向、高低及其它 1行:空白不解析
// 解析临修日期及内容 1行:空白不解析
// 如果是正线解析首轮检查负责人1行
int skipRow = 14;
if (titleHeader.contains("正线")) {
skipRow = skipRow + 1;
}
return skipRow;
}
@Override
public List<RailInspectionEquipmentItemDetailVO> detailList(String itemId) {
return railInspectionEquipmentItemDetailMapper.detailList(itemId);
} }
} }
package org.jeecg.modules.checkData.dynamicStaticGeometricData.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.dto.RailInspectionEquipmentDTO;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipment;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.entity.RailInspectionEquipmentVO;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.mapper.RailInspectionEquipmentMapper;
import org.jeecg.modules.checkData.dynamicStaticGeometricData.service.IRailInspectionEquipmentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 检查数据-动静态几何尺寸数据-轨检仪静态检查数据 服务实现类
* </p>
*
* @author hkl
* @since 2023-07-16
*/
@Service
public class RailInspectionEquipmentServiceImpl extends ServiceImpl<RailInspectionEquipmentMapper, RailInspectionEquipment> implements IRailInspectionEquipmentService {
@Override
public Page<RailInspectionEquipmentVO> queryPageList(Page<RailInspectionEquipmentVO> pageData, RailInspectionEquipmentDTO dto) {
return this.baseMapper.queryPageList(pageData, dto);
}
@Override
public void edit(RailInspectionEquipment railInspectionEquipment) {
if (ObjectUtil.isEmpty(railInspectionEquipment.getId())) {
this.save(railInspectionEquipment);
} else {
this.updateById(railInspectionEquipment);
}
}
}
...@@ -10,6 +10,7 @@ import java.util.Date; ...@@ -10,6 +10,7 @@ import java.util.Date;
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.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
...@@ -21,40 +22,23 @@ import lombok.Setter; ...@@ -21,40 +22,23 @@ import lombok.Setter;
* @author hkl * @author hkl
* @since 2023-07-16 * @since 2023-07-16
*/ */
@Getter @Data
@Setter
@ApiModel(value = "RailInspectionEquipmentItemDetail对象", description = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-检查项目-明细表") @ApiModel(value = "RailInspectionEquipmentItemDetail对象", description = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据-检查项目-明细表")
public class RailInspectionEquipmentItemDetailVO { public class RailInspectionEquipmentItemDetailVO {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("主键") @ApiModelProperty("主键")
private String id; private String id;
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("创建日期")
private Date createTime;
@ApiModelProperty("更新人")
private String updateBy;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("轨检仪静态检查数据id") @ApiModelProperty("轨检仪静态检查数据id")
private String railInspectionEquipmentId; private String railInspectionEquipmentId;
@ApiModelProperty("轨检仪静态检查数据检查项id") @ApiModelProperty("轨检仪静态检查数据检查项id")
private String railInspectionEquipmentItemId; private String railInspectionEquipmentItemId;
@ApiModelProperty("检查项目")
@ApiModelProperty("轨号") private String checkItem;
private String trackCode;
@ApiModelProperty("测点") @ApiModelProperty("测点")
private Integer measurePoint; private Integer measurePoint;
...@@ -68,20 +52,8 @@ public class RailInspectionEquipmentItemDetailVO { ...@@ -68,20 +52,8 @@ public class RailInspectionEquipmentItemDetailVO {
@ApiModelProperty("三角坑") @ApiModelProperty("三角坑")
private String triangularPit; private String triangularPit;
@ApiModelProperty("方向") @ApiModelProperty("轨向、高低及其它")
private String direction; private String other;
@ApiModelProperty("高低")
private String height;
@ApiModelProperty("结构")
private String structure;
@ApiModelProperty("整改")
private String rectification;
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
private String delFlag;
@ApiModelProperty("排序字段") @ApiModelProperty("排序字段")
private Integer infoSort; private Integer infoSort;
......
...@@ -31,17 +31,8 @@ public class RailInspectionEquipmentItemVO { ...@@ -31,17 +31,8 @@ public class RailInspectionEquipmentItemVO {
@ApiModelProperty("主键") @ApiModelProperty("主键")
private String id; private String id;
@ApiModelProperty("创建人") @ApiModelProperty("检查项目Id")
private String createBy; private String itemId;
@ApiModelProperty("创建日期")
private Date createTime;
@ApiModelProperty("更新人")
private String updateBy;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("轨检仪静态检查数据id") @ApiModelProperty("轨检仪静态检查数据id")
private String railInspectionEquipmentId; private String railInspectionEquipmentId;
...@@ -70,11 +61,7 @@ public class RailInspectionEquipmentItemVO { ...@@ -70,11 +61,7 @@ public class RailInspectionEquipmentItemVO {
@ApiModelProperty("备注") @ApiModelProperty("备注")
private String remark; private String remark;
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
private String delFlag;
@ApiModelProperty("导入排序") @ApiModelProperty("导入排序")
private Integer sort; private Integer sort;
} }
package org.jeecg.modules.checkData.dynamicStaticGeometricData.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.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 检查数据-动静态几何尺寸数据-轨检仪静态检查数据
* </p>
*
* @author hkl
* @since 2023-07-16
*/
@Data
@ApiModel(value = "RailInspectionEquipmentVO", description = "检查数据-动静态几何尺寸数据-轨检仪静态检查数据")
public class RailInspectionEquipmentVO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
private String id;
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("创建日期")
private Date createTime;
@ApiModelProperty("更新人")
private String updateBy;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("动静态几何尺寸数据主表主键-》外键")
private String movementMasterId;
@ApiModelProperty("检查起始里程(m)")
private BigDecimal courseStartingMileage;
@ApiModelProperty("检查终点里程(m)")
private BigDecimal courseEndMileage;
@ApiModelProperty("曲线半径(m)")
private BigDecimal curveRadius;
@ApiModelProperty("超高(mm)")
private BigDecimal superHigh;
@ApiModelProperty("加宽(mm)")
private BigDecimal widen;
@ApiModelProperty("顺坡率(‰)")
private BigDecimal slopeRatio;
@ApiModelProperty("长度(m)")
private BigDecimal longExtent;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("是否删除(0:未删除;1:已删除)")
private String delFlag;
@ApiModelProperty("导入排序")
private Integer sort;
}
...@@ -77,7 +77,51 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper, ...@@ -77,7 +77,51 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper,
// 3.1 查询上行所有里程数 // 3.1 查询上行所有里程数
List<RailManagement> allRailList = new ArrayList<>(); List<RailManagement> allRailList = new ArrayList<>();
String sdkId = "1"; // 上行线id String sdkId = "1"; // 上行线id
List<Map<String, Object>> lineSpecialRailList = this.getLineSpecialRail(sdkId); generationCore(lightRail, allRailList, sdkId);
for (int i = 0; i < allRailList.size(); i++) {
RailManagement railManagement = allRailList.get(i);
String railCode = "钢轨[上行]" + UnitCodeUtil.supplementZero(4, i + 1);
railManagement.setRailCode(railCode);
String unitCode = "SXXGG" + UnitCodeUtil.supplementZero(4, i + 1);
railManagement.setUnitCode(unitCode);
railManagement.setRailOrderNum(i + 1);
railManagement.setCreateTime(new Date());
railManagement.setUpdateTime(new Date());
}
this.saveBatch(allRailList);
// 4.处理下行
allRailList.clear();
String xdkId = "2"; // 下行线id
generationCore(lightRail, allRailList, xdkId);
for (int i = 0; i < allRailList.size(); i++) {
RailManagement railManagement = allRailList.get(i);
String railCode = "钢轨[下行]" + UnitCodeUtil.supplementZero(4, i + 1);
railManagement.setRailCode(railCode);
String unitCode = "DXXGG" + UnitCodeUtil.supplementZero(4, i + 1);
railManagement.setUnitCode(unitCode);
railManagement.setRailOrderNum(i + 1);
railManagement.setCreateTime(new Date());
railManagement.setUpdateTime(new Date());
}
this.saveBatch(allRailList);
}
/**
* 生成核心
*
* @param lightRail
* @param allRailList
* @param lineAliasId
*/
private void generationCore(LightRail lightRail, List<RailManagement> allRailList, String lineAliasId) {
List<Map<String, Object>> lineSpecialRailList = this.getLineSpecialRail(lineAliasId);
BigDecimal lineStartMileage = BigDecimal.ZERO; BigDecimal lineStartMileage = BigDecimal.ZERO;
BigDecimal endMileage = lightRail.getUpLineMileage(); BigDecimal endMileage = lightRail.getUpLineMileage();
...@@ -90,7 +134,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper, ...@@ -90,7 +134,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper,
// 3.2.1 第一次进入循环 // 3.2.1 第一次进入循环
if (i == 0) { if (i == 0) {
if (currentStartMileage.subtract(lineStartMileage).compareTo(BigDecimal.ZERO) > 0) { if (currentStartMileage.subtract(lineStartMileage).compareTo(BigDecimal.ZERO) > 0) {
List<RailManagement> innerRailList = this.generate(lineStartMileage, currentStartMileage, sdkId); List<RailManagement> innerRailList = this.generate(lineStartMileage, currentStartMileage, lineAliasId);
allRailList.addAll(innerRailList); allRailList.addAll(innerRailList);
} }
continue; continue;
...@@ -101,7 +145,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper, ...@@ -101,7 +145,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper,
Map<String, Object> frontMap = lineSpecialRailList.get(i - 1); Map<String, Object> frontMap = lineSpecialRailList.get(i - 1);
BigDecimal frontEndMileage = Convert.toBigDecimal(frontMap.get("endMileage")); BigDecimal frontEndMileage = Convert.toBigDecimal(frontMap.get("endMileage"));
if (currentStartMileage.subtract(frontEndMileage).compareTo(BigDecimal.ZERO) > 0) { if (currentStartMileage.subtract(frontEndMileage).compareTo(BigDecimal.ZERO) > 0) {
List<RailManagement> innerRailList = this.generate(frontEndMileage, currentStartMileage, sdkId); List<RailManagement> innerRailList = this.generate(frontEndMileage, currentStartMileage, lineAliasId);
allRailList.addAll(innerRailList); allRailList.addAll(innerRailList);
} }
...@@ -109,25 +153,13 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper, ...@@ -109,25 +153,13 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper,
// 3.2.3 最后一次循环 // 3.2.3 最后一次循环
if (i == size - 1) { if (i == size - 1) {
if (endMileage.subtract(currentStartMileage).compareTo(BigDecimal.ZERO) > 0) { if (endMileage.subtract(currentStartMileage).compareTo(BigDecimal.ZERO) > 0) {
List<RailManagement> innerRailList = this.generate(currentStartMileage, endMileage, sdkId); List<RailManagement> innerRailList = this.generate(currentStartMileage, endMileage, lineAliasId);
allRailList.addAll(innerRailList); allRailList.addAll(innerRailList);
} }
} }
} }
for (int i = 0; i < allRailList.size(); i++) {
RailManagement railManagement = allRailList.get(i);
String railCode = "钢轨[上行]" + UnitCodeUtil.supplementZero(4, i + 1);
railManagement.setRailCode(railCode);
String unitCode = "SXXGG" + UnitCodeUtil.supplementZero(4, i + 1);
railManagement.setUnitCode(unitCode);
railManagement.setRailOrderNum(i + 1);
railManagement.setCreateTime(new Date());
railManagement.setUpdateTime(new Date());
} }
this.saveBatch(allRailList);
}
/** /**
* @param startMileage * @param startMileage
......
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