<?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.chinaztt.mes.warehouse.mapper.DeliveryDetailMapper">
|
|
<resultMap id="deliveryDetailMap" type="com.chinaztt.mes.warehouse.dto.DeliveryDetailDTO">
|
<id property="id" column="id"/>
|
<result property="receivingMainId" column="receiving_main_id"/>
|
<result property="partId" column="part_id"/>
|
<result property="partBatchNo" column="part_batch_no"/>
|
<result property="deliveryQty" column="delivery_qty"/>
|
<result property="receiveQty" column="receive_qty"/>
|
<result property="differenceQty" column="difference_qty"/>
|
<result property="partNo" column="part_no"/>
|
<result property="partName" column="part_name"/>
|
<result property="materialType" column="material_type"/>
|
</resultMap>
|
|
<select id="getDeliveryDetailPage" resultMap="deliveryDetailMap">
|
select wdd.*,
|
bp.part_no,bp.part_name,bp.material_type,bp.unit
|
from warehouse_delivery_detail wdd
|
left join basic_part bp on wdd.part_id=bp."id"
|
<if test="ew.emptyOfWhere == false">
|
${ew.customSqlSegment}
|
</if>
|
</select>
|
|
<select id="getDeliveryDetailById" resultMap="deliveryDetailMap">
|
select wdd.*,
|
bp.part_no,bp.part_name,bp.material_type
|
from warehouse_delivery_detail wdd
|
left join basic_part bp on wdd.part_id=bp."id"
|
where wdd.id=#{id}
|
</select>
|
|
<select id="auditDeliveryDetail" resultType="com.chinaztt.mes.warehouse.entity.DeliveryDetail">
|
select * from warehouse_delivery_detail where receiving_main_id=#{mainId}
|
and (difference_qty!=0 or difference_qty is null)
|
</select>
|
<select id="auditDelivery" resultType="com.chinaztt.mes.warehouse.entity.DeliveryDetail">
|
select * from warehouse_delivery_detail where receiving_main_id=#{mainId}
|
and (receive_qty=0 or receive_qty is null)
|
</select>
|
</mapper>
|