123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- package com.miniframe.mappers.es.dao;
- import com.miniframe.mappers.es.model.ProComAttDto;
- import com.miniframe.model.es.EsDataAtt;
- import com.miniframe.model.system.SysUser;
- import com.miniframe.system.MiniserviceBaseDao;
- import org.apache.ibatis.annotations.Delete;
- import org.apache.ibatis.annotations.Select;
- import java.util.List;
- public interface EsMapper extends MiniserviceBaseDao {
- /**
- * 删除 连线
- * @param pid
- * @return
- */
- @Delete("delete from es_pro_com_con where pid =#{pid}")
- void deleteEsProComCon(String pid);
- /**
- * 删除 组件属性值
- * @param pid
- * @return
- */
- @Delete("delete from es_pro_com_att_data where pid =#{pid}")
- Integer deleteEsProComAttData(String pid);
- /**
- * 删除 组件属性
- * @param pid
- * @return
- */
- @Delete("delete from es_pro_com_att where pid =#{pid}")
- Integer deleteEsProComAtt(String pid);
- /**
- * 删除 组件
- * @param pid
- * @return
- */
- @Delete("delete from es_pro_com where pid =#{pid}")
- Integer deletEsProCom(String pid);
- /**
- * 项目组件 获取最大编号
- * @param pid
- * @param idCode
- * @return
- */
- @Select("select max(ser) from es_pro_com where pid =#{pid} and id_code=#{idCode}")
- Integer getProComSer(String pid,String idCode);
- /**
- * 项目组件属性值数据
- * @param pcId
- * @return
- */
- @Select("select a.pca_id as pcaId," +
- "a.value as value," +
- "a.unit as unit," +
- "b.unit_type as unitType," +
- "b.name as name," +
- "b.code as code," +
- "b.value_def as valueDef," +
- "b.value_type as valueType, " +
- "(select max(c.type) from es_data as c where c.cd_id = b.value_def) as dataType " +
- "from es_pro_com_att a,es_att b where a.att_id=b.att_id and pc_id=#{pcId} ORDER BY ser asc;")
- List<ProComAttDto> selectPrComAttList(String pcId);
- /**
- * 项目组件属性值数据 排除数列数据
- * @param pcId
- * @return
- */
- @Select("select a.pca_id as pcaId," +
- "a.value as value," +
- "a.unit as unit," +
- "b.unit_type as unitType," +
- "b.name as name," +
- "b.code as code," +
- "b.value_def as valueDef," +
- "b.value_type as valueType, " +
- "(select max(c.type) from es_data as c where c.cd_id = b.value_def) as dataType " +
- "from es_pro_com_att a,es_att b " +
- "where a.att_id=b.att_id " +
- "and value_type in(0,1,2) " +
- "and pc_id=#{pcId} " +
- "ORDER BY b.ser asc;")
- List<ProComAttDto> selectPrComAttListNoData(String pcId);
- /**
- * 项目组件属性值数据查询
- * @param pcId 项目组件ID
- * @return
- */
- @Select("select DISTINCT cd_id from es_pro_com_att_data where pc_id = #{pcId} order by cd_id asc")
- List<String> selectAttDataCdIds(String pcId);
- /**
- * 项目组件属性值数据查询
- * @param pcId
- * @return
- */
- @Select("select a.value as value, " +
- "a.unit as unit, " +
- "b.unit_type as unitType, " +
- "b.name as name, " +
- "b.code as code, " +
- "b.value_def as valueDef, " +
- "b.value_type as valueType,0 as dataType " +
- "from es_pro_com_att_data a,es_data_att b " +
- "where a.cdv_id = b.cdv_id and a.pc_id= #{pcId} " +
- "and a.cd_id=#{cdId} " +
- "ORDER BY b.ser asc;")
- List<ProComAttDto> selectPrComAttDataList(String pcId,String cdId);
- /**
- * 获取组件连接的节点IdCode+Ser 如:N1 N2
- * @param pcId
- * @return
- */
- @Select("select DISTINCT concat(a.id_code,a.ser) from es_pro_com a ,es_pro_com_con b where a.pc_id = b.npc_id and b.pc_id =#{pcId}")
- List<String> selectComconNodeIdcodeSer(String pcId);
- /**
- * 模拟属性查询
- * @param pcId
- * @return
- */
- @Select("select a.pca_id as pcaId," +
- "a.value as value," +
- "a.unit as unit," +
- "b.unit_type as unitType," +
- "b.name as name," +
- "b.code as code," +
- "b.value_def as valueDef," +
- "b.value_type as valueType, " +
- "0 as dataType " +
- "from es_pro_com_att a,es_att b " +
- "where a.att_id=b.att_id " +
- "and a.com_id='-1' " +
- "and pid=#{pcId} ORDER BY ser asc;")
- List<ProComAttDto> selectSimulationsPrComAttDataList(String pcId);
- }
|