|
@@ -121,12 +121,12 @@
|
|
|
w.goods_name as goodsName,
|
|
|
case when w.goods_name = '玉米(潮粮)' then '潮粮' else '干粮' end as type,
|
|
|
w.grade as grade,
|
|
|
- wd.water_content as waterContent,
|
|
|
- wd.impurity as impurity,
|
|
|
- wd.mildew_grain as mildewGrain,
|
|
|
- wd.imperfect_grain as imperfectGrain,
|
|
|
- wd.bulk_density as bulkDensity,
|
|
|
- wd.jiaorenli as jiaorenli,
|
|
|
+ IFNULL(wd.water_content,q.water_content) as waterContent,
|
|
|
+ IFNULL(wd.impurity,q.impurity) as impurity,
|
|
|
+ IFNULL(wd.mildew_grain,q.mildew_grain) as mildewGrain,
|
|
|
+ IFNULL(wd.imperfect_grain,q.imperfect_grain) as imperfectGrain,
|
|
|
+ IFNULL(wd.bulk_density,q.bulk_density) as bulkDensity,
|
|
|
+ IFNULL( wd.jiaorenli,q.jiaorenli) as jiaorenli,
|
|
|
s.car_no as carNo,
|
|
|
w.box_no as boxNo,
|
|
|
w.box_no_other as boxNoOther,
|
|
@@ -148,6 +148,8 @@
|
|
|
i.bank_deposit_branch as bankDepositBranch
|
|
|
FROM stock_purchase_receipt_report s
|
|
|
left join warehouse_in_out_info w on w.id = s.warehouse_record_id and w.delete_flag = 0
|
|
|
+ left join quality_inspection_management q on q.warehouse_in_out_id = w.id and
|
|
|
+ q.delete_flag = 0
|
|
|
left join warehouse_in_out_detail wd on wd.info_id = w.id
|
|
|
left join tran_car_info t on t.contract_no = w.contract_no and t.delete_flag = 0 and t.tran_car_no =
|
|
|
w.tran_car_no and t.car_no = w.car_no
|