cigs4/ym-packing/src/main/resources/mapper/WoCompensationPowerMapper.xml

50 lines
2.1 KiB
XML
Raw Normal View History

2023-02-22 15:59:13 +08:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cnbm.packing.mapper.WoCompensationPowerMapper">
<resultMap type="com.cnbm.packing.entity.WoCompensationPower" id="WoCompensationPowerMap">
<id column="id" property="id" />
<id column="actl_pmpp_low" property="actlPmppLow" />
<id column="actl_pmpp_high" property="actlPmppHigh" />
<id column="formula" property="formula" />
<id column="line_body" property="lineBody" />
2023-02-22 15:59:13 +08:00
<id column="coefficient_a" property="coefficientA" />
<id column="coefficient_b" property="coefficientB" />
<id column="remark" property="remark" />
<id column="valid" property="valid" />
<id column="creator_id" property="creatorId" />
<id column="creator_name" property="creatorName" />
<id column="create_time" property="createTime" />
<id column="updater_id" property="updaterId" />
<id column="updater_name" property="updaterName" />
<id column="update_time" property="updateTime" />
<id column="version" property="version" />
</resultMap>
2023-02-22 20:48:15 +08:00
<resultMap id="ResultMap" type="com.cnbm.packing.dto.CompensationPowerXSDTO">
<result column="a" property="a" />
<result column="b" property="b" />
</resultMap>
2023-02-22 15:59:13 +08:00
<select id="list" resultType="com.cnbm.packing.dto.WoCompensationPowerDTO">
select * from t_wo_compensation_power
order by id asc
</select>
2023-02-22 20:48:15 +08:00
<select id="getConffBySubIdAndLineBody" resultMap="ResultMap">
select
twcp.coefficient_a as a,twcp.coefficient_b as b
from t_wo_compensation_power twcp
where
twcp.valid = 1
<if test="param.lineBody != null">
and twcp.line_body = #{param.lineBody}
</if>
<if test="param.pmpp != null">
2023-03-03 14:33:18 +08:00
and twcp.actl_pmpp_high <![CDATA[ > ]]> #{param.pmpp} and twcp.actl_pmpp_low <![CDATA[ <= ]]> #{param.pmpp}
2023-02-22 20:48:15 +08:00
</if>
2023-12-20 14:49:42 +08:00
limit 1
2023-02-22 20:48:15 +08:00
</select>
2023-02-22 15:59:13 +08:00
</mapper>