负面清单

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

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

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

@ -38,4 +38,7 @@ public class BasicInformationPageReq {
@ApiModelProperty("统一社会信用代码") @ApiModelProperty("统一社会信用代码")
private String tyshxydm; 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;
import java.util.List;
/** /**
* (WysmxInformation) * (WysmxInformation)
* *
@ -24,5 +22,17 @@ public interface WysmxInformationService extends IService<WysmxInformation> {
* @return * @return
*/ */
List<WysmxResponse> list(ZwIdPageReq zwIdPageReq); 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.lang.reflect.Field;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors;
/** /**
* (BasicInformation) * (BasicInformation)
@ -282,29 +283,38 @@ public class BasicInformationServiceImpl extends ServiceImpl<BasicInformationMap
public Long audit(AuditRequest req, int status) { public Long audit(AuditRequest req, int status) {
req.getBasicInformation().setStatus(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()); updateById(req.getBasicInformation());
//修改项目规划信息 //修改项目规划信息
planInformationService.updateById(req.getPlanInformation()); planInformationService.updateById(req.getPlanInformation());
//修改企业入驻信息 //修改企业入驻信息
qyrzInformationService.updateById(req.getQyrzInformation()); qyrzInformationService.updateById(req.getQyrzInformation());
//修改五要素模型信息 //修改五要素模型信息
wysmxInformationService.lambdaUpdate() wysmxInformationService.lambdaUpdate().eq(WysmxInformation::getXmId, req.getBasicInformation().getId()).remove();
.eq(WysmxInformation::getXmId, req.getBasicInformation().getId())
.remove();
wysmxInformationService.saveBatch(req.getWysmxInformations()); wysmxInformationService.saveBatch(req.getWysmxInformations());
//修改其他信息 //修改其他信息
otherInfoService.lambdaUpdate() otherInfoService.lambdaUpdate().eq(ProjectOtherInfo::getXmId, req.getBasicInformation().getId()).remove();
.eq(ProjectOtherInfo::getXmId, req.getBasicInformation().getId())
.remove();
otherInfoService.saveBatch(req.getProjectOtherInfos()); otherInfoService.saveBatch(req.getProjectOtherInfos());
if (status == 2) { if (status == 2) {
userService.getAllZwUser("关于" + req.getBasicInformation().getName() + "项目,待审核的通知", userService.getAllZwUser("关于" + req.getBasicInformation().getName() + "项目,待审核的通知", req.getBasicInformation().getId(), null, null);
req.getBasicInformation().getId(),
null,
null
);
} }
if (status == 3) { if (status == 3) {
SmartDeclaration sd = new SmartDeclaration(); SmartDeclaration sd = new SmartDeclaration();
@ -329,13 +339,9 @@ public class BasicInformationServiceImpl extends ServiceImpl<BasicInformationMap
//项目基本信息 //项目基本信息
basicInformationResponse.setBasicInformation(getById(id)); basicInformationResponse.setBasicInformation(getById(id));
//项目规划信息 //项目规划信息
basicInformationResponse.setPlanInformation(planInformationService.lambdaQuery() basicInformationResponse.setPlanInformation(planInformationService.lambdaQuery().eq(PlanInformation::getXmId, id).one());
.eq(PlanInformation::getXmId, id)
.one());
//项目建筑信息 //项目建筑信息
basicInformationResponse.setBuildingInformation(buildingInformationService.lambdaQuery() basicInformationResponse.setBuildingInformation(buildingInformationService.lambdaQuery().eq(BuildingInformation::getXmId, id).list());
.eq(BuildingInformation::getXmId, id)
.list());
//五要素模型信息 //五要素模型信息
ZwIdPageReq zwIdPageReq = new ZwIdPageReq(); ZwIdPageReq zwIdPageReq = new ZwIdPageReq();
zwIdPageReq.setXmId(id); zwIdPageReq.setXmId(id);
@ -361,45 +367,27 @@ public class BasicInformationServiceImpl extends ServiceImpl<BasicInformationMap
public void removeByXmIds(List<Long> idList) { public void removeByXmIds(List<Long> idList) {
idList.forEach(x -> { idList.forEach(x -> {
//删除项目基本信息 //删除项目基本信息
lambdaUpdate() lambdaUpdate().eq(BasicInformation::getId, x).remove();
.eq(BasicInformation::getId, x)
.remove();
//删除项目规划信息 //删除项目规划信息
planInformationService.lambdaUpdate() planInformationService.lambdaUpdate().eq(PlanInformation::getXmId, x).remove();
.eq(PlanInformation::getXmId, x)
.remove();
//删除项目建筑信息 //删除项目建筑信息
buildingInformationService.lambdaUpdate() buildingInformationService.lambdaUpdate().eq(BuildingInformation::getXmId, x).remove();
.eq(BuildingInformation::getXmId, x)
.remove();
//删除五要素模型信息 //删除五要素模型信息
wysmxInformationService.lambdaUpdate() wysmxInformationService.lambdaUpdate().eq(WysmxInformation::getXmId, x).remove();
.eq(WysmxInformation::getXmId, x)
.remove();
//删除月度进展信息 //删除月度进展信息
// projectMonthInfoService.lambdaUpdate() // projectMonthInfoService.lambdaUpdate()
// .eq(ProjectMonthInfo::getXmId,x) // .eq(ProjectMonthInfo::getXmId,x)
// .remove(); // .remove();
//删除企业入驻信息 //删除企业入驻信息
qyrzInformationService.lambdaUpdate() qyrzInformationService.lambdaUpdate().eq(QyrzInformation::getXmId, x).remove();
.eq(QyrzInformation::getXmId, x)
.remove();
//删除项目图例 //删除项目图例
projectLegendService.lambdaUpdate() projectLegendService.lambdaUpdate().eq(ProjectLegend::getXmId, x).remove();
.eq(ProjectLegend::getXmId, x)
.remove();
//删除项目巡礼 //删除项目巡礼
xmxlService.lambdaUpdate() xmxlService.lambdaUpdate().eq(Xmxl::getXmId, x).remove();
.eq(Xmxl::getXmId, x)
.remove();
//删除项目备忘录 //删除项目备忘录
projectRemarkService.lambdaUpdate() projectRemarkService.lambdaUpdate().eq(ProjectRemark::getXmId, x).remove();
.eq(ProjectRemark::getXmId, x)
.remove();
//删除其他信息 //删除其他信息
otherInfoService.lambdaUpdate() otherInfoService.lambdaUpdate().eq(ProjectOtherInfo::getXmId, x).remove();
.eq(ProjectOtherInfo::getXmId, x)
.remove();
}); });
} }
} }

@ -23,6 +23,27 @@ import java.util.stream.Collectors;
@Service("wysmxInformationService") @Service("wysmxInformationService")
public class WysmxInformationServiceImpl extends ServiceImpl<WysmxInformationMapper, WysmxInformation> implements 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 * id
* *

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

Loading…
Cancel
Save