From 0c5df3ecaf922d07a02960791c0ab1dd3bb16f5e Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期三, 04 一月 2023 12:29:44 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/BarCodeController.cs | 47 ++++++++++++++++++++---------------------------
1 files changed, 20 insertions(+), 27 deletions(-)
diff --git a/WebAPI/Controllers/BarCodeController.cs b/WebAPI/Controllers/BarCodeController.cs
index a8beb96..2c43b18 100644
--- a/WebAPI/Controllers/BarCodeController.cs
+++ b/WebAPI/Controllers/BarCodeController.cs
@@ -495,6 +495,7 @@
/// <returns></returns>
public object GetBarcodeSaveBill_Box([FromBody] JObject msg)
{
+ string FCusName = oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo);
var _value = msg["msg"].ToString();
string msg1 = _value.ToString();
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
@@ -526,33 +527,9 @@
foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls)
{
- //if (oBill.CheckBarCode(oItemSub.HSourceInterID, oItemSub.HSourceEntryID) == false)
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "宸插瓨鍦ㄦ潯鐮侊紝涓嶅厑璁搁噸澶嶇敓鎴愶紒";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
- if (msg2 != string.Empty)
- {
- if (oItemSub.HBQty == 0 || oItemSub.HMinQty == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍐呯鍖呰鏁颁笉鑳戒负0锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- if (oItemSub.HWBQty == 0 || oItemSub.HWXQty == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "澶栫鍖呰鏁颁笉鑳戒负0锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
+ //鏁伴噺涓�0 璺宠繃
+ if (oItemSub.HQty == 0 || oItemSub.HMinQty == 0 || oItemSub.HWXQty == 0)
+ continue;
}
long linterid = Pub_Class.ClsPub.CreateBillID_SRMProd("8888", ref DBUtility.ClsPub.sExeReturnInfo);
int LSHlen = 6; //娴佹按鍙烽暱搴�
@@ -734,6 +711,7 @@
}
}
}
+
string HBarCode = "";
string HBarCodeType = "";
Int64 HMaterID = 0;
@@ -753,6 +731,11 @@
string HWei = "";
string HMTONO = "";
oCn.BeginTran();
+ foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls)
+ {
+ //鏇存柊鏉$爜妗f 璇ユ簮鍗曞叾瀹冩潯鐮侀粯璁ゅ凡缁忔墦鍗拌繃涓�娆�
+ oCn.RunProc($"update Gy_BarCodeBill set HPrintQty += 1 where HPrintQty = 0 and HSourceInterID={oItemSub.HSourceInterID} and HSourceEntryID = {oItemSub.HSourceEntryID}");
+ }
foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub in ls2)
{
//LogService.Write("寰幆绗簩娆�:" + oItemSub.HSupID);
@@ -775,6 +758,11 @@
HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo);
HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType);
HWei = ClsPub.isStrNull(oItemSub.HEndQty);
+ if (FCusName.Contains("澶忓疂"))
+ {
+ HBarCode = $"{oItemSub.HMaterID}";
+ HBarCodeType = "鍝佺鐮乢澶栫";
+ }
string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" +
",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " +
@@ -810,6 +798,11 @@
HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo);
HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType);
HWei = ClsPub.isStrNull(oItemSub.HEndQty);
+ if (FCusName.Contains("澶忓疂"))
+ {
+ HBarCode = $"{oItemSub.HMaterID}";
+ HBarCodeType = "鍝佺鐮�";
+ }
string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" +
",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " +
--
Gitblit v1.9.1