yusijie
2023-03-27 b2322f6e919ffc2efd1fa5af21ec2b54b6a070bc
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÌõÂëÉú³É/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);