Commit aac0e86f authored by hkl's avatar hkl

feat:1.人工检查数据导入&轨检仪器数据修改

parent c3e037b5
......@@ -331,7 +331,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
this.movementRecordsMasterFace.uploadFile(file, id);
return Result.OK("导入成功");
return Result.OK("操作成功");
}
......
package org.jeecg.modules.checkData.mapper;
import org.jeecg.modules.base.mapper.RootMapper;
import org.jeecg.modules.checkData.entity.RailInspectionEquipmentItemDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.checkData.vo.RailInspectionEquipmentItemDetailVO;
......@@ -14,7 +15,7 @@ import java.util.List;
* @author hkl
* @since 2023-07-16
*/
public interface RailInspectionEquipmentItemDetailMapper extends BaseMapper<RailInspectionEquipmentItemDetail> {
public interface RailInspectionEquipmentItemDetailMapper extends RootMapper<RailInspectionEquipmentItemDetail> {
List<RailInspectionEquipmentItemDetailVO> detailList(String itemId);
}
......@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.checkData.entity.RailInspectionEquipmentItem;
import org.jeecg.modules.checkData.entity.RailInspectionEquipmentItemDetail;
......@@ -59,12 +60,12 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
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("正线"))) {
String titleHeader = Convert.toStr(cols.get(13));
// 检查起始里程
BigDecimal courseStartingMileage = Convert.toBigDecimal(cols.get(3));
// 检查终点里程
BigDecimal courseEndMileage = Convert.toBigDecimal(cols.get(6));
if ((ObjectUtil.isNotEmpty(titleHeader) && titleHeader.contains("股道")) && (ObjectUtil.isNotEmpty(courseStartingMileage) && ObjectUtil.isNotEmpty(courseEndMileage))) {
// 曲线半径
BigDecimal curveRadius = null;
if (ObjectUtil.isNotEmpty(cols.get(18).toString().trim())) {
......@@ -113,14 +114,10 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
railInspectionEquipmentItemDetailMapper.delete(queryWrapper);
railInspectionEquipmentItemDetailMapper.insertBatch(itemDetails);
this.saveBatch(items);
itemDetails.forEach(itemDetail -> {
itemDetail.setRailInspectionEquipmentId(masterId);
railInspectionEquipmentItemDetailMapper.insert(itemDetail);
});
} catch (IOException io) {
log.error("读取文件失败");
throw new JeecgBootException(io);
}
......
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