From b2322f6e919ffc2efd1fa5af21ec2b54b6a070bc Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期一, 27 三月 2023 23:01:30 +0800 Subject: [PATCH] 工序出站扫码,明细;条码生成添加炉号等字段; --- WebAPI/Controllers/仓存管理/条码生成/Sc_BarCodeController.cs | 40 +++++++++++++++++++- WebAPI/Models/HSouceOrderList.cs | 10 ++++ WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 22 ++++++++-- WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 9 +++- WebAPI/Models/HBarCodeList.cs | 9 ++++ 5 files changed, 79 insertions(+), 11 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs index eec616b..6600f68 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs @@ -165,19 +165,31 @@ sBillBarCode = NewBarCode[0]; } string sBillNo = sBillBarCode; + + string[] arr = sBillNo.Split('&'); + string BillNo_PGD = arr[0]; + string entryid_PGD = ""; + if(arr.Length > 1) + { + entryid_PGD = arr[1]; + + } + + + //鎴彇鏉$爜绫诲瀷 - string BillNoType = sBillNo.Substring(0, Math.Min(3, sBillNo.Length)); + string BillNoType = BillNo_PGD.Substring(0, Math.Min(3, BillNo_PGD.Length)); //鎴彇鏉$爜绫诲瀷2 - string BillNoType2 = sBillNo.Substring(0, Math.Min(4, sBillNo.Length)); + string BillNoType2 = BillNo_PGD.Substring(0, Math.Min(4, BillNo_PGD.Length)); //鎴彇鍐呯爜 - string BillNo = sBillNo.Substring(3, Math.Min(sBillNo.Length - 3,sBillNo.Length)); + string BillNo = BillNo_PGD.Substring(3, Math.Min(BillNo_PGD.Length - 3, BillNo_PGD.Length)); switch (BillNoType2) { case "GXLZ"://宸ュ簭娴佽浆娲惧伐 - ds = oCN.RunProcReturn("select * from h_v_Sc_ProcExchSendWorkBill where 娲惧伐鍗曟嵁鍙� = '" + sBillNo + "'", "h_v_Sc_ProcExchSendWorkBill"); + ds = oCN.RunProcReturn("select * from h_v_Sc_ProcExchSendWorkBill where 娲惧伐鍗曟嵁鍙� = '" + BillNo_PGD + "'" + " and HEntryID ='" + entryid_PGD + "'", "h_v_Sc_ProcExchSendWorkBill"); break; case "GXLX"://娴佽浆鍗� - ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + sBillNo + "'", "h_v_Sc_ProcessExchangeBillList"); + ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList"); break; } switch (BillNoType) diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs index 099cf8e..acdf976 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs @@ -2190,6 +2190,7 @@ List<ClsSc_StationOutBillSub_Emp> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_StationOutBillSub_Emp>>(msg2); List<ClsSc_StationOutBillSub_Emp> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_StationOutBillSub_Emp>>(msg3); + long HInterID = mainList[0].HInterID; long HWorkEmpID = subList[0].HWorkEmpID; long HWorkSourceID = subList[0].HWorkSourceID; decimal HQty = subList[0].HQty; @@ -2197,21 +2198,23 @@ decimal HProcPrice = subList[0].HProcPrice; decimal HMoney = subList[0].HMoney; long HWorkProcID = mainList[0].HWorkProcID; - + var EntryID = 0; foreach (ClsSc_StationOutBillSub_Emp oSub in subList) { //ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_IF_ICMOBillList"); if ((OperationType == 1 || OperationType == 2))//鏂板 && ds.Tables[0].Rows.Count == 0 { + EntryID++; + string sql = string.Empty; sql = $@" Insert into Sc_StationOutBillSub_Emp (HInterID,HEntryID,HBillNo_bak ,HRemark ,HSourceInterID ,HSourceEntryID ,HSourceBillNo ,HSourceBillType ,HRelationQty ,HRelationMoney ,HWorkEmpID ,HWorkSourceID ,HQty ,HRate ,HProcPrice ,HMoney ,HWorkProcID) - values(" + 1 + "," + 2 + "," + "'" + mainList[0].HBillNo_bak + "','" + "HRemark" + "'," + 0 + "," + 0 + ",'" + " " + "','" + "HSource" + "'," + - "0" + "," + 0 + "," + 0 + "," + 0 + "," + 0 + "," + 0 + "," + 0 + "," + 0 + "," + 0 + ")"; + values(" + HInterID + "," + EntryID + "," + "'" + mainList[0].HBillNo_bak + "','" + mainList[0].HRemark + "'," + 0 + "," + 0 + ",'" + " " + "','" + " " + "'," + + "0" + "," + 0 + "," + oSub.HWorkEmpID + "," + oSub.HWorkSourceID + "," + oSub.HQty + "," + oSub.HRate + "," + oSub.HProcPrice + "," + oSub.HMoney + "," + HWorkProcID + ")"; oCN.RunProc(sql); } 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/Sc_BarCodeController.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/Sc_BarCodeController.cs" index a0cea38..8225dbe 100644 --- "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/Sc_BarCodeController.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/Sc_BarCodeController.cs" @@ -708,6 +708,13 @@ int k = 0; int n = 0; //鍚屼竴鎵圭敓鎴愭潯鐮佷腑鐨勭鍑犳潯 string sTMNumber = ""; //鏉$爜鑷畾涔夊墠缂� + + string HCoilNO = ""; + string HFurnaceNO = ""; + string HFactory = ""; + decimal HAuxQty = 0; + string HheatNO = ""; + DataSet Ds; msg2 = msg2.Replace("\\", ""); msg2 = msg2.Replace("\n", ""); //\n @@ -720,6 +727,12 @@ HNumber = DBUtility.ClsPub.isStrNull(ordrlist[j].HMaterID); HMaterNumber = DBUtility.ClsPub.isStrNull(ordrlist[j].HMaterNumber); HBatchNo = ClsPub.isStrNull(ordrlist[j].HBatchNo); + + HCoilNO = ClsPub.isStrNull(ordrlist[j].HCoilNO); + HFurnaceNO = ClsPub.isStrNull(ordrlist[j].HFurnaceNO); + HFactory = ClsPub.isStrNull(ordrlist[j].HFactory); + HAuxQty = ClsPub.isLong(ordrlist[j].HAuxQty); + HheatNO = ClsPub.isStrNull(ordrlist[j].HheatNO); //鏃ユ湡鑾峰彇鏂瑰紡 sDate = DateTime.Now.ToString(); // @@ -990,6 +1003,12 @@ barcode.HInnerBillNo2 = ordrlist[j].HInnerBillNo; barcode.HMaker2 = ordrlist[j].HMaker; barcode.HGiveAwayFlag2 = ordrlist[j].HGiveAwayFlag; + + barcode.HCoilNO = ordrlist[j].HCoilNO; + barcode.HFurnaceNO = ordrlist[j].HFurnaceNO; + barcode.HFactory = ordrlist[j].HFactory; + barcode.HAuxQty = ordrlist[j].HAuxQty; + barcode.HheatNO = ordrlist[j].HheatNO; ListRows.Add(barcode); k = k + 1; n = n + 1; @@ -1030,6 +1049,14 @@ string HInnerBillNo = ""; bool HGiveAwayFlag = false; Int64 HEntryID = 0; + + string HCoilNO2 = ""; + string HFurnaceNO2 = ""; + string HFactory2 = ""; + decimal HAuxQty2 = 0; + string HheatNO2 = ""; + DateTime HProduceDate; + DateTime HExpiryDate; try { oCN.BeginTran(); @@ -1074,6 +1101,14 @@ HSeOrderBillNo = ClsPub.isStrNull(ListRows[i].HSeOrderBillNo2); HInnerBillNo = ClsPub.isStrNull(ListRows[i].HInnerBillNo2); HGiveAwayFlag = ClsPub.isBool(ListRows[i].HGiveAwayFlag2); + + HCoilNO2 = ClsPub.isStrNull(ListRows[i].HCoilNO); + HFurnaceNO2 = ClsPub.isStrNull(ListRows[i].HFurnaceNO); + HFactory2 = ClsPub.isStrNull(ListRows[i].HFactory); + HAuxQty2 = ClsPub.isLong(ListRows[i].HAuxQty); + HheatNO2 = ClsPub.isStrNull(ListRows[i].HheatNO); + HProduceDate = ClsPub.isDate(ListRows[i].HProduceDate); + HExpiryDate = ClsPub.isDate(ListRows[i].HExpiryDate); oCN.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + @@ -1081,7 +1116,8 @@ ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " + ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " + ",HGiveAwayFlag " + - ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " + + ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" + + ",HCoilNO,HFurnaceNO,HFactory,HAuxQty,HheatNO,HProduceDate,HExpiryDate " + ") values (" + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString() @@ -1090,7 +1126,7 @@ + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'" + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + "" + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) - + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "')"); + + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','" + HCoilNO2 + "','" + HFurnaceNO2 + "','" + HFactory2 + "'," + HAuxQty2 + ",'" + HheatNO2 + "','" + HProduceDate + "','" + HExpiryDate + "'" + ")"); //HNumber = ClsPub.isStrNull(grdSub.Rows[i].Cells[HMaterID2Col].Value); diff --git a/WebAPI/Models/HBarCodeList.cs b/WebAPI/Models/HBarCodeList.cs index 9ac3310..c321d1b 100644 --- a/WebAPI/Models/HBarCodeList.cs +++ b/WebAPI/Models/HBarCodeList.cs @@ -62,5 +62,14 @@ public string HInnerBillNo2 { get; set; } //"鍐呴儴閲囪喘璁㈠崟鍙�"; public string HMaker2 { get; set; } //"鍒跺崟浜�"; public string HEntryID2 { get; set; } //"琛屽彿"; + + public decimal HAuxQty { get; set; } //"璐熻矗鏁伴噺"; + public string HFurnaceNO { get; set; } //"鐐夊彿"; + public string HCoilNO { get; set; } //"閽㈠嵎鍙�"; + public string HheatNO { get; set; } //"鐑鐞嗗彿"; + public string HFactory { get; set; } //"鍘傚晢"; + public DateTime HProduceDate { get; set; } //"鐢熶骇鏃ユ湡"; + public DateTime HExpiryDate { get; set; } //"淇濊川鏈熻嚦"; + } } \ No newline at end of file diff --git a/WebAPI/Models/HSouceOrderList.cs b/WebAPI/Models/HSouceOrderList.cs index 565e388..4abde9e 100644 --- a/WebAPI/Models/HSouceOrderList.cs +++ b/WebAPI/Models/HSouceOrderList.cs @@ -61,5 +61,13 @@ public string HShowDate{get;set;} // "鏃ユ湡"; public string HInnerBillNo{get;set;} // "鍐呴儴閲囪喘璁㈠崟鍙�"; public string HMaker{get;set;} // "鍒跺崟浜�"; - } + + public decimal HAuxQty { get; set; } //"璐熻矗鏁伴噺"; + public string HFurnaceNO { get; set; } //"鐐夊彿"; + public string HCoilNO { get; set; } //"閽㈠嵎鍙�"; + public string HheatNO { get; set; } //"鐑鐞嗗彿"; + public string HFactory { get; set; } //"鍘傚晢"; + public DateTime HProduceDate { get; set; } //"鐢熶骇鏃ユ湡"; + public DateTime HExpiryDate { get; set; } //"淇濊川鏈熻嚦"; + } } \ No newline at end of file -- Gitblit v1.9.1