Compare commits

..

No commits in common. "b501e8cd98465300b191e5debba38c8a24427ed5" and "c7c43cd906af8605ca3d7879d59afb9c7895c155" have entirely different histories.

2 changed files with 3 additions and 8 deletions

View File

@ -175,10 +175,9 @@ public class InspectionSheetController {
@PostMapping("saveFluxParamList") @PostMapping("saveFluxParamList")
@ApiOperation("将样本检测参数写入influxdb") @ApiOperation("将样本检测参数写入influxdb")
public Result saveFluxParamList(@RequestBody InspectionSampleDTO[] lists) throws InterruptedException{ public Result saveFluxParamList(@RequestBody InspectionSampleDTO[] lists){
inspectionSheetService.saveFluxParamList(lists); inspectionSheetService.saveFluxParamList(lists);
Thread.sleep(1000);
//样本数据更新后 计算检验单缺陷数不良数 //样本数据更新后 计算检验单缺陷数不良数
inspectionSheetService.calculate(Long.valueOf(lists[0].getInspectionSheetId())); inspectionSheetService.calculate(Long.valueOf(lists[0].getInspectionSheetId()));
return new Result(); return new Result();

View File

@ -252,15 +252,11 @@ public class InspectionSheetServiceImpl extends CrudServiceImpl<InspectionSheetM
list.add(sampleDTO); list.add(sampleDTO);
} }
} }
//返回先按时间排序 再按样本号排序 return list;
List<InspectionSampleDTO> sortedList = list.stream()
.sorted(Comparator.comparing(InspectionSampleDTO::getSampleTime).thenComparing(InspectionSampleDTO::getSampleNumber))
.collect(Collectors.toList());
return sortedList;
} }
@Override @Override
public void saveFluxParamList(InspectionSampleDTO[] lists){ public void saveFluxParamList(InspectionSampleDTO[] lists) {
for (InspectionSampleDTO dto : lists) { for (InspectionSampleDTO dto : lists) {
//String jsonData = {"workingProcedureName":"test","inspectionSheetId":"116","param1":"0.47","param2":"0.687","param2":"0.53"}; //String jsonData = {"workingProcedureName":"test","inspectionSheetId":"116","param1":"0.47","param2":"0.687","param2":"0.53"};
String workingProcedureName = dto.getWorkingProcedureName(); String workingProcedureName = dto.getWorkingProcedureName();