Commit c3e037b5 authored by hkl's avatar hkl

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

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