diff --git a/src/main/resources/mybatis/wisdom/RkInfoMapper.xml b/src/main/resources/mybatis/wisdom/RkInfoMapper.xml index d115fca..3b64f2a 100644 --- a/src/main/resources/mybatis/wisdom/RkInfoMapper.xml +++ b/src/main/resources/mybatis/wisdom/RkInfoMapper.xml @@ -367,6 +367,7 @@ a.rk_type, si.type_name AS rk_type_name, a.wl_type, + mt.type_name AS wl_type_name, a.cangku, a.rk_time, a.lihuo_y, @@ -388,15 +389,15 @@ u.user_name AS ck_lihuo_y_name FROM ( SELECT - MIN(t.id) AS id, -- 代表ID - t.bill_no AS bill_no, -- 分组键 + MIN(t.id) AS id, + t.bill_no AS bill_no, MIN(t.bill_no_ck) AS bill_no_ck, MIN(t.rk_type) AS rk_type, MIN(t.wl_type) AS wl_type, 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, - MAX(t.is_chuku) AS is_chuku, -- 单据内只要有出库则为1 + MAX(t.is_chuku) AS is_chuku, MIN(t.xj) AS xj, MIN(t.xm_no) AS xm_no, 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_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 material_type mt ON a.wl_type = mt.type_code ORDER BY a.rk_time DESC