From 22752b5e9a5fb36d0647f56fb8f10806f637965c Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期五, 09 十二月 2022 18:00:39 +0800
Subject: [PATCH] 维护
---
WebAPI/Controllers/基础资料/基础资料/Gy_StockCheckItemBillController.cs | 8 ++++----
WebAPI/Controllers/Sc_ProcessMangementController.cs | 18 ++++++++++++++----
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs
index 9c247d9..3f3c0d0 100644
--- a/WebAPI/Controllers/Sc_ProcessMangementController.cs
+++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -167,16 +167,26 @@
//鏍规嵁宸ュ簭姹囨姤鍗曚富ID鑾峰彇宸ュ簭姹囨姤鍏ュ簱鍗曠殑鏁版嵁
DataSet ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_LastProc where HInterID=" + InterID, "h_v_MES_StationOutBillList_LastProc");
DataRow dr = ds.Tables[0].Rows[0];
+
//淇濆瓨
oCN.BeginTran();
- //鐢熶骇姹囨姤鍗曚富琛�
- oCN.RunProc("Insert Into Sc_ICMOReportBillMain " +
+ DataSet DsTable = oCN.RunProcReturn("select * from Sc_ICMOReportBillMain where HBillNo=" + HBillNo, "Sc_ICMOReportBillMain");
+ if (DsTable.Tables[0].Rows.Count > 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "宸插叆搴�,璇蜂笉瑕侀噸澶嶅叆搴�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鐢熶骇姹囨姤鍗曚富琛�
+ oCN.RunProc("Insert Into Sc_ICMOReportBillMain " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HBillStatus,HChecker,HCheckDate" +
",HYear,HPeriod,HRemark,HEmpID,HEmpNumber" +
",HGroupID,HDeptID,HDeptNumber" +
",HMainSourceBillNo,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillType" +
") " +
- " values('3711','3711'," + HInterID.ToString() + ",'" + HBillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" +
+ " values('3711','3711'," + HInterID.ToString() + ",'" + BillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" +
",DATENAME(YEAR,GETDATE()),0,'','" + dr["HEmpID"].ToString() + "','" + dr["鎿嶄綔鍛樹唬鐮�"].ToString() +
"','" + dr["HGroupID"].ToString() + "',0,''" +
",'" + BillNo.ToString() + "'," + InterID.ToString() + ", 0,'3791'" +
@@ -220,7 +230,7 @@
model.Add("FPrdOrgId", new JObject() { ["Fnumber"] = dr1["FPrdOrgNUMBER"].ToString() }); //鐢熶骇缁勭粐1
model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //鍗曟嵁鏃ユ湡1
model.Add("FHZYMESFLAG", "鏄�");// 鏄惁涓篗ES鍚屾
- model.Add("FBillNo", dr1["鍗曟嵁鍙�"].ToString());
+ model.Add("FBillNo", BillNo);
JArray Fentity = new JArray();
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_StockCheckItemBillController.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_StockCheckItemBillController.cs"
index fe36bcf..9366d7c 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_StockCheckItemBillController.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_StockCheckItemBillController.cs"
@@ -298,11 +298,11 @@
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- //oCn.BeginTran();
-
- //oCN.RunProc("exec h_p_StockItemSubDel " + sID);
+ oCn.BeginTran();
- //oCn.Commit();
+ oCN.RunProc("exec h_p_StockItemSubDel " + sID);
+
+ oCn.Commit();
objJsonResult.code = "1";
objJsonResult.count = 1;
--
Gitblit v1.9.1