上架任务一览


 SELECT          GB.STANDNETWEIGHT,(GB.STANDNETWEIGHT*AD.QTY+GB.BIGNETWEIGHT*AD.BIGUNITQTY) AS WEIGTHS,G.ISHSKUBARCODE,G.SKUBARCODE,G.BIGSKUBARCODE,AD.ODDFLG,G.FZDW,G.BZXS,F_GETGOODS_ZSSL(G.GOODSID,AD.QTY) AS ZSSL,AD.INSTOCKPICKID, AD.INSTOCKPICKDTID, AD.TASKNO, AD.STATUS, AD.PRINTNO,
        AD.GOODSID, AD.GOODSBATCH, AD.QUALITYFLG, AD.QUALITYREASONCODE,
        AD.CONTAINERTYPE, AD.CONTAINERID, AD.MID1, AD.BIGUNITQTY, AD.QTY,
        (AD.BIGUNITQTY * NVL (GB.BIGPERNUM, 0)+ AD.QTY) AS SUMPICKQTY,
        AD.STOCKAREAID, AD.GOODSAREAID, AD.GOODSPOSID, AD.CREATOR,
        AD.CREATETIME, AD.RELEASETIME, AD.UPDATEDATE, AD.UPDATEMAN,
        AD.PICKINUSER, I.SHORTNAME AS PICKINUSERNAME, AD.PUTAWAYBEGINTIME, AD.PUTAWAYFINISHTIME,
        AD.CONFIRMMAN, AD.CONFIRMDATE, AD.REMARK, AD.SUMQTY, AD.ISALLOWOUT,B.REMARK AS INSTOCKREMARK, 
        AD.SERIALID, AD.VOLUME, AD.WEIGHT, AD.INSTOCKID, AD.PUTAWAYTIME, 
        AD.MID2, AD.MID4, AD.MID5, AD.MID3, AD.ODDFLG, AD.PURCHASENO, AD.BOXNUM, 
        AD.INSTOCKDTID, AD.FACTDTID, A.STOCKID, A.OWNERID, G.MODEL, G.TRADEMARK, G.FULLMARK,G.STANDUNIT,
        B.INSTOCKTYPE,K.SNAME INSTOCKTYPENAME, BD.INFORMNO, BDD.INSTOCKSTARTTIME, BDD.CREATETIME AS INSTOCKENDTIME,
        '' AS SNNO, C.SNAME AS STATUSNAME, D.SNAME AS CONTAINERTYPENAME,
        E.SNAME AS QUALITYFLGNAME, F.SNAME AS STOCKAREANAME, G.NAME AS GOODSNAME, 
        GB.PRODUCTDATE, GB.EXPIREDATE, H.SNAME AS GOODSAREANAME, J.USERNM AS CREATORNM,AD.COMPANYID, 
        G.GOODSTOPCATEGORYID, G.GOODSCATEGORYID,G.TEMPTYPEID,  BD.INSTOCKMAN RECEIVEMAN, AD.PRINTNO,H.GOODSAREATYPE,  
        B.COMPANYID INSTOCKCOMPANYID,F_GET_COMPANYSNAME(B.COMPANYID) AS COMPANYSNAME,G.STANDUNIT  
        ,G.MAH,FACTORYNAME,FACTORYCODE,FACTORYTYPE,FACTORYLICENSE 
        ,AD.BPMREPORTADDRESS,AD.UPLOADTIME,F_GET_USERNAME(AD.UPLOADMAN) AS UPLOADMAN
        , CASE B.INSTOCKTYPE WHEN '8' THEN CUSTOMER.NAME WHEN '7' THEN CUSTOMER.NAME ELSE '-' END SUPPLIER
   FROM INSTOCKPICKTBL A
     JOIN  INSTOCKPICKDTTBL AD ON A.INSTOCKPICKID = AD.INSTOCKPICKID
     JOIN  INSTOCKTBL B ON AD.INSTOCKID = B.INSTOCKID
     JOIN  INSTOCKDTTBL BD ON B.INSTOCKID = BD.INSTOCKID AND AD.INSTOCKID = BD.INSTOCKID AND AD.INSTOCKDTID = BD.INSTOCKDTID
     JOIN  INSTOCKFACTDTTBL BDD ON AD.INSTOCKID = BDD.INSTOCKID AND AD.INSTOCKDTID = BDD.INSTOCKDTID AND AD.FACTDTID = BDD.FACTDTID
     JOIN (SELECT * FROM BASEDETAILMST WHERE CODEID = 'SYS_INSTOCKPICKSTATUS') C ON AD.STATUS = C.CODEVALUE
     JOIN (SELECT * FROM  BASEDETAILMST WHERE CODEID = 'SYS_PIKCRELATYPE') D ON AD.CONTAINERTYPE = D.CODEVALUE
     JOIN (SELECT * FROM  BASEDETAILMST WHERE CODEID = 'SYS_QUALITYFLAG') E ON AD.QUALITYFLG = E.CODEVALUE
     LEFT JOIN (SELECT * FROM BASEDETAILMST WHERE CODEID = 'SYS_STOCKAREAID') F ON AD.STOCKAREAID = F.CODEVALUE
     JOIN  GOODSMST  G ON AD.GOODSID = G.GOODSID
     JOIN  GOODSBATCHMST  GB ON AD.GOODSID = GB.GOODSID AND AD.GOODSBATCH = GB.GOODSBATCH
     LEFT JOIN  GOODSAREAMST  H ON A.STOCKID = H.STOCKID AND AD.STOCKAREAID = H.STOCKAREAID AND AD.GOODSAREAID = H.GOODSAREAID
     LEFT JOIN  USERMST J ON AD.PICKINUSER = J.USERID
     LEFT JOIN  USERMST I ON A.CREATOR = I.USERID
     LEFT JOIN CUSTOMERMST CUSTOMER ON B.SUPPLIERID=CUSTOMER.CUSTID
     JOIN (SELECT * FROM BASEDETAILMST WHERE CODEID = 'SYS_INSTCTYPE') K ON B.INSTOCKTYPE = K.CODEVALUE
  WHERE 1=1
    AND AD.INSTOCKID LIKE '%--%'
 ORDER BY A.CREATETIME DESC, AD.TASKNO
文档更新时间: 2023-06-24 17:12   作者:周骏