This commit is contained in:
linfso 2024-05-30 06:30:59 +08:00
parent 2122310fcf
commit fd4b551f67
2 changed files with 6 additions and 7 deletions

View File

@ -28,9 +28,8 @@
</resultMap>
<select id="selectSiteNameByCode" parameterType="String" resultType="string">
select a.site_name from emis_site a where a.site_code = #{code} limit 1
select group_concat(a.site_name) as site_name from emis_site a where a.del_flag='0' and FIND_IN_SET(a.site_code, #{code}) limit 1
</select>

View File

@ -32,23 +32,23 @@
</resultMap>
<select id="selectFromCountryNameByLineCode" parameterType="String" resultType="string">
select a.name from emis_country a,emis_trans_line b where a.code=b.from_country and b.line_code = #{code}
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.code=b.country and b.line_code = #{code}
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.plan_id = #{id}
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
</select>
<select id="selectProdNameByCode" parameterType="String" resultType="string">
select group_concat(a.prod_name) from emis_trans_product a where FIND_IN_SET(a.prod_code, #{code}) limit 1
select group_concat(a.prod_name) from emis_trans_product a where a.del_flag='0' and FIND_IN_SET(a.prod_code, #{code}) limit 1
</select>
<select id="selectLineNameByCode" parameterType="String" resultType="string">
select a.line_name from emis_trans_line a where a.line_code = #{code} limit 1
select a.line_name from emis_trans_line a where a.del_flag='0' and a.line_code = #{code} limit 1
</select>