del: 删除不用的
parent
eb55a2cfc6
commit
088176196b
@ -1,66 +0,0 @@
|
||||
package com.xydl.cac.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Entity
|
||||
@Table(name = "icd_file_config")
|
||||
@ApiModel("ICD文件配置表")
|
||||
public class IcdFileConfig {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
@Column(name = "ied_name")
|
||||
private String iedName;
|
||||
|
||||
@Column(name = "ldevice_inst")
|
||||
private String ldeviceInst;
|
||||
|
||||
@Column(name = "ln_class")
|
||||
private String lnClass;
|
||||
|
||||
@Column(name = "do_name")
|
||||
private String doName;
|
||||
|
||||
@Column(name = "last_name")
|
||||
private String lastName;
|
||||
|
||||
@Column(name = "table_name")
|
||||
private String tableName;
|
||||
|
||||
@Column(name = "col_name")
|
||||
private String colName;
|
||||
|
||||
@Transient
|
||||
private List<IcdFileConfigInst> instList;
|
||||
|
||||
public void addInst(String inst, String paramindex) {
|
||||
if (instList == null) {
|
||||
instList = new ArrayList<>();
|
||||
}
|
||||
IcdFileConfigInst item = IcdFileConfigInst.builder()
|
||||
.inst(inst)
|
||||
.paramindex(paramindex)
|
||||
.build();
|
||||
instList.add(item);
|
||||
}
|
||||
|
||||
public String buildParamIndex(IcdFileConfigInst inst) {
|
||||
String param = iedName + ldeviceInst + "/" + lnClass + inst.getInst() + "$" + inst.getParamindex();
|
||||
return param;
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
package com.xydl.cac.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Entity
|
||||
@Table(name = "icd_file_config_inst")
|
||||
@ApiModel("ICD文件实例表")
|
||||
public class IcdFileConfigInst {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
@Column(name = "config_id")
|
||||
private Integer configId;
|
||||
|
||||
@Column(name = "inst")
|
||||
private String inst;
|
||||
|
||||
@Column(name = "paramindex")
|
||||
private String paramindex;
|
||||
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package com.xydl.cac.repository;
|
||||
|
||||
import com.xydl.cac.entity.IcdFileConfigInst;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Repository
|
||||
public interface IcdFileConfigInstRepository extends JpaRepository<IcdFileConfigInst, Integer>, JpaSpecificationExecutor<IcdFileConfigInst> {
|
||||
|
||||
List<IcdFileConfigInst> findByConfigId(Integer configId);
|
||||
|
||||
void deleteByConfigId(Integer configId);
|
||||
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.xydl.cac.repository;
|
||||
|
||||
import com.xydl.cac.entity.IcdFileConfig;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Repository
|
||||
public interface IcdFileConfigRepository extends JpaRepository<IcdFileConfig, Integer>, JpaSpecificationExecutor<IcdFileConfig> {
|
||||
|
||||
List<IcdFileConfig> findByIedName(String iedName);
|
||||
|
||||
List<IcdFileConfig> findByIedNameAndLdeviceInstAndLnClassAndDoName(String iedName, String ldeviceInst, String lnClass, String doName);
|
||||
}
|
Loading…
Reference in New Issue