|
@@ -15,6 +15,7 @@ import com.ruoyi.zdsz.mapper.ZEngineeringIndustryMapper;
|
|
|
import com.ruoyi.zdsz.service.IZEngineeringIndustryService;
|
|
|
import com.ruoyi.zdsz.service.IZEngineeringNodeService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -39,6 +40,9 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
@Resource
|
|
|
private IZEngineeringNodeService izEngineeringNodeService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IZEngineeringNodeService nodeService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询工业工程|市政工程
|
|
|
*/
|
|
@@ -135,11 +139,16 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
if (isValid) {
|
|
|
//TODO 做一些业务上的校验,判断是否需要校验
|
|
|
}
|
|
|
- boolean flag = false;
|
|
|
- Boolean b = izEngineeringNodeService.queryIdByCivliId(ids);
|
|
|
- if (!b) {
|
|
|
- flag = baseMapper.deleteBatchIds(ids) > 0;
|
|
|
- }
|
|
|
- return flag;
|
|
|
+ ids.forEach(item -> {
|
|
|
+ ZEngineeringIndustryVo vo = baseMapper.selectVoById(item);
|
|
|
+ ZEngineeringNodeBo zEngineeringNodeBo = new ZEngineeringNodeBo();
|
|
|
+ zEngineeringNodeBo.setCreateTime(vo.getCreateTime());
|
|
|
+ zEngineeringNodeBo.setCivliId(vo.getId());
|
|
|
+ List<ZEngineeringNodeBo> zEngineeringNodeBos = nodeService.queryListDetails(zEngineeringNodeBo);
|
|
|
+ zEngineeringNodeBos.stream().forEach(ite ->
|
|
|
+ nodeService.delete(ite)
|
|
|
+ );
|
|
|
+ });
|
|
|
+ return baseMapper.deleteBatchIds(ids) > 0;
|
|
|
}
|
|
|
}
|