From 88d14b74edc9430c061c10fee97746566ddaf85d Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期二, 23 四月 2024 10:46:50 +0800 Subject: [PATCH] 自动生成条码_PLC:接收Socket通讯并自动生成条码、打印 --- WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs index 10af9b9..b9f0333 100644 --- a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs @@ -128,7 +128,7 @@ /// <returns></returns> [Route("Xs_SeOutStockBill/DeltetSeOutStockBill")] [HttpGet] - public object DeltetSeOutStockBill(string HInterID,string user) + public object DeltetSeOutStockBill(string HInterID, string HsupId, string HQty, string HSourceInterID, string HSourceEntryID, string user) { try { @@ -144,6 +144,8 @@ oCN.BeginTran(); var ds = oCN.RunProcReturn("select * from Xs_SeOutStockBillMain where HInterID=" + HInterID, "Xs_SeOutStockBillMain"); + + var dss = oCN.RunProcReturn("exec h_p_Xs_SeOutStockBillMain_Delete " + HQty + ", '" + HSourceInterID + "', '" + HSourceEntryID + "','" + user + " '", "h_p_Xs_SeOutStockBillMain_Delete"); //鍒犻櫎鍓嶆帶鍒� DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_Xs_SeOutStockBill_BeforeDelCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Xs_SeOutStockBill_BeforeDelCtrl"); if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0) @@ -285,7 +287,7 @@ long HConveyCompID = mainList[0].HConveyCompID;//杩愯緭鍏徃 long HConveyMoney = (long)mainList[0].HConveyMoney;//杩愯垂 long HDFflag = Convert.ToInt32(mainList[0].HDFflag); //鏄惁鍨粯 - + long HProjectID = mainList[0].HProjectID;//宸ョ▼椤圭洰 string HBillType = mainList[0].HBillType; string HBillSubType = mainList[0].HBillSubType; @@ -346,31 +348,32 @@ ,HAddress,HSSID,HCurID,HWHID,HExRate,HEmpID,HExplanation,HInnerBillNo,HSeOrderBillNo_M ,HConveyTypeID,HConveyCompID,HConveyMoney,HLinkMan,HLinkPhone ,HSALEORGID,HDELIVERYORGID,HOWNERID,HOWNERTYPEID - ,HChecker,HCheckDate,HCloseMan,HCloseDate,HERPInterID,HERPBillType,HDFflag) + ,HChecker,HCheckDate,HCloseMan,HCloseDate,HERPInterID,HERPBillType,HDFflag,HProjectID) values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 1402 + "','" + 1402 + "','" + HDate + "','" + HBillNo + "'," + HBillStatus + "," + HCusID + "," + HManagerID + "," + HDeptID + ",'" + HRemark + "','" + HMaker + "','" + HMakeDate + "','" + HAddress + "'," + HSSID + "," + HCurID + "," + HWHID + "," + HExRate + "," + HEmpID + ",'" + HExplanation + "','" + HInnerBillNo + "','" + HSeOrderBillNo_M + "','" + HConveyTypeID + "','" + HConveyCompID + "','" + HConveyMoney + "','" + HLinkMan + "','" + HLinkPhone + "'," + HSALEORGID + "," + HDELIVERYORGID + "," + HOWNERID + ",'" + HOWNERTYPEID + "','" + HChecker + "','" + HCheckDate + "','" + HCloseMan + "','" + HCloseDate + "'," + HERPInterID + - ",'" + HERPBillType + "'," + HDFflag + ")"; + ",'" + HERPBillType + "'," + HDFflag + ",'"+ HProjectID + "')"; oCN.RunProc(sql); + } else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) { //淇敼 string sql = $@"update Xs_SeOutStockBillMain set " + - "HRemark='" + HRemark + "', HChecker='" + HMaker + "', HCheckDate=getdate()" + - ",HCurID=" + HCurID + ", HWHID = " + HWHID - + ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HSeOrderBillNo_M=" + HSeOrderBillNo_M + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID + ",HOWNERID=" + HOWNERID - + ",HAddress='" + HAddress + "'where HInterID=" + HInterID; + "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + + ",HCusID='" + HCusID + "', HCurID='" + HCurID + "', HWHID = '" + HWHID + + "',HExRate='" + HExRate + "',HEmpID='" + HEmpID + "',HSeOrderBillNo_M='" + HSeOrderBillNo_M + "',HManagerID='" + HManagerID + "',HDeptID='" + HDeptID + "',HOWNERID='" + HOWNERID + + "',HAddress='" + HAddress + "',HProjectID='"+ HProjectID + "' where HInterID=" + HInterID; oCN.RunProc(sql); //鍒犻櫎瀛愯〃 oCN.RunProc("delete from Xs_SeOutStockBillSub where HInterID='" + HInterID + "'"); } //淇濆瓨瀛愯〃 - objJsonResult = AddBillSub(msg3, HInterID, OperationType); + objJsonResult = AddBillSub(msg3, HInterID, OperationType,user); //淇濆瓨鍚庢帶鍒�========================================= @@ -419,7 +422,7 @@ } } - public json AddBillSub(string msg3, long HInterID, int OperationType) + public json AddBillSub(string msg3, long HInterID, int OperationType,string user) { List<ClsXs_SeOutStockBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsXs_SeOutStockBillSub>>(msg3); @@ -483,6 +486,8 @@ ,{oSub.HAuxPropID},'{oSub.HBatchNO}','{oSub.HMTONo}',{oSub.HERPInterID},{oSub.HERPEntryID})"; oCN.RunProc(sql); + + ds = oCN.RunProcReturn("exec h_p_Xs_SeOutStockBillMain " + oSub.HQty + ", '" + oSub.HSourceInterID + "', '" + oSub.HSourceEntryID + "','" + user + " '", "h_p_Xs_SeOutStockBillMain"); } objJsonResult.code = "1"; -- Gitblit v1.9.1