|
|
|
@ -30,6 +30,7 @@ import java.io.Serializable;
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 基本信息(BasicInformation)表服务实现类
|
|
|
|
@ -282,29 +283,38 @@ public class BasicInformationServiceImpl extends ServiceImpl<BasicInformationMap
|
|
|
|
|
public Long audit(AuditRequest req, int status) {
|
|
|
|
|
req.getBasicInformation().setStatus(status);
|
|
|
|
|
//企业端提交审核直接修改,不需要挂起等待审批
|
|
|
|
|
//修改项目基本信息
|
|
|
|
|
//修改项目基本信息,和是否是负面清单
|
|
|
|
|
List<WysmxInformation> collect1 = req.getWysmxInformations().stream().filter(x ->
|
|
|
|
|
"危化品等级".equals(x.getZdname())
|
|
|
|
|
)
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
List<WysmxInformation> collect2 = req.getWysmxInformations().stream().filter(x ->
|
|
|
|
|
"生产火灾危险等级".equals(x.getZdname())
|
|
|
|
|
)
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
List<WysmxInformation> collect3 = req.getWysmxInformations().stream().filter(x ->
|
|
|
|
|
"环境保护".equals(x.getZdname()))
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
if(!collect1.isEmpty() && !collect2.isEmpty() && !collect3.isEmpty()){
|
|
|
|
|
req.getBasicInformation().setIsFmqd(wysmxInformationService.canGoUpstairs(
|
|
|
|
|
collect1.get(0).getZdinfor(),
|
|
|
|
|
collect2.get(0).getZdinfor(),
|
|
|
|
|
collect3.get(0).getZdinfor()) ? 1 : 0);
|
|
|
|
|
}
|
|
|
|
|
updateById(req.getBasicInformation());
|
|
|
|
|
//修改项目规划信息
|
|
|
|
|
planInformationService.updateById(req.getPlanInformation());
|
|
|
|
|
//修改企业入驻信息
|
|
|
|
|
qyrzInformationService.updateById(req.getQyrzInformation());
|
|
|
|
|
//修改五要素模型信息
|
|
|
|
|
wysmxInformationService.lambdaUpdate()
|
|
|
|
|
.eq(WysmxInformation::getXmId, req.getBasicInformation().getId())
|
|
|
|
|
.remove();
|
|
|
|
|
wysmxInformationService.lambdaUpdate().eq(WysmxInformation::getXmId, req.getBasicInformation().getId()).remove();
|
|
|
|
|
wysmxInformationService.saveBatch(req.getWysmxInformations());
|
|
|
|
|
//修改其他信息
|
|
|
|
|
otherInfoService.lambdaUpdate()
|
|
|
|
|
.eq(ProjectOtherInfo::getXmId, req.getBasicInformation().getId())
|
|
|
|
|
.remove();
|
|
|
|
|
otherInfoService.lambdaUpdate().eq(ProjectOtherInfo::getXmId, req.getBasicInformation().getId()).remove();
|
|
|
|
|
otherInfoService.saveBatch(req.getProjectOtherInfos());
|
|
|
|
|
|
|
|
|
|
if (status == 2) {
|
|
|
|
|
userService.getAllZwUser("关于" + req.getBasicInformation().getName() + "项目,待审核的通知",
|
|
|
|
|
req.getBasicInformation().getId(),
|
|
|
|
|
null,
|
|
|
|
|
null
|
|
|
|
|
);
|
|
|
|
|
userService.getAllZwUser("关于" + req.getBasicInformation().getName() + "项目,待审核的通知", req.getBasicInformation().getId(), null, null);
|
|
|
|
|
}
|
|
|
|
|
if (status == 3) {
|
|
|
|
|
SmartDeclaration sd = new SmartDeclaration();
|
|
|
|
@ -329,13 +339,9 @@ public class BasicInformationServiceImpl extends ServiceImpl<BasicInformationMap
|
|
|
|
|
//项目基本信息
|
|
|
|
|
basicInformationResponse.setBasicInformation(getById(id));
|
|
|
|
|
//项目规划信息
|
|
|
|
|
basicInformationResponse.setPlanInformation(planInformationService.lambdaQuery()
|
|
|
|
|
.eq(PlanInformation::getXmId, id)
|
|
|
|
|
.one());
|
|
|
|
|
basicInformationResponse.setPlanInformation(planInformationService.lambdaQuery().eq(PlanInformation::getXmId, id).one());
|
|
|
|
|
//项目建筑信息
|
|
|
|
|
basicInformationResponse.setBuildingInformation(buildingInformationService.lambdaQuery()
|
|
|
|
|
.eq(BuildingInformation::getXmId, id)
|
|
|
|
|
.list());
|
|
|
|
|
basicInformationResponse.setBuildingInformation(buildingInformationService.lambdaQuery().eq(BuildingInformation::getXmId, id).list());
|
|
|
|
|
//五要素模型信息
|
|
|
|
|
ZwIdPageReq zwIdPageReq = new ZwIdPageReq();
|
|
|
|
|
zwIdPageReq.setXmId(id);
|
|
|
|
@ -361,45 +367,27 @@ public class BasicInformationServiceImpl extends ServiceImpl<BasicInformationMap
|
|
|
|
|
public void removeByXmIds(List<Long> idList) {
|
|
|
|
|
idList.forEach(x -> {
|
|
|
|
|
//删除项目基本信息
|
|
|
|
|
lambdaUpdate()
|
|
|
|
|
.eq(BasicInformation::getId, x)
|
|
|
|
|
.remove();
|
|
|
|
|
lambdaUpdate().eq(BasicInformation::getId, x).remove();
|
|
|
|
|
//删除项目规划信息
|
|
|
|
|
planInformationService.lambdaUpdate()
|
|
|
|
|
.eq(PlanInformation::getXmId, x)
|
|
|
|
|
.remove();
|
|
|
|
|
planInformationService.lambdaUpdate().eq(PlanInformation::getXmId, x).remove();
|
|
|
|
|
//删除项目建筑信息
|
|
|
|
|
buildingInformationService.lambdaUpdate()
|
|
|
|
|
.eq(BuildingInformation::getXmId, x)
|
|
|
|
|
.remove();
|
|
|
|
|
buildingInformationService.lambdaUpdate().eq(BuildingInformation::getXmId, x).remove();
|
|
|
|
|
//删除五要素模型信息
|
|
|
|
|
wysmxInformationService.lambdaUpdate()
|
|
|
|
|
.eq(WysmxInformation::getXmId, x)
|
|
|
|
|
.remove();
|
|
|
|
|
wysmxInformationService.lambdaUpdate().eq(WysmxInformation::getXmId, x).remove();
|
|
|
|
|
//删除月度进展信息
|
|
|
|
|
// projectMonthInfoService.lambdaUpdate()
|
|
|
|
|
// .eq(ProjectMonthInfo::getXmId,x)
|
|
|
|
|
// .remove();
|
|
|
|
|
//删除企业入驻信息
|
|
|
|
|
qyrzInformationService.lambdaUpdate()
|
|
|
|
|
.eq(QyrzInformation::getXmId, x)
|
|
|
|
|
.remove();
|
|
|
|
|
qyrzInformationService.lambdaUpdate().eq(QyrzInformation::getXmId, x).remove();
|
|
|
|
|
//删除项目图例
|
|
|
|
|
projectLegendService.lambdaUpdate()
|
|
|
|
|
.eq(ProjectLegend::getXmId, x)
|
|
|
|
|
.remove();
|
|
|
|
|
projectLegendService.lambdaUpdate().eq(ProjectLegend::getXmId, x).remove();
|
|
|
|
|
//删除项目巡礼
|
|
|
|
|
xmxlService.lambdaUpdate()
|
|
|
|
|
.eq(Xmxl::getXmId, x)
|
|
|
|
|
.remove();
|
|
|
|
|
xmxlService.lambdaUpdate().eq(Xmxl::getXmId, x).remove();
|
|
|
|
|
//删除项目备忘录
|
|
|
|
|
projectRemarkService.lambdaUpdate()
|
|
|
|
|
.eq(ProjectRemark::getXmId, x)
|
|
|
|
|
.remove();
|
|
|
|
|
projectRemarkService.lambdaUpdate().eq(ProjectRemark::getXmId, x).remove();
|
|
|
|
|
//删除其他信息
|
|
|
|
|
otherInfoService.lambdaUpdate()
|
|
|
|
|
.eq(ProjectOtherInfo::getXmId, x)
|
|
|
|
|
.remove();
|
|
|
|
|
otherInfoService.lambdaUpdate().eq(ProjectOtherInfo::getXmId, x).remove();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|