|
|
@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<result property="erpAmount" column="erp_amount" />
|
|
|
|
<result property="erpAmount" column="erp_amount" />
|
|
|
|
|
|
|
|
|
|
|
|
<result property="warehouseName" column="warehouse_name" />
|
|
|
|
<result property="warehouseName" column="warehouse_name" />
|
|
|
|
|
|
|
|
<result property="materialName" column="material_name" />
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="WmsRawReturnWmsRawReturnDetailResult" type="WmsRawReturn" extends="WmsRawReturnResult">
|
|
|
|
<resultMap id="WmsRawReturnWmsRawReturnDetailResult" type="WmsRawReturn" extends="WmsRawReturnResult">
|
|
|
@ -273,6 +274,69 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
where wrr.raw_return_id = #{rawReturnId}
|
|
|
|
where wrr.raw_return_id = #{rawReturnId}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectWmsAuditList" parameterType="WmsRawReturn" resultMap="WmsRawReturnResult">
|
|
|
|
|
|
|
|
select wro.task_code,
|
|
|
|
|
|
|
|
wro.warehouse_id,
|
|
|
|
|
|
|
|
wbw.warehouse_name,
|
|
|
|
|
|
|
|
wro.plan_code,
|
|
|
|
|
|
|
|
wro.plan_detail_code,
|
|
|
|
|
|
|
|
wro.material_barcode,
|
|
|
|
|
|
|
|
wro.plan_amount,
|
|
|
|
|
|
|
|
wro.task_type,
|
|
|
|
|
|
|
|
wro.apply_reason,
|
|
|
|
|
|
|
|
wro.apply_by,
|
|
|
|
|
|
|
|
wro.apply_date,
|
|
|
|
|
|
|
|
wro.audit_status
|
|
|
|
|
|
|
|
from wms_raw_return wro
|
|
|
|
|
|
|
|
left join wms_base_warehouse wbw on wro.warehouse_id = wbw.warehouse_id
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<if test="taskCode != null and taskCode != ''"> and wro.task_code like concat('%', #{taskCode}, '%')</if>
|
|
|
|
|
|
|
|
<if test="warehouseId != null "> and wro.warehouse_id = #{warehouseId}</if>
|
|
|
|
|
|
|
|
<if test="planCode != null "> and wro.plan_code like concat('%', #{planCode}, '%')</if>
|
|
|
|
|
|
|
|
<if test="planDetailCode != null "> and wro.plan_detail_code like concat('%', #{planDetailCode}, '%')</if>
|
|
|
|
|
|
|
|
<if test="materialBarcode != null and materialBarcode != '' "> and wro.material_barcode like concat('%', #{materialBarcode}, '%')</if>
|
|
|
|
|
|
|
|
<if test="applyReason != null and applyReason != ''"> and wro.apply_reason like concat('%', #{applyReason}, '%')</if>
|
|
|
|
|
|
|
|
<if test="auditStatus != null and auditStatus != ''"> and wro.audit_status = #{auditStatus}</if>
|
|
|
|
|
|
|
|
<if test="taskType != null and taskType != ''"> and wro.task_type = #{taskType}</if>
|
|
|
|
|
|
|
|
<if test="applyBy != null and applyBy != ''"> and wro.apply_by like concat('%', #{applyBy}, '%')</if>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
group by wro.task_code, wro.warehouse_id, wbw.warehouse_name, wro.plan_code, wro.plan_detail_code,
|
|
|
|
|
|
|
|
wro.material_barcode, wro.plan_amount, wro.task_type, wro.apply_reason, wro.apply_by, wro.apply_date,
|
|
|
|
|
|
|
|
wro.audit_status
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectGetRawReturnByTaskCode" parameterType="WmsRawReturn" resultMap="WmsRawReturnResult">
|
|
|
|
|
|
|
|
select wrr.raw_return_id,
|
|
|
|
|
|
|
|
wrr.task_code,
|
|
|
|
|
|
|
|
wrr.warehouse_id,
|
|
|
|
|
|
|
|
wrr.location_code,
|
|
|
|
|
|
|
|
wrr.material_id,
|
|
|
|
|
|
|
|
mbmi.material_name,
|
|
|
|
|
|
|
|
wrr.batch_code,
|
|
|
|
|
|
|
|
wrr.plan_amount,
|
|
|
|
|
|
|
|
wrr.return_amount,
|
|
|
|
|
|
|
|
wrr.execute_status,
|
|
|
|
|
|
|
|
wrr.apply_reason,
|
|
|
|
|
|
|
|
wrr.apply_by,
|
|
|
|
|
|
|
|
wrr.apply_date,
|
|
|
|
|
|
|
|
wrr.plan_code,
|
|
|
|
|
|
|
|
wrr.plan_detail_code,
|
|
|
|
|
|
|
|
wrr.audit_status,
|
|
|
|
|
|
|
|
wrr.task_type,
|
|
|
|
|
|
|
|
wbw.warehouse_name
|
|
|
|
|
|
|
|
from wms_raw_return wrr
|
|
|
|
|
|
|
|
left join mes_base_material_info mbmi on wrr.material_id = mbmi.material_id
|
|
|
|
|
|
|
|
left join wms_base_warehouse wbw on wrr.warehouse_id = wbw.warehouse_id
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<if test="taskCode != null and taskCode != ''"> and wrr.task_code like concat('%', #{taskCode}, '%')</if>
|
|
|
|
|
|
|
|
<if test="warehouseId != null "> and wrr.warehouse_id = #{warehouseId}</if>
|
|
|
|
|
|
|
|
<if test="planCode != null "> and wrr.plan_code like concat('%', #{planCode}, '%')</if>
|
|
|
|
|
|
|
|
<if test="auditStatus != null and auditStatus != ''"> and wrr.audit_status = #{auditStatus}</if>
|
|
|
|
|
|
|
|
<if test="applyBy != null and applyBy != ''"> and wrr.apply_by like concat('%', #{applyBy}, '%')</if>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="batchWmsRawReturn">
|
|
|
|
<insert id="batchWmsRawReturn">
|
|
|
|
insert into wms_raw_return( raw_return_id, task_code, warehouse_id, location_code, plan_code, plan_detail_code, product_id, material_id, plan_amount, return_amount, operation_type, task_type, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time, material_barcode, end_station_code, batch_code) values
|
|
|
|
insert into wms_raw_return( raw_return_id, task_code, warehouse_id, location_code, plan_code, plan_detail_code, product_id, material_id, plan_amount, return_amount, operation_type, task_type, apply_reason, audit_reason, audit_status, execute_status, apply_by, apply_date, audit_by, audit_date, update_by, update_date, begin_time, end_time, material_barcode, end_station_code, batch_code) values
|
|
|
|
<foreach item="item" index="index" collection="list" separator=",">
|
|
|
|
<foreach item="item" index="index" collection="list" separator=",">
|
|
|
|