Merge pull request 'yanyang' (#15) from yanyang into master

Reviewed-on: #15
This commit is contained in:
闫阳 2022-12-12 16:02:45 +08:00
커밋 37f0dbe548
2개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제

파일 보기

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

파일 보기

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