新增物料名称字段
This commit is contained in:
@@ -367,6 +367,7 @@
|
|||||||
a.rk_type,
|
a.rk_type,
|
||||||
si.type_name AS rk_type_name,
|
si.type_name AS rk_type_name,
|
||||||
a.wl_type,
|
a.wl_type,
|
||||||
|
mt.type_name AS wl_type_name,
|
||||||
a.cangku,
|
a.cangku,
|
||||||
a.rk_time,
|
a.rk_time,
|
||||||
a.lihuo_y,
|
a.lihuo_y,
|
||||||
@@ -388,15 +389,15 @@
|
|||||||
u.user_name AS ck_lihuo_y_name
|
u.user_name AS ck_lihuo_y_name
|
||||||
FROM (
|
FROM (
|
||||||
SELECT
|
SELECT
|
||||||
MIN(t.id) AS id, -- 代表ID
|
MIN(t.id) AS id,
|
||||||
t.bill_no AS bill_no, -- 分组键
|
t.bill_no AS bill_no,
|
||||||
MIN(t.bill_no_ck) AS bill_no_ck,
|
MIN(t.bill_no_ck) AS bill_no_ck,
|
||||||
MIN(t.rk_type) AS rk_type,
|
MIN(t.rk_type) AS rk_type,
|
||||||
MIN(t.wl_type) AS wl_type,
|
MIN(t.wl_type) AS wl_type,
|
||||||
MIN(t.cangku) AS cangku,
|
MIN(t.cangku) AS cangku,
|
||||||
MIN(t.rk_time) AS rk_time, -- 单据内最早入库时间
|
MIN(t.rk_time) AS rk_time,
|
||||||
MIN(t.lihuo_y) AS lihuo_y,
|
MIN(t.lihuo_y) AS lihuo_y,
|
||||||
MAX(t.is_chuku) AS is_chuku, -- 单据内只要有出库则为1
|
MAX(t.is_chuku) AS is_chuku,
|
||||||
MIN(t.xj) AS xj,
|
MIN(t.xj) AS xj,
|
||||||
MIN(t.xm_no) AS xm_no,
|
MIN(t.xm_no) AS xm_no,
|
||||||
MIN(t.xm_ms) AS xm_ms,
|
MIN(t.xm_ms) AS xm_ms,
|
||||||
@@ -505,6 +506,7 @@
|
|||||||
LEFT JOIN stock_in_type si ON a.rk_type = si.type_code
|
LEFT JOIN stock_in_type si ON a.rk_type = si.type_code
|
||||||
LEFT JOIN stock_out_type so ON a.ck_type = so.type_code
|
LEFT JOIN stock_out_type so ON a.ck_type = so.type_code
|
||||||
LEFT JOIN sys_user u ON a.ck_lihuo_y = u.user_id
|
LEFT JOIN sys_user u ON a.ck_lihuo_y = u.user_id
|
||||||
|
LEFT JOIN material_type mt ON a.wl_type = mt.type_code
|
||||||
ORDER BY a.rk_time DESC
|
ORDER BY a.rk_time DESC
|
||||||
</select>
|
</select>
|
||||||
<!-- ================== /按单据分组查询 ================== -->
|
<!-- ================== /按单据分组查询 ================== -->
|
||||||
|
|||||||
Reference in New Issue
Block a user