From 89ed9163d69425713845871e1ef0525ab13dd751 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期一, 26 十二月 2022 08:56:27 +0800 Subject: [PATCH] 条码归档 --- Model/仓库管理/条码管理/Gy_BarCodeBill_Out.cs | 127 ++++++++++++++ Model/Model.csproj | 1 WebAPI/Controllers/仓存管理/条码生成/Gy_BarCodeBill_OutController.cs | 389 +++++++++++++++++++++++++++++++++++++++++++ WebAPI/WebAPI.csproj | 2 4 files changed, 519 insertions(+), 0 deletions(-) diff --git a/Model/Model.csproj b/Model/Model.csproj index d4593ea..c64ae5f 100644 --- a/Model/Model.csproj +++ b/Model/Model.csproj @@ -257,6 +257,7 @@ <Compile Include="浠撳簱绠$悊\鏉$爜绠$悊\ClsGy_BarCodeEdit_Model.cs" /> <Compile Include="浠撳簱绠$悊\鏉$爜绠$悊\ClsKF_BarCodeStatusChangeBillMain.cs" /> <Compile Include="浠撳簱绠$悊\鏉$爜绠$悊\ClsKF_BarCodeStatusChangeBillSub.cs" /> + <Compile Include="浠撳簱绠$悊\鏉$爜绠$悊\Gy_BarCodeBill_Out.cs" /> <Compile Include="浠撳簱绠$悊\铏氫粨绠$悊\ClsKf_VirtualStockInBillMain.cs" /> <Compile Include="浠撳簱绠$悊\铏氫粨绠$悊\ClsKf_VirtualStockInBillScheme.cs" /> <Compile Include="浠撳簱绠$悊\铏氫粨绠$悊\ClsKf_VirtualStockInBillSub.cs" /> diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/\346\235\241\347\240\201\347\256\241\347\220\206/Gy_BarCodeBill_Out.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/\346\235\241\347\240\201\347\256\241\347\220\206/Gy_BarCodeBill_Out.cs" new file mode 100644 index 0000000..3bce82f --- /dev/null +++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/\346\235\241\347\240\201\347\256\241\347\220\206/Gy_BarCodeBill_Out.cs" @@ -0,0 +1,127 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class Gy_BarCodeBill_Out : DBUtility.ClsGy_Base_Model + { + public Int64 HItemID;//锛堟爣璇嗗垪锛� //鏍囪瘑鍒� + public Int64 HInterID; //涓诲唴鐮� + public Int64 HEntryID; //瀛愬唴鐮� + public string HBillType; //绫诲瀷 + public Int64 HProcID; //宸ュ簭 + public string HBarCode;//锛堣仛闆嗙储寮曪級 //鏉″舰鐮� + public string HBarCodeType; //鏉$爜绫诲瀷锛堢墿鏂欐潯鐮侊紝绠卞彿鏉$爜锛屾墭鍙锋潯鐮侊級 + public Int64 HItemSubID; //瀵瑰簲鏍哥畻椤圭洰 + public Int64 HMaterID; //瀵瑰簲鐗╂枡鍐呯爜 + public Int64 HUnitID; //璁¢噺鍗曚綅 + public Int64 HPieceQty; //浠舵暟 + public decimal HQty; //鏁伴噺 + public string HBatchNo; //鎵规鍙� + public Int64 HSupID; //寰�鏉ュ崟浣� + public Int64 HGroupID; //鐢熶骇鐝粍锛圙y_Group锛� + public Int64 HDeptID; //閮ㄩ棬 + public Int64 HEmpID; //涓氬姟鍛� + public string HMaker; //鍒朵綔浜� + public string HMakeDate; // 鍒朵綔鏃ユ湡 + public Int64 HPrintQty; //鎵撳嵃娆℃暟 + public Int64 HSourceInterID; //婧愬崟ID + public Int64 HSourceEntryID; //婧愬崟瀛怚D 锛堝鏋滄湁DETAILID 鍒欏~DETAILID锛� + public string HSourceBillNo; //婧愬崟鍗曞彿 + public string HSourceBillType; //婧愬崟绫诲瀷 + public string HRemark; //澶囨敞 + public string HUseFlag; //浣跨敤鐘舵�� + public string HEndQty; //灏剧鏁伴噺 + public string HWei; //灏剧鏍囪 + public Int64 HStopflag; //鏄惁浣滃簾 + public string HBarCodeStatus; //鏉$爜鐘舵�� + public decimal HReadyQty; // + public decimal HInitQty; //鍒濆鍖栨暟閲� + public Int64 HBarcodeQtys; //鎬绘墭鏁� + public Int64 HBarcodeNo; //褰撳墠鎵樺彿 + public Int64 HInstructID; // + public string HInstructNo; // + public Int64 HSeOrderBillID; //閿�鍞鍗曞唴鐮� + public string HSeOrderBillNo; //瀹㈡埛璁㈠崟鍙� + public Int64 HWhID; //榛樿浠撳簱 + public Int64 HSPID; //榛樿浠撲綅 + public Int64 HAuxPropID; //鐗╂枡杈呭姪灞炴�� + public string HMaterName; //浜у搧瑙勬牸鍚嶇О + public string HMaterModel; //浜у搧瑙勬牸鍨嬪彿 + public string HPinfan; //鍝佺暘 + public string HMTONo; //MTO鍙� + public Int64 HSupflag; //渚涘簲鍟嗘爣绛炬爣璁� + public DateTime HBeginDate; //寮�濮嬫棩鏈� + public DateTime HEndDate; //缁撴潫鏃ユ湡 + public Int64 HExpirationDateFlag; //淇濊川鏈熸爣璁� + public Int64 HSourceID; //鐢熶骇璧勬簮 + public string HCusType; // + public string HWorkLineName; //鐢熶骇绾� + public Int64 HCusID; //瀹㈡埛鍐呯爜 + public Int64 HSTOCKORGID; //搴撳瓨缁勭粐 + public Int64 HOWNERID; //璐т富 + public string HJiaYe; //鍔犳恫浠g爜 + public string HPressModel; //鍨嬪彿锛堥煩鐢碉級 + public string HCusModel; //瀹㈡埛鍨嬪彿 + public string HMaterialModel; //浜у搧瑙勬牸 + public string HColor; //棰滆壊 + public string HLogo; //鍝佺墝 + public string HPackageSize; //鍖呰灏哄 + public decimal HMaterialJQty; //鍑�閲� + public decimal HMaterialMQty; //姣涢噸 + public string HCustomBatchNo; //瀹㈡埛鎵规鍙� + public DateTime HBarCodeDate; //鏉$爜鏍囩鏃ユ湡 + public string HGBBarCode; //鍥芥爣鐮� + public Int64 HOldBarCodeFlag; //鏃ф潯鐮佹爣璁� + public Int64 HOldSourceInterID; //鑰佹簮鍗曞唴鐮� + public Int64 HOldSourceEntryID; //鑰佹簮鍗曞瓙鍐呯爜 + public string HOldSourceBillNo; //鑰佹簮鍗曞崟鍙� + public Int64 HOrderInterID; //璁㈠崟鍐呯爜 + public Int64 HOrderEntryID; //璁㈠崟瀛愬唴鐮侊紙濡傛灉鏈塂ETAILID 鍒欏~DETAILID锛� + public string HOrderBillNo; //璁㈠崟鍗曞彿 + public string HOrderBillType; //璁㈠崟鍗曟嵁绫诲瀷 + public string HRelationNum;//瀵瑰簲缂栧彿 + public decimal HLabelQty; //鎵撳嵃鏍囩鏁伴噺 + public decimal HMinQty; //鏈�灏忓寘瑁呮暟閲� + public decimal HNowQty; //褰撳墠鏁伴噺 + public string HStopMan; //绂佺敤浜� + public string HStopManDate; //绂佺敤鏃ユ湡 + public DateTime HInStockDate; + public DateTime HOutStockDate; + public string HInStockDate_XF; + public string HExpressNumber; + public string POOrderBillNo; + public string HICMOReportBillNo; + public DateTime HICMOReportDate; + public Int64 HInStockCounts; + public Int64 HReportCounts; + public Int64 HOutStockCounts; + public string HInStockBillNo; + public string HOutStockBillNo; + public string HSendGoodsBillNo; + public string HKFDate; + public Int64 HKFPeriod; + public string HKFDQDate; + public Int64 HServerItemID; + public string HBadReasonList; + public string HProdLev; + public Int64 HSeOrderInterID; + public Int64 HSeOrderEntryID; + public string HInnerBillNo; + public string HCusBarCode; + public string HStatus; + public Int64 HInitSourceEntryID; + public string HOldSourceBillType; + public decimal HMZ; + public Int64 HGiveAwayFlag; //璧犲搧鏍囪 + public Int64 HSeOrderSEQ; + public Int64 HMaterID_OLD; + public string HDeleteMan; + public DateTime HDeleteDate; + public string HBarCode_Pack; + public Int64 HCustomQty1; + public DateTime HProduceDate; //鐢熶骇鏃ユ湡锛堜繚璐ㄦ湡鐢級 + public DateTime HExpiryDate; //淇濊川鏈熻嚦锛堜繚璐ㄦ湡鐢級 + } +} diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Gy_BarCodeBill_OutController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Gy_BarCodeBill_OutController.cs" new file mode 100644 index 0000000..8c1e782 --- /dev/null +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Gy_BarCodeBill_OutController.cs" @@ -0,0 +1,389 @@ +锘縰sing DBUtility; +using Model; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using WebAPI.Models; + +namespace WebAPI.Controllers.浠撳瓨绠$悊.鏉$爜鐢熸垚 +{ + public class Gy_BarCodeBill_OutController : ApiController + { + private json objJsonResult = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + DataSet ds; + + #region [鏉$爜褰掓。鍒楄〃] + [Route("Gy_BarCodeBill_Out/list")] + [HttpGet] + public object list(string sWhere, string user) + { + try + { + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("select * from h_v_Gy_BarCodeBill_OutList order by HMainID asc", "h_v_Gy_BarCodeBill_OutList"); + } + else + { + string sql1 = "select * from h_v_Gy_BarCodeBill_OutList where 1 = 1 "; + string sql = sql1 + sWhere + " order by HMainID asc"; + ds = oCN.RunProcReturn(sql, "h_v_Gy_BarCodeBill_OutList"); + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region [鏍规嵁ID鏌ユ壘璁板綍] + [Route("Gy_BarCodeBill_Out/cx")] + [HttpGet] + public object cx(long HInterID) + { + try + { + + ds = oCN.RunProcReturn("select * from h_v_Gy_BarCodeBill_OutList where HMainID =" + HInterID, "h_v_Gy_BarCodeBill_OutList"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region [鏉$爜褰掓。淇濆瓨/缂栬緫] + [Route("Gy_BarCodeBill_Out/ModifyByID")] + [HttpPost] + public object ModifyByID([FromBody] JObject oMain) + { + try + { + DAL.ClsGy_Employee_Ctl oDept = new DAL.ClsGy_Employee_Ctl(); + DAL.ClsGy_Employee_View oDeptHlp = new DAL.ClsGy_Employee_View(); + + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); + //string msg3 = sArray[1].ToString(); + //string msg4 = sArray[2].ToString(); + //string msg5 = sArray[3].ToString(); + + //鍙嶅簭鍒楀寲 + msg2 = "[" + msg2.ToString() + "]"; + List<Gy_BarCodeBill_Out> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_BarCodeBill_Out>>(msg2); + + long HItemID = list[0].HItemID; + string HNumber = list[0].HNumber; + string HName = list[0].HName; + string HShortNumber = list[0].HNumber; + long HParentID = list[0].HParentID; + long HLevel = 1; + string HHelpCode = list[0].HHelpCode ?? ""; + bool HEndFlag = list[0].HEndFlag; + long HStopflag = list[0].HStopflag; + string HRemark = list[0].HRemark; + string HUseFlag = list[0].HUseFlag ?? ""; + + long HInterID = list[0].HInterID; //涓诲唴鐮� + long HEntryID = list[0].HEntryID; //瀛愬唴鐮� + string HBillType = list[0].HBillType; //绫诲瀷 + long HProcID = list[0].HProcID; //宸ュ簭 + string HBarCode = list[0].HBarCode;//锛堣仛闆嗙储寮曪級 //鏉″舰鐮� + string HBarCodeType = list[0].HBarCodeType; //鏉$爜绫诲瀷锛堢墿鏂欐潯鐮侊紝绠卞彿鏉$爜锛屾墭鍙锋潯鐮侊級 + long HItemSubID = list[0].HItemSubID; //瀵瑰簲鏍哥畻椤圭洰 + long HMaterID = list[0].HMaterID; //瀵瑰簲鐗╂枡鍐呯爜 + long HUnitID = list[0].HUnitID; //璁¢噺鍗曚綅 + long HPieceQty = list[0].HPieceQty; //浠舵暟 + decimal HQty = list[0].HQty; //鏁伴噺 + string HBatchNo = list[0].HBatchNo; //鎵规鍙� + long HSupID = list[0].HSupID; //寰�鏉ュ崟浣� + long HGroupID = list[0].HGroupID; //鐢熶骇鐝粍锛圙y_Group锛� + long HDeptID = list[0].HDeptID; //閮ㄩ棬 + long HEmpID = list[0].HEmpID; //涓氬姟鍛� + string HMaker = list[0].HMaker; //鍒朵綔浜� + string HMakeDate = list[0].HMakeDate; // 鍒朵綔鏃ユ湡 + long HPrintQty = list[0].HPrintQty; //鎵撳嵃娆℃暟 + long HSourceInterID = list[0].HSourceInterID; //婧愬崟ID + long HSourceEntryID = list[0].HSourceEntryID; //婧愬崟瀛怚D 锛堝鏋滄湁DETAILID 鍒欏~DETAILID锛� + string HSourceBillNo = list[0].HSourceBillNo; //婧愬崟鍗曞彿 + string HSourceBillType = list[0].HSourceBillType; //婧愬崟绫诲瀷 + string HEndQty = list[0].HEndQty; //灏剧鏁伴噺 + string HWei = list[0].HWei; //灏剧鏍囪 + string HBarCodeStatus = list[0].HBarCodeStatus; //鏉$爜鐘舵�� + decimal HReadyQty = list[0].HReadyQty; // + decimal HInitQty = list[0].HInitQty; //鍒濆鍖栨暟閲� + long HBarcodeQtys = list[0].HBarcodeQtys; //鎬绘墭鏁� + long HBarcodeNo = list[0].HBarcodeNo; //褰撳墠鎵樺彿 + long HInstructID = list[0].HBarcodeNo; // + string HInstructNo = list[0].HInstructNo; // + long HSeOrderBillID = list[0].HSeOrderBillID; //閿�鍞鍗曞唴鐮� + string HSeOrderBillNo = list[0].HSeOrderBillNo; //瀹㈡埛璁㈠崟鍙� + long HWhID = list[0].HWhID; //榛樿浠撳簱 + long HSPID = list[0].HSPID; //榛樿浠撲綅 + long HAuxPropID = list[0].HAuxPropID; //鐗╂枡杈呭姪灞炴�� + string HMaterName = list[0].HMaterName; //浜у搧瑙勬牸鍚嶇О + string HMaterModel = list[0].HMaterModel; //浜у搧瑙勬牸鍨嬪彿 + string HPinfan = list[0].HPinfan; //鍝佺暘 + string HMTONo = list[0].HMTONo; //MTO鍙� + long HSupflag = list[0].HSupflag; //渚涘簲鍟嗘爣绛炬爣璁� + DateTime HBeginDate = list[0].HBeginDate; //寮�濮嬫棩鏈� + DateTime HEndDate = list[0].HEndDate; //缁撴潫鏃ユ湡 + long HExpirationDateFlag = list[0].HExpirationDateFlag; //淇濊川鏈熸爣璁� + long HSourceID = list[0].HSourceID; //鐢熶骇璧勬簮 + string HCusType = list[0].HCusType; // + string HWorkLineName = list[0].HWorkLineName; //鐢熶骇绾� + long HCusID = list[0].HCusID; //瀹㈡埛鍐呯爜 + long HSTOCKORGID = list[0].HSTOCKORGID; //搴撳瓨缁勭粐 + long HOWNERID = list[0].HOWNERID; //璐т富 + string HJiaYe = list[0].HJiaYe; //鍔犳恫浠g爜 + string HPressModel = list[0].HPressModel; //鍨嬪彿锛堥煩鐢碉級 + string HCusModel = list[0].HCusModel; //瀹㈡埛鍨嬪彿 + string HMaterialModel = list[0].HMaterialModel; //浜у搧瑙勬牸 + string HColor = list[0].HColor; //棰滆壊 + string HLogo = list[0].HLogo; //鍝佺墝 + string HPackageSize = list[0].HPackageSize; //鍖呰灏哄 + decimal HMaterialJQty = list[0].HMaterialJQty; //鍑�閲� + decimal HMaterialMQty = list[0].HMaterialMQty; //姣涢噸 + string HCustomBatchNo = list[0].HCustomBatchNo; //瀹㈡埛鎵规鍙� + DateTime HBarCodeDate = list[0].HBarCodeDate; //鏉$爜鏍囩鏃ユ湡 + string HGBBarCode = list[0].HGBBarCode; //鍥芥爣鐮� + long HOldBarCodeFlag = list[0].HOldBarCodeFlag; //鏃ф潯鐮佹爣璁� + long HOldSourceInterID = list[0].HOldSourceInterID; //鑰佹簮鍗曞唴鐮� + long HOldSourceEntryID = list[0].HOldSourceEntryID; //鑰佹簮鍗曞瓙鍐呯爜 + string HOldSourceBillNo = list[0].HOldSourceBillNo; //鑰佹簮鍗曞崟鍙� + long HOrderInterID = list[0].HOrderInterID; //璁㈠崟鍐呯爜 + long HOrderEntryID = list[0].HOrderEntryID; //璁㈠崟瀛愬唴鐮侊紙濡傛灉鏈塂ETAILID 鍒欏~DETAILID锛� + string HOrderBillNo = list[0].HOrderBillNo; //璁㈠崟鍗曞彿 + string HOrderBillType = list[0].HOrderBillType; //璁㈠崟鍗曟嵁绫诲瀷 + string HRelationNum = list[0].HRelationNum;//瀵瑰簲缂栧彿 + decimal HLabelQty = list[0].HLabelQty; //鎵撳嵃鏍囩鏁伴噺 + decimal HMinQty = list[0].HMinQty; //鏈�灏忓寘瑁呮暟閲� + decimal HNowQty = list[0].HNowQty; //褰撳墠鏁伴噺 + string HStopMan = list[0].HStopMan; //绂佺敤浜� + string HStopManDate = list[0].HStopManDate; //绂佺敤鏃ユ湡 + DateTime HInStockDate = list[0].HInStockDate; + DateTime HOutStockDate = list[0].HOutStockDate; + string HInStockDate_XF = list[0].HInStockDate_XF; + string HExpressNumber = list[0].HExpressNumber; + string POOrderBillNo = list[0].POOrderBillNo; + string HICMOReportBillNo = list[0].HICMOReportBillNo; + DateTime HICMOReportDate = list[0].HICMOReportDate; + long HInStockCounts = list[0].HInStockCounts; + long HReportCounts = list[0].HReportCounts; + long HOutStockCounts = list[0].HOutStockCounts; + string HInStockBillNo = list[0].HInStockBillNo; + string HOutStockBillNo = list[0].HOutStockBillNo; + string HSendGoodsBillNo = list[0].HSendGoodsBillNo; + string HKFDate = list[0].HKFDate; + long HKFPeriod = list[0].HKFPeriod; + string HKFDQDate = list[0].HKFDQDate; + long HServerItemID = list[0].HServerItemID; + string HBadReasonList = list[0].HBadReasonList; + string HProdLev = list[0].HProdLev; + long HSeOrderInterID = list[0].HSeOrderInterID; + long HSeOrderEntryID = list[0].HSeOrderEntryID; + string HInnerBillNo = list[0].HInnerBillNo; + string HCusBarCode = list[0].HCusBarCode; + string HStatus = list[0].HStatus; + long HInitSourceEntryID = list[0].HInitSourceEntryID; + string HOldSourceBillType = list[0].HOldSourceBillType; + decimal HMZ = list[0].HMZ; + long HGiveAwayFlag = list[0].HGiveAwayFlag; //璧犲搧鏍囪 + long HSeOrderSEQ = list[0].HSeOrderSEQ; + long HMaterID_OLD = list[0].HMaterID_OLD; + string HDeleteMan = list[0].HDeleteMan; + DateTime HDeleteDate = list[0].HDeleteDate; + string HBarCode_Pack = list[0].HBarCode_Pack; + long HCustomQty1 = list[0].HCustomQty1; + DateTime HProduceDate = list[0].HProduceDate; //鐢熶骇鏃ユ湡锛堜繚璐ㄦ湡鐢級 + DateTime HExpiryDate = list[0].HExpiryDate; //淇濊川鏈熻嚦锛堜繚璐ㄦ湡鐢級 + + + ////鍒ゆ柇鏉冮檺 + //if (!ClsPub.Security_Log(msg5, 1, false, msg4)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + //if (!DBUtility.ClsPub.AllowNumber(HNumber)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + //if (oDept.HavSameNumber(HItemID, HNumber)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "浠g爜閲嶅锛�"; + // objJsonResult.data = null; + // return objJsonResult; + //} + //淇濆瓨 + //淇濆瓨瀹屾瘯鍚庡鐞� + if (HItemID == 0) + { + oCN.BeginTran(); + + DateTime dt = DateTime.Now; + //42 + oCN.RunProc(@"Insert into Gy_BarCodeBill_Out + (HInterID, HEntryID, HBillType, HProcID, HBarCode, HBarCodeType, HItemSubID, HMaterID, HUnitID, + HPieceQty, HQty, HBatchNo, HSupID, HGroupID, HDeptID, HEmpID, HMaker, HPrintQty, HSourceInterID, HSourceEntryID, + HSourceBillNo, HSourceBillType, HRemark, HUseFlag, HEndQty, HWei, HStopflag, HBarCodeStatus, HReadyQty, HInitQty, + HWhID, HSPID, HAuxPropID, HMTONo, HSupflag, HBeginDate, HEndDate, HExpirationDateFlag, HSourceID, HCusType, + HWorkLineName, HCusID, HSTOCKORGID, HOWNERID, HJiaYe, HPressModel, HCusModel, HMaterialModel, HColor, HLogo, + HPackageSize, HMaterialJQty, HMaterialMQty, HCustomBatchNo, HBarCodeDate, HGBBarCode, HOldBarCodeFlag, HOldSourceInterID, + HOldSourceEntryID, HOldSourceBillNo, HOrderInterID, HOrderEntryID, HOrderBillNo, HOrderBillType, HRelationNum, + HLabelQty, HMinQty, HNowQty, HStopMan, HInStockDate_XF, HExpressNumber, POOrderBillNo, HICMOReportBillNo, HInStockCounts, + HReportCounts, HOutStockCounts, HInStockBillNo, HOutStockBillNo, HSendGoodsBillNo, HServerItemID, HBadReasonList, HProdLev, + HInnerBillNo, HCusBarCode, HStatus, HInitSourceEntryID, HOldSourceBillType, HMZ, HGiveAwayFlag, HSeOrderSEQ, HMaterID_OLD, + HDeleteMan, HBarCode_Pack, HCustomQty1) + Values(" + 0 + "," + 0 + "," + 3330 + "," + HProcID + ",'" + HBarCode + + "','" + HBarCodeType + "'," + 0 + "," + HMaterID + "," + HUnitID + "," + HPieceQty + + "," + HQty + ",'" + HBatchNo + "'" + "," + HSupID + "," + HGroupID + + "," + HDeptID + "," + HEmpID + ",'" + HMaker + "'," + HPrintQty + "," + 0 + + "," + 0 + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HRemark + "'" + + ",'" + HUseFlag + "','" + HEndQty + "','" + HWei + "'," + HStopflag + ",'" + HBarCodeStatus + + "'," + HReadyQty + "," + HInitQty + "," + HWhID + "," + HSPID + "," + HAuxPropID + + ",'" + HMTONo + "'," + HSupflag + ",'" + dt + "','" + dt + "'," + HExpirationDateFlag + + "," + HSourceID + ",'" + HCusType + "','" + HWorkLineName + "'," + HCusID + "," + HSTOCKORGID + + "," + HOWNERID + ",'" + HJiaYe + "','" + HPressModel + "','" + HCusModel + "','" + HMaterialModel + "','" + HColor + "','" + HLogo + "'" + + ",'" + HPackageSize + "'," + HMaterialJQty + "," + HMaterialMQty + ",'" + HCustomBatchNo + "','" + dt + "','" + HGBBarCode + "'" + + "," + HOldBarCodeFlag + "," + HOldSourceInterID + "," + HOldSourceEntryID + ",'" + HOldSourceBillNo + "'" + + "," + HOrderInterID + "," + HOrderEntryID + ",'" + HOrderBillNo + "','" + HOrderBillType + + "','" + HRelationNum + "'" + "," + HLabelQty + "," + HMinQty + "," + HNowQty + ",'" + HStopMan + "','" + dt + + "','" + HExpressNumber + "','" + POOrderBillNo + "','" + HICMOReportBillNo + "'," + HInStockCounts + "," + HReportCounts + + "," + HOutStockCounts + ",'" + HInStockBillNo + "','" + HOutStockBillNo + "','" + HSendGoodsBillNo + + "'," + HServerItemID + ",'" + HBadReasonList + "','" + HProdLev + "','" + HInnerBillNo + "','" + HCusBarCode + "','" + HStatus + "'," + HInitSourceEntryID + ",'" + HOldSourceBillType + "','" + HMZ + "'," + HGiveAwayFlag + "," + HSeOrderSEQ + + "," + HMaterID_OLD + ",'" + HDeleteMan + "','" + HBarCode_Pack + "'," + HCustomQty1 + ")", ref DBUtility.ClsPub.sExeReturnInfo); + + //淇敼涓婄骇涓洪潪鏈骇浠g爜 + oCN.RunProc("Update Gy_BarCodeBill_Out set HStopflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); + oCN.Commit(); + } + else + { + //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� + oCN.BeginTran(); + oCN.RunProc("Update Gy_BarCodeBill_Out set " + + " HBarCode='" + HBarCode + "'" + + ",HProcID=" + HProcID + + ",HBarCodeType='" + HBarCodeType + "'" + + ",HMaterID=" + HMaterID + + ",HUnitID=" + HUnitID + + + ",HPieceQty=" + HPieceQty + + ",HQty=" + HQty + + ",HBatchNo='" + HBatchNo + "'" + + ",HSupID=" + HSupID + + ",HGroupID=" + HGroupID + + ",HDeptID=" + HDeptID + + ",HEmpID=" + HEmpID + + ",HEndQty=" + HEndQty + + ",HWhID=" + HWhID + + ",HSPID=" + HSPID + + ",HAuxPropID=" + HAuxPropID + + ",HCusID=" + HCusID + + ",HSTOCKORGID=" + HSTOCKORGID + + //",HEndflag=" + Convert.ToString(HEndFlag ? 1 : 0) + + ",HRemark= '" + HRemark.ToString() + "' Where HItemID=" + HItemID); + oCN.Commit(); + } + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�"); + objJsonResult.data = 1; + return objJsonResult; + } + catch (Exception e) + { + //oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.Message; + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region [鍒犻櫎] + [Route("Gy_BarCodeBill_Out/Delete")] + [HttpGet] + public object Delete(string HItemID, string user) + { + try + { + oCN.BeginTran(); + oCN.RunProc("Delete From Gy_BarCodeBill_Out where HItemID = " + HItemID); + oCN.Commit(); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + } +} \ No newline at end of file diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index 69fa63b..07a52ea 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -440,6 +440,7 @@ <Compile Include="Controllers\浠撳瓨绠$悊\鎵爜寮傚父璁板綍\KF_PonderationBillController.cs" /> <Compile Include="Controllers\浠撳瓨绠$悊\鏉$爜鍑哄叆搴撹褰昞Kf_ICStockInOutBillController.cs" /> <Compile Include="Controllers\浠撳瓨绠$悊\鏉$爜搴撳瓨\KF_ICInventoryList_WMSBillController.cs" /> + <Compile Include="Controllers\浠撳瓨绠$悊\鏉$爜鐢熸垚\Gy_BarCodeBill_OutController.cs" /> <Compile Include="Controllers\浠撳瓨绠$悊\鏉$爜鐢熸垚\KF_BarCodeStatusChangeBillController.cs" /> <Compile Include="Controllers\浠撳瓨绠$悊\鏉$爜鐢熸垚\Sc_BarCodeController.cs" /> <Compile Include="Controllers\浠撳瓨绠$悊\璋冩嫧鐩樼偣\Kf_MoveStockRequestBillController.cs" /> @@ -896,6 +897,7 @@ <Folder Include="Views\Cj_CallGoodsBillMain\" /> <Folder Include="Views\Cj_ComplementGoodsBill\" /> <Folder Include="Views\Cj_SendGoodsBill\" /> + <Folder Include="Views\Gy_BarCodeBill_Out\" /> <Folder Include="Views\Gy_COMMONCONTACTBill\" /> <Folder Include="Views\Gy_ConkType\" /> <Folder Include="Views\Gy_CustLocation\" /> -- Gitblit v1.9.1