生产汇报、直接调拨、分步式调入、分步式调出、生产补料、委外出库、委外入库上传生成CLOUD单据调用方法修改,根据系统参数判断生成单据日期是否取界面上日期;调拨扫码物料条码调用方法修改,临时表增加写入调拨类型字段HStockStyle
1个文件已修改
346 ■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 346 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -4496,6 +4496,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -4531,7 +4537,7 @@
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                ",HEmpID,HGroupID,HDeptID,HPRDORGID" +
                ") " +
                " values('3711','3711'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120)" +
                " values('3711','3711'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HEmpID.ToString() + "," + oMain.HGroupID.ToString() + "," + oMain.HDeptID.ToString() + "," + oMain.HPRDORGID.ToString() +
                ") ");
@@ -4562,7 +4568,17 @@
                {
                    string sJson_ZYMESFLAG = "";    //生产汇报单同步MES标记
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";         //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    sJson_ZYMESFLAG = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FHZYMESFLAG"]);
@@ -4572,7 +4588,7 @@
                        //"\"FID\":\"" + oMain.HInterID.ToString() + "\"," +
                        "\"FBillType\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillType"]) + "\"}," +
                        //\"FDocumentStatus\":\"\",
                        "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," +
                        sJson_Date +
                        "\"FPRDORGID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPRDORGID"]) + "\"}," +
                        //\"FWorkshipIdH\":{\"FNumber\":\"\"},
                        //\"FDescription\":\"\",
@@ -8623,6 +8639,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -8644,7 +8666,7 @@
                ",HStockStyle,HTransferDirect,HShipType" +
                ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" +
                ") " +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -8686,7 +8708,17 @@
                else
                {
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
@@ -8710,7 +8742,7 @@
                        "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," +
                        //\"FStockerId\":{\"FNumber\":\"\"},
                        //\"FStockerGroupId\":{\"FNumber\":\"\"},
                        "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," +
                        sJson_Date +
                        //\"FNote\":\"\",
                        "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," +
                        "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," +
@@ -9015,6 +9047,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -9036,7 +9074,7 @@
                ",HStockStyle,HTransferDirect,HShipType" +
                ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" +
                ") " +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -9069,7 +9107,17 @@
                else
                {
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
@@ -9093,7 +9141,7 @@
                        "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," +
                        //\"FStockerId\":{\"FNumber\":\"\"},
                        //\"FStockerGroupId\":{\"FNumber\":\"\"},
                        "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," +
                        sJson_Date +
                        //\"FNote\":\"\",
                        "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," +
                        "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," +
@@ -9393,6 +9441,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -9414,7 +9468,7 @@
                ",HStockStyle,HTransferDirect,HShipType" +
                ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" +
                ") " +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -9447,7 +9501,17 @@
                else
                {
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
@@ -9471,7 +9535,7 @@
                        "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," +
                        "\"FStockerId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockerId"]) + "\"}," +
                        "\"FStockerGroupId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockerGroupId"]) + "\"}," +
                        "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," +
                        sJson_Date +
                        //\"FNote\":\"\",
                        "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," +
                        "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," +
@@ -9797,6 +9861,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -9818,7 +9888,7 @@
                ",HStockStyle,HTransferDirect,HShipType" +
                ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" +
                ") " +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -9860,7 +9930,17 @@
                else
                {
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
@@ -9884,7 +9964,7 @@
                        "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," +
                        //\"FStockerId\":{\"FNumber\":\"\"},
                        //\"FStockerGroupId\":{\"FNumber\":\"\"},
                        "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," +
                        sJson_Date +
                        //\"FNote\":\"\",
                        "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," +
                        "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," +
@@ -10195,6 +10275,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -10216,7 +10302,7 @@
                ",HStockStyle,HTransferDirect,HShipType" +
                ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" +
                ") " +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -10249,7 +10335,17 @@
                else
                {
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
@@ -10273,7 +10369,7 @@
                        "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," +
                        //\"FStockerId\":{\"FNumber\":\"\"},
                        //\"FStockerGroupId\":{\"FNumber\":\"\"},
                        "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," +
                        sJson_Date +
                        //\"FNote\":\"\",
                        "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," +
                        "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," +
@@ -10576,6 +10672,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -10597,7 +10699,7 @@
                ",HStockStyle,HTransferDirect,HShipType" +
                ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" +
                ") " +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -10630,7 +10732,17 @@
                else
                {
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
@@ -10654,7 +10766,7 @@
                        "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," +
                        //\"FStockerId\":{\"FNumber\":\"\"},
                        //\"FStockerGroupId\":{\"FNumber\":\"\"},
                        "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," +
                        sJson_Date +
                        //\"FNote\":\"\",
                        "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," +
                        "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," +
@@ -10957,6 +11069,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -10978,7 +11096,7 @@
                ",HStockStyle,HTransferDirect,HShipType" +
                ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" +
                ") " +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -11020,7 +11138,17 @@
                else
                {
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
@@ -11044,7 +11172,7 @@
                        "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," +
                        //\"FStockerId\":{\"FNumber\":\"\"},
                        //\"FStockerGroupId\":{\"FNumber\":\"\"},
                        "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," +
                        sJson_Date +
                        //\"FNote\":\"\",
                        "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," +
                        "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," +
@@ -11343,6 +11471,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -11364,7 +11498,7 @@
                ",HStockStyle,HTransferDirect,HShipType" +
                ",HSTOCKORGID,HOWNERID,HSTOCKINORGID,HSTOCKOUTORGID" +
                ") " +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1207','1207'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -11406,6 +11540,7 @@
                    string sJson_StockStyle = "";
                    string sJson_MainCustom = "";    //主表自定义字段
                    string sJson_BillTypeID = "";    //单据类型
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oMain.HBillSubType == "" || oMain.HBillSubType == null)
@@ -11415,6 +11550,15 @@
                    else
                    {
                        sJson_BillTypeID = "\"FBillTypeID\":{ \"FNumber\":\"" + oMain.HBillSubType + "\" },";
                    }
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    if (oSystemParameterMain.WMS_CampanyName == "韩电") //系统参数  客户定制化名称     空白为通用
@@ -11444,7 +11588,7 @@
                        "\"FOwnerTypeIdHead\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerTypeIdHead"]) + "\"," +
                        "\"FSETTLECURRID\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSETTLECURRID"]) + "\" }," +
                        "\"FOwnerIdHead\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\" }," +
                        "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," +
                        sJson_Date +
                        "\"FBaseCurrId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\" }," +
                        sJson_StockStyle +
                        sJson_MainCustom +
@@ -12140,6 +12284,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -12161,7 +12311,7 @@
                ",HSTOCKINORGID,HSTOCKOUTORGID,HStockStyle" +
                ",HSTOCKORGID,HOWNERID" +
                ") " +
                " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -12203,7 +12353,17 @@
                else
                {
                    string sJson_MainCustom = "";    //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
@@ -12218,7 +12378,7 @@
                        "\"FOwnerInIdHead\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerInIdHead"]) + "\" }," +
                        "\"FStockOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockOrgId"]) + "\" }," +
                        "\"FStockInOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockInOrgId"]) + "\" }," +
                        "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," +
                        sJson_Date +
                        "\"FBaseCurrId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\" }," +
                        "\"FVESTONWAY\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FVESTONWAY"]) + "\"," +
                        //\"FSTOCKERID\":{\"FNumber\":\"\"},
@@ -12507,6 +12667,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -12528,7 +12694,7 @@
                ",HSTOCKINORGID,HSTOCKOUTORGID,HStockStyle" +
                ",HSTOCKORGID,HOWNERID" +
                ") " +
                " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -12571,7 +12737,17 @@
                {
                    string sJson_Custom = "";
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    if (oSystemParameterMain.WMS_CampanyName == "四维尔")//系统参数  客户定制化名称     空白为通用
                    {
@@ -12599,7 +12775,7 @@
                        "\"FOwnerInIdHead\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOWNERINID"]) + "\" }," +
                        "\"FStockOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockOrgId"]) + "\" }," +
                        "\"FStockInOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockInOrgId"]) + "\" }," +
                        "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," +
                        sJson_Date +
                        //"\"FBaseCurrId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\" }," +
                        "\"FVESTONWAY\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FVESTONWAY"]) + "\"," +
                        //\"FSTOCKERID\":{\"FNumber\":\"\"},
@@ -12907,6 +13083,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -12928,7 +13110,7 @@
                ",HSTOCKINORGID,HSTOCKOUTORGID,HStockStyle" +
                ",HSTOCKORGID,HOWNERID" +
                ") " +
                " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1250','1250'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -12969,7 +13151,17 @@
                else
                {
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
@@ -12984,7 +13176,7 @@
                        "\"FOwnerInIdHead\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOWNERINID"]) + "\" }," +
                        "\"FStockOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockOrgId"]) + "\" }," +
                        "\"FStockInOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockInOrgId"]) + "\" }," +
                        "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," +
                        sJson_Date +
                        //"\"FBaseCurrId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\" }," +
                        "\"FVESTONWAY\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FVESTONWAY"]) + "\"," +
                        //\"FSTOCKERID\":{\"FNumber\":\"\"},
@@ -13358,6 +13550,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -13379,7 +13577,7 @@
                ",HSTOCKINORGID,HSTOCKOUTORGID,HStockStyle" +
                ",HSTOCKORGID,HOWNERID" +
                ") " +
                " values('1251','1251'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1251','1251'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -13422,7 +13620,17 @@
                {
                    string sJson_Custom = "";
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    if (oSystemParameterMain.WMS_CampanyName == "四维尔")//系统参数  客户定制化名称     空白为通用
                    {
@@ -13443,7 +13651,7 @@
                        "\"FStockOrgId\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSTOCKINORGID"]) + "\" }," +
                        "\"FStockOutOrgID\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSTOCKOUTORGID"]) + "\" }," +
                        //\"FTransferMode\":\"\",
                        "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," +
                        sJson_Date +
                        "\"FOwnerTypeOutIdHead\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOWNERTYPEOUTID"]) + "\"," +
                        "\"FOwnerOutIDHead\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOWNEROUTID"]) + "\" }," +
                        //\"FSTOCKERID\":{\"FNumber\":\"\"},
@@ -21811,6 +22019,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -21831,7 +22045,7 @@
                ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
                ",HSTOCKORGID,HOWNERID" +
                ") " +
                " values('1254','1254'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1254','1254'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -21864,14 +22078,24 @@
                else
                {
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
                        "\"Model\": { \"FBILLNO\":\"" + oMain.HBillNo + "\"," +
                        //\"FID\":\"0\",
                        "\"FBillType\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillType"]) + "\"}," +
                        "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," +
                        sJson_Date +
                        "\"FStockOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockOrgId"]) + "\"}," +
                        //\"FStockId0\":{\"FNumber\":\"\"},
                        "\"FPrdOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPrdOrgId"]) + "\"}," +
@@ -24014,6 +24238,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -24034,7 +24264,7 @@
                ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
                ",HSTOCKORGID,HOWNERID" +
                ") " +
                " values('1211','1211'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1211','1211'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HMangerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -24066,7 +24296,17 @@
                else
                {
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
@@ -24074,7 +24314,7 @@
                        //\"FID\":\"0\",
                        "\"FBillNo\":\"" + oMain.HBillNo + "\"," +
                        "\"FBillType\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillType"]) + "\"}," +
                        "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," +
                        sJson_Date +
                        "\"FSTOCKORGID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSTOCKORGID"]) + "\"}," +
                        "\"FSUBORGID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUBORGID"]) + "\"}," +
                        "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," +
@@ -34506,6 +34746,12 @@
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (oSystemParameterMain.WMS_BillDateMode == "N") //系统参数  单据日期是否取界面递入日期
                {
                    oMain.HDate = DateTime.Today;
                }
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
@@ -34526,7 +34772,7 @@
                ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
                ",HSTOCKORGID,HOWNERID" +
                ") " +
                " values('1210','1210'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                " values('1210','1210'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HMangerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
@@ -34558,7 +34804,17 @@
                else
                {
                    string sJson_MainCustom = "";   //主表自定义字段
                    string sJson_Date = "";             //单据日期
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    if (oSystemParameterMain.WMS_BillDateMode == "Y") //系统参数  单据日期是否取界面递入日期
                    {
                        sJson_Date = "\"FDATE\":\"" + oMain.HDate.ToShortDateString() + "\",";
                    }
                    else
                    {
                        sJson_Date = "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\",";
                    }
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
@@ -34566,7 +34822,7 @@
                    //\"FID\":\"0\",
                    "\"FBillTypeID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillTypeID"]) + "\"}," +
                    //\"FBillNo\":\"\",
                    "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," +
                    sJson_Date +
                    "\"FStockOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockOrgId"]) + "\"}," +
                    "\"FStockDeptId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockDeptId"]) + "\"}," +
                    "\"FStockerGroupId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockerGroupId"]) + "\"}," +
@@ -51959,6 +52215,15 @@
                }
            }
            string HStockStyle = "";
            if (HStockOutOrgID != HStockInOrgID)
            {
                HStockStyle = "跨组织调拨";
            }
            else
            {
                HStockStyle = "组织内调拨";
            }
            oMain.HInterID = HBillID;
            oMain.HBillNo = HBillNo;
            oMain.HBillType = HBillType;
@@ -52032,7 +52297,7 @@
                ",HMaker,HMakeDate,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" +
                ",HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag,HMTONo,HPlanMode" +
                ",HSTOCKORGID,HOtherOrgID,HOWNERID,HOWNERTYPEID,HExpressNumber,HSubBillType" +
                ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate) " +
                ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate,HStockStyle) " +
                " Values(" + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'," + oMain.HMaterID.ToString() + "," + oMain.HUnitID.ToString() + "," + oMain.HAuxPropID.ToString() + "," + oMain.HProcID.ToString() +
                "," + oMain.HWhID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + "," + oMain.HGroupID.ToString() + ",'" + oMain.HAddr + "'" +
                "," + oMain.HQtyMust.ToString() + "," + oMain.HQty.ToString() + "," + oMain.HPieceQty.ToString() + ",'" + oMain.HBatchNo + "','" + oMain.HBarCode + "',''" +
@@ -52040,7 +52305,7 @@
                "," + oMain.HRelationInterID.ToString() + "," + oMain.HRelationEntryID.ToString() + ",'" + oMain.HRelationBillNo + "'," + Convert.ToString(oMain.HRedBlueFlag ? 1 : 0) + ",'" + oMain.HMTONo + "',0" +
                "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','',0" +
                ",0,0,'" + oMain.HCusBarCode + "',0," + (oMain.HBeginDate == "" ? "NULL" : "'" + oMain.HBeginDate + "'") +
                "," + (oMain.HEndDate == "" ? "NULL" : "'" + oMain.HEndDate + "'") + ")");
                "," + (oMain.HEndDate == "" ? "NULL" : "'" + oMain.HEndDate + "'") + ",'" + HStockStyle + "')");
            return true;
        }
@@ -52177,6 +52442,15 @@
                }
            }
            string HStockStyle = "";
            if(HStockOutOrgID != HStockInOrgID)
            {
                HStockStyle = "跨组织调拨";
            }
            else
            {
                HStockStyle = "组织内调拨";
            }
            oMain.HInterID = HBillID;
            oMain.HBillNo = HBillNo;
            oMain.HBillType = HBillType;
@@ -52208,14 +52482,14 @@
                ",HMaker,HMakeDate,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" +
                ",HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag,HMTONo,HPlanMode" +
                ",HSTOCKORGID,HOtherOrgID,HOWNERID,HOWNERTYPEID,HExpressNumber,HSubBillType" +
                ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate) " +
                ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate,HStockStyle) " +
                " select " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'," + oMain.HMaterID.ToString() + ",HAuxPropID," + oMain.HProcID.ToString() +
                "," + oMain.HWhID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + "," + oMain.HGroupID.ToString() + ",'" + oMain.HAddr + "'" +
                "," + oMain.HQtyMust.ToString() + ",HQty," + oMain.HPieceQty.ToString() + ",HBatchNo,HBarCode,''" +
                ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() + "," + oMain.HSourceEntryID.ToString() + ",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" +
                "," + oMain.HRelationInterID.ToString() + "," + oMain.HRelationEntryID.ToString() + ",'" + oMain.HRelationBillNo + "'," + Convert.ToString(oMain.HRedBlueFlag ? 1 : 0) + ",'" + oMain.HMTONo + "',0" +
                "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','',0" +
                ",0,0,'" + oMain.HCusBarCode + "',0,HProduceDate,HExpiryDate" +
                ",0,0,'" + oMain.HCusBarCode + "',0,HProduceDate,HExpiryDate,'" + HStockStyle + "'" +
                //"from  Gy_BarCodeBill with(nolock) where charindex(',' + HBarCode + ',',',' + '" + sBarCode_New + "' + ',')>0"
                " from  Gy_BarCodeBill with(nolock) where  HBarCode in (" + sBarCode_New + ")"
                );