|
@@ -18,6 +18,7 @@ import com.ruoyi.zdsz.domain.bo.ZEngineeringMaterialBo;
|
|
|
import com.ruoyi.zdsz.domain.bo.ZEngineeringNodeBo;
|
|
|
import com.ruoyi.zdsz.domain.bo.ZEngineeringReviewBo;
|
|
|
import com.ruoyi.zdsz.domain.vo.ZEngineeringInfoVo;
|
|
|
+import com.ruoyi.zdsz.enums.photoType;
|
|
|
import com.ruoyi.zdsz.mapper.ZEngineeringInfoMapper;
|
|
|
import com.ruoyi.zdsz.service.IZEngiineeringPhotoService;
|
|
|
import com.ruoyi.zdsz.service.IZEngineeringInfoService;
|
|
@@ -78,10 +79,16 @@ public class ZEngineeringInfoServiceImpl implements IZEngineeringInfoService {
|
|
|
zEngineeringInfoBo1.setConstructPhone(sysUser.getPhonenumber());
|
|
|
}
|
|
|
List<String> photoList = izEngiineeringPhotoService.queryList(zEngineeringInfoBo1);
|
|
|
+
|
|
|
List<ZEngineeringMaterialBo> zEngineeringMaterialBo = izEngineeringMaterialService.query(zEngineeringInfoBo1);
|
|
|
zEngineeringInfoBo1.setzEngiineeringPhotoBoList(photoList);
|
|
|
zEngineeringInfoBo1.setzEngineeringMaterialBo(zEngineeringMaterialBo);
|
|
|
- // bo.setId(item.getId());
|
|
|
+ zEngineeringInfoBo1.setPhotosAfter(izEngiineeringPhotoService.queryTypeList(zEngineeringInfoBo1,photoType.photosAfter.name()));
|
|
|
+ zEngineeringInfoBo1.setStonePowder(izEngiineeringPhotoService.queryTypeList(zEngineeringInfoBo1,photoType.stonePowder.name()));
|
|
|
+ zEngineeringInfoBo1.setDuctalEpithelium(izEngiineeringPhotoService.queryTypeList(zEngineeringInfoBo1,photoType.ductalEpithelium.name()));
|
|
|
+ zEngineeringInfoBo1.setTrenchProspect(izEngiineeringPhotoService.queryTypeList(zEngineeringInfoBo1,photoType.trenchProspect.name()));
|
|
|
+ zEngineeringInfoBo1.setVideo(izEngiineeringPhotoService.queryTypeList(zEngineeringInfoBo1,photoType.Video.name()));
|
|
|
+ // bo.setId(item.getId());
|
|
|
ZEngineeringReviewBo zEngineeringReviewbo = izEngineeringReviewService.query(bo);
|
|
|
zEngineeringInfoBo1.setzEngineeringReviewBo(zEngineeringReviewbo);
|
|
|
zEngineeringInfoBoList.add(zEngineeringInfoBo1);
|
|
@@ -168,6 +175,72 @@ public class ZEngineeringInfoServiceImpl implements IZEngineeringInfoService {
|
|
|
izEngineeringMaterialService.insert(item);
|
|
|
});
|
|
|
}
|
|
|
+ if (!ObjectUtils.isEmpty(bo.getPhotosAfter()))
|
|
|
+ {
|
|
|
+ List<ZEngiineeringPhoto> photoList = new ArrayList<>();
|
|
|
+ bo.getPhotosAfter().forEach(item -> {
|
|
|
+ ZEngiineeringPhoto zEngiineeringPhoto = new ZEngiineeringPhoto();
|
|
|
+ zEngiineeringPhoto.setParentId(add.getId());
|
|
|
+ zEngiineeringPhoto.setPicUrl(item);
|
|
|
+ zEngiineeringPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ zEngiineeringPhoto.setUpdateTime(new Date());
|
|
|
+ zEngiineeringPhoto.setType(photoType.photosAfter.name().toString());
|
|
|
+ photoList.add(zEngiineeringPhoto);
|
|
|
+ });
|
|
|
+
|
|
|
+ } else if (!ObjectUtils.isEmpty(bo.getVideo()))
|
|
|
+ {
|
|
|
+ List<ZEngiineeringPhoto> photoList = new ArrayList<>();
|
|
|
+ bo.getPhotosAfter().forEach(item -> {
|
|
|
+ ZEngiineeringPhoto zEngiineeringPhoto = new ZEngiineeringPhoto();
|
|
|
+ zEngiineeringPhoto.setParentId(add.getId());
|
|
|
+ zEngiineeringPhoto.setPicUrl(item);
|
|
|
+ zEngiineeringPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ zEngiineeringPhoto.setUpdateTime(new Date());
|
|
|
+ zEngiineeringPhoto.setType(photoType.Video.name().toString());
|
|
|
+ photoList.add(zEngiineeringPhoto);
|
|
|
+ });
|
|
|
+
|
|
|
+ }else if (!ObjectUtils.isEmpty(bo.getDuctalEpithelium()))
|
|
|
+ {
|
|
|
+ List<ZEngiineeringPhoto> photoList = new ArrayList<>();
|
|
|
+ bo.getPhotosAfter().forEach(item -> {
|
|
|
+ ZEngiineeringPhoto zEngiineeringPhoto = new ZEngiineeringPhoto();
|
|
|
+ zEngiineeringPhoto.setParentId(add.getId());
|
|
|
+ zEngiineeringPhoto.setPicUrl(item);
|
|
|
+ zEngiineeringPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ zEngiineeringPhoto.setUpdateTime(new Date());
|
|
|
+ zEngiineeringPhoto.setType(photoType.ductalEpithelium.name().toString());
|
|
|
+ photoList.add(zEngiineeringPhoto);
|
|
|
+ });
|
|
|
+
|
|
|
+ }else if (!ObjectUtils.isEmpty(bo.getStonePowder()))
|
|
|
+ {
|
|
|
+ List<ZEngiineeringPhoto> photoList = new ArrayList<>();
|
|
|
+ bo.getPhotosAfter().forEach(item -> {
|
|
|
+ ZEngiineeringPhoto zEngiineeringPhoto = new ZEngiineeringPhoto();
|
|
|
+ zEngiineeringPhoto.setParentId(add.getId());
|
|
|
+ zEngiineeringPhoto.setPicUrl(item);
|
|
|
+ zEngiineeringPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ zEngiineeringPhoto.setUpdateTime(new Date());
|
|
|
+ zEngiineeringPhoto.setType(photoType.stonePowder.name().toString());
|
|
|
+ photoList.add(zEngiineeringPhoto);
|
|
|
+ });
|
|
|
+
|
|
|
+ }else if (!ObjectUtils.isEmpty(bo.getTrenchProspect()))
|
|
|
+ {
|
|
|
+ List<ZEngiineeringPhoto> photoList = new ArrayList<>();
|
|
|
+ bo.getPhotosAfter().forEach(item -> {
|
|
|
+ ZEngiineeringPhoto zEngiineeringPhoto = new ZEngiineeringPhoto();
|
|
|
+ zEngiineeringPhoto.setParentId(add.getId());
|
|
|
+ zEngiineeringPhoto.setPicUrl(item);
|
|
|
+ zEngiineeringPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ zEngiineeringPhoto.setUpdateTime(new Date());
|
|
|
+ zEngiineeringPhoto.setType(photoType.trenchProspect.name().toString());
|
|
|
+ photoList.add(zEngiineeringPhoto);
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
List<ZEngiineeringPhoto> photoList = new ArrayList<>();
|
|
|
bo.getzEngiineeringPhotoBoList().forEach(item -> {
|
|
|
ZEngiineeringPhoto zEngiineeringPhoto = new ZEngiineeringPhoto();
|
|
@@ -214,6 +287,75 @@ public class ZEngineeringInfoServiceImpl implements IZEngineeringInfoService {
|
|
|
if (photoList.size() > 0 ) {
|
|
|
izEngiineeringPhotoService.updateBatch(photoList);
|
|
|
}
|
|
|
+ List<ZEngiineeringPhoto> photoList2 = new ArrayList<>();
|
|
|
+ if (!ObjectUtils.isEmpty(bo.getPhotosAfter()))
|
|
|
+ {
|
|
|
+
|
|
|
+ bo.getPhotosAfter().forEach(item -> {
|
|
|
+ ZEngiineeringPhoto zEngiineeringPhoto = new ZEngiineeringPhoto();
|
|
|
+ zEngiineeringPhoto.setParentId(update.getId());
|
|
|
+ zEngiineeringPhoto.setPicUrl(item);
|
|
|
+ zEngiineeringPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ zEngiineeringPhoto.setType(photoType.photosAfter.name().toString());
|
|
|
+ photoList2.add(zEngiineeringPhoto);
|
|
|
+ });
|
|
|
+
|
|
|
+ } else if (!ObjectUtils.isEmpty(bo.getVideo()))
|
|
|
+ {
|
|
|
+
|
|
|
+ bo.getPhotosAfter().forEach(item -> {
|
|
|
+ ZEngiineeringPhoto zEngiineeringPhoto = new ZEngiineeringPhoto();
|
|
|
+ zEngiineeringPhoto.setParentId(update.getId());
|
|
|
+ zEngiineeringPhoto.setPicUrl(item);
|
|
|
+ zEngiineeringPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ zEngiineeringPhoto.setUpdateTime(new Date());
|
|
|
+ zEngiineeringPhoto.setType(photoType.Video.name().toString());
|
|
|
+ photoList2.add(zEngiineeringPhoto);
|
|
|
+ });
|
|
|
+
|
|
|
+ }else if (!ObjectUtils.isEmpty(bo.getDuctalEpithelium()))
|
|
|
+ {
|
|
|
+
|
|
|
+ bo.getPhotosAfter().forEach(item -> {
|
|
|
+ ZEngiineeringPhoto zEngiineeringPhoto = new ZEngiineeringPhoto();
|
|
|
+ zEngiineeringPhoto.setParentId(update.getId());
|
|
|
+ zEngiineeringPhoto.setPicUrl(item);
|
|
|
+ zEngiineeringPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ zEngiineeringPhoto.setUpdateTime(new Date());
|
|
|
+ zEngiineeringPhoto.setType(photoType.ductalEpithelium.name().toString());
|
|
|
+ photoList2.add(zEngiineeringPhoto);
|
|
|
+ });
|
|
|
+
|
|
|
+ }else if (!ObjectUtils.isEmpty(bo.getStonePowder()))
|
|
|
+ {
|
|
|
+
|
|
|
+ bo.getPhotosAfter().forEach(item -> {
|
|
|
+ ZEngiineeringPhoto zEngiineeringPhoto = new ZEngiineeringPhoto();
|
|
|
+ zEngiineeringPhoto.setParentId(update.getId());
|
|
|
+ zEngiineeringPhoto.setPicUrl(item);
|
|
|
+ zEngiineeringPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ zEngiineeringPhoto.setUpdateTime(new Date());
|
|
|
+ zEngiineeringPhoto.setType(photoType.stonePowder.name().toString());
|
|
|
+ photoList2.add(zEngiineeringPhoto);
|
|
|
+ });
|
|
|
+
|
|
|
+ }else if (!ObjectUtils.isEmpty(bo.getTrenchProspect()))
|
|
|
+ {
|
|
|
+
|
|
|
+ bo.getPhotosAfter().forEach(item -> {
|
|
|
+ ZEngiineeringPhoto zEngiineeringPhoto = new ZEngiineeringPhoto();
|
|
|
+ zEngiineeringPhoto.setParentId(update.getId());
|
|
|
+ zEngiineeringPhoto.setPicUrl(item);
|
|
|
+ zEngiineeringPhoto.setCreateTime(bo.getCreateTime());
|
|
|
+ zEngiineeringPhoto.setUpdateTime(new Date());
|
|
|
+ zEngiineeringPhoto.setType(photoType.trenchProspect.name().toString());
|
|
|
+ photoList2.add(zEngiineeringPhoto);
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ if (photoList2.size() > 0 ) {
|
|
|
+ izEngiineeringPhotoService.updateBatch(photoList2);
|
|
|
+ }
|
|
|
izEngineeringMaterialService.updateList(bo);
|
|
|
// update.setUpdateTime(new Date());
|
|
|
return baseMapper.updateById(update) > 0;
|