Merge remote-tracking branch 'origin/master'
| | |
| | | public class AbsQuery { |
| | | |
| | | @ApiModelProperty(value = "当前页", required = true) |
| | | private Long currentPage = 1L; |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "每页条数", required = true) |
| | | private Long pageSize = 10L; |
| | |
| | | private Integer id; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date gmtCreate; |
| | | private Date createTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date gmtUpdate; |
| | | private Date updateTime; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.base; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author:xp |
| | | * @date:2024/3/5 15:11 |
| | | */ |
| | | @Data |
| | | public class BaseSelect { |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 值 |
| | | */ |
| | | private String value; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.time.LocalDateTime; |
| | | import com.ycl.platform.base.AbsEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 违规审核 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("t_default_auditing") |
| | | @ApiModel(value = "DefaultAuditing对象", description = "违规审核") |
| | | public class DefaultAuditing extends AbsEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("违规") |
| | | @TableField("default_id") |
| | | private Integer defaultId; |
| | | |
| | | @ApiModelProperty("审核状态") |
| | | @TableField("auditing_status") |
| | | private String auditingStatus; |
| | | |
| | | @ApiModelProperty("审核说明") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("审核时间") |
| | | @TableField("auditing_time") |
| | | private LocalDateTime auditingTime; |
| | | |
| | | @ApiModelProperty("审核人") |
| | | @TableField("auditing_user") |
| | | private Integer auditingUser; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.entity; |
| | | |
| | | import com.ycl.platform.base.AbsEntity; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ycl.platform.base.AbsEntity; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 违约规则 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("t_default_rule") |
| | | @ApiModel(value = "DefaultRule对象", description = "违约规则") |
| | | public class DefaultRule extends AbsEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("规则名称") |
| | | @TableField("rule_name") |
| | | private String ruleName; |
| | | |
| | | @ApiModelProperty("规则详情JSON") |
| | | @TableField("rule_detail") |
| | | private String ruleDetail; |
| | | |
| | | @ApiModelProperty("规则描述") |
| | | @TableField("rule_desc") |
| | | private String ruleDesc; |
| | | |
| | | @ApiModelProperty("规则状态:启用、未启用") |
| | | @TableField("rule_status") |
| | | private String ruleStatus; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.ycl.platform.base.AbsEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 工单 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("t_work_order") |
| | | @ApiModel(value = "WorkOrder对象", description = "工单") |
| | | public class WorkOrder extends AbsEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("工单号") |
| | | @TableField("work_order_no") |
| | | private String workOrderNo; |
| | | |
| | | /** 故障类型 */ |
| | | @TableField("error_type") |
| | | private String errorType; |
| | | |
| | | @ApiModelProperty("工单来源") |
| | | @TableField("source") |
| | | private String source; |
| | | |
| | | @ApiModelProperty("运维单位") |
| | | @TableField("unit_id") |
| | | private Integer unitId; |
| | | |
| | | @ApiModelProperty("运维人员") |
| | | @TableField("yw_people_id") |
| | | private Integer ywPeopleId; |
| | | |
| | | @ApiModelProperty("状态") |
| | | @TableField("status") |
| | | private String status; |
| | | |
| | | @ApiModelProperty("运维处理时间") |
| | | @TableField("yw_handle_time") |
| | | private LocalDateTime ywHandleTime; |
| | | |
| | | @ApiModelProperty("运维结果") |
| | | @TableField("yw_result") |
| | | private String ywResult; |
| | | |
| | | @ApiModelProperty("运维情况") |
| | | @TableField("yw_condition") |
| | | private String ywCondition; |
| | | |
| | | @ApiModelProperty("运维检测结果") |
| | | @TableField("yw_check_result") |
| | | private String ywCheckResult; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ycl.platform.base.AbsEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 工单审核记录 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-06 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("t_work_order_auditing_record") |
| | | @ApiModel(value = "WorkOrderAuditingRecord对象", description = "工单审核记录") |
| | | public class WorkOrderAuditingRecord extends AbsEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("工单ID") |
| | | @TableField("work_order_id") |
| | | private Integer workOrderId; |
| | | |
| | | @ApiModelProperty("审核人") |
| | | @TableField("auditing_user") |
| | | private Integer auditingUser; |
| | | |
| | | @ApiModelProperty("审核结果") |
| | | @TableField("result") |
| | | private String result; |
| | | |
| | | @ApiModelProperty("审核备注") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ycl.platform.base.AbsEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 工单运维情况记录 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-06 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("t_work_order_yw_condition_record") |
| | | @ApiModel(value = "WorkOrderYwConditionRecord对象", description = "工单运维情况记录") |
| | | public class WorkOrderYwConditionRecord extends AbsEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("工单ID") |
| | | @TableField("work_order_id") |
| | | private Integer workOrderId; |
| | | |
| | | @ApiModelProperty("提交人") |
| | | @TableField("commit_user") |
| | | private Integer commitUser; |
| | | |
| | | @ApiModelProperty("运维情况") |
| | | @TableField("yw_condition") |
| | | private String ywCondition; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.ycl.platform.base.AbsEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 运维点位 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("t_yw_point") |
| | | @ApiModel(value = "YwPoint对象", description = "运维点位") |
| | | public class YwPoint extends AbsEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty("点位名称") |
| | | @TableField("point_name") |
| | | private String pointName; |
| | | |
| | | @ApiModelProperty("点位开始时间") |
| | | @TableField("start_time") |
| | | private LocalDateTime startTime; |
| | | |
| | | @ApiModelProperty("点位结束时间") |
| | | @TableField("end_time") |
| | | private LocalDateTime endTime; |
| | | |
| | | @ApiModelProperty("运维单位") |
| | | @TableField("unit_id") |
| | | private Integer unitId; |
| | | |
| | | @ApiModelProperty("运维状态") |
| | | @TableField("status") |
| | | private String status; |
| | | |
| | | @ApiModelProperty("备注") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import com.ycl.platform.base.AbsForm; |
| | | import com.ycl.platform.domain.entity.DefaultAuditing; |
| | | import java.time.LocalDateTime; |
| | | import org.springframework.beans.BeanUtils; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import org.springframework.lang.NonNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 违规审核表单 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "DefaultAuditing表单", description = "违规审核表单") |
| | | public class DefaultAuditingForm extends AbsForm { |
| | | |
| | | @NotNull(message = "违规不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("违规") |
| | | private Integer defaultId; |
| | | |
| | | @NotBlank(message = "审核状态不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("审核状态") |
| | | private String auditingStatus; |
| | | |
| | | @NotBlank(message = "审核说明不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("审核说明") |
| | | private String remark; |
| | | |
| | | @NotNull(message = "审核时间不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("审核时间") |
| | | private LocalDateTime auditingTime; |
| | | |
| | | @NotNull(message = "审核人不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("审核人") |
| | | private Integer auditingUser; |
| | | |
| | | public static DefaultAuditing getEntityByForm(@NonNull DefaultAuditingForm form, DefaultAuditing entity) { |
| | | if(entity == null) { |
| | | entity = new DefaultAuditing(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import com.ycl.platform.base.AbsForm; |
| | | import com.ycl.platform.domain.entity.DefaultRule; |
| | | import java.time.LocalDateTime; |
| | | import org.springframework.beans.BeanUtils; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import org.springframework.lang.NonNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 违约规则表单 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "DefaultRule表单", description = "违约规则表单") |
| | | public class DefaultRuleForm extends AbsForm { |
| | | |
| | | @NotBlank(message = "规则名称不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("规则名称") |
| | | private String ruleName; |
| | | |
| | | @NotBlank(message = "规则设置不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("规则详情JSON") |
| | | private String ruleDetail; |
| | | |
| | | @ApiModelProperty("规则描述") |
| | | private String ruleDesc; |
| | | |
| | | public static DefaultRule getEntityByForm(@NonNull DefaultRuleForm form, DefaultRule entity) { |
| | | if(entity == null) { |
| | | entity = new DefaultRule(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 启用停用-违约规则 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/3/6 11:16 |
| | | */ |
| | | @Data |
| | | public class DefaultRuleSetForm { |
| | | |
| | | private Integer id; |
| | | |
| | | /** |
| | | * true 启用 |
| | | * false 停用 |
| | | */ |
| | | private Boolean flag; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import com.ycl.platform.base.AbsForm; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 工单审核表单 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/3/6 8:59 |
| | | */ |
| | | @Data |
| | | public class WorkOrderAuditingForm extends AbsForm { |
| | | |
| | | /** |
| | | * 审核结果 |
| | | */ |
| | | @NotBlank(message = "审核结果不能为空") |
| | | private String auditingResult; |
| | | |
| | | /** |
| | | * 审核说明 |
| | | */ |
| | | private String auditingRemark; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 检测结果表单 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/3/6 8:59 |
| | | */ |
| | | @Data |
| | | public class WorkOrderCheckResultForm { |
| | | |
| | | /** |
| | | * 工单ID |
| | | */ |
| | | private Integer id; |
| | | |
| | | |
| | | /** |
| | | * 检测结果 |
| | | */ |
| | | private String ywCheckResult; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import com.ycl.platform.base.AbsForm; |
| | | import com.ycl.platform.domain.entity.WorkOrder; |
| | | import org.springframework.beans.BeanUtils; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import org.springframework.lang.NonNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 工单表单 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "WorkOrder表单", description = "工单表单") |
| | | public class WorkOrderForm extends AbsForm { |
| | | |
| | | @NotBlank(message = "工单号不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("工单号") |
| | | private String workOrderNo; |
| | | |
| | | @NotNull(message = "运维单位不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("运维单位") |
| | | private Integer unitId; |
| | | |
| | | @NotNull(message = "运维人员不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("运维人员") |
| | | private Integer ywPeopleId; |
| | | |
| | | @NotNull(message = "运维处理时间不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("运维处理时间") |
| | | private LocalDateTime ywHandleTime; |
| | | |
| | | @NotBlank(message = "运维结果不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("运维结果") |
| | | private String ywResult; |
| | | |
| | | @NotBlank(message = "运维情况不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("运维情况") |
| | | private String ywCondition; |
| | | |
| | | @NotBlank(message = "运维检测结果不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("运维检测结果") |
| | | private String ywCheckResult; |
| | | |
| | | public static WorkOrder getEntityByForm(@NonNull WorkOrderForm form, WorkOrder entity) { |
| | | if(entity == null) { |
| | | entity = new WorkOrder(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 运维情况表单 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/3/6 8:59 |
| | | */ |
| | | @Data |
| | | public class WorkOrderYWConditionForm { |
| | | |
| | | /** |
| | | * 工单ID |
| | | */ |
| | | private Integer id; |
| | | |
| | | |
| | | /** |
| | | * 运维情况 |
| | | */ |
| | | private String ywCondition; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 运维结果表单 |
| | | * |
| | | * @author:xp |
| | | * @date:2024/3/6 8:59 |
| | | */ |
| | | @Data |
| | | public class WorkOrderYWResultForm { |
| | | |
| | | /** |
| | | * 工单ID |
| | | */ |
| | | private Integer id; |
| | | |
| | | |
| | | /** |
| | | * 运维结果 |
| | | */ |
| | | private String ywResult; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("所属运维单位") |
| | | private Integer belongUnit; |
| | | |
| | | @NotBlank(message = "添加数据的方式:手动、导入不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("添加数据的方式:手动、导入") |
| | | private String addWay; |
| | | |
| New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import com.ycl.platform.base.AbsForm; |
| | | import com.ycl.platform.domain.entity.YwPoint; |
| | | import org.springframework.beans.BeanUtils; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import org.springframework.lang.NonNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * 运维点位表单 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "YwPoint表单", description = "运维点位表单") |
| | | public class YwPointForm extends AbsForm { |
| | | |
| | | @NotBlank(message = "点位名称不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("点位名称") |
| | | private String pointName; |
| | | |
| | | @NotNull(message = "点位开始时间不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("点位开始时间") |
| | | private LocalDateTime startTime; |
| | | |
| | | @NotNull(message = "点位结束时间不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("点位结束时间") |
| | | private LocalDateTime endTime; |
| | | |
| | | @NotNull(message = "运维单位不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("运维单位") |
| | | private Integer unitId; |
| | | |
| | | // @NotBlank(message = "运维状态不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("运维状态") |
| | | private String status; |
| | | |
| | | // @NotBlank(message = "备注不能为空", groups = {Add.class, Update.class}) |
| | | // @ApiModelProperty("备注") |
| | | // private String remark; |
| | | |
| | | public static YwPoint getEntityByForm(@NonNull YwPointForm form, YwPoint entity) { |
| | | if(entity == null) { |
| | | entity = new YwPoint(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import com.ycl.platform.base.AbsQuery; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 违规审核查询 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "DefaultAuditing查询", description = "违规审核查询") |
| | | public class DefaultAuditingQuery extends AbsQuery { |
| | | } |
| | | |
| New file |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ycl.platform.base.AbsQuery; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 违约规则查询 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "DefaultRule查询", description = "违约规则查询") |
| | | public class DefaultRuleQuery extends AbsQuery { |
| | | |
| | | /** |
| | | * 规则名称 |
| | | */ |
| | | private String ruleName; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date start; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date end; |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import com.ycl.platform.base.AbsQuery; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 工单审核记录查询 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-06 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "WorkOrderAuditingRecord查询", description = "工单审核记录查询") |
| | | public class WorkOrderAuditingRecordQuery extends AbsQuery { |
| | | } |
| | | |
| New file |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ycl.platform.base.AbsQuery; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 工单查询 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "WorkOrder查询", description = "工单查询") |
| | | public class WorkOrderQuery extends AbsQuery { |
| | | |
| | | /** |
| | | * 工单号 |
| | | */ |
| | | private String workOrderNo; |
| | | |
| | | /** |
| | | * 运维处理时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date start; |
| | | |
| | | /** |
| | | * 运维处理时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date end; |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import com.ycl.platform.base.AbsQuery; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 工单运维情况记录查询 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-06 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "WorkOrderYwConditionRecord查询", description = "工单运维情况记录查询") |
| | | public class WorkOrderYwConditionRecordQuery extends AbsQuery { |
| | | } |
| | | |
| | |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "YwPeople查询", description = "运维人员查询") |
| | | public class YwPeopleQuery extends AbsQuery { |
| | | |
| | | /** |
| | | * 运维人员编码 |
| | | */ |
| | | private String ywPersonCode; |
| | | |
| | | /** |
| | | * 运维人员姓名 |
| | | */ |
| | | private String ywPersonName; |
| | | |
| | | /** |
| | | * 所属运维单位 |
| | | */ |
| | | private Integer belongUnit; |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ycl.platform.base.AbsQuery; |
| | | import org.springframework.lang.NonNull; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 运维点位查询 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "YwPoint查询", description = "运维点位查询") |
| | | public class YwPointQuery extends AbsQuery { |
| | | } |
| | | |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ycl.platform.base.AbsQuery; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 运维单位查询 |
| | |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "YwUnit查询", description = "运维单位查询") |
| | | public class YwUnitQuery extends AbsQuery { |
| | | |
| | | /** |
| | | * 单位编码 |
| | | */ |
| | | private String unitCode; |
| | | |
| | | /** |
| | | * 单位名称 |
| | | */ |
| | | private String unitName; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date start; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date end; |
| | | |
| | | } |
| | | |
| New file |
| | |
| | | package com.ycl.platform.domain.vo; |
| | | |
| | | import com.ycl.platform.base.AbsVo; |
| | | import com.ycl.platform.domain.entity.DefaultAuditing; |
| | | import java.util.List; |
| | | import java.time.LocalDateTime; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 违规审核展示 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | public class DefaultAuditingVO extends AbsVo { |
| | | |
| | | /** 违规 */ |
| | | private Integer defaultId; |
| | | |
| | | /** 审核状态 */ |
| | | private String auditingStatus; |
| | | |
| | | /** 审核说明 */ |
| | | private String remark; |
| | | |
| | | /** 审核时间 */ |
| | | private LocalDateTime auditingTime; |
| | | |
| | | /** 审核人 */ |
| | | private Integer auditingUser; |
| | | |
| | | public static DefaultAuditingVO getVoByEntity(@NonNull DefaultAuditing entity, DefaultAuditingVO vo) { |
| | | if(vo == null) { |
| | | vo = new DefaultAuditingVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.vo; |
| | | |
| | | import com.ycl.platform.base.AbsVo; |
| | | import com.ycl.platform.domain.entity.DefaultRule; |
| | | import java.util.List; |
| | | import java.time.LocalDateTime; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 违约规则展示 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | public class DefaultRuleVO extends AbsVo { |
| | | |
| | | /** 规则名称 */ |
| | | private String ruleName; |
| | | |
| | | /** 规则详情JSON */ |
| | | private String ruleDetail; |
| | | |
| | | /** 规则描述 */ |
| | | private String ruleDesc; |
| | | |
| | | /** 规则状态:启用、未启用 */ |
| | | private String ruleStatus; |
| | | |
| | | public static DefaultRuleVO getVoByEntity(@NonNull DefaultRule entity, DefaultRuleVO vo) { |
| | | if(vo == null) { |
| | | vo = new DefaultRuleVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author:xp |
| | | * @date:2024/3/6 10:49 |
| | | */ |
| | | @Data |
| | | public class Rule { |
| | | |
| | | /** 超时未处理工单数 */ |
| | | private Integer overTime; |
| | | |
| | | /** 工单处理失败数 */ |
| | | private Integer failNum; |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.vo; |
| | | |
| | | import com.ycl.platform.base.AbsVo; |
| | | import com.ycl.platform.domain.entity.WorkOrderAuditingRecord; |
| | | import java.util.List; |
| | | import java.time.LocalDateTime; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 工单审核记录展示 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-06 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | public class WorkOrderAuditingRecordVO extends AbsVo { |
| | | |
| | | /** 工单ID */ |
| | | private Integer workOrderId; |
| | | |
| | | /** 审核人 */ |
| | | private Integer auditingUser; |
| | | |
| | | /** 审核结果 */ |
| | | private String result; |
| | | |
| | | /** 审核备注 */ |
| | | private String remark; |
| | | |
| | | public static WorkOrderAuditingRecordVO getVoByEntity(@NonNull WorkOrderAuditingRecord entity, WorkOrderAuditingRecordVO vo) { |
| | | if(vo == null) { |
| | | vo = new WorkOrderAuditingRecordVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ycl.platform.base.AbsVo; |
| | | import com.ycl.platform.domain.entity.WorkOrder; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 工单展示 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | public class WorkOrderVO extends AbsVo { |
| | | |
| | | /** 工单号 */ |
| | | private String workOrderNo; |
| | | |
| | | /** 运维单位 */ |
| | | private Integer unitId; |
| | | private String unitName; |
| | | |
| | | /** 工单来源 */ |
| | | private String source; |
| | | |
| | | /** 故障类型 */ |
| | | private String errorType; |
| | | |
| | | /** 运维人员 */ |
| | | private Integer ywPeopleId; |
| | | private String ywPeopleName; |
| | | |
| | | /** 运维处理时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime ywHandleTime; |
| | | |
| | | /** 运维结果 */ |
| | | private String ywResult; |
| | | |
| | | /** 运维情况 */ |
| | | private String ywCondition; |
| | | |
| | | /** 运维检测结果 */ |
| | | private String ywCheckResult; |
| | | |
| | | public static WorkOrderVO getVoByEntity(@NonNull WorkOrder entity, WorkOrderVO vo) { |
| | | if(vo == null) { |
| | | vo = new WorkOrderVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.domain.vo; |
| | | |
| | | import com.ycl.platform.base.AbsVo; |
| | | import com.ycl.platform.domain.entity.WorkOrderYwConditionRecord; |
| | | import java.util.List; |
| | | import java.time.LocalDateTime; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 工单运维情况记录展示 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-06 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | public class WorkOrderYwConditionRecordVO extends AbsVo { |
| | | |
| | | /** 工单ID */ |
| | | private Integer workOrderId; |
| | | |
| | | /** 提交人 */ |
| | | private Integer commitUser; |
| | | |
| | | /** 运维情况 */ |
| | | private String ywCondition; |
| | | |
| | | public static WorkOrderYwConditionRecordVO getVoByEntity(@NonNull WorkOrderYwConditionRecord entity, WorkOrderYwConditionRecordVO vo) { |
| | | if(vo == null) { |
| | | vo = new WorkOrderYwConditionRecordVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | /** 所属运维单位 */ |
| | | private Integer belongUnit; |
| | | private String belongUnitName; |
| | | |
| | | /** 添加数据的方式:手动、导入 */ |
| | | private String addWay; |
| New file |
| | |
| | | package com.ycl.platform.domain.vo; |
| | | |
| | | import com.ycl.platform.base.AbsVo; |
| | | import com.ycl.platform.domain.entity.YwPoint; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * 运维点位展示 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | public class YwPointVO extends AbsVo { |
| | | |
| | | /** 点位名称 */ |
| | | private String pointName; |
| | | |
| | | /** 点位开始时间 */ |
| | | private LocalDateTime startTime; |
| | | |
| | | /** 点位结束时间 */ |
| | | private LocalDateTime endTime; |
| | | |
| | | /** 运维单位 */ |
| | | private Integer unitId; |
| | | |
| | | /** 运维状态 */ |
| | | private String status; |
| | | |
| | | /** 备注 */ |
| | | private String remark; |
| | | |
| | | public static YwPointVO getVoByEntity(@NonNull YwPoint entity, YwPointVO vo) { |
| | | if(vo == null) { |
| | | vo = new YwPointVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | public static <T extends AbsEntity, Q extends AbsQuery> IPage<T> getPage(Q q, Class<T> c) { |
| | | Page<T> page = new Page<T>() |
| | | .setCurrent(q.getCurrentPage()) |
| | | .setCurrent(q.getPageNum()) |
| | | .setSize(q.getPageSize()); |
| | | return page; |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ycl.platform.service.DefaultAuditingService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.form.DefaultAuditingForm; |
| | | import com.ycl.platform.domain.query.DefaultAuditingQuery; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * 违规审核 前端控制器 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @Api(value = "违规审核", tags = "违规审核管理") |
| | | @RestController |
| | | @RequestMapping("/default-auditing") |
| | | public class DefaultAuditingController { |
| | | |
| | | private final DefaultAuditingService defaultAuditingService; |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | public Result add(@RequestBody @Validated(Add.class) DefaultAuditingForm form) { |
| | | return defaultAuditingService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | public Result update(@RequestBody @Validated(Update.class) DefaultAuditingForm form) { |
| | | return defaultAuditingService.update(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return defaultAuditingService.removeById(id); |
| | | } |
| | | |
| | | @DeleteMapping("/batch") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) { |
| | | return defaultAuditingService.remove(ids); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | public Result page(DefaultAuditingQuery query) { |
| | | return defaultAuditingService.page(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | public Result detail(@PathVariable("id") String id) { |
| | | return defaultAuditingService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | public Result list() { |
| | | return defaultAuditingService.all(); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import com.ycl.platform.domain.form.DefaultRuleSetForm; |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ycl.platform.service.DefaultRuleService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.form.DefaultRuleForm; |
| | | import com.ycl.platform.domain.query.DefaultRuleQuery; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * 违约规则 前端控制器 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @Api(value = "违约规则", tags = "违约规则管理") |
| | | @RestController |
| | | @RequestMapping("/default-rule") |
| | | public class DefaultRuleController { |
| | | |
| | | private final DefaultRuleService defaultRuleService; |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | public Result add(@RequestBody @Validated(Add.class) DefaultRuleForm form) { |
| | | return defaultRuleService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | public Result update(@RequestBody @Validated(Update.class) DefaultRuleForm form) { |
| | | return defaultRuleService.update(form); |
| | | } |
| | | |
| | | @PostMapping("/set") |
| | | @ApiOperation(value = "启用/停用", notes = "启用/停用") |
| | | public Result set(@RequestBody DefaultRuleSetForm form) { |
| | | return defaultRuleService.set(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return defaultRuleService.removeById(id); |
| | | } |
| | | |
| | | @DeleteMapping("/batch") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) { |
| | | return defaultRuleService.remove(ids); |
| | | } |
| | | |
| | | @PostMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | public Result page(@RequestBody DefaultRuleQuery query) { |
| | | return defaultRuleService.page(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | public Result detail(@PathVariable("id") String id) { |
| | | return defaultRuleService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | public Result list() { |
| | | return defaultRuleService.all(); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import com.ycl.platform.domain.form.*; |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ycl.platform.service.WorkOrderService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.query.WorkOrderQuery; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * 工单 前端控制器 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @Api(value = "工单", tags = "工单管理") |
| | | @RestController |
| | | @RequestMapping("/work-order") |
| | | public class WorkOrderController { |
| | | |
| | | private final WorkOrderService workOrderService; |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | public Result add(@RequestBody @Validated(Add.class) WorkOrderForm form) { |
| | | return workOrderService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | public Result update(@RequestBody @Validated(Update.class) WorkOrderForm form) { |
| | | return workOrderService.update(form); |
| | | } |
| | | |
| | | @PutMapping("/auditing") |
| | | @ApiOperation(value = "审核", notes = "工单审核") |
| | | public Result auditing(@RequestBody @Validated(Update.class) WorkOrderAuditingForm form) { |
| | | return workOrderService.auditing(form); |
| | | } |
| | | |
| | | @PutMapping("/yw-condition") |
| | | @ApiOperation(value = "运维情况", notes = "运维情况") |
| | | public Result ywCondition(@RequestBody @Validated(Update.class) WorkOrderYWConditionForm form) { |
| | | return workOrderService.ywCondition(form); |
| | | } |
| | | |
| | | @PutMapping("/yw-result") |
| | | @ApiOperation(value = "运维结果", notes = "运维结果") |
| | | public Result ywCondition(@RequestBody @Validated(Update.class) WorkOrderYWResultForm form) { |
| | | return workOrderService.ywResult(form); |
| | | } |
| | | |
| | | @PutMapping("/check-result") |
| | | @ApiOperation(value = "检测结果", notes = "检测结果") |
| | | public Result ywCondition(@RequestBody @Validated(Update.class) WorkOrderCheckResultForm form) { |
| | | return workOrderService.checkResult(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return workOrderService.removeById(id); |
| | | } |
| | | |
| | | @DeleteMapping("/batch") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) { |
| | | return workOrderService.remove(ids); |
| | | } |
| | | |
| | | @PostMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | public Result page(@RequestBody WorkOrderQuery query) { |
| | | return workOrderService.page(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | public Result detail(@PathVariable("id") String id) { |
| | | return workOrderService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | public Result list() { |
| | | return workOrderService.all(); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | |
| | | return ywPeopleService.remove(ids); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('unit:people:page')") |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | public Result page(YwPeopleQuery query) { |
| New file |
| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ycl.platform.service.YwPointService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.form.YwPointForm; |
| | | import com.ycl.platform.domain.query.YwPointQuery; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * 运维点位 前端控制器 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @Api(value = "运维点位", tags = "运维点位管理") |
| | | @RestController |
| | | @RequestMapping("/yw-point") |
| | | public class YwPointController { |
| | | |
| | | private final YwPointService ywPointService; |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | public Result add(@RequestBody @Validated(Add.class) YwPointForm form) { |
| | | return ywPointService.add(form); |
| | | } |
| | | |
| | | @PostMapping("/batch") |
| | | @ApiOperation(value = "批量添加", notes = "批量添加") |
| | | public Result batchAdd(@RequestBody @NotEmpty(message = "数据不能为空") List<YwPointForm> form) { |
| | | return ywPointService.batchAdd(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | public Result update(@RequestBody @Validated(Update.class) YwPointForm form) { |
| | | return ywPointService.update(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return ywPointService.removeById(id); |
| | | } |
| | | |
| | | @DeleteMapping("/batch") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) { |
| | | return ywPointService.remove(ids); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('point:page')") |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | public Result page(YwPointQuery query) { |
| | | return ywPointService.page(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | public Result detail(@PathVariable("id") String id) { |
| | | return ywPointService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | public Result list() { |
| | | return ywPointService.all(); |
| | | } |
| | | } |
| | |
| | | import com.ycl.system.domain.group.Add; |
| | | import com.ycl.platform.domain.query.YwUnitQuery; |
| | | import com.ycl.platform.service.YwUnitService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | |
| | | return ywUnitService.remove(ids); |
| | | } |
| | | |
| | | // @PreAuthorize("@ss.hasPermi('unit:list')") |
| | | @GetMapping("/page") |
| | | @PreAuthorize("@ss.hasPermi('unit:list')") |
| | | @PostMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | public Result page(YwUnitQuery query) { |
| | | public Result page(@RequestBody YwUnitQuery query) { |
| | | return ywUnitService.page(query); |
| | | } |
| | | |
| New file |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.DefaultAuditing; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.vo.DefaultAuditingVO; |
| | | import com.ycl.platform.domain.form.DefaultAuditingForm; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * 违规审核 Mapper 接口 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Mapper |
| | | public interface DefaultAuditingMapper extends BaseMapper<DefaultAuditing> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.DefaultRule; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.vo.DefaultRuleVO; |
| | | import com.ycl.platform.domain.form.DefaultRuleForm; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * 违约规则 Mapper 接口 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Mapper |
| | | public interface DefaultRuleMapper extends BaseMapper<DefaultRule> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.WorkOrderAuditingRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * 工单审核记录 Mapper 接口 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-06 |
| | | */ |
| | | @Mapper |
| | | public interface WorkOrderAuditingRecordMapper extends BaseMapper<WorkOrderAuditingRecord> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.WorkOrder; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.vo.WorkOrderVO; |
| | | import com.ycl.platform.domain.form.WorkOrderForm; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * 工单 Mapper 接口 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Mapper |
| | | public interface WorkOrderMapper extends BaseMapper<WorkOrder> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.WorkOrderYwConditionRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * 工单运维情况记录 Mapper 接口 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-06 |
| | | */ |
| | | @Mapper |
| | | public interface WorkOrderYwConditionRecordMapper extends BaseMapper<WorkOrderYwConditionRecord> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.YwPoint; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.vo.YwPointVO; |
| | | import com.ycl.platform.domain.form.YwPointForm; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * 运维点位 Mapper 接口 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Mapper |
| | | public interface YwPointMapper extends BaseMapper<YwPoint> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.DefaultAuditing; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.form.DefaultAuditingForm; |
| | | import com.ycl.platform.domain.query.DefaultAuditingQuery; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 违规审核 服务类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | public interface DefaultAuditingService extends IService<DefaultAuditing> { |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result add(DefaultAuditingForm form); |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result update(DefaultAuditingForm form); |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(DefaultAuditingQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(String id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.DefaultRule; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.platform.domain.form.DefaultRuleSetForm; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.form.DefaultRuleForm; |
| | | import com.ycl.platform.domain.query.DefaultRuleQuery; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 违约规则 服务类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | public interface DefaultRuleService extends IService<DefaultRule> { |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result add(DefaultRuleForm form); |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result update(DefaultRuleForm form); |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(DefaultRuleQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(String id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | |
| | | /** |
| | | * 启用/停用 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result set(DefaultRuleSetForm form); |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.WorkOrderAuditingRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.query.WorkOrderAuditingRecordQuery; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 工单审核记录 服务类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-06 |
| | | */ |
| | | public interface WorkOrderAuditingRecordService extends IService<WorkOrderAuditingRecord> { |
| | | |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(WorkOrderAuditingRecordQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(String id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.WorkOrder; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.platform.domain.form.*; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.query.WorkOrderQuery; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 工单 服务类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | public interface WorkOrderService extends IService<WorkOrder> { |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result add(WorkOrderForm form); |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result update(WorkOrderForm form); |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(WorkOrderQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(String id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | |
| | | /** |
| | | * 工单审核 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result auditing(WorkOrderAuditingForm form); |
| | | |
| | | /** |
| | | * 运维情况 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result ywCondition(WorkOrderYWConditionForm form); |
| | | |
| | | /** |
| | | * 运维结果 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result ywResult(WorkOrderYWResultForm form); |
| | | |
| | | /** |
| | | * 检测结果 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result checkResult(WorkOrderCheckResultForm form); |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.WorkOrderYwConditionRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.query.WorkOrderYwConditionRecordQuery; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 工单运维情况记录 服务类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-06 |
| | | */ |
| | | public interface WorkOrderYwConditionRecordService extends IService<WorkOrderYwConditionRecord> { |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(WorkOrderYwConditionRecordQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(String id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.YwPoint; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.form.YwPointForm; |
| | | import com.ycl.platform.domain.query.YwPointQuery; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 运维点位 服务类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | public interface YwPointService extends IService<YwPoint> { |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result add(YwPointForm form); |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result update(YwPointForm form); |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(YwPointQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(String id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | |
| | | /** |
| | | * 批量添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result batchAdd(List<YwPointForm> form); |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.platform.domain.entity.DefaultAuditing; |
| | | import com.ycl.platform.mapper.DefaultAuditingMapper; |
| | | import com.ycl.platform.service.DefaultAuditingService; |
| | | import com.ycl.system.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.form.DefaultAuditingForm; |
| | | import com.ycl.platform.domain.vo.DefaultAuditingVO; |
| | | import com.ycl.platform.domain.query.DefaultAuditingQuery; |
| | | import java.util.List; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.system.page.PageUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.Assert; |
| | | import java.util.ArrayList; |
| | | import java.util.stream.Collectors; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | | * 违规审核 服务实现类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class DefaultAuditingServiceImpl extends ServiceImpl<DefaultAuditingMapper, DefaultAuditing> implements DefaultAuditingService { |
| | | |
| | | private final DefaultAuditingMapper defaultAuditingMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result add(DefaultAuditingForm form) { |
| | | DefaultAuditing entity = DefaultAuditingForm.getEntityByForm(form, null); |
| | | if(baseMapper.insert(entity) > 0) { |
| | | return Result.ok("添加成功"); |
| | | } |
| | | return Result.error("添加失败"); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result update(DefaultAuditingForm form) { |
| | | |
| | | DefaultAuditing entity = baseMapper.selectById(form.getId()); |
| | | |
| | | // 为空抛IllegalArgumentException,做全局异常处理 |
| | | Assert.notNull(entity, "记录不存在"); |
| | | BeanUtils.copyProperties(form, entity); |
| | | if (baseMapper.updateById(entity) > 0) { |
| | | return Result.ok("修改成功"); |
| | | } |
| | | return Result.error("修改失败"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | if(baseMapper.deleteBatchIds(ids) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | if(baseMapper.deleteById(id) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(DefaultAuditingQuery query) { |
| | | |
| | | IPage<DefaultAuditing> page = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .orderByDesc(DefaultAuditing::getCreateTime) |
| | | .page(PageUtil.getPage(query, DefaultAuditing.class)); |
| | | |
| | | List<DefaultAuditingVO> vos = page.getRecords().stream() |
| | | .map( |
| | | entity -> DefaultAuditingVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(String id) { |
| | | |
| | | DefaultAuditing entity = baseMapper.selectById(id); |
| | | Assert.notNull(entity, "记录不存在"); |
| | | DefaultAuditingVO vo = DefaultAuditingVO.getVoByEntity(entity, null); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<DefaultAuditing> entities = baseMapper.selectList(null); |
| | | List<DefaultAuditingVO> vos = entities.stream() |
| | | .map( |
| | | entity -> DefaultAuditingVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.exception.ServiceException; |
| | | import com.ycl.platform.domain.entity.DefaultRule; |
| | | import com.ycl.platform.domain.entity.YwUnit; |
| | | import com.ycl.platform.domain.form.DefaultRuleSetForm; |
| | | import com.ycl.platform.mapper.DefaultRuleMapper; |
| | | import com.ycl.platform.service.DefaultRuleService; |
| | | import com.ycl.system.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.form.DefaultRuleForm; |
| | | import com.ycl.platform.domain.vo.DefaultRuleVO; |
| | | import com.ycl.platform.domain.query.DefaultRuleQuery; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.system.page.PageUtil; |
| | | import com.ycl.utils.DateUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.Assert; |
| | | import java.util.ArrayList; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | /** |
| | | * 违约规则 服务实现类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class DefaultRuleServiceImpl extends ServiceImpl<DefaultRuleMapper, DefaultRule> implements DefaultRuleService { |
| | | |
| | | private final DefaultRuleMapper defaultRuleMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result add(DefaultRuleForm form) { |
| | | DefaultRule entity = DefaultRuleForm.getEntityByForm(form, null); |
| | | entity.setRuleStatus("未启用"); |
| | | if(baseMapper.insert(entity) > 0) { |
| | | return Result.ok("添加成功"); |
| | | } |
| | | return Result.error("添加失败"); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result update(DefaultRuleForm form) { |
| | | |
| | | DefaultRule entity = baseMapper.selectById(form.getId()); |
| | | |
| | | // 为空抛IllegalArgumentException,做全局异常处理 |
| | | Assert.notNull(entity, "记录不存在"); |
| | | BeanUtils.copyProperties(form, entity); |
| | | if (baseMapper.updateById(entity) > 0) { |
| | | return Result.ok("修改成功"); |
| | | } |
| | | return Result.error("修改失败"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | if(baseMapper.deleteBatchIds(ids) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | if(baseMapper.deleteById(id) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(DefaultRuleQuery query) { |
| | | |
| | | IPage<DefaultRule> page = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .like(StringUtils.hasText(query.getRuleName()), DefaultRule::getRuleName, query.getRuleName()) |
| | | .between(Objects.nonNull(query.getStart()) && Objects.nonNull(query.getEnd()), |
| | | DefaultRule::getCreateTime, |
| | | DateUtils.getDayStart(query.getStart()), |
| | | DateUtils.getDayEnd(query.getEnd())) |
| | | .orderByDesc(DefaultRule::getCreateTime) |
| | | .page(PageUtil.getPage(query, DefaultRule.class)); |
| | | |
| | | List<DefaultRuleVO> vos = page.getRecords().stream() |
| | | .map( |
| | | entity -> DefaultRuleVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(String id) { |
| | | |
| | | DefaultRule entity = baseMapper.selectById(id); |
| | | Assert.notNull(entity, "记录不存在"); |
| | | DefaultRuleVO vo = DefaultRuleVO.getVoByEntity(entity, null); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<DefaultRule> entities = baseMapper.selectList(null); |
| | | List<DefaultRuleVO> vos = entities.stream() |
| | | .map( |
| | | entity -> DefaultRuleVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | |
| | | @Override |
| | | public Result set(DefaultRuleSetForm form) { |
| | | DefaultRule defaultRule = baseMapper.selectById(form.getId()); |
| | | if (Objects.isNull(defaultRule)) { |
| | | throw new ServiceException("违约规则不存在"); |
| | | } |
| | | if (form.getFlag()) { |
| | | // 启用之前检查是否已经有启用的规则了,保持一个开启 |
| | | List<DefaultRule> useList = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(DefaultRule::getRuleStatus, "启用") |
| | | .list(); |
| | | if (! CollectionUtils.isEmpty(useList)) { |
| | | throw new ServiceException("已经有规则被启用了,只能同时启用一个规则"); |
| | | } |
| | | defaultRule.setRuleStatus("启用"); |
| | | } else { |
| | | defaultRule.setRuleStatus("未启用"); |
| | | } |
| | | baseMapper.updateById(defaultRule); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.platform.domain.entity.WorkOrderAuditingRecord; |
| | | import com.ycl.platform.mapper.WorkOrderAuditingRecordMapper; |
| | | import com.ycl.platform.service.WorkOrderAuditingRecordService; |
| | | import com.ycl.system.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.vo.WorkOrderAuditingRecordVO; |
| | | import com.ycl.platform.domain.query.WorkOrderAuditingRecordQuery; |
| | | import java.util.List; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.system.page.PageUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.Assert; |
| | | import java.util.ArrayList; |
| | | import java.util.stream.Collectors; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | | * 工单审核记录 服务实现类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-06 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class WorkOrderAuditingRecordServiceImpl extends ServiceImpl<WorkOrderAuditingRecordMapper, WorkOrderAuditingRecord> implements WorkOrderAuditingRecordService { |
| | | |
| | | private final WorkOrderAuditingRecordMapper workOrderAuditingRecordMapper; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | if(baseMapper.deleteBatchIds(ids) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | if(baseMapper.deleteById(id) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(WorkOrderAuditingRecordQuery query) { |
| | | |
| | | IPage<WorkOrderAuditingRecord> page = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .orderByDesc(WorkOrderAuditingRecord::getCreateTime) |
| | | .page(PageUtil.getPage(query, WorkOrderAuditingRecord.class)); |
| | | |
| | | List<WorkOrderAuditingRecordVO> vos = page.getRecords().stream() |
| | | .map( |
| | | entity -> WorkOrderAuditingRecordVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(String id) { |
| | | |
| | | WorkOrderAuditingRecord entity = baseMapper.selectById(id); |
| | | Assert.notNull(entity, "记录不存在"); |
| | | WorkOrderAuditingRecordVO vo = WorkOrderAuditingRecordVO.getVoByEntity(entity, null); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<WorkOrderAuditingRecord> entities = baseMapper.selectList(null); |
| | | List<WorkOrderAuditingRecordVO> vos = entities.stream() |
| | | .map( |
| | | entity -> WorkOrderAuditingRecordVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.exception.ServiceException; |
| | | import com.ycl.platform.domain.entity.*; |
| | | import com.ycl.platform.domain.form.*; |
| | | import com.ycl.platform.mapper.*; |
| | | import com.ycl.platform.service.WorkOrderService; |
| | | import com.ycl.system.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.vo.WorkOrderVO; |
| | | import com.ycl.platform.domain.query.WorkOrderQuery; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.system.page.PageUtil; |
| | | import com.ycl.utils.DateUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.Assert; |
| | | import java.util.ArrayList; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | /** |
| | | * 工单 服务实现类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder> implements WorkOrderService { |
| | | |
| | | private final WorkOrderMapper workOrderMapper; |
| | | private final YwUnitMapper ywUnitMapper; |
| | | private final YwPeopleMapper ywPeopleMapper; |
| | | private final WorkOrderAuditingRecordMapper workOrderAuditingRecordMapper; |
| | | private final WorkOrderYwConditionRecordMapper workOrderYwConditionRecordMapper; |
| | | |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result add(WorkOrderForm form) { |
| | | WorkOrder entity = WorkOrderForm.getEntityByForm(form, null); |
| | | if(baseMapper.insert(entity) > 0) { |
| | | return Result.ok("添加成功"); |
| | | } |
| | | return Result.error("添加失败"); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result update(WorkOrderForm form) { |
| | | |
| | | WorkOrder entity = baseMapper.selectById(form.getId()); |
| | | |
| | | // 为空抛IllegalArgumentException,做全局异常处理 |
| | | Assert.notNull(entity, "记录不存在"); |
| | | BeanUtils.copyProperties(form, entity); |
| | | if (baseMapper.updateById(entity) > 0) { |
| | | return Result.ok("修改成功"); |
| | | } |
| | | return Result.error("修改失败"); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Result auditing(WorkOrderAuditingForm form) { |
| | | WorkOrder workOrder = baseMapper.selectById(form.getId()); |
| | | if (Objects.isNull(workOrder)) { |
| | | throw new ServiceException("工单不存在"); |
| | | } |
| | | // 工单状态 |
| | | if ("pass".equals(form.getAuditingResult())) { |
| | | workOrder.setStatus("finish"); |
| | | } else { |
| | | workOrder.setStatus("auditing"); |
| | | } |
| | | baseMapper.updateById(workOrder); |
| | | // 添加一条审核记录 |
| | | WorkOrderAuditingRecord workOrderAuditingRecord = new WorkOrderAuditingRecord(); |
| | | workOrderAuditingRecord.setWorkOrderId(workOrder.getId()); |
| | | workOrderAuditingRecord.setAuditingUser(1); |
| | | workOrderAuditingRecord.setResult(form.getAuditingResult()); |
| | | workOrderAuditingRecord.setRemark(form.getAuditingRemark()); |
| | | workOrderAuditingRecordMapper.insert(workOrderAuditingRecord); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Result ywCondition(WorkOrderYWConditionForm form) { |
| | | WorkOrder workOrder = baseMapper.selectById(form.getId()); |
| | | if (Objects.isNull(workOrder)) { |
| | | throw new ServiceException("工单不存在"); |
| | | } |
| | | // 工单状态 |
| | | workOrder.setStatus("commit-condition"); |
| | | baseMapper.updateById(workOrder); |
| | | // 添加一条运维情况记录 |
| | | WorkOrderYwConditionRecord workOrderYwConditionRecord = new WorkOrderYwConditionRecord(); |
| | | workOrderYwConditionRecord.setWorkOrderId(workOrder.getId()); |
| | | workOrderYwConditionRecord.setCommitUser(1); |
| | | workOrderYwConditionRecord.setYwCondition(form.getYwCondition()); |
| | | workOrderYwConditionRecordMapper.insert(workOrderYwConditionRecord); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public Result ywResult(WorkOrderYWResultForm form) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public Result checkResult(WorkOrderCheckResultForm form) { |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | if(baseMapper.deleteBatchIds(ids) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | if(baseMapper.deleteById(id) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(WorkOrderQuery query) { |
| | | IPage<WorkOrder> page = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(StringUtils.hasText(query.getWorkOrderNo()), WorkOrder::getWorkOrderNo, query.getWorkOrderNo()) |
| | | .between(Objects.nonNull(query.getStart()) && Objects.nonNull(query.getEnd()), |
| | | WorkOrder::getYwHandleTime, |
| | | DateUtils.getDayStart(query.getStart()), |
| | | DateUtils.getDayEnd(query.getEnd())) |
| | | .orderByDesc(WorkOrder::getCreateTime) |
| | | .page(PageUtil.getPage(query, WorkOrder.class)); |
| | | |
| | | List<WorkOrderVO> vos = page.getRecords().stream() |
| | | .map( |
| | | entity -> { |
| | | WorkOrderVO vo = WorkOrderVO.getVoByEntity(entity, null); |
| | | YwUnit unit = ywUnitMapper.selectById(vo.getUnitId()); |
| | | if (Objects.nonNull(unit)) { |
| | | vo.setUnitName(unit.getUnitName()); |
| | | } |
| | | YwPeople ywPeople = ywPeopleMapper.selectById(vo.getYwPeopleId()); |
| | | if (Objects.nonNull(ywPeople)) { |
| | | vo.setYwPeopleName(ywPeople.getYwPersonName()); |
| | | } |
| | | return vo; |
| | | } |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(String id) { |
| | | |
| | | WorkOrder entity = baseMapper.selectById(id); |
| | | Assert.notNull(entity, "记录不存在"); |
| | | WorkOrderVO vo = WorkOrderVO.getVoByEntity(entity, null); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<WorkOrder> entities = baseMapper.selectList(null); |
| | | List<WorkOrderVO> vos = entities.stream() |
| | | .map( |
| | | entity -> WorkOrderVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.platform.domain.entity.WorkOrderYwConditionRecord; |
| | | import com.ycl.platform.mapper.WorkOrderYwConditionRecordMapper; |
| | | import com.ycl.platform.service.WorkOrderYwConditionRecordService; |
| | | import com.ycl.system.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.vo.WorkOrderYwConditionRecordVO; |
| | | import com.ycl.platform.domain.query.WorkOrderYwConditionRecordQuery; |
| | | import java.util.List; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.system.page.PageUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.Assert; |
| | | import java.util.stream.Collectors; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | | * 工单运维情况记录 服务实现类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-06 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class WorkOrderYwConditionRecordServiceImpl extends ServiceImpl<WorkOrderYwConditionRecordMapper, WorkOrderYwConditionRecord> implements WorkOrderYwConditionRecordService { |
| | | |
| | | private final WorkOrderYwConditionRecordMapper workOrderYwConditionRecordMapper; |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | if(baseMapper.deleteBatchIds(ids) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | if(baseMapper.deleteById(id) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(WorkOrderYwConditionRecordQuery query) { |
| | | |
| | | IPage<WorkOrderYwConditionRecord> page = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .orderByDesc(WorkOrderYwConditionRecord::getCreateTime) |
| | | .page(PageUtil.getPage(query, WorkOrderYwConditionRecord.class)); |
| | | |
| | | List<WorkOrderYwConditionRecordVO> vos = page.getRecords().stream() |
| | | .map( |
| | | entity -> WorkOrderYwConditionRecordVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(String id) { |
| | | |
| | | WorkOrderYwConditionRecord entity = baseMapper.selectById(id); |
| | | Assert.notNull(entity, "记录不存在"); |
| | | WorkOrderYwConditionRecordVO vo = WorkOrderYwConditionRecordVO.getVoByEntity(entity, null); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<WorkOrderYwConditionRecord> entities = baseMapper.selectList(null); |
| | | List<WorkOrderYwConditionRecordVO> vos = entities.stream() |
| | | .map( |
| | | entity -> WorkOrderYwConditionRecordVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | } |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.platform.domain.entity.YwPeople; |
| | | import com.ycl.platform.domain.entity.YwUnit; |
| | | import com.ycl.platform.mapper.YwPeopleMapper; |
| | | import com.ycl.platform.mapper.YwUnitMapper; |
| | | import com.ycl.platform.service.YwPeopleService; |
| | | import com.ycl.system.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.util.Assert; |
| | | |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | /** |
| | | * 运维人员 服务实现类 |
| | |
| | | public class YwPeopleServiceImpl extends ServiceImpl<YwPeopleMapper, YwPeople> implements YwPeopleService { |
| | | |
| | | private final YwPeopleMapper ywPeopleMapper; |
| | | private final YwUnitMapper ywUnitMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | |
| | | @Override |
| | | public Result add(YwPeopleForm form) { |
| | | YwPeople entity = YwPeopleForm.getEntityByForm(form, null); |
| | | entity.setAddWay("manual"); |
| | | if(baseMapper.insert(entity) > 0) { |
| | | return Result.ok("添加成功"); |
| | | } |
| | |
| | | public Result page(YwPeopleQuery query) { |
| | | |
| | | IPage<YwPeople> page = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(StringUtils.hasText(query.getYwPersonCode()), YwPeople::getYwPersonCode, query.getYwPersonCode()) |
| | | .like(StringUtils.hasText(query.getYwPersonName()), YwPeople::getYwPersonName, query.getYwPersonName()) |
| | | .eq(Objects.nonNull(query.getBelongUnit()), YwPeople::getBelongUnit, query.getBelongUnit()) |
| | | .orderByDesc(YwPeople::getCreateTime) |
| | | .page(PageUtil.getPage(query, YwPeople.class)); |
| | | |
| | | List<YwPeopleVO> vos = page.getRecords().stream() |
| | | .map( |
| | | entity -> YwPeopleVO.getVoByEntity(entity, null) |
| | | entity -> { |
| | | YwPeopleVO vo = YwPeopleVO.getVoByEntity(entity, null); |
| | | YwUnit unit = new LambdaQueryChainWrapper<>(ywUnitMapper) |
| | | .eq(YwUnit::getId, vo.getBelongUnit()) |
| | | .select(YwUnit::getUnitName) |
| | | .one(); |
| | | if (Objects.nonNull(unit)) { |
| | | vo.setBelongUnitName(unit.getUnitName()); |
| | | } |
| | | return vo; |
| | | } |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos).total(page.getTotal()); |
| New file |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.platform.domain.entity.YwPoint; |
| | | import com.ycl.platform.mapper.YwPointMapper; |
| | | import com.ycl.platform.service.YwPointService; |
| | | import com.ycl.system.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.form.YwPointForm; |
| | | import com.ycl.platform.domain.vo.YwPointVO; |
| | | import com.ycl.platform.domain.query.YwPointQuery; |
| | | import java.util.List; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.system.page.PageUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.Assert; |
| | | import java.util.ArrayList; |
| | | import java.util.stream.Collectors; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | | * 运维点位 服务实现类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-03-05 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class YwPointServiceImpl extends ServiceImpl<YwPointMapper, YwPoint> implements YwPointService { |
| | | |
| | | private final YwPointMapper ywPointMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result add(YwPointForm form) { |
| | | YwPoint entity = YwPointForm.getEntityByForm(form, null); |
| | | if(baseMapper.insert(entity) > 0) { |
| | | return Result.ok("添加成功"); |
| | | } |
| | | return Result.error("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Result batchAdd(List<YwPointForm> formList) { |
| | | formList.stream() |
| | | .forEach(form -> { |
| | | YwPoint entity = YwPointForm.getEntityByForm(form, null); |
| | | entity.setStatus("未开始"); |
| | | baseMapper.insert(entity); |
| | | }); |
| | | return Result.ok("添加成功"); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result update(YwPointForm form) { |
| | | |
| | | YwPoint entity = baseMapper.selectById(form.getId()); |
| | | |
| | | // 为空抛IllegalArgumentException,做全局异常处理 |
| | | Assert.notNull(entity, "记录不存在"); |
| | | BeanUtils.copyProperties(form, entity); |
| | | if (baseMapper.updateById(entity) > 0) { |
| | | return Result.ok("修改成功"); |
| | | } |
| | | return Result.error("修改失败"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | if(baseMapper.deleteBatchIds(ids) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | if(baseMapper.deleteById(id) > 0) { |
| | | return Result.ok("删除成功"); |
| | | } |
| | | return Result.error("删除失败"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(YwPointQuery query) { |
| | | |
| | | IPage<YwPoint> page = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .orderByDesc(YwPoint::getCreateTime) |
| | | .page(PageUtil.getPage(query, YwPoint.class)); |
| | | |
| | | List<YwPointVO> vos = page.getRecords().stream() |
| | | .map( |
| | | entity -> YwPointVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(String id) { |
| | | |
| | | YwPoint entity = baseMapper.selectById(id); |
| | | Assert.notNull(entity, "记录不存在"); |
| | | YwPointVO vo = YwPointVO.getVoByEntity(entity, null); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<YwPoint> entities = baseMapper.selectList(null); |
| | | List<YwPointVO> vos = entities.stream() |
| | | .map( |
| | | entity -> YwPointVO.getVoByEntity(entity, null) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | } |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | import com.ycl.platform.base.BaseSelect; |
| | | import com.ycl.platform.domain.entity.YwUnit; |
| | | import com.ycl.platform.domain.form.YwUnitForm; |
| | | import com.ycl.platform.domain.query.YwUnitQuery; |
| | |
| | | import com.ycl.system.page.PageUtil; |
| | | import com.ycl.platform.service.YwUnitService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.utils.DateUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.util.Assert; |
| | | |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | /** |
| | | * 运维单位 服务实现类 |
| | |
| | | */ |
| | | @Override |
| | | public Result add(YwUnitForm form) { |
| | | // todo 增加对应账号 |
| | | YwUnit entity = YwUnitForm.getEntityByForm(form, null); |
| | | if(baseMapper.insert(entity) > 0) { |
| | | return Result.ok("添加成功"); |
| | |
| | | */ |
| | | @Override |
| | | public Result update(YwUnitForm form) { |
| | | |
| | | // todo 修改对应账号 |
| | | YwUnit entity = baseMapper.selectById(form.getId()); |
| | | |
| | | // 为空抛IllegalArgumentException,做全局异常处理 |
| | |
| | | */ |
| | | @Override |
| | | public Result page(YwUnitQuery query) { |
| | | |
| | | // 分页条件查询你 |
| | | IPage<YwUnit> page = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(StringUtils.hasText(query.getUnitCode()), YwUnit::getUnitCode, query.getUnitCode()) |
| | | .like(StringUtils.hasText(query.getUnitName()), YwUnit::getUnitName, query.getUnitName()) |
| | | .between(Objects.nonNull(query.getStart()) && Objects.nonNull(query.getEnd()), |
| | | YwUnit::getCreateTime, |
| | | DateUtils.getDayStart(query.getStart()), |
| | | DateUtils.getDayEnd(query.getEnd())) |
| | | .orderByDesc(YwUnit::getCreateTime) |
| | | .page(PageUtil.getPage(query, YwUnit.class)); |
| | | |
| | |
| | | @Override |
| | | public Result all() { |
| | | List<YwUnit> entities = baseMapper.selectList(null); |
| | | List<YwUnitVO> vos = entities.stream() |
| | | |
| | | List<BaseSelect> vos = entities.stream() |
| | | .map( |
| | | entity -> YwUnitVO.getVoByEntity(entity, null) |
| | | entity -> { |
| | | BaseSelect baseSelect = new BaseSelect(); |
| | | baseSelect.setId(entity.getId()); |
| | | baseSelect.setValue(entity.getUnitName()); |
| | | return baseSelect; |
| | | } |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | |
| | | |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | |
| | | import javax.annotation.Nullable; |
| | | import java.lang.management.ManagementFactory; |
| | | import java.sql.Timestamp; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.*; |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 时间工具类 |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class DateUtils extends org.apache.commons.lang3.time.DateUtils |
| | |
| | | public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; |
| | | |
| | | private static String[] parsePatterns = { |
| | | "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", |
| | | "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", |
| | | "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", |
| | | "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"}; |
| | | |
| | | /** |
| | | * 获取当前Date型日期 |
| | | * |
| | | * |
| | | * @return Date() 当前日期 |
| | | */ |
| | | public static Date getNowDate() |
| | |
| | | |
| | | /** |
| | | * 获取当前日期, 默认格式为yyyy-MM-dd |
| | | * |
| | | * |
| | | * @return String |
| | | */ |
| | | public static String getDate() |
| | |
| | | ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault()); |
| | | return Date.from(zdt.toInstant()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取某天的开始时间 |
| | | * |
| | | * @param date |
| | | * @return 2023-01-01 00:00:00 |
| | | */ |
| | | public static Date getDayStart(@Nullable Date date) { |
| | | if (Objects.isNull(date)) { |
| | | date = new Date(); |
| | | } |
| | | LocalDateTime localDateTime = LocalDateTime.ofInstant(date.toInstant(), ZoneId.of("GMT+8")); |
| | | LocalDateTime of = LocalDateTime.of(localDateTime.getYear(), localDateTime.getMonth(), localDateTime.getDayOfMonth(), 0, 0, 0); |
| | | return Timestamp.valueOf(of); |
| | | } |
| | | |
| | | /** |
| | | * 获取某天的结束时间 |
| | | * |
| | | * @param date |
| | | * @return 2023-01-01 23:59:59 |
| | | */ |
| | | public static Date getDayEnd(@Nullable Date date) { |
| | | if (Objects.isNull(date)) { |
| | | date = new Date(); |
| | | } |
| | | LocalDateTime localDateTime = LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); |
| | | LocalDateTime of = LocalDateTime.of(localDateTime.getYear(), localDateTime.getMonth(), localDateTime.getDayOfMonth(), 23, 59, 59); |
| | | return Timestamp.valueOf(of); |
| | | } |
| | | } |
| New file |
| | |
| | | <?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.ycl.platform.mapper.DefaultAuditingMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.DefaultAuditingVO"> |
| | | <result column="id" property="id" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="default_id" property="defaultId" /> |
| | | <result column="auditing_status" property="auditingStatus" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="auditing_time" property="auditingTime" /> |
| | | <result column="auditing_user" property="auditingUser" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?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.ycl.platform.mapper.DefaultRuleMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.DefaultRuleVO"> |
| | | <result column="id" property="id" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="rule_name" property="ruleName" /> |
| | | <result column="rule_detail" property="ruleDetail" /> |
| | | <result column="rule_desc" property="ruleDesc" /> |
| | | <result column="rule_status" property="ruleStatus" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?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.ycl.platform.mapper.WorkOrderMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.WorkOrderVO"> |
| | | <result column="id" property="id" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="work_order_no" property="workOrderNo" /> |
| | | <result column="unit_id" property="unitId" /> |
| | | <result column="yw_people_id" property="ywPeopleId" /> |
| | | <result column="yw_handle_time" property="ywHandleTime" /> |
| | | <result column="yw_result" property="ywResult" /> |
| | | <result column="yw_condition" property="ywCondition" /> |
| | | <result column="yw_check_result" property="ywCheckResult" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?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.ycl.platform.mapper.YwPeopleMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="YwPeopleVO"> |
| | | <result column="id" property="id" /> |
| | | <result column="yw_person_code" property="ywPersonCode" /> |
| | | <result column="yw_person_name" property="ywPersonName" /> |
| | | <result column="yw_person_account" property="ywPersonAccount" /> |
| | | <result column="belong_unit" property="belongUnit" /> |
| | | <result column="add_way" property="addWay" /> |
| | | <result column="phone" property="phone" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?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.ycl.platform.mapper.YwPointMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.YwPointVO"> |
| | | <result column="id" property="id" /> |
| | | <result column="point_name" property="pointName" /> |
| | | <result column="start_time" property="startTime" /> |
| | | <result column="end_time" property="endTime" /> |
| | | <result column="unit_id" property="unitId" /> |
| | | <result column="status" property="status" /> |
| | | <result column="remark" property="remark" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.platform.mapper.YwUnitMapper"> |
| | | |
| | | <resultMap type="YwUnit" id="YwUnitResult"> |
| | | <resultMap type="YwUnitVo" id="YwUnitResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="unitCode" column="unit_code" /> |
| | | <result property="unitName" column="unit_name" /> |
| | |
| | | <result property="unitAdminAccount" column="unit_admin_account" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="deleted" column="deleted" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectYwUnitVo"> |