|
@@ -3,8 +3,9 @@
|
|
|
<mapper namespace="com.hdkj.lt.bf.mapper.FhzgPlanStrategyDetialMapper">
|
|
<mapper namespace="com.hdkj.lt.bf.mapper.FhzgPlanStrategyDetialMapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
- <select id="getStrategyDetial" resultType="com.hdkj.lt.core.bizms.modle.po.plan.FhzgPlanTransferStrategyConfigDetail">
|
|
|
|
|
- select id,indicator_name,indicator_code,priority,enable
|
|
|
|
|
|
|
+ <select id="getStrategyDetial"
|
|
|
|
|
+ resultType="com.hdkj.lt.core.bizms.modle.po.plan.FhzgPlanTransferStrategyConfigDetail">
|
|
|
|
|
+ select id, indicator_name, indicator_code, priority, enable
|
|
|
from fhzg_plan_transfer_strategy_config_detail
|
|
from fhzg_plan_transfer_strategy_config_detail
|
|
|
where strategy_id = #{strategyId}
|
|
where strategy_id = #{strategyId}
|
|
|
order by priority asc
|
|
order by priority asc
|
|
@@ -12,65 +13,63 @@
|
|
|
|
|
|
|
|
<insert id="batchInsert">
|
|
<insert id="batchInsert">
|
|
|
insert into fhzg_plan_transfer_strategy_config_detail
|
|
insert into fhzg_plan_transfer_strategy_config_detail
|
|
|
- (strategy_id,indicator_name,indicator_code,priority,enable)
|
|
|
|
|
|
|
+ (strategy_id,indicator_name,indicator_code,priority,enable)
|
|
|
values
|
|
values
|
|
|
- <foreach collection="list" item="item" index="index" separator=",">
|
|
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=",">
|
|
|
(#{item.strategyId},#{item.indicatorName},#{item.indicatorCode},#{item.priority},#{item.enable})
|
|
(#{item.strategyId},#{item.indicatorName},#{item.indicatorCode},#{item.priority},#{item.enable})
|
|
|
- </foreach>
|
|
|
|
|
|
|
+ </foreach>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
|
<update id="batchUpdate">
|
|
<update id="batchUpdate">
|
|
|
- <foreach collection="list" item="item" index="index" separator=";">
|
|
|
|
|
- update fhzg_plan_transfer_strategy_config_detail
|
|
|
|
|
- set
|
|
|
|
|
- indicator_name = #{item.indicatorName},
|
|
|
|
|
- indicator_code = #{item.indicatorCode},
|
|
|
|
|
- priority = #{item.priority},
|
|
|
|
|
- enable = #{item.enable}
|
|
|
|
|
- where id = #{item.id}
|
|
|
|
|
- and strategy_id = #{item.strategyId}
|
|
|
|
|
- </foreach>
|
|
|
|
|
|
|
+ update fhzg_plan_transfer_strategy_config_detail
|
|
|
|
|
+ set indicator_name = #{item.indicatorName},
|
|
|
|
|
+ indicator_code = #{item.indicatorCode},
|
|
|
|
|
+ priority = #{item.priority},
|
|
|
|
|
+ enable = #{item.enable}
|
|
|
|
|
+ where id = #{item.id}
|
|
|
|
|
+ and strategy_id = #{item.strategyId}
|
|
|
|
|
+
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
<select id="getStrategyDetailByPlanId"
|
|
<select id="getStrategyDetailByPlanId"
|
|
|
resultType="com.hdkj.lt.core.bizms.modle.po.plan.FhzgPlanTransferStrategyConfigDetail">
|
|
resultType="com.hdkj.lt.core.bizms.modle.po.plan.FhzgPlanTransferStrategyConfigDetail">
|
|
|
- select DISTINCTROW
|
|
|
|
|
- tscd.strategy_id strategyId,
|
|
|
|
|
- tscd.indicator_code indicatorCode,
|
|
|
|
|
- tscd.indicator_name indicatorName,
|
|
|
|
|
- tscd.enable enable,
|
|
|
|
|
- tscd.priority priority
|
|
|
|
|
- from
|
|
|
|
|
- fhzg_plan_transfer_scheme ts left join
|
|
|
|
|
- fhzg_plan_transfer_scheme_strategy_score sss on ts.id = sss.scheme_id
|
|
|
|
|
- left join fhzg_plan_transfer_strategy_config_detail tscd on tscd.strategy_id = sss.strategy_id
|
|
|
|
|
- where ts.plan_id = #{planId} and tscd.enable = 0
|
|
|
|
|
|
|
+ select DISTINCTROW tscd.strategy_id strategyId,
|
|
|
|
|
+ tscd.indicator_code indicatorCode,
|
|
|
|
|
+ tscd.indicator_name indicatorName,
|
|
|
|
|
+ tscd.enable enable,
|
|
|
|
|
+ tscd.priority priority
|
|
|
|
|
+ from fhzg_plan_transfer_scheme ts
|
|
|
|
|
+ left join
|
|
|
|
|
+ fhzg_plan_transfer_scheme_strategy_score sss on ts.id = sss.scheme_id
|
|
|
|
|
+ left join fhzg_plan_transfer_strategy_config_detail tscd on tscd.strategy_id = sss.strategy_id
|
|
|
|
|
+ where ts.plan_id = #{planId}
|
|
|
|
|
+ and tscd.enable = 0
|
|
|
order by tscd.priority
|
|
order by tscd.priority
|
|
|
-- tscd.enable 是否启用 0:启用,1:未启用
|
|
-- tscd.enable 是否启用 0:启用,1:未启用
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<select id="getStrategyDetailByFaultId"
|
|
<select id="getStrategyDetailByFaultId"
|
|
|
resultType="com.hdkj.lt.core.bizms.modle.po.plan.FhzgPlanTransferStrategyConfigDetail">
|
|
resultType="com.hdkj.lt.core.bizms.modle.po.plan.FhzgPlanTransferStrategyConfigDetail">
|
|
|
- select DISTINCTROW
|
|
|
|
|
- tscd.strategy_id strategyId,
|
|
|
|
|
- tscd.indicator_code indicatorCode,
|
|
|
|
|
- tscd.indicator_name indicatorName,
|
|
|
|
|
- tscd.enable enable,
|
|
|
|
|
- tscd.priority priority
|
|
|
|
|
- from
|
|
|
|
|
- fhzg_fault_transfer_scheme ts left join
|
|
|
|
|
- fhzg_fault_transfer_scheme_strategy_score sss on ts.id = sss.scheme_id
|
|
|
|
|
- left join fhzg_plan_transfer_strategy_config_detail tscd on tscd.strategy_id = sss.strategy_id
|
|
|
|
|
- where ts.fault_id = #{faultId} and tscd.enable = 0
|
|
|
|
|
|
|
+ select DISTINCTROW tscd.strategy_id strategyId,
|
|
|
|
|
+ tscd.indicator_code indicatorCode,
|
|
|
|
|
+ tscd.indicator_name indicatorName,
|
|
|
|
|
+ tscd.enable enable,
|
|
|
|
|
+ tscd.priority priority
|
|
|
|
|
+ from fhzg_fault_transfer_scheme ts
|
|
|
|
|
+ left join
|
|
|
|
|
+ fhzg_fault_transfer_scheme_strategy_score sss on ts.id = sss.scheme_id
|
|
|
|
|
+ left join fhzg_plan_transfer_strategy_config_detail tscd on tscd.strategy_id = sss.strategy_id
|
|
|
|
|
+ where ts.fault_id = #{faultId}
|
|
|
|
|
+ and tscd.enable = 0
|
|
|
order by tscd.priority
|
|
order by tscd.priority
|
|
|
-- tscd.enable 是否启用 0:启用,1:未启用
|
|
-- tscd.enable 是否启用 0:启用,1:未启用
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <select id="getStrategyDetialByTime" resultType="com.hdkj.lt.core.bizms.modle.po.plan.FhzgPlanTransferStrategyConfigDetail">
|
|
|
|
|
- select cd.id,cd.indicator_name,cd.priority,cd.enable
|
|
|
|
|
|
|
+ <select id="getStrategyDetialByTime"
|
|
|
|
|
+ resultType="com.hdkj.lt.core.bizms.modle.po.plan.FhzgPlanTransferStrategyConfigDetail">
|
|
|
|
|
+ select cd.id, cd.indicator_name, cd.priority, cd.enable
|
|
|
from fhzg_plan_transfer_strategy_config_detail cd
|
|
from fhzg_plan_transfer_strategy_config_detail cd
|
|
|
left join fhzg_plan_transfer_strategy_config sc on cd.strategy_id = sc.id
|
|
left join fhzg_plan_transfer_strategy_config sc on cd.strategy_id = sc.id
|
|
|
where transfer_strategy = #{transferStrategy}
|
|
where transfer_strategy = #{transferStrategy}
|