合并代码
This commit is contained in:
@ -0,0 +1,54 @@
|
||||
package com.mosty.base.annot;
|
||||
|
||||
import com.mosty.base.annot.validation.ClbqValidation;
|
||||
|
||||
import javax.validation.Constraint;
|
||||
import javax.validation.Payload;
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 校验是否是车辆标签 注解
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2023/3/18 15:38
|
||||
* @since 2023/3/18 15:38
|
||||
*/
|
||||
@Documented
|
||||
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
|
||||
@Retention(RUNTIME)
|
||||
@Constraint(validatedBy = {ClbqValidation.class})
|
||||
public @interface IsClbq {
|
||||
|
||||
Class<?>[] groups() default {};
|
||||
Class<? extends Payload>[] payload() default {};
|
||||
|
||||
/**
|
||||
* 错误提示信息
|
||||
* @return 错误提示信息
|
||||
*/
|
||||
String message() default "dict.not.standard";
|
||||
|
||||
/**
|
||||
* 是否必填,默认为必填
|
||||
* @return 是否
|
||||
*/
|
||||
boolean isNotBlank() default true;
|
||||
|
||||
/**
|
||||
* 最大值
|
||||
* @return 最大值
|
||||
*/
|
||||
int max() default Integer.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* 最小值
|
||||
* @return 最小值
|
||||
*/
|
||||
int min() default Integer.MIN_VALUE;
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.mosty.base.annot;
|
||||
|
||||
import com.mosty.base.annot.validation.DictValidation;
|
||||
|
||||
import javax.validation.Constraint;
|
||||
import javax.validation.Payload;
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 校验是否是字典 注解
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2023/3/17 17:40
|
||||
* @since 2023/3/17 17:40
|
||||
*/
|
||||
@Documented
|
||||
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
|
||||
@Retention(RUNTIME)
|
||||
@Constraint(validatedBy = {DictValidation.class})
|
||||
public @interface IsDict {
|
||||
|
||||
Class<?>[] groups() default {};
|
||||
Class<? extends Payload>[] payload() default {};
|
||||
|
||||
/**
|
||||
* 错误提示信息
|
||||
* @return 错误提示信息
|
||||
*/
|
||||
String message() default "dict.not.standard";
|
||||
|
||||
/**
|
||||
* 字典编号
|
||||
* @return 字典编号
|
||||
*/
|
||||
String zdbh() default "";
|
||||
|
||||
/**
|
||||
* 是否必填,默认为必填
|
||||
* @return 是否
|
||||
*/
|
||||
boolean isNotBlank() default true;
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.mosty.base.annot;
|
||||
|
||||
import com.mosty.base.annot.validation.DictItemsValidation;
|
||||
|
||||
import javax.validation.Constraint;
|
||||
import javax.validation.Payload;
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 校验是否是字典(多个字典项逐一校验) 注解
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2024/07/03 15:53
|
||||
* @since 2023/07/03 15:53
|
||||
*/
|
||||
@Documented
|
||||
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
|
||||
@Retention(RUNTIME)
|
||||
@Constraint(validatedBy = {DictItemsValidation.class})
|
||||
public @interface IsDictItems {
|
||||
|
||||
Class<?>[] groups() default {};
|
||||
Class<? extends Payload>[] payload() default {};
|
||||
|
||||
/**
|
||||
* 错误提示信息
|
||||
* @return 错误提示信息
|
||||
*/
|
||||
String message() default "dict.not.standard";
|
||||
|
||||
/**
|
||||
* 字典编号
|
||||
* @return 字典编号
|
||||
*/
|
||||
String zdbh() default "";
|
||||
|
||||
/**
|
||||
* 是否必填,默认为必填
|
||||
* @return 是否
|
||||
*/
|
||||
boolean isNotBlank() default true;
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.mosty.base.annot;
|
||||
|
||||
import com.mosty.base.annot.validation.RybqValidation;
|
||||
|
||||
import javax.validation.Constraint;
|
||||
import javax.validation.Payload;
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 校验是否是人员标签 注解
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2023/3/18 14:06
|
||||
* @since 2023/3/18 14:06
|
||||
*/
|
||||
@Documented
|
||||
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
|
||||
@Retention(RUNTIME)
|
||||
@Constraint(validatedBy = {RybqValidation.class})
|
||||
public @interface IsRybq {
|
||||
|
||||
Class<?>[] groups() default {};
|
||||
Class<? extends Payload>[] payload() default {};
|
||||
|
||||
/**
|
||||
* 错误提示信息
|
||||
* @return 错误提示信息
|
||||
*/
|
||||
String message() default "dict.not.standard";
|
||||
|
||||
/**
|
||||
* 是否必填,默认为必填
|
||||
* @return 是否
|
||||
*/
|
||||
boolean isNotBlank() default true;
|
||||
|
||||
/**
|
||||
* 最大值
|
||||
* @return 最大值
|
||||
*/
|
||||
int max() default Integer.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* 最小值
|
||||
* @return 最小值
|
||||
*/
|
||||
int min() default Integer.MIN_VALUE;
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.mosty.base.annot;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* ========================
|
||||
* JWT验证忽略注解
|
||||
* Created with IntelliJ IDEA.
|
||||
* Version: v1.0
|
||||
* ========================
|
||||
*/
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface JwtIgnore {
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.mosty.base.annot.validation;
|
||||
|
||||
import com.mosty.base.annot.IsClbq;
|
||||
import com.mosty.base.utils.DictUtils;
|
||||
import com.mosty.base.utils.spring.SpringValidUtils;
|
||||
|
||||
import javax.validation.ConstraintValidator;
|
||||
import javax.validation.ConstraintValidatorContext;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 校验是否是车辆标签 实现类
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2023/3/18 15:38
|
||||
* @since 2023/3/18 15:38
|
||||
*/
|
||||
public class ClbqValidation implements ConstraintValidator<IsClbq, Object> {
|
||||
|
||||
private IsClbq annotation;
|
||||
|
||||
@Override
|
||||
public void initialize(IsClbq constraintAnnotation) {
|
||||
this.annotation = constraintAnnotation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(Object value, ConstraintValidatorContext constraintValidatorContext) {
|
||||
String valueStr = value + "";
|
||||
|
||||
//校验车辆标签长度是否合规
|
||||
boolean isSizeValidation = SpringValidUtils.annotationSizeValidation(annotation.isNotBlank(), annotation.max(), annotation.min(), valueStr);
|
||||
if(!isSizeValidation){
|
||||
return false;
|
||||
}
|
||||
|
||||
//使用字典工具类中的校验方法
|
||||
return DictUtils.isDictContainValues(DictUtils.DICT_ZDBH_D_BZ_CLBQ, valueStr);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.mosty.base.annot.validation;
|
||||
|
||||
import com.mosty.base.annot.IsDictItems;
|
||||
import com.mosty.base.utils.DictUtils;
|
||||
import com.mosty.common.base.util.StringUtils;
|
||||
|
||||
import javax.validation.ConstraintValidator;
|
||||
import javax.validation.ConstraintValidatorContext;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 校验是否是字典(多个字典项逐一校验) 实现类
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2024/07/03 15:53
|
||||
* @since 2023/07/03 15:53
|
||||
*/
|
||||
public class DictItemsValidation implements ConstraintValidator<IsDictItems, Object> {
|
||||
|
||||
private IsDictItems annotation;
|
||||
|
||||
@Override
|
||||
public void initialize(IsDictItems constraintAnnotation) {
|
||||
this.annotation = constraintAnnotation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(Object value, ConstraintValidatorContext context) {
|
||||
if(value == null || StringUtils.isBlank(value + "")){
|
||||
//如果需要校验的值为空,并且该项为必填项,则返回错误
|
||||
return !annotation.isNotBlank();
|
||||
}else{
|
||||
//使用字典工具类中的校验方法
|
||||
return DictUtils.isDictContainValues(annotation.zdbh(), value + "");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.mosty.base.annot.validation;
|
||||
|
||||
import com.mosty.base.annot.IsDict;
|
||||
import com.mosty.base.utils.DictUtils;
|
||||
import com.mosty.common.base.util.StringUtils;
|
||||
|
||||
import javax.validation.ConstraintValidator;
|
||||
import javax.validation.ConstraintValidatorContext;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 校验是否是字典 实现类
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2023/3/17 17:40
|
||||
* @since 2023/3/17 17:40
|
||||
*/
|
||||
public class DictValidation implements ConstraintValidator<IsDict, Object> {
|
||||
|
||||
private IsDict annotation;
|
||||
|
||||
@Override
|
||||
public void initialize(IsDict constraintAnnotation) {
|
||||
this.annotation = constraintAnnotation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(Object value, ConstraintValidatorContext context) {
|
||||
if(value == null || StringUtils.isBlank(value + "")){
|
||||
//如果需要校验的值为空,并且该项为必填项,则返回错误
|
||||
return !annotation.isNotBlank();
|
||||
}else{
|
||||
//使用字典工具类中的校验方法
|
||||
return DictUtils.isDictContainValue(annotation.zdbh(), value + "");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.mosty.base.annot.validation;
|
||||
|
||||
import com.mosty.base.annot.IsRybq;
|
||||
import com.mosty.base.utils.DictUtils;
|
||||
import com.mosty.base.utils.spring.SpringValidUtils;
|
||||
|
||||
import javax.validation.ConstraintValidator;
|
||||
import javax.validation.ConstraintValidatorContext;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 校验是否是人员标签 实现类
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2023/3/18 14:07
|
||||
* @since 2023/3/18 14:07
|
||||
*/
|
||||
public class RybqValidation implements ConstraintValidator<IsRybq, Object> {
|
||||
|
||||
private IsRybq annotation;
|
||||
|
||||
@Override
|
||||
public void initialize(IsRybq constraintAnnotation) {
|
||||
this.annotation = constraintAnnotation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(Object value, ConstraintValidatorContext constraintValidatorContext) {
|
||||
String valueStr = value + "";
|
||||
|
||||
//校验人员标签长度是否合规
|
||||
boolean isSizeValidation = SpringValidUtils.annotationSizeValidation(annotation.isNotBlank(), annotation.max(), annotation.min(), valueStr);
|
||||
if(!isSizeValidation){
|
||||
return false;
|
||||
}
|
||||
|
||||
//使用字典工具类中的校验方法
|
||||
return DictUtils.isDictContainValues(DictUtils.DICT_ZDBH_D_BZ_RYBQ, value + "");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.mosty.base.model.dto.yjzl;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 指导巡逻方格点位表修改DTO对象
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2025/05/15 22:39
|
||||
* @since 2025/05/15 22:39
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "TbZdxlFgdwUpdateDTO对象", description = "指导巡逻方格点位表修改DTO对象")
|
||||
public class TbZdxlFgdwUpdateDTO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ApiModelProperty(value = "主键id", required = true)
|
||||
@NotBlank(message = "id.bnwk")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String mc;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@ApiModelProperty(value = "地址")
|
||||
private String dz;
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.mosty.base.model.dto.yjzl;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 指导巡逻方格巡逻任务表创建DTO对象
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2025/05/12 22:59
|
||||
* @since 2025/05/12 22:59
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "TbZdxlFgxlrwCreateDTO对象", description = "指导巡逻方格巡逻任务表创建DTO对象")
|
||||
public class TbZdxlFgxlrwCreateDTO {
|
||||
|
||||
/**
|
||||
* 任务日期
|
||||
*/
|
||||
@ApiModelProperty(value = "任务日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@NotNull(message = "zdxl.fgxlrw.rwRq.notNull")
|
||||
private Date rwRq;
|
||||
|
||||
/**
|
||||
* 任务计算开始日期
|
||||
*/
|
||||
@ApiModelProperty(value = "任务计算开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date rwJsKsrq;
|
||||
|
||||
/**
|
||||
* 任务计算结束日期
|
||||
*/
|
||||
@ApiModelProperty(value = "任务计算结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date rwJsJsrq;
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.mosty.base.model.dto.yjzl;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 指导巡逻方格巡逻任务表导出DTO对象
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2025/05/13 10:52
|
||||
* @since 2025/05/13 10:52
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "TbZdxlFgxlrwExportDTO对象", description = "指导巡逻方格巡逻任务表导出DTO对象")
|
||||
public class TbZdxlFgxlrwExportDTO {
|
||||
|
||||
/**
|
||||
* 任务日期
|
||||
*/
|
||||
@ApiModelProperty(value = "任务日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@NotNull(message = "zdxl.fgxlrw.rwRq.notNull")
|
||||
private Date rwRq;
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.mosty.base.model.dto.yjzl;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 指导巡逻方格巡逻任务表警情配置修改DTO对象
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2025/08/26 17:16
|
||||
* @since 2025/08/26 17:16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "TbZdxlFgxlrwJqpzUpdateDTO对象", description = "指导巡逻方格巡逻任务表警情配置修改DTO对象")
|
||||
public class TbZdxlFgxlrwJqpzUpdateDTO {
|
||||
|
||||
/**
|
||||
* 报警细类
|
||||
*/
|
||||
@ApiModelProperty(value = "报警细类")
|
||||
@NotBlank(message = "zdxl.fgxlrw.jqpz.bjxl.notBlank")
|
||||
@Size(max = 1000, message = "zdxl.fgxlrw.jqpz.bjxl.size")
|
||||
private String bjxl;
|
||||
|
||||
/**
|
||||
* 报警细类说明
|
||||
*/
|
||||
@Size(max = 200, message = "zdxl.fgxlrw.jqpz.bjxlSm.size")
|
||||
private String bjxlSm;
|
||||
|
||||
/**
|
||||
* 报警子类
|
||||
*/
|
||||
@ApiModelProperty(value = "报警子类")
|
||||
@NotBlank(message = "zdxl.fgxlrw.jqpz.bjzl.notBlank")
|
||||
@Size(max = 1000, message = "zdxl.fgxlrw.jqpz.bjzl.size")
|
||||
private String bjzl;
|
||||
|
||||
/**
|
||||
* 报警子类说明
|
||||
*/
|
||||
@Size(max = 200, message = "zdxl.fgxlrw.jqpz.bjzlSm.size")
|
||||
private String bjzlSm;
|
||||
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.mosty.base.model.dto.yjzl;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mosty.base.annot.IsDict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 指导巡逻方格巡逻任务表修改DTO对象
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2025/05/13 16:49
|
||||
* @since 2025/05/13 16:49
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "TbZdxlFgxlrwUpdateDTO对象", description = "指导巡逻方格巡逻任务表修改DTO对象")
|
||||
public class TbZdxlFgxlrwUpdateDTO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ApiModelProperty(value = "主键id", required = true)
|
||||
@NotBlank(message = "id.bnwk")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 方格预警等级 D_ZDXL_FGXLRW_YJDJ
|
||||
*/
|
||||
@ApiModelProperty(value = "方格预警等级 D_ZDXL_FGXLRW_YJDJ")
|
||||
@IsDict(zdbh = "D_ZDXL_FGXLRW_YJDJ", message = "zdxl.fgxlrw.rwRq.fgYjdj.isDict")
|
||||
private String fgYjdj;
|
||||
|
||||
/**
|
||||
* 方格预警颜色 D_ZDXL_FGXLRW_YJYS
|
||||
*/
|
||||
@ApiModelProperty(value = "方格预警颜色 D_ZDXL_FGXLRW_YJYS")
|
||||
@IsDict(zdbh = "D_ZDXL_FGXLRW_YJYS", message = "zdxl.fgxlrw.rwRq.fgYjys.isDict")
|
||||
private String fgYjys;
|
||||
|
||||
/**
|
||||
* 巡逻规划时长(分钟)
|
||||
*/
|
||||
@ApiModelProperty(value = "巡逻规划时长(分钟)")
|
||||
@NotNull(message = "zdxl.fgxlrw.rwRq.xlghSc.notNull")
|
||||
private Double xlghSc;
|
||||
|
||||
/**
|
||||
* 巡逻规划开始时间
|
||||
*/
|
||||
@ApiModelProperty(value = "巡逻规划开始时间")
|
||||
@JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@NotNull(message = "zdxl.fgxlrw.rwRq.xlghSjKs.notNull")
|
||||
private Date xlghSjKs;
|
||||
|
||||
/**
|
||||
* 巡逻规划结束时间
|
||||
*/
|
||||
@ApiModelProperty(value = "巡逻规划结束时间")
|
||||
@JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@NotNull(message = "zdxl.fgxlrw.rwRq.xlghSjJs.notNull")
|
||||
private Date xlghSjJs;
|
||||
|
||||
/**
|
||||
* 巡逻规划巡逻里程(公里)
|
||||
*/
|
||||
@ApiModelProperty(value = "巡逻规划巡逻里程(公里)")
|
||||
@NotNull(message = "zdxl.fgxlrw.rwRq.xlghXllc.notNull")
|
||||
private Double xlghXllc;
|
||||
|
||||
}
|
@ -0,0 +1,299 @@
|
||||
package com.mosty.base.model.entity.yjzl.zddw;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mosty.base.model.BaseEntity;
|
||||
import com.mosty.common.base.entity.log.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 指导巡逻方格点位表
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2025/05/15 21:52
|
||||
* @since 2025/05/15 21:52
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("tb_zdxl_fgdw")
|
||||
@ApiModel(value = "TbZdxlFgdw对象", description = "指导巡逻方格点位表")
|
||||
public class TbZdxlFgdw extends BaseEntity implements Serializable, Cloneable {
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@Excel(name = "主键ID", sort = 1)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
@TableField(value = "mc1")
|
||||
private String mc1;
|
||||
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
@ApiModelProperty(value = "开始日期")
|
||||
@TableField(value = "ksrq")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date ksrq;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
@ApiModelProperty(value = "结束日期")
|
||||
@TableField(value = "jsrq")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date jsrq;
|
||||
|
||||
/**
|
||||
* 网格坐标X1
|
||||
*/
|
||||
@ApiModelProperty(value = "网格坐标X1")
|
||||
@TableField(value = "x11")
|
||||
private BigDecimal x11;
|
||||
|
||||
/**
|
||||
* 网格坐标Y1
|
||||
*/
|
||||
@ApiModelProperty(value = "网格坐标Y1")
|
||||
@TableField(value = "y11")
|
||||
private BigDecimal y11;
|
||||
|
||||
/**
|
||||
* 网格坐标X2
|
||||
*/
|
||||
@ApiModelProperty(value = "网格坐标X2")
|
||||
@TableField(value = "x21")
|
||||
private BigDecimal x21;
|
||||
|
||||
/**
|
||||
* 网格坐标Y2
|
||||
*/
|
||||
@ApiModelProperty(value = "网格坐标Y2")
|
||||
@TableField(value = "y21")
|
||||
private BigDecimal y21;
|
||||
|
||||
/**
|
||||
* 中心X
|
||||
*/
|
||||
@ApiModelProperty(value = "中心X")
|
||||
@TableField(value = "zx_x")
|
||||
private BigDecimal zxX;
|
||||
|
||||
/**
|
||||
* 中心Y
|
||||
*/
|
||||
@ApiModelProperty(value = "中心Y")
|
||||
@TableField(value = "zx_y")
|
||||
private BigDecimal zxY;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@ApiModelProperty(value = "地址")
|
||||
@TableField(value = "dz")
|
||||
private String dz;
|
||||
|
||||
/**
|
||||
* 下发时段
|
||||
*/
|
||||
@ApiModelProperty(value = "下发时段")
|
||||
@TableField(value = "xfsd")
|
||||
private String xfsd;
|
||||
|
||||
/**
|
||||
* 网格大小
|
||||
*/
|
||||
@ApiModelProperty(value = "网格大小")
|
||||
@TableField(value = "grid_type")
|
||||
private String gridType;
|
||||
|
||||
/**
|
||||
* 所属部门id
|
||||
*/
|
||||
@ApiModelProperty(value = "所属部门id")
|
||||
private String ssbmid;
|
||||
|
||||
/**
|
||||
* 报备部门
|
||||
*/
|
||||
@ApiModelProperty(value = "报备部门")
|
||||
private String ssbm;
|
||||
|
||||
/**
|
||||
* 报备部门代码
|
||||
*/
|
||||
@ApiModelProperty(value = "报备部门代码")
|
||||
private String ssbmdm;
|
||||
|
||||
/**
|
||||
* 所属县公安局
|
||||
*/
|
||||
@ApiModelProperty(value = "所属县公安局")
|
||||
private String ssxgaj;
|
||||
|
||||
/**
|
||||
* 所属县公安局id
|
||||
*/
|
||||
@ApiModelProperty(value = "所属县公安局id")
|
||||
private String ssxgajid;
|
||||
|
||||
/**
|
||||
* 所属县公安局代码
|
||||
*/
|
||||
@ApiModelProperty(value = "所属县公安局代码")
|
||||
private String ssxgajdm;
|
||||
|
||||
/**
|
||||
* 所属市公安局id
|
||||
*/
|
||||
@ApiModelProperty(value = "所属市公安局id")
|
||||
private String sssgajid;
|
||||
|
||||
/**
|
||||
* 所属市公安局
|
||||
*/
|
||||
@ApiModelProperty(value = "所属市公安局")
|
||||
private String sssgaj;
|
||||
|
||||
/**
|
||||
* 所属市公安局代码
|
||||
*/
|
||||
@ApiModelProperty(value = "所属市公安局代码")
|
||||
private String sssgajdm;
|
||||
|
||||
|
||||
/**
|
||||
* 主键ID字段名
|
||||
*/
|
||||
public static String ID_FIELD = "id";
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
public static String MC = "mc";
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
public static String KSRQ = "ksrq";
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
public static String JSRQ = "jsrq";
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
public static String X1 = "x1";
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
public static String Y1 = "y1";
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
public static String X2 = "x2";
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
public static String Y2 = "y2";
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
public static String ZX_X = "zx_x";
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
public static String ZX_Y = "zx_y";
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
public static String DZ = "dz";
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
public static String XFSD = "xfsd";
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*/
|
||||
public static String GRID_TYPE = "grid_type";
|
||||
|
||||
/**
|
||||
* 所属部门id
|
||||
*/
|
||||
public static String SSBMID_TYPE = "ssbmid";
|
||||
|
||||
/**
|
||||
* 报备部门
|
||||
*/
|
||||
public static String SSBM_TYPE = "ssbm";
|
||||
|
||||
/**
|
||||
* 报备部门代码
|
||||
*/
|
||||
public static String SSBMDM_TYPE = "ssbmdm";
|
||||
|
||||
/**
|
||||
* 所属县公安局
|
||||
*/
|
||||
public static String SSXGAJ_TYPE = "ssxgaj";
|
||||
|
||||
/**
|
||||
* 所属县公安局id
|
||||
*/
|
||||
public static String SSXGAJID_TYPE = "ssxgajid";
|
||||
|
||||
/**
|
||||
* 所属县公安局代码
|
||||
*/
|
||||
public static String SSXGAJDM_TYPE = "ssxgajdm";
|
||||
|
||||
/**
|
||||
* 所属市公安局id
|
||||
*/
|
||||
public static String SSSGAJID_TYPE = "sssgajid";
|
||||
|
||||
/**
|
||||
* 所属市公安局
|
||||
*/
|
||||
public static String SSSGAJ_TYPE = "sssgaj";
|
||||
|
||||
/**
|
||||
* 所属市公安局代码
|
||||
*/
|
||||
public static String SSSGAJDM_TYPE = "sssgajdm";
|
||||
|
||||
}
|
@ -0,0 +1,306 @@
|
||||
package com.mosty.base.model.entity.yjzl.zddw;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mosty.base.model.BaseEntity;
|
||||
import com.mosty.common.base.entity.log.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 指导巡逻方格巡逻任务表
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2025/05/10 19:33
|
||||
* @since 2025/05/10 19:33
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("tb_zdxl_fgxlrw")
|
||||
@ApiModel(value = "TbZdxlFgxlrw对象", description = "指导巡逻方格巡逻任务表")
|
||||
public class TbZdxlFgxlrw extends BaseEntity implements Serializable, Cloneable {
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@Excel(name = "主键ID", sort = 1)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 方格ID
|
||||
*/
|
||||
@ApiModelProperty(value = "方格ID")
|
||||
@TableField(value = "fg_id")
|
||||
@Excel(name = "方格ID", sort = 2, cellType = Excel.ColumnType.NUMERIC)
|
||||
private Integer fgId;
|
||||
|
||||
/**
|
||||
* 方格排序
|
||||
*/
|
||||
@ApiModelProperty(value = "方格排序")
|
||||
@TableField(value = "fg_px")
|
||||
@Excel(name = "方格排序", sort = 3, cellType = Excel.ColumnType.NUMERIC)
|
||||
private Integer fgPx;
|
||||
|
||||
/**
|
||||
* 方格预警等级 D_ZDXL_FGXLRW_YJDJ
|
||||
*/
|
||||
@ApiModelProperty(value = "方格预警等级 D_ZDXL_FGXLRW_YJDJ")
|
||||
@TableField(value = "fg_yjdj")
|
||||
@Excel(name = "方格预警等级", sort = 4)
|
||||
private String fgYjdj;
|
||||
|
||||
/**
|
||||
* 方格预警颜色 D_ZDXL_FGXLRW_YJYS
|
||||
*/
|
||||
@ApiModelProperty(value = "方格预警颜色 D_ZDXL_FGXLRW_YJYS")
|
||||
@TableField(value = "fg_yjys")
|
||||
@Excel(name = "方格预警颜色", sort = 5)
|
||||
private String fgYjys;
|
||||
|
||||
/**
|
||||
* 方格预警警情数量
|
||||
*/
|
||||
@ApiModelProperty(value = "方格预警警情数量")
|
||||
@TableField(value = "fg_yjjqsl")
|
||||
@Excel(name = "方格预警警情数量", sort = 6, cellType = Excel.ColumnType.NUMERIC)
|
||||
private Integer fgYjjqsl;
|
||||
|
||||
/**
|
||||
* 方格预警高发时段
|
||||
*/
|
||||
@ApiModelProperty(value = "方格预警高发时段")
|
||||
@TableField(value = "fg_yjgfsd")
|
||||
@Excel(name = "方格预警高发时段", sort = 7)
|
||||
private String fgYjgfsd;
|
||||
|
||||
/**
|
||||
* 方格预警高发警情
|
||||
*/
|
||||
@ApiModelProperty(value = "方格预警高发警情")
|
||||
@TableField(value = "fg_gfjq")
|
||||
@Excel(name = "方格预警高发警情", sort = 8)
|
||||
private String fgGfjq;
|
||||
|
||||
/**
|
||||
* 方格警情小时统计
|
||||
*/
|
||||
@ApiModelProperty(value = "方格警情小时统计")
|
||||
@TableField(value = "fg_jqtj_xs")
|
||||
@Excel(name = "方格警情小时统计", sort = 9)
|
||||
private String fgJqtjXs;
|
||||
|
||||
/**
|
||||
* 方格警情类型统计
|
||||
*/
|
||||
@ApiModelProperty(value = "方格警情类型统计")
|
||||
@TableField(value = "fg_jqtj_lx")
|
||||
@Excel(name = "方格警情类型统计", sort = 10)
|
||||
private String fgJqtjLx;
|
||||
|
||||
/**
|
||||
* 任务日期
|
||||
*/
|
||||
@ApiModelProperty(value = "任务日期")
|
||||
@TableField(value = "rw_rq")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "任务日期", sort = 11, dateFormat = "yyyy-MM-dd")
|
||||
private Date rwRq;
|
||||
|
||||
/**
|
||||
* 任务状态 D_ZDXL_FGXLRW_RWZT
|
||||
*/
|
||||
@ApiModelProperty(value = "任务状态 D_ZDXL_FGXLRW_RWZT")
|
||||
@TableField(value = "rw_zt")
|
||||
@Excel(name = "任务状态", sort = 12)
|
||||
private String rwZt;
|
||||
|
||||
/**
|
||||
* 巡逻规划时长(分钟)
|
||||
*/
|
||||
@ApiModelProperty(value = "巡逻规划时长(分钟)")
|
||||
@TableField(value = "xlgh_sc")
|
||||
@Excel(name = "巡逻规划时长(分钟)", sort = 13, cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double xlghSc;
|
||||
|
||||
/**
|
||||
* 巡逻规划开始时间
|
||||
*/
|
||||
@ApiModelProperty(value = "巡逻规划开始时间")
|
||||
@TableField(value = "xlgh_sj_ks")
|
||||
@JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@Excel(name = "巡逻规划开始时间", sort = 14, dateFormat = "HH:mm:ss")
|
||||
private Date xlghSjKs;
|
||||
|
||||
/**
|
||||
* 巡逻规划结束时间
|
||||
*/
|
||||
@ApiModelProperty(value = "巡逻规划结束时间")
|
||||
@TableField(value = "xlgh_sj_js")
|
||||
@JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "HH:mm:ss")
|
||||
@Excel(name = "巡逻规划开始时间", sort = 15, dateFormat = "HH:mm:ss")
|
||||
private Date xlghSjJs;
|
||||
|
||||
/**
|
||||
* 巡逻规划巡逻里程(公里)
|
||||
*/
|
||||
@ApiModelProperty(value = "巡逻规划巡逻里程(公里)")
|
||||
@TableField(value = "xlgh_xllc")
|
||||
@Excel(name = "巡逻规划巡逻里程(公里)", sort = 16, cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double xlghXllc;
|
||||
|
||||
/**
|
||||
* 巡逻实际时长(分钟)
|
||||
*/
|
||||
@ApiModelProperty(value = "巡逻实际时长(分钟)")
|
||||
@TableField(value = "xlsj_sc")
|
||||
@Excel(name = "巡逻实际时长(分钟)", sort = 17, cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double xlsjSc;
|
||||
|
||||
/**
|
||||
* 巡逻实际开始时间
|
||||
*/
|
||||
@ApiModelProperty(value = "巡逻实际开始时间")
|
||||
@TableField(value = "xlsj_sj_ks")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "巡逻实际开始时间", sort = 18, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date xlsjSjKs;
|
||||
|
||||
/**
|
||||
* 巡逻实际结束时间
|
||||
*/
|
||||
@ApiModelProperty(value = "巡逻实际结束时间")
|
||||
@TableField(value = "xlsj_sj_js")
|
||||
@Excel(name = "巡逻实际结束时间", sort = 19, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date xlsjSjJs;
|
||||
|
||||
/**
|
||||
* 巡逻实际巡逻里程(公里)
|
||||
*/
|
||||
@ApiModelProperty(value = "巡逻实际巡逻里程(公里)")
|
||||
@TableField(value = "xlsj_xllc")
|
||||
@Excel(name = "巡逻实际巡逻里程(公里)", sort = 20, cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double xlsjXllc;
|
||||
|
||||
|
||||
/**
|
||||
* 主键ID字段名
|
||||
*/
|
||||
public static String ID_FIELD = "id";
|
||||
|
||||
/**
|
||||
* 方格ID字段名
|
||||
*/
|
||||
public static String FG_ID_FIELD = "fg_id";
|
||||
|
||||
/**
|
||||
* 方格排序字段名
|
||||
*/
|
||||
public static String FG_PX_FIELD = "fg_px";
|
||||
|
||||
/**
|
||||
* 方格预警等级字段名
|
||||
*/
|
||||
public static String FG_YJDJ_FIELD = "fg_yjdj";
|
||||
|
||||
/**
|
||||
* 方格预警颜色字段名
|
||||
*/
|
||||
public static String FG_YJYS_FIELD = "fg_yjys";
|
||||
|
||||
/**
|
||||
* 方格预警警情数量字段名
|
||||
*/
|
||||
public static String FG_YJJQSL_FIELD = "fg_yjjqsl";
|
||||
|
||||
/**
|
||||
* 方格预警高发时段字段名
|
||||
*/
|
||||
public static String FG_YJGFSD_FIELD = "fg_yjgfsd";
|
||||
|
||||
/**
|
||||
* 方格预警高发警情字段名
|
||||
*/
|
||||
public static String FG_GFJQ_FIELD = "fg_gfjq";
|
||||
|
||||
/**
|
||||
* 方格警情小时统计字段名
|
||||
*/
|
||||
public static String FG_JQTJ_XS_FIELD = "fg_jqtj_xs";
|
||||
|
||||
/**
|
||||
* 方格警情类型统计字段名
|
||||
*/
|
||||
public static String FG_JQTJ_LX_FIELD = "fg_jqtj_lx";
|
||||
|
||||
/**
|
||||
* 任务日期字段名
|
||||
*/
|
||||
public static String RW_RQ_FIELD = "rw_rq";
|
||||
|
||||
/**
|
||||
* 任务状态字段名
|
||||
*/
|
||||
public static String RW_ZT_FIELD = "rw_zt";
|
||||
|
||||
/**
|
||||
* 巡逻规划时长字段名
|
||||
*/
|
||||
public static String XLGH_SC_FIELD = "xlgh_sc";
|
||||
|
||||
/**
|
||||
* 巡逻规划开始时间字段名
|
||||
*/
|
||||
public static String XLGH_SJ_KS_FIELD = "xlgh_sj_ks";
|
||||
|
||||
/**
|
||||
* 巡逻规划结束时间字段名
|
||||
*/
|
||||
public static String XLGH_SJ_JS_FIELD = "xlgh_sj_js";
|
||||
|
||||
/**
|
||||
* 巡逻规划巡逻里程字段名
|
||||
*/
|
||||
public static String XLGH_XLLC_FIELD = "xlgh_xllc";
|
||||
|
||||
/**
|
||||
* 巡逻实际时长字段名
|
||||
*/
|
||||
public static String XLSJ_SC_FIELD = "xlsj_sc";
|
||||
|
||||
/**
|
||||
* 巡逻实际开始时间字段名
|
||||
*/
|
||||
public static String XLSJ_SJ_KS_FIELD = "xlsj_sj_ks";
|
||||
|
||||
/**
|
||||
* 巡逻实际结束时间字段名
|
||||
*/
|
||||
public static String XLSJ_SJ_JS_FIELD = "xlsj_sj_js";
|
||||
|
||||
/**
|
||||
* 巡逻实际巡逻里程字段名
|
||||
*/
|
||||
public static String XLSJ_XLLC_FIELD = "xlsj_xllc";
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.mosty.base.model.query.yjzl;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mosty.base.model.BasePage;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 指导巡逻方格巡逻任务查询对象
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2025/05/12 22:06
|
||||
* @since 2025/05/12 22:06
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "TbZdxlFgxlrwQuery对象", description = "指导巡逻方格巡逻任务查询对象")
|
||||
public class TbZdxlFgxlrwQuery extends BasePage {
|
||||
|
||||
/**
|
||||
* 方格ID
|
||||
*/
|
||||
@ApiModelProperty(value = "方格ID")
|
||||
@TableField(value = "fg_id")
|
||||
private Integer fgId;
|
||||
|
||||
/**
|
||||
* 任务日期
|
||||
*/
|
||||
@ApiModelProperty(value = "任务日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date rwRq;
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.mosty.base.model.vo.yjzl;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.mosty.base.model.entity.yjzl.zddw.TbZdxlFgdw;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 指导巡逻方格点位表返回对象
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2025/06/11 18:56
|
||||
* @since 2025/06/11 18:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "TbZdxlFgxlrwVO对象", description = "指导巡逻方格点位表返回对象")
|
||||
public class TbZdxlFgdwVO extends TbZdxlFgdw {
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String mc;
|
||||
|
||||
/**
|
||||
* 网格坐标X1
|
||||
*/
|
||||
@ApiModelProperty(value = "网格坐标X1")
|
||||
@TableField(value = "x1")
|
||||
private BigDecimal x1;
|
||||
|
||||
/**
|
||||
* 网格坐标Y1
|
||||
*/
|
||||
@ApiModelProperty(value = "网格坐标Y1")
|
||||
@TableField(value = "y1")
|
||||
private BigDecimal y1;
|
||||
|
||||
/**
|
||||
* 网格坐标X2
|
||||
*/
|
||||
@ApiModelProperty(value = "网格坐标X2")
|
||||
@TableField(value = "x2")
|
||||
private BigDecimal x2;
|
||||
|
||||
/**
|
||||
* 网格坐标Y2
|
||||
*/
|
||||
@ApiModelProperty(value = "网格坐标Y2")
|
||||
@TableField(value = "y2")
|
||||
private BigDecimal y2;
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.mosty.base.model.vo.yjzl;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 指导巡逻方格巡逻任务警情分类返回对象
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2025/09/02 15:26
|
||||
* @since 2025/09/02 15:26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "TbZdxlFgxlrwJqflVO对象", description = "指导巡逻方格巡逻任务警情分类返回对象")
|
||||
public class TbZdxlFgxlrwJqflVO {
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 代码
|
||||
*/
|
||||
@ApiModelProperty(value = "代码")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 下级列表
|
||||
*/
|
||||
@ApiModelProperty(value = "下级列表")
|
||||
private List<TbZdxlFgxlrwJqflVO> childList;
|
||||
|
||||
public TbZdxlFgxlrwJqflVO(){
|
||||
|
||||
}
|
||||
|
||||
public TbZdxlFgxlrwJqflVO(String name, String code){
|
||||
this.name = name;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.mosty.base.model.vo.yjzl;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 指导巡逻方格巡逻任务警情配置返回对象
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2025/08/26 17:34
|
||||
* @since 2025/08/26 17:34
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "TbZdxlFgxlrwJqpzVO对象", description = "指导巡逻方格巡逻任务警情配置返回对象")
|
||||
public class TbZdxlFgxlrwJqpzVO {
|
||||
|
||||
/**
|
||||
* 报警细类
|
||||
*/
|
||||
@ApiModelProperty(value = "报警细类")
|
||||
private String bjxl;
|
||||
|
||||
/**
|
||||
* 报警子类
|
||||
*/
|
||||
@ApiModelProperty(value = "报警子类")
|
||||
private String bjzl;
|
||||
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package com.mosty.base.model.vo.yjzl;
|
||||
|
||||
import com.mosty.base.model.entity.yjzl.zddw.TbZdxlFgxlrw;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 指导巡逻方格巡逻任务返回对象
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2025/05/12 22:01
|
||||
* @since 2025/05/12 22:01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "TbZdxlFgxlrwVO对象", description = "指导巡逻方格巡逻任务返回对象")
|
||||
public class TbZdxlFgxlrwVO extends TbZdxlFgxlrw {
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String mc;
|
||||
|
||||
/**
|
||||
* 网格坐标X1
|
||||
*/
|
||||
@ApiModelProperty(value = "网格坐标X1")
|
||||
private BigDecimal x1;
|
||||
|
||||
/**
|
||||
* 网格坐标Y1
|
||||
*/
|
||||
@ApiModelProperty(value = "网格坐标Y1")
|
||||
private BigDecimal y1;
|
||||
|
||||
/**
|
||||
* 网格坐标X2
|
||||
*/
|
||||
@ApiModelProperty(value = "网格坐标X2")
|
||||
private BigDecimal x2;
|
||||
|
||||
/**
|
||||
* 网格坐标Y2
|
||||
*/
|
||||
@ApiModelProperty(value = "网格坐标Y2")
|
||||
private BigDecimal y2;
|
||||
|
||||
/**
|
||||
* 中心X
|
||||
*/
|
||||
@ApiModelProperty(value = "中心X")
|
||||
private BigDecimal zxX;
|
||||
|
||||
/**
|
||||
* 中心Y
|
||||
*/
|
||||
@ApiModelProperty(value = "中心Y")
|
||||
private BigDecimal zxY;
|
||||
|
||||
}
|
@ -115,6 +115,16 @@ public class Constant {
|
||||
//设备
|
||||
public static final String PGIS_SB = "PGIS_SB:";
|
||||
|
||||
/**
|
||||
* 分隔符-下划线
|
||||
*/
|
||||
public static final String SEPARATOR_UNDERLINE = "_";
|
||||
|
||||
/**
|
||||
* 分隔符-英语逗号
|
||||
*/
|
||||
public static final String SEPARATOR_ENGLISH_COMMA = ",";
|
||||
|
||||
/**
|
||||
* 字典项-是否-是
|
||||
*/
|
||||
|
@ -0,0 +1,251 @@
|
||||
package com.mosty.base.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.feign.service.MostyBaseFeignService;
|
||||
import com.mosty.common.base.constant.Constants;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.SpringUtils;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import com.mosty.common.base.util.StringUtils;
|
||||
import com.mosty.common.config.entity.SysDictItem;
|
||||
import com.mosty.common.config.entity.vo.SysDictItemVO;
|
||||
import com.mosty.common.config.entity.vo.SysDictVO;
|
||||
import com.mosty.common.redis.service.RedisService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangzhao
|
||||
* @description 字典工具类
|
||||
* @modifier zhangzhao
|
||||
* @modifiedTime 2023/3/17 17:40
|
||||
* @since 2023/3/17 17:40
|
||||
*/
|
||||
public class DictUtils {
|
||||
|
||||
/**
|
||||
* 字典编号-人员标签
|
||||
*/
|
||||
public static final String DICT_ZDBH_D_BZ_RYBQ = "D_BZ_RYBQ";
|
||||
|
||||
/**
|
||||
* 字典编号-车辆标签
|
||||
*/
|
||||
public static final String DICT_ZDBH_D_BZ_CLBQ = "D_BZ_CLBQ";
|
||||
|
||||
/**
|
||||
* 公共FeignService
|
||||
*/
|
||||
private static MostyBaseFeignService mostyBaseFeignService;
|
||||
|
||||
/**
|
||||
* 获取FeignService
|
||||
* @return 返回FeignService
|
||||
*/
|
||||
private static MostyBaseFeignService getBaseFeignService(){
|
||||
if(mostyBaseFeignService == null){
|
||||
DictUtils.mostyBaseFeignService = SpringUtils.getBean(MostyBaseFeignService.class);
|
||||
}
|
||||
return DictUtils.mostyBaseFeignService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置字典缓存
|
||||
*
|
||||
* @param key 参数键
|
||||
* @param dictDatas 字典数据列表
|
||||
*/
|
||||
public static void setDictCache(String key, List<SysDictItem> dictDatas)
|
||||
{
|
||||
SpringUtils.getBean(RedisService.class).setCacheObject(getCacheKey(key), dictDatas);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置cache key
|
||||
*
|
||||
* @param configKey 参数键
|
||||
* @return 缓存键key
|
||||
*/
|
||||
public static String getCacheKey(String configKey)
|
||||
{
|
||||
return Constants.SYS_DICT_KEY + configKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典信息
|
||||
* @param zdbh 字典编号
|
||||
* @return 字典信息
|
||||
*/
|
||||
public static SysDictVO getSysDict(String zdbh){
|
||||
ResponseResult<SysDictVO> responseResult = DictUtils.getBaseFeignService().getSysDictByCode(zdbh);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
System.out.println("获取查询条件异常 responseResult = " + JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("字典服务调用异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典项列表
|
||||
* @param zdbh 字典编号
|
||||
* @return 字典项列表
|
||||
*/
|
||||
public static List<SysDictItemVO> getDictItemList(String zdbh){
|
||||
SysDictVO sysDictVO = DictUtils.getSysDict(zdbh);
|
||||
if(sysDictVO == null || CollectionUtils.isEmpty(sysDictVO.getItemList())){
|
||||
return null;
|
||||
}
|
||||
return sysDictVO.getItemList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断该字典代码是否在字典项中
|
||||
* @param zdbh 字典编号
|
||||
* @param dm 字典代码
|
||||
* @return 是否在该字典项中
|
||||
*/
|
||||
public static boolean isDictContainValue(String zdbh, String dm){
|
||||
//如果字典编号和字典代码有一项为空,则返回错误
|
||||
if(StringUtils.isBlank(zdbh) || StringUtils.isBlank(dm)){
|
||||
return false;
|
||||
}
|
||||
|
||||
List<SysDictItemVO> sysDictItemList = DictUtils.getDictItemList(zdbh);
|
||||
|
||||
//如果未查询到该字典,返回错误
|
||||
if(sysDictItemList == null || sysDictItemList.isEmpty()){
|
||||
return false;
|
||||
}
|
||||
|
||||
//循环字典项数据,如果存在该数据,则返回正确
|
||||
for(SysDictItemVO sysDictItemVO : sysDictItemList){
|
||||
if (Objects.equals(dm, sysDictItemVO.getDm())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断该字典代码是否在字典项中(多个代码判断,有一个不正确就返回错误)
|
||||
* @param zdbh 字典编号
|
||||
* @param dm 字典代码
|
||||
* @return 是否在该字典项中(有一个不在就返回错误)
|
||||
*/
|
||||
public static boolean isDictContainValues(String zdbh, String dm){
|
||||
//如果字典编号和字典代码有一项为空,则返回错误
|
||||
if(StringUtils.isBlank(zdbh) || StringUtils.isBlank(dm)){
|
||||
return false;
|
||||
}
|
||||
|
||||
List<SysDictItemVO> sysDictItemList = DictUtils.getDictItemList(zdbh);
|
||||
|
||||
//如果未查询到该字典,返回错误
|
||||
if(sysDictItemList == null || sysDictItemList.isEmpty()){
|
||||
return false;
|
||||
}
|
||||
|
||||
String[] dmArray = dm.split(",");
|
||||
for(String dmItem : dmArray){
|
||||
//如果有字典代码为空,直接返回错误
|
||||
if(StringUtils.isBlank(dmItem)){
|
||||
return false;
|
||||
}
|
||||
//此代码是否在字典之中
|
||||
boolean isThisDmInDict = false;
|
||||
//循环字典项列表判断代码是否在字典项中
|
||||
for(SysDictItemVO sysDictItemVO : sysDictItemList){
|
||||
if(Objects.equals(dmItem, sysDictItemVO.getDm())){
|
||||
isThisDmInDict = true;
|
||||
}
|
||||
}
|
||||
//经过循环后,isDmInDict依然为false,表示代码不在字典项列表中,直接返回
|
||||
if(!isThisDmInDict){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//经过所有循环后,到这一步,表示传入的代码都在字典中,所以返回正确
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询具体字典
|
||||
* @param zdbh 字典编号
|
||||
* @param dm 字典代码
|
||||
* @return 是否在该字典项中
|
||||
*/
|
||||
public static SysDictItemVO getDictZdbhAndDm(String zdbh, String dm){
|
||||
//如果字典编号和字典代码有一项为空,则返回错误
|
||||
if(StringUtils.isBlank(zdbh) || StringUtils.isBlank(dm)){
|
||||
return null;
|
||||
}
|
||||
|
||||
List<SysDictItemVO> sysDictItemList = DictUtils.getDictItemList(zdbh);
|
||||
|
||||
//如果未查询到该字典,返回错误
|
||||
if(sysDictItemList == null || sysDictItemList.isEmpty()){
|
||||
return null;
|
||||
}
|
||||
|
||||
//循环字典项数据,如果存在该数据,则返回正确
|
||||
for(SysDictItemVO sysDictItemVO : sysDictItemList){
|
||||
if (Objects.equals(dm, sysDictItemVO.getDm())) {
|
||||
return sysDictItemVO;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典名称
|
||||
* @param zdbh 字典编号
|
||||
* @param dm 字典代码
|
||||
* @return 字典名称
|
||||
*/
|
||||
public static String getDictZdmcByZdbhAndDm(String zdbh, String dm){
|
||||
String zdmc = "";
|
||||
|
||||
SysDictItemVO sysDictItemVO = DictUtils.getDictZdbhAndDm(zdbh, dm);
|
||||
if(ObjectUtils.isNotEmpty(sysDictItemVO)){
|
||||
zdmc = sysDictItemVO.getZdmc();
|
||||
}
|
||||
|
||||
return zdmc;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典名称(多个字典代码)
|
||||
* @param zdbh 字典编号
|
||||
* @param dms 字典代码(多个)
|
||||
* @return 字典名称
|
||||
*/
|
||||
public static String getDictZdmcsByZdbhAndDms(String zdbh, String dms){
|
||||
if(StringUtils.isBlank(zdbh) || StringUtils.isBlank(dms)){
|
||||
return null;
|
||||
}
|
||||
StringBuilder zdmc = new StringBuilder();
|
||||
|
||||
String[] dmArray = dms.split(Constant.SEPARATOR_ENGLISH_COMMA);
|
||||
for(String dm : dmArray){
|
||||
SysDictItemVO sysDictItemVO = DictUtils.getDictZdbhAndDm(zdbh, dm);
|
||||
if(ObjectUtils.isNotEmpty(sysDictItemVO)){
|
||||
zdmc.append(sysDictItemVO.getZdmc());
|
||||
zdmc.append(Constant.SEPARATOR_ENGLISH_COMMA);
|
||||
}
|
||||
}
|
||||
|
||||
if(zdmc.length() > 0 ){
|
||||
zdmc.deleteCharAt(zdmc.length() - 1);
|
||||
return zdmc.toString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,243 @@
|
||||
package com.mosty.base.utils;
|
||||
|
||||
import com.mosty.common.base.entity.log.SpringUtils;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
|
||||
/**
|
||||
* 获取i18n资源文件
|
||||
*
|
||||
* @author Ruoyi
|
||||
*/
|
||||
public class MessageUtils
|
||||
{
|
||||
/**
|
||||
* 根据消息键和参数 获取消息 委托给spring messageSource
|
||||
*
|
||||
* @param code 消息键
|
||||
* @param args 参数
|
||||
* @return 获取国际化翻译值
|
||||
*/
|
||||
public static String message(String code, Object... args)
|
||||
{
|
||||
MessageSource messageSource = SpringUtils.getBean(MessageSource.class);
|
||||
return messageSource.getMessage(code, args, LocaleContextHolder.getLocale());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取查询失败消息
|
||||
* @return 查询失败消息(“查询失败!”)
|
||||
*/
|
||||
public static String getQueryFailMsg(){
|
||||
return MessageUtils.message("query.fail");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取查询服务异常消息
|
||||
* @return 获取查询服务异常消息(“查询失败!服务异常”)
|
||||
*/
|
||||
public static String getQueryServerErrorMsg(){
|
||||
return MessageUtils.message("query.fail") + MessageUtils.message("server.error");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取保存失败消息
|
||||
* @return 保存失败消息(“保存失败!”)
|
||||
*/
|
||||
public static String getSaveFailMsg(){
|
||||
return MessageUtils.message("save.fail");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取保存服务异常消息
|
||||
* @return 获取保存服务异常消息(“保存失败!服务异常”)
|
||||
*/
|
||||
public static String getSaveServerErrorMsg(){
|
||||
return MessageUtils.message("save.fail") + MessageUtils.message("server.error");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取复制失败消息
|
||||
* @return 复制失败消息(“复制失败!”)
|
||||
*/
|
||||
public static String getCopyFailMsg(){
|
||||
return MessageUtils.message("copy.fail");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取复制服务异常消息
|
||||
* @return 获取复制服务异常消息(“复制失败!服务异常”)
|
||||
*/
|
||||
public static String getCopyServerErrorMsg(){
|
||||
return MessageUtils.message("copy.fail") + MessageUtils.message("server.error");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取修改数据查询为空消息
|
||||
* @return 获取修改数据查询为空消息(“修改失败!数据不存在或已被注销”)
|
||||
*/
|
||||
public static String getEditDataNotFoundMsg(){
|
||||
return MessageUtils.getEditFailMsg() + MessageUtils.message("data.bcz");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取修改失败消息
|
||||
* @return 修改失败消息(“修改失败!”)
|
||||
*/
|
||||
public static String getEditFailMsg(){
|
||||
return MessageUtils.message("edit.fail");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取修改服务异常消息
|
||||
* @return 获取修改服务异常消息(“修改失败!服务异常”)
|
||||
*/
|
||||
public static String getEditServerErrorMsg(){
|
||||
return MessageUtils.message("edit.fail") + MessageUtils.message("server.error");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取注销失败消息
|
||||
* @return 注销失败消息(“注销失败!”)
|
||||
*/
|
||||
public static String getCancelFailMsg(){
|
||||
return MessageUtils.message("cancel.fail");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取注销服务异常消息
|
||||
* @return 获取注销服务异常消息(“注销失败!服务异常”)
|
||||
*/
|
||||
public static String getCancelServerErrorMsg(){
|
||||
return MessageUtils.message("cancel.fail") + MessageUtils.message("server.error");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取注销服务异常消息(由于主键ID为空)
|
||||
* @return 获取注销服务异常消息(“注销失败!【主键ID】不能为空”)
|
||||
*/
|
||||
public static String getCancelBecauseIdBnwk(){
|
||||
return MessageUtils.message("cancel.fail") + MessageUtils.message("id.bnwk");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核失败消息
|
||||
* @return 审核失败消息(“审核失败!”)
|
||||
*/
|
||||
public static String getAuditsFailMsg(){
|
||||
return MessageUtils.message("audits.fail");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核服务异常消息
|
||||
* @return 获取审核服务异常消息(“审核失败!服务异常”)
|
||||
*/
|
||||
public static String getAuditsServerErrorMsg(){
|
||||
return MessageUtils.message("audits.fail") + MessageUtils.message("server.error");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核数据查询为空消息
|
||||
* @return 获取修改数据查询为空消息(“审核失败!数据不存在或已被注销”)
|
||||
*/
|
||||
public static String getAuditsDataNotFoundMsg(){
|
||||
return MessageUtils.getAuditsFailMsg() + MessageUtils.message("data.bcz");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取送审失败消息
|
||||
* @return 注销失败消息(“送审失败!”)
|
||||
*/
|
||||
public static String getSubExamineFailMsg(){
|
||||
return MessageUtils.message("sub.examine.fail");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取送审服务异常消息
|
||||
* @return 获取审核服务异常消息(“送审失败!服务异常”)
|
||||
*/
|
||||
public static String getSubExamineServerErrorMsg(){
|
||||
return MessageUtils.message("sub.examine.fail") + MessageUtils.message("server.error");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取送审数据查询为空消息
|
||||
* @return 获取修改数据查询为空消息(“送审失败!数据不存在或已被注销”)
|
||||
*/
|
||||
public static String getSubExamineDataNotFoundMsg(){
|
||||
return MessageUtils.getSubExamineFailMsg() + MessageUtils.message("data.bcz");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核失败消息
|
||||
* @return 注销失败消息(“审核失败!”)
|
||||
*/
|
||||
public static String getToExamineFailMsg(){
|
||||
return MessageUtils.message("to.examine.fail");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核服务异常消息
|
||||
* @return 获取审核服务异常消息(“审核失败!服务异常”)
|
||||
*/
|
||||
public static String getToExamineServerErrorMsg(){
|
||||
return MessageUtils.message("to.examine.fail") + MessageUtils.message("server.error");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核数据查询为空消息
|
||||
* @return 获取修改数据查询为空消息(“审核失败!数据不存在或已被注销”)
|
||||
*/
|
||||
public static String getToExamineDataNotFoundMsg(){
|
||||
return MessageUtils.getToExamineFailMsg() + MessageUtils.message("data.bcz");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导出失败消息
|
||||
* @return 注销失败消息(“导出失败!”)
|
||||
*/
|
||||
public static String getExportFailMsg(){
|
||||
return MessageUtils.message("export.fail");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导出服务异常消息
|
||||
* @return 获取导出服务异常消息(“导出失败!服务异常”)
|
||||
*/
|
||||
public static String getExportServerErrorMsg(){
|
||||
return MessageUtils.message("export.fail") + MessageUtils.message("server.error");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导出数据查询为空消息
|
||||
* @return 获取修改数据查询为空消息(“导出失败!数据不存在或已被注销”)
|
||||
*/
|
||||
public static String getExportDataNotFoundMsg(){
|
||||
return MessageUtils.getExportFailMsg() + MessageUtils.message("data.bcz");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导入失败消息
|
||||
* @return 注销失败消息(“导入失败!”)
|
||||
*/
|
||||
public static String getImportFailMsg(){
|
||||
return MessageUtils.message("import.fail");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导入服务异常消息
|
||||
* @return 获取导出服务异常消息(“导入失败!服务异常”)
|
||||
*/
|
||||
public static String getImportServerErrorMsg(){
|
||||
return MessageUtils.message("import.fail") + MessageUtils.message("server.error");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导入数据查询为空消息
|
||||
* @return 获取修改数据查询为空消息(“导入失败!数据不存在或已被注销”)
|
||||
*/
|
||||
public static String getImportDataNotFoundMsg(){
|
||||
return MessageUtils.getImportFailMsg() + MessageUtils.message("data.bcz");
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package com.mosty.base.utils.spring;
|
||||
|
||||
import com.mosty.base.utils.MessageUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.ObjectError;
|
||||
|
||||
@ -10,6 +12,16 @@ import java.util.List;
|
||||
*/
|
||||
public class SpringValidUtils {
|
||||
|
||||
/**
|
||||
* 主键ID长度最大值
|
||||
*/
|
||||
private static final Integer ID_MAX_LENGTH = 32;
|
||||
|
||||
/**
|
||||
* 备注长度最大值
|
||||
*/
|
||||
private static final Integer MARK_MAX_LENGTH = 500;
|
||||
|
||||
/**
|
||||
* 获取错误信息
|
||||
* @param bindingResult spring校验对象
|
||||
@ -44,4 +56,69 @@ public class SpringValidUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验注销信息
|
||||
* @param id 主键ID
|
||||
* @param xtZxyy 注销原因
|
||||
* @return 错误信息
|
||||
*/
|
||||
public static String getCancelMsg(String id, String xtZxyy){
|
||||
//错误信息
|
||||
StringBuilder esbd = new StringBuilder();
|
||||
|
||||
if(StringUtils.isBlank(id)){
|
||||
esbd.append(MessageUtils.message("id.bnwk"));
|
||||
esbd.append(",");
|
||||
}else if(id.length() > ID_MAX_LENGTH){
|
||||
esbd.append(MessageUtils.message("id.size"));
|
||||
esbd.append(",");
|
||||
}
|
||||
if(StringUtils.isBlank(xtZxyy)){
|
||||
esbd.append(MessageUtils.message("xt.zxyy.bnwk"));
|
||||
esbd.append(",");
|
||||
}else if(xtZxyy.length() > MARK_MAX_LENGTH){
|
||||
esbd.append(MessageUtils.message("xt.zxyy.size"));
|
||||
esbd.append(",");
|
||||
}
|
||||
|
||||
if(esbd.length() > 0) {
|
||||
esbd.deleteCharAt(esbd.length() - 1);
|
||||
return esbd.toString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 注解长度校验
|
||||
* @param isNotBlank 是否不能为空
|
||||
* @param max 最大值
|
||||
* @param min 最小值
|
||||
* @param value 需要校验的字符串
|
||||
* @return 是否校验通过
|
||||
*/
|
||||
public static boolean annotationSizeValidation(boolean isNotBlank, int max, int min, String value){
|
||||
|
||||
//校验是否为空
|
||||
if(StringUtils.isBlank(value)){
|
||||
//如果需要校验的值为空,并且该项为必填项,则返回错误
|
||||
if(isNotBlank){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//校验是否大于最大值
|
||||
if(!StringUtils.isBlank(value) && max != Integer.MAX_VALUE) {
|
||||
if(value.length() > max){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//校验是否小于最小值
|
||||
if(!StringUtils.isBlank(value) && min != Integer.MIN_VALUE){
|
||||
return value.length() > min;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,164 @@
|
||||
#错误消息
|
||||
not.null=* 必须填写
|
||||
user.jcaptcha.error=验证码错误
|
||||
user.jcaptcha.expire=验证码已失效
|
||||
user.not.exists=用户不存在/密码错误
|
||||
user.password.not.match=用户不存在/密码错误
|
||||
user.password.retry.limit.count=密码输入错误{0}次
|
||||
user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟
|
||||
user.password.delete=对不起,您的账号已被删除
|
||||
user.blocked=用户已封禁,请联系管理员
|
||||
role.blocked=角色已封禁,请联系管理员
|
||||
user.logout.success=退出成功
|
||||
|
||||
length.not.valid=长度必须在{min}到{max}个字符之间
|
||||
|
||||
user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
|
||||
user.password.not.valid=* 5-50个字符
|
||||
|
||||
user.email.not.valid=邮箱格式错误
|
||||
user.mobile.phone.number.not.valid=手机号格式错误
|
||||
user.login.success=登录成功
|
||||
user.login.fail=登录失败!
|
||||
user.register.success=注册成功
|
||||
user.notfound=请重新登录
|
||||
user.forcelogout=管理员强制退出,请重新登录
|
||||
user.unknown.error=未知错误,请重新登录
|
||||
|
||||
##文件上传消息
|
||||
upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
|
||||
upload.filename.exceed.length=上传的文件名最长{0}个字符
|
||||
|
||||
##权限
|
||||
no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
|
||||
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
|
||||
|
||||
##业务功能提示信息
|
||||
login.user.not.found=当前登陆人信息未找到
|
||||
query.fail=查询失败!
|
||||
save.fail=保存失败!
|
||||
edit.fail=修改失败!
|
||||
cancel.fail=注销失败!
|
||||
cancel.zxyy.plzx=批量注销
|
||||
cancel.zxyy.gsxx=跟随高速信息注销
|
||||
cancel.zxyy.glid=跟随关联信息注销
|
||||
audits.fail=审核失败!
|
||||
sub.examine.fail=送审失败!
|
||||
to.examine.fail=审核失败!
|
||||
export.fail=导出失败!
|
||||
import.fail=导入失败!
|
||||
startup.fail=启动失败!
|
||||
startup.success=启动成功!
|
||||
shutoff.fail=关闭失败!
|
||||
shutoff.success=关闭成功!
|
||||
comparison.fail=比对失败!
|
||||
feedback.fail=反馈失败!
|
||||
receive.success=接收成功!
|
||||
receive.fail=接收失败!
|
||||
server.error=服务异常
|
||||
data.bcz=数据不存在或已被注销
|
||||
id.bnwk=【主键ID】不能为空
|
||||
id.size=【主键ID】不能超过32个字符
|
||||
xt.zxyy.bnwk=【注销原因】不能为空
|
||||
xt.zxyy.size=【注销原因】不能超过100个字符
|
||||
bz.size=【备注】不能超过500个字符
|
||||
|
||||
#通用提示信息
|
||||
param.not.standard=参数不规范
|
||||
dict.not.standard=字典不规范
|
||||
phone.bnwk=【手机号码】不能为空
|
||||
phone.size=【手机号码】不能超过11个字符
|
||||
xm.bnwk=【姓名】不能为空
|
||||
xm.size=【姓名】不能超过20个字符
|
||||
sfzh.bnwk=【身份证号】不能为空
|
||||
sfzh.size=【身份证号】不能超过18个字符
|
||||
cjsj.bnwk=【采集时间】不能为空
|
||||
cjdd.bnwk=【采集地点名称】不能为空
|
||||
cjdd.size=【采集地点名称】不能超过200个字符
|
||||
jd.bnwk=【地球经度】不能为空
|
||||
jd.digits=【地球经度】整数位不能超过3位,小数位不能超过18位
|
||||
jd.min=【地球经度】最小值为-180.00
|
||||
jd.max=【地球经度】最大值为180.00
|
||||
jd.size=【地球经度】不能超过30个字符
|
||||
wd.bnwk=【地球纬度】不能为空
|
||||
wd.digits=【地球纬度】整数位不能超过3位,小数位不能超过18位
|
||||
wd.min=【地球纬度】最小值为-90.00
|
||||
wd.max=【地球纬度】最大值为90.00
|
||||
wd.size=【地球纬度】不能超过30个字符
|
||||
sbmc.bnwk=【采集设备名称】不能为空
|
||||
sbmc.size=【采集设备名称】不能超过50位
|
||||
sbbh.bnwk=【采集设备编号】不能为空
|
||||
sbbh.size=【采集设备编号】不能超过50位
|
||||
hpzl.bgf=【号牌种类】不规范
|
||||
hphm.bnwk=【号牌号码】不能为空
|
||||
hphm.size=【号牌号码】不能超过15个字符
|
||||
ryBqDm.bgf=【人员标签代码】不规范或超长
|
||||
ryBqMc.size=【人员标签名称】不能超过100个字符
|
||||
ryBqLy.size=【人员标签来源】不能超过100个字符
|
||||
clBqDm.bgf=【车辆标签代码】不规范或超长
|
||||
clBqMc.size=【车辆标签名称】不能超过100个字符
|
||||
clBqLy.size=【车辆标签来源】不能超过100个字符
|
||||
|
||||
#业务提示信息
|
||||
imsi.bnwk=【imsi】不能为空
|
||||
imsi.size=【imsi】不能超过15个字符
|
||||
syrXm.bnwk=【使用人姓名】不能为空
|
||||
syrXm.size=【使用人姓名】不能超过20位
|
||||
syrSfzh.bnwk=【使用人身份证号】不能为空
|
||||
syrSfzh.size=【使用人身份证号】不能超过18位
|
||||
syrSsbmmc.bnwk=【使用人所在部门名称】不能为空
|
||||
syrSsbmmc.size=【使用人所在部门名称】不能超过100位
|
||||
syrSsbmdm.bnwk=【使用人所在部门代码】不能为空
|
||||
syrSsbmdm.size=【使用人所在部门代码】不能超过12位
|
||||
sbglbmmc.bnwk=【设备管理部门名称】不能为空
|
||||
sbglbmmc.size=【设备管理部门名称】不能超过100位
|
||||
sbglbmdm.bnwk=【设备管理部门代码】不能为空
|
||||
sbglbmdm.size=【设备管理部门代码】不能超过12位
|
||||
sbsybmmc.bnwk=【设备使用部门名称】不能为空
|
||||
sbsybmmc.size=【设备使用部门名称】不能超过100位
|
||||
sbsybmdm.bnwk=【设备使用部门代码】不能为空
|
||||
sbsybmdm.size=【设备使用部门代码】不能超过12位
|
||||
czclList.bnwk=【乘坐车辆列表】不能为空
|
||||
imsi.cl.knx.bnwk=【乘坐车辆可能性】不能为空
|
||||
imsi.cl.knx.digits=【乘坐车辆可能性】整数位不能超过3位,小数位不能超过18位
|
||||
imsi.cl.knx.min=【乘坐车辆可能性】最小值为00.00
|
||||
imsi.cl.knx.max=【乘坐车辆可能性】最大值为99.99
|
||||
imsi.cj.jx.blank=imsi采集信息解析为空
|
||||
imsi.sjhm.not.found.people=根据手机号码未找到人员,手机号码:
|
||||
|
||||
scgadsj.userId.bnwk=用户的公民身份号码不能为空
|
||||
scgadsj.userName.bnwk=用户的公民姓名不能为空
|
||||
scgadsj.organization.bnwk=用户所属单位的公安机关机构名称不能为空
|
||||
scgadsj.organizationId.bnwk=用户所属单位的公安机关机构代码不能为空
|
||||
scgadsj.terminalPhone.bnwk=移动警务终端对应手机号码不能为空
|
||||
scgadsj.terminalIMEI.bnwk=移动警务终端对应手机串号不能为空
|
||||
scgadsj.terminalLongitude.bnwk=移动警务终端对应经度不能为空
|
||||
scgadsj.terminalLatitude.bnwk=移动警务终端对应纬度不能为空
|
||||
scgadsj.sfzh.bnwk=身份证号不能为空
|
||||
scgadsj.mac.bnwk=mac地址不能为空
|
||||
scgadsj.hphm.bnwk=号牌号码不能为空
|
||||
scgadsj.hpzl.bnwk=号牌种类不能为空
|
||||
|
||||
ssbm.queryNull=未查询到此部门
|
||||
ssbmdm.notBlank=【所属部门代码】不能为空
|
||||
ssbmdm.size=【所属部门代码】不能超过32位
|
||||
|
||||
#指导巡逻-方格巡逻任务
|
||||
zdxl.fgxlrw.jqpz.bjxl.notBlank=【报警细类】不能为空
|
||||
zdxl.fgxlrw.jqpz.bjxl.size=【报警细类】不能超过1000位
|
||||
zdxl.fgxlrw.jqpz.bjxlSm.size=【报警细类说明】不能超过200位
|
||||
zdxl.fgxlrw.jqpz.bjzl.notBlank=【报警子类】不能为空
|
||||
zdxl.fgxlrw.jqpz.bjzl.size=【报警子类】不能超过1000位
|
||||
zdxl.fgxlrw.jqpz.bjzlSm.size=【报警子类说明】不能超过200位
|
||||
zdxl.fgxlrw.rwRq.notNull=【任务日期】不能为空
|
||||
zdxl.fgxlrw.rwRq.fgYjdj.isDict=【方格预警等级】不规范
|
||||
zdxl.fgxlrw.rwRq.fgYjys.isDict=【方格预警颜色】不规范
|
||||
zdxl.fgxlrw.rwRq.xlghSc.notNull=【巡逻规划时长】不能为空
|
||||
zdxl.fgxlrw.rwRq.xlghSjKs.notNull=【巡逻规划开始时间】不能为空
|
||||
zdxl.fgxlrw.rwRq.xlghSjJs.notNull=【巡逻规划结束时间】不能为空
|
||||
zdxl.fgxlrw.rwRq.xlghXllc.notNull=【巡逻规划巡逻里程】不能为空
|
||||
zdxl.fgxlrw.rwRq.export.queryNull=当日没有生成任务,请生成后再下载
|
Reference in New Issue
Block a user