From c5d2c26dd476ff15a3d25ccf6d4b9725a1604790 Mon Sep 17 00:00:00 2001 From: yxj <yxj@hz-kingdee.com> Date: 星期五, 12 五月 2023 11:20:26 +0800 Subject: [PATCH] 用户权限判断修改,新增销售出库校验系统参数-是否进行源单对应条码核对 --- WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 39 +++++++++++++++++++++++++++++---------- 1 files changed, 29 insertions(+), 10 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs index 6600f68..5accdda 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs @@ -164,22 +164,19 @@ NewBarCode = sBillBarCode.Split(Convert.ToChar("#")); sBillBarCode = NewBarCode[0]; } - string sBillNo = sBillBarCode; + string sBillNo = sBillBarCode; //鏉″舰鐮� - string[] arr = sBillNo.Split('&'); - string BillNo_PGD = arr[0]; - string entryid_PGD = ""; + string[] arr = sBillNo.Split('&'); //浠ョ鍙封��&鈥欏垎鍓叉潯褰㈢爜 + string BillNo_PGD = arr[0]; //鍗曟嵁鍙� + string entryid_PGD = "";//瀛恑d if(arr.Length > 1) { entryid_PGD = arr[1]; - } - - - //鎴彇鏉$爜绫诲瀷 + //鎴彇鏉$爜绫诲瀷 鍓嶄笁浣� string BillNoType = BillNo_PGD.Substring(0, Math.Min(3, BillNo_PGD.Length)); - //鎴彇鏉$爜绫诲瀷2 + //鎴彇鏉$爜绫诲瀷2 鍓嶅洓浣� string BillNoType2 = BillNo_PGD.Substring(0, Math.Min(4, BillNo_PGD.Length)); //鎴彇鍐呯爜 string BillNo = BillNo_PGD.Substring(3, Math.Min(BillNo_PGD.Length - 3, BillNo_PGD.Length)); @@ -189,7 +186,29 @@ ds = oCN.RunProcReturn("select * from h_v_Sc_ProcExchSendWorkBill where 娲惧伐鍗曟嵁鍙� = '" + BillNo_PGD + "'" + " and HEntryID ='" + entryid_PGD + "'", "h_v_Sc_ProcExchSendWorkBill"); break; case "GXLX"://娴佽浆鍗� - ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList"); + string sErr = ""; + if (oSystemParameter.ShowBill(ref sErr)) + { + if (oSystemParameter.omodel.WMS_CampanyName == "涔斾竴") + { //绯荤粺鍙傛暟鏄惁涓哄彧鏄剧ず褰撳墠鐧诲綍鐢ㄦ埛鍏宠仈鐨勫伐搴忎俊鎭�,N涓哄惁锛孻涓烘槸 + if (oSystemParameter.omodel.MES_StationInBill_ShowUSERProcess == "Y") + { + ds = oCN.RunProcReturn($"exec h_p_ProcessExchangeBillLastHProNo '{BillNo_PGD}','{UserID}','{HBillType}'", "h_v_Gy_ProcessList_GetProcNoByUser"); + } + else + { + ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList"); + } + } + else if (entryid_PGD != "") //濡傛灉瀛恑d涓嶄负绌哄垯鍔犲叆瀛恑d杩囨护锛� + { + ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + BillNo_PGD + "'" + " and hsubid ='" + entryid_PGD + "'", "h_v_Sc_ProcessExchangeBillList"); + } + else + { + ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList"); + } + } break; } switch (BillNoType) -- Gitblit v1.9.1