From 28161a2db7a593c30ca53e5c1e59103cd7591fe7 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 27 四月 2026 09:47:32 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs | 57 +++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 41 insertions(+), 16 deletions(-)
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs
index 30af7a7..8040295 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipRepairSendWorkBillController.cs
@@ -49,22 +49,11 @@
ds = oCN.RunProcReturn(sql + sWhere+ " order by hmainid desc ", "h_v_Sb_EquipRepairSendWorkBill_Edit");
}
- //if (ds.Tables[0].Rows.Count != 0 || ds != null)
- //{
objJsonResult.code = "1";
objJsonResult.count = ds.Tables[0].Rows.Count;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
- //}
- //else
- //{
- //objJsonResult.code = "0";
- //objJsonResult.count = 0;
- //objJsonResult.Message = "鏃犳暟鎹�";
- //objJsonResult.data = null;
- //return objJsonResult;
- //}
}
catch (Exception e)
{
@@ -204,21 +193,48 @@
if (OperationType == 1)//鏂板
{
+ LogService.Write("Insert Into Sb_EquipRepairSendWorkBillMain" +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+ ",HEquipID,HExplanation,HInnerBillNo,HRepairID,HEmpID" +
+ ",HManagerID,HDeptID,HRepairContent,HRepairPlanBeginDate,HRepairPlanEndDate" +
+ ",HPlanTimes,HCycleUnit,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" +
+ ") " +
+ " values('" + BillType + "','" + BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+ ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
+ ", " + omodel.HEquipID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HRepairID.ToString() + "," + omodel.HEmpID.ToString() +
+ "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HRepairContent + "','" + omodel.HRepairPlanBeginDate + "','" + omodel.HRepairPlanEndDate + "'" +
+ "," + omodel.HPlanTimes.ToString() + ",'" + omodel.HCycleUnit + "','" + omodel.HMainSourceBillType + "','" + omodel.HMainSourceInterID + "','" + omodel.HMainSourceEntryID + "'" +
+ ") ");
//涓昏〃
oCN.RunProc("Insert Into Sb_EquipRepairSendWorkBillMain" +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
",HEquipID,HExplanation,HInnerBillNo,HRepairID,HEmpID" +
",HManagerID,HDeptID,HRepairContent,HRepairPlanBeginDate,HRepairPlanEndDate" +
- ",HPlanTimes,HCycleUnit" +
+ ",HPlanTimes,HCycleUnit,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" +
") " +
" values('" + BillType + "','" + BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
", " + omodel.HEquipID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HRepairID.ToString() + "," + omodel.HEmpID.ToString() +
"," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HRepairContent + "','" + omodel.HRepairPlanBeginDate + "','" + omodel.HRepairPlanEndDate + "'" +
- "," + omodel.HPlanTimes.ToString() + ",'" + omodel.HCycleUnit + "'" +
+ "," + omodel.HPlanTimes.ToString() + ",'" + omodel.HCycleUnit + "','" + omodel.HMainSourceBillType + "','" + omodel.HMainSourceInterID + "','" + omodel.HMainSourceEntryID + "'" +
") ");
+
+ // "Insert Into Sb_EquipRepairSendWorkBillMain" +
+ // "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+ // ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+ // ",HEquipID,HExplanation,HInnerBillNo,HRepairID,HEmpID" +
+ // ",HManagerID,HDeptID,HRepairContent,HRepairPlanBeginDate,HRepairPlanEndDate" +
+ // ",HPlanTimes,HCycleUnit" +
+ // ") " +
+ // " values('" + BillType + "','" + BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+ // ", Year(getdate()),Month(getdate()),'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
+ // ", " + omodel.HEquipID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HRepairID.ToString() + "," + omodel.HEmpID.ToString() +
+ // "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HRepairContent + "','" + omodel.HRepairPlanBeginDate + "','" + omodel.HRepairPlanEndDate + "'" +
+ // "," + omodel.HPlanTimes.ToString() + ",'" + omodel.HCycleUnit + "'" +
+ // ") "
}
else if (OperationType == 3)
{
@@ -249,7 +265,7 @@
oCN.RunProc("delete from Sb_EquipRepairSendWorkBillSub where HInterID='" + omodel.HInterID + "' and HEntryID='" + hentryid + "'");
}
//淇濆瓨瀛愯〃
- objJsonResult = AddBillSub(msg3, hentryid);
+ objJsonResult = AddBillSub(msg3, hentryid, OperationType);
if (objJsonResult.code == "0")
{
objJsonResult.code = "0";
@@ -275,13 +291,22 @@
}
}
- public json AddBillSub(string msg3, int hentryid)
+ public json AddBillSub(string msg3, int hentryid,int OperationType)
{
DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSb_EquipRepairSendWorkBillSub>>(msg3);
int i = 1;
//鎻掑叆瀛愯〃
foreach (Models.ClsSb_EquipRepairSendWorkBillSub oSub in DetailColl)
{
+ LogService.Write("Insert into Sb_EquipRepairSendWorkBillSub " +
+ " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HRepairID,HManagerID,HRepairExplanation" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + (hentryid == -1 ? i : hentryid) + ",'" + oSub.HCloseMan + "'," + oSub.HEntryCloseDate.ToShortDateString() + "," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HRepairID.ToString() + "," + oSub.HManagerID.ToString() + ",'" + oSub.HRepairExplanation + "'" +
+ ") ");
oCN.RunProc("Insert into Sb_EquipRepairSendWorkBillSub " +
" (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
@@ -295,7 +320,7 @@
}
//淇濆瓨鍚庢帶鍒�=========================================
- DataSet ds = oCN.RunProcReturn("Exec h_p_Sb_EquipRepairSendWorkBill_AfterSaveCtrl " + omodel.HInterID + ",'" + omodel.HBillNo + "','',1", "h_p_Sb_EquipRepairSendWorkBill_AfterSaveCtrl");
+ DataSet ds = oCN.RunProcReturn("Exec h_p_Sb_EquipRepairSendWorkBill_AfterSaveCtrl " + omodel.HInterID + ",'" + omodel.HBillNo + "','','"+ OperationType + "'", "h_p_Sb_EquipRepairSendWorkBill_AfterSaveCtrl");
if (ds == null)
{
objJsonResult.code = "0";
--
Gitblit v1.9.1