This commit is contained in:
linfso 2024-06-08 15:07:48 +08:00
parent a0e410d567
commit 69d48e6acd
2 changed files with 13 additions and 10 deletions

View File

@ -74,6 +74,16 @@
select trans_line_code from emis_trans_product a where del_flag='0' and prod_code=#{code} limit 1
</select>
<!-- 根据线路获取出发国家名称-->
<select id="selectFromCountryNameByLineCode" parameterType="String" resultType="string">
select a.name from emis_country a,emis_trans_line b where a.del_flag='0' and b.del_flag='0' and a.code=b.from_country and b.line_code = #{code} limit 1
</select>
<!-- 根据线路获取目的国家名称 -->
<select id="selectDestCountryNameByLineCode" parameterType="String" resultType="string">
select a.name from emis_country a,emis_trans_line b where a.del_flag='0' and b.del_flag='0' and a.code=b.country and b.line_code = #{code} limit 1
</select>
<!--目的地名称-->
<select id="selectDestNameByCode" parameterType="String" resultType="string">
select a.dest_name from emis_destination a where a.dest_code = #{code} and a.del_flag='0' limit 1

View File

@ -17,20 +17,13 @@
<association property="transLineTypeName" column="trans_line_type" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectLineNameByCode"/>
<!-- 个性化查询 -->
<association property="totalEstCostDay" column="id" select="selectTotalEstCostDayByPlanId"/>
<association property="fromCountryName" column="trans_line_type" select="selectFromCountryNameByLineCode"/>
<association property="countryName" column="trans_line_type" select="selectCountryNameByLineCode"/>
<association property="fromCountryName" column="trans_line_type" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectFromCountryNameByLineCode"/>
<association property="countryName" column="trans_line_type" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectDestCountryNameByLineCode"/>
<association property="totalEstCostDay" column="id" select="selectTotalEstCostDayByPlanId"/>
</resultMap>
<select id="selectFromCountryNameByLineCode" parameterType="String" resultType="string">
select a.name from emis_country a,emis_trans_line b where a.del_flag='0' and b.del_flag='0' and a.code=b.from_country and b.line_code = #{code} limit 1
</select>
<select id="selectCountryNameByLineCode" parameterType="String" resultType="string">
select a.name from emis_country a,emis_trans_line b where a.del_flag='0' and b.del_flag='0' and a.code=b.country and b.line_code = #{code} limit 1
</select>
<select id="selectTotalEstCostDayByPlanId" parameterType="long" resultType="BigDecimal">
select sum(a.est_cost_day) as est_cost_day from emis_tms_trans_plan_dtl a where a.del_flag='0' and a.plan_id = #{id} limit 1