init
parent
e5173a33f0
commit
f57e764d49
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.key.project.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
public class CameraListCmd extends PageQuery {
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
@ApiModelProperty(value = "摄像头类型,1:固定摄像头,2:移动摄像头")
|
||||
private Integer cameraType;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.zcloud.key.project.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
public class CorpStatisticsPageQry extends PageQuery {
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
@ApiModelProperty(value = "公司名称")
|
||||
private String corpinfoName;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.zcloud.key.project.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
public class KeyProjectStatisticsPageQry extends PageQuery {
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
@ApiModelProperty(value = "重点作业名称")
|
||||
private String projectName;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.zcloud.key.project.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class KeyProjectUpdateStatusCmd implements Serializable {
|
||||
@ApiModelProperty(value = "主键", name = "id", required = true)
|
||||
@NotNull(message = "主键不能为空")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "经度", name = "longitude", required = true)
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty(value = "纬度", name = "latitude", required = true)
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty(value = "状态,0:暂存。1:未开工,2:开工申请中,3:已超期,4:进行中,5:完工申请中,6:已完工", name = "applyStatus", required = true)
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer applyStatus;
|
||||
|
||||
@ApiModelProperty(value = "重点作业摄像头信息", name = "keyProjectCameraAddCmdList")
|
||||
private List<KeyProjectCameraAddCmd> keyProjectCameraAddCmdList;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.zcloud.key.project.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
public class XgfCorpStatisticsPageQry implements Serializable {
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
@ApiModelProperty(value = "企业id列表")
|
||||
private List<Long> jurisdictionCorpinfoIdList;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.key.project.dto.clientobject;
|
||||
|
||||
import com.alibaba.cola.dto.ClientObject;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
public class CameraInfoCO implements Serializable {
|
||||
|
||||
|
||||
//摄像头id
|
||||
@ApiModelProperty(value = "摄像头id")
|
||||
private String cameraId;
|
||||
//摄像头类型,1:固定摄像头,2:移动摄像头
|
||||
@ApiModelProperty(value = "摄像头类型,1:固定摄像头,2:移动摄像头")
|
||||
private Integer cameraType;
|
||||
|
||||
@ApiModelProperty(value = "摄像头名称")
|
||||
private String cameraName;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.zcloud.key.project.dto.clientobject;
|
||||
|
||||
import com.alibaba.cola.dto.ClientObject;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
public class CorpStatisticsCO implements Serializable {
|
||||
//企业id
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private Long corpinfoId;
|
||||
//企业名称
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String corpinfoName;
|
||||
|
||||
@ApiModelProperty(value = "重点作业总数")
|
||||
private Integer totalProjectCount;
|
||||
|
||||
@ApiModelProperty(value = "开工数量")
|
||||
private Integer startCount;
|
||||
|
||||
@ApiModelProperty(value = "完工数量")
|
||||
private Integer completeCount;
|
||||
|
||||
@ApiModelProperty(value = "检查次数")
|
||||
private Integer inspectCount;
|
||||
|
||||
@ApiModelProperty(value = "发现隐患数")
|
||||
private Integer hazardCount;
|
||||
|
||||
@ApiModelProperty(value = "固定视频监控数")
|
||||
private Integer fixedCameraCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "移动视频监控数")
|
||||
private Integer mobileCameraCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "固定摄像头idList")
|
||||
private List<String> fixedCameraIdList;
|
||||
|
||||
@ApiModelProperty(value = "移动摄像头idList")
|
||||
private List<String> mobileCameraIdList;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.zcloud.key.project.dto.clientobject;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
public class KeyProjectStatisticsCO implements Serializable {
|
||||
//主键
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
//业务主键id
|
||||
@ApiModelProperty(value = "业务主键id")
|
||||
private String keyProjectId;
|
||||
//重点作业名称
|
||||
@ApiModelProperty(value = "重点作业名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty(value = "重点作业总数")
|
||||
private Integer totalProjectCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "检查次数")
|
||||
private Integer inspectCount;
|
||||
|
||||
@ApiModelProperty(value = "发现隐患数")
|
||||
private Integer hazardCount;
|
||||
|
||||
@ApiModelProperty(value = "固定视频监控数")
|
||||
private Integer fixedCameraCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "移动视频监控数")
|
||||
private Integer mobileCameraCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "固定摄像头idList")
|
||||
private List<String> fixedCameraIdList;
|
||||
|
||||
@ApiModelProperty(value = "移动摄像头idList")
|
||||
private List<String> mobileCameraIdList;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.zcloud.key.project.dto.clientobject;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
public class XgfCorpStatisticsCO implements Serializable {
|
||||
//企业id
|
||||
@ApiModelProperty(value = "辖区单位企业id")
|
||||
private Long jurisdictionCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "重点作业总数")
|
||||
private Integer totalProjectCount;
|
||||
|
||||
@ApiModelProperty(value = "开工数量")
|
||||
private Integer startCount;
|
||||
|
||||
@ApiModelProperty(value = "完工数量")
|
||||
private Integer completeCount;
|
||||
|
||||
@ApiModelProperty(value = "检查次数")
|
||||
private Integer inspectCount;
|
||||
|
||||
@ApiModelProperty(value = "发现隐患数")
|
||||
private Integer hazardCount;
|
||||
|
||||
@ApiModelProperty(value = "固定视频监控数")
|
||||
private Integer fixedCameraCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "移动视频监控数")
|
||||
private Integer mobileCameraCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "固定摄像头idList")
|
||||
private List<String> fixedCameraIdList;
|
||||
|
||||
@ApiModelProperty(value = "移动摄像头idList")
|
||||
private List<String> mobileCameraIdList;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.zcloud.key.project.domain.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum CommonFlagEnum {
|
||||
NO(0,"否"),
|
||||
YES(1,"是"),
|
||||
;
|
||||
private final Integer code;
|
||||
private final String name;
|
||||
|
||||
CommonFlagEnum(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.zcloud.key.project.domain.enums;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* corp_info 中的type字段枚举(0-普通企业,1-集团单位,2-股份单位,3-相关方企业,4-货主单位,5-驻港单位)
|
||||
* 与传入enterpriseType中的关联关系
|
||||
* .企业类型1:监管 2:企业 3:相关方
|
||||
*/
|
||||
@Getter
|
||||
public enum CorpTypeEnum {
|
||||
OrdinaryEnterprises(0,"普通企业",UserTypeEnum.QY.getCode()),
|
||||
groupUnits(1, "集团单位",UserTypeEnum.QY.getCode()),
|
||||
share(2,"股份单位",UserTypeEnum.JG.getCode()),
|
||||
serviceProvider(3, "相关方企业",UserTypeEnum.XGF.getCode()),
|
||||
cargoOwner(4, "货主单位",UserTypeEnum.XGF.getCode()),
|
||||
portUnit(5, "驻港单位",UserTypeEnum.XGF.getCode()),
|
||||
materialCenter(6, "物资中心",UserTypeEnum.QY.getCode());
|
||||
|
||||
private static final Map<Integer, List<Integer>> ENTERPRISE_TYPE_CODE_MAP = new HashMap<>();
|
||||
|
||||
private final Integer code;
|
||||
private final String name;
|
||||
//传入的企业类型企业类型 1:监管 2:企业 3:相关方
|
||||
private final Integer userType;
|
||||
|
||||
CorpTypeEnum(Integer code, String name,Integer userType) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.userType = userType;
|
||||
}
|
||||
static {
|
||||
Arrays.stream(CorpTypeEnum.values())
|
||||
.collect(Collectors.groupingBy(CorpTypeEnum::getUserType))
|
||||
.forEach((userType, corpTypes) ->
|
||||
ENTERPRISE_TYPE_CODE_MAP.put(
|
||||
userType,
|
||||
corpTypes.stream().map(CorpTypeEnum::getCode).collect(Collectors.toList())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public static List<Integer> getCodesByEnterpriseType(Integer enterpriseType) {
|
||||
return ENTERPRISE_TYPE_CODE_MAP.getOrDefault(enterpriseType, Collections.emptyList());
|
||||
}
|
||||
public static List<Integer> getCodesByEnterpriseType(List<Integer> enterpriseTypeList) {
|
||||
if(CollUtil.isEmpty(enterpriseTypeList)){
|
||||
return null;
|
||||
}
|
||||
return enterpriseTypeList.stream()
|
||||
.flatMap(enterpriseType ->
|
||||
ENTERPRISE_TYPE_CODE_MAP.getOrDefault(enterpriseType, Collections.emptyList()).stream())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
||||
public static Integer getUserTypeByCode(Integer code) {
|
||||
for (CorpTypeEnum corpType : values()) {
|
||||
if (corpType.code.equals(code)) {
|
||||
return corpType.userType;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getNameByCode(Integer code) {
|
||||
for (CorpTypeEnum corpType : values()) {
|
||||
if (corpType.code.equals(code)) {
|
||||
return corpType.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.zcloud.key.project.domain.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 状态,0:暂存。1:未开工,2:开工申请中,3:已超期,4:进行中,5:完工申请中,6:已完工
|
||||
*/
|
||||
@Getter
|
||||
public enum KeyProjectApplyStatusEnum {
|
||||
TEMPORARY_SAVE(0, "暂存"),
|
||||
NOT_STARTED(1, "未开工"),
|
||||
START_APPLY(2, "开工申请中"),
|
||||
OVERDUE(3, "已超期"),
|
||||
IN_PROGRESS(4, "进行中"),
|
||||
FINISH_APPLY(5, "完工申请中"),
|
||||
FINISHED(6, "已完工");
|
||||
|
||||
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final String name;
|
||||
|
||||
KeyProjectApplyStatusEnum(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.zcloud.key.project.domain.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 摄像头类型,1:固定摄像头,2:移动摄像头
|
||||
*/
|
||||
@Getter
|
||||
public enum KeyProjectCameraTypeEnum {
|
||||
FIXED_CAMERA(1, "固定摄像头"),
|
||||
MOBILE_CAMERA(2, "移动摄像头");
|
||||
|
||||
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final String name;
|
||||
|
||||
KeyProjectCameraTypeEnum(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.zcloud.key.project.domain.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 菜单枚举
|
||||
*/
|
||||
@Getter
|
||||
public enum MenuEnum {
|
||||
//领域部门
|
||||
LYBMGL("/domain/container/supervision/domainDepartment", "lybmgl"),
|
||||
//领域组
|
||||
LYZGL("/domain/container/supervision/domainGroup", "lyzgl"),
|
||||
//课题任务管理
|
||||
GFDKTRW("/domain/container/supervision/projectTask/list", "gfd-ktrw"),
|
||||
//课题评分管理
|
||||
GFDKTPF("/domain/container/supervision/projectScore", "gfd-ktpf"),
|
||||
|
||||
|
||||
//企业端
|
||||
//课题任务管理
|
||||
QYDKTRW("/domain/container/branchCompany/projectTask/list", "qyd-ktrw"),
|
||||
//课题评分管理
|
||||
QYDKTPF("/domain/container/branchCompany/projectScore", "qyd-ktpf"),
|
||||
|
||||
;
|
||||
|
||||
private final String path;
|
||||
private final String menuKey;
|
||||
|
||||
private static final Map<String, MenuEnum> PATH_MAP =
|
||||
Arrays.stream(values())
|
||||
.collect(Collectors.toMap(MenuEnum::getPath, Function.identity()));
|
||||
|
||||
MenuEnum(String path, String menuKey) {
|
||||
this.path = path;
|
||||
this.menuKey = menuKey;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public String getMenuKey() {
|
||||
return menuKey;
|
||||
}
|
||||
|
||||
// 通过name获取枚举
|
||||
public static MenuEnum getByPath(String path) {
|
||||
return PATH_MAP.get(path);
|
||||
}
|
||||
|
||||
// 通过path获取age
|
||||
public static String getMenuKeyByPath(String path) {
|
||||
MenuEnum entry = PATH_MAP.get(path);
|
||||
return entry != null ? entry.getMenuKey() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.zcloud.key.project.domain.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
@Getter
|
||||
public enum UserTypeEnum {
|
||||
JG(1,"监管"),
|
||||
QY(2,"企业"),
|
||||
XGF(3,"相关方")
|
||||
;
|
||||
private final Integer code;
|
||||
private final String name;
|
||||
|
||||
UserTypeEnum(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static Integer getUserType(Integer corpType){
|
||||
if (corpType.equals(CorpTypeEnum.OrdinaryEnterprises.getCode()) ||
|
||||
corpType.equals(CorpTypeEnum.groupUnits.getCode())){
|
||||
return UserTypeEnum.QY.getCode();
|
||||
}else if (corpType.equals(CorpTypeEnum.share.getCode())){
|
||||
return UserTypeEnum.JG.getCode();
|
||||
}else {
|
||||
return UserTypeEnum.XGF.getCode();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.zcloud.key.project.persistence.dataobject;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
public class CameraInfoDO implements Serializable {
|
||||
|
||||
|
||||
//摄像头id
|
||||
@ApiModelProperty(value = "摄像头id")
|
||||
private String cameraId;
|
||||
//摄像头类型,1:固定摄像头,2:移动摄像头
|
||||
@ApiModelProperty(value = "摄像头类型,1:固定摄像头,2:移动摄像头")
|
||||
private Integer cameraType;
|
||||
|
||||
@ApiModelProperty(value = "摄像头名称")
|
||||
private String cameraName;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
package com.zcloud.key.project.persistence.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2025-10-30 15:12:49
|
||||
*/
|
||||
@Data
|
||||
@TableName("corp_info")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CorpInfoDO extends BaseDO {
|
||||
|
||||
//企业id
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private String corpinfoId;
|
||||
//企业名称
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String corpName;
|
||||
|
||||
//企业类型(0-普通企业,1-集团单位,2-股份单位,3-相关方企业,4-货主单位,5-驻港单位)
|
||||
@ApiModelProperty(value = "企业类型(0-普通企业,1-集团单位,2-股份单位,3-相关方企业,4-货主单位,5-驻港单位)")
|
||||
private Integer type;
|
||||
//相关方等级,1 一级相关方,2 二级相关方
|
||||
@ApiModelProperty(value = "相关方等级,1 一级相关方,2 二级相关方")
|
||||
private Integer xgfLevel;
|
||||
//企业再列表中的排序
|
||||
@ApiModelProperty(value = "企业再列表中的排序")
|
||||
private Integer corpOrder;
|
||||
//是否启用,1:启用,2:关闭
|
||||
@ApiModelProperty(value = "是否启用,1:启用,0:关闭")
|
||||
private Integer useFlag;
|
||||
//统一社会信用代码
|
||||
@ApiModelProperty(value = "统一社会信用代码")
|
||||
private String code;
|
||||
//通讯地址
|
||||
@ApiModelProperty(value = "通讯地址")
|
||||
private String address;
|
||||
//邮编
|
||||
@ApiModelProperty(value = "邮编")
|
||||
private String postalCode;
|
||||
//所属区域
|
||||
@ApiModelProperty(value = "所属区域")
|
||||
private String companyArea;
|
||||
|
||||
//规模
|
||||
@ApiModelProperty(value = "规模")
|
||||
private String scale;
|
||||
@ApiModelProperty(value = "规模名称")
|
||||
private String scaleName;
|
||||
//成立时间
|
||||
@ApiModelProperty(value = "成立时间")
|
||||
private LocalDate createDate;
|
||||
//企业状态
|
||||
@ApiModelProperty(value = "企业状态")
|
||||
private String corpState;
|
||||
//企业状态名称
|
||||
@ApiModelProperty(value = "企业状态名称")
|
||||
private String corpStateName;
|
||||
//资产总额(万元)
|
||||
@ApiModelProperty(value = "资产总额(万元)")
|
||||
private BigDecimal totalAssets;
|
||||
//注册资金(万元)
|
||||
@ApiModelProperty(value = "注册资金(万元)")
|
||||
private BigDecimal regcapital;
|
||||
//企事业单位经营地址
|
||||
@ApiModelProperty(value = "企事业单位经营地址")
|
||||
private String addressBusiness;
|
||||
//企事业单位办公地址
|
||||
@ApiModelProperty(value = "企事业单位办公地址")
|
||||
private String addressOffice;
|
||||
//经济类型
|
||||
@ApiModelProperty(value = "经济类型")
|
||||
private String ecoType;
|
||||
@ApiModelProperty(value = "经济类型名称")
|
||||
private String ecoTypeName;
|
||||
//主要负责人
|
||||
@ApiModelProperty(value = "主要负责人")
|
||||
private String contacts;
|
||||
//主要负责人手机号
|
||||
@ApiModelProperty(value = "主要负责人手机号")
|
||||
private String contactsPhone;
|
||||
//安全负责人
|
||||
@ApiModelProperty(value = "安全负责人")
|
||||
private String safetyName;
|
||||
//安全负责人手机号
|
||||
@ApiModelProperty(value = "安全负责人手机号")
|
||||
private String safetyPhone;
|
||||
//是否规模以上,1:是,0:否
|
||||
@ApiModelProperty(value = "是否规模以上,1:是,0:否")
|
||||
private Integer scaleType;
|
||||
//占地面积
|
||||
@ApiModelProperty(value = "占地面积")
|
||||
private BigDecimal areaCovered;
|
||||
//职工人数
|
||||
@ApiModelProperty(value = "职工人数")
|
||||
private Integer employees;
|
||||
//经度
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String longitude;
|
||||
//纬度
|
||||
@ApiModelProperty(value = "纬度")
|
||||
private String latitude;
|
||||
@ApiModelProperty(value = "所属区域名称")
|
||||
private String areaName;
|
||||
@ApiModelProperty(value = "所属区域编码")
|
||||
private String areaCode;
|
||||
//法定代表人
|
||||
@ApiModelProperty(value = "法定代表人")
|
||||
private String lrName;
|
||||
//法人手机号
|
||||
@ApiModelProperty(value = "法人手机号")
|
||||
private String lrMobile;
|
||||
//行业分类
|
||||
@ApiModelProperty(value = "行业分类")
|
||||
private String corpType;
|
||||
//行业分类名称
|
||||
@ApiModelProperty(value = "行业分类名称")
|
||||
private String corpTypeName;
|
||||
//行业分类
|
||||
@ApiModelProperty(value = "行业分类")
|
||||
private String corpType2;
|
||||
//行业分类名称
|
||||
@ApiModelProperty(value = "行业分类名称")
|
||||
private String corpType2Name;
|
||||
//行业分类
|
||||
@ApiModelProperty(value = "行业分类")
|
||||
private String corpType3;
|
||||
//行业分类名称
|
||||
@ApiModelProperty(value = "行业分类名称")
|
||||
private String corpType3Name;
|
||||
//行业分类
|
||||
@ApiModelProperty(value = "行业分类")
|
||||
private String corpType4;
|
||||
//行业分类名称
|
||||
@ApiModelProperty(value = "行业分类名称")
|
||||
private String corpType4Name;
|
||||
//所属省名称
|
||||
@ApiModelProperty(value = "所属省名称")
|
||||
private String provinceName;
|
||||
//所属省编码
|
||||
@ApiModelProperty(value = "所属省编码")
|
||||
private String province;
|
||||
//所属市级名称
|
||||
@ApiModelProperty(value = "所属市级名称")
|
||||
private String cityName;
|
||||
//所属市级编码
|
||||
@ApiModelProperty(value = "所属市级编码")
|
||||
private String city;
|
||||
//所属区县名称
|
||||
@ApiModelProperty(value = "所属区县名称")
|
||||
private String countryName;
|
||||
//所属区县编码
|
||||
@ApiModelProperty(value = "所属区县编码")
|
||||
private String country;
|
||||
//所属乡镇名称
|
||||
@ApiModelProperty(value = "所属乡镇名称")
|
||||
private String villageName;
|
||||
//所属乡镇编码
|
||||
@ApiModelProperty(value = "所属乡镇编码")
|
||||
private String village;
|
||||
//所属街道名称
|
||||
@ApiModelProperty(value = "所属街道名称")
|
||||
private String streetName;
|
||||
//所属街道编码
|
||||
@ApiModelProperty(value = "所属街道编码")
|
||||
private String street;
|
||||
|
||||
//营业执照开始时间
|
||||
@ApiModelProperty(value = "营业执照开始时间")
|
||||
private LocalDate licenseStart;
|
||||
//营业执照结束时间
|
||||
@ApiModelProperty(value = "营业执照结束时间")
|
||||
private LocalDate licenseEnd;
|
||||
//有无职业卫生信息,1:是,0:否
|
||||
@ApiModelProperty(value = "有无职业卫生信息,1:是,0:否")
|
||||
private Integer whetherHygieneFlag;
|
||||
//有无重大危险源,1:是,0:否
|
||||
@ApiModelProperty(value = "有无重大危险源,1:是,0:否")
|
||||
private Integer whetherHazardsFlag;
|
||||
//是否有稀缺大型应急物资或设施,1:是,0:否
|
||||
@ApiModelProperty(value = "是否有稀缺大型应急物资或设施,1:是,0:否")
|
||||
private Integer whetherScarceFlag;
|
||||
//是否涉及危化品,1:是,0:否
|
||||
@ApiModelProperty(value = "是否涉及危化品,1:是,0:否")
|
||||
private Integer whetherChemicalsFlag;
|
||||
//有无特种设备,1:是,0:否
|
||||
@ApiModelProperty(value = "有无特种设备,1:是,0:否")
|
||||
private Integer whetherSpecialequipmentFlag;
|
||||
//有无特存种作业人员,1:是,0:否
|
||||
@ApiModelProperty(value = "有无特存种作业人员,1:是,0:否")
|
||||
private Integer whetherSpecialpeopleFlag;
|
||||
//是否涉及煤气,1:是,0:否
|
||||
@ApiModelProperty(value = "是否涉及煤气,1:是,0:否")
|
||||
private Integer whetherCoalgasFlag;
|
||||
//是否属于消防重点单位,1:是,0:否
|
||||
@ApiModelProperty(value = "是否属于消防重点单位,1:是,0:否")
|
||||
private Integer whetherFireFlag;
|
||||
//是否在有限空间作业,1:是,0:否
|
||||
@ApiModelProperty(value = "是否在有限空间作业,1:是,0:否")
|
||||
private Integer whetherConfinedFlag;
|
||||
//是否存在涉爆粉尘作业,1:是,0:否
|
||||
@ApiModelProperty(value = "是否存在涉爆粉尘作业,1:是,0:否")
|
||||
private Integer whetherPowderFlag;
|
||||
//是否涉及防雷防静电,1:是,0:否
|
||||
@ApiModelProperty(value = "是否涉及防雷防静电,1:是,0:否")
|
||||
private Integer whetherLightningFlag;
|
||||
//是否涉及危化品管道,1:是,0:否
|
||||
@ApiModelProperty(value = "是否涉及危化品管道,1:是,0:否")
|
||||
private Integer whetherPipelineFlag;
|
||||
//是否持有放射源,1:是,0:否
|
||||
@ApiModelProperty(value = "是否持有放射源,1:是,0:否")
|
||||
private Integer whetherActinogenFlag;
|
||||
//是否涉及液氨制冷,1:是,0:否
|
||||
@ApiModelProperty(value = "是否涉及液氨制冷,1:是,0:否")
|
||||
private Integer whetherLiquidammoniaFlag;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.zcloud.key.project.persistence.dataobject;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
public class CorpStatisticsDO implements Serializable {
|
||||
//企业id
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private Long corpinfoId;
|
||||
//企业名称
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String corpinfoName;
|
||||
|
||||
@ApiModelProperty(value = "重点作业总数")
|
||||
private Integer totalProjectCount;
|
||||
|
||||
@ApiModelProperty(value = "开工数量")
|
||||
private Integer startCount;
|
||||
|
||||
@ApiModelProperty(value = "完工数量")
|
||||
private Integer completeCount;
|
||||
|
||||
@ApiModelProperty(value = "检查次数")
|
||||
private Integer inspectCount;
|
||||
|
||||
@ApiModelProperty(value = "发现隐患数")
|
||||
private Integer hazardCount;
|
||||
|
||||
@ApiModelProperty(value = "固定视频监控数")
|
||||
private Integer fixedCameraCount;
|
||||
|
||||
@ApiModelProperty(value = "移动视频监控数")
|
||||
private Integer mobileCameraCount;
|
||||
|
||||
@ApiModelProperty(value = "固定摄像头idList")
|
||||
private String fixedCameraIdList;
|
||||
|
||||
@ApiModelProperty(value = "移动摄像头idList")
|
||||
private String mobileCameraIdList;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.zcloud.key.project.persistence.dataobject;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
public class KeyProjectStatisticsDO implements Serializable {
|
||||
//主键
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
//业务主键id
|
||||
@ApiModelProperty(value = "业务主键id")
|
||||
private String keyProjectId;
|
||||
//重点作业名称
|
||||
@ApiModelProperty(value = "重点作业名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty(value = "重点作业总数")
|
||||
private Integer totalProjectCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "检查次数")
|
||||
private Integer inspectCount;
|
||||
|
||||
@ApiModelProperty(value = "发现隐患数")
|
||||
private Integer hazardCount;
|
||||
|
||||
@ApiModelProperty(value = "固定视频监控数")
|
||||
private Integer fixedCameraCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "移动视频监控数")
|
||||
private Integer mobileCameraCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "固定摄像头idList")
|
||||
private String fixedCameraIdList;
|
||||
|
||||
@ApiModelProperty(value = "移动摄像头idList")
|
||||
private String mobileCameraIdList;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.zcloud.key.project.persistence.dataobject;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2026-03-16 10:00:38
|
||||
*/
|
||||
@Data
|
||||
public class XgfCorpStatisticsDO implements Serializable {
|
||||
//企业id
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private Long jurisdictionCorpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "重点作业总数")
|
||||
private Integer totalProjectCount;
|
||||
|
||||
@ApiModelProperty(value = "开工数量")
|
||||
private Integer startCount;
|
||||
|
||||
@ApiModelProperty(value = "完工数量")
|
||||
private Integer completeCount;
|
||||
|
||||
@ApiModelProperty(value = "检查次数")
|
||||
private Integer inspectCount;
|
||||
|
||||
@ApiModelProperty(value = "发现隐患数")
|
||||
private Integer hazardCount;
|
||||
|
||||
@ApiModelProperty(value = "固定视频监控数")
|
||||
private Integer fixedCameraCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "移动视频监控数")
|
||||
private Integer mobileCameraCount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "固定摄像头idList")
|
||||
private String fixedCameraIdList;
|
||||
|
||||
@ApiModelProperty(value = "移动摄像头idList")
|
||||
private String mobileCameraIdList;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.zcloud.key.project.persistence.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zcloud.key.project.persistence.dataobject.CorpInfoDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2025-10-29 16:02:16
|
||||
*/
|
||||
@Mapper
|
||||
public interface CorpInfoMapper extends BaseMapper<CorpInfoDO> {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.zcloud.key.project.persistence.repository;
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||
import com.zcloud.key.project.persistence.dataobject.CorpInfoDO;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2025-10-29 16:02:17
|
||||
*/
|
||||
public interface CorpInfoRepository extends BaseRepository<CorpInfoDO> {
|
||||
PageResponse<CorpInfoDO> listPage(Map<String, Object> parmas);
|
||||
|
||||
Long getCorpCountByCorpName(String corpName);
|
||||
|
||||
Long getTotalCount();
|
||||
|
||||
boolean isSupper();
|
||||
|
||||
Boolean checkCorp();
|
||||
boolean isXgf();
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.zcloud.key.project.persistence.repository.impl;
|
||||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import com.zcloud.gbscommon.utils.Query;
|
||||
import com.zcloud.key.project.domain.enums.CommonFlagEnum;
|
||||
import com.zcloud.key.project.domain.enums.CorpTypeEnum;
|
||||
import com.zcloud.key.project.domain.enums.UserTypeEnum;
|
||||
import com.zcloud.key.project.persistence.dataobject.CorpInfoDO;
|
||||
import com.zcloud.key.project.persistence.mapper.CorpInfoMapper;
|
||||
import com.zcloud.key.project.persistence.repository.CorpInfoRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author zhaokai
|
||||
* @Date 2025-10-29 16:02:17
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class CorpInfoRepositoryImpl extends BaseRepositoryImpl<CorpInfoMapper, CorpInfoDO> implements CorpInfoRepository {
|
||||
private final CorpInfoMapper corpInfoMapper;
|
||||
|
||||
@Override
|
||||
public PageResponse<CorpInfoDO> listPage(Map<String, Object> params) {
|
||||
IPage<CorpInfoDO> iPage = new Query<CorpInfoDO>().getPage(params);
|
||||
QueryWrapper<CorpInfoDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
|
||||
queryWrapper.orderByAsc("corp_order").orderByDesc("create_time");
|
||||
IPage<CorpInfoDO> result = corpInfoMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getCorpCountByCorpName(String corpName) {
|
||||
QueryWrapper<CorpInfoDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("corp_name", corpName);
|
||||
return corpInfoMapper.selectCount(queryWrapper);
|
||||
}
|
||||
@Override
|
||||
public Long getTotalCount() {
|
||||
QueryWrapper<CorpInfoDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("use_flag", CommonFlagEnum.YES.getCode());
|
||||
return corpInfoMapper.selectCount(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSupper() {
|
||||
//判断当前企业是否是监管端
|
||||
QueryWrapper<CorpInfoDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("corpinfo_id", AuthContext.getTenantId());
|
||||
CorpInfoDO corpInfoDO = corpInfoMapper.selectById(AuthContext.getTenantId());
|
||||
if(corpInfoDO == null)
|
||||
throw new BizException("请登录后查看");
|
||||
if(corpInfoDO.getType() == 2)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public Boolean checkCorp() {
|
||||
return AuthContext.getUserId().equals(AuthContext.getTenantId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isXgf() {
|
||||
//判断当前企业是否是相关方
|
||||
CorpInfoDO corpInfoDO = corpInfoMapper.selectById(AuthContext.getTenantId());
|
||||
if(corpInfoDO == null) {
|
||||
throw new BizException("请登录后查看");
|
||||
}
|
||||
return UserTypeEnum.XGF.getCode().equals(CorpTypeEnum.getUserTypeByCode(corpInfoDO.getType()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.key.project.persistence.mapper.CorpInfoMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue