From 4fb572f2c1267a6252827737a7eabda8b4b8a4e5 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 21 五月 2024 16:19:09 +0800
Subject: [PATCH] 流转卡生成条码 进站单增加配件条码
---
WebAPI/Controllers/仓存管理/条码生成/Sc_BarCodeController.cs | 11 +++
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 76 +++++++++++++++++++++++++
WebAPI/Controllers/CJGL/Cj_StationInBillController.cs | 57 +++++++++++++++++++
3 files changed, 144 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
index a989769..ef3de00 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -316,6 +316,82 @@
}
#endregion
+ #region 宸ュ簭杩涚珯鎵厤浠剁爜
+ [Route("Cj_StationBill/txtHBarCode_Mater_KeyDown")]
+ [HttpGet]
+ public object txtHBarCode_Mater_KeyDown(string HBarCode, string HInterID)
+ {
+ try
+ {
+ if (HBarCode == null || HBarCode.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绌虹櫧鐮�,鏉″舰鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鍒ゆ柇鏉″舰鐮佹槸鍚﹀湪鏉$爜妗f涓紝鍒ゆ柇鏉″舰鐮佹槸鍚﹀悎鐞�
+ //鍏堝垽鏂� 涓存椂琛ㄤ腑鏄惁鏈夋暟鎹紝鏉″舰鐮佺殑鐗╂枡鏄惁鍦ㄦ竻鍗曚腑锛屽啓鍏� 鎵爜璁板綍琛�
+ //寰楀埌淇℃伅
+ ds = oCN.RunProcReturn("exec h_p_MES_StationInBillSub_BindBarCode " + HInterID.ToString() + " ,'" + HBarCode + "'", "h_p_MES_StationInBillSub_BindBarCode");
+ //鍐欏叆淇℃伅
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈煡璇㈠埌鏉″舰鐮佷俊鎭紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 2)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "閿欒锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0][1]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ DataSet Dsplay = oCN.RunProcReturn("exec h_p_MES_StationInBillSub_BindDisplay " + HInterID.ToString() + " ", "h_p_MES_StationInBillSub_BindDisplay");
+
+ //鍐欏叆淇℃伅
+ if (Dsplay == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒锋柊澶辫触,鏃犳暟鎹樉绀猴紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (Dsplay.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ユ棤鏁版嵁!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "缁戝畾鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region 鎸囧紩鍗℃壂鐮佽幏鍙栦俊鎭�
[Route("MES_SampleRecordBill_PDA/SampleRecordBillHBarCode_KeyDown")]
[HttpGet]
diff --git a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
index 6dbe67c..6f5e9e6 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
@@ -468,6 +468,63 @@
}
#endregion
+ #region 宸ュ簭杩涚珯鎺ユ敹鍗曟祦姘村彿鍥炶溅 绯荤粺鍙傛暟鍒ゆ柇鏄惁缁戝畾閰嶄欢娓呭崟
+ [Route("Cj_StationInBill/MES_StationInBillSubBindSource")]
+ [HttpGet]
+ public object MES_StationInBillSubBindSource(string HInterID, string HProcExchInterID,string HProcExchEntryID)
+ {
+ try
+ {
+ //濡傛灉绯荤粺鍙傛暟鍚敤浜� 杩涚珯鍗曠粦瀹氶厤浠舵竻鍗曞垯 浠庣敓浜х敤鏂欐竻鍗曚腑鑾峰彇宸ュ簭BOM鍐欏叆 涓存椂琛紝骞跺姞杞借〃鏍�
+ Pub_Class.ClsXt_SystemParameter oParam = new ClsXt_SystemParameter();
+ string sIsBingLine = oParam.GetSingleSystemParameter("MES_StationInBill_LineBindCtl", ref DBUtility.ClsPub.sExeReturnInfo);
+ if (sIsBingLine.Trim() == "Y")
+ {
+ oCN.RunProc("exec h_p_MES_StationInBillSubBindSource_Insert " + HProcExchInterID.ToString() + " , " + HProcExchEntryID.ToString() + "," + HInterID.ToString() + " ");
+
+ ds = oCN.RunProcReturn($@"select * from
+(
+ select
+a.HICMOInterID,a.HICMOEntryID,b.HProcID
+from Sc_ProcessExchangeBillMain a with(nolock)
+inner join Sc_ProcessExchangeBillSub b with(nolock) on a.HInterID=b.HinterID
+Where a.HInterID={HProcExchInterID} and b.HEntryID={HProcExchEntryID}
+) a
+inner join (
+select a.HICMOInterID,a.HICMOEntryID, b.HProcID
+from Sc_PPBomBillMain a with(nolock)
+inner join Sc_PPBomBillSub b with(nolock) on a.HInterID=b.HInterID
+Where b.HKeyMaterID_Line<>0
+)b on a.HICMOInterID=b.HICMOInterID and a.HICMOEntryID=b.HICMOEntryID and a.HProcID=b.HProcID", "Sc_ProcessExchangeBillMain");
+
+ if (ds.Tables[0].Rows.Count > 0) {
+ objJsonResult.Message = "闇�瑕佺粦瀹氶厤浠讹紒";
+ }
+ else
+ {
+ objJsonResult.Message = "涓嶉渶瑕佺粦瀹氶厤浠讹紒";
+ }
+ }
+ else {
+ objJsonResult.Message = "涓嶉渶瑕佺粦瀹氶厤浠讹紒";
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.data =null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region 宸ュ簭杩涚珯鎺ユ敹鍗曟祦姘村彿鍥炶溅鑾峰彇宸ュ簭淇℃伅
[Route("Cj_StationInBill/txtHProcNo_KeyDown_qiaoyi")]
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs"
index 7416774..d21e767 100644
--- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs"
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs"
@@ -228,6 +228,11 @@
count = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MateOutBackBillList_Source " + sWhere + " order by 鍗曟嵁鍙� desc,hsubid", tabname).Tables[0].Rows.Count;
sql = string.Format(@"select top " + pageSize + " * from(select row_number() over (order by 鍗曟嵁鍙� desc,hsubid) as HRowNumber,* from h_v_IF_MateOutBackBillList_Source " + sWhere + ") as A where HRowNumber >" + pageSize + " *(" + pageNum + "-1)");
break;
+ case "宸ュ簭娴佽浆鍗�":
+ tabname = "h_v_IF_ProcessExchangeBillList_Source";
+ count = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_ProcessExchangeBillList_Source " + sWhere + " order by 鍗曟嵁鍙� desc,hsubid", tabname).Tables[0].Rows.Count;
+ sql = string.Format(@"select top " + pageSize + " * from(select row_number() over (order by 鍗曟嵁鍙� desc,hsubid) as HRowNumber,* from h_v_IF_ProcessExchangeBillList_Source " + sWhere + ") as A where HRowNumber >" + pageSize + " *(" + pageNum + "-1)");
+ break;
default:
break;
}
@@ -396,6 +401,12 @@
break;
case "1255": //缁勮鎷嗗嵏鍗�
break;
+ case "3772": //宸ュ簭娴佽浆鍗�
+ //寰楀埌淇℃伅
+ ds = oCN.RunProcReturn("select * from h_v_IF_ProcessExchangeList where HMainID=" + oSelectRow.BillMainID + " and HSubID=" + oSelectRow.BillSubID, "h_v_IF_ProcessExchangeList", ref DBUtility.ClsPub.sExeReturnInfo);
+ //鍐欏叆淇℃伅
+ ListRows.Add(HSourceOrderList1(ds.Tables[0], ordrlist, HBarCodeType, HSourceBillType));
+ break;
default:
break;
}
--
Gitblit v1.9.1