故障信息模块
This commit is contained in:
		
							parent
							
								
									b961a45d4c
								
							
						
					
					
						commit
						ee79c8c600
					
				@ -0,0 +1,43 @@
 | 
				
			|||||||
 | 
					package com.yfd.platform.modules.basedata.controller;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.yfd.platform.annotation.Log;
 | 
				
			||||||
 | 
					import com.yfd.platform.config.ResponseResult;
 | 
				
			||||||
 | 
					import com.yfd.platform.modules.basedata.domain.FaultDevice;
 | 
				
			||||||
 | 
					import com.yfd.platform.modules.basedata.service.IFaultDeviceService;
 | 
				
			||||||
 | 
					import io.swagger.annotations.ApiOperation;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.PostMapping;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestBody;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestMapping;
 | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RestController;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import javax.annotation.Resource;
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * <p>
 | 
				
			||||||
 | 
					 * 前端控制器
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author zhengsl
 | 
				
			||||||
 | 
					 * @since 2025-05-12
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					@RestController
 | 
				
			||||||
 | 
					@RequestMapping("/basedata/fault-device")
 | 
				
			||||||
 | 
					public class FaultDeviceController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Resource
 | 
				
			||||||
 | 
					    private IFaultDeviceService faultDeviceService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Log(module = "故障检测", value = "新增故障信息", type = "1")
 | 
				
			||||||
 | 
					    @PostMapping("/batchAddFaultDevice")
 | 
				
			||||||
 | 
					    @ApiOperation("新增故障信息")
 | 
				
			||||||
 | 
					    public ResponseResult batchAddFaultDevice(@RequestBody List<FaultDevice> faultDevices) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        boolean isOk = faultDeviceService.batchAddFaultDevice(faultDevices);
 | 
				
			||||||
 | 
					        if (isOk) {
 | 
				
			||||||
 | 
					            return ResponseResult.success();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return ResponseResult.error();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,95 @@
 | 
				
			|||||||
 | 
					package com.yfd.platform.modules.basedata.domain;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.annotation.TableName;
 | 
				
			||||||
 | 
					import java.time.LocalDateTime;
 | 
				
			||||||
 | 
					import java.io.Serializable;
 | 
				
			||||||
 | 
					import lombok.Data;
 | 
				
			||||||
 | 
					import lombok.EqualsAndHashCode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * <p>
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author zhengsl
 | 
				
			||||||
 | 
					 * @since 2025-05-12
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					@Data
 | 
				
			||||||
 | 
					@EqualsAndHashCode(callSuper = false)
 | 
				
			||||||
 | 
					@TableName("iis_fault_device")
 | 
				
			||||||
 | 
					public class FaultDevice implements Serializable {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private static final long serialVersionUID = 1L;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * ID
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 故障编号
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String dictionaryCode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 故障名称
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String dictionaryName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 参数编号(和算法约定好的固定值)
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String paramCode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 参数名称(用来描述参数含义)
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String paramName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 设备点位名称
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String deviceName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 设备点位id
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String deviceId;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 来源类型(1:巡视点位;2:辅控信号)
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String sourceType;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 数据状态
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String datastatus;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 修改人
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String lastmodifier;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 最近修改时间
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private LocalDateTime lastmodifydate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 备用1
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String custom1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 备用2
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String custom2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 备用3
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    private String custom3;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,16 @@
 | 
				
			|||||||
 | 
					package com.yfd.platform.modules.basedata.mapper;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.yfd.platform.modules.basedata.domain.FaultDevice;
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * <p>
 | 
				
			||||||
 | 
					 *  Mapper 接口
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author zhengsl
 | 
				
			||||||
 | 
					 * @since 2025-05-12
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public interface FaultDeviceMapper extends BaseMapper<FaultDevice> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					package com.yfd.platform.modules.basedata.service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.yfd.platform.modules.basedata.domain.FaultDevice;
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.extension.service.IService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * <p>
 | 
				
			||||||
 | 
					 *  服务类
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author zhengsl
 | 
				
			||||||
 | 
					 * @since 2025-05-12
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public interface IFaultDeviceService extends IService<FaultDevice> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    boolean batchAddFaultDevice(List<FaultDevice> faultDevices);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					package com.yfd.platform.modules.basedata.service.impl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.yfd.platform.modules.basedata.domain.FaultDevice;
 | 
				
			||||||
 | 
					import com.yfd.platform.modules.basedata.mapper.FaultDeviceMapper;
 | 
				
			||||||
 | 
					import com.yfd.platform.modules.basedata.service.IFaultDeviceService;
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
				
			||||||
 | 
					import org.springframework.stereotype.Service;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * <p>
 | 
				
			||||||
 | 
					 * 服务实现类
 | 
				
			||||||
 | 
					 * </p>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @author zhengsl
 | 
				
			||||||
 | 
					 * @since 2025-05-12
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					@Service
 | 
				
			||||||
 | 
					public class FaultDeviceServiceImpl extends ServiceImpl<FaultDeviceMapper, FaultDevice> implements IFaultDeviceService {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public boolean batchAddFaultDevice(List<FaultDevice> faultDevices) {
 | 
				
			||||||
 | 
					        return this.saveBatch(faultDevices);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					<?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.yfd.platform.modules.basedata.mapper.FaultDeviceMapper">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</mapper>
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user