|
@@ -17,17 +17,17 @@
|
|
|
</collection>
|
|
|
</resultMap>
|
|
|
|
|
|
- <resultMap id="ruleModelResult" type="warningModelResult">
|
|
|
- <id property="id" column="id"/>
|
|
|
- <result property="modelName" column="model_name"/>
|
|
|
- <result property="code" column="code"/>
|
|
|
- <result property="description" column="description"/>
|
|
|
- <collection property="paramList" ofType="warningParamVo"
|
|
|
- column="{modelId=id,ruleId=rule_id}" select="ruleParamList"/>
|
|
|
-
|
|
|
- <collection property="areaList" ofType="warningAreaVo"
|
|
|
- column="{modelId=id,ruleId=rule_id}" select="ruleAreaList"/>
|
|
|
- </resultMap>
|
|
|
+<!-- <resultMap id="ruleModelResult" type="warningModelResult">-->
|
|
|
+<!-- <id property="id" column="id"/>-->
|
|
|
+<!-- <result property="modelName" column="model_name"/>-->
|
|
|
+<!-- <result property="code" column="code"/>-->
|
|
|
+<!-- <result property="description" column="description"/>-->
|
|
|
+<!-- <collection property="paramList" ofType="warningParamVo"-->
|
|
|
+<!-- column="{modelId=id,ruleId=rule_id}" select="ruleParamList"/>-->
|
|
|
+
|
|
|
+<!-- <collection property="areaList" ofType="warningAreaVo"-->
|
|
|
+<!-- column="{modelId=id,ruleId=rule_id}" select="ruleAreaList"/>-->
|
|
|
+<!-- </resultMap>-->
|
|
|
|
|
|
<select id="selectRuleList" parameterType="string" resultMap="ruleResult">
|
|
|
select rule.id,rule.`name`,rule.enabled,rule.del_flag,rule.start_time,rule.end_time
|
|
@@ -39,7 +39,7 @@
|
|
|
ORDER BY rule.create_time DESC
|
|
|
</select>
|
|
|
|
|
|
- <resultMap id="ruleModelResult1" type="warningModelResult">
|
|
|
+ <resultMap id="ruleModelResult" type="warningModelResult">
|
|
|
<id property="id" column="id"/>
|
|
|
<result property="modelName" column="model_name"/>
|
|
|
<result property="code" column="code"/>
|
|
@@ -53,6 +53,7 @@
|
|
|
<result property="isMust" column="is_must"/>
|
|
|
<result property="dictId" column="dict_id"/>
|
|
|
<result property="recommend" column="recommend"/>
|
|
|
+ <result property="paramUnit" column="paramUnit"/>
|
|
|
</collection>
|
|
|
|
|
|
<collection property="areaList" ofType="warningAreaVo"
|
|
@@ -63,10 +64,10 @@
|
|
|
</collection>
|
|
|
</resultMap>
|
|
|
|
|
|
- <select id="modelList" resultMap="ruleModelResult1">
|
|
|
+ <select id="modelList" resultMap="ruleModelResult">
|
|
|
select model.id as id,rm.rule_id as rule_id,model.`name` as model_name,model.code,model.description,model.del_flag,
|
|
|
param.id as param_id,rp.param_value,param.recommend,param.is_must,param.del_flag as param_del_flag,
|
|
|
- dict.param_code as param_property,dict.param_name,dict.id as dict_id,
|
|
|
+ dict.param_code as param_property,dict.param_name,dict.id as dict_id,dict.unit as paramUnit,
|
|
|
area.id as area_id,area.`name` as area_name,area.location
|
|
|
from ax_beidou_warning_rule_model rm
|
|
|
inner join ax_beidou_warning_model model on model.id = rm.model_id and model.del_flag = '0'
|
|
@@ -102,6 +103,7 @@
|
|
|
<result property="isMust" column="is_must"/>
|
|
|
<result property="dictId" column="dict_id"/>
|
|
|
<result property="recommend" column="recommend"/>
|
|
|
+ <result property="paramUnit" column="paramUnit"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="areaVo" type="warningAreaVo">
|
|
@@ -122,7 +124,7 @@
|
|
|
<select id="selectParamList" parameterType="string" resultMap="paramVo">
|
|
|
select param.id as param_id,param.param_value,param.recommend,
|
|
|
param.is_must,param.del_flag as param_del_flag,
|
|
|
- dict.param_code as param_property,dict.param_name,dict.id as dict_id
|
|
|
+ dict.param_code as param_property,dict.param_name,dict.unit as paramUnit,dict.id as dict_id
|
|
|
from ax_beidou_warning_model_param mp
|
|
|
left join ax_beidou_warning_param param on param.id = mp.param_id
|
|
|
left join ax_beidou_warning_param_dict dict on param.dict_id = dict.id
|
|
@@ -279,11 +281,13 @@
|
|
|
id,
|
|
|
param_code,
|
|
|
param_name,
|
|
|
+ unit,
|
|
|
del_flag
|
|
|
) values (
|
|
|
#{id},
|
|
|
#{paramCode},
|
|
|
#{paramName},
|
|
|
+ #{unit},
|
|
|
#{delFlag}
|
|
|
)
|
|
|
</insert>
|