|
|
|
@ -44,10 +44,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="fsBillId" column="fs_bill_id" />
|
|
|
|
|
<result property="fsId" column="fs_id" />
|
|
|
|
|
<result property="billNo" column="bill_no" />
|
|
|
|
|
<result property="receiveBillId" column="receive_bill_id" />
|
|
|
|
|
<result property="actLandAmount" column="act_land_amount" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectWmsRawInstockVo">
|
|
|
|
|
select raw_instock_id, task_code, warehouse_id, location_code, po_no, operation_type, instock_type, material_id, material_barcode, material_batch_code, pallet_info_code, instock_amount, execute_status, erp_status, erp_amount, apply_by, apply_date, machine_name, quality_status, update_by, update_date, begin_time, end_time from wms_raw_instock
|
|
|
|
|
select raw_instock_id, task_code, warehouse_id, location_code, po_no, operation_type, instock_type, material_id, material_barcode, material_batch_code, pallet_info_code, instock_amount, execute_status, erp_status, erp_amount, apply_by, apply_date, machine_name, quality_status, update_by, update_date, begin_time, end_time, receive_bill_id from wms_raw_instock
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectWmsRawInstockList" parameterType="WmsRawInstock" resultMap="WmsRawInstockResult">
|
|
|
|
@ -104,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="updateDate != null">update_date,</if>
|
|
|
|
|
<if test="beginTime != null">begin_time,</if>
|
|
|
|
|
<if test="endTime != null">end_time,</if>
|
|
|
|
|
<if test="receiveBillId != null">receive_bill_id,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="taskCode != null">#{taskCode},</if>
|
|
|
|
@ -131,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="updateDate != null">#{updateDate},</if>
|
|
|
|
|
<if test="beginTime != null">#{beginTime},</if>
|
|
|
|
|
<if test="endTime != null">#{endTime},</if>
|
|
|
|
|
<if test="receiveBillId != null">#{receiveBillId},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -159,6 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="updateDate != null">update_date = #{updateDate},</if>
|
|
|
|
|
<if test="beginTime != null">begin_time = #{beginTime},</if>
|
|
|
|
|
<if test="endTime != null">end_time = #{endTime},</if>
|
|
|
|
|
<if test="receiveBillId != null">receive_bill_id = #{receiveBillId},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where raw_instock_id = #{rawInstockId}
|
|
|
|
|
</update>
|
|
|
|
@ -340,4 +345,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
and x.apply_date > now() - interval 1 year
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectPurchaseReceiveBillByBarcode" parameterType="WmsRawInstock" resultMap="WmsRawInstockResult">
|
|
|
|
|
select bbi.barcode_info material_barcode,
|
|
|
|
|
bbi.receive_bill_id,
|
|
|
|
|
mprb.act_land_amount,
|
|
|
|
|
(select IF(SUM(instock_amount) IS NULL, 0, SUM(instock_amount))
|
|
|
|
|
from wms_raw_instock wr
|
|
|
|
|
where wr.receive_bill_id = bbi.receive_bill_id) instock_amount
|
|
|
|
|
from mes_base_barcode_info bbi
|
|
|
|
|
left join mes_purchase_receive_bill mprb on mprb.receive_bill_id = bbi.receive_bill_id
|
|
|
|
|
where bbi.barcode_info = #{materialBarcode}
|
|
|
|
|
limit 1
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|