From 7f8ed8cdc49b33178f34c91edf862f831cd30c9c Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 08 二月 2023 09:18:04 +0800
Subject: [PATCH] 供应商物料;根据登录用户获取默认值
---
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index c5f6cea..ccf068c 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -215,6 +215,7 @@
objJsonResult.data = null;
return objJsonResult;
}
+
//if (HWorkTimes <= 0)
//{
// objJsonResult.code = "0";
@@ -255,10 +256,13 @@
// objJsonResult.data = null;
// return objJsonResult;
//}
+ var num = 0;
+
//鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
oCN.BeginTran();
if ("Add".Equals(eventType))
{
+ num = 1;
if (!AllowbillNo(HBillNo))
{
oCN.RollBack();
@@ -290,6 +294,7 @@
}
else if ("Modify".Equals(eventType))
{
+ num = 2;
oCN.RunProc("UpDate Sc_StationOutBillMain set " +
"HUpDater='" + HMaker + "'" +
",HUpDateDate=getdate()" +
@@ -358,7 +363,7 @@
objJsonResult.data = null;
return objJsonResult;
}
- oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_Out " + HInterID + ",1");
+ oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_Out " + HInterID + ","+ num + "");
oCN.RunProc("exec h_p_Mes_ProcessExchangeChangeStatus " + HInterID + " ");
oCN.RunProc("exec h_p_Mes_StationOutBillBackBarCode " + HInterID + " ");
//鍒ゆ柇鏄惁鏄� 鏈亾宸ュ簭
@@ -394,6 +399,7 @@
}
catch (Exception e)
{
+ oCN.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "Exception锛�" + e.ToString();
@@ -431,6 +437,7 @@
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
string msg4 = sArray[2].ToString();
+ string msg5 = sArray[3].ToString();
List<Model.ClsSc_StationOutBillMain> list = new List<Model.ClsSc_StationOutBillMain>();
@@ -448,8 +455,8 @@
oBill.omodel.HBillNo = msg3 + "- " + j;
oBill.omodel.HBillStatus = 0;
oBill.omodel.HMouldNum = list[i].HMouldNum;
- oBill.omodel.HYear = 2022;
- oBill.omodel.HPeriod = 1;
+ oBill.omodel.HYear = DateTime.Now.Year;
+ oBill.omodel.HPeriod = DateTime.Now.Month;
oBill.omodel.HRemark = list[i].HRemark;
oBill.omodel.HSourceName = list[i].HSourceName;
oBill.omodel.HPieceQty = list[i].HPieceQty;
@@ -502,6 +509,7 @@
oBill.omodel.HWorkTimes = list[i].HWorkTimes;
oBill.omodel.HQCCheckID = list[i].HQCCheckID;
oBill.omodel.HMaker = msg4;
+ oBill.omodel.HEmpNum = msg5;
//string HBillSubType = "3791";
//long HInterID = list[0].HInterID;//閫掑叆type寰楀埌鐨勫崟鎹甀D
@@ -570,6 +578,7 @@
bool bResult;
// bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ oCN.RunProc($"update Sc_StationOutBillMain set HMaker='{msg4}' where HInterID={oBill.omodel.HInterID}");
i++;
//if (bResult)
//{
--
Gitblit v1.9.1