From 10a392d09c021caf0ca1fca21b424736862f4e48 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 04 九月 2023 13:17:40 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
index 1914ea4..364928c 100644
--- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
+++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -128,7 +128,7 @@
string msg3 = sArray[1].ToString();
//int hentryid = int.Parse(sArray[2].ToString());//瀛愯〃鐨勯『搴廼d
- int OperationType = int.Parse(sArray[2].ToString());//鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗
+ int OperationType = int.Parse(sArray[2].ToString());//鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗 4娣诲姞瀛愬伐鑹鸿矾绾�
string user = sArray[3].ToString();//鐢ㄦ埛鍚�
string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О
user_LongShan = sArray[3].ToString();//鐢ㄦ埛鍚�
@@ -149,7 +149,7 @@
long HInterID = mainList[0].HInterID;//閫掑叆type寰楀埌鐨勫崟鎹甀D
string HBillNo = mainList[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
- DateTime HDate = mainList[0].HDate;//鏃ユ湡
+ DateTime HDate = OperationType == 4 ? DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")) : mainList[0].HDate;//鏃ユ湡
int HYear = DateTime.Now.Year;
double HPeriod = DateTime.Now.Month;
string HRemark = mainList[0].HRemark;//澶囨敞
@@ -183,7 +183,7 @@
HName_LongShan = mainList[0].HName;//宸ヨ壓璺嚎鍚嶇О
- if (oSystemParameter.omodel.WMS_CampanyName == "")
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒")
{
if (HPicNumVer == "")
{
@@ -241,16 +241,17 @@
ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Gy_RoutingBillList");
- if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//鏂板
+ if ((OperationType == 1 || OperationType == 2|| OperationType == 4) && ds.Tables[0].Rows.Count == 0)//鏂板
{
//涓昏〃
oCN.RunProc("Insert Into Gy_RoutingBillMain " +
- "(HBillType,HInterID,HBillNo,HDate" +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" +
",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" +
",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" +
",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" +
- ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID) " + " values('" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
+ ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID) " +
+ " values('" + BillType + "','"+(OperationType==4?"SUB":"") +"'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
"," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HMaterID + ",'" + HName + "'," + HMaterTypeID +
"," + HRoutingGroupID + "," + HUnitID + ",'" + HMaterNumber + "','" + HUnitNumber + "'," + Convert.ToString(HStandard ? 1 : 0) +
"," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty +
@@ -309,7 +310,7 @@
oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
}
}
- else if (IsProNo == 1 && OperationType == 1)
+ else if (IsProNo == 1 && (OperationType == 1 || OperationType == 4))
{
ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process");
--
Gitblit v1.9.1