From cb98f3abf09cb75bf1328c42745f3be8cd9d9374 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 17 五月 2024 08:04:43 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 213 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 202 insertions(+), 11 deletions(-)
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 205b36f..a08e89a 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -425,6 +425,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -436,12 +437,21 @@
ds = Sc_MouldMaintainPlanBillList_s(sWhere);
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
//}
//else
@@ -1020,6 +1030,17 @@
oBill.DetailColl.Add(oItemSub);
}
+
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = DateTime.Now;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
+ return objJsonResult;
+ }
+
//淇濆瓨
//淇濆瓨瀹屾瘯鍚庡鐞�
bool bResult;
@@ -1163,12 +1184,20 @@
return objJsonResult;
}
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = DateTime.Now;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
+ return objJsonResult;
+ }
ClsPub.CurUserName = user;
BillOld.MvarItemKey = "Kf_ICStockBillMain";
oCN.BeginTran();//寮�濮嬩簨鍔�
-
-
//Type 1 瀹℃牳 2 鍙嶅鏍�
if (Type == 1)
@@ -1630,9 +1659,19 @@
}
//==================================================================================
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = DateTime.Now;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
+ return objJsonResult;
+ }
+
oCN.BeginTran();
- //鍒嗗竷寮忚皟鍏ュ崟鏂板鍥炲~鍒嗗竷寮忚皟鍑哄崟鍏宠仈鏁伴噺
+ //鐩存帴璋冩嫧鍗� 鍒犻櫎 鎾ら攢 鍥炲~ 璋冩嫧鐢宠鍗� 鍏宠仈鏁伴噺
oCN.RunProc("exec h_p_Kf_UpDateRelation_MoveStockRequestToPOStockIn_Del " + HInterID);
oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
@@ -1673,6 +1712,43 @@
catch (Exception e)
{
oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鐩存帴璋冩嫧鍗� 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栬皟鎷ㄧ敵璇峰崟鏁版嵁
+ [Route("Kf_MoveStockBill/loadKf_MoveStockBillMain_Push")]
+ [HttpGet]
+ public object loadKf_MoveStockBillMain_Push(long HInterID, long HSubID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select * from h_v_IF_MoveStockRequestBillList_Litee where hmainid =" + HInterID + " and hsubid = " + HSubID, "h_v_IF_MoveStockRequestBillList_Litee");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈煡璇㈠埌婧愬崟淇℃伅锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ 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();
@@ -1796,10 +1872,23 @@
}
//==================================================================================
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = DateTime.Now;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
+ return objJsonResult;
+ }
oCN.BeginTran();
//閿�鍞嚭搴撳垹闄ゅ洖濉攢鍞鍗曞叧鑱旀暟閲�
- //oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Delete " + HInterID);
+ oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Delete " + HInterID);
+
+ //閿�鍞嚭搴撳垹闄ゅ洖濉敹璐ч�氱煡鍗曞叧鑱旀暟閲�
+ oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOutStockToPOStockIn_Delete " + HInterID);
+
//oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
//oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
@@ -2000,6 +2089,17 @@
oBill.DetailColl.Add(oItemSub);
}
+
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = DateTime.Now;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
+ return objJsonResult;
+ }
+
//淇濆瓨
//淇濆瓨瀹屾瘯鍚庡鐞�
bool bResult;
@@ -2204,6 +2304,17 @@
}
//==================================================================================
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = DateTime.Now;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
+ return objJsonResult;
+ }
+
+
oCN.BeginTran();
oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
@@ -2309,6 +2420,17 @@
objJsonResult.count = 0;
objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = DateTime.Now;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
return objJsonResult;
}
@@ -2958,6 +3080,17 @@
oBill.DetailColl.Add(oItemSub);
}
+
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = DateTime.Now;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
+ return objJsonResult;
+ }
+
//淇濆瓨
//淇濆瓨瀹屾瘯鍚庡鐞�
bool bResult;
@@ -3101,6 +3234,16 @@
return objJsonResult;
}
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = DateTime.Now;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
+ return objJsonResult;
+ }
ClsPub.CurUserName = user;
BillOld.MvarItemKey = "Kf_ICStockBillMain";
@@ -3617,7 +3760,15 @@
}
//==================================================================================
-
+ //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = DateTime.Now;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.Message = s;
+ return objJsonResult;
+ }
oCN.BeginTran();
@@ -5757,7 +5908,7 @@
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
//鑾峰彇鐐规椤圭洰缂栬緫鏁版嵁
- ds = oCN.RunProcReturn("select HDotCheckItem, HDotCheckPart , HClaim, a.HRemark,a.HManagerID,e.HNumber HManagerCode,e.HName HManagerName from Sc_MouldDotCheckBillSub a left join Gy_Employee e on a.HManagerID=e.HItemID where 1=1 " + sqlWhere, "Sc_MouldDotCheckBillSub");
+ ds = oCN.RunProcReturn("select * from h_v_Sc_MouldDotCheckBill_Edit where 1=1 " + sqlWhere, "h_v_Sc_MouldDotCheckBill_Edit");
//鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
ds1 = oCN.RunProcReturn(@"select b.HMaterID, mt.Hnumber HMaterNumber ,mt.HName HMaterName, b.HUnitID
,u2.hnumber HUnitNumber,u2.HName HUnitName,b.HQty,b.HQtyMust,b.HRemark
@@ -5770,7 +5921,7 @@
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = null;
+ objJsonResult.data = ds.Tables[0];
objJsonResult.list = list;
}
@@ -6092,8 +6243,7 @@
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
//鑾峰彇鐐规椤圭洰缂栬緫鏁版嵁
- ds = oCN.RunProcReturn(@"select a.HDotCheckItemID,HDotCheckItem, HDotCheckPart , HClaim, a.HRemark,a.HManagerID,e.HNumber HManagerCode,e.HName HManagerName from Sc_MouldDotCheckPlanBillSub a
- left join Gy_Employee e on a.HManagerID=e.HItemID
+ ds = oCN.RunProcReturn(@"select * from h_v_Sc_MouldDotCheckPlanBill_Edit
where 1=1 " + sqlWhere, "Sc_MouldDotCheckPlanBillSub");
////鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
//ds1 = oCN.RunProcReturn(@"select b.HMaterID, mt.Hnumber HMaterNumber ,mt.HName HMaterName, b.HUnitID
@@ -6106,7 +6256,7 @@
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = null;
+ objJsonResult.data = ds.Tables[0];
objJsonResult.list = list;
}
catch (Exception e)
@@ -6204,7 +6354,48 @@
#endregion
-
+ #region 鏍规嵁鍣ㄥ叿鏉$爜鏌ユ壘鍣ㄥ叿妗f淇℃伅PDA
+ [Route("QJ_PDA_MouldDotCheckBill/txtHBarCode_KeyDown")]
+ [HttpGet]
+ public object txtHBarCode_KeyDown(string HBarCode)
+ {
+ try
+ {
+ if (HBarCode == null || HBarCode.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏉″舰鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //寰楀埌淇℃伅
+ ds = oCN.RunProcReturn("select top 1 * from Gy_MouldFileMain where HNumber= '" + HBarCode + "'", "Gy_MouldFileMain");
+ //鍐欏叆淇℃伅
+ 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 妯″叿鎶ュ簾鍏ュ簱鍗�
--
Gitblit v1.9.1