|
@@ -152,14 +152,14 @@
|
152
|
152
|
(dlv_sttmt_unq_no, dlv_sttmt_dtl_no, pch_podr_unq_no, pch_podr_dtl_no, pch_req_unq_no
|
153
|
153
|
, pch_req_dtl_no, item_id, item_nm, unit, unit_amt
|
154
|
154
|
, price_unit, podr_qty, dlv_qty, podr_amt, dlv_amt
|
155
|
|
- , expry_date, delay_yn, delay_rsn
|
|
155
|
+ , expry_date, delay_yn, delay_rsn,dlv_dtl_st_cd
|
156
|
156
|
, sys_reg_dttm, sys_reg_id, sys_chg_dttm, sys_chg_id)
|
157
|
157
|
VALUES
|
158
|
158
|
<foreach collection="gridInsertData" item="item" separator=",">
|
159
|
159
|
(#{item.dlvSttmtUnqNo}, #{item.dlvSttmtDtlNo}, #{item.pchPodrUnqNo}, #{item.pchPodrDtlNo}, #{item.pchReqUnqNo}
|
160
|
160
|
, #{item.pchReqDtlNo}, #{item.itemId}, #{item.itemNm}, #{item.unit}, #{item.unitAmt}
|
161
|
161
|
, #{item.priceUnit}, #{item.podrQty}, #{item.dlvQty}, #{item.podrAmt}, #{item.dlvAmt}
|
162
|
|
- , #{item.expryDate}, #{item.delayYn}, #{item.delayRsn}
|
|
162
|
+ , #{item.expryDate}, #{item.delayYn}, #{item.delayRsn}, 'DLD0'
|
163
|
163
|
, NOW(), #{userId}, NOW(), #{userId})
|
164
|
164
|
</foreach>
|
165
|
165
|
</insert>
|
|
@@ -534,6 +534,7 @@
|
534
|
534
|
and info.brand_id = #{sBrandId}
|
535
|
535
|
and info.dlv_sch_dt between #{fromDt} and #{endDt}
|
536
|
536
|
and info.dlv_st_cd = 'DLV0'
|
|
537
|
+ and ptcl.dlv_dtl_st_cd = 'DLD0'
|
537
|
538
|
and info.whs_id = #{sWhsId}
|
538
|
539
|
<if test="sSpplyId != null and sSpplyId != ''">
|
539
|
540
|
and info.spply_id = #{sSpplyId}
|
|
@@ -573,6 +574,7 @@
|
573
|
574
|
and info.brand_id = #{sBrandId}
|
574
|
575
|
and info.dlv_sch_dt between #{fromDt} and #{endDt}
|
575
|
576
|
and info.dlv_st_cd = 'DLV0'
|
|
577
|
+ and ptcl.dlv_dtl_st_cd = 'DLD0'
|
576
|
578
|
and info.whs_id = #{whsId}
|
577
|
579
|
<if test="sSpplyId != null and sSpplyId != ''">
|
578
|
580
|
and info.spply_id = #{sSpplyId}
|
|
@@ -585,6 +587,49 @@
|
585
|
587
|
</if>
|
586
|
588
|
</select>
|
587
|
589
|
|
|
590
|
+ <insert id="insertWhsProcInfoPtcl">
|
|
591
|
+ insert into whs_proc_info_ptcl
|
|
592
|
+ (whs_mgnt_unq_no, dlv_sttmt_dtl_no, dlv_sttmt_unq_no, brand_id, store_id
|
|
593
|
+ , whs_dt, whs_id, location, whs_dvsn, podr_qty, dlv_qty
|
|
594
|
+ , whs_qty, unit, dlv_req_dt, dlv_sch_dt, dlv_cmplt_dt
|
|
595
|
+ , whs_cnfm_nm, dlv_mgr_nm, dlv_mgr_tel_no, dlv_mgr_emal, dlv_mgr_mbl_no
|
|
596
|
+ , item_id, item_nm, whs_amt, whs_dlv_chrg, dlv_mgr_id
|
|
597
|
+ , dlv_cnfm_doc_file_no, sttl_yn, pch_podr_unq_no, pch_podr_dtl_no, pch_req_unq_no
|
|
598
|
+ , pch_req_dtl_no, shmt_req_unq_no, sys_reg_dttm, sys_reg_id, sys_chg_dttm, sys_chg_id)
|
|
599
|
+ values
|
|
600
|
+ <foreach collection="gridInsertData" item="item" separator=",">
|
|
601
|
+ (#{item.whsMgntUnqNo}, #{item.dlvSttmtDtlNo}, #{item.dlvSttmtUnqNo}, #{item.brandId}, #{item.storeId}
|
|
602
|
+ , date_format(now(),'%Y%m%d'),#{item.whsId}, #{item.location}, #{item.whsDvsn}, #{item.podrQty}, #{item.dlvQty}
|
|
603
|
+ , #{item.whsQty}, #{item.unit}, #{item.dlvReqDt}, #{item.dlvSchDt}, #{item.dlvCmpltDt}
|
|
604
|
+ , #{item.whsCnfmNm}, #{item.dlvMgrNm}, #{item.dlvMgrTelNo}, #{item.dlvMgrEmal}, #{item.dlvMgrMblNo}
|
|
605
|
+ , #{item.itemId}, #{item.itemNm}, #{item.whsAmt}, #{item.whsDlvChrg}, #{item.dlvMgrId}
|
|
606
|
+ , #{item.dlvCnfmDocFileNo}, #{item.sttlYn}, #{item.pchPodrUnqNo}, #{item.pchPodrDtlNo}, #{item.pchReqUnqNo}
|
|
607
|
+ , #{item.pchReqDtlNo}, #{item.shmtReqUnqNo}, NOW(), #{userId}, NOW(), #{userId})
|
|
608
|
+ </foreach>
|
|
609
|
+ </insert>
|
588
|
610
|
|
|
611
|
+ <select id="selectWarehouseProcList" resultType="com.oqpo.api.entity.inoutmng.DeliInfoMgntEntity">
|
|
612
|
+ select /* shmtOdr.selectWarehouseProcList */info.brand_id, info.store_id
|
|
613
|
+ , info.dlv_sttmt_unq_no, ptcl.dlv_sttmt_dtl_no as 'deliDtlMgntInfo.dlv_sttmt_dtl_no'
|
|
614
|
+ , info.whs_id, info.location, info.spply_id, info.spply_nm
|
|
615
|
+ , info.whs_dvsn, ptcl.podr_qty as 'deliDtlMgntInfo.podr_qty'
|
|
616
|
+ , ptcl.dlv_qty as 'deliDtlMgntInfo.dlv_qty', ptcl.unit as 'deliDtlMgntInfo.unit'
|
|
617
|
+ , ptcl.unit_amt as 'deliDtlMgntInfo.unit_amt', info.dlv_req_dt, info.dlv_sch_dt
|
|
618
|
+ , info.dlv_mgr_nm, info.dlv_mgr_mbl_no, info.dlv_mgr_tel_no
|
|
619
|
+ , ptcl.item_id as 'deliDtlMgntInfo.item_id' , ptcl.item_nm as 'deliDtlMgntInfo.item_nm'
|
|
620
|
+ , ptcl.pch_podr_unq_no as 'deliDtlMgntInfo.pch_podr_unq_no', ptcl.pch_podr_dtl_no as 'deliDtlMgntInfo.pch_podr_dtl_no'
|
|
621
|
+ , ptcl.pch_req_unq_no as 'deliDtlMgntInfo.pch_req_unq_no', ptcl.pch_req_dtl_no as 'deliDtlMgntInfo.pch_req_dlt_no'
|
|
622
|
+ from deli_info_mgnt info
|
|
623
|
+ join deli_dtl_ptcl ptcl on info.dlv_sttmt_unq_no = ptcl.dlv_sttmt_unq_no
|
|
624
|
+ and concat(ptcl.dlv_sttmt_unq_no, ptcl.dlv_sttmt_dtl_no) in
|
|
625
|
+ <foreach collection="gridUpdateData" item="item" separator="," open="(" close=")">
|
|
626
|
+ #{dlvSttmtDtlNo}
|
|
627
|
+ </foreach>
|
|
628
|
+ and ptcl.dlv_dtl_st_cd = 'DLD0'
|
|
629
|
+ where 1=1
|
|
630
|
+ and info.brand_id = #{brandId}
|
|
631
|
+ and info.dlv_st_cd = 'DLV0'
|
|
632
|
+ and info.whs_id = #{whsId}
|
|
633
|
+ </select>
|
589
|
634
|
|
590
|
635
|
</mapper>
|