Commit c3e037b5 authored by hkl's avatar hkl

feat:1.人工检查数据导入

parent a6371ce2
......@@ -74,6 +74,10 @@
<properties>
<package.environment>hkl</package.environment>
</properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 测试环境 -->
......@@ -90,10 +94,6 @@
<properties>
<package.environment>pressure</package.environment>
</properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 生成环境环境-->
......
......@@ -234,6 +234,12 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
//循环符合条件的数据项集合
for (MovementCourseInfo entity : listResult) {
//判断项目名称一样
/* if (code.equals(entity.getTrackCode())) {
//初始化检查项目对应的详情记录的对象
MovementCourseInfoVO infoVo = new MovementCourseInfoVO();
BeanCopyUtil.copyProperties(entity, infoVo);
infoList.add(infoVo);
}*/
if (code.equals(entity.getTrackCode())) {
//初始化检查项目对应的详情记录的对象
MovementCourseInfoVO infoVo = new MovementCourseInfoVO();
......@@ -316,19 +322,33 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
return Result.OK("删除成功!");
}
@AutoLog(value = "导入")
@ApiOperation(value = "导入", notes = "导入 ")
@PostMapping(value = "/upload")
@Transactional
public Result<String> uploadFile(MultipartFile file, @ApiParam(name = "动静态几何尺寸主键id") String id) {
this.movementRecordsMasterFace.uploadFile(file, id);
return Result.OK("导入成功");
}
@AutoLog(value = "导入")
@ApiOperation(value = "导入", notes = "导入 ")
@PostMapping(value = "/upload2")
@Transactional
public Result<String> uploadFile2(MultipartFile file, @ApiParam(name = "动静态几何尺寸主键id") String id) {
try {
//初始化数据模板
QueryWrapper<MovementCourse> courseRemove = new QueryWrapper<>();
courseRemove.eq("movement_master_id", id);
movementCourseService.remove(courseRemove);
QueryWrapper<MovementCourseInfo> rm = new QueryWrapper<>();
rm.eq("movement_master_id", id);
movementCourseInfoService.remove(rm);
movementCourseService.lambdaUpdate()
.eq(MovementCourse::getMovementMasterId, id)
.remove();
movementCourseInfoService.lambdaUpdate()
.eq(MovementCourseInfo::getMovementMasterId, id)
.remove();
//时间校验
String pat = "\\d{4}.\\d{2}.\\d{2}";
Pattern p = Pattern.compile(pat);
......@@ -380,7 +400,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
List<Object> courseList = rowRecords.get(4);
Object courseObject = courseList.get(i);
String courseStr = courseObject.toString();
if (mileage.indexOf("起止里程") != -1) {
if (mileage.contains("起止里程")) {
//开始里程
String[] start = mileage.split("-");
String s = start[0];
......@@ -560,6 +580,7 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
return Result.ok("操作成功");
}
@AutoLog(value = "人工静态检查数据-保存曲线半径信息")
@ApiOperation(value = "人工静态检查数据-保存曲线半径信息", notes = "人工静态检查数据-保存曲线半径信息")
@PostMapping(value = "/saveAdditive")
......
package org.jeecg.modules.checkData.face;
import org.jeecg.modules.checkData.entity.MovementCourse;
import org.springframework.web.multipart.MultipartFile;
public interface MovementRecordsMasterFace {
/**
......@@ -16,4 +17,6 @@ public interface MovementRecordsMasterFace {
* @param record
*/
void updateLabourCheckItem(MovementCourse record);
void uploadFile(MultipartFile file, String id);
}
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