From 0549885dcaed25c47e4fee61d0fc980867810238 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 07 六月 2024 11:29:11 +0800
Subject: [PATCH] 添加委外加工入库出库单接口
---
WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs | 123 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 120 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs
index 41b4d1b..de5046d 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs
@@ -140,6 +140,43 @@
#endregion
+ #region 璁惧璐熻嵎鍒嗘瀽琛�
+ [Route("Sb_EquipMaintainReport/Sb_EquipmentLoadReportList")]
+ [HttpGet]
+ public object Sb_EquipmentLoadReportList(string HDeptID, string HWorkCenterID, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("exec h_p_Sb_EquipmentLoadReportListt '" + HDeptID + "','" + HWorkCenterID + "'", "h_p_Sb_EquipmentLoadReportListt");
+
+ //娣诲姞鍒楀悕
+ 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;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region sql璇彞
@@ -366,7 +403,29 @@
return objJsonResult;
}
- bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ //鍒犻櫎鍓嶆帶鍒�
+ DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_Sb_EquipMaintainBill_BeforeDelCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Sb_EquipMaintainBill_BeforeDelCtrl");
+ if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎鍓嶅垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Sb_EquipMaintainBill_AfterDelCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo);
if (IsDete)
{
objJsonResult.code = "0";
@@ -621,8 +680,8 @@
item.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
item.HCloseType = false; //鍏抽棴绫诲瀷
//oItemSub.HRemark = ""; //澶囨敞
- item.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
- item.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
+ //item.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
+ //item.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
//oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿
//oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
item.HRelationQty = 0; //鍏宠仈鏁伴噺
@@ -882,5 +941,63 @@
#endregion
#endregion
+
+ #region 璁惧淇濆吇閫炬湡棰勮鎶ヨ〃
+
+ [Route("Sb_EquipMaintainWarning/Report")]
+ [HttpGet]
+ public object Report(string HYear, string HEquipTypeID, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //if (!DBUtility.ClsPub.Security_Log("Gy_EquipFileList", 1, false, user))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ if (HYear == null || HYear.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+ objJsonResult.data = "";
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ string sql = "exec h_p_Sb_EquipMaintainWarningReport " + HYear + "," + HEquipTypeID;
+ ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipMaintainWarningReport");
+ }
+
+ //娣诲姞鍒楀悕
+ 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 e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1