From b81dec285551c7e90c5b13877466f54d9e32bd6a Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 31 八月 2023 10:44:01 +0800
Subject: [PATCH] 对色记录 试样记录 删除 审核 查询
---
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 96 +++++++++++++++++++++++++++++++++++-------------
1 files changed, 70 insertions(+), 26 deletions(-)
diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
index f5c918e..f99321a 100644
--- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
+++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -121,12 +121,14 @@
public json AddBillMain(string msg1)
{
+ string sErrMsg = "";
+ oSystemParameter.ShowBill(ref sErrMsg);
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
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();//鐢ㄦ埛鍚�
@@ -180,6 +182,50 @@
int IsProNo = mainList[0].IsProNo;//鏄惁杞伐搴�
HName_LongShan = mainList[0].HName;//宸ヨ壓璺嚎鍚嶇О
+
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒")
+ {
+ if (HPicNumVer == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍥惧彿鐗堟湰涓嶈兘涓虹┖!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (HPicNumAssemble == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎬昏鍥惧彿涓嶈兘涓虹┖!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (HMaterTexture == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏉愯川涓嶈兘涓虹┖!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (HProductNum == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎴愬搧缂栧彿涓嶈兘涓虹┖!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (HVerNum == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鐗堟湰涓嶈兘涓虹┖!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
if (OperationType == 2)
{
ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Gy_RoutingBillList");
@@ -195,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 +
@@ -244,29 +291,9 @@
return objJsonResult;
}
- string sErrMsg = "";
- if (oSystemParameter.ShowBill(ref sErrMsg))
+ if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�")
{
- if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�")
- {
- if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1)
- {
- ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process");
-
- if (ds.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏈缃浆宸ュ簭!";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
- //璁剧疆杞伐搴�
- oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
- }
- }
- else if (IsProNo == 1 && OperationType == 1)
+ if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1)
{
ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process");
@@ -283,6 +310,23 @@
oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
}
}
+ else if (IsProNo == 1 && (OperationType == 1 || OperationType == 4))
+ {
+ ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈缃浆宸ュ簭!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //璁剧疆杞伐搴�
+ oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
+ }
+
//鏄惁鍕鹃�夐粯璁ゅ伐鑹鸿矾绾�
--
Gitblit v1.9.1