From e5f0d4aaebc10d97b708b5c9ce8db6859791b79c Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期二, 03 八月 2021 10:20:46 +0800
Subject: [PATCH] nothing
---
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs | 102 +++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 98 insertions(+), 4 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
index 5f205ba..5f57809 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
@@ -465,6 +465,46 @@
return new SQLHelper.ClsCN().RunProcReturn(sql, "Sc_ICMOBillWorkQtyStatus_Tmp");
}
#endregion
+
+ #region 鎶ュ伐骞冲彴浜ч噺姹囬獙璇佹眹鎶ユ暟閲忔槸鍚﹁秴鍑鸿鍒掓暟閲忚緫
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("Sc_MESBeginWorkBill/GetMESOverStepQty")]
+ [HttpGet]
+ public object GetMESOverStepQty(string sWhere)
+ {
+ try
+ {
+ ds = new SQLHelper.ClsCN().RunProcReturn("select isnull(sum(HQty),0) HQty,isnull(sum(HBadQty),0) HBadQty,isnull(sum(HWasterQty),0) HWasterQty from Sc_ICMOBillWorkQtyStatus_Tmp" + sWhere, "Sc_ICMOBillWorkQtyStatus_Tmp");
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "宸叉湁浜ч噺姹囨姤鏁版嵁杩斿洖锛�";
+ objJsonResult.data = ds;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱骇閲忔眹鎶ユ暟鎹紒";
+ objJsonResult.data = null;
+ }
+
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = ex.Message;
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
#region 鎶ュ伐骞冲彴浜ч噺姹囨姤淇濆瓨/缂栬緫
/// <summary>
@@ -533,7 +573,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�";
objJsonResult.data = 1;
return objJsonResult;
}
@@ -552,13 +592,16 @@
#region 鎶ュ伐骞冲彴浜ч噺姹囨姤鍒犻櫎
[Route("Sc_MESBeginWorkBill/DeltetMESProductReportBill")]
[HttpGet]
- public object DeleteGetLineBindBillList(string HInterID)
+ public object DeleteGetLineBindBillList(string HInterID,string HICMOInterID,string HICMOEntryID)
{
try
{
oCN.BeginTran();
//鏇存柊鍒囨崲鐘舵�佸��
string sql = string.Format(@"delete Sc_ICMOBillWorkQtyStatus_Tmp where HInterID='" + HInterID + "'");
+ oCN.RunProc(sql);
+ //鏇存柊浜ч噺瑁呴噺涓存椂琛ㄥ凡姹囨姤鏁伴噺
+ string sql1 = string.Format(@"update Sc_ICMOBillStatus_Tmp set HRelationInterID=0,HSplitRelationQty=0 where HInterID='" + HInterID + "' and HICMOInterID='"+ HICMOInterID + "' and HICMOEntryID='"+ HICMOEntryID + "'");
oCN.RunProc(sql);
oCN.Commit();
objJsonResult.code = "1";
@@ -583,7 +626,7 @@
#region 鎶ュ伐骞冲彴鎶ユ鐢宠淇濆瓨
[Route("Sc_MESBeginWorkBill/SaveGetMESProductReportBillList")]
[HttpGet]
- public object SaveGetMESProductReportBillList(string ScMaxWork,string HSourceBillType, string workcode,int HSourceID,int HICMOInterID,int HICMOEntryID,string HMaker)
+ public object SaveGetMESProductReportBillList(string ScMaxWork,string HSourceBillType, string workcode,int HSourceID,int HICMOInterID,int HICMOEntryID,string HMaker,string Czybm)
{
ListModels oListModels = new ListModels();
try
@@ -624,6 +667,8 @@
model.HGroupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HGroupID"]);
model.HDeptID= DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HDeptID"]);
model.HPRDORGID = DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HPRDORGID"]);
+ model.HMainSourceInterID = HICMOInterID;
+ model.HMainSourceEntryID = HICMOEntryID;
WebS.WebService1 oWebs = new WebS.WebService1();
bool flag=oWebs.set_SaveICMOProductReportBill_Layui(model, sHSourceType, ref DBUtility.ClsPub.sErrInfo);
if (flag)
@@ -652,7 +697,56 @@
return objJsonResult;
}
#endregion
-
+
+
+ #region [鍔ㄦ�佸垪琛╙
+ [Route("Sc_MESBeginWorkBill/ReportFrom")]
+ [HttpGet]
+ public object ReportFrom()
+ {
+ List<string> columnNameList = new List<string>();
+ try
+ {
+ //鏍规嵁閫夋嫨璧勬簮ID鑾峰彇褰撳墠鐢熶骇宸ュ崟銆佽矗浠讳汉
+ ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HRemark,HUseFlag,HBirthDay from Gy_Employee where HItemID=9999", "Gy_Employee");
+ string aa = ds.Tables[0].Columns[0].ToString();
+
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ columnNameList.Add(col.ColumnName);//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�";
+ objJsonResult.data = ds;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�";
+ objJsonResult.data = null;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = e.Message.ToString();
+ objJsonResult.data = null;
+ objJsonResult.list = columnNameList;
+ }
+ return objJsonResult;
+ }
+ #endregion
}
}
--
Gitblit v1.9.1