| | |
| | | <result column="tank_qty1" property="tankQty1" /> |
| | | <result column="origin" property="origin" /> |
| | | </resultMap> |
| | | <select id="getCrnLaneWayInfo" resultType="com.zy.asrs.entity.CrnLaneWayInfoDto"> |
| | | select |
| | | crn.crn_no crnNo , |
| | | crn.crn_sts crnSts, |
| | | case when crn.crn_err != 0 then 1 else 0 end as crnErr, |
| | | count(loc.loc_no) count, |
| | | count(case when loc.loc_sts = 'F' then 1 end) stockQty, |
| | | count(case when loc.loc_sts = 'D' then 1 end) emptyPalletQty, |
| | | count(case when loc.loc_sts = 'O' then 1 end) emptySlotQty, |
| | | count(case when loc.loc_sts != 'O' and loc.loc_sts != 'D' and loc.loc_sts != 'F' then 1 end) otherQty |
| | | from |
| | | asr_bas_crnp crn |
| | | left join asr_loc_mast loc on |
| | | crn.crn_no = loc.crn_no |
| | | group by |
| | | crn.crn_no, |
| | | crn.crn_sts, |
| | | crn.crn_err |
| | | order by |
| | | crn.crn_no |
| | | </select> |
| | | |
| | | </mapper> |