diff --git a/inventory-dao/src/main/java/com/rzyc/bean/bigdata/check/StreetEntInfo.java b/inventory-dao/src/main/java/com/rzyc/bean/bigdata/check/StreetEntInfo.java index 0a73a23..20f2a89 100644 --- a/inventory-dao/src/main/java/com/rzyc/bean/bigdata/check/StreetEntInfo.java +++ b/inventory-dao/src/main/java/com/rzyc/bean/bigdata/check/StreetEntInfo.java @@ -36,6 +36,72 @@ public class StreetEntInfo { @ApiModelProperty("整改中数") private Integer rectifyingNum; + @ApiModelProperty("地址") + private String sysAddress; + + @ApiModelProperty("安全管理员") + private String safeManager; + + @ApiModelProperty("安全管理员电话") + private String safeTelephone; + + @ApiModelProperty("行业管理") + private String manageType; + + @ApiModelProperty("法人") + private String legalRepre; + + @ApiModelProperty("法人电话") + private String lRLinkTel; + + public String getSysAddress() { + return sysAddress; + } + + public void setSysAddress(String sysAddress) { + this.sysAddress = sysAddress; + } + + public String getSafeManager() { + return safeManager; + } + + public void setSafeManager(String safeManager) { + this.safeManager = safeManager; + } + + public String getSafeTelephone() { + return safeTelephone; + } + + public void setSafeTelephone(String safeTelephone) { + this.safeTelephone = safeTelephone; + } + + public String getManageType() { + return manageType; + } + + public void setManageType(String manageType) { + this.manageType = manageType; + } + + public String getLegalRepre() { + return legalRepre; + } + + public void setLegalRepre(String legalRepre) { + this.legalRepre = legalRepre; + } + + public String getlRLinkTel() { + return lRLinkTel; + } + + public void setlRLinkTel(String lRLinkTel) { + this.lRLinkTel = lRLinkTel; + } + public String getRiskLevel() { return riskLevel; } diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMapper.java index 6d45d00..be635eb 100644 --- a/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMapper.java +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntDeviceMapper.java @@ -2,6 +2,7 @@ package com.rzyc.mapper; import com.rzyc.model.EntDevice; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.rzyc.model.EntDeviceInsStatistic; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; @@ -78,4 +79,14 @@ public interface EntDeviceMapper extends BaseMapper { * */ ListmobileEntDevice(String modelState); + + /** + * 小程序企业设备 + * @param enterpriseId 企业id + * @param typeId 类型id + * @param keyWord 关键字 + * @return int + * */ + ListselectEntEquipmentListAndIns(@Param("enterpriseId") String enterpriseId,@Param("typeId") String typeId,@Param("keyWord") String keyWord); + } diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/RkSourcesMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/RkSourcesMapper.java index f08da24..664d557 100644 --- a/inventory-dao/src/main/java/com/rzyc/mapper/RkSourcesMapper.java +++ b/inventory-dao/src/main/java/com/rzyc/mapper/RkSourcesMapper.java @@ -1,6 +1,7 @@ package com.rzyc.mapper; import com.rzyc.bean.risk.RkSourcesDto; +import com.rzyc.model.RkSourceStatistic; import com.rzyc.model.RkSources; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import io.swagger.models.auth.In; @@ -38,6 +39,14 @@ public interface RkSourcesMapper extends BaseMapper { Integer changeIndex(@Param("sourceId") String sourceId); + /** + * 危险源统计 + * @param industryId + * @return RkSources + * */ + List sourcesEntStatistic(@Param("industryId") String industryId); + + /** * 风险源信息分页查询 * @param RkSourcesDto diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/check/BookEntHTMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/check/BookEntHTMapper.java index 73ec618..c972fac 100644 --- a/inventory-dao/src/main/java/com/rzyc/mapper/check/BookEntHTMapper.java +++ b/inventory-dao/src/main/java/com/rzyc/mapper/check/BookEntHTMapper.java @@ -274,4 +274,23 @@ public interface BookEntHTMapper { * @return DangerStatistic 隐患统计对象 * */ DangerStatistic selectHalfAYearEntDangerStatistics(String enterpriseId); + + + /** + * 隐患统计大屏 + * @param orgCode + * @param condition + * @return 隐患统计 + * */ + ListbigDataDangerStatistic(@Param("orgCode") String orgCode,@Param("condition")String condition); + + + /** + * 安全检查详细 + * @param enterpriseId + * @return list + * */ + ListdangerStatisticInDetail(@Param("enterpriseId")String enterpriseId); + + } diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntDevice.java b/inventory-dao/src/main/java/com/rzyc/model/EntDevice.java index 3886671..ef68914 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/EntDevice.java +++ b/inventory-dao/src/main/java/com/rzyc/model/EntDevice.java @@ -162,6 +162,18 @@ public class EntDevice implements Serializable { @TableField(exist = false) private String insRecordPerson; + @ApiModelProperty("巡检间隔天") + @TableField(exist = false) + private Integer inspectionCycle; + + public Integer getInspectionCycle() { + return inspectionCycle; + } + + public void setInspectionCycle(Integer inspectionCycle) { + this.inspectionCycle = inspectionCycle; + } + public String getInsRecordPerson() { return insRecordPerson; } diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntDeviceInsCycle.java b/inventory-dao/src/main/java/com/rzyc/model/EntDeviceInsCycle.java index 20534f6..1bf6fbf 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/EntDeviceInsCycle.java +++ b/inventory-dao/src/main/java/com/rzyc/model/EntDeviceInsCycle.java @@ -5,6 +5,7 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; +import java.util.List; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; @@ -97,9 +98,16 @@ public class EntDeviceInsCycle implements Serializable { @TableField(exist = false) private Date insRecordDate; + @TableField(exist = false) + private List insRecords; + public List getInsRecords() { + return insRecords; + } - + public void setInsRecords(List insRecords) { + this.insRecords = insRecords; + } public Date getInsRecordDate() { return insRecordDate; diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntDeviceInsStatistic.java b/inventory-dao/src/main/java/com/rzyc/model/EntDeviceInsStatistic.java new file mode 100644 index 0000000..2d83a04 --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/model/EntDeviceInsStatistic.java @@ -0,0 +1,94 @@ +package com.rzyc.model; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + + + +/*** + * 企业设备列表带巡查 + * @date 2023/3/16 + * @author Xuwanxin + * */ +@ApiModel(value="EntDeviceInsStatistic", description="") +public class EntDeviceInsStatistic { + + @ApiModelProperty("设备id") + private String deviceId; + + @ApiModelProperty("设备名") + private String name; + + @ApiModelProperty("编号") + private String number; + + @ApiModelProperty("状态") + private Integer state; + + private String checkPerson; + + + private long countIns; + + @ApiModelProperty("巡检次数") + private long countRecord; + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getNumber() { + return number; + } + + public void setNumber(String number) { + this.number = number; + } + + public Integer getState() { + return state; + } + + public void setState(Integer state) { + this.state = state; + } + + public String getCheckPerson() { + return checkPerson; + } + + public void setCheckPerson(String checkPerson) { + this.checkPerson = checkPerson; + } + + public long getCountIns() { + return countIns; + } + + public void setCountIns(long countIns) { + this.countIns = countIns; + } + + public long getCountRecord() { + return countRecord; + } + + public void setCountRecord(long countRecord) { + this.countRecord = countRecord; + } +} diff --git a/inventory-dao/src/main/java/com/rzyc/model/RkSourceStatistic.java b/inventory-dao/src/main/java/com/rzyc/model/RkSourceStatistic.java new file mode 100644 index 0000000..c083cfd --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/model/RkSourceStatistic.java @@ -0,0 +1,79 @@ +package com.rzyc.model; + +/** + * 风险源统计 + * @author Xuwanxin + * @date 2023/3/15/ + */ +public class RkSourceStatistic { + + private String riskTypeCount; + + private long entCount; + + private long lowRisk; + + private long generalRisk; + + private long greaterRisk; + + private long majorRisk; + + private String industryClassName; + + public String getIndustryClassName() { + return industryClassName; + } + + public void setIndustryClassName(String industryClassName) { + this.industryClassName = industryClassName; + } + + public String getRiskTypeCount() { + return riskTypeCount; + } + + public void setRiskTypeCount(String riskTypeCount) { + this.riskTypeCount = riskTypeCount; + } + + public long getEntCount() { + return entCount; + } + + public void setEntCount(long entCount) { + this.entCount = entCount; + } + + public long getLowRisk() { + return lowRisk; + } + + public void setLowRisk(long lowRisk) { + this.lowRisk = lowRisk; + } + + public long getGeneralRisk() { + return generalRisk; + } + + public void setGeneralRisk(long generalRisk) { + this.generalRisk = generalRisk; + } + + public long getGreaterRisk() { + return greaterRisk; + } + + public void setGreaterRisk(long greaterRisk) { + this.greaterRisk = greaterRisk; + } + + public long getMajorRisk() { + return majorRisk; + } + + public void setMajorRisk(long majorRisk) { + this.majorRisk = majorRisk; + } +} diff --git a/inventory-dao/src/main/java/com/rzyc/model/check/DangerCount.java b/inventory-dao/src/main/java/com/rzyc/model/check/DangerCount.java index 4b7434c..c5cd154 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/check/DangerCount.java +++ b/inventory-dao/src/main/java/com/rzyc/model/check/DangerCount.java @@ -3,7 +3,7 @@ package com.rzyc.model.check; public class DangerCount { private String SysOrgName; - private int totalDanger; + private int dangerCount; private int resolving; @@ -11,6 +11,8 @@ public class DangerCount { private int unresolved; + private String htLevel; + public String getSysOrgName() { return SysOrgName; } @@ -19,12 +21,12 @@ public class DangerCount { SysOrgName = sysOrgName; } - public int getTotalDanger() { - return totalDanger; + public int getDangerCount() { + return dangerCount; } - public void setTotalDanger(int totalDanger) { - this.totalDanger = totalDanger; + public void setDangerCount(int dangerCount) { + this.dangerCount = dangerCount; } public int getResolving() { @@ -50,4 +52,12 @@ public class DangerCount { public void setUnresolved(int unresolved) { this.unresolved = unresolved; } + + public String getHtLevel() { + return htLevel; + } + + public void setHtLevel(String htLevel) { + this.htLevel = htLevel; + } } diff --git a/inventory-dao/src/main/resources/mapper/EntDeviceMapper.xml b/inventory-dao/src/main/resources/mapper/EntDeviceMapper.xml index 86c1b26..495cfcf 100644 --- a/inventory-dao/src/main/resources/mapper/EntDeviceMapper.xml +++ b/inventory-dao/src/main/resources/mapper/EntDeviceMapper.xml @@ -108,6 +108,21 @@ order by ed.model_state desc + update ent_device set type_path = #{entDevice.typePath},enterprise_id = #{entDevice.enterpriseId},qr_code = #{entDevice.qrCode},installation_time = #{entDevice.installationTime}, diff --git a/inventory-dao/src/main/resources/mapper/RkSourcesMapper.xml b/inventory-dao/src/main/resources/mapper/RkSourcesMapper.xml index 8843596..7f200ca 100644 --- a/inventory-dao/src/main/resources/mapper/RkSourcesMapper.xml +++ b/inventory-dao/src/main/resources/mapper/RkSourcesMapper.xml @@ -86,6 +86,19 @@ AND rs.del_state = 1 ORDER BY rs.`modify_time` DESC + diff --git a/inventory-dao/src/main/resources/mapper/check/BookEntHTMapper.xml b/inventory-dao/src/main/resources/mapper/check/BookEntHTMapper.xml index 8126652..955d5d8 100644 --- a/inventory-dao/src/main/resources/mapper/check/BookEntHTMapper.xml +++ b/inventory-dao/src/main/resources/mapper/check/BookEntHTMapper.xml @@ -1300,9 +1300,12 @@ + select bt.HTLevel, + sum(case when bt.HTState = '已整改' then 1 else 0 end) as 'resolved', + sum(case when bt.HTState = '整改中' then 1 else 0 end) as 'resolving', + sum(case when bt.HTState = '未整改' then 1 else 0 end) as 'unresolved', + count(DISTINCT bt.BookEntHTId) dangerCount + from BookEntHT bt + left join SysEnterprise sys on sys.SysEnterpriseId = bt.SysEnterpriseId + left join SysOrg so ON FIND_IN_SET(so.OrgCode ,sys.area_path) + where so.SuperiorOrgCode = #{orgCode} + group by bt.HTLevel + + + + diff --git a/inventory-dao/src/main/resources/mapper/ent/EntPostMapper.xml b/inventory-dao/src/main/resources/mapper/ent/EntPostMapper.xml index 04bb78b..831ca14 100644 --- a/inventory-dao/src/main/resources/mapper/ent/EntPostMapper.xml +++ b/inventory-dao/src/main/resources/mapper/ent/EntPostMapper.xml @@ -61,7 +61,7 @@ diff --git a/inventory-dao/src/main/resources/mapper/ent/SysEnterpriseMapper.xml b/inventory-dao/src/main/resources/mapper/ent/SysEnterpriseMapper.xml index e987c0a..a504f94 100644 --- a/inventory-dao/src/main/resources/mapper/ent/SysEnterpriseMapper.xml +++ b/inventory-dao/src/main/resources/mapper/ent/SysEnterpriseMapper.xml @@ -2484,11 +2484,18 @@ + + + + + +