禅道BUG修改-部分功能接口
This commit is contained in:
parent
1ea3c6514e
commit
bacebc2246
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<EntDevice> {
|
|||
* */
|
||||
List<EntDevice>mobileEntDevice(String modelState);
|
||||
|
||||
|
||||
/**
|
||||
* 小程序企业设备
|
||||
* @param enterpriseId 企业id
|
||||
* @param typeId 类型id
|
||||
* @param keyWord 关键字
|
||||
* @return int
|
||||
* */
|
||||
List<EntDeviceInsStatistic>selectEntEquipmentListAndIns(@Param("enterpriseId") String enterpriseId,@Param("typeId") String typeId,@Param("keyWord") String keyWord);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<RkSources> {
|
|||
Integer changeIndex(@Param("sourceId") String sourceId);
|
||||
|
||||
|
||||
/**
|
||||
* 危险源统计
|
||||
* @param industryId
|
||||
* @return RkSources
|
||||
* */
|
||||
List<RkSourceStatistic> sourcesEntStatistic(@Param("industryId") String industryId);
|
||||
|
||||
|
||||
/**
|
||||
* 风险源信息分页查询
|
||||
* @param RkSourcesDto
|
||||
|
|
|
|||
|
|
@ -274,4 +274,23 @@ public interface BookEntHTMapper {
|
|||
* @return DangerStatistic 隐患统计对象
|
||||
* */
|
||||
DangerStatistic selectHalfAYearEntDangerStatistics(String enterpriseId);
|
||||
|
||||
|
||||
/**
|
||||
* 隐患统计大屏
|
||||
* @param orgCode
|
||||
* @param condition
|
||||
* @return 隐患统计
|
||||
* */
|
||||
List<DangerCount>bigDataDangerStatistic(@Param("orgCode") String orgCode,@Param("condition")String condition);
|
||||
|
||||
|
||||
/**
|
||||
* 安全检查详细
|
||||
* @param enterpriseId
|
||||
* @return list
|
||||
* */
|
||||
List<DangerCount>dangerStatisticInDetail(@Param("enterpriseId")String enterpriseId);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<EntInsRecord> insRecords;
|
||||
|
||||
public List<EntInsRecord> getInsRecords() {
|
||||
return insRecords;
|
||||
}
|
||||
|
||||
|
||||
public void setInsRecords(List<EntInsRecord> insRecords) {
|
||||
this.insRecords = insRecords;
|
||||
}
|
||||
|
||||
public Date getInsRecordDate() {
|
||||
return insRecordDate;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,6 +108,21 @@
|
|||
</if>
|
||||
order by ed.model_state desc
|
||||
</select>
|
||||
<select id="selectEntEquipmentListAndIns" resultType="com.rzyc.model.EntDeviceInsStatistic">
|
||||
select ed.device_id deviceId,ed.name,ed.number,ed.model_state state,count(eir.ins_record_id)as countRecord
|
||||
from ent_device ed
|
||||
left join (SELECT MAX( inspection_id ) as inspection_id,device_id FROM ent_device_ins_cycle where del_state = 1 GROUP BY device_id) as edic on ed.device_id = edic.device_id
|
||||
left join ent_ins_record eir on edic.inspection_id = eir.cycle_id
|
||||
where ed.enterprise_id = #{enterpriseId} and ed.del_state = 1
|
||||
<if test="null != typeId and '' != typeId">
|
||||
and ed.type_path like concat('%',#{typeId},'%')
|
||||
</if>
|
||||
<if test="null != keyWord and '' != keyWord">
|
||||
and ed.name like concat('%',#{keyWord},'%')
|
||||
or ed.number like concat('%',#{keyWord},'%')
|
||||
or ed.model_num like concat('%',#{keyWord},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateEntDevice" parameterType="com.rzyc.model.EntDevice">
|
||||
update ent_device set type_path = #{entDevice.typePath},enterprise_id = #{entDevice.enterpriseId},qr_code = #{entDevice.qrCode},installation_time = #{entDevice.installationTime},
|
||||
|
|
|
|||
|
|
@ -86,6 +86,19 @@
|
|||
AND rs.del_state = 1
|
||||
ORDER BY rs.`modify_time` DESC
|
||||
</select>
|
||||
<select id="sourcesEntStatistic" resultType="com.rzyc.model.RkSourceStatistic">
|
||||
select count(distinct risk_grade) riskTypeCount ,count(se.SysEnterpriseId) entCount,bil.IndustryClassName
|
||||
,sum(case when risk_grade = 1 then 1 else 0 end)as lowRisk,sum(case when risk_grade = 2 then 1 else 0 end) as generalRisk,
|
||||
sum(case when risk_grade = 3 then 1 else 0 end)as greaterRisk,sum(case when risk_grade = 4 then 1 else 0 end)as majorRisk
|
||||
from rk_sources rs
|
||||
left join sysenterprise se on rs.enterprise_id = se.SysEnterpriseId
|
||||
left join baseinclass bil on rs.base_inclass_id = bil.BaseInClassId
|
||||
where rs.del_state= 1
|
||||
<if test="null != industryId and '' != industryId">
|
||||
and rs.base_inclass_id = #{industryId}
|
||||
</if>
|
||||
group by rs.base_inclass_id
|
||||
</select>
|
||||
|
||||
<!--取消危险源标记-->
|
||||
<update id="changeIndex">
|
||||
|
|
|
|||
|
|
@ -1300,9 +1300,12 @@
|
|||
|
||||
<select id="dangerDetailByCompanyId" resultMap="EntHTListResultMap">
|
||||
select * from BookEntHT bt where SysEnterpriseId = #{SysEnterpriseId}
|
||||
<if test="null != htState and '' != htState">
|
||||
<if test="null != htState and '' != htState and '审核中' != htState">
|
||||
and HTState = #{htState}
|
||||
</if>
|
||||
<if test="null != htState and '审核中' == htState">
|
||||
and HTReport = #{htState}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="dangerListRecord" resultMap="BaseResultMap">
|
||||
|
|
@ -1702,6 +1705,18 @@
|
|||
<update id="lawState">
|
||||
UPDATE `bookentht` SET law_state = 2 WHERE BookEntHTId = #{bookEntHTId}
|
||||
</update>
|
||||
<select id="bigDataDangerStatistic" resultType="com.rzyc.model.check.DangerCount">
|
||||
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
|
||||
</select>
|
||||
|
||||
<select id="selectHalfAYearEntDangerStatistics" resultType="com.rzyc.model.DangerStatistic">
|
||||
select sum(case when HTState = '整改中' then 1 else 0 end ) as underRectification,sum(case when HTState = '已整改' then 1 else 0 end )as rectified,sum(case when HTState = '未整改' then 1 else 0 end ) as notRectified from bookentht
|
||||
|
|
@ -1709,4 +1724,17 @@
|
|||
</select>
|
||||
|
||||
|
||||
<select id="dangerStatisticInDetail" resultType="com.rzyc.model.check.DangerCount">
|
||||
select bt.HTLevel as 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 SysEnterprise sys
|
||||
left join BookEntHT bt on sys.SysEnterpriseId = bt.SysEnterpriseId
|
||||
where sys.SysEnterpriseId = #{enterpriseId} and bt.HTLevel is not null
|
||||
group by bt.HTLevel
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
</update>
|
||||
|
||||
<select id="selectNoDutyPost" resultType="com.rzyc.model.ent.EntPost">
|
||||
select ep.* from ent_post ep left join ent_post_duty epd on epd.post_id = ep.post_id where epd.duty_id is null
|
||||
select ep.* from ent_post ep left join ent_post_duty epd on epd.post_id = ep.post_id where epd.post_id is null
|
||||
</select>
|
||||
|
||||
<insert id="insertEntPostBatch">
|
||||
|
|
|
|||
|
|
@ -2484,11 +2484,18 @@
|
|||
<result column="rectifyedNum" jdbcType="INTEGER" property="rectifyedNum" />
|
||||
<result column="notRectifyNum" jdbcType="INTEGER" property="notRectifyNum" />
|
||||
<result column="rectifyingNum" jdbcType="INTEGER" property="rectifyingNum" />
|
||||
<result column="SysAddress" jdbcType="VARCHAR" property="sysAddress"/>
|
||||
<result column="SafeManager" jdbcType="VARCHAR" property="safeManager"/>
|
||||
<result column="SafeTelephone" jdbcType="VARCHAR" property="safeTelephone"/>
|
||||
<result column="ManageType" jdbcType="VARCHAR" property="manageType"/>
|
||||
<result column="LegalRepre" jdbcType="VARCHAR" property="legalRepre"/>
|
||||
<result column="LRLinkTel" jdbcType="VARCHAR" property="lRLinkTel"/>
|
||||
</resultMap>
|
||||
|
||||
<!--街道企业信息-->
|
||||
<select id="streetEntList" resultMap="SrteetEntInfoResultMap">
|
||||
select se.SysEnterpriseId,se.EntName,se.Longitude,se.Latitude,se.RiskLevel,
|
||||
se.SysAddress,se.SafeManager,se.SafeTelephone,se.ManageType,se.LegalRepre,se.LRLinkTel,
|
||||
SUM(case when be.HTLevel = '一般隐患' then 1 else 0 end ) commonlyNum,
|
||||
SUM(case when be.HTLevel = '重大隐患' then 1 else 0 end ) majorNum,
|
||||
SUM(case when be.HTState = '已整改' then 1 else 0 end ) rectifyedNum,
|
||||
|
|
|
|||
|
|
@ -179,9 +179,9 @@ public class EmergencyEquipmentController {
|
|||
@ApiImplicitParam(name = "entEmRehearsalProject", value = "项目",required = false, dataType = "string")
|
||||
})
|
||||
@ResponseBody
|
||||
public SingleResult<List<EntEmRehearsal>> entEmRehearsalList(@RequestParam(required = true)String enterpriseId,
|
||||
@RequestParam(required = true)Integer page,
|
||||
@RequestParam(required = true)Integer pageSize,
|
||||
public SingleResult<List<EntEmRehearsal>> entEmRehearsalList(@RequestParam String enterpriseId,
|
||||
@RequestParam Integer page,
|
||||
@RequestParam Integer pageSize,
|
||||
String entEmRehearsalProject)throws Exception{
|
||||
return pcBusinessService.entEmRehearsalList(enterpriseId,page,pageSize,entEmRehearsalProject);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,8 +147,8 @@ public class EnterpriseEquipmentController extends BaseController {
|
|||
@PreAuthorize("hasAnyAuthority('entEquipmentType:delete')")
|
||||
@MethodAnnotation(authorizations = {"entEquipmentType:delete"},name = "删除设备类型")
|
||||
@ResponseBody
|
||||
public SingleResult delDeviceType(String typeId)throws Exception{
|
||||
return pcBusinessService.delDeviceType(typeId);
|
||||
public SingleResult delDeviceType(String typeId,String enterpriseId)throws Exception{
|
||||
return pcBusinessService.delDeviceType(typeId,enterpriseId);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,17 +16,21 @@ import com.rzyc.bean.check.dto.ListWorkDto;
|
|||
import com.rzyc.bean.check.dto.WorkPageDto;
|
||||
import com.rzyc.bean.check.vo.WorkPageVo;
|
||||
import com.rzyc.bean.ent.MinCompaniesDto;
|
||||
import com.rzyc.config.MethodAnnotation;
|
||||
import com.rzyc.enums.DelState;
|
||||
import com.rzyc.enums.DocumentOtcType;
|
||||
import com.rzyc.enums.FactorType;
|
||||
import com.rzyc.enums.ReportSuperior;
|
||||
import com.rzyc.model.*;
|
||||
import com.rzyc.model.check.*;
|
||||
import com.rzyc.model.dto.AddOrUpdateInspectionRecordDto;
|
||||
import com.rzyc.model.dto.EntRepairRecordDto;
|
||||
import com.rzyc.model.ent.*;
|
||||
import com.rzyc.model.user.ListFactor;
|
||||
import com.rzyc.model.user.ListPerform;
|
||||
import com.rzyc.model.user.SysUnit;
|
||||
import com.rzyc.model.user.SysUser;
|
||||
import com.rzyc.service.PcBusinessService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
|
@ -35,6 +39,8 @@ import org.apache.commons.beanutils.BeanUtils;
|
|||
import org.apache.commons.beanutils.ConvertUtils;
|
||||
import org.apache.commons.beanutils.converters.DateConverter;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
|
@ -54,6 +60,9 @@ import java.util.*;
|
|||
@Validated
|
||||
public class MinWorkController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
PcBusinessService pcBusinessService;
|
||||
|
||||
/**
|
||||
* 小程序企业自查闭环
|
||||
* @retrun
|
||||
|
|
@ -342,5 +351,110 @@ public class MinWorkController extends BaseController{
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 企业设备详细
|
||||
* @param deviceId 设备id
|
||||
* @return 企业设备
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备详细", notes = "企业设备详细")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "deviceId", value = "设备id", required = true, dataType = "string"),
|
||||
})
|
||||
@GetMapping(value = "/deviceDetail")
|
||||
@PreAuthorize("hasAnyAuthority('entEquipmentList')")
|
||||
@MethodAnnotation(authorizations = {"entEquipmentList"},name = "企业设备详细")
|
||||
@ResponseBody
|
||||
public SingleResult<EntDevice> deviceDetail(@RequestParam(required = true) String deviceId)throws Exception{
|
||||
return pcBusinessService.deviceDetail(deviceId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设备巡检记录-添加和修改巡检记录
|
||||
* @return 设备巡检记录-添加和修改巡检记录
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "设备巡检记录-添加和修改巡检记录", notes = "设备巡检记录-添加和修改巡检记录")
|
||||
@PostMapping(value = "/addOrUpdateInspectionAddOrRecord")
|
||||
@PreAuthorize("hasAnyAuthority('addOrUpdateInspectionRecord:update')")
|
||||
@MethodAnnotation(authorizations = {"addOrUpdateInspectionRecord:update"},name = "设备巡检记录-添加和修改巡检记录")
|
||||
@ResponseBody
|
||||
public SingleResult addOrUpdateInspectionRecord(@RequestBody AddOrUpdateInspectionRecordDto addOrUpdateInspectionRecordDto)throws Exception{
|
||||
return pcBusinessService.addOrUpdateInspectionRecord(addOrUpdateInspectionRecordDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备巡检记录
|
||||
* @return 设备巡检记录
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "设备巡检记录", notes = "设备巡检记录")
|
||||
@GetMapping(value = "/insRecord")
|
||||
@PreAuthorize("hasAnyAuthority('insRecord','insRecord:update')")
|
||||
@MethodAnnotation(authorizations = {"insRecord","insRecord:update"},name = "设备巡检记录")
|
||||
@ResponseBody
|
||||
public SingleResult<List<EntInsRecord>> insRecord(String deviceId,String inspectionRecordName,Integer page,Integer pageSize)throws Exception{
|
||||
return pcBusinessService.selectInsRecord(deviceId,inspectionRecordName,page,pageSize);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 维修记录
|
||||
* @return 维修记录
|
||||
* @throws Exception
|
||||
**/
|
||||
@ApiOperation(value = "维修记录", notes = "维修记录")
|
||||
@GetMapping(value = "/repairRecord")
|
||||
@PreAuthorize("hasAnyAuthority('repairRecord','repairRecord:update')")
|
||||
@MethodAnnotation(authorizations = {"repairRecord","repairRecord:update"},name = "维修记录")
|
||||
@ResponseBody
|
||||
public SingleResult<EntRepairRecord> repairRecord(Integer page,Integer pageSize,String deviceId)throws Exception{
|
||||
return pcBusinessService.repairRecord(page,pageSize,deviceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修记录修改/新增
|
||||
* @return int
|
||||
* @throws Exception
|
||||
**/
|
||||
@ApiOperation(value = "维修记录修改/新增", notes = "维修记录修改/新增")
|
||||
@PostMapping(value = "/repairRecordUpdate")
|
||||
@PreAuthorize("hasAnyAuthority('repairRecord:update')")
|
||||
@MethodAnnotation(authorizations = {"repairRecord:update"},name = "维修记录修改/新增")
|
||||
@ResponseBody
|
||||
public SingleResult repairRecordUpdate(@RequestBody EntRepairRecordDto entRepairRecordDto)throws Exception{
|
||||
return pcBusinessService.repairRecordUpdate(entRepairRecordDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业设备带巡检进度
|
||||
* @param enterpriseId 企业id
|
||||
* @param typeId 设备类型id
|
||||
* @param keyWord 关键字
|
||||
* @return 企业设备列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "企业设备带巡检进度", notes = "企业设备带巡检进度")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "enterpriseId", value = "公司id", required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "typeId", value = "设备类型id", required = false, dataType = "string"),
|
||||
@ApiImplicitParam(name = "page", value = "page", required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "pageSize", required = true, dataType = "string"),
|
||||
@ApiImplicitParam(name = "keyWord", value = "关键字", required = false, dataType = "string")
|
||||
})
|
||||
@GetMapping(value = "/entEquipmentListAndIns")
|
||||
@PreAuthorize("hasAnyAuthority('entEquipmentListAndIns','entEquipmentList:update')")
|
||||
@MethodAnnotation(authorizations = {"entEquipmentListAndIns","entEquipmentList:update"},name = "企业设备带巡检进度")
|
||||
@ResponseBody
|
||||
public SingleResult<List<EntDeviceInsStatistic>> entEquipmentListAndIns(@RequestParam(required = true) String enterpriseId, String typeId,Integer page,Integer pageSize,String keyWord)throws Exception{
|
||||
return pcBusinessService.entEquipmentListAndIns(enterpriseId,typeId,page,pageSize,keyWord);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ public class PcCompanyController extends BaseController{
|
|||
incClass = super.exchange(sysEnterprises.get(0).getWorkClassId(),3);
|
||||
}
|
||||
|
||||
|
||||
sysEnterprises.get(0).setInClassName(JSONArray.toJSONString(incClass));
|
||||
sysEnterprises.get(0).setSafeClassName(JSONArray.toJSONString(safeClass));
|
||||
sysEnterprises.get(0).setWorkClassName(JSONArray.toJSONString(incClass));
|
||||
|
|
|
|||
|
|
@ -151,7 +151,6 @@ public class PcBusinessService extends BaseController {
|
|||
}
|
||||
|
||||
public List entUserPostDuty(EntUserPostDutyDto entUserPostDutyDto) throws Exception {
|
||||
entUserPostDutyDto.setPostId(getUserPostId());
|
||||
//EntPostDuty
|
||||
List<EntPostDuty>list = entPostDutyMapper.selectEntUserPostDuty(entUserPostDutyDto.getEnterpriseId(),entUserPostDutyDto.getPostId());
|
||||
return list;
|
||||
|
|
@ -363,6 +362,10 @@ public class PcBusinessService extends BaseController {
|
|||
SingleResult singleResult = new SingleResult();
|
||||
EntDevice entDevice = entDeviceMapper.selectById(deviceId);
|
||||
EntDeviceType entDeviceType = entDeviceTypeMapper.selectById(entDevice.getTypeId());
|
||||
EntDeviceInsCycle entDeviceInsCycle = entDeviceInsCycleMapper.selectByDeviceId(deviceId);
|
||||
if (null != entDeviceInsCycle && null != entDeviceInsCycle.getInspectionCycle()){
|
||||
entDevice.setInspectionCycle(entDeviceInsCycle.getInspectionCycle());
|
||||
}
|
||||
entDevice.setDeviceType(entDeviceType);
|
||||
singleResult.setData(entDevice);
|
||||
return singleResult;
|
||||
|
|
@ -535,8 +538,9 @@ public class PcBusinessService extends BaseController {
|
|||
BeanUtils.copyProperties(addOrUpdateInspectionRecordDto,entInsRecord);
|
||||
//存放设备的周期巡检id
|
||||
EntDeviceInsCycle cycle = entDeviceInsCycleMapper.selectByDeviceId(addOrUpdateInspectionRecordDto.getDeviceId());
|
||||
EntInsRecord er = entInsRecordMapper.selectById(addOrUpdateInspectionRecordDto.getInsRecordId());
|
||||
int result = 0;
|
||||
if (null != addOrUpdateInspectionRecordDto && null != addOrUpdateInspectionRecordDto.getInsRecordId()){
|
||||
if (null != er && null != er.getInsRecordId()){
|
||||
if (cycle != null) {
|
||||
entInsRecord.setCycleId(cycle.getInspectionId());
|
||||
}
|
||||
|
|
@ -547,7 +551,6 @@ public class PcBusinessService extends BaseController {
|
|||
if (cycle != null) {
|
||||
entInsRecord.setCycleId(cycle.getInspectionId());
|
||||
}
|
||||
entInsRecord.setInsRecordId(RandomNumber.getUUid());
|
||||
entInsRecord.setCreateBy(getUserId());
|
||||
entInsRecord.setCreateTime(new Date());
|
||||
result = entInsRecordMapper.insert(entInsRecord);
|
||||
|
|
@ -1060,7 +1063,8 @@ public class PcBusinessService extends BaseController {
|
|||
EntRepairRecord entRepairRecord = new EntRepairRecord();
|
||||
BeanUtils.copyProperties(entRepairRecordDto,entRepairRecord);
|
||||
int result = 0;
|
||||
if (null != entRepairRecordDto && null != entRepairRecordDto.getRepairRecordId()){
|
||||
EntRepairRecord err = entRepairRecordMapper.selectById( entRepairRecordDto.getRepairRecordId());
|
||||
if (null != err && null != err.getRepairRecordId()){
|
||||
entRepairRecord.setModifyBy(getUserId());
|
||||
entRepairRecord.setModifyTime(new Date());
|
||||
result =entRepairRecordMapper.repairRecordUpdate(entRepairRecord);
|
||||
|
|
@ -1329,14 +1333,32 @@ public class PcBusinessService extends BaseController {
|
|||
return singleResult;
|
||||
}
|
||||
|
||||
public SingleResult delDeviceType(String deviceTypeId){
|
||||
public SingleResult delDeviceType(String deviceTypeId,
|
||||
String enterpriseId){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
Integer result = entDeviceTypeMapper.updateDelState(DelState.DELETE.getState(),deviceTypeId);
|
||||
if (result != 1){
|
||||
singleResult.setCode(Code.ERROR.getCode());
|
||||
singleResult.setMessage(Message.ERROR);
|
||||
}
|
||||
//更新redis
|
||||
List<EntDeviceType> entDeviceTypes = entDeviceTypeMapper.selectEntEquipmentTypeList(enterpriseId);
|
||||
//树结构处理
|
||||
JSONArray jsonArray = handleEntEquipment(entDeviceTypes);
|
||||
List<EntDeviceType>types = JSONArray.parseArray(JSONArray.toJSONString(jsonArray),EntDeviceType.class);
|
||||
singleResult.setData(types);
|
||||
//存redis
|
||||
boolean insertRedisResult = redisUtil.set(redisUtil.appendSymbol(RedisKeys.DEVICE.getKey(),enterpriseId),types,0);
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
@PageOperation
|
||||
public SingleResult entEquipmentListAndIns(String enterpriseId, String typeId,Integer page,Integer pageSize,String keyWord){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
Page<EntDeviceInsStatistic> devices = (Page<EntDeviceInsStatistic>) entDeviceMapper.selectEntEquipmentListAndIns(enterpriseId,typeId,keyWord);
|
||||
singleResult.setDataPager(devices);
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ public class UserLoginService {
|
|||
entUser.setEnterpriseId(sysEnterprise.getSysenterpriseid());
|
||||
entUser.setToken(token);
|
||||
entUser.setEntPostName(entPost.getName());
|
||||
entUser.setPostId(entPost.getPostId());
|
||||
entUser.setUserTypeName("企业用户");
|
||||
entUser.setEnterpriseName(sysEnterprise.getEntname());
|
||||
return entUser;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ onstants:
|
|||
#上传文件基础路径
|
||||
service_file_header: http://192.168.31.253/
|
||||
#父级地区id
|
||||
superior_org_code: 512000
|
||||
superior_org_code: 513300
|
||||
#动态详情基础地址
|
||||
html_header: http://192.168.31.253:7010/
|
||||
#logourl
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
spring:
|
||||
profiles:
|
||||
active: prod #设定打包配置文件
|
||||
active: dev #设定打包配置文件
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,11 +17,16 @@ import com.rzyc.bean.bigdata.dto.ControlCheckDto;
|
|||
import com.rzyc.bean.bigdata.dto.StorageDto;
|
||||
import com.rzyc.bean.bigdata.user.PerformInfo;
|
||||
import com.rzyc.bean.bigdata.user.UnitList;
|
||||
import com.rzyc.bean.risk.SourcesPageDto;
|
||||
import com.rzyc.enums.AreaOrgType;
|
||||
import com.rzyc.enums.DelState;
|
||||
import com.rzyc.enums.MemberType;
|
||||
import com.rzyc.enums.RiskLevel;
|
||||
import com.rzyc.model.RkSourceStatistic;
|
||||
import com.rzyc.model.RkSources;
|
||||
import com.rzyc.model.Storage;
|
||||
import com.rzyc.model.check.BookEntHT;
|
||||
import com.rzyc.model.check.DangerCount;
|
||||
import com.rzyc.model.ent.SysEnterprise;
|
||||
import com.rzyc.model.user.SysUser;
|
||||
import io.swagger.annotations.*;
|
||||
|
|
@ -607,4 +612,76 @@ public class BigdataController extends com.rzyc.controller.BaseController {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "隐患统计", notes = "隐患统计")
|
||||
@GetMapping("/dangerStatistic")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "orgCode",value = "地区id 默认传甘孜的地区id",required = true),
|
||||
@ApiImplicitParam(name = "condition",value = "关键字")
|
||||
})
|
||||
@ResponseBody
|
||||
public MultiResult<DangerCount> dangerStatistic(String orgCode,String condition)throws Exception{
|
||||
MultiResult<DangerCount> result = new MultiResult<>();
|
||||
condition = TypeConversion.getCondition(condition);
|
||||
List<DangerCount> entHTS = bookEntHTMapper.bigDataDangerStatistic(orgCode,condition);
|
||||
result.setData(entHTS);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "安全检查情况", notes = "安全检查情况")
|
||||
@GetMapping("/dangerStatisticInDetail")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "enterpriseId",value = "企业id",required = true)
|
||||
})
|
||||
@ResponseBody
|
||||
public MultiResult<DangerCount> dangerStatisticInDetail(String enterpriseId)throws Exception{
|
||||
MultiResult<DangerCount> result = new MultiResult<>();
|
||||
List<DangerCount> entHTS = bookEntHTMapper.dangerStatisticInDetail(enterpriseId);
|
||||
|
||||
result.setData(entHTS);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业重大危险源分页
|
||||
*
|
||||
* @version v1.0
|
||||
* @author dong
|
||||
* @date 2022/8/2 11:49
|
||||
*/
|
||||
@ApiOperation(value = "企业重大危险源分页", notes = "企业重大危险源分页")
|
||||
@GetMapping("/sourcesEntPage")
|
||||
@ResponseBody
|
||||
public SingleResult<Pager<RkSources>> sourcesEntPage(@Valid SourcesPageDto sourcesPageDto) throws Exception {
|
||||
SingleResult<Pager<RkSources>> result = new SingleResult<>();
|
||||
String condition = TypeConversion.getCondition(sourcesPageDto.getCondition());
|
||||
PageHelper.startPage(sourcesPageDto.getPage(), sourcesPageDto.getPageSize());
|
||||
Page<RkSources> page = (Page<RkSources>) rkSourcesMapper.sourcesList(condition, sourcesPageDto.getEnterpriseId(), sourcesPageDto.getRiskGrade());
|
||||
Pager<RkSources> pager = new Pager<>();
|
||||
getDatePage(pager, page);
|
||||
result.setData(pager);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业重大危险源统计
|
||||
* @version v1.0
|
||||
* @author Xuwanxin
|
||||
* @date 2023/3/15
|
||||
* */
|
||||
@ApiOperation(value = "企业重大危险源统计", notes = "企业重大危险源统计")
|
||||
@GetMapping("/sourcesEntStatistic")
|
||||
@ResponseBody
|
||||
public SingleResult<List<RkSourceStatistic>> sourcesEntStatistic(String industryId) throws Exception {
|
||||
SingleResult<List<RkSourceStatistic>> result = new SingleResult<>();
|
||||
List<RkSourceStatistic>source = rkSourcesMapper.sourcesEntStatistic(industryId);
|
||||
result.setData(source);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2569,7 +2569,6 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
year = TypeConversion.getCondition(year+"");
|
||||
List<AreaDangerNum> dangerNums = bookEntHTMapper.userAreaDangerNum(areaCode,year);
|
||||
result.setData(dangerNums);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ onstants:
|
|||
#上传文件基础路径
|
||||
service_file_header: http://192.168.31.253/
|
||||
#父级地区id
|
||||
superior_org_code: 512000
|
||||
superior_org_code: 513300
|
||||
#动态详情基础地址
|
||||
html_header: http://192.168.31.253:7010/
|
||||
#logourl
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user