From dbbcd506929afda0a85ae23bcb5f88c1dccef387 Mon Sep 17 00:00:00 2001
From: pzy <2829717936@qq.com>
Date: 星期一, 26 八月 2024 15:19:55 +0800
Subject: [PATCH] 11
---
WebAPI/Controllers/基础资料/基础资料/Gy_RecConditionBillController.cs | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 59 insertions(+), 0 deletions(-)
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RecConditionBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RecConditionBillController.cs"
index 3b04503..ff06838 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RecConditionBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RecConditionBillController.cs"
@@ -342,5 +342,64 @@
}
}
#endregion
+
+ #region 鏀舵鏉′欢 閲戣澏鍚屾
+ [Route("Gy_RecCondition/SaveGy_RecConditionListApi")]
+ [HttpPost]
+ public object SaveGy_RecConditionListApi([FromBody] JObject msg)
+ {
+ try
+ {
+ var _value = msg["model"].ToString();
+ LogService.Write("鏀舵鏉′欢:" + _value.ToString());
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ListModels oListModels = new ListModels();
+ List<Model.ClsGy_RecCondition_Model> lsmain = new List<Model.ClsGy_RecCondition_Model>();
+ lsmain = oListModels.getObjectByJson_Gy_RecCondition(_value);
+ string sql = string.Empty;
+ //淇濆瓨
+ oCN.BeginTran();
+ sql = $"delete Gy_RecCondition where HItemID = {lsmain[0].HItemID}";
+ oCN.RunProc(sql);
+ sql = "set identity_insert Gy_RecCondition on";
+ oCN.RunProc(sql);
+
+ LogService.Write("鏀舵鏉′欢:" + $@"insert into Gy_RecCondition(HItemID,HNumber,HName ,HShortNumber ,HParentID ,HLevel
+ ,HEndFlag ,HStopflag ,HRemark ,HHelpCode ,HUseFlag
+ ,HMakeTime ,HMakeEmp ,HCheckEmp ,HCheckTime ,HModifyEmp
+ ,HModifyTime ,HStopEmp ,HStopTime ,HUSEORGID,HCREATEORGID)
+ values({lsmain[0].HItemID},'{lsmain[0].HNumber}','{lsmain[0].HName}','{lsmain[0].HShortNumber}',{lsmain[0].HParentID},{lsmain[0].HLevel}
+ ,{Convert.ToString(lsmain[0].HEndFlag ? 1 : 0)},{Convert.ToString(lsmain[0].HStopflag ? 1 : 0) },'{lsmain[0].HRemark}','{lsmain[0].HHelpCode}','{lsmain[0].HUseFlag}'
+ ,'{lsmain[0].HMakeTime}','{lsmain[0].HMakeEmp}','{lsmain[0].HCheckEmp}','{lsmain[0].HCheckTime}','{lsmain[0].HModifyEmp}'
+ ,'{lsmain[0].HModifyTime}','{lsmain[0].HStopEmp}',null,{lsmain[0].HUSEORGID},{lsmain[0].HCREATEORGID})");
+ oCN.RunProc($@"insert into Gy_RecCondition(HItemID,HNumber,HName ,HShortNumber ,HParentID ,HLevel
+ ,HEndFlag ,HStopflag ,HRemark ,HHelpCode ,HUseFlag
+ ,HMakeTime ,HMakeEmp ,HCheckEmp ,HCheckTime ,HModifyEmp
+ ,HModifyTime ,HStopEmp ,HStopTime ,HUSEORGID,HCREATEORGID)
+ values({lsmain[0].HItemID},'{lsmain[0].HNumber}','{lsmain[0].HName}','{lsmain[0].HShortNumber}',{lsmain[0].HParentID},{lsmain[0].HLevel}
+ ,{Convert.ToString(lsmain[0].HEndFlag ? 1 : 0)},{Convert.ToString(lsmain[0].HStopflag ? 1 : 0) },'{lsmain[0].HRemark}','{lsmain[0].HHelpCode}','{lsmain[0].HUseFlag}'
+ ,'{lsmain[0].HMakeTime}','{lsmain[0].HMakeEmp}','{lsmain[0].HCheckEmp}','{lsmain[0].HCheckTime}','{lsmain[0].HModifyEmp}'
+ ,'{lsmain[0].HModifyTime}','{lsmain[0].HStopEmp}',null,{lsmain[0].HUSEORGID},{lsmain[0].HCREATEORGID})", ref DBUtility.ClsPub.sExeReturnInfo);
+ //淇敼涓婄骇涓洪潪鏈骇浠g爜
+ sql = "set identity_insert Gy_RecCondition off";
+ oCN.RunProc(sql);
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1