From 3ad2a9ea53d9b647ec10c9ece51f40d7f078653a Mon Sep 17 00:00:00 2001 From: yxj <yxj@hz-kingdee.com> Date: 星期三, 27 十二月 2023 13:36:53 +0800 Subject: [PATCH] 生产入库、委外入库、其他入库、生产领料、委外领料、其他出库、直接调拨扫码上传方法增加递入保管人、验收人、金蝶WISE制单人等 --- WebAPI/Controllers/ReportPlatFormController.cs | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/WebAPI/Controllers/ReportPlatFormController.cs b/WebAPI/Controllers/ReportPlatFormController.cs index a1295de..8a91897 100644 --- a/WebAPI/Controllers/ReportPlatFormController.cs +++ b/WebAPI/Controllers/ReportPlatFormController.cs @@ -70,28 +70,31 @@ try { - ds = oCN.RunProcReturn("select * from Gy_SourceRelationSet where HSourceID='" + HSourceID + "' and HUserName='"+ HSourceName + "'", "Gy_SourceRelationSet"); + ds = oCN.RunProcReturn("select * from Gy_SourceRelationSet where HSourceID='" + HSourceID + "' and HUserName='" + HUserName + "'", "Gy_SourceRelationSet"); + if (ds.Tables[0].Rows.Count > 0) { - objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "褰撳墠浜哄憳鍒涘缓姝ょ敓浜ц祫婧�,涓嶅厑璁搁噸澶嶅垱寤猴紒"; objJsonResult.data = null; - return objJsonResult; + } - oCN.BeginTran(); - //鍐欏叆浜х嚎缁戝畾 - string sql = string.Format(@"insert into Gy_SourceRelationSet (HSourceID,HUserName,HGroupID,HManagerID,HRemark,HCreateDate,HCreator,HNowFlag,HCheckManID) + else + { + oCN.BeginTran(); + //鍐欏叆浜х嚎缁戝畾 + string sql = string.Format(@"insert into Gy_SourceRelationSet (HSourceID,HUserName,HGroupID,HManagerID,HRemark,HCreateDate,HCreator,HNowFlag,HCheckManID) values('" + HSourceID + "','" + HUserName + "','" + HGroupID + "','" + HManagerID + "','" + HRemark + "','" + DateTime.Parse(HCreateDate).ToShortDateString() + "','" + HUserName + "','0','')"); - oCN.RunProc(sql); - oCN.Commit(); + oCN.RunProc(sql); + oCN.Commit(); - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; - objJsonResult.data = null; + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + objJsonResult.data = null; + } } catch (Exception e) { -- Gitblit v1.9.1