커밋밋

This commit is contained in:
leeheejin
2025-11-13 10:04:01 +09:00
parent 5d60957bca
commit f9a6dd145a
2 changed files with 39 additions and 5 deletions

View File

@@ -1755,6 +1755,33 @@ ORDER BY T.REGDATE DESC, T.PROJECT_NO DESC
ORDER BY SL.shipping_date DESC, SL.log_id DESC
</select>
<!-- sales_registration의 sales_quantity를 shipment_log 합계로 업데이트 -->
<update id="updateSalesQuantityFromShipmentLog" parameterType="map">
/* salesNcollectMgmt.updateSalesQuantityFromShipmentLog - shipment_log 합계로 sales_quantity 업데이트 */
UPDATE sales_registration
SET sales_quantity = (
SELECT COALESCE(SUM(split_quantity), 0)
FROM shipment_log
WHERE target_objid = #{projectNo}
),
sales_supply_price = (
SELECT COALESCE(SUM(sales_supply_price), 0)
FROM shipment_log
WHERE target_objid = #{projectNo}
),
sales_vat = (
SELECT COALESCE(SUM(sales_vat), 0)
FROM shipment_log
WHERE target_objid = #{projectNo}
),
sales_total_amount = (
SELECT COALESCE(SUM(sales_total_amount), 0)
FROM shipment_log
WHERE target_objid = #{projectNo}
)
WHERE sale_no = #{saleNo}
</update>
<!-- 거래명세서 - 고객 정보 조회 -->
<select id="getCustomerInfoByProjectNo" parameterType="map" resultType="map">
/* salesNcollectMgmt.getCustomerInfoByProjectNo - 프로젝트 번호로 고객 정보 조회 */