From 59708a79ef698d66de3cd4da04346afd373d1c5e Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期四, 16 四月 2026 17:12:51 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs | 71 ++++++++++++++++++++++++++++-------
1 files changed, 56 insertions(+), 15 deletions(-)
diff --git a/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs b/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs
index 811b127..782e8ff 100644
--- a/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs
+++ b/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs
@@ -917,7 +917,40 @@
#endregion
+ #region [璁惧缁翠慨鍗曢�氳繃鏁呴殰鐧昏鍗曡幏鍙栫淮淇褰昡
+ [Route("Sb_EqpRepairWorkBill/GetEquipMatainanceBillBySourceInterID")]
+ [HttpGet]
+ public object GetEquipMatainanceBillBySourceInterID (string user, int HSourceInterID)
+ {
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairCheckBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ ds = oCN.RunProcReturn($"select * from h_v_GetEquipMatainanceBillBySourceInterID where HInterID = {HSourceInterID} and isnull(璁惧缁翠慨楠屾敹鍗�,'') = ''", "h_v_GetEquipMatainanceBillBySourceInterID");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
#region 璁惧缁翠慨楠屾敹鍗曚繚瀛�/缂栬緫
/// <summary>
@@ -1033,11 +1066,8 @@
bool bResult;
if (oBill.omodel.HInterID == 0)
{
- // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
- //鍙嶅啓缁翠慨璁板綍鍗曞叧闂�
- string sql = "Update Sb_EquipRepairWorkBillMain set HCloseMan='鍏宠仈楠屾敹鍗曡嚜鍔ㄥ叧闂�',HCloseDate=GETDATE(),HBillStatus=3,HCloseType = 1 Where HInterID=" + oBill.omodel.HMainSourceInterID.ToString();
- ds = oCN.RunProcReturn(sql, "Sb_EquipRepairWorkBillMain");
+
//閮ㄩ棬,鍙戠幇浜�,璐熻矗浜�,璁惧
_ = SendDingDingAsync(oBill.omodel.HDeptID, oBill.omodel.HEmpID, oBill.omodel.HManagerID, oBill.omodel.HEquipID, 3);
}
@@ -1050,7 +1080,6 @@
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
- //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
objJsonResult.data = 1;
return objJsonResult;
}
@@ -1258,6 +1287,7 @@
ListModels oListModels = new ListModels();
try
{
+ string errRef = "";
if (!DBUtility.ClsPub.Security_Log("Sb_EquipConkBookBill_Edit", 1, false, msg4))
{
objJsonResult.code = "0";
@@ -1303,6 +1333,18 @@
//oItem.HRepairID = 0; //缁翠慨椤圭洰(Gy_Repair)
//oItem.HRemark = ""; //澶囨敞
//oItem.HMainSourceInterID = oItem.HInterID;
+ if (oSystemParameter.ShowBill(ref errRef))
+ {
+ // if (oSystemParameter.omodel.WMS_CampanyName == "鍗庤垷")
+ // {
+ // oItem.HRepairManID = oItem.HEmpID;
+ // }
+ // else
+ // {
+ oItem.HRepairManID = 0;
+ // }
+ }
+
//oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
@@ -1344,7 +1386,6 @@
//oItemSub.HManagerID = 0; //璐熻矗浜篒D
//oItemSub.HMoney = 0; //缁翠慨璐圭敤
oBill.DetailColl.Add(oItemSub);
-
}
//淇濆瓨
//淇濆瓨瀹屾瘯鍚庡鐞�
@@ -1518,19 +1559,20 @@
}
bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Sb_EquipConkBookBill_AfterDelCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo);
- if (IsDete)
+
+ var oDelDs = oCN.RunProcReturn($"exec h_p_Sb_EquipConkBookBill_AfterDelCtrl {lngBillKey},{oBill.omodel.HBillNo}, {user}", "h_p_Sb_EquipConkBookBill_AfterDelCtrl");
+ if (!IsDete || oDelDs == null)
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
}
else
{
-
- objJsonResult.code = "0";
- objJsonResult.count = 0;
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
@@ -1600,7 +1642,7 @@
}
#endregion
- #region 璁惧鐐规璁板綍鎻愪氦PDA
+ #region 璁惧缁翠慨璁板綍鎻愪氦PDA
[Route("Sb_PDA_EqpRepairWorkBill/SaveGetEqpRepairWorkBillList")]
[HttpPost]
@@ -1633,7 +1675,7 @@
objJsonResult.data = 1;
return objJsonResult;
}
-
+ LogService.Write("婧愬崟绫诲瀷: " + oItem.HMainSourceBillType);
//oItem.HMaker = "";
UserName = oItem.HMaker; //鍒跺崟浜�
oItem.HBillType = "3910";
@@ -1686,6 +1728,7 @@
//oItemSub.HCloseMan = ""; //琛屽叧闂�
oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
+
//oItemSub.HRemark = ""; //澶囨敞
//oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
//oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
@@ -1704,7 +1747,6 @@
bool bResult;
if (oBill.omodel.HInterID == 0)
{
- // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
}
else
@@ -1716,7 +1758,6 @@
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
- //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
objJsonResult.data = 1;
return objJsonResult;
}
--
Gitblit v1.9.1