diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMaterialController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMaterialController.java index bf44e30..8bca699 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMaterialController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMaterialController.java @@ -62,7 +62,7 @@ public class EhsMaterialController extends BaseController public TableDataInfo list(EhsMaterial ehsMaterial) { startPage(); - List list = ehsMaterialService.selectEhsMaterialList(ehsMaterial); + List list = ehsMaterialService.selectEhsMateriallExportList(ehsMaterial); return getDataTable(list); } diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 7b57f07..015434d 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -69,14 +69,14 @@ spring: enabled: true # redis 配置 redis: - # 地址 - host: 120.46.159.203 - # 端口,默认为6379 - port: 16379 + # 地址 120.46.159.203 + host: 127.0.0.1 + # 端口,默认为6379 16379 + port: 6379 # 数据库索引 - database: 3 + database: 1 # 密码 - password: a8EYUSoT8wHbuRkX + password: # 连接超时时间 timeout: 10s lettuce: diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java index 53ad695..271fe4d 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java @@ -3,6 +3,8 @@ package com.ruoyi.common.core.domain.entity; import java.util.Date; import java.util.List; import javax.validation.constraints.*; + +import com.baomidou.mybatisplus.annotation.TableField; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -69,7 +71,8 @@ public class SysUser extends BaseEntity /** 最后登录时间 */ @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT) private Date loginDate; - + @TableField(exist = false) + private String deptType; /** 部门对象 */ @Excels({ @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT), @@ -297,6 +300,14 @@ public class SysUser extends BaseEntity this.roleId = roleId; } + public String getDeptType() { + return deptType; + } + + public void setDeptType(String deptType) { + this.deptType = deptType; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsEnterprise/domain/EhsEnterprise.java b/ruoyi-system/src/main/java/com/ruoyi/ehsEnterprise/domain/EhsEnterprise.java index 45202b7..998e915 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsEnterprise/domain/EhsEnterprise.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsEnterprise/domain/EhsEnterprise.java @@ -58,12 +58,12 @@ public class EhsEnterprise extends BaseEntity @Excel(name = "注册资本") private String registeredCapital; - /** 营业执照核定的经营范围 */ - @Excel(name = "营业执照核定的经营范围") + /** 证照上核定的业务范围 */ + @Excel(name = "证照上核定的业务范围") private String businessScope; - /** 企业实际从事的经营项目 */ - @Excel(name = "企业实际从事的经营项目") + /** 实际从事的业务范围 */ + @Excel(name = "实际从事的业务范围") private String businessProjects; /** 企业现状(0停业、1正常经营) */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/domain/EhsHiddenDanger.java b/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/domain/EhsHiddenDanger.java index 3fdb9bc..1f44dbb 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/domain/EhsHiddenDanger.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/domain/EhsHiddenDanger.java @@ -44,7 +44,8 @@ public class EhsHiddenDanger extends BaseEntity /** 行业 字典 */ @Excel(name = "行业" , dictType = "enterprise_type") private String enterpriseType; - + @Excel(name = "隐患数量" ) + private Integer hdCount; /** 隐患情况 */ @Excel(name = "隐患情况") private String hiddenDangerDesc; diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/domain/EhsMaterial.java b/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/domain/EhsMaterial.java index bda2441..6a75a95 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/domain/EhsMaterial.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/domain/EhsMaterial.java @@ -74,4 +74,7 @@ public class EhsMaterial extends BaseEntity @TableField(exist = false) private Long materialDetailId; + @TableField(exist = false) + private String classNameKey; + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/service/impl/EhsMaterialServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/service/impl/EhsMaterialServiceImpl.java index 1824360..ac97bea 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/service/impl/EhsMaterialServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/service/impl/EhsMaterialServiceImpl.java @@ -64,6 +64,7 @@ public class EhsMaterialServiceImpl extends ServiceImpl selectEhsMateriallExportList(EhsMaterial ehsMaterial){ diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsHiddenDangerMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsHiddenDangerMapper.xml index 1720e4a..c56cc01 100644 --- a/ruoyi-system/src/main/resources/mapper/ehs/EhsHiddenDangerMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsHiddenDangerMapper.xml @@ -10,6 +10,7 @@ + @@ -69,6 +70,7 @@ FROM ehs_hidden_danger h LEFT JOIN sys_dept d ON h.dept_id = d.dept_id and hidden_danger_type = #{hiddenDangerType} and FIND_IN_SET( #{assistDept}, assist_dept ) and area_id = #{areaId} + and is_Towns = #{isTowns} and DATE_FORMAT(NOW(), '%Y-%m') = DATE_FORMAT( h.check_time, '%Y-%m') and (h.STATUS = 0 or h.STATUS = 5 ) AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) )>3 AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) ) <= 7 and (h.STATUS = 0 or h.STATUS = 5 ) AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) )>=0 AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) ) < 3 diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml index 228bdf4..4950ad3 100644 --- a/ruoyi-system/src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsIndexStatisticsMapper.xml @@ -92,14 +92,14 @@ SELECT r.area_id , (select count(1) from ehs_enterprise e where e.area_id = d.dict_value and e.create_time>= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' )) thisUnitNum, (select count(1) from ehs_enterprise e where e.area_id = d.dict_value) totalUnitNum, - sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) THEN 1 ELSE 0 END ) 'thisReportNum', - sum( CASE WHEN r.hidden_danger_id IS NOT NULL THEN 1 ELSE 0 END ) 'totalReportNum', - sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) and r.status = 10 THEN 1 ELSE 0 END ) 'thisHaveNum', - sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.status = 10 THEN 1 ELSE 0 END ) 'totalHaveNum', - sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) and r.status != 10 THEN 1 ELSE 0 END ) 'thisNotNum', - sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.status != 10 THEN 1 ELSE 0 END ) 'totalNotNum', - CONCAT(round(ifnull(sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) and r.status = 10 THEN 1 ELSE 0 END )/sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) THEN 1 ELSE 0 END ),0)*100,2),'%') 'thisRate', - CONCAT(round(ifnull(sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.status = 10 THEN 1 ELSE 0 END )/sum( CASE WHEN r.hidden_danger_id IS NOT NULL THEN 1 ELSE 0 END ),0)*100,2),'%') 'totalRate' + sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) THEN r.hd_count ELSE 0 END ) 'thisReportNum', + sum( CASE WHEN r.hidden_danger_id IS NOT NULL THEN r.hd_count ELSE 0 END ) 'totalReportNum', + sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) and r.status = 10 THEN r.hd_count ELSE 0 END ) 'thisHaveNum', + sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.status = 10 THEN r.hd_count ELSE 0 END ) 'totalHaveNum', + sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) and r.status != 10 THEN r.hd_count ELSE 0 END ) 'thisNotNum', + sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.status != 10 THEN r.hd_count ELSE 0 END ) 'totalNotNum', + CONCAT(round(ifnull(sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) and r.status = 10 THEN r.hd_count ELSE 0 END )/sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) THEN r.hd_count ELSE 0 END ),0)*100,2),'%') 'thisRate', + CONCAT(round(ifnull(sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.status = 10 THEN r.hd_count ELSE 0 END )/sum( CASE WHEN r.hidden_danger_id IS NOT NULL THEN r.hd_count ELSE 0 END ),0)*100,2),'%') 'totalRate' FROM sys_dict_data d LEFT JOIN ehs_hidden_danger r ON r.area_id = d.dict_value diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialMapper.xml index 02da977..8014b52 100644 --- a/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialMapper.xml @@ -84,6 +84,7 @@ FROM and tel like concat('%', #{tel}, '%') and a.send_quantity is null and a.send_quantity is not null + and m2.class_name_sub like concat('%', #{classNameKey}, '%')