负面清单

hhw
杜函宇 1 month ago
parent 29841137da
commit 96ae370baa

@ -25,7 +25,7 @@ import java.util.List;
@Api(tags = "项目知识库")
@RestController
@RequestMapping("/gysl/xmzsk")
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
//@PreAuthorize("@ss.hasAnyRoles('admin,common')")
public class XmzskController extends BaseController {
/**
*
@ -51,7 +51,7 @@ public class XmzskController extends BaseController {
* @param id
* @return
*/
@GetMapping("{id}")
@GetMapping("/{id}")
@ApiOperation("通过主键查询单条数据")
public AjaxResult selectOne(@PathVariable Serializable id) {
return success(xmzskService.getById(id));

@ -149,5 +149,8 @@ public class BasicInformation extends BaseModel {
@ApiModelProperty("状态 1待填报 2待审核 3审核通过")
private Integer status;
@ApiModelProperty("0非负面清单 1是负面清单")
private Integer isFmqd;
}

@ -38,4 +38,7 @@ public class BasicInformationPageReq {
@ApiModelProperty("统一社会信用代码")
private String tyshxydm;
@ApiModelProperty("0非负面清单 1是负面清单")
private Integer isFmqd;
}

@ -7,8 +7,6 @@ import com.ruoyi.gysl.entity.response.WysmxResponse;
import java.util.List;
import java.util.List;
/**
* (WysmxInformation)
*
@ -24,5 +22,17 @@ public interface WysmxInformationService extends IService<WysmxInformation> {
* @return
*/
List<WysmxResponse> list(ZwIdPageReq zwIdPageReq);
/**
*
*
* @param materialLevel
* @param fireRiskLevel
* @param environmentalProtection
* @return
*/
boolean canGoUpstairs(String materialLevel,
String fireRiskLevel,
String environmentalProtection);
}

@ -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();
});
}
}

@ -23,6 +23,27 @@ import java.util.stream.Collectors;
@Service("wysmxInformationService")
public class WysmxInformationServiceImpl extends ServiceImpl<WysmxInformationMapper, WysmxInformation> implements WysmxInformationService {
/**
*
*
* @param materialLevel
* @param fireRiskLevel
* @param environmentalProtection
* @return
*/
public boolean canGoUpstairs(String materialLevel,
String fireRiskLevel,
String environmentalProtection) {
// 检查危化品等级:一级或二级禁止上楼
boolean isHazardousForbidden = "一级".equals(materialLevel) || "二级".equals(materialLevel);
// 检查火灾危险等级:甲类或乙类禁止上楼
boolean isFireRiskForbidden = "甲".equals(fireRiskLevel) || "乙".equals(fireRiskLevel);
// 环境保护未达标禁止上楼
boolean isEnvironmentForbidden = "否".equals(environmentalProtection);
return isHazardousForbidden || isFireRiskForbidden || isEnvironmentForbidden;
}
/**
* id
*

@ -78,6 +78,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="req.tyshxydm != null and req.tyshxydm!=''">
AND a.tyshxydm = #{req.tyshxydm}
</if>
<if test="req.isFmqd != null">
AND a.is_fmqd = #{req.isFmqd}
</if>
</where>
</select>
<select id="projectList" resultType="com.ruoyi.gysl.entity.BasicInformation">

Loading…
Cancel
Save