|
@@ -517,48 +517,51 @@ public class ManagerController extends BaseController {
|
|
|
|
|
|
renovationPartsDetailService.updateById(renovationPartsDetailEntity);
|
|
renovationPartsDetailService.updateById(renovationPartsDetailEntity);
|
|
if ("I".equals(renovationPartsDetailEntity.getRecStatus())) {
|
|
if ("I".equals(renovationPartsDetailEntity.getRecStatus())) {
|
|
|
|
+ renovationPartsDetailService.removeById(renovationPartsDetailEntity.getId());
|
|
ModelUploadEntity modelUploadEntity = modelUploadService.findByPartsDetailId(renovationPartsDetailEntity.getId());
|
|
ModelUploadEntity modelUploadEntity = modelUploadService.findByPartsDetailId(renovationPartsDetailEntity.getId());
|
|
if (modelUploadEntity != null) {
|
|
if (modelUploadEntity != null) {
|
|
modelUploadService.removeById(modelUploadEntity.getId());
|
|
modelUploadService.removeById(modelUploadEntity.getId());
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }else {
|
|
|
|
+ RenovationPartsAttachingEntity renovationPartsAttachingEntity = renovationPartsAttachingService.findByDetailId(renovationPartsDetailEntity.getId());
|
|
|
|
+ if (renovationPartsAttachingEntity != null) {
|
|
|
|
+ if ("wall".equals(param.getAttachingType())) {
|
|
|
|
+ renovationPartsAttachingEntity.setCeilAttaching(false);
|
|
|
|
+ renovationPartsAttachingEntity.setWallAttaching(true);
|
|
|
|
+ renovationPartsAttachingEntity.setFloorAttaching(false);
|
|
|
|
+ }
|
|
|
|
|
|
- RenovationPartsAttachingEntity renovationPartsAttachingEntity = renovationPartsAttachingService.findByDetailId(renovationPartsDetailEntity.getId());
|
|
|
|
- if (renovationPartsAttachingEntity != null) {
|
|
|
|
- if ("wall".equals(param.getAttachingType())) {
|
|
|
|
- renovationPartsAttachingEntity.setCeilAttaching(false);
|
|
|
|
- renovationPartsAttachingEntity.setWallAttaching(true);
|
|
|
|
- renovationPartsAttachingEntity.setFloorAttaching(false);
|
|
|
|
- }
|
|
|
|
|
|
+ if ("ceil".equals(param.getAttachingType())) {
|
|
|
|
+ renovationPartsAttachingEntity.setCeilAttaching(true);
|
|
|
|
+ renovationPartsAttachingEntity.setWallAttaching(false);
|
|
|
|
+ renovationPartsAttachingEntity.setFloorAttaching(false);
|
|
|
|
+ }
|
|
|
|
|
|
- if ("ceil".equals(param.getAttachingType())) {
|
|
|
|
- renovationPartsAttachingEntity.setCeilAttaching(true);
|
|
|
|
- renovationPartsAttachingEntity.setWallAttaching(false);
|
|
|
|
- renovationPartsAttachingEntity.setFloorAttaching(false);
|
|
|
|
|
|
+ if ("floor".equals(param.getAttachingType())) {
|
|
|
|
+ renovationPartsAttachingEntity.setCeilAttaching(false);
|
|
|
|
+ renovationPartsAttachingEntity.setWallAttaching(false);
|
|
|
|
+ renovationPartsAttachingEntity.setFloorAttaching(true);
|
|
|
|
+ }
|
|
|
|
+ renovationPartsAttachingService.updateById(renovationPartsAttachingEntity);
|
|
}
|
|
}
|
|
|
|
|
|
- if ("floor".equals(param.getAttachingType())) {
|
|
|
|
- renovationPartsAttachingEntity.setCeilAttaching(false);
|
|
|
|
- renovationPartsAttachingEntity.setWallAttaching(false);
|
|
|
|
- renovationPartsAttachingEntity.setFloorAttaching(true);
|
|
|
|
|
|
+ if (param.getX() != null && param.getY() != null && param.getZ() != null) {
|
|
|
|
+ ResponseRenovationPartsSize responseRenovationPartsSize = renovationPartsSizeService.findSizeByDetailId(renovationPartsDetailEntity.getId());
|
|
|
|
+ RenovationPartsSizeEntity renovationPartsSizeEntity = new RenovationPartsSizeEntity();
|
|
|
|
+ renovationPartsSizeEntity.setX(param.getX());
|
|
|
|
+ renovationPartsSizeEntity.setY(param.getY());
|
|
|
|
+ renovationPartsSizeEntity.setZ(param.getZ());
|
|
|
|
+ if (responseRenovationPartsSize != null) {
|
|
|
|
+ renovationPartsSizeEntity.setId(responseRenovationPartsSize.getId());
|
|
|
|
+ renovationPartsSizeService.updateById(renovationPartsSizeEntity);
|
|
|
|
+ } else {
|
|
|
|
+ renovationPartsSizeEntity.setPartsDetailId(renovationPartsDetailEntity.getId());
|
|
|
|
+ renovationPartsSizeService.save(renovationPartsSizeEntity);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- renovationPartsAttachingService.updateById(renovationPartsAttachingEntity);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- if (param.getX() != null && param.getY() != null && param.getZ() != null) {
|
|
|
|
- ResponseRenovationPartsSize responseRenovationPartsSize = renovationPartsSizeService.findSizeByDetailId(renovationPartsDetailEntity.getId());
|
|
|
|
- RenovationPartsSizeEntity renovationPartsSizeEntity = new RenovationPartsSizeEntity();
|
|
|
|
- renovationPartsSizeEntity.setX(param.getX());
|
|
|
|
- renovationPartsSizeEntity.setY(param.getY());
|
|
|
|
- renovationPartsSizeEntity.setZ(param.getZ());
|
|
|
|
- if (responseRenovationPartsSize != null) {
|
|
|
|
- renovationPartsSizeEntity.setId(responseRenovationPartsSize.getId());
|
|
|
|
- renovationPartsSizeService.updateById(renovationPartsSizeEntity);
|
|
|
|
- } else {
|
|
|
|
- renovationPartsSizeEntity.setPartsDetailId(renovationPartsDetailEntity.getId());
|
|
|
|
- renovationPartsSizeService.save(renovationPartsSizeEntity);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
|
|
return Result.success();
|
|
return Result.success();
|
|
}
|
|
}
|