累计跟新

main
liukewei 9 months ago
parent 18ff362a7c
commit 56a1571a53

@ -77,7 +77,9 @@ public class EhsMaterialController extends BaseController
List<EhsMaterial> list = ehsMaterialService.selectEhsMaterialList(ehsMaterial);
// 类别替换为中文
MaterialClassMaster msm = new MaterialClassMaster();
if(ehsMaterial.getClassFirst()!=null){
msm.setClassMastType(ehsMaterial.getClassFirst().toString());
}
List<MaterialClassMaster> materialClassMasters = materialClassMastService.selectMaterialClassMastList(msm);
// 物资分类一级分类对象,对应的是"类别"字段;收集为map,key是 v1,v2,v3... value是"常用工具","个人防护物资和装备"...
Map<String, String> map1 = materialClassMasters.stream().collect(Collectors.toMap(MaterialClassMaster::getClassMastId, MaterialClassMaster::getClassNameMast));

@ -10,6 +10,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.ehsMyMessage.domain.EhsMyMessage;
import com.ruoyi.ehsMyMessage.service.IEhsMyMessageService;
import com.ruoyi.ehsNoticeMessage.domain.EhsNoticeMessageDept;
import com.ruoyi.system.service.ISysDeptService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.access.prepost.PreAuthorize;
@ -55,13 +56,13 @@ public class EhsNoticeMessageController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('ehsNoticeMessage:ehsNoticeMessage:list')")
@GetMapping("/list")
public TableDataInfo list(EhsNoticeMessage ehsNoticeMessage)
public TableDataInfo list(EhsNoticeMessageDept ehsNoticeMessage)
{
startPage();
ehsNoticeMessage.setDeptId(SecurityUtils.getDeptId());
ehsNoticeMessage.setStatus("1");
ehsNoticeMessage.setFileDeptId(SecurityUtils.getDeptId());
List<EhsNoticeMessage> list = ehsNoticeMessageService.selectEhsNoticeMessageList(ehsNoticeMessage);
List<EhsNoticeMessageDept> list = ehsNoticeMessageService.selectEhsNoticeMessageList(ehsNoticeMessage);
return getDataTable(list);
}
@PreAuthorize("@ss.hasPermi('ehsNoticeMessage:ehsNoticeMessage:listAdmin')")
@ -79,13 +80,37 @@ public class EhsNoticeMessageController extends BaseController
@PreAuthorize("@ss.hasPermi('ehsNoticeMessage:ehsNoticeMessage:export')")
@Log(title = "内部公告", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, EhsNoticeMessage ehsNoticeMessage)
public void export(HttpServletResponse response, EhsNoticeMessageDept ehsNoticeMessage)
{
List<EhsNoticeMessage> list = ehsNoticeMessageService.selectEhsNoticeMessageList(ehsNoticeMessage);
ExcelUtil<EhsNoticeMessage> util = new ExcelUtil<EhsNoticeMessage>(EhsNoticeMessage.class);
ehsNoticeMessage.setDeptId(SecurityUtils.getDeptId());
ehsNoticeMessage.setStatus("1");
ehsNoticeMessage.setFileDeptId(SecurityUtils.getDeptId());
List<EhsNoticeMessageDept> list = ehsNoticeMessageService.selectEhsNoticeMessageList(ehsNoticeMessage);
if(!list.isEmpty()){
for(int i=0;i<list.size();i++){
list.get(i).setIsRead(list.get(i).getIsRead()==0 ?0L: 1L);
list.get(i).setDeptName(SecurityUtils.getLoginUser().getUser().getDept().getDeptName());
}
}
ExcelUtil<EhsNoticeMessageDept> util = new ExcelUtil<EhsNoticeMessageDept>(EhsNoticeMessageDept.class);
util.exportExcel(response, list, "内部公告数据");
}
@PreAuthorize("@ss.hasPermi('ehsNoticeMessage:ehsNoticeMessage:export')")
@Log(title = "内部公告", businessType = BusinessType.EXPORT)
@PostMapping("/exportAdmin")
public void exportAdmin(HttpServletResponse response, EhsNoticeMessage ehsNoticeMessage)
{
ehsNoticeMessage.setCreateDeptId(SecurityUtils.getDeptId());
List<EhsNoticeMessage> list = ehsNoticeMessageService.selectEhsNoticeMessageListAdmin(ehsNoticeMessage);
if(!list.isEmpty()){
for(int i=0;i<list.size();i++){
list.get(i).setDeptListName(list.get(i).getAllDept()==1 ?"全部": list.get(i).getDeptListName());
list.get(i).setReadDeptId(StringUtils.isEmpty(list.get(i).getReadDeptId()) ?"0": String.valueOf(list.get(i).getReadDeptId().split(",").length));
}
}
ExcelUtil<EhsNoticeMessage> util = new ExcelUtil<EhsNoticeMessage>(EhsNoticeMessage.class);
util.exportExcel(response, list, "NoticeMessage");
}
/**
*
*/

@ -21,7 +21,7 @@ public @interface Excel
/**
* excel
*/
public int sort() default Integer.MAX_VALUE;
public int sort() default Integer.MIN_VALUE;
/**
* Excel.

@ -57,7 +57,7 @@ public class BaseEntity implements Serializable
private Date updateTime;
/** 备注 */
@Excel(name = "备注")
@Excel(name = "备注",sort = 100)
private String remark;
/** 请求参数 */

@ -34,7 +34,7 @@ public class EhsHiddenDanger extends BaseEntity
private Long hiddenDangerId;
/** 隐患所在单位 */
@Excel(name = "隐患所在单位")
@Excel(name = "单位名称")
private String enterpriseName;
/** 企业现状0停业、1正常经营 */
@ -64,7 +64,8 @@ public class EhsHiddenDanger extends BaseEntity
/** 整改措施 */
@Excel(name = "整改措施")
private String rectifyMeasure;
@Excel(name = "整改期限", width = 30, dateFormat = "yyyy-MM-dd")
private Date rectifyTermTime;
/** 整改进度 */
@Excel(name = "整改进度", dictType = "hidden_danger_status")
private String status;
@ -121,8 +122,7 @@ public class EhsHiddenDanger extends BaseEntity
//@Excel(name = "标签", dictType = "hidden_danger_label")
private String[] hiddenDangerLabelArray;
@Excel(name = "整改期限", width = 30, dateFormat = "yyyy-MM-dd")
private Date rectifyTermTime;
/** 整改资金 */
@Excel(name = "整改资金")

@ -104,7 +104,7 @@ public class EhsLawEnforcement extends BaseEntity {
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "时间(yyyy-MM-dd格式)", width = 30, dateFormat = "yyyy-MM-dd")
@Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date time;
/**

@ -53,7 +53,9 @@ public class EhsMaterial extends BaseEntity
/** 数量 */
@Excel(name = "数量")
private String materialQuantity;
@Excel(name = "待处理出库")
@TableField(exist = false)
private String sendQuantity;
/** 储备地点 */
@Excel(name = "储备地点")
private String reserveLocation;
@ -65,10 +67,8 @@ public class EhsMaterial extends BaseEntity
/** 联系电话 */
@Excel(name = "联系电话")
private String tel;
/** 上报部门 */
// @Excel(name = "待处理出库")
@TableField(exist = false)
private String sendQuantity;
@TableField(exist = false)
private Integer isSendQuantity;
@TableField(exist = false)

@ -36,41 +36,45 @@ public class EhsNoticeMessage extends BaseEntity
/** 标题 */
@Excel(name = "标题")
private String title;
@Excel(name = "部门列表")
@TableField(exist = false)
private String deptListName;
private String deptList;
/** 内容 */
@Excel(name = "内容")
//@Excel(name = "内容")
private String displayContent;
@Excel(name = "发布时间", dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date issueTime;
/** 文件下载列表 */
@Excel(name = "文件下载列表")
//@Excel(name = "文件下载列表")
@TableField(exist = false)
private String fileName;
/** 临时任务的下载模板 */
private String fileTempName;
@Excel(name = "模板文件")
//@Excel(name = "模板文件")
private String fileTempOriginalName;
/** 1:未发布 2:已发布 */
@Excel(name = "0:未发布 1:已发布")
//@Excel(name = "0:未发布 1:已发布")
private String status;
/** 已阅读企业id */
@Excel(name = "已阅读企业id")
@Excel(name = "已阅读企业")
private String readDeptId;
/** 0临时任务1通知公告 */
@Excel(name = "0临时任务1通知公告")
//@Excel(name = "0临时任务1通知公告")
private Long mesgType;
/** 需要接收消息的企业列表 */
@Excel(name = "需要接收消息的企业列表")
private String deptList;
/** 0不是全部1全部企业 */
@Excel(name = "0不是全部1全部企业")
//@Excel(name = "0不是全部1全部企业")
private Integer allDept;
/** 创建的部门,主要区别二级监管 */
@Excel(name = "创建的部门,主要区别二级监管")
//@Excel(name = "创建的部门,主要区别二级监管")
private Long createDeptId;
@Excel(name = "已上传数")
@TableField(exist = false)
@ -95,9 +99,7 @@ public class EhsNoticeMessage extends BaseEntity
private String messageFileId;
@TableField(exist = false)
private Long[] deptListArray;
@Excel(name = "发布时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date issueTime;
@TableField(exist = false)
private Long myMessageId; //我的消息对应的id

@ -0,0 +1,114 @@
package com.ruoyi.ehsNoticeMessage.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* ehs_notice_message
*
* @author ruoyi
* @date 2023-12-06
*/
@Data
@ToString
@NoArgsConstructor
@Accessors(chain = true)
@TableName("ehs_notice_message")
public class EhsNoticeMessageDept extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
@TableId(type= IdType.AUTO)
private Long noticeMessageId;
/** 标题 */
@Excel(name = "标题")
private String title;
// @Excel(name = "部门列表")
@TableField(exist = false)
private String deptListName;
private String deptList;
@Excel(name = "提交状态", readConverterExp = "0=未提交,1=已提交")
@TableField(exist = false)
private String fileState;
@Excel(name = "是否阅读", readConverterExp = "0=未阅读,1=已阅读")
@TableField(exist = false)
private Long isRead;
/** 内容 */
//@Excel(name = "内容")
private String displayContent;
@Excel(name = "通知时间", dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date issueTime;
/** 文件下载列表 */
//@Excel(name = "文件下载列表")
@TableField(exist = false)
private String fileName;
/** 临时任务的下载模板 */
private String fileTempName;
//@Excel(name = "模板文件")
private String fileTempOriginalName;
/** 1:未发布 2:已发布 */
//@Excel(name = "0:未发布 1:已发布")
private String status;
/** 已阅读企业id */
//@Excel(name = "已阅读企业数")
private String readDeptId;
/** 0临时任务1通知公告 */
//@Excel(name = "0临时任务1通知公告")
private Long mesgType;
/** 需要接收消息的企业列表 */
/** 0不是全部1全部企业 */
//@Excel(name = "0不是全部1全部企业")
private Integer allDept;
/** 创建的部门,主要区别二级监管 */
//@Excel(name = "创建的部门,主要区别二级监管")
private Long createDeptId;
//@Excel(name = "已上传数")
@TableField(exist = false)
private Integer fileCount;
@TableField(exist = false)
private Long fileDeptId;
@TableField(exist = false)
private Long noticeMessageFileId;
@TableField(exist = false)
private String originalName;
@TableField(exist = false)
private String messageFileId;
@TableField(exist = false)
private Long[] deptListArray;
@TableField(exist = false)
private Long myMessageId; //我的消息对应的id
@TableField(exist = false)
private Long myUserId;//我的消息的对应人员的id
@TableField(exist = false)
private String myMessageState;//我的消息阅读状态
}

@ -2,6 +2,8 @@ package com.ruoyi.ehsNoticeMessage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.ehsNoticeMessage.domain.EhsNoticeMessage;
import com.ruoyi.ehsNoticeMessage.domain.EhsNoticeMessageDept;
import java.util.List;
/**
@ -25,7 +27,7 @@ public interface EhsNoticeMessageMapper extends BaseMapper<EhsNoticeMessage> {
* @param ehsNoticeMessage
* @return
*/
public List<EhsNoticeMessage> selectEhsNoticeMessageList(EhsNoticeMessage ehsNoticeMessage);
public List<EhsNoticeMessageDept> selectEhsNoticeMessageList(EhsNoticeMessageDept ehsNoticeMessage);
public List<EhsNoticeMessage> selectEhsNoticeMessageListAdmin(EhsNoticeMessage ehsNoticeMessage);
public int updateReadCompany(EhsNoticeMessage ehsNoticeMessage);

@ -3,6 +3,7 @@ package com.ruoyi.ehsNoticeMessage.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.ehsNoticeMessage.domain.EhsNoticeMessage;
import com.ruoyi.ehsNoticeMessage.domain.EhsNoticeMessageDept;
/**
* Service
@ -26,7 +27,7 @@ public interface IEhsNoticeMessageService extends IService<EhsNoticeMessage> {
* @param ehsNoticeMessage
* @return
*/
public List<EhsNoticeMessage> selectEhsNoticeMessageList(EhsNoticeMessage ehsNoticeMessage);
public List<EhsNoticeMessageDept> selectEhsNoticeMessageList(EhsNoticeMessageDept ehsNoticeMessage);
public List<EhsNoticeMessage> selectEhsNoticeMessageListAdmin(EhsNoticeMessage ehsNoticeMessage);

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.ehsNoticeMessage.domain.EhsNoticeMessageDept;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import com.ruoyi.common.utils.StringUtils;
@ -44,7 +45,7 @@ public class EhsNoticeMessageServiceImpl extends ServiceImpl<EhsNoticeMessageMap
* @return
*/
@Override
public List<EhsNoticeMessage> selectEhsNoticeMessageList(EhsNoticeMessage ehsNoticeMessage)
public List<EhsNoticeMessageDept> selectEhsNoticeMessageList(EhsNoticeMessageDept ehsNoticeMessage)
{
ehsNoticeMessage.setMyUserId(SecurityUtils.getUserId());
return ehsNoticeMessageMapper.selectEhsNoticeMessageList(ehsNoticeMessage);

@ -39,16 +39,19 @@ public class EhsRisk extends BaseEntity
private String reportAddressType;
/** 风险点位置,用分号“;”分隔 */
@Excel(name = "风险点位置")
//@Excel(name = "风险点位置")
private String riskLocation;
@Excel(name = "风险点位置")
private String riskLocationStr;
/** 风险点概况 */
@Excel(name = "风险点概况")
private String riskDesc;
/** 涉及群众数量,用分号“;”分隔 */
@Excel(name = "涉及群众数量")
//@Excel(name = "涉及群众数量")
private String peopleQuantity;
@Excel(name = "涉及群众数量")
private String peopleQuantityStr;
/** 抢险救援物资保障地点 */
@Excel(name = "抢险救援物资保障地点")
@ -65,42 +68,43 @@ public class EhsRisk extends BaseEntity
/** 人员转移安置点 */
@Excel(name = "人员转移安置点")
private String resettleAddr;
/** 巡查责任人姓名 */
@Excel(name = "巡查责任人姓名")
private String inspectionName;
/** 乡级责任人姓名 */
@Excel(name = "乡级责任人姓名")
private String villageName;
/** 乡级责任人职务 */
@Excel(name = "乡级责任人职务")
private String villageDuties;
/** 乡级责任人联系电话 */
@Excel(name = "乡级责任人联系电话")
private String villageTel;
/** 巡查责任人职务 */
@Excel(name = "巡查责任人职务")
private String inspectionDuties;
/** 巡查责任人电话 */
@Excel(name = "巡查责任人电话")
private String inspectionTel;
/** 村级责任人姓名 */
@Excel(name = "村级责任人姓名")
private String villageName1;
private String villageName;
/** 村级责任人职务 */
@Excel(name = "村级责任人职务")
private String villageDuties1;
private String villageDuties;
/** 村级责任人联系电话 */
@Excel(name = "村级责任人联系电话")
private String villageTel;
/** 乡级责任人姓名 */
@Excel(name = "乡级责任人姓名")
private String villageName1;
/** 乡级责任人职务 */
@Excel(name = "乡级责任人职务")
private String villageDuties1;
/** 乡级责任人联系电话 */
@Excel(name = "乡级责任人联系电话")
private String villageTel1;
/** 巡查责任人姓名 */
@Excel(name = "巡查责任人姓名")
private String inspectionName;
/** 巡查责任人职务 */
@Excel(name = "巡查责任人职务")
private String inspectionDuties;
/** 巡查责任人电话 */
@Excel(name = "巡查责任人电话")
private String inspectionTel;
/** 风险点位置 */
@TableField(exist = false)

@ -31,32 +31,33 @@
</resultMap>
<sql id="selectEhsLawEnforcementVo">
select id, enterprise_name, location, responsible_person, phone, risk, is_large_risk, rectification_measure, rectification_people, enterprise_category, employee_num, is_establish_prevention, time, other, class_first, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_law_enforcement
select e.*, d.dept_name from ehs_law_enforcement e
left join sys_dept d on e.dept_id = d.dept_id
</sql>
<select id="selectEhsLawEnforcementList" parameterType="EhsLawEnforcement" resultMap="EhsLawEnforcementResult">
<include refid="selectEhsLawEnforcementVo"/>
<where>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="location != null and location != ''"> and location like concat('%', #{location}, '%')</if>
<if test="responsiblePerson != null and responsiblePerson != ''"> and responsible_person like concat('%', #{responsiblePerson}, '%')</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="risk != null and risk != ''"> and risk = #{risk}</if>
<if test="isLargeRisk != null and isLargeRisk != ''"> and is_large_risk = #{isLargeRisk}</if>
<if test="rectificationMeasure != null and rectificationMeasure != ''"> and rectification_measure = #{rectificationMeasure}</if>
<if test="rectificationPeople != null and rectificationPeople != ''"> and rectification_people like concat('%',#{rectificationPeople}, '%')</if>
<if test="enterpriseCategory != null "> and enterprise_category = #{enterpriseCategory}</if>
<if test="employeeNum != null "> and employee_num = #{employeeNum}</if>
<if test="isEstablishPrevention != null and isEstablishPrevention != ''"> and is_establish_prevention = #{isEstablishPrevention}</if>
<if test="time != null "> and time = #{time}</if>
<if test="other != null and other != ''"> and other = #{other}</if>
<if test="classFirst != null "> and class_first = #{classFirst}</if>
<if test="enterpriseName != null and enterpriseName != ''"> and e.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="location != null and location != ''"> and e.location like concat('%', #{location}, '%')</if>
<if test="responsiblePerson != null and responsiblePerson != ''"> and e.responsible_person like concat('%', #{responsiblePerson}, '%')</if>
<if test="phone != null and phone != ''"> and e.phone = #{phone}</if>
<if test="risk != null and risk != ''"> and e.risk = #{risk}</if>
<if test="isLargeRisk != null and isLargeRisk != ''"> and e.is_large_risk = #{isLargeRisk}</if>
<if test="rectificationMeasure != null and rectificationMeasure != ''"> and e.rectification_measure = #{rectificationMeasure}</if>
<if test="rectificationPeople != null and rectificationPeople != ''"> and e.rectification_people like concat('%',#{rectificationPeople}, '%')</if>
<if test="enterpriseCategory != null "> and e.enterprise_category = #{enterpriseCategory}</if>
<if test="employeeNum != null "> and e.employee_num = #{employeeNum}</if>
<if test="isEstablishPrevention != null and isEstablishPrevention != ''"> and e.is_establish_prevention = #{isEstablishPrevention}</if>
<if test="time != null "> and e.time = #{time}</if>
<if test="other != null and other != ''"> and e.other = #{other}</if>
<if test="classFirst != null "> and e.class_first = #{classFirst}</if>
</where>
</select>
<select id="selectEhsLawEnforcementById" parameterType="Long" resultMap="EhsLawEnforcementResult">
<include refid="selectEhsLawEnforcementVo"/>
where id = #{id}
where e.id = #{id}
</select>

@ -15,6 +15,41 @@
<result property="readDeptId" column="read_dept_id" />
<result property="mesgType" column="mesg_type" />
<result property="deptList" column="dept_list" />
<result property="deptListName" column="dept_list_name" />
<result property="allDept" column="all_dept" />
<result property="createDeptId" column="create_dept_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="deptId" column="dept_id" />
<result property="createUserId" column="create_user_id" />
<result property="updateUserId" column="update_user_id" />
<result property="fileCount" column="file_count" />
<result property="fileState" column="file_state" />
<result property="fileDeptId" column="file_dept_id" />
<result property="isRead" column="is_read" />
<result property="messageFileId" column="message_file_id" />
<result property="originalName" column="original_name" />
<result property="noticeMessageFileId" column="notice_message_fele_id" />
<result property="issueTime" column="issue_time" />
<result property="myMessageId" column="my_message_id" />
<result property="myUserId" column="my_user_id" />
<result property="myMessageState" column="my_message_state" />
</resultMap>
<resultMap type="EhsNoticeMessageDept" id="EhsNoticeMessageDeptResult">
<result property="noticeMessageId" column="notice_message_id" />
<result property="title" column="title" />
<result property="displayContent" column="display_content" />
<result property="fileName" column="file_name" />
<result property="fileTempName" column="file_temp_name" />
<result property="fileTempOriginalName" column="file_temp_original_name" />
<result property="status" column="status" />
<result property="readDeptId" column="read_dept_id" />
<result property="mesgType" column="mesg_type" />
<result property="deptList" column="dept_list" />
<result property="deptListName" column="dept_list_name" />
<result property="allDept" column="all_dept" />
<result property="createDeptId" column="create_dept_id" />
<result property="createBy" column="create_by" />
@ -42,9 +77,9 @@
select * from ehs_notice_message
</sql>
<select id="selectEhsNoticeMessageList" parameterType="EhsNoticeMessage" resultMap="EhsNoticeMessageResult">
select m.notice_message_id, m.create_user_id, m.create_time, m.dept_id,m.title, m.display_content, m.status,m.issue_time,d.dept_name dept_name
,FIND_IN_SET(#{deptId}, m.read_dept_id ) is_read,m.mesg_type,m.read_dept_id,m.all_dept,m.file_temp_name,file_temp_original_name,
<select id="selectEhsNoticeMessageList" parameterType="EhsNoticeMessageDept" resultMap="EhsNoticeMessageDeptResult">
select m.notice_message_id, m.create_user_id, m.create_time, m.dept_id,m.title, m.display_content, m.status,m.issue_time
,IFNULL(FIND_IN_SET(#{deptId}, m.read_dept_id ),0) is_read,m.mesg_type,m.read_dept_id,m.all_dept,m.file_temp_name,file_temp_original_name,
(select f.id from ehs_notice_message_file f where m.notice_message_id = f.notice_message_id and f.dept_ID =#{fileDeptId} ) AS message_file_id,
(select f.file_name from ehs_notice_message_file f where m.notice_message_id = f.notice_message_id and f.dept_ID =#{fileDeptId}) file_name,
IFNULL((select IFNULL(f.state,0) from ehs_notice_message_file f where m.notice_message_id = f.notice_message_id and f.dept_ID =#{fileDeptId}),0) file_state,
@ -57,6 +92,7 @@
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 and my_message_type = 1
<if test="myUserId != null and myUserId != '' "> and my_user_id = #{myUserId} </if>
<where>
<if test="title != null and title != '' "> and m.title like '%${title}%'</if>
<if test="displayContent != null and displayContent != '' "> and m.display_content = #{displayContent}</if>
@ -72,20 +108,21 @@
</where>
</select>
<select id="selectEhsNoticeMessageListAdmin" parameterType="EhsNoticeMessage" resultMap="EhsNoticeMessageResult">
SELECT m.notice_message_id, m.create_user_id, m.create_time, m.dept_id,m.issue_time,
m.title, m.display_content, m.STATUS, m.dept_list, GROUP_CONCAT( ft.dept_name SEPARATOR ';' ) dept_name,
SELECT m.notice_message_id, m.create_user_id, m.create_time, m.dept_id,m.issue_time,d.dept_name,
m.title, m.display_content, m.STATUS, m.dept_list, GROUP_CONCAT( ft.dept_name SEPARATOR ';' ) dept_list_name,
m.mesg_type, m.read_dept_id, m.all_dept,m.file_temp_name,m.file_temp_original_name, m.remark,
( SELECT count( 1 ) FROM ehs_notice_message_file f WHERE f.notice_message_id = m.notice_message_id and f.state=1 ) file_count
FROM ehs_notice_message m
LEFT JOIN sys_user e ON e.user_id = m.CREATE_USER_ID
LEFT JOIN sys_dept ft ON FIND_IN_SET( ft.DEPT_ID, m.dept_list )
left join sys_dept d on e.dept_id = d.dept_id
<where>
<if test="title != null and title != '' "> and m.title like '%${title}%'</if>
<if test="displayContent != null and displayContent != '' "> and m.display_content = #{displayContent}</if>
<!--<if test="createUserName != null and createUserName != '' "> and e.name like '%${createUserName}%'</if>-->
<if test="status != null and status != '' "> and m.status = #{status}</if>
<if test="deptList != null and companyId != '' "> and FIND_IN_SET(#{deptList}, m.dept_list) </if>
<if test="mesgType != null and mesgType != '' "> and m.mesg_type = #{mesgType}</if>
<if test="mesgType != null "> and m.mesg_type = #{mesgType}</if>
<if test="createDeptId != null and createDeptId != '' "> and m.create_dept_id = #{createDeptId} </if>
<if test="params.beginIssueTime != null and params.beginIssueTime != '' and params.endIssueTime != null and params.endIssueTime != ''">
and Issue_Time between #{params.beginIssueTime} and #{params.endIssueTime}</if>

@ -9,8 +9,10 @@
<result property="riskGrade" column="risk_grade" />
<result property="reportAddressType" column="report_address_type" />
<result property="riskLocation" column="risk_location" />
<result property="riskLocationStr" column="risk_location_str" />
<result property="riskDesc" column="risk_desc" />
<result property="peopleQuantity" column="people_quantity" />
<result property="peopleQuantityStr" column="people_quantity_str" />
<result property="materialsAddr" column="materials_addr" />
<result property="materialsQuantity" column="materials_quantity" />
<result property="lifeAddr" column="life_addr" />
@ -35,7 +37,13 @@
</resultMap>
<sql id="selectEhsRiskVo">
select e.*, d.dept_name from ehs_risk e
select e.*,CASE WHEN
LOCATE( ';', e.risk_location ) > 0 THEN
CONCAT( REPLACE ( e.risk_location, ';', '村(社区)' ), '位置' ) ELSE e.risk_location end as risk_location_str,
CASE WHEN
LOCATE( ';', e.people_quantity ) > 0 THEN
CONCAT( REPLACE ( e.people_quantity, ';', '户' ), '人' ) ELSE e.people_quantity end as people_quantity_str ,
d.dept_name from ehs_risk e
left join sys_dept d on e.dept_id = d.dept_id
</sql>

@ -623,7 +623,7 @@ export default {
{
...this.queryParams,
},
`ehsDocument_${new Date().getTime()}.xlsx`
`公文台账_${new Date().getTime()}.xlsx`
);
},
},

@ -514,7 +514,7 @@ export default {
handleExport() {
this.download('ehs/ehsLawEnforce/export', {
...this.queryParams
}, `ehsLawEnforce_${new Date().getTime()}.xlsx`)
}, `行政执法台账_${new Date().getTime()}.xlsx`)
},
/** 批量导入 */
handleImport() {

@ -111,14 +111,14 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
<!-- <el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['ehsMaterial:ehsMaterial:export']"
>导出</el-button>
>导出</el-button>-->
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>

@ -77,7 +77,7 @@
</el-table-column>-->
<el-table-column label="部门列表" align="center" prop="deptName" style="white-space: pre-wrap;">
<template slot-scope="scope">
<span v-html='scope.row.allDept==1 ?"": scope.row.deptName.replace(/;/g ,"<br>")'> </span>
<span v-html='scope.row.allDept==1 ?"": scope.row.deptListName.replace(/;/g ,"<br>")'> </span>
</template>
</el-table-column>
<el-table-column label="任务模板" align="center" prop="fileTempOriginalName" v-if ="taskShow" >
@ -524,7 +524,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('ehsNoticeMessage/ehsNoticeMessage/export', {
this.download('ehsNoticeMessage/ehsNoticeMessage/exportAdmin', {
...this.queryParams
}, `ehsNoticeMessage_${new Date().getTime()}.xlsx`)
},

Loading…
Cancel
Save