累计跟新

main
liukewei 8 months ago
parent 9f748f183d
commit f81142913f

@ -181,5 +181,14 @@ public class EhsIndexStatisticsController extends BaseController {
} }
return AjaxResult.success(row); return AjaxResult.success(row);
} }
/**
*
*/
@ApiOperation("隐患整改进度分析统计")
@GetMapping("/getHiddenDangerStatusMapList")
public AjaxResult getHiddenDangerStatusMapList()
{
List<Map<String,Object>> list = ehsIndexStatisticsService.getHiddenDangerStatusMapList();
return AjaxResult.success(list);
}
} }

@ -229,7 +229,7 @@ public class EhsMyMessageController extends BaseController
String myMsgType ="m"+classFirst.toString(); String myMsgType ="m"+classFirst.toString();
ehsMaterial.setIsSendQuantity(1); ehsMaterial.setIsSendQuantity(1);
List<EhsMaterial> list = ehsMaterialService.selectEhsMaterialList(ehsMaterial); List<EhsMaterial> list = ehsMaterialService.selectEhsMaterialList(ehsMaterial);
String[] MaterialIds = list.stream().map(item -> item.getMaterialId().toString()).toArray(String[]::new); String[] MaterialIds = list.stream().map(item -> item.getMaterialDetailId().toString()).toArray(String[]::new);
String strmIds = StringUtils.join(MaterialIds,","); String strmIds = StringUtils.join(MaterialIds,",");
EhsMyMessage ehsMyMessage = new EhsMyMessage(); EhsMyMessage ehsMyMessage = new EhsMyMessage();
ehsMyMessage.setMyMessageType(myMsgType); ehsMyMessage.setMyMessageType(myMsgType);

@ -209,7 +209,9 @@ public class EhsNoticeMessageController extends BaseController
EhsMyMessage msgNew = new EhsMyMessage(); EhsMyMessage msgNew = new EhsMyMessage();
msgNew.setMyMessageKey(noticeMessageId.toString()); msgNew.setMyMessageKey(noticeMessageId.toString());
msgNew.setMyMessageState("Y"); msgNew.setMyMessageState("Y");
ehsMyMessageService.saveMyMessage(msgNew); msgNew.setMyUserId(SecurityUtils.getUserId());
msgNew.setMyMessageType("1");
ehsMyMessageService.updatebyKeyUserId(msgNew);
return success(ehsNoticeMessage); return success(ehsNoticeMessage);
} }

@ -25,5 +25,6 @@ public interface EhsIndexStatisticsMapper {
List<Map<String,Object>> geteconomicTypeMapList(@Param("deptId") Long deptId); List<Map<String,Object>> geteconomicTypeMapList(@Param("deptId") Long deptId);
List<Map<String,Object>> getenterpriseScaleMapList(@Param("deptId") Long deptId); List<Map<String,Object>> getenterpriseScaleMapList(@Param("deptId") Long deptId);
List<Map<String,Object>> getHiddenDangerTypeMapList(@Param("deptId") Long deptId); List<Map<String,Object>> getHiddenDangerTypeMapList(@Param("deptId") Long deptId);
List<Map<String,Object>> getHiddenDangerStatusMapList(@Param("deptId") Long deptId);
List<Map<String,Object>> getHiddenDangerDataMapList(@Param("yearStr") String yearStr,@Param("deptId") Long deptId); List<Map<String,Object>> getHiddenDangerDataMapList(@Param("yearStr") String yearStr,@Param("deptId") Long deptId);
} }

@ -35,4 +35,5 @@ public interface EhsIndexStatisticsService {
List<Map<String,Object>> getenterpriseScaleMapList(); List<Map<String,Object>> getenterpriseScaleMapList();
List<Map<String,Object>> getHiddenDangerTypeMapList(); List<Map<String,Object>> getHiddenDangerTypeMapList();
List<Map<String,Object>> getHiddenDangerDataMapList(String yearStr); List<Map<String,Object>> getHiddenDangerDataMapList(String yearStr);
List<Map<String,Object>> getHiddenDangerStatusMapList( );
} }

@ -172,4 +172,19 @@ public class EhsIndexStatisticsServiceImpl implements EhsIndexStatisticsService
} }
return mapper.getHiddenDangerDataMapList(yearStr,deptId); return mapper.getHiddenDangerDataMapList(yearStr,deptId);
} }
@Override
public List<Map<String,Object>> getHiddenDangerStatusMapList() {
Long deptId = null;
// 如果登录用户不是超级管理员,并且他的部门不是唐河县应急管理局(根节点),那么只能查询当前登录用户他的部门创建的公文
SysUser currentUser = SecurityUtils.getLoginUser().getUser();
List<Long> roleIds = currentUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList());
Long deptParentId = currentUser.getDept().getParentId();
if (!roleIds.contains(1L) &&
deptParentId != null &&
deptParentId.longValue() != 0) {
deptId = currentUser.getDept().getDeptId().longValue();
}
return mapper.getHiddenDangerStatusMapList(deptId);
}
} }

@ -71,5 +71,7 @@ public class EhsMaterial extends BaseEntity
private String sendQuantity; private String sendQuantity;
@TableField(exist = false) @TableField(exist = false)
private Integer isSendQuantity; private Integer isSendQuantity;
@TableField(exist = false)
private Long materialDetailId;
} }

@ -78,11 +78,12 @@ public class EhsMyMessageServiceImpl extends ServiceImpl<EhsMyMessageMapper, Ehs
msgNew.setMyMessageType("1"); msgNew.setMyMessageType("1");
msgNew.setMyMessageDesc("您有新的消息通知未阅读,请及及时处理!"); msgNew.setMyMessageDesc("您有新的消息通知未阅读,请及及时处理!");
msgNew.setMyMessageState(StringUtils.isNotEmpty(msgNew.getMyMessageState())?msgNew.getMyMessageState():"N"); msgNew.setMyMessageState(StringUtils.isNotEmpty(msgNew.getMyMessageState())?msgNew.getMyMessageState():"N");
int i = ehsMyMessageMapper.updatebyKeyUserId(msgNew);
/*int i = ehsMyMessageMapper.updatebyKeyUserId(msgNew);
if(i==0){ if(i==0){
save(msgNew); save(msgNew);
} }*/
return true; return save(msgNew);
} }
public int updatebyKeyUserId(EhsMyMessage ehsMyMessage){ public int updatebyKeyUserId(EhsMyMessage ehsMyMessage){
return ehsMyMessageMapper.updatebyKeyUserId(ehsMyMessage); return ehsMyMessageMapper.updatebyKeyUserId(ehsMyMessage);

@ -71,6 +71,10 @@ public class EhsRiskServiceImpl extends ServiceImpl<EhsRiskMapper, EhsRisk> impl
@Override @Override
public List<EhsRisk> selectEhsRiskList(EhsRisk ehsRisk) public List<EhsRisk> selectEhsRiskList(EhsRisk ehsRisk)
{ {
if(SecurityUtils.getLoginUser().getUser().getDept().getParentId()!=null &&
SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0) {
ehsRisk.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue());
}
return ehsRiskMapper.selectEhsRiskList(ehsRisk); return ehsRiskMapper.selectEhsRiskList(ehsRisk);
} }
/** /**

@ -225,6 +225,21 @@ SELECT
GROUP BY GROUP BY
e.hidden_danger_type e.hidden_danger_type
</select> </select>
<select id="getHiddenDangerStatusMapList"
resultType="map">
SELECT
ifnull(d.dict_label,'未知') 'name',
count( 1 ) 'value'
FROM
ehs_hidden_danger e
LEFT JOIN sys_dict_data d ON e.status = d.dict_value
AND d.dict_type = 'hidden_danger_status'
<where>
<if test="deptId != null and deptId != ''">and dept_id = #{deptId}</if>
</where>
GROUP BY
e.status
</select>
<select id="getHiddenDangerDataMapList" <select id="getHiddenDangerDataMapList"
resultType="map"> resultType="map">
SELECT SELECT

@ -25,12 +25,13 @@
<result property="createUserId" column="create_user_id" /> <result property="createUserId" column="create_user_id" />
<result property="updateUserId" column="update_user_id" /> <result property="updateUserId" column="update_user_id" />
<result property="isSendQuantity" column="is_send_quantity" /> <result property="isSendQuantity" column="is_send_quantity" />
<result property="materialDetailId" column="material_detail_id" />
</resultMap> </resultMap>
<sql id="selectEhsMaterialVo"> <sql id="selectEhsMaterialVo">
select m.* , d.dept_name,a.send_quantity from ehs_material m select m.* , d.dept_name,a.send_quantity ,a.material_detail_id from ehs_material m
left join sys_dept d on m.dept_id = d.dept_id left join sys_dept d on m.dept_id = d.dept_id
left join (select GROUP_CONCAT(send_quantity ) send_quantity,m.material_id left join (select GROUP_CONCAT(send_quantity ) send_quantity,m.material_id,material_detail_id
from ehs_material m left join ehs_material_detail dt from ehs_material m left join ehs_material_detail dt
on dt.material_id= m.material_id and dt.outbound_user_id is null group by dt.material_id ) a on dt.material_id= m.material_id and dt.outbound_user_id is null group by dt.material_id ) a
on a.material_id= m.material_id on a.material_id= m.material_id

@ -87,7 +87,7 @@
<update id="updatebyKeyUserId" parameterType="GenTableColumn"> <update id="updatebyKeyUserId" parameterType="GenTableColumn">
update ehs_my_message update ehs_my_message
set my_message_state = #{myMessageState} set my_message_state = #{myMessageState}
where my_message_key = #{myMessageKey} and my_user_id = #{myUserId} where my_message_key = #{myMessageKey} and my_user_id = #{myUserId} and my_message_type= #{myMessageType}
</update> </update>
<update id="updateHDbyKeyUserId" parameterType="GenTableColumn"> <update id="updateHDbyKeyUserId" parameterType="GenTableColumn">
update ehs_my_message update ehs_my_message

@ -55,7 +55,7 @@
from ehs_notice_message m from ehs_notice_message m
left join sys_user e on e.user_id = m.CREATE_USER_ID left join sys_user e on e.user_id = m.CREATE_USER_ID
left join sys_dept d on m.dept_id=d.dept_id and d.parent_id!=0 left join sys_dept d on m.dept_id=d.dept_id and d.parent_id!=0
left join ehs_my_message mym on m.notice_message_id = my_message_key left join ehs_my_message mym on m.notice_message_id = my_message_key and my_message_type = 1
<if test="myUserId != null and myUserId != '' "> and my_user_id = #{myUserId} </if> <if test="myUserId != null and myUserId != '' "> and my_user_id = #{myUserId} </if>
<where> <where>
<if test="title != null and title != '' "> and m.title like '%${title}%'</if> <if test="title != null and title != '' "> and m.title like '%${title}%'</if>

@ -58,7 +58,6 @@
<if test="villageName1 != null and villageName1 != ''"> and village_name1 like concat('%', #{villageName1}, '%')</if> <if test="villageName1 != null and villageName1 != ''"> and village_name1 like concat('%', #{villageName1}, '%')</if>
<if test="villageDuties1 != null and villageDuties1 != ''"> and village_duties1 like concat('%', #{villageDuties1}, '%')</if> <if test="villageDuties1 != null and villageDuties1 != ''"> and village_duties1 like concat('%', #{villageDuties1}, '%')</if>
<if test="villageTel1 != null and villageTel1 != ''"> and village_tel1 like concat('%', #{villageTel1}, '%')</if> <if test="villageTel1 != null and villageTel1 != ''"> and village_tel1 like concat('%', #{villageTel1}, '%')</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="createUserId != null "> and create_user_id = #{createUserId}</if> <if test="createUserId != null "> and create_user_id = #{createUserId}</if>
<if test="updateUserId != null "> and update_user_id = #{updateUserId}</if> <if test="updateUserId != null "> and update_user_id = #{updateUserId}</if>
<if test="inspectionName != null and inspectionName != ''"> and inspection_name like concat('%', #{inspectionName}, '%')</if> <if test="inspectionName != null and inspectionName != ''"> and inspection_name like concat('%', #{inspectionName}, '%')</if>

@ -46,7 +46,14 @@ return request({
params: data params: data
}) })
} }
// 查询隐患整改进度 环
export function getDangerStatus(data) {
return request({
url: '/ehs/indexStatistics/getHiddenDangerStatusMapList',
method: 'get',
params: data
})
}
// 查询行业领域统计 饼 // 查询行业领域统计 饼
export function getTrade(){ export function getTrade(){
return request({ return request({

@ -69,9 +69,9 @@
<router-link to="/user/profile"> <router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item> <el-dropdown-item>个人中心</el-dropdown-item>
</router-link> </router-link>
<el-dropdown-item @click.native="setting = true"> <!--<el-dropdown-item @click.native="setting = true">
<span>布局设置</span> <span>布局设置</span>
</el-dropdown-item> </el-dropdown-item>-->
<el-dropdown-item divided @click.native="logout"> <el-dropdown-item divided @click.native="logout">
<span>退出登录</span> <span>退出登录</span>
</el-dropdown-item> </el-dropdown-item>
@ -291,7 +291,7 @@
style: "position:absolute;right: 15px;cursor:pointer", style: "position:absolute;right: 15px;cursor:pointer",
on: { on: {
click: () => { click: () => {
this.goMaterial(response.data.myMessageId, response.data.myMessageType.substring(1, 2),this.getCount((response.data.myMessageKey.split(",")).length)); this.goMaterial(this.getCount(response.data.myMessageKey), response.data.myMessageType.substring(1, 2));
}, },
}, },
}, },

@ -124,7 +124,7 @@
</div> </div>
<!-- <div class="right_top bcg" :style="$store.state.app.sidebar.opened ? 'width: 24%;': 'width: 32%;' "> --> <!-- <div class="right_top bcg" :style="$store.state.app.sidebar.opened ? 'width: 24%;': 'width: 32%;' "> -->
<div class="right_top bcg"> <div class="right_top bcg">
<h3>上报隐患数量排名</h3> <h3>本月上报隐患排名</h3>
<el-table <el-table
ref="right_top" ref="right_top"
class="custom-table" class="custom-table"
@ -185,7 +185,7 @@ import {
getTrade, getTrade,
getEconomics, getEconomics,
getScale, getScale,
getDangerClass, getDangerStatus,
getDangerList, getDangerList,
} from "@/api/ehs/ehsExamples"; } from "@/api/ehs/ehsExamples";
import indexHD from "./indexHD"; import indexHD from "./indexHD";
@ -296,10 +296,10 @@ export default {
// myChart.resize(); // myChart.resize();
}, },
async rightBominit() { async rightBominit() {
let res = await getDangerClass(); let res = await getDangerStatus();
this.myChart2 = echarts.init(this.$refs.right_bom); this.myChart2 = echarts.init(this.$refs.right_bom);
let option = { let option = {
title: { text: "隐患类型分析统计" }, title: { text: "隐患整改进度统计" },
tooltip: { tooltip: {
trigger: "item", trigger: "item",
}, },
@ -310,7 +310,7 @@ export default {
}, },
series: [ series: [
{ {
name: "隐患类型数量", name: "隐患数量",
type: "pie", type: "pie",
radius: ["40%", "70%"], radius: ["40%", "70%"],
avoidLabelOverlap: false, avoidLabelOverlap: false,
@ -517,7 +517,7 @@ export default {
mounted() { mounted() {
// this.autoScroll(); // this.autoScroll();
this.leftCenterinit(); // this.leftCenterinit(); //
this.rightBominit(); // this.rightBominit(); //
this.hylyinit(); // this.hylyinit(); //
this.jjClassInit(); // this.jjClassInit(); //
this.scaleInit(); // this.scaleInit(); //

@ -119,7 +119,7 @@
v-hasPermi="['ehsMaterial:ehsMaterial:add']" v-hasPermi="['ehsMaterial:ehsMaterial:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!--<el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
@ -140,7 +140,7 @@
@click="handleDelete" @click="handleDelete"
v-hasPermi="['ehsMaterial:ehsMaterial:remove']" v-hasPermi="['ehsMaterial:ehsMaterial:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -198,14 +198,14 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button v-if="curDeptId==scope.row.deptId"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['ehsMaterial:ehsMaterial:edit']" v-hasPermi="['ehsMaterial:ehsMaterial:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button v-if="curDeptId==scope.row.deptId"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@ -477,6 +477,7 @@
pageSize: 10, pageSize: 10,
// //
deptShow: false, deptShow: false,
curDeptId:null,//id
// //
allDeptList: [], allDeptList: [],
sendQuantity:"",// sendQuantity:"",//
@ -571,6 +572,7 @@
this.getListAllDept(); this.getListAllDept();
this.deptShow = this.$store.state.user.parentId==0 ?true :false; this.deptShow = this.$store.state.user.parentId==0 ?true :false;
this.curDeptId = this.$store.state.user.deptId;
//console.log(this.curDict); //console.log(this.curDict);
this.getMaterialClassJson(this.materialClass); this.getMaterialClassJson(this.materialClass);
//this.getSendQuantityList(); //this.getSendQuantityList();

@ -192,7 +192,7 @@
v-hasPermi="['ehsRisk:ehsRisk:add']" v-hasPermi="['ehsRisk:ehsRisk:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!--<el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
@ -213,7 +213,7 @@
@click="handleDelete" @click="handleDelete"
v-hasPermi="['ehsRisk:ehsRisk:remove']" v-hasPermi="['ehsRisk:ehsRisk:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -285,14 +285,14 @@
<!--<el-table-column label="创建者部门" align="center" prop="deptId" />--> <!--<el-table-column label="创建者部门" align="center" prop="deptId" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button v-if="curDeptId==scope.row.deptId"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['ehsRisk:ehsRisk:edit']" v-hasPermi="['ehsRisk:ehsRisk:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button v-if="curDeptId==scope.row.deptId"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@ -498,6 +498,7 @@
open: false, open: false,
// //
deptShow: false, deptShow: false,
curDeptId:null,//id
// //
allDeptList: [], allDeptList: [],
// //
@ -582,7 +583,7 @@
this.getList(); this.getList();
this.getListAllDept(); this.getListAllDept();
this.deptShow = this.$store.state.user.parentId==0 ?true :false; this.deptShow = this.$store.state.user.parentId==0 ?true :false;
//this.curDeptId = this.$store.state.user.deptId; this.curDeptId = this.$store.state.user.deptId;
}, },
methods: { methods: {
/** 查询风险信息列表 */ /** 查询风险信息列表 */
@ -733,7 +734,7 @@
handleImport() { handleImport() {
console.log(this.$refs.uploadRef.upload); console.log(this.$refs.uploadRef.upload);
this.$refs.uploadRef.upload.open = true; this.$refs.uploadRef.upload.open = true;
this.$refs.uploadRef.upload.title = "应急救援队伍导入"; this.$refs.uploadRef.upload.title = "风险信息导入";
this.$refs.uploadRef.upload.url = this.$refs.uploadRef.upload.url =
process.env.VUE_APP_BASE_API + "/ehsRisk/ehsRisk/importData"; process.env.VUE_APP_BASE_API + "/ehsRisk/ehsRisk/importData";
}, },

Loading…
Cancel
Save