Commit 3f6c11d0 authored by 陈晓晋's avatar 陈晓晋

消息提醒和消息待办提交20240516

parent 965892b1
......@@ -9,7 +9,6 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.BacklogInfo;
import com.ruoyi.system.domain.MessageInfo;
import com.ruoyi.system.service.IMessageInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
......@@ -160,13 +159,15 @@ public class BacklogInfoController extends BaseController {
/**
* 未读改为已读
* 待办改为已办
* 只有点击"执行任务结束"按钮才可以改为办结
*/
@PostMapping("/changeRead")
@ResponseBody
@Transactional
public AjaxResult changeRead(BacklogInfo backlogInfo) {
backlogInfo.setStatus("1");
return toAjax(backlogInfoService.updateBacklogInfo(backlogInfo));
// backlogInfo.setStatus("1");
// return toAjax(backlogInfoService.updateBacklogInfo(backlogInfo));
return toAjax(1);
}
}
......@@ -116,7 +116,7 @@ public class CurrentRiskUserHolidayController extends BaseController {
}
SysUser user = sysUserService.selectUserById(getUserId());
//给上报人发消息
commonMessageInfoService.insertMessageInfo(currentRiskUserHoliday.getId() + "", "finish", "请假提醒"
commonMessageInfoService.insertMessageInfo(currentRiskUserHoliday.getId() + "", "","finish", "请假提醒"
, "今日用户'" + user.getNickName() + "'已请假,望知晓!"
, "0", getUsername(), "请假提醒", "", "/patrolCancle/detail?id=" + currentRiskUserHoliday.getId(), user.getUserName());
return AjaxResult.success();
......
......@@ -18,6 +18,7 @@ import com.deepoove.poi.config.ConfigureBuilder;
import com.deepoove.poi.data.ChartMultiSeriesRenderData;
import com.deepoove.poi.data.Charts;
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
......@@ -39,7 +40,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
......@@ -259,6 +259,7 @@ public class RiskPlanController extends BaseController
return R.ok(ledgerFloorService.getFloorListByBuildingId(buildingId));
}
@Anonymous
@Log(title = "现状风险巡查用户请假", businessType = BusinessType.INSERT)
@PostMapping("/advise")
public AjaxResult advise(@RequestBody RiskPlan reqVO) {
......@@ -268,6 +269,7 @@ public class RiskPlanController extends BaseController
return AjaxResult.success();
}
@Anonymous
@GetMapping("/export/{id}")
public void export(@PathVariable("id") Long id,HttpServletResponse response) {
//模板地址,存放在resources目录下
......@@ -296,6 +298,14 @@ public class RiskPlanController extends BaseController
//第二个图表:不同事故类型对应的风险点数量统计图
String[] riskPointName = new String[]{};
Integer[] riskPointNum = new Integer[]{};
//占多数的风险点数量
int maxRiskPointNum = 0;
//风险点类型总数
int totalRiskPointNum = 0;
//占多数风险点名称
String maxRiskPointName = "";
//占对数比例
String maxRiskRate = "";
if(!CollectionUtils.isEmpty(data.getRiskTypeList())){
int size = data.getRiskTypeList().size();
riskPointName = new String[size];
......@@ -303,14 +313,6 @@ public class RiskPlanController extends BaseController
List<RiskTypeExportVO> riskTypeList = data.getRiskTypeList().stream()
.sorted(Comparator.comparing(RiskTypeExportVO::getRiskTypeNum).reversed())
.collect(Collectors.toList());
//占多数的风险点数量
int maxRiskPointNum = 0;
//风险点类型总数
int totalRiskPointNum = 0;
//占多数风险点名称
String maxRiskPointName = "";
//占对数比例
String maxRiskRate = "";
for (int i = 0; i < size; i++) {
RiskTypeExportVO riskType = riskTypeList.get(i);
riskPointNum[i] = riskType.getRiskTypeNum();
......@@ -326,12 +328,13 @@ public class RiskPlanController extends BaseController
maxRiskPointNum = riskTypeList.get(0).getRiskTypeNum();
maxRiskPointName = riskTypeList.get(0).getRiskTypeName();
}
maxRiskRate = new BigDecimal(maxRiskPointNum).divide(new BigDecimal(totalRiskPointNum))
maxRiskRate = new BigDecimal(String.valueOf(maxRiskPointNum)).divide(new BigDecimal(String.valueOf(totalRiskPointNum)),4,RoundingMode.HALF_UP)
.multiply(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP).toString();
map.put("maxRiskRate",maxRiskRate+"%");
map.put("totalRiskPointNum",totalRiskPointNum);
map.put("maxRiskPointName",maxRiskPointName);
maxRiskRate += "%";
};
map.put("maxRiskRate",maxRiskRate);
map.put("totalRiskPointNum",totalRiskPointNum);
map.put("maxRiskPointName",maxRiskPointName);
ChartMultiSeriesRenderData chart2 = Charts
.ofMultiSeries("不同事故类型对应的风险点数量统计图",riskPointName)
.addSeries("riskPoint", riskPointNum)
......
package com.ruoyi.system.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
/**
* 消息信息对象 message_info
......@@ -29,6 +27,10 @@ public class MessageInfo extends BaseEntity
@Excel(name = "流程事项ID")
private String pid;
/** 建筑物ID */
@Excel(name = "建筑物ID")
private String mainId;
/** 信息标题 */
@Excel(name = "信息标题")
private String title;
......
......@@ -13,7 +13,7 @@ public interface ICommonMessageInfoService {
*
* @return 结果
*/
public int insertMessageInfo(String pid, String nodeId, String title, String content, String status, String messageBy, String menuName, String menuUrl, String appUrl, String createBy);
public int insertMessageInfo(String pid,String mainId, String nodeId, String title, String content, String status, String messageBy, String menuName, String menuUrl, String appUrl, String createBy);
/**
* 新增通知公告
......
......@@ -26,12 +26,13 @@ public class CommonMessageInfoServiceImpl implements ICommonMessageInfoService {
* @return 结果
*/
@Override
public int insertMessageInfo(String pid, String nodeId, String title, String content, String status, String messageBy, String menuName, String menuUrl, String appUrl, String createBy) {
public int insertMessageInfo(String pid,String mainId, String nodeId, String title, String content, String status, String messageBy, String menuName, String menuUrl, String appUrl, String createBy) {
MessageInfo messageInfo = new MessageInfo();
messageInfo.setId(UUID.randomUUID().toString().replace("-", ""));
if (StringUtils.isNotNull(pid) && StringUtils.isNotEmpty(pid)) {
messageInfo.setPid(pid);
}
messageInfo.setMainId(mainId);
if (StringUtils.isNotNull(nodeId) && StringUtils.isNotEmpty(nodeId)) {
messageInfo.setNodeId(nodeId);
}
......@@ -100,9 +101,9 @@ public class CommonMessageInfoServiceImpl implements ICommonMessageInfoService {
if (StringUtils.isNotNull(nodeId) && StringUtils.isNotEmpty(nodeId)) {
backlogInfo.setNodeId(nodeId);
}
if (StringUtils.isNotNull(mainId) && StringUtils.isNotEmpty(mainId)) {
backlogInfo.setMainId(mainId);
}
// if (StringUtils.isNotNull(mainId) && StringUtils.isNotEmpty(mainId)) {
backlogInfo.setMainId(mainId);//解决传递空字符问题
// }
if (StringUtils.isNotNull(title) && StringUtils.isNotEmpty(title)) {
backlogInfo.setTitle(title);
}
......
......@@ -279,6 +279,14 @@ public class RiskPlanInherentListServiceImpl
public RiskNotificationExportWordDto getRiskNotificationExportWordDto(Long inherentId) {
RiskNotificationExportWordDto dto = riskPlanInherentListMapper.getRiskNotificationExportWordDto(inherentId);
if (StrUtil.isNotBlank(dto.getSafetyWarningSigns())){
//管理措施和应急措施换行
if (dto.getMeasuresEmergency()!=null) {
dto.setMeasuresEmergency(dto.getMeasuresEmergency().replaceAll("\n","<w:br />"));
}
if (dto.getMeasuresAdministration()!=null) {
dto.setMeasuresAdministration(dto.getMeasuresAdministration().replaceAll("\n","<w:br />"));
}
//图片处理
List<HashMap<String, String>> safetyWarningSignsList = Arrays.stream(dto.getSafetyWarningSigns().split(","))
.map(sign ->{
HashMap<String, String> map = new HashMap<>();
......
......@@ -198,19 +198,41 @@ public class RiskPlanServiceImpl extends MPJBaseServiceImpl<RiskPlanMapper, Risk
for (int j = 0; j < workUsers.length; j++) {
SysUser workUser = userService.selectUserById(Long.valueOf(workUsers[j]));
System.out.println("pid-->"+ riskPlan.getId() + ",manid-->" +riskPlan.getId() + ",backlog_by--?" + workUser.getUserName()
+ ",create_by-->" + createUser.getUserName()
);
commonMessageInfoService.insertBacklogInfo(String.valueOf(riskPlan.getId()), "risk_confirm_sub", String.valueOf(riskPlan.getId()),
"风险评估", "风险",
content, "0", workUser.getUserName(),
"风险评估", "riskTaskList" , "riskTaskList", createUser.getUserName());
//TODO 消息推送
commonMessageInfoService.insertMessageInfo(String.valueOf(riskPlan.getId()) + "", "risk_confirm_sub", "风险评估"
, content
, "0", workUser.getUserName(), "风险评估", "", "riskTaskList", createUser.getUserName());
// System.out.println("pid-->"+ riskPlan.getId() + ",manid-->" +riskPlan.getId() + ",backlog_by--?" + workUser.getUserName()
// + ",create_by-->" + createUser.getUserName()
// );
/**
* 每个建筑作为一条消息
*/
if (riskPlan.getBuildingIds()!=null&& !riskPlan.getBuildingIds().isEmpty()) {
String [] buildingIdArr =riskPlan.getBuildingIds().split(",");
for (String buildingId : buildingIdArr) {
commonMessageInfoService.insertBacklogInfo(String.valueOf(riskPlan.getId()), "risk_confirm_sub",buildingId,
"风险评估", "风险",
content, "0", workUser.getUserName(),
"风险评估", "riskTaskList" , "riskTaskList", createUser.getUserName());
//TODO 消息推送
commonMessageInfoService.insertMessageInfo(String.valueOf(riskPlan.getId()),buildingId ,"risk_confirm_sub", "风险评估"
, content
, "0", workUser.getUserName(), "风险评估", "", "riskTaskList", createUser.getUserName());
}
}else{
commonMessageInfoService.insertBacklogInfo(String.valueOf(riskPlan.getId()), "risk_confirm_sub", String.valueOf(riskPlan.getId()),
"风险评估", "风险",
content, "0", workUser.getUserName(),
"风险评估", "riskTaskList" , "riskTaskList", createUser.getUserName());
//TODO 消息推送
commonMessageInfoService.insertMessageInfo(String.valueOf(riskPlan.getId()) ,"", "risk_confirm_sub", "风险评估"
, content
, "0", workUser.getUserName(), "风险评估", "", "riskTaskList", createUser.getUserName());
}
}
return i;
......@@ -366,17 +388,14 @@ public class RiskPlanServiceImpl extends MPJBaseServiceImpl<RiskPlanMapper, Risk
//消息内容 XXX给您发送一条名为[xxx]的风险评估审批,请尽快处理!
String content = loginUser.getNickName() + "给您发送了一条名为【" + riskPlan.getName() + "】的风险评估审批,请尽快处理!";
System.out.println("pid-->"+ riskPlan.getId() + ",manid-->" +riskPlan.getId() + ",backlog_by--?" + createUser.getUserName()
+ ",create_by-->" + loginUser.getNickName() + "content-->" + content
);
commonMessageInfoService.insertBacklogInfo(String.valueOf(riskPlan.getId()), "risk_confirm_sub", String.valueOf(riskPlan.getId()),
commonMessageInfoService.insertBacklogInfo(String.valueOf(riskPlan.getId()), "risk_confirm_sub", "",
"风险审批", "风险",
content, "0", createUser.getUserName(),
"风险审批", "riskTaskList" , "riskTaskList", loginUser.getUserName());
//TODO 审批阶段消息推送
commonMessageInfoService.insertMessageInfo(String.valueOf(riskPlan.getId()) + "", "risk_confirm_sub", "风险评估"
commonMessageInfoService.insertMessageInfo(String.valueOf(riskPlan.getId()) , "","risk_confirm_sub", "风险评估"
, content
, "0", createUser.getUserName(), "风险评估", "", "riskTaskList",
loginUser.getUserName());
......@@ -440,7 +459,7 @@ public class RiskPlanServiceImpl extends MPJBaseServiceImpl<RiskPlanMapper, Risk
for (int i = 0; i < workUsers.length; i++) {
SysUser workUser = userService.selectUserById(Long.valueOf(workUsers[i]));
commonMessageInfoService.insertMessageInfo(String.valueOf(riskPlan.getId()) + "", "risk_confirm_sub",
commonMessageInfoService.insertMessageInfo(String.valueOf(riskPlan.getId()) ,"", "risk_confirm_sub",
"风险评估", content, "0", workUser.getUserName(), "风险评估",
"", "riskTaskList", loginUser.getUserName());
}
......
......@@ -104,6 +104,26 @@ public class RiskPlanUserBuildingServiceImpl
//修改计划状态
riskPlan.setStatus(RiskPlanStatusType.RUNNING.getStatus());
riskPlanService.updateRiskPlan(riskPlan);
}
//TODO 执行结束后 将该评估的待办变更为已读
//获取当前风险评估的ID 的待办信息
BacklogInfo backlogInfo = new BacklogInfo();
backlogInfo.setAppUrl("riskTaskList");
backlogInfo.setTitle("风险评估");
backlogInfo.setPid(String.valueOf(planId));
backlogInfo.setMainId(String.valueOf(buildingId));
backlogInfo.setStatus("0");
List<BacklogInfo> backlogInfos = backlogInfoMapper.selectBacklogInfoList(backlogInfo);
for (int i = 0; i < backlogInfos.size(); i++) {
BacklogInfo backlogInfo1 = new BacklogInfo();
backlogInfo1.setPid(String.valueOf(planId));
backlogInfo1.setMainId(String.valueOf(buildingId));
backlogInfo1.setAppUrl("riskTaskList");
backlogInfo1.setTitle("风险评估");
backlogInfo1.setStatus("1");
int i1 = backlogInfoMapper.updateBacklogInfoByPid(backlogInfo1);
}
//查看是否全部楼宇提交
......@@ -135,45 +155,31 @@ public class RiskPlanUserBuildingServiceImpl
riskPlan.setStatus(RiskPlanStatusType.WAIT_LEADER_APPROVE.getStatus());
riskPlanService.updateRiskPlan(riskPlan);
}
//TODO 执行阶段待办推送
//获取当前人员
LoginUser user = SecurityUtils.getLoginUser();
SysUser loginUser = userService.selectUserById(user.getUserId());
//获取创建人
SysUser createUser = userService.selectUserById(riskPlan.getCreateUserId());
//获取负责人
SysUser leaderUser = userService.selectUserById(riskPlan.getLeaderUserId());
//消息内容 XXX给您发送了一条名为[xxx]的风险验收审批,请尽快处理
String content = loginUser.getNickName() + "给您发送了一条名为【" + riskPlan.getName() + "】风险验收审批,请尽快处理!";
commonMessageInfoService.insertBacklogInfo(String.valueOf(riskPlan.getId()), "risk_confirm_sub",
"", "风险审批", "风险", content, "0", leaderUser.getUserName(),
"风险审批", "riskTaskList" , "riskTaskList", loginUser.getUserName());
//TODO 审批阶段消息推送
commonMessageInfoService.insertMessageInfo(String.valueOf(riskPlan.getId()) , "","risk_confirm_sub", "风险评估"
, content, "0", leaderUser.getUserName(), "风险评估", "", "riskTaskList",
loginUser.getUserName());
//TODO 执行结束后 将该评估的待办变更为已读
//获取当前风险评估的ID 的待办信息
BacklogInfo backlogInfo = new BacklogInfo();
backlogInfo.setPid(String.valueOf(riskPlan.getId()));
backlogInfo.setStatus("0");
List<BacklogInfo> backlogInfos = backlogInfoMapper.selectBacklogInfoList(backlogInfo);
for (int i = 0; i < backlogInfos.size(); i++) {
BacklogInfo backlogInfo1 = new BacklogInfo();
backlogInfo1.setPid(String.valueOf(riskPlan.getId()));
backlogInfo1.setStatus("1");
int i1 = backlogInfoMapper.updateBacklogInfoByPid(backlogInfo1);
}
//TODO 执行阶段待办推送
//获取当前人员
LoginUser user = SecurityUtils.getLoginUser();
SysUser loginUser = userService.selectUserById(user.getUserId());
//获取创建人
SysUser createUser = userService.selectUserById(riskPlan.getCreateUserId());
//获取负责人
SysUser leaderUser = userService.selectUserById(riskPlan.getLeaderUserId());
//消息内容 XXX给您发送了一条名为[xxx]的风险验收审批,请尽快处理
String content = loginUser.getNickName() + "给您发送了一条名为【" + riskPlan.getName() + "】风险验收审批,请尽快处理!";
System.out.println("pid-->"+ riskPlan.getId() + ",manid-->" +riskPlan.getId() + ",backlog_by--?" + leaderUser.getUserName()
+ ",create_by-->" + loginUser.getNickName()
);
commonMessageInfoService.insertBacklogInfo(String.valueOf(riskPlan.getId()), "risk_confirm_sub",
String.valueOf(riskPlan.getId()), "风险审批", "风险", content, "0", leaderUser.getUserName(),
"风险审批", "riskTaskList" , "riskTaskList", loginUser.getUserName());
//TODO 审批阶段消息推送
commonMessageInfoService.insertMessageInfo(String.valueOf(riskPlan.getId()) + "", "risk_confirm_sub", "风险评估"
, content, "0", leaderUser.getUserName(), "风险评估", "", "riskTaskList",
loginUser.getUserName());
return 1;
}
......
......@@ -48,7 +48,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.remark
from backlog_info a
<where>
<if test="appUrl != null and appUrl != ''">and a.app_url is not null</if>
<if test="appUrl != null and appUrl != ''">
and a.app_url is not null
<if test="appUrl == 'riskTaskList'">
<if test="mainId != null and mainId != ''">and a.main_id = #{mainId}</if>
<if test="pid != null and pid != ''">and a.pid = #{pid}</if>
<if test="title != null and title != ''">and a.title = #{title}</if>
</if>
</if>
<if test="menuUrl != null and menuUrl != ''">and a.menu_url is not null</if>
<if test="backlogBy != null and backlogBy != ''">and a.backlog_by = #{backlogBy}</if>
<if test="status != null and status != ''">and a.status = #{status}</if>
......@@ -197,6 +205,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<where>
<if test="pid != null and pid != ''">and pid = #{pid}</if>
<if test="mainId != null and mainId != ''">and main_id = #{mainId}</if>
</where>
</update>
......
......@@ -57,13 +57,13 @@
</sql>
<select id="getProjectCount" resultType="java.lang.Long">
select count(1) from ledger_project
select count(1) from ledger_project pr inner join risk_plan rp on pr.id = rp.project_id
<where>
AND del_flag = '0' and status =0
AND pr.del_flag = '0' and pr.status =0
<if test="areaName != null and areaName != ''">
<if test="level != null and level == 1 ">and province like concat('%', #{areaName}, '%')</if>
<if test="level != null and level == 2 ">and city like concat('%', #{areaName}, '%')</if>
<if test="level != null and level == 3 ">and district like concat('%', #{areaName}, '%')</if>
<if test="level != null and level == 1 ">and pr.province like concat('%', #{areaName}, '%')</if>
<if test="level != null and level == 2 ">and pr.city like concat('%', #{areaName}, '%')</if>
<if test="level != null and level == 3 ">and pr.district like concat('%', #{areaName}, '%')</if>
</if>
</where>
</select>
......@@ -71,6 +71,7 @@
<select id="getBuildingCount" resultType="java.lang.Long">
select count(1) from ledger_building b
inner join ledger_project p on b.project_id=p.id
inner join risk_plan rp on p.id=rp.project_id
<where>
AND b.del_flag = '0' and b.status =0
<if test="areaName != null and areaName != ''">
......@@ -88,6 +89,7 @@
SELECT count(1) FROM ledger_floor f
inner JOIN ledger_building b ON f.building_id =b.id
inner JOIN ledger_project p ON b.project_id = p.id
inner join risk_plan rp on p.id=rp.project_id
<where>
AND f.del_flag = '0' and f.status =0
<if test="areaName != null and areaName != ''">
......
......@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" />
<result property="nodeId" column="node_id" />
<result property="pid" column="pid" />
<result property="mainId" column="main_id" />
<result property="title" column="title" />
<result property="content" column="content" />
<result property="status" column="status" />
......@@ -23,13 +24,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectMessageInfoVo">
select id, node_id, pid, title, content, status, message_by, menu_name, menu_url, app_url, create_by, create_time, update_by, update_time, remark from message_info
select id, node_id, pid, main_id,title, content, status, message_by, menu_name, menu_url, app_url, create_by, create_time, update_by, update_time, remark from message_info
</sql>
<select id="selectMessageInfoList" parameterType="com.ruoyi.system.domain.MessageInfo" resultMap="MessageInfoResult">
select a.id,
a.node_id,
a.pid,
a.main_id,
a.title,
a.content,
a.status,
......@@ -82,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null">id,</if>
<if test="nodeId != null">node_id,</if>
<if test="pid != null">pid,</if>
<if test="mainId != null">main_id,</if>
<if test="title != null">title,</if>
<if test="content != null">content,</if>
<if test="status != null">status,</if>
......@@ -99,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null">#{id},</if>
<if test="nodeId != null">#{nodeId},</if>
<if test="pid != null">#{pid},</if>
<if test="mainId != null">#{mainId},</if>
<if test="title != null">#{title},</if>
<if test="content != null">#{content},</if>
<if test="status != null">#{status},</if>
......@@ -119,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="nodeId != null">node_id = #{nodeId},</if>
<if test="pid != null">pid = #{pid},</if>
<if test="mainId != null">main_id = #{mainId},</if>
<if test="title != null">title = #{title},</if>
<if test="content != null">content = #{content},</if>
<if test="status != null">status = #{status},</if>
......
......@@ -90,7 +90,7 @@
inner JOIN ledger_building lb ON lb.id = lf.building_id
inner JOIN ledger_project p ON p.id = lb.project_id
<where>
and rpil.del_flag=0
and rpil.del_flag=0 and YEAR(rpil.create_time) =DATE_FORMAT(NOW(),'%Y')
<if test="areaName != null and areaName != ''">
<if test="level != null and level == 1 ">and p.province like concat('%', #{areaName}, '%')</if>
<if test="level != null and level == 2 ">and p.city like concat('%', #{areaName}, '%')</if>
......
......@@ -379,21 +379,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(select GROUP_CONCAT(b.`name`) from ledger_building b where a.id = b.project_id and b.`status` = '0' )buildName,
(select COUNT(1) from ledger_floor b where b.`status` = '0' and b.building_id in (select id from ledger_building c where c.project_id = a.id and c.`status` = '0')) floorCount,
(select COUNT(1) from risk_plan_inherent_list b where b.plan_id = #{id} and b.del_flag = '0') inherentCount,
(select GROUP_CONCAT(type) from risk_plan_inherent_list b where b.plan_id = 149 and b.del_flag = '0')inherentType,
(select GROUP_CONCAT(type) from risk_plan_inherent_list b where b.plan_id = #{id} and b.del_flag = '0')inherentType,
(select count(1) from risk_plan_inherent_list b where b.plan_id = #{id} and b.del_flag = '0' and b.`level` = '重大风险' ) zdCount,
(select count(1) from risk_plan_inherent_list b where b.plan_id = #{id} and b.del_flag = '0' and b.`level` = '较大风险' ) jdCount,
(select count(1) from risk_plan_inherent_list b where b.plan_id = #{id} and b.del_flag = '0' and b.`level` = '一般风险' ) ybCount,
(select count(1) from risk_plan_inherent_list b where b.plan_id = #{id} and b.del_flag = '0' and b.`level` = '低风险' ) dCount,
(select GROUP_CONCAT(type) from risk_plan_inherent_list b where b.plan_id = #{id} and b.del_flag = '0' and (b.`level` = '重大风险' or b.`level` = '较大风险' ) ) zjdInherentType,
(select GROUP_CONCAT(type) from risk_plan_inherent_list b where b.plan_id = 149 and b.del_flag = '0' and b.`level` = "重大风险" ) zdRisk,
(select GROUP_CONCAT(type) from risk_plan_inherent_list b where b.plan_id = 149 and b.del_flag = '0' and b.`level` = "较大风险" ) jdRisk,
(select GROUP_CONCAT(type) from risk_plan_inherent_list b where b.plan_id = #{id} and b.del_flag = '0' and b.`level` = "重大风险" ) zdRisk,
(select GROUP_CONCAT(type) from risk_plan_inherent_list b where b.plan_id = #{id} and b.del_flag = '0' and b.`level` = "较大风险" ) jdRisk,
a.business,
a.risk_color riskColor,
a.risk_level riskLevel,
CASE WHEN a.`status` = '0' THEN '正常'
ELSE '停业' END status
from ledger_project a
where a.id = 1947
where a.id = #{projectId}
</select>
<select id="riskPlanRoomName" resultType="java.lang.String">
SELECT
......
......@@ -956,7 +956,7 @@
<w:p wsp:rsidR="00566CAE" wsp:rsidRPr="009370A0" wsp:rsidRDefault="006F07FB"
wsp:rsidP="009370A0">
<w:pPr>
<w:jc w:val="center"/>
<w:jc w:val="left"/>
</w:pPr>
<w:r wsp:rsidRPr="009370A0">
<w:rPr>
......@@ -1075,7 +1075,7 @@
<w:p wsp:rsidR="009A59FC" wsp:rsidRPr="009370A0" wsp:rsidRDefault="004A7FC2"
wsp:rsidP="009370A0">
<w:pPr>
<w:jc w:val="center"/>
<w:jc w:val="left"/>
</w:pPr>
<w:r wsp:rsidRPr="009370A0">
<w:rPr>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment