|
@@ -626,7 +626,7 @@
|
626
|
and mgnt.spply_id = #{sSpplyId}
|
626
|
and mgnt.spply_id = #{sSpplyId}
|
627
|
</if>
|
627
|
</if>
|
628
|
<if test="sWhsId != null and sWhsId != ''">
|
628
|
<if test="sWhsId != null and sWhsId != ''">
|
629
|
- and dtl.whs_id = #{sWhsId}
|
|
|
|
|
629
|
+ and mgnt.whs_id = #{sWhsId}
|
630
|
</if>
|
630
|
</if>
|
631
|
<if test="sItemNm != null and sItemNm != ''">
|
631
|
<if test="sItemNm != null and sItemNm != ''">
|
632
|
and (mgnt.col_pick_unq_no like concat('%',#{sItemNm},'%') or dtl.item_id like concat('%',#{sItemNm},'%') or dtl.item_nm like concat('%',#{sItemNm},'%') )
|
632
|
and (mgnt.col_pick_unq_no like concat('%',#{sItemNm},'%') or dtl.item_id like concat('%',#{sItemNm},'%') or dtl.item_nm like concat('%',#{sItemNm},'%') )
|
|
@@ -749,6 +749,62 @@
|
749
|
|
749
|
|
750
|
</select>
|
750
|
</select>
|
751
|
|
751
|
|
|
|
752
|
+ <select id="selectColRtnInstProcList" resultType="com.oqpo.api.entity.inoutmng.PickInfoMgntEntity">
|
|
|
753
|
+ select mgnt.brand_id, fn_brand_nm(mgnt.brand_id) as brand_nm
|
|
|
754
|
+ , mgnt.store_id,dtl.item_id as 'pickDtlInfo.item_id', dtl.item_nm as 'pickDtlInfo.item_nm'
|
|
|
755
|
+ , base.whs_id, base.location
|
|
|
756
|
+ , fn_whs_nm(base.brand_id, base.whs_id) as whs_nm, fn_whs_location_nm(base.brand_id, base.whs_id, base.location) as location_nm
|
|
|
757
|
+ , dtl.unit as 'pickDtlInfo.unit' , dtl.unit_amt as 'pickDtlInfo.unit_amt'
|
|
|
758
|
+ , ptcl.rtn_req_qty as 'pickDtlInfo.rtn_req_qty' , dtl.rodr_qty as 'pickDtlInfo.rodr_qty'
|
|
|
759
|
+ , dtl.col_req_qty as 'pickDtlInfo.col_req_qty'
|
|
|
760
|
+ , date_format(mgnt.col_req_dt,'%Y.%m.%d') as col_req_dt
|
|
|
761
|
+ , date_format(mgnt.col_sch_dt,'%Y.%m.%d') as col_sch_dt
|
|
|
762
|
+ , date_format(mgnt.col_cmplt_dt,'%Y.%m.%d') as col_cmplt_dt
|
|
|
763
|
+ , mgnt.pick_mgr_nm, fn_get_telno(mgnt.pick_mgr_tel_no) as pick_mgr_tel_no
|
|
|
764
|
+ , dtl.col_req_amt as 'pickDtlInfo.col_req_amt'
|
|
|
765
|
+ , mgnt.spply_id, fn_spply_nm(mgnt.spply_id) as spply_nm
|
|
|
766
|
+ , mgnt.col_pick_unq_no, dtl.col_pick_dtl_no as 'pickDtlInfo.col_pick_dtl_no'
|
|
|
767
|
+ , dtl.col_cmd_unq_no as 'pickDtlInfo.col_cmd_unq_no', dtl.col_cmd_dtl_no as 'pickDtlInfo.col_cmd_dtl_no'
|
|
|
768
|
+ , dtl.rtn_podr_unq_no as 'pickDtlInfo.rtn_podr_unq_no', dtl.rtn_podr_dtl_no as 'pickDtlInfo.rtn_podr_dtl_no'
|
|
|
769
|
+ , ptcl.rtn_req_unq_no as 'pickDtlInfo.rtn_req_unq_no', ptcl.rtn_req_dtl_no as 'pickDtlInfo.rtn_req_dtl_no'
|
|
|
770
|
+ , mgnt.whs_dvsn, mgnt.col_dvsn
|
|
|
771
|
+ from pick_info_mgnt mgnt
|
|
|
772
|
+ ,pick_dtl_ptcl dtl
|
|
|
773
|
+ ,rtn_odr_dtl_ptcl ptcl
|
|
|
774
|
+ ,rtn_odr_base_info base
|
|
|
775
|
+ where mgnt.col_pick_unq_no = dtl.col_pick_unq_no
|
|
|
776
|
+ and dtl.rtn_podr_unq_no = ptcl.rtn_podr_unq_no
|
|
|
777
|
+ and dtl.rtn_podr_dtl_no = ptcl.rtn_podr_dtl_no
|
|
|
778
|
+ and ptcl.rtn_podr_unq_no = base.rtn_podr_unq_no
|
|
|
779
|
+ and mgnt.brand_id = #{brandId}
|
|
|
780
|
+ and base.whs_id = #{whsId}
|
|
|
781
|
+ and concat(base.col_pick_unq_no, ptcl.col_pick_dtl_no) in
|
|
|
782
|
+ <foreach collection="gridUpdateData" item="item" separator="," open="(" close=")">
|
|
|
783
|
+ #{item.colPickUnqNo}
|
|
|
784
|
+ </foreach>
|
|
|
785
|
+ </select>
|
752
|
|
786
|
|
|
|
787
|
+ <insert id="insertRtnProcInfoPtcl">
|
|
|
788
|
+ insert into rtn_proc_info_ptcl
|
|
|
789
|
+ (rtn_mgnt_unq_no, brand_id, store_id, item_id, item_nm
|
|
|
790
|
+ , whs_id, location, unit, unit_amt, rtn_req_qty
|
|
|
791
|
+ , rtn_odr_qty, col_req_qty, col_qty, col_req_dt, col_sch_dt
|
|
|
792
|
+ , col_dt, col_cnfm_nm, col_mgr_nm, col_mgr_tel_no, col_mgr_emal
|
|
|
793
|
+ , col_mgr_mbl_no, col_amt, col_agr_yn, col_cnfm_doc_file_no, sttl_yn
|
|
|
794
|
+ , spply_id, spply_nm, col_pick_unq_no, col_pick_dtl_no, col_cmd_unq_no
|
|
|
795
|
+ , col_cmd_dtl_no, rtn_podr_unq_no, rtn_podr_dtl_no, rtn_req_unq_no, rtn_req_dtl_no
|
|
|
796
|
+ , sttl_mgnt_unq_no, sttl_mgnt_dtl_no
|
|
|
797
|
+ , sys_reg_dttm, sys_reg_id, sys_chg_dttm, sys_chg_id)
|
|
|
798
|
+ values
|
|
|
799
|
+ (#{entity.rtnMgntUnqNo}, #{entity.brandId}, #{entity.storeId}, #{entity.itemId}, #{entity.itemNm}
|
|
|
800
|
+ , #{entity.whsId}, #{entity.location}, #{entity.unit}, #{entity.unitAmt}, #{entity.rtnReqQty}
|
|
|
801
|
+ , #{entity.rtnOdrQty}, #{entity.colReqQty}, #{entity.colQty}, #{entity.colReqDt}, #{entity.colSchDt}
|
|
|
802
|
+ , date_fromat(now(),'%Y%m%d'), #{entity.colCnfmNm}, #{entity.colMgrNm}, #{entity.colMgrTelNo}, #{entity.colMgrEmal}
|
|
|
803
|
+ , #{entity.colMgrMblNo}, #{entity.colAmt}, #{entity.colAgrYn}, #{entity.colCnfmDocFileNo}, #{entity.sttlYn}
|
|
|
804
|
+ , #{entity.spplyId}, #{entity.spplyNm}, #{entity.colPickUnqNo}, #{entity.colPickDtlNo}, #{entity.colCmdUnqNo}
|
|
|
805
|
+ , #{entity.colCmdDtlNo}, #{entity.rtnPodrUnqNo}, #{entity.rtnPodrDtlNo}, #{entity.rtnReqUnqNo}, #{entity.rtnReqDtlNo}
|
|
|
806
|
+ , #{entity.sttlMgntUnqNo}, #{entity.sttlMgntDtlNo}
|
|
|
807
|
+ , now(), #{userId}, now(), #{userId})
|
|
|
808
|
+ </insert>
|
753
|
|
809
|
|
754
|
</mapper>
|
810
|
</mapper>
|