From 849e974e20d9894f3da95ebf504d97ce9f14c9ed Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 05 十二月 2024 15:03:25 +0800
Subject: [PATCH] 工艺路线撤回,出站汇报单修改时间功能能
---
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs | 73 ++++++++++++++++++++++++++++++++++++
1 files changed, 73 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
index a46948a..a438827 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
@@ -938,6 +938,79 @@
}
#endregion
+ #region 鎶ュ伐骞冲彴寮�宸ュ崟 鍒峰崱淇濆瓨鍒峰崱浜�
+ /// <summary>
+ /// 寮�宸ュ崟
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("Sc_MESBeginWorkBill/AddHCardswiper")]
+ [HttpPost]
+ public object AddHCardswiper([FromBody] JObject msg)
+ {
+
+ var _value = msg["msg"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+
+ ListModels oListModels = new ListModels();
+ try
+ {
+ oCN.BeginTran();
+ DLL.ClsSc_MESBeginWorkBill oBill = new DLL.ClsSc_MESBeginWorkBill();
+ List<Models.ClsSc_MESBeginWorkBillSub> lsmain = new List<Models.ClsSc_MESBeginWorkBillSub>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Sc_MESBeginWorkBillSub(msg2);
+
+ foreach (Models.ClsSc_MESBeginWorkBillSub oItemSub in lsmain)
+ {
+ oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
+
+ oBill.DetailColl.Add(oItemSub);
+ }
+ ds = oCN.RunProcReturn("select * from Sc_MESBeginWorkBillSub where HInterID<0 order by HInterID", "Sc_MESBeginWorkBillSub");
+ string HInterID = "-1";
+ if (ds.Tables[0].Rows.Count>0) {
+ HInterID = (int.Parse(ds.Tables[0].Rows[0]["HInterID"].ToString()) - 1).ToString();
+ }
+ //msg3 = msg3.Substring(1, msg3.Length - 2);
+ //msg3 = msg3.Replace("\\", "");
+ //msg3 = msg3.Replace("\n", ""); //\n
+
+ //淇濆瓨
+ foreach (Models.ClsSc_MESBeginWorkBillSub oSub in oBill.DetailColl)
+ {
+ ds = oCN.RunProcReturn("select * from Sc_MESBeginWorkBillSub where HBillNo_bak='" + oSub.HBillNo_bak + "'", "Sc_MESBeginWorkBillSub");
+ string subSql = "insert into Sc_MESBeginWorkBillSub " +
+ "(HInterID, HEntryID,HBillNo_bak,HCloseMan,HEntryCloseDate,HCloseType, HSourceInterID, HSourceEntryID" +
+ ",HRelationQty,HRelationMoney, HSourceBillNo, HSourceBillType, HRemark,HCardswiperMan,HCardswiperDate,HEmpID) " +
+ "values(" +
+ "'" + HInterID + "','" + (ds.Tables[0].Rows.Count + 1) + "','" + oSub.HBillNo_bak + "','','" + oSub.HEntryCloseDate + "','" + oSub.HCloseType + "','',''," +
+ "0,0,'','','','" + oSub.HCardswiperMan + "',getdate(),'" + oSub.HEmpID + "')";
+ oCN.RunProc(subSql);
+ }
+ oCN.Commit();
+
+ 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.Message;
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
public DataTable getInfodatanow(string hsoucreID)
{
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
--
Gitblit v1.9.1