From 9ff424751d75ebba92f8317bd2d6aa57094baca4 Mon Sep 17 00:00:00 2001
From: chenhaozhe <gaozhechen26@gmail.com>
Date: 星期日, 08 三月 2026 19:04:38 +0800
Subject: [PATCH] 新增 投料防错 增删改查 API
---
WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs | 91 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 88 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
index 76db3cf..a35de88 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
@@ -514,6 +514,50 @@
}
#endregion
+ #region 鏍规嵁璁惧ID鏌ユ壘璁惧妗f淇℃伅PDA 鏌ヨ鏉$爜妗f鍒楄〃
+ [Route("Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown_ListByHEquipID")]
+ [HttpGet]
+ public object txtHBarCode_KeyDown_ListByHEquipID(string HEquipID)
+ {
+ try
+ {
+ if (HEquipID == null || HEquipID.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璁惧鍐呯爜涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //寰楀埌淇℃伅
+ ds = oCN.RunProcReturn("select top 1 * from h_v_Gy_EquipFileMainList where hmainid= " + HEquipID , "h_v_Gy_EquipFileMainList");
+ //鍐欏叆淇℃伅
+ if (ds == null || ds.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 = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+
#region 鏍规嵁璁惧鏉$爜鏌ユ壘璁惧妗f淇℃伅PDA 鏌ヨ鏉$爜妗f鍒楄〃
[Route("Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown_List")]
[HttpGet]
@@ -590,7 +634,7 @@
objJsonResult.data = 1;
return objJsonResult;
}
-
+ LogService.Write("oItem", oItem.ToString());
//oItem.HMaker = "";
UserName = oItem.HMaker; //鍒跺崟浜�
oItem.HBillType = "3903";
@@ -599,7 +643,9 @@
//oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
//oItem.HInnerBillNo = ""; // --鍐呴儴鍗曟嵁鍙�
oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
+
//oItem.HEquipID = 0; //璁惧ID(Gy_EquipMent)
//oItem.HPeriod = 0;
//oItem.HCheckBeginDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); // --缁翠慨鏃ユ湡
@@ -632,6 +678,7 @@
int i = 0;
foreach (Models.ClsSb_EquipDotCheckBillSub oItemSub in ls)
{
+ LogService.Write("oItemSub", oItemSub.ToString());
i++;
oItemSub.HEntryID = i;
@@ -672,7 +719,6 @@
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
- //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
objJsonResult.data = 1;
return objJsonResult;
}
@@ -1189,6 +1235,45 @@
return objJsonResult;
}
}
- #endregion
+ #endregion
+
+
+ #region 璁惧鐐规璁板綍PDA 淇濆瓨鍚� 鏌ヨ鏄惁鏈塏G 璋冩暣瀹夌伅
+
+ [Route("Sb_EquipDotCheckBill/getbSB_EquipDotCheckBill_Result")]
+ [HttpGet]
+ public object getbSB_EquipDotCheckBill_Result(string HBillNO, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ string sql = "select * from h_v_Sb_EquipDotCheckBillList where 鍗曟嵁鍙�='" + HBillNO + "'";
+ ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1