Commit 51e33a97 authored by 王夏晖's avatar 王夏晖

Merge remote-tracking branch 'origin/develop' into develop

parents 61ccebf8 140c4888
package org.rcisoft.business.mainte.paramlibrary.dao;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.rcisoft.business.mainte.paramlibrary.entity.BusParamLibrary;
import org.rcisoft.core.base.BaseMapper;
......@@ -78,4 +80,11 @@ public interface ParamLibraryRepository extends BaseMapper<BusParamLibrary>{
" <if test = 'year != null '> and year = #{year} </if> "
+ "</script>")
List<Map<String,Object>> queryParamLibrary(Map<String,Object> map);
@Insert("<script><foreach collection=\"resultList\" item=\"item\" separator=\";\">" +
"insert into bus_param_library(DEV_NUM,P1,P1_V,P2,P2_V,P3,P3_V,POWER,GAS_SPEED,YEAR) " +
"values(#{devNum},#{p1},#{p1V},#{p2},#{p2V},#{p3},#{p3V},#{power},#{gasSpeed},#{year})" +
"</foreach></script>")
@ResultType(value = Integer.class)
int saveBusParamLibraryList(List<BusParamLibrary> resultList);
}
package org.rcisoft.business.manage.dao;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.rcisoft.business.manage.entity.BusLibraryParam;
import org.rcisoft.core.base.BaseMapper;
......@@ -16,5 +17,15 @@ public interface BusLibraryParamRepository extends BaseMapper<BusLibraryParam> {
@Select("<script>select * from bus_param_library where dev_num = #{dev_num} limit 1</script>")
List<Map<String,Object>> queryParamLibraryByDev(Map<String,Object> map);
/**
* 查询参数编码
* @param devNum 设备编号
* @return param:参数代码,paramNm:参数名称
*/
@Select("<script>select l.PARAM param,t.PARAM_NM paramNm from bus_library_param l,bus_device_param d,bus_devicetp_param t " +
"where l.DEV_NUM=d.DEV_NUM and l.PARAM=d.PARAM and d.PARAM_CODE=t.PARAM_CODE " +
"and l.DEV_NUM=#{devNum} and t.PRO_ID=substring_index(#{devNum}, '_', 1)</script>")
List<Map<String, String>> selectParamsByDevNum(@Param(value = "devNum") String devNum);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment