From 6d414acbe4cd1af3fe8b20bc3e0749a82d25e671 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 13 一月 2026 09:41:10 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 367 ++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 298 insertions(+), 69 deletions(-)
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 7ecb3d4..00b3256 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -7522,22 +7522,10 @@
oItem.HBillType = "3819";
oItem.HBillSubType = "3819";
- //oItem.HInterID =0;
- //oItem.HBillNo = "";
oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
- //oItem.HMakeDate = "";
- //oItem.HYear = "";
- //oItem.HPeriod = "";
- //oItem.HRemark = "";
- //oItem.HCycleUnit = "";
- //oItem.HCheckCycle = "";
- //oItem.HBeginDate = "";
- //oItem.HEndDate = "";
- //oItem.HInnerBillNo = "";
- //oItem.HExplanation = "";
- //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
+
if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
{
objJsonResult.code = "0";
@@ -7580,7 +7568,6 @@
bool bResult;
if (oBill.omodel.HInterID == 0)
{
- // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
}
else
@@ -7592,7 +7579,121 @@
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
- //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 妯″叿淇濆吇璁板綍琛� 淇濆瓨/缂栬緫APP
+ /// <summary>
+ /// 淇濆瓨妯″叿缁翠慨鍗�
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("Sc_MouldMaintainBill/SaveGetMouldMaintainBillListAPP")]
+ [HttpPost]
+ public object SaveGetMouldMaintainBillListAPP([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();
+ string msg3 = sArray[1].ToString();
+ string msg5 = sArray[2].ToString();
+
+ string UserName = "";
+ ListModels oListModels = new ListModels();
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainBill_Edit", 1, false, msg5))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ DAL.ClsSc_MouldMaintainBill oBill = new DAL.ClsSc_MouldMaintainBill();
+ List<Model.ClsSc_MouldMaintainBillMain> lsmain = new List<Model.ClsSc_MouldMaintainBillMain>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Sc_MouldMaintainBillMain(msg2);
+ foreach (Model.ClsSc_MouldMaintainBillMain oItem in lsmain)
+ {
+ UserName = oItem.HMaker; //鍒跺崟浜�
+ DBUtility.ClsPub.CurUserName = UserName;
+ oItem.HBillType = "3819";
+ oItem.HBillSubType = "3819";
+
+ oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
+ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+
+
+ if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oBill.omodel = oItem;
+ }
+ //淇濆吇椤硅〃浣撴暟鎹�
+ //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+ msg3 = msg3.Substring(1, msg3.Length - 2);
+ msg3 = msg3.Replace("\\", "");
+ msg3 = msg3.Replace("\n", ""); //\n
+ List<Model.ClsSc_MouldMaintainRuleBillSub_Item> ls = new List<Model.ClsSc_MouldMaintainRuleBillSub_Item>();
+ ls = oListModels.getObjectByJson_Sc_MouldMaintainRuleBillSub_Item(msg3);
+ int i = 0;
+ foreach (Model.ClsSc_MouldMaintainRuleBillSub_Item oItemSub in ls)
+ {
+
+ i++;
+ oItemSub.HEntryID = i;
+ oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
+ oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
+ oBill.DetailCol.Add(oItemSub);
+
+ }
+
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (oBill.omodel.HInterID == 0)
+ {
+ bResult = oBill.AddBill_APP(ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ bResult = oBill.ModifyBill_APP(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
objJsonResult.data = 1;
return objJsonResult;
}
@@ -8257,7 +8358,6 @@
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
string msg4 = sArray[2].ToString();
- //string msg5 = sArray[3].ToString();
string UserName = "";
ListModels oListModels = new ListModels();
@@ -8279,28 +8379,14 @@
lsmain = oListModels.getObjectByJson_Sc_MouldDotCheckBillMain(msg2);
foreach (Model.ClsSc_MouldDotCheckBillMain oItem in lsmain)
{
- //oItem.HMaker = "";
UserName = oItem.HMaker; //鍒跺崟浜�
oItem.HMaker = msg4;
oItem.HBillType = "3821";
oItem.HBillSubType = "3821";
- //oItem.HInterID =0;
- //oItem.HBillNo = "";
oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
- //oItem.HMakeDate = "";
- //oItem.HYear = "";
- //oItem.HPeriod = "";
- //oItem.HRemark = "";
- //oItem.HCycleUnit = "";
- //oItem.HCheckCycle = "";
- //oItem.HBeginDate = "";
- //oItem.HEndDate = "";
- //oItem.HInnerBillNo = "";
- //oItem.HExplanation = "";
- //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
{
objJsonResult.code = "0";
@@ -8316,7 +8402,6 @@
msg3 = msg3.Substring(1, msg3.Length - 2);
msg3 = msg3.Replace("\\", "");
msg3 = msg3.Replace("\n", ""); //\n
- //msg2 = msg2.Replace("'", "鈥�");
List<Model.ClsSc_MouldDotCheckBillSub> ls = new List<Model.ClsSc_MouldDotCheckBillSub>();
ls = oListModels.getObjectByJson_Sc_MouldDotCheckBillSub(msg3);
int i = 0;
@@ -8325,57 +8410,26 @@
i++;
oItemSub.HEntryID = i;
- //oItemSub.HCloseMan = ""; //琛屽叧闂�
+
oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
- //oItemSub.HRemark = ""; //澶囨敞
+
oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
- //oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿
- //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
+
oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺
- //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦
- //HMaterID = "";//閰嶄欢浠g爜
- //HUnitID = "";//鍗曚綅浠g爜
- //HQty = "";//瀹為檯鐢ㄩ噺
- //HQtyMust = "";//鍗曚綅鐢ㄩ噺
- //HRemark = "";//澶囨敞
+
oBill.DetailColl.Add(oItemSub);
}
- ////閰嶄欢椤硅〃浣撴暟鎹�
- ////鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
- //msg5 = msg5.Substring(1, msg5.Length - 2);
- //msg5 = msg5.Replace("\\", "");
- //msg5 = msg5.Replace("\n", ""); //\n
- // //msg2 = msg2.Replace("'", "鈥�");
- //List<Model.ClsSc_MouldDotCheckBillSub_Item> ls1 = new List<Model.ClsSc_MouldDotCheckBillSub_Item>();
- //ls1 = oListModels.getObjectByJson_Sc_MouldDotCheckBillSub_Item(msg5);
- //int j = 0;
- //foreach (Model.ClsSc_MouldDotCheckBillSub_Item oItemSub in ls1)
- //{
-
- // j++;
- // oItemSub.HEntryID = j;
- // //oItemSub.HCloseMan = ""; //琛屽叧闂�
- // oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
- // oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
-
- // oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
- // oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
-
- // oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺
- // oBill.DetailCol.Add(oItemSub);
- //}
//淇濆瓨
//淇濆瓨瀹屾瘯鍚庡鐞�
bool bResult;
if (oBill.omodel.HInterID == 0)
{
- // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
}
else
@@ -8387,7 +8441,128 @@
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
- //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 妯″叿鐐规璁板綍琛� 淇濆瓨/缂栬緫APP
+ /// <summary>
+ /// 淇濆瓨妯″叿缁翠慨鍗�
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("Sc_MouldDotCheckBill/SaveGetMouldDotCheckBillListAPP")]
+ [HttpPost]
+ public object SaveGetMouldDotCheckBillListAPP([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();
+ string msg3 = sArray[1].ToString();
+ string msg4 = sArray[2].ToString();
+
+ string UserName = "";
+ ListModels oListModels = new ListModels();
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBill_Edit", 1, false, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ DAL.ClsSc_MouldDotCheckBill oBill = new DAL.ClsSc_MouldDotCheckBill();
+ List<Model.ClsSc_MouldDotCheckBillMain> lsmain = new List<Model.ClsSc_MouldDotCheckBillMain>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Sc_MouldDotCheckBillMain(msg2);
+ foreach (Model.ClsSc_MouldDotCheckBillMain oItem in lsmain)
+ {
+ UserName = oItem.HMaker; //鍒跺崟浜�
+ oItem.HMaker = msg4;
+ oItem.HBillType = "3821";
+ oItem.HBillSubType = "3821";
+
+ oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
+ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+
+ if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oBill.omodel = oItem;
+ }
+ //琛ㄤ綋鏁版嵁
+ //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+ msg3 = msg3.Substring(1, msg3.Length - 2);
+ msg3 = msg3.Replace("\\", "");
+ msg3 = msg3.Replace("\n", ""); //\n
+ List<Model.ClsSc_MouldDotCheckBillSub> ls = new List<Model.ClsSc_MouldDotCheckBillSub>();
+ ls = oListModels.getObjectByJson_Sc_MouldDotCheckBillSub(msg3);
+ int i = 0;
+ foreach (Model.ClsSc_MouldDotCheckBillSub oItemSub in ls)
+ {
+
+ i++;
+ oItemSub.HEntryID = i;
+
+ oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
+
+ oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
+ oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
+
+ oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺
+
+
+ oBill.DetailColl.Add(oItemSub);
+
+ }
+
+
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (oBill.omodel.HInterID == 0)
+ {
+ bResult = oBill.AddBill_APP(ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ bResult = oBill.ModifyBill_APP(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
objJsonResult.data = 1;
return objJsonResult;
}
@@ -8448,7 +8623,7 @@
list.Add(ds.Tables[0]);
list.Add(ds1.Tables[0]);
- objJsonResult.code = "0";
+ objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
@@ -8997,7 +9172,7 @@
return objJsonResult;
}
#endregion
-
+
#endregion
#region 妯″叿鐐规璁″垝琛�
@@ -15957,6 +16132,60 @@
#endregion
+ #region 鍣ㄥ叿澶勭悊鍑哄簱鍗� 杩斿洖婧愬崟鏁版嵁
+ /// <summary>
+ /// 杩斿洖婧愬崟鏁版嵁
+ /// </summary>
+ /// <returns></returns>
+ [Route("Sc_MouldScrapOutHouseBill/GetSourceBill_MouldScrapOutHouse_Json")]
+ [HttpGet]
+ public object GetSourceBill_MouldScrapOutHouse_Json(Int64 HInterID, Int64 HEntryID, string HBillType)
+ {
+ try
+ {
+ string sViewName = "";
+ //鍣ㄥ叿棰嗙敤鐢宠鍗�
+ if (HBillType == "3823")
+ {
+ sViewName = "h_v_Sc_MouldScrapRequestBillList";
+ }
+ if (sViewName == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "涓嶆敮鎸佽婧愬崟绫诲瀷锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCn.RunProcReturn("select * from h_v_Sc_MouldScrapRequestBillList where hmainid="+ HInterID.ToString()+ "and hsubid="+ HEntryID, "h_v_Sc_MouldScrapRequestBillList");
+ 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 = "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 = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1