From 56e69237fcfd7d7841c60981728f0190ae48ef32 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 24 九月 2025 17:00:04 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/生产管理/报工台工序/Sc_MESBeginStepWorkBillController.cs | 230 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 230 insertions(+), 0 deletions(-)
diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs"
index 9c84228..a427992 100644
--- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs"
+++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs"
@@ -2579,5 +2579,235 @@
}
}
#endregion
+
+
+
+
+ #region PDA浜ч噺姹囨姤鍗�
+
+
+ //鎵弿鐢熶骇璁㈠崟鑾峰彇淇℃伅
+ [Route("Sc_MESBeginStepWorkBill/Get_Sc_ICMOList")]
+ [HttpGet]
+ public object Get_Sc_ICMOList(string HBarCode, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (HBarCode == null || HBarCode.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏉$爜淇℃伅涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ string sql = "select * from h_v_IF_ICMOBillList with(nolock) where 鍗曟嵁鍙�= '" + HBarCode + "'";
+ ds = oCN.RunProcReturn(sql, "锘縣_v_IF_ICMOBillList");
+ }
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ //娣诲姞鍒楀悕
+ 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;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏉$爜锛�" + HBarCode + " ,涓嶅瓨鍦�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+
+ //鎵弿瀹㈡埛鏉$爜鏌ュ嚭淇℃伅
+ [Route("Sc_MESBeginStepWorkBill/Get_Gy_BarCodeBill_CusList")]
+ [HttpGet]
+ public object Get_Gy_BarCodeBill_CusList(string HBarCode, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (HBarCode == null || HBarCode.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏉$爜淇℃伅涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ string sql = "select * from Gy_BarCodeBill_Cus a with(nolock) left join Gy_Material b with(nolock) on a.hmaterid=b.hitemid where HBarCode= '" + HBarCode + "'";
+ ds = oCN.RunProcReturn(sql, "锘縂y_BarCodeBill_Cus");
+ }
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ //娣诲姞鍒楀悕
+ 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;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏉$爜锛�" + HBarCode + " ,涓嶅瓨鍦�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+
+ //浜ч噺姹囨姤鍗� 涓昏〃 淇濆瓨
+ [Route("Sc_MESBeginStepWorkBill/savrSc_ICMOBillWorkQtyStatus_Tmp")]
+ [HttpGet]
+ public object savrSc_ICMOBillWorkQtyStatus_Tmp(string HInterID, string HBIllno, string HSourceID, string HQty, string user)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("exec h_p_Sc_ICMOBillWorkQtyStatus_Tmp_Save '" + HBIllno + "','" + HInterID + "','" + HQty + "','" + HSourceID + "','" + user + "'", "h_p_Sc_ICMOBillWorkQtyStatus_Tmp_Save");
+
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ }
+
+
+ //浜ч噺姹囨姤鍗� 瀛愯〃 淇濆瓨
+ [Route("Sc_MESBeginStepWorkBill/savrSc_ICMOBillWorkQtyStatus_Tmp_Sub")]
+ [HttpGet]
+ public object savrSc_ICMOBillWorkQtyStatus_Tmp_Sub(string HInterID, string HBarCode, string HSourceID, string user)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("exec h_p_Sc_ICMOBillWorkQtyStatus_Tmp_SubSave '" + HBarCode + "','" + HInterID + "','" + HSourceID + "','" + user + "'", "h_p_Sc_ICMOBillWorkQtyStatus_Tmp_SubSave");
+
+
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from Sc_ICMOBillWorkQtyStatus_Tmp_Sub a left join Gy_Material b on a.HMaterID=b.HItemID where HBarCode='"+HBarCode+"'", "Sc_ICMOBillWorkQtyStatus_Tmp_Sub");
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ }
+
+
+
+ #endregion
+
+
}
}
--
Gitblit v1.9.1