示例#1
0
        public DynamicListResult ProductDeliveryScanNote_Search(DeliveryRequest request)
        {
            string sql = "SELECT A.ID,B.ID DETAIL_ID, A.VBELN,A.TANUM,B.MATNR,B.CHARG,B.MAKTX,B.DLFIMG,B.SCAN_QTY FROM PRODUCTION_DN_MAIN A, PRODUCTION_DN_DETAIL B WHERE A.ID = B.PARENT_ID";

            sql += OracleHelper.GetConditionByDateFromTo("A.CREATE_TIME", request.FromDate, request.ToDate);

            if (!string.IsNullOrEmpty(request.Vbeln))
            {
                sql += $" AND A.VBELN = '{request.Vbeln}' ";
            }

            if (!string.IsNullOrEmpty(request.Matnr))
            {
                sql += $" AND B.MATNR = '{request.Matnr}' ";
            }

            if (!string.IsNullOrEmpty(request.Tanum))
            {
                sql += $" AND A.TANUM = '{request.Tanum}' ";
            }

            sql += "ORDER BY A.VBELN, B.MATNR, B.CHARG";

            return(dal.ProductDeliveryScanNote_Search(sql));
        }
示例#2
0
        public DynamicListResult ProductDeliveryScanNote_GetDetail(DeliveryRequest request)
        {
            string sql = string.Format("WITH CTE_A AS( SELECT ID, TANUM, MATNR, DLFIMG FROM PRODUCTION_DN_DETAIL WHERE PARENT_ID = '{0}' AND MATNR = '{1}') ,CTE_B AS( SELECT A.TANUM, A.MATNR, A.DLFIMG, substr(B.BARCODE, -10) AS BARCODE FROM CTE_A A, PRODUCTION_DN_DETAIL_SCAN B WHERE A.ID = B.PARENT_ID ) SELECT B.* ,V.BATCH FROM VIEW_PRDIDMASTER V , CTE_B B WHERE V.PRDID = B.BARCODE "
                                       , request.ID
                                       , request.Matnr
                                       );

            return(dal.ProductDeliveryScanNote_Search(sql));
        }