|
@@ -222,6 +222,70 @@
|
|
|
AND (DATE_FORMAT(w.in_out_date,"%Y%m%d") <=
|
|
|
DATE_FORMAT(#{endDate},"%Y%m%d"))
|
|
|
</if>
|
|
|
+ UNION ALL
|
|
|
+ SELECT
|
|
|
+ c.comp_name as compName,
|
|
|
+ w.warehouse_name as warehouseName,
|
|
|
+ w.bin_number as binNumber,
|
|
|
+ w.create_date as createDate,
|
|
|
+ w.contract_no as contractNo,
|
|
|
+ '' as paymentNo,
|
|
|
+ '' as customerName,
|
|
|
+ '退库' as inOutType,
|
|
|
+ '' as deliveryVolume,
|
|
|
+ '' as sendWarehouse,
|
|
|
+ 0 as tranPrice,
|
|
|
+ 0 as freight,
|
|
|
+ '' as supplier,
|
|
|
+ w.goods_name as goodsName,
|
|
|
+ case when w.goods_name = '玉米(潮粮)' then '潮粮' else '干粮' end as type,
|
|
|
+ w.grade as grade,
|
|
|
+ d.water_content as waterContent,
|
|
|
+ d.impurity as impurity,
|
|
|
+ d.mildew_grain as mildewGrain,
|
|
|
+ d.imperfect_grain as imperfectGrain,
|
|
|
+ d.bulk_density as bulkDensity,
|
|
|
+ d.jiaorenli as jiaorenli,
|
|
|
+ w.car_no as carNo,
|
|
|
+ w.box_no as boxNo,
|
|
|
+ w.box_no_other as boxNoOther,
|
|
|
+ w.title_no as titleNo,
|
|
|
+ w.title_no_other as titleNoOther,
|
|
|
+ 0 as netWeightPrice,
|
|
|
+ w.gross_weight as grossWeight,
|
|
|
+ w.tare as tare,
|
|
|
+ w.deduction_weight as buckleWeight,
|
|
|
+ w.net_weight as netWeight,
|
|
|
+ '' as unitDeduction,
|
|
|
+ '' as pureWeightPrice,
|
|
|
+ w.pure_weight as pureWeight,
|
|
|
+ 0 as amountIngPayable,
|
|
|
+ 0 as amountEdPayable,
|
|
|
+ '' as payeeName,
|
|
|
+ '' as cardNo,
|
|
|
+ '' as bankDeposit,
|
|
|
+ '' as bankDepositBranch
|
|
|
+ FROM warehouse_in_out_info w
|
|
|
+ left join warehouse_in_out_detail d on w.id=d.info_id and d.delete_flag = 0
|
|
|
+ left join warehouse_base_info b on b.id=w.base_id and b.delete_flag = 0
|
|
|
+ left join common_company c on c.comp_id = b.comp_id and c.delete_flag = 0
|
|
|
+ WHERE w.delete_flag = '0'
|
|
|
+ AND b.comp_id = #{compId}
|
|
|
+ and w.in_out_flag = 2
|
|
|
+ and w.in_out_type='退库'
|
|
|
+ and w.status_flag=3
|
|
|
+ <if test="warehouseName != null and warehouseName != ''">
|
|
|
+ AND w.warehouse_name= #{warehouseName}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null">
|
|
|
+ AND (DATE_FORMAT(w.in_out_date,"%Y%m%d") >=
|
|
|
+ DATE_FORMAT(#{startDate},"%Y%m%d"))
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">
|
|
|
+ AND (DATE_FORMAT(w.in_out_date,"%Y%m%d") <=
|
|
|
+ DATE_FORMAT(#{endDate},"%Y%m%d"))
|
|
|
+ </if>
|
|
|
+ group by w.id
|
|
|
</select>
|
|
|
<!-- 获得出库导出列表 -->
|
|
|
<select id="getListByConditionOut" parameterType="Map"
|