From 8cb6b0cb0bb65bf2079893aa195f3f49ad442e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E6=95=8F=E5=81=A5?= Date: Sun, 15 Dec 2024 15:44:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entity/SysU8FieldDefine.cs | 2 +- .../ST/USERPCO.cs | 13 ++++++++----- UFIDA.U8.Framework.Api/App_Data/API_Meta.db | Bin 65536 -> 65536 bytes .../App_Data/采购入库单模板.json | 15 +++++++++++++++ .../Controllers/U8/STController.cs | 2 ++ .../UFIDA.U8.Framework.Api.csproj | 1 + 6 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 UFIDA.U8.Framework.Api/App_Data/采购入库单模板.json diff --git a/UFIDA.U8.Framework.Api.Common/Entity/SysU8FieldDefine.cs b/UFIDA.U8.Framework.Api.Common/Entity/SysU8FieldDefine.cs index 7913ed7..6dba63a 100644 --- a/UFIDA.U8.Framework.Api.Common/Entity/SysU8FieldDefine.cs +++ b/UFIDA.U8.Framework.Api.Common/Entity/SysU8FieldDefine.cs @@ -59,7 +59,7 @@ namespace UFIDA.U8.Framework.Api.Common.Entity [SugarColumn(ColumnName = "iSort", IsNullable = true)] public int? iSort { get; set; } - [SugarColumn(ColumnName = "iSort", IsNullable = true)] + [SugarColumn(ColumnName = "bEnable", IsNullable = true)] public bool? bEnable { get; set; } diff --git a/UFIDA.U8.Framework.Api.ControlObject/ST/USERPCO.cs b/UFIDA.U8.Framework.Api.ControlObject/ST/USERPCO.cs index 1cd9fe3..133a238 100644 --- a/UFIDA.U8.Framework.Api.ControlObject/ST/USERPCO.cs +++ b/UFIDA.U8.Framework.Api.ControlObject/ST/USERPCO.cs @@ -22,7 +22,7 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST { try { - var co = "USERPCO.USERPCO".GetComObject(); + var co = "USERPCO.VoucherCO".GetComObject(); var errorMsg = ""; @@ -52,10 +52,11 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST var newCode = co.GetNewVouchCode(sVouchType, domHead, ref errorMsg); logInfo.Debug($"获取新单号:{newCode}"); - //if (!string.IsNullOrWhiteSpace(newCode)) - //{ - // object value = domHead.SetDomKeyValue(codeKey, newCode); - //} + + if (!string.IsNullOrWhiteSpace(newCode)) + { + object value = CommonHelper.SetDomKeyValue(domHead, codeKey, newCode); + } } @@ -78,6 +79,8 @@ namespace UFIDA.U8.Framework.Api.ControlObject.ST throw ex; } + baseLogin.Connection.CommitTrans(); + if (!res.bSuccess) { res.message = "新增失败"; diff --git a/UFIDA.U8.Framework.Api/App_Data/API_Meta.db b/UFIDA.U8.Framework.Api/App_Data/API_Meta.db index 10c2ab90b6f517de1432b4bb7bcc336b4db1874c..8b049e1e7b3f85ceda646b616b26c6a7feaa2fbc 100644 GIT binary patch delta 250 zcmZo@U}%+#C|m(;Y(yi|+LE9|2jcxEy%@dq&T2l4OZ zp9$3d6R3R$gXhGFu6+DETzPmHgoSn0MHv_jC&%=gaGP2g8k!mzFfcI4Pjr;wapgsl z7w$J>gh&M%+#C|m(;Y(yi`-u$@2EmjD`~@>TX_PALYQagMpc!oq<1qpPhduP~T5J9(P_I z24P`cbx{Te)5%BsO+*b1jjRj}O^poPd5~n{`b~7;GO~Oi8DU|d9)3;+0|P@iN=ePl lH)LR7@R&H!Wzq$f#VivNn9UfDPiFs+H*r$X=HnkM`2nI0H1z-g diff --git a/UFIDA.U8.Framework.Api/App_Data/采购入库单模板.json b/UFIDA.U8.Framework.Api/App_Data/采购入库单模板.json new file mode 100644 index 0000000..45f16f3 --- /dev/null +++ b/UFIDA.U8.Framework.Api/App_Data/采购入库单模板.json @@ -0,0 +1,15 @@ +{ + "ccode": "", //单号 + "ddate": "2022-10-25", //入库日期,日期格式无时间部分 + "cwhcode": "04", //仓库编码 + "cexch_name": "人民币", + "cmaker": "demo", //制单人 + "cmemo": "", //备注 + "body": [ + { + "cinvcode": "F010-80102251", //存货编码 + "iquantity": 10, //数量 + "dmadedate": "2022-10-10", //生产日期,日期格式无时间部分,没有启动保质期管理可以不用录入 + } + ] +} \ No newline at end of file diff --git a/UFIDA.U8.Framework.Api/Controllers/U8/STController.cs b/UFIDA.U8.Framework.Api/Controllers/U8/STController.cs index aa324ee..5a5f629 100644 --- a/UFIDA.U8.Framework.Api/Controllers/U8/STController.cs +++ b/UFIDA.U8.Framework.Api/Controllers/U8/STController.cs @@ -233,6 +233,8 @@ namespace UFIDA.U8.Framework.Api.Controllers.U8 } } + input[voucherInfo.BodyName] = bodyData; + var co = new USERPCO(); var res = await co.Insert(baseLogin, input, voucherInfo.VoucherType, bGetCode, codeKey, bCheck, bBeforCheckStock, bIsRedVouch, sAddedState, bReMote); diff --git a/UFIDA.U8.Framework.Api/UFIDA.U8.Framework.Api.csproj b/UFIDA.U8.Framework.Api/UFIDA.U8.Framework.Api.csproj index f057df1..55d9ec7 100644 --- a/UFIDA.U8.Framework.Api/UFIDA.U8.Framework.Api.csproj +++ b/UFIDA.U8.Framework.Api/UFIDA.U8.Framework.Api.csproj @@ -482,6 +482,7 @@ PreserveNewest + Designer