yusijie
2022-12-26 89ed9163d69425713845871e1ef0525ab13dd751
条码归档
2个文件已添加
2个文件已修改
519 ■■■■■ 已修改文件
Model/Model.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/仓库管理/条码管理/Gy_BarCodeBill_Out.cs 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/条码生成/Gy_BarCodeBill_OutController.cs 389 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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" />
Model/²Ö¿â¹ÜÀí/ÌõÂë¹ÜÀí/Gy_BarCodeBill_Out.cs
New file
@@ -0,0 +1,127 @@
using 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;             //生产班组(Gy_Group)
        public Int64 HDeptID;            //部门
        public Int64 HEmpID;            //业务员
        public string HMaker;    //制作人
        public string HMakeDate;             // åˆ¶ä½œæ—¥æœŸ
        public Int64 HPrintQty;           //打印次数
        public Int64 HSourceInterID;            //源单ID
        public Int64 HSourceEntryID;            //源单子ID ï¼ˆå¦‚果有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;    //加液代码
        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;            //订单子内码(如果有DETAILID åˆ™å¡«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;            //保质期至(保质期用)
    }
}
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÌõÂëÉú³É/Gy_BarCodeBill_OutController.cs
New file
@@ -0,0 +1,389 @@
using 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;              //生产班组(Gy_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;             //源单子ID ï¼ˆå¦‚果有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;    //加液代码
                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;            //订单子内码(如果有DETAILID åˆ™å¡«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 = "代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //if (oDept.HavSameNumber(HItemID, HNumber))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "代码重复!";
                //    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);
                    //修改上级为非末级代码
                    oCN.RunProc("Update Gy_BarCodeBill_Out set HStopflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                    oCN.Commit();
                }
                else
                {
                    //若MAINDI重复则重新获取
                    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
    }
}
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\" />