|
@@ -81,6 +81,16 @@ public class HousingconstructionSafetyinspectionrecordsController {
|
|
|
|
|
|
@PostMapping("/safetyinspectionrecords/put")
|
|
@PostMapping("/safetyinspectionrecords/put")
|
|
public AjaxResult putSafetyinspectionrecords(@RequestBody HousingconstructionSafetyinspectionrecords record) {
|
|
public AjaxResult putSafetyinspectionrecords(@RequestBody HousingconstructionSafetyinspectionrecords record) {
|
|
|
|
+ List<HousingconstructionSafetyinspectionrecordsdetail> detailList = record.getDetailList();
|
|
|
|
+ detailList.forEach(detail->{
|
|
|
|
+ List<HousingconstructionAttach> attachList = detail.getAttachList();
|
|
|
|
+ for (int i = 0; i < attachList.size(); i++) {
|
|
|
|
+ HousingconstructionAttach attach = attachList.get(i);
|
|
|
|
+ attach.setBusId(detail.getId());
|
|
|
|
+ attach.setAttachPath(attach.getRealUrl());
|
|
|
|
+ attach.setAttachSorts(Long.parseLong(String.valueOf(i)));
|
|
|
|
+ }
|
|
|
|
+ });
|
|
return safetyinspectionrecordsService.putSafetyinspectionrecords(record);
|
|
return safetyinspectionrecordsService.putSafetyinspectionrecords(record);
|
|
}
|
|
}
|
|
|
|
|