出库
This commit is contained in:
@@ -93,8 +93,8 @@
|
|||||||
SELECT
|
SELECT
|
||||||
rr.*,
|
rr.*,
|
||||||
|
|
||||||
/* ===== 新增:统一计算总金额 ===== */
|
/* 总金额 */
|
||||||
rr.real_qty * rr.ht_dj AS total_amount,
|
COALESCE(rr.real_qty,0) * COALESCE(rr.ht_dj,0) AS total_amount,
|
||||||
|
|
||||||
su.nick_name AS operator_name,
|
su.nick_name AS operator_name,
|
||||||
mt.type_name AS wl_type_name,
|
mt.type_name AS wl_type_name,
|
||||||
@@ -107,7 +107,10 @@
|
|||||||
wh.parent_warehouse_code AS parent_warehouse_code,
|
wh.parent_warehouse_code AS parent_warehouse_code,
|
||||||
wh.parent_warehouse_name AS parent_warehouse_name,
|
wh.parent_warehouse_name AS parent_warehouse_name,
|
||||||
|
|
||||||
ct.team_name AS team_name
|
ct.team_name AS team_name,
|
||||||
|
|
||||||
|
-- 新增 gys_jh 主键
|
||||||
|
gj.id AS gys_jh_id
|
||||||
|
|
||||||
FROM rk_record rr
|
FROM rk_record rr
|
||||||
LEFT JOIN sys_user su ON rr.operator = su.user_id
|
LEFT JOIN sys_user su ON rr.operator = su.user_id
|
||||||
@@ -120,6 +123,13 @@
|
|||||||
LEFT JOIN construction_team ct
|
LEFT JOIN construction_team ct
|
||||||
ON rr.team_code = ct.team_code
|
ON rr.team_code = ct.team_code
|
||||||
AND ct.is_delete = '0'
|
AND ct.is_delete = '0'
|
||||||
|
/* 新增关联 */
|
||||||
|
LEFT JOIN gys_jh gj
|
||||||
|
ON rr.sap_no = gj.sap_no
|
||||||
|
AND rr.wl_no = gj.wl_no
|
||||||
|
AND rr.xm_no = gj.xm_no
|
||||||
|
AND gj.is_delete = '0'
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- ===================== 查询列表 ===================== -->
|
<!-- ===================== 查询列表 ===================== -->
|
||||||
@@ -282,7 +292,11 @@
|
|||||||
<include refid="selectRkRecordVo"/>
|
<include refid="selectRkRecordVo"/>
|
||||||
WHERE rr.bill_no = #{billNo}
|
WHERE rr.bill_no = #{billNo}
|
||||||
AND (rr.is_delete = '0' OR rr.is_delete = 0 OR rr.is_delete IS NULL)
|
AND (rr.is_delete = '0' OR rr.is_delete = 0 OR rr.is_delete IS NULL)
|
||||||
ORDER BY rr.exec_status = '0' DESC, rr.create_time ASC
|
|
||||||
|
ORDER BY
|
||||||
|
rr.exec_status = '0' DESC,
|
||||||
|
rr.create_time ASC,
|
||||||
|
gj.id ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectRkRecordByIds" resultMap="RkRecordResult">
|
<select id="selectRkRecordByIds" resultMap="RkRecordResult">
|
||||||
|
|||||||
Reference in New Issue
Block a user