insert into shmt_odr_base_info
(shmt_req_unq_no, shmt_req_st_cd, shmt_reg_dt, shmt_whs_id, shmt_location
, whs_dvsn, brand_id, store_id, podr_dvsn, item_qty
, shmt_total_amt, podr_mgr_nm, dlv_req_dt, whs_id, location
, sys_reg_dttm, sys_reg_id, sys_chg_dttm, sys_chg_id)
values
(#{entity.shmtReqUnqNo}, #{entity.shmtReqStCd}, date_format(now(),'%Y%m%d'), #{entity.shmtWhsId}, #{entity.shmtLocation}
, #{entity.whsDvsn}, #{entity.brandId}, #{entity.storeId}, #{entity.podrDvsn}, #{entity.itemQty}
, #{entity.shmtTotalAmt}, #{entity.podrMgrNm}, #{entity.dlvReqDt}, #{entity.whsId}
, #{entity.location}, NOW(), #{userId}, NOW(), #{userId})
insert into shmt_odr_dtl_ptcl
(shmt_req_unq_no, shmt_req_dtl_no, item_id, item_nm, unit_amt
, unit, podr_qty, podr_amt, shmt_qty, shmt_amt, expry_date
, pch_podr_unq_no, pch_podr_dtl_no, pch_req_unq_no, pch_req_dtl_no
, sys_reg_dttm, sys_reg_id, sys_chg_dttm, sys_chg_id)
values
(#{item.shmtReqUnqNo}, #{item.shmtReqDtlNo}, #{item.itemId}, #{item.itemNm}, #{item.unitAmt}
, #{item.unit}, #{item.podrQty}, #{item.podrAmt}, #{item.shmtQty}, #{item.shmtAmt}, #{item.expryDate}
, #{item.pchPodrUnqNo}, #{item.pchPodrDtlNo}, #{item.pchReqUnqNo}, #{item.pchReqDtlNo}
, NOW(), #{userId}, NOW(), #{userId})
INSERT INTO deli_info_mgnt
(dlv_sttmt_unq_no, spply_id, spply_nm, dlv_reg_dt, dlv_amt
, dlv_mgr_nm, dlv_mgr_tel_no, dlv_mgr_emal, dlv_mgr_mbl_no, vndr_tel_no
, dlv_st_cd, podr_reg_dt, dlv_req_dt, dlv_sch_dt, dlv_cmplt_dt
, whs_id, location, whs_dvsn, brand_id,store_id
, sys_reg_dttm, sys_reg_id, sys_chg_dttm, sys_chg_id)
VALUES
(#{entity.dlvSttmtUnqNo}, #{entity.spplyId}, #{entity.spplyNm}, date_format(now(),'%Y%m%d'), #{entity.dlvAmt}
, #{entity.dlvMgrNm}, #{entity.dlvMgrTelNo}, #{entity.dlvMgrEmal}, #{entity.dlvMgrMblNo}, #{entity.vndrTelNo}
, #{entity.dlvStCd}, #{entity.podrRegDt}, #{entity.dlvReqDt}, #{entity.dlvSchDt}, #{entity.dlvCmpltDt}
, #{entity.whsId}, #{entity.location}, #{entity.whsDvsn}, #{entity.brandId}, #{entity.storeId}
, NOW(), #{userId}, NOW(), #{userId})
INSERT INTO deli_dtl_ptcl
(dlv_sttmt_unq_no, dlv_sttmt_dtl_no, pch_podr_unq_no, pch_podr_dtl_no, pch_req_unq_no
, pch_req_dtl_no, item_id, item_nm, unit, unit_amt
, price_unit, podr_qty, dlv_qty, podr_amt, dlv_amt
, expry_date, delay_yn, delay_rsn
, sys_reg_dttm, sys_reg_id, sys_chg_dttm, sys_chg_id)
VALUES
(#{item.dlvSttmtUnqNo}, #{item.dlvSttmtDtlNo}, #{item.pchPodrUnqNo}, #{item.pchPodrDtlNo}, #{item.pchReqUnqNo}
, #{item.pchReqDtlNo}, #{item.itemId}, #{item.itemNm}, #{item.unit}, #{item.unitAmt}
, #{item.priceUnit}, #{item.podrQty}, #{item.dlvQty}, #{item.podrAmt}, #{item.dlvAmt}
, #{item.expryDate}, #{item.delayYn}, #{item.delayRsn}
, NOW(), #{userId}, NOW(), #{userId})