1
yusijie
2023-03-09 85c65fb1370c15be6094b378dd42f96ea012996a
1
12个文件已添加
24个文件已修改
4112 ■■■■ 已修改文件
DAL/DAL.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/基础资料/公用基础资料/ClsGy_MaterType_Ctl.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/车间管理/ClsSc_ProcExchRecordBackBill.cs 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LMES/bin/x86/Debug.zip 补丁 | 查看 | 原始文档 | blame | 历史
Model/Model.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/基础资料/基础资料/ClsGy_MaterType_Model.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/车间管理/ClsSc_ProcExchRecordBackBillMain.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/车间管理/ClsSc_ProcExchRecordBackBillSub.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Sc_ProcExchRecordBackBillController.cs 432 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Sc_ProcExchWorkBackBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MateOutController.cs 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/OtherOutBillController.cs 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/POStockInBillController.cs 879 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/ProductInController.cs 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_ProcessMangementController.cs 535 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SellOutController.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/基础资料/Gy_MaterTypeBillController.cs 360 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/工资基础资料/Gy_ProcPriceController.cs 264 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/生产管理/生产任务单/Sc_ICMOBillController.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/Newtonsoft.Json.rar 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/Newtonsoft.Json/Newtonsoft.Json.dll 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/ListModels.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user 255 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/Settings.Designer.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/Settings.settings 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS/Reference.map 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS/WebService1.disco 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS/WebService1.wsdl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS2/Reference.cs 412 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS2/Reference.map 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS2/WebService1.disco 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS2/WebService1.wsdl 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web.config 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/DAL.csproj
@@ -622,6 +622,7 @@
    <Compile Include="质检管理\ClsQC_POStockInCheckBill.cs" />
    <Compile Include="质检管理\ClsQC_ProcessCheckBill.cs" />
    <Compile Include="质检管理\ClsQC_ProdReportCheckBill.cs" />
    <Compile Include="车间管理\ClsSc_ProcExchRecordBackBill.cs" />
    <Compile Include="车间管理\ClsSc_ProcExchWorkBackBill.cs" />
    <Compile Include="车间管理\ClsSc_CutMaterProcExchBill.cs" />
    <Compile Include="车间管理\ClsSc_MaterBackBill.cs" />
DAL/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/ClsGy_MaterType_Ctl.cs
@@ -20,9 +20,9 @@
                oCn.BeginTran();
                oCn.RunProc("Insert into " + MvarItemKey + " " +
                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
                    ",HLevel,HEndFlag,HStopflag,HRemark) " +
                    ",HLevel,HEndFlag,HStopflag,HRemark,HMakeEmp,HMakeTime,HStopEmp,HStopTime,HUSEORGID,HCREATEORGID,HUseFlag) " +
                    " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() +
                    "," + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "')", ref DBUtility.ClsPub.sExeReturnInfo);
                    "," + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "','"+ oModel.HMakeEmp.ToString() + "',getdate(),'" + (oModel.HStopflag==true? oModel.HMakeEmp.ToString():"") + "','"+ (oModel.HStopflag == true ? DateTime.Now.ToString() : "") + "',"+ oModel.HUSEORGID + "," + oModel.HCREATEORGID + ",'"+ oModel.HUseFlag + "')", ref DBUtility.ClsPub.sExeReturnInfo);
                //修改上级为非末级代码
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                oCn.Commit();
@@ -49,6 +49,12 @@
                    ",HLevel=" + oModel.HLevel.ToString() +
                    ",HParentID=" + oModel.HParentID.ToString() +
                    ",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
                    ",HModifyEmp='" + oModel.HMakeEmp.ToString() + "'" +
                    ",HModifyTime= getdate()" +
                    ",HStopEmp='" + (oModel.HStopflag == true ? oModel.HMakeEmp : "") + "'" +
                    ",HStopTime='" + (oModel.HStopflag == true ? DateTime.Now.ToString() : "") + "'" +
                    ",HUSEORGID=" + oModel.HUSEORGID +
                    ",HUseFlag='" + oModel.HUseFlag + "'" +
                    ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
                    ",HRemark= '" + oModel.HRemark + "' Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                //修改子项目代码
DAL/³µ¼ä¹ÜÀí/ClsSc_ProcExchRecordBackBill.cs
New file
@@ -0,0 +1,136 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace DAL
{
    public  class ClsSc_ProcExchRecordBackBill : DBUtility.ClsXt_BaseBill
    {
        public Model.ClsSc_ProcExchRecordBackBillMain omodel = new Model.ClsSc_ProcExchRecordBackBillMain();
        public List<Model.ClsSc_ProcExchRecordBackBillSub> DetailColl = new List<Model.ClsSc_ProcExchRecordBackBillSub>();
        public ClsSc_ProcExchRecordBackBill()
        {
            base.MvarItemKeySub = "Sc_ProcExchRecordBackBillSub";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey= "Sc_ProcExchRecordBackBillMain";
            base.MvarReportTitle= "工序返工记录单";
            base.BillType = "3797";
            base.HBillSubType = "3797";
        }
        #region å›ºå®šä»£ç 
        ~ClsSc_ProcExchRecordBackBill()
        {
            DetailColl = null;
        }
        #endregion   è‡ªå®šä¹‰æ–¹æ³•
        //修改单据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //
                oCn.BeginTran();
                //更新主表
                oCn.RunProc("UpDate Sc_ProcExchRecordBackBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
                //",HDate='" + omodel.HDate + "'" +
                //",HYear='" + omodel.HYear.ToString() + "'" +
                //",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                ",HRemark='" + omodel.HRemark + "'" +
                ",HUpDater='" + omodel.HMaker + "'" +
                ",HUpDateDate=getdate()" +
                //========================================
                ",HInnerBillNo='" + omodel.HInnerBillNo.ToString() +"'"+
                ",HEmpID=" + omodel.HEmpID.ToString() +
                " where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
                DeleteBillSub(lngBillKey);
                //插入子表
                omodel.HInterID = lngBillKey;
                foreach (Model.ClsSc_ProcExchRecordBackBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into Sc_ProcExchRecordBackBillSub (HInterID, HEntryID, HCloseMan, HEntryCloseDate, HCloseType" +
                        ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" +
                        ", HRelationQty, HRelationMoney, HBillNo_bak, HProcNo, HProcID" +
                        ", HWorkRemark, HCenterID, HDeptID, HSupID, HSupFlag" +
                        ", HQty)values(" +
                        $"{omodel.HInterID}, {oSub.HEntryID.ToString()}, '{oSub.HCloseMan.ToString()}', GETDATE(), {(oSub.HCloseType == true ? 1 : 0)}" +
                        $",'{oSub.HRemark.ToString()}', {oSub.HSourceInterID.ToString()},{oSub.HSourceEntryID.ToString()}, '{oSub.HSourceBillNo.ToString()}', '{oSub.HSourceBillType.ToString()}'" +
                        $",{oSub.HRelationQty.ToString()},{oSub.HRelationMoney.ToString()}, '{oSub.HBillNo_bak.ToString()}', '{oSub.HProcNo.ToString()}',{oSub.HProcID.ToString()}" +
                        $", '{oSub.HWorkRemark.ToString()}', {oSub.HCenterID.ToString()},{oSub.HDeptID.ToString()},{oSub.HSupID.ToString()},{(oSub.HSupFlag == true ? 1 : 0)}" +
                        $", {oSub.HQty.ToString()}) ");
                }
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //新增单据
        public override bool AddBill(ref string sReturn)
        {
            try
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //主表
                oCn.RunProc("insert Into Sc_ProcExchRecordBackBillMain(HBillType, HBillSubType, HInterID, HBillNo, HDate,HBillStatus" +
                    ", HMaker, HMakeDate, HYear, HPeriod, HRemark" +
                    ", HICMOInterID, HICMOBillNo, HICMOEntryID, HProcExchInterID, HProcExchEntryID" +
                    ", HProcExchBillNo, HProcExchBegNO, HProcExchEndNO, HProcBegID, HProcEndID" +
                    ", HMaterID, HUnitID, HEmpID, HPlanQty, HQty" +
                    ", HExplanation, HInnerBillNo, HWorkShopID, HOrderProcNo, HPRDORGID) values(" +
                    $"'{omodel.HBillType}','{omodel.HBillSubType}',{omodel.HInterID},'{omodel.HBillNo}','{omodel.HDate}',1" +
                    $",'{omodel.HMaker}','{omodel.HMakeDate}',{omodel.HYear},{omodel.HPeriod},'{omodel.HRemark}'" +
                    $",{omodel.HICMOInterID},'{omodel.HICMOBillNo}',{omodel.HICMOEntryID},{omodel.HProcExchInterID},{omodel.HProcExchEntryID}" +
                    $",'{omodel.HProcExchBillNo}',{omodel.HProcExchBegNO},{omodel.HProcExchEndNO},{omodel.HProcBegID},{omodel.HProcEndID}" +
                    $",{omodel.HMaterID},{omodel.HUnitID},{omodel.HEmpID},{omodel.HPlanQty},{omodel.HQty}" +
                    $",'{omodel.HExplanation}','{omodel.HInnerBillNo}',{omodel.HWorkShopID},'{omodel.HOrderProcNo}',{omodel.HPRDORGID})");
                //插入子表
                foreach (Model.ClsSc_ProcExchRecordBackBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into Sc_ProcExchRecordBackBillSub (HInterID, HEntryID, HCloseMan, HEntryCloseDate, HCloseType" +
                        ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" +
                        ", HRelationQty, HRelationMoney, HBillNo_bak, HProcNo, HProcID" +
                        ", HWorkRemark, HCenterID, HDeptID, HSupID, HSupFlag" +
                        ", HQty)values(" +
                        $"{omodel.HInterID}, {oSub.HEntryID.ToString()}, '{oSub.HCloseMan.ToString()}', GETDATE(), {(oSub.HCloseType== true ? 1:0)}" +
                        $",'{oSub.HRemark.ToString()}', {oSub.HSourceInterID.ToString()},{oSub.HSourceEntryID.ToString()}, '{oSub.HSourceBillNo.ToString()}', '{oSub.HSourceBillType.ToString()}'" +
                        $",{oSub.HRelationQty.ToString()},{oSub.HRelationMoney.ToString()}, '{oSub.HBillNo_bak.ToString()}', '{oSub.HProcNo.ToString()}',{oSub.HProcID.ToString()}" +
                        $", '{oSub.HWorkRemark.ToString()}', {oSub.HCenterID.ToString()},{oSub.HDeptID.ToString()},{oSub.HSupID.ToString()},{(oSub.HSupFlag== true?1:0)}" +
                        $", {oSub.HQty.ToString()}) ");
                }
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
    }
}
LMES/bin/x86/Debug.zip
Binary files differ
Model/Model.csproj
@@ -580,6 +580,8 @@
    <Compile Include="生产管理\模具管理\ClsSc_MouldStockBillSub.cs" />
    <Compile Include="生产管理\设备管理\ClsSb_EquipConkBookBillMain.cs" />
    <Compile Include="生产管理\设备管理\ClsSb_EquipConkBookBillSub.cs" />
    <Compile Include="车间管理\ClsSc_ProcExchRecordBackBillMain.cs" />
    <Compile Include="车间管理\ClsSc_ProcExchRecordBackBillSub.cs" />
    <Compile Include="车间管理\ClsSc_ProcExchWorkBackBillSub.cs" />
    <Compile Include="车间管理\ClsSc_ProcExchWorkBackBillMain.cs" />
    <Compile Include="生产管理\设备管理\ClsSb_EquipWorkBeforeCheckBillMain.cs" />
Model/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/ClsGy_MaterType_Model.cs
@@ -7,6 +7,15 @@
{
    public class ClsGy_MaterType_Model : DBUtility.ClsGy_Base_Model
    {
        public long HUSEORGID { get; set; }
        public long HCREATEORGID { get; set; }
        public string HMakeEmp { get; set; }
        public DateTime HMakeTime { get; set; }
        public string HCheckEmp { get; set; }
        public DateTime HCheckTime { get; set; }
        public string HModifyEmp { get; set; }
        public DateTime HModifyTime { get; set; }
        public string HStopEmp { get; set; }
        public DateTime HStopTime { get; set; }
    }
}
Model/³µ¼ä¹ÜÀí/ClsSc_ProcExchRecordBackBillMain.cs
New file
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsSc_ProcExchRecordBackBillMain : DBUtility.ClsXt_BaseBillMain
    {
        public Int64 HPrintQty { get; set; }  //打印次数
        public Int64 HICMOInterID { get; set; }
        public Int64 HICMOEntryID { get; set; }
        public Int64 HProcExchInterID { get; set; }
        public Int64 HProcExchEntryID { get; set; }
        public Int64 HProcExchBegNO { get; set; }
        public Int64 HProcExchEndNO { get; set; }
        public Int64 HProcBegID { get; set; }
        public Int64 HProcEndID { get; set; }
        public Int64 HMaterID { get; set; }
        public Int64 HUnitID { get; set; }
        public Int64 HEmpID { get; set; }
        public Int64 HWorkShopID { get; set; }
        public Int64 HPRDORGID { get; set; }
        public string HICMOBillNo { get; set; }
        public string HProcExchBillNo { get; set; }
        public string HExplanation { get; set; }
        public string HBatchNo { get; set; }
        public string HOrderProcNo { get; set; }
        public string HInnerBillNo { get; set; }
        public double HPlanQty { get; set; }
        public double HQty { get; set; }
    }
}
Model/³µ¼ä¹ÜÀí/ClsSc_ProcExchRecordBackBillSub.cs
New file
@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsSc_ProcExchRecordBackBillSub : DBUtility.ClsXt_BaseBillSub
    {
        public string HBillNo_bak;        //单据号(备份,以免内码丢失,找不到对应主表)
        public Int64 HItemSubID; //自增列(GUID)
        public Int64 HProcNo { get; set; }
        public Int64 HProcID { get; set; }
        public Int64 HCenterID { get; set; }
        public Int64 HSupID { get; set; }
        public Int64 HDeptID { get; set; }
        public Int64 HICMOInterID { get; set; }
        public Int64 HSeOrderInterID { get; set; }
        public Int64 HSeOrderEntryID { get; set; }
        public Int64 HICMOEntryID { get; set; }
        public Int64 HWWOrderInterID { get; set; }
        public Int64 HWWOrderEntryID { get; set; }
        public bool HSupFlag { get; set; }
        public string HWorkRemark { get; set; }
        public string HMouldNo { get; set; }
        public string HWWOrderBillNo { get; set; }
        public string HProcWorkNum { get; set; }
        public string HICMOBillNo { get; set; }
        public string HSeOrderBillNo { get; set; }
        public string HTimeUnit { get; set; }
        public string HProcType { get; set; }
        public double HQty { get; set; }
        public double HPlanWorkTimes { get; set; }
        public double HStdWorkTime { get; set; }
        public DateTime HPlanBeginDate { get; set; }
        public DateTime HPlanEndDate { get; set; }
    }
}
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -1220,6 +1220,72 @@
        }
        #endregion
        #region æ ¹æ®å•据号 åŒæ­¥æŠ¥é”™åˆ é™¤å‡ºç«™å•
        [Route("Cj_StationOutBill/DelStationOutBill")]
        [HttpGet]
        public object DelStationOutBill(string HInterID)
        {
            try
            {
                DAL.ClsSc_StationOutBill oBill = new DAL.ClsSc_StationOutBill();
                SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                DataTable DTable;
                int num = 0;
                //判断入库是否同步
                 DTable = oCN.RunProcReturn("select * from  Sc_StationOutBillMain where HInterID='" + HInterID + "' and  HRelationQty=0", "Sc_StationOutBillMain").Tables[0];
                if (DTable.Rows.Count != 0)
                {
                    num++;
                }
                //判断本次报废是否同步
                DTable = oCN.RunProcReturn("select * from  Sc_StationOutBillMain where  HProcExchInterID='" + DTable.Rows[0]["HProcExchInterID"].ToString() + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0];
                if (DTable.Rows.Count != 0)
                {
                    num++;
                }
                if (num == 2)
                {
                    if (!oBill.DeleteBill(long.Parse(HInterID), 0, 0, ref DBUtility.ClsPub.sExeReturnInfo))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除成功!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "无须删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "异常!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç¼–辑前判断
        [Route("Cj_StationOutBill/set_ShowBillJudge")]
        [HttpGet]
WebAPI/Controllers/CJGL/Sc_ProcExchRecordBackBillController.cs
New file
@@ -0,0 +1,432 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.CJGL
{
    public class Sc_ProcExchRecordBackBillController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        #region å·¥åºè¿”工记录单列表
        [Route("Sc_ProcExchRecordBackBill/Sc_ProcExchRecordBackBillList")]
        [HttpGet]
        public object Sc_ProcExchRecordBackBillList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("Sc_ProcExchRecordBackBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查询权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql1 = "select * from h_v_Sc_ProcExchRecordBackBillList where 1 = 1  ";
                string sql = sql1 + sWhere + " order by hmainid desc";
                ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcExchRecordBackBillList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.list = columnNameList;
                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("Sc_ProcExchRecordBackBill/GetProcessExchangeBillSub")]
        [HttpGet]
        public object GetProcessExchangeBillSub_cf(string sWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"select top 2 * from h_v_Sc_ProcessExchangeBillQuerySub");
                ds = oCN.RunProcReturn(sql + sWhere+ " order by æµæ°´å· ", "h_v_Sc_ProcessExchangeBillQuerySub");
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "获取信息成功!";
                objJsonResult.data = ds.Tables[0];
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
            }
            return objJsonResult;
        }
        #endregion
        #region å·¥åºè¿”工记录单  æ–°å¢ž/编辑
        /// <summary>
        /// æ–°å¢žå•据-保存按钮
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sc_ProcExchRecordBackBill/Sc_ProcExchRecordBackBillAddBill")]
        [HttpPost]
        public object Sc_ProcExchRecordBackBillAddBill([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();//主表
            string msg3 = sArray[1].ToString();//子表
            int msg5 = int.Parse(sArray[2].ToString());//类型
            string msg6 = sArray[3].ToString();//用户
            ListModels oListModels = new ListModels();
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Edit", 1, false, msg6))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //主表
                DAL.ClsSc_ProcExchRecordBackBill oBill = new DAL.ClsSc_ProcExchRecordBackBill();
                List<Model.ClsSc_ProcExchRecordBackBillMain> lsmain = new List<Model.ClsSc_ProcExchRecordBackBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_ClsSc_ProcExchRecordBackBillMain(msg2);
                foreach (Model.ClsSc_ProcExchRecordBackBillMain oItem in lsmain)
                {
                    oItem.HBillType = "3797";
                    oItem.HBillSubType = "3797";
                    oItem.HBillStatus = 1;
                    oItem.HMaker = msg6;
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没有单据日期,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    if (oItem.HChecker != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!单据已审核,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oBill.omodel = oItem;
                }
                //表体数据
                //按 },{来拆分数组 //去掉【和】
                msg3 = msg3.Substring(1, msg3.Length - 2);
                msg3 = msg3.Replace("\\", "");
                msg3 = msg3.Replace("\n", "");  //\n
                List<Model.ClsSc_ProcExchRecordBackBillSub> ls = new List<Model.ClsSc_ProcExchRecordBackBillSub>();
                ls = oListModels.getObjectByJson_ClsSc_ProcExchRecordBackBillSub(msg3);
                int i = 0;
                foreach (Model.ClsSc_ProcExchRecordBackBillSub oItemSub in ls)
                {
                    i++;
                    oItemSub.HEntryID = i;
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;   //关闭类型
                    oItemSub.HSourceInterID = 0;     // æºå•主内码
                    oItemSub.HSourceEntryID = 0;   //源单子内码
                    oItemSub.HRelationQty = 0;     //关联数量
                    oItemSub.HBillNo_bak = oBill.omodel.HBillNo;     //备份单据号
                    oItemSub.HCloseMan = "";
                    oItemSub.HSourceBillNo = "";
                    oItemSub.HSourceBillType = "";
                    oBill.DetailColl.Add(oItemSub);
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (msg5 == 1)
                {
                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                if (bResult)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
        #region å·¥åºè¿”工记录单 åˆ é™¤
        /// <summary>
        /// å·¥åºè¿”工记录单
        /// </summary>
        /// <returns></returns>
        [Route("Sc_ProcExchRecordBackBill/DelProcExchWorkBackBill")]
        [HttpGet]
        public object DelProcExchWorkBackBill(string HInterID, string user)
        {
            //编辑权限
            if (!DBUtility.ClsPub.Security_Log("Sc_ProcExchRecordBackBill_Drop", 1, false, user))
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无删除权限!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            Int64 lngBillKey = 0;
            lngBillKey = DBUtility.ClsPub.isLong(HInterID);
            if (lngBillKey == 0)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "单据ID为空!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            DAL.ClsSc_ProcExchRecordBackBill oBill = new DAL.ClsSc_ProcExchRecordBackBill();
            ds = oCN.RunProcReturn("select * from Sc_ProcExchRecordBackBillMain where HInterID=" + lngBillKey, "Sc_ProcExchRecordBackBillMain");
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) > 1)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据当前处于不能删除状态,不能删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据已经审核,不能删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo);
                if (IsDete)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "单据未找到";
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å·¥åºè¿”工记录单 å®¡æ ¸/反审核
        [Route("Sc_ProcExchRecordBackBill/set_CheckBill")]
        [HttpGet]
        public object set_CheckBill(int HInterID, int num, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log("Sc_ProcExchRecordBackBill_Check", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (HInterID == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据ID为0,不能审核!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DataSet Ds = oCN.RunProcReturn("Select * from Sc_ProcExchRecordBackBillMain Where HInterID=" + HInterID, "Sc_ProcExchRecordBackBillMain");
                if (Ds.Tables[0].Rows.Count > 0)
                {
                    if (num == 1)
                    {
                        //查看是否已审核,关闭,作废
                        if (Ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能再次审核";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (num == 2)
                    {
                        if (Ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未审核!请先审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    //审核
                    if (Cj_StationInBillCheckBill(HInterID, num, CurUserName, ref DBUtility.ClsPub.sExeReturnInfo))
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "成功!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据未找到!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        //审核
        public bool Cj_StationInBillCheckBill(Int64 HInterID, int num, string CurUserName, ref string sReturn)
        {
            try
            {
                oCN.BeginTran();
                if (num == 1)
                {
                    oCN.RunProc(" Update Sc_ProcExchRecordBackBillMain set HChecker='" + CurUserName + "',HBillStatus=2,HCheckDate=getdate() Where HInterID=" + HInterID.ToString());
                }
                if (num == 2)
                {
                    oCN.RunProc(" Update Sc_ProcExchRecordBackBillMain set HChecker='',HBillStatus=1,HCheckDate=null Where HInterID=" + HInterID.ToString());
                }
                oCN.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCN.RollBack();
                return false; ;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/CJGL/Sc_ProcExchWorkBackBillController.cs
@@ -77,7 +77,7 @@
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"select top 2 * from h_v_Sc_ProcessExchangeBillQuerySub");
                ds = oCN.RunProcReturn(sql + sWhere, "h_v_Sc_ProcessExchangeBillQuerySub");
                ds = oCN.RunProcReturn(sql + sWhere + " order by æµæ°´å· ", "h_v_Sc_ProcessExchangeBillQuerySub");
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "获取信息成功!";
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -466,7 +466,6 @@
                    oBill.DetailColl.Clear();
                    if (!bResult)
                    {
                        oCN.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
WebAPI/Controllers/MateOutController.cs
@@ -49,7 +49,8 @@
        public WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
       // private DataBaseServices objDataBaseServices = new DataBaseServices();
        private json objJsonResult = new json();
       // private string msgModel = "{{\"count\":{0},\"code\":{0},\"message\":\"{1}\",\"result\":{2}}}";
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        // private string msgModel = "{{\"count\":{0},\"code\":{0},\"message\":\"{1}\",\"result\":{2}}}";
        public static string GetSession(string sMsg)
        {
            try
@@ -652,9 +653,23 @@
        [HttpGet]
        public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID)
        {
            try
            {
                var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo,sMaker);
                string sErrMsg = "";
                string sJXCode = "";
                if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称     ç©ºç™½ä¸ºé€šç”¨
                {
                    sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker);
                    SourceFlag = true;
                }
                else
                {
                    sJXCode = sCode;
                }
                //var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo,sMaker);
                string sExpressNumber = "";
                WebSoBar = oWebs.get_CheckTypeByBarCode_All(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
@@ -866,8 +881,8 @@
                    objJsonResult.data = new
                    {
                        list = ds.Tables[0]
                        //,
                        //list2 = ds.Tables[5]
                        ,
                        list2 = ds.Tables[5]
                    };
                    return objJsonResult;
                }
WebAPI/Controllers/OtherOutBillController.cs
@@ -48,6 +48,7 @@
        private JsonResult objJsonResult = new JsonResult();
        public ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        // private string msgModel = "{{\"count\":{0},\"code\":{0},\"message\":\"{1}\",\"result\":{2}}}";
        public static string GetSession(string sMsg)
        {
@@ -68,52 +69,96 @@
        /// <returns></returns>
        [Route("OtherOutBill/get_CheckTypeByBarCode_Out_Json")]
        [HttpGet]
        public Object get_CheckTypeByBarCode_Out_Json(string sCode, Int64 sInterID,string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID, string HScanStyle)
        //public Object get_CheckTypeByBarCode_Out_Json(string sCode, Int64 sInterID,string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID, string HScanStyle)
        //{
        //    //oBar = webserver.get_CheckTypeByBarCode_Out(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
        //    //if (oBar == null)
        //    //{
        //    //    objJsonResult.code = "0";
        //    //    objJsonResult.count = 0;
        //    //    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
        //    //    objJsonResult.data = null;
        //    //    return objJsonResult;
        //    //}
        //    //else
        //    //{
        //    //    objJsonResult.code = "0";
        //    //    objJsonResult.count = 1;
        //    //    objJsonResult.Message = "扫码成功!";
        //    //    //objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
        //    //    objJsonResult.data = oBar;
        //    //    return objJsonResult;
        //    //}
        //    string sErrMsg = "";
        //    string sJXCode = "";
        //    if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称     ç©ºç™½ä¸ºé€šç”¨
        //    {
        //        sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker);
        //        SourceFlag = true;
        //    }
        //    else
        //    {
        //        sJXCode = sCode;
        //    }
        //    WebS.WebService1 oWebs = new WebS.WebService1();
        //    WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
        //    string sExpressNumber = "";
        //    //var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo,sMaker);
        //    SourceFlag = true;
        //    //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
        //    //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
        //    WebSoBar = oWebs.get_CheckTypeByBarCode_New(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
        //    if (WebSoBar == null)
        //    {
        //        objJsonResult.code = "0";
        //        objJsonResult.count = 0;
        //        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
        //        objJsonResult.data = null;
        //        return objJsonResult;
        //    }
        //    else
        //    {
        //        objJsonResult.code = "0";
        //        objJsonResult.count = 1;
        //        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
        //        objJsonResult.data = WebSoBar;
        //        return objJsonResult;
        //    }
        //}
        public object get_CheckTypeByBarCode_Out_Json(string sCode, long sInterID, string sBillNo, string sMaker, long WhID, long SPID, double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, long HOWNERID)
        {
            //oBar = webserver.get_CheckTypeByBarCode_Out(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
            //if (oBar == null)
            //{
            //    objJsonResult.code = "0";
            //    objJsonResult.count = 0;
            //    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
            //    objJsonResult.data = null;
            //    return objJsonResult;
            //}
            //else
            //{
            //    objJsonResult.code = "0";
            //    objJsonResult.count = 1;
            //    objJsonResult.Message = "扫码成功!";
            //    //objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
            //    objJsonResult.data = oBar;
            //    return objJsonResult;
            //}
            WebS.WebService1 oWebs = new WebS.WebService1();
            WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
            string sExpressNumber = "";
            var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo,sMaker);
            SourceFlag = true;
            //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
            //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
            WebSoBar = oWebs.get_CheckTypeByBarCode_New(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
            if (WebSoBar == null)
            WebAPI.WebS.ClsKf_ICStockBill_WMS clsKf_ICStockBill_WMS = new WebAPI.WebS.ClsKf_ICStockBill_WMS();
            string hexpressNumber = "";
            clsKf_ICStockBill_WMS = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, this.HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, hexpressNumber, ref ClsPub.sErrInfo);
            bool flag = clsKf_ICStockBill_WMS == null;
            object result;
            if (flag)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                objJsonResult.data = null;
                return objJsonResult;
                this.objJsonResult.code = "0";
                this.objJsonResult.count = 0;
                this.objJsonResult.Message = ClsPub.sErrInfo;
                this.objJsonResult.data = null;
                result = this.objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                objJsonResult.data = WebSoBar;
                return objJsonResult;
                this.objJsonResult.code = "0";
                this.objJsonResult.count = 1;
                this.objJsonResult.Message = ClsPub.sErrInfo;
                this.objJsonResult.data = clsKf_ICStockBill_WMS;
                result = this.objJsonResult;
            }
            return result;
        }
        /// <summary>
WebAPI/Controllers/POStockInBillController.cs
@@ -78,49 +78,101 @@
        /// <returns></returns>
        [Route("POStockInBill/get_CheckTypeByBarCode_Json")]
        [HttpGet]
        public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string sBillNo, string sBillType, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID)
        //public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string sBillNo, string sBillType, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID)
        //{
        //    try
        //    {
        //        string sErrMsg = "";
        //        string sJXCode = "";
        //        if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称     ç©ºç™½ä¸ºé€šç”¨
        //        {
        //            sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker);
        //            SourceFlag = true;
        //        }
        //        else
        //        {
        //            sJXCode = sCode;
        //        }
        //        //var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, HBillNo, sMaker);
        //        //if (sRedBlue == true)
        //        //{
        //        //    HBillType = "1239";
        //        //}
        //        //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, sBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
        //        WebS.WebService1 oWebs = new WebS.WebService1();
        //        WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
        //        string sExpressNumber = "";
        //        WebSoBar = oWebs.get_CheckTypeByBarCode_All(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
        //        //WebSoBar = oWebs.get_ba(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
        //        if (WebSoBar == null)
        //        {
        //            objJsonResult.code = "0";
        //            objJsonResult.count = 0;
        //            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
        //            objJsonResult.data = null;
        //            return objJsonResult;
        //        }
        //        else
        //        {
        //            objJsonResult.code = "0";
        //            objJsonResult.count = 1;
        //            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
        //            objJsonResult.data = WebSoBar;
        //            return objJsonResult;
        //        }
        //    }
        //    catch (Exception e)
        //    {
        //        objJsonResult.code = "0";
        //        objJsonResult.count = 1;
        //        objJsonResult.Message = e.Message + ";" + e.StackTrace;
        //        objJsonResult.data = null;
        //        return objJsonResult;
        //    }
        //}
        public object get_CheckTypeByBarCode_Json(string sCode, long sInterID, string sBillNo, string sBillType, string sMaker, long WhID, long SPID, double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, long HOWNERID)
        {
            object result;
            try
            {
                var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, HBillNo, sMaker);
                //if (sRedBlue == true)
                //{
                //    HBillType = "1239";
                //}
                //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, sBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
                WebS.WebService1 oWebs = new WebS.WebService1();
                WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
                string sExpressNumber = "";
                WebSoBar = oWebs.get_CheckTypeByBarCode_All(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
                //WebSoBar = oWebs.get_ba(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
                if (WebSoBar == null)
                string hexpressNumber = "";
                WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, this.HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, hexpressNumber, ref ClsPub.sErrInfo);
                bool flag = WebSoBar == null;
                if (flag)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                    this.objJsonResult.code = "0";
                    this.objJsonResult.count = 0;
                    this.objJsonResult.Message = ClsPub.sErrInfo;
                    this.objJsonResult.data = null;
                    result = this.objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                    objJsonResult.data = WebSoBar;
                    return objJsonResult;
                    this.objJsonResult.code = "0";
                    this.objJsonResult.count = 1;
                    this.objJsonResult.Message = ClsPub.sErrInfo;
                    this.objJsonResult.data = WebSoBar;
                    result = this.objJsonResult;
                }
            }
            catch (Exception e)
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = e.Message + ";" + e.StackTrace;
                objJsonResult.data = null;
                return objJsonResult;
                this.objJsonResult.code = "0";
                this.objJsonResult.count = 1;
                this.objJsonResult.Message = ex.Message + ";" + ex.StackTrace;
                this.objJsonResult.data = null;
                result = this.objJsonResult;
            }
            return result;
        }
@@ -939,13 +991,13 @@
                        bool flag3 = dataSet5.Tables[0].Rows.Count > 0;
                        if (!flag3)
                        {
                            //POStockInBillController postockInBillController = new POStockInBillController();
                            //postockInBillController.set_SavePonderationBillMain_Temp_Source_Fast_Json("1103", text5, hinterid, HBillNo);
                            POStockInBillController postockInBillController = new POStockInBillController();
                            postockInBillController.set_SavePonderationBillMain_Temp_Source_Fast_Json("1103", text5, hinterid, HBillNo);
                            WEBSController webscontroller4 = new WEBSController();
                            object obj4 = webscontroller4.Get_SourceBarCode_PoStockIn_Json(hinterid, HBillNo, HBillType, text5, "1103", HMaker, HOrgID,1, oSystemParameterMain, ref DBUtility.ClsPub.sErrInfo);
                            //WEBSController webscontroller4 = new WEBSController();
                            //object obj4 = webscontroller4.Get_SourceBarCode_PoStockIn_Json(hinterid, HBillNo, HBillType, text5, "1103", HMaker, HOrgID,1, oSystemParameterMain, ref DBUtility.ClsPub.sErrInfo);
                        }
                    }
@@ -1632,7 +1684,8 @@
                    '@'
                        });
                        string str14 = array3[0];
                        long num61 = (long)ClsPub.isInt(array3[4]);
                        //long num61 = (long)ClsPub.isInt(array3[4]);
                        Double num61 = ClsPub.isDoule(array3[4]);
                        string text46 = array3[6];
                        DateTime dateTime13 = ClsPub.isDate(array3[3]);
                        DateTime dateTime14 = ClsPub.isDate(array3[5]);
@@ -3051,7 +3104,7 @@
                        }
                    }
                }
                result = text;
                 result = text;
            }
            catch (Exception ex)
            {
@@ -3916,6 +3969,70 @@
        }
        //[Route("POStockInBill/set_SavePOStockInBill_Json")]
        //[HttpPost]
        //public object set_SavePOStockInBill_Json([FromBody] JObject oMain)
        //{
        //    string text = oMain["oMain"].ToString();
        //    string jsonString = text.ToString();
        //    object result;
        //    try
        //    {
        //        List<ClsKf_POStockInBillMain> list = new List<ClsKf_POStockInBillMain>();
        //        ListModels listModels = new ListModels();
        //        list = listModels.getPOStockInBillMainByJson(jsonString);
        //        list[0].HYear = ClsPub.isLong(DateTime.Now.Year);
        //        list[0].HDate = ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
        //        string hbillType = list[0].HBillType;
        //        WebAPI.WebS.ClsKf_POStockInBillMain clsKf_POStockInBillMain = new WebAPI.WebS.ClsKf_POStockInBillMain();
        //        clsKf_POStockInBillMain.HInterID = list[0].HInterID;
        //        clsKf_POStockInBillMain.HBillNo = list[0].HBillNo;
        //        clsKf_POStockInBillMain.HBillType = "1201";
        //        clsKf_POStockInBillMain.HDate = list[0].HDate;
        //        clsKf_POStockInBillMain.HDeptID = list[0].HDeptID;
        //        clsKf_POStockInBillMain.HWHID = list[0].HWHID;
        //        clsKf_POStockInBillMain.HSCWHID = 0L;
        //        clsKf_POStockInBillMain.HSupID = list[0].HSupID;
        //        clsKf_POStockInBillMain.HKeeperID = list[0].HKeeperID;
        //        clsKf_POStockInBillMain.HSecManagerID = list[0].HSecManagerID;
        //        clsKf_POStockInBillMain.HEmpID = 0L;
        //        clsKf_POStockInBillMain.HManagerID = 0L;
        //        clsKf_POStockInBillMain.HBillerID = list[0].HBillerID;
        //        clsKf_POStockInBillMain.HRemark = "";
        //        clsKf_POStockInBillMain.HInnerBillNo = "";
        //        clsKf_POStockInBillMain.HRedBlueFlag = false;
        //        clsKf_POStockInBillMain.HMainSourceBillType = list[0].HBillType;
        //        clsKf_POStockInBillMain.HExplanation = list[0].HExplanation;
        //        bool flag = this.webserver.set_SavePOStockInBill_New(clsKf_POStockInBillMain, hbillType, ref ClsPub.sErrInfo);
        //        if (flag)
        //        {
        //            this.objJsonResult.code = "0";
        //            this.objJsonResult.count = 1;
        //            this.objJsonResult.Message = "成功!单据号为:";
        //            this.objJsonResult.data = null;
        //            result = this.objJsonResult;
        //        }
        //        else
        //        {
        //            this.objJsonResult.code = "0";
        //            this.objJsonResult.count = 0;
        //            this.objJsonResult.Message = "上传失败!" + ClsPub.sErrInfo;
        //            this.objJsonResult.data = null;
        //            result = this.objJsonResult;
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        this.objJsonResult.code = "0";
        //        this.objJsonResult.count = 0;
        //        this.objJsonResult.Message = "上传失败!" + ex.ToString();
        //        this.objJsonResult.data = null;
        //        result = this.objJsonResult;
        //    }
        //    return result;
        //}
        /// <summary>
        /// ç”Ÿäº§æ±‡æŠ¥å•/提交/直接调webservice
        /// </summary>
@@ -4158,6 +4275,333 @@
        [Route("POStockInBillList/AuditPOInStockBillPost_AR")]
        [HttpPost]
        //public object AuditPOInStockBillPost_AR([FromBody] JObject msg)
        //{
        //    object result;
        //    try
        //    {
        //        string text = msg["msg"].ToString();
        //        text = text.Replace("\\", "");
        //        text = text.Replace("\n", "");
        //        List<ReciveBill_FastModel> list = JsonConvert.DeserializeObject<List<ReciveBill_FastModel>>(text);
        //        DAL.ClsCg_POInStockBill clsCg_POInStockBill = new DAL.ClsCg_POInStockBill();
        //        string hinterID = list[0].HInterID;
        //        string text2 = list[0].FID;
        //        string singleSystemParameter = this.oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref ClsPub.sExeReturnInfo);
        //        string singleSystemParameter2 = this.oSystemParameter.GetSingleSystemParameter("Cg_POInStockBill_ErpAduit", ref ClsPub.sExeReturnInfo);
        //        string singleSystemParameter3 = this.oSystemParameter.GetSingleSystemParameter("Cg_POInStockBill_BarCodeCtl", ref ClsPub.sExeReturnInfo);
        //        string configKey = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DataBaseName");
        //        string empty = string.Empty;
        //        this.oCn.BeginTran();
        //        this.oCn.Commit();
        //        bool flag = singleSystemParameter.Contains("安瑞");
        //        if (flag)
        //        {
        //            DataSet dataSet = this.oCn.RunProcReturn("exec h_p_ReceiveBill_Fast " + hinterID, "h_p_ReceiveBill_Fast");
        //            DataRow dataRow = dataSet.Tables[0].Rows[0];
        //            bool flag2 = dataSet.Tables[0].Rows.Count <= 0;
        //            if (flag2)
        //            {
        //                this.objJsonResult.code = "0";
        //                this.objJsonResult.count = 0;
        //                this.objJsonResult.Message = "未找到对应的单据";
        //                this.objJsonResult.data = null;
        //                return this.objJsonResult;
        //            }
        //            bool flag3 = dataSet.Tables[0].Rows.Count >= 0;
        //            if (flag3)
        //            {
        //                JObject jobject = new JObject();
        //                string value = "SLD01_SYS";
        //                string value2 = "CG";
        //                bool flag4 = dataRow["FTYPENAME"].ToString().Contains("委外");
        //                if (flag4)
        //                {
        //                    value = "SLD03_SYS";
        //                    value2 = "WW";
        //                }
        //                bool flag5 = dataRow["FTYPENAME"].ToString().Contains("资产");
        //                if (flag5)
        //                {
        //                    value = "SLD04_SYS";
        //                    value2 = "ZCCG";
        //                }
        //                JObject jobject2 = jobject;
        //                string propertyName = "FBILLTYPEID";
        //                JObject jobject3 = new JObject();
        //                jobject3["Fnumber"] = value;
        //                jobject2.Add(propertyName, jobject3);
        //                jobject.Add("FBusinessType", value2);
        //                jobject.Add("FBILLNO", dataRow["HBillNo"].ToString());
        //                jobject.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd"));
        //                JObject jobject4 = jobject;
        //                string propertyName2 = "FStockOrgId";
        //                JObject jobject5 = new JObject();
        //                jobject5["Fnumber"] = dataRow["FRECEIVENUMBER"].ToString();
        //                jobject4.Add(propertyName2, jobject5);
        //                JObject jobject6 = jobject;
        //                string propertyName3 = "FPurOrgId";
        //                JObject jobject7 = new JObject();
        //                jobject7["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString();
        //                jobject6.Add(propertyName3, jobject7);
        //                JObject jobject8 = jobject;
        //                string propertyName4 = "FSupplierId";
        //                JObject jobject9 = new JObject();
        //                jobject9["Fnumber"] = dataRow["FSUPPLIERNUMBER"].ToString();
        //                jobject8.Add(propertyName4, jobject9);
        //                JObject jobject10 = jobject;
        //                string propertyName5 = "FPURCHASERID";
        //                JObject jobject11 = new JObject();
        //                jobject11["Fnumber"] = dataRow["FPURCHASERNUMBER"].ToString();
        //                jobject10.Add(propertyName5, jobject11);
        //                jobject.Add("FOwnerTypeIdHead", "BD_Supplier");
        //                JObject jobject12 = jobject;
        //                string propertyName6 = "FOwnerIdHead";
        //                JObject jobject13 = new JObject();
        //                jobject13["Fnumber"] = dataRow["FSUPPLIERNUMBER"].ToString();
        //                jobject12.Add(propertyName6, jobject13);
        //                jobject.Add("F_RYMA_Assistant", new JObject() { ["Fnumber"] = dataRow["F_UJDY_Assistant"].ToString() });
        //                JArray jarray = new JArray();
        //                foreach (object obj in dataSet.Tables[0].Rows)
        //                {
        //                    DataRow dataRow2 = (DataRow)obj;
        //                    JObject jobject14 = new JObject();
        //                    JObject jobject15 = jobject14;
        //                    string propertyName7 = "FMaterialId";
        //                    JObject jobject16 = new JObject();
        //                    jobject16["Fnumber"] = dataRow2["FMATERIALNUMBER"].ToString();
        //                    jobject15.Add(propertyName7, jobject16);
        //                    JObject jobject17 = jobject14;
        //                    string propertyName8 = "FUnitID";
        //                    JObject jobject18 = new JObject();
        //                    jobject18["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
        //                    jobject17.Add(propertyName8, jobject18);
        //                    jobject14.Add("FPreDeliveryDate", DateTime.Now.ToString("yyyy-MM-dd"));
        //                    JObject jobject19 = jobject14;
        //                    string propertyName9 = "FPriceUnitId";
        //                    JObject jobject20 = new JObject();
        //                    jobject20["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
        //                    jobject19.Add(propertyName9, jobject20);
        //                    JObject jobject21 = jobject14;
        //                    string propertyName10 = "FStockUnitID";
        //                    JObject jobject22 = new JObject();
        //                    jobject22["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
        //                    jobject21.Add(propertyName10, jobject22);
        //                    JObject jobject23 = jobject14;
        //                    string propertyName11 = "FStockID";
        //                    JObject jobject24 = new JObject();
        //                    jobject24["Fnumber"] = "BJCK-SH.01.005";
        //                    jobject23.Add(propertyName11, jobject24);
        //                    jobject14.Add("FActReceiveQty", Convert.ToDecimal(dataRow2["HQTY"]));
        //                    jobject14.Add("FOwnerTypeId", "BD_OwnerOrg");
        //                    JObject jobject25 = jobject14;
        //                    string propertyName12 = "FOwnerID";
        //                    JObject jobject26 = new JObject();
        //                    jobject26["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString();
        //                    jobject25.Add(propertyName12, jobject26);
        //                    jobject14.Add("FSrcId", dataRow2["FID"].ToString());
        //                    jobject14.Add("FSRCFORMID", "PUR_PurchaseOrder");
        //                    jobject14.Add("FSrcBillNo", dataRow2["FBILLNO"].ToString());
        //                    jobject14.Add("FSRCENTRYID", dataRow2["FENTRYID"].ToString());
        //                    jobject14.Add("FORDERBILLNO", dataRow2["FBILLNO"].ToString());
        //                    jobject14.Add("FPOORDERENTRYID", dataRow2["FENTRYID"].ToString());
        //                    jobject14.Add("FPrice", dataRow2["FPRICE"].ToString());
        //                    jobject14.Add("FTaxPrice", dataRow2["FTAXPRICE"].ToString());
        //                    jobject14.Add("FEntryTaxRate", dataRow2["FTAXRATE"].ToString());
        //                    JObject jobject27 = jobject14;
        //                    string propertyName13 = "FLOT";
        //                    JObject jobject28 = new JObject();
        //                    jobject28["Fnumber"] = dataRow2["hbatchno"].ToString();
        //                    jobject27.Add(propertyName13, jobject28);
        //                    jobject14.Add("FLOT_TEXT", dataRow2["hbatchno"].ToString());
        //                    jobject14.Add("FProduceDate", dataRow2["HBeginDate"].ToString());
        //                    jobject14.Add("FExpiryDate", dataRow2["HEndDate"].ToString());
        //                    jobject14.Add("F_BGP_ShouldQty", dataRow2["F_BGP_ShouldQty"].ToString());
        //                    //jobject14.Add("F_RYMA_Assistant", dataRow2["F_RYMA_Assistant"].ToString());
        //                    jobject14.Add("FDetailEntity_Link", new JArray
        //                    {
        //                        new JObject
        //                        {
        //                            {
        //                                "FDetailEntity_Link_FRULEID",
        //                                "PUR_PurchaseOrder-PUR_ReceiveBill"
        //                            },
        //                            {
        //                                "FDetailEntity_Link_FSTableName",
        //                                "t_PUR_POOrderEntry"
        //                            },
        //                            {
        //                                "FDetailEntity_Link_FSBillId",
        //                                dataRow2["FID"].ToString()
        //                            },
        //                            {
        //                                "FDetailEntity_Link_FSId",
        //                                dataRow2["FEntryID"].ToString()
        //                            }
        //                        }
        //                    });
        //                    jarray.Add(jobject14);
        //                }
        //                jobject.Add("FDetailEntity", jarray);
        //                JObject jobject29 = new JObject();
        //                JObject jobject30 = jobject29;
        //                string propertyName14 = "FSettleOrgId";
        //                JObject jobject31 = new JObject();
        //                jobject31["Fnumber"] = dataRow["FSETTLEORGNUMBER"].ToString();
        //                jobject30.Add(propertyName14, jobject31);
        //                JObject jobject32 = jobject29;
        //                string propertyName15 = "FSettleCurrId";
        //                JObject jobject33 = new JObject();
        //                jobject33["Fnumber"] = dataRow["FSETTLECURRNUMBER"].ToString();
        //                jobject32.Add(propertyName15, jobject33);
        //                jobject29.Add("FPricePoint", 0);
        //                jobject.Add("FinanceEntity ", jobject29);
        //                JObject jobject34 = new JObject();
        //                jobject34["Creator"] = "";
        //                jobject34["NeedUpDateFields"] = new JArray();
        //                jobject34["NeedReturnFields"] = new JArray();
        //                jobject34["IsDeleteEntry"] = "false";
        //                jobject34["SubSystemId"] = "";
        //                jobject34["IsVerifyBaseDataField"] = "false";
        //                jobject34["Model"] = jobject;
        //                JObject jobject35 = jobject34;
        //                string text3 = InvokeHelper.Login();
        //                int num = JObject.Parse(text3)["LoginResultType"].Value<int>();
        //                bool flag6 = num == 0;
        //                if (flag6)
        //                {
        //                    this.objJsonResult.code = "0";
        //                    this.objJsonResult.count = 0;
        //                    this.objJsonResult.Message = text3;
        //                    this.objJsonResult.data = null;
        //                    return this.objJsonResult;
        //                }
        //                string text4 = InvokeHelper.Save("PUR_ReceiveBill", jobject35.ToString());
        //                bool flag7 = JObject.Parse(text4)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE";
        //                if (!flag7)
        //                {
        //                    this.objJsonResult.code = "0";
        //                    this.objJsonResult.count = 0;
        //                    this.objJsonResult.Message = text4;
        //                    this.objJsonResult.data = null;
        //                    return this.objJsonResult;
        //                }
        //                string text5 = JObject.Parse(text4)["Result"]["Number"].ToString();
        //                text2 = JObject.Parse(text4)["Result"]["Id"].ToString();
        //            }
        //            else
        //            {
        //                LogService.Write("收料通知单审核无数据:" + empty, "Vlog", true);
        //            }
        //        }
        //        else
        //        {
        //            JObject jobject36 = new JObject();
        //            jobject36.Add("Creator", "");
        //            jobject36.Add("NeedUpDateFields", new JArray());
        //            jobject36.Add("NeedReturnFields", new JArray());
        //            jobject36.Add("IsDeleteEntry", "false");
        //            jobject36.Add("SubSystemId", "");
        //            jobject36.Add("IsVerifyBaseDataField", "");
        //            JObject jobject37 = new JObject();
        //            jobject37.Add("FID", text2);
        //            JArray jarray2 = new JArray();
        //            foreach (ReciveBill_FastModel reciveBill_FastModel in list)
        //            {
        //                bool flag8 = reciveBill_FastModel.HSQty == 0m;
        //                if (!flag8)
        //                {
        //                    jarray2.Add(new JObject
        //                    {
        //                        {
        //                            "FEntryID",
        //                            reciveBill_FastModel.FEntryID
        //                        },
        //                        {
        //                            "FActReceiveQty ",
        //                            reciveBill_FastModel.HSQty
        //                        }
        //                    });
        //                }
        //            }
        //            jobject37.Add("FDetailEntity", jarray2);
        //            jobject36.Add("Model", jobject37);
        //            string text6 = InvokeHelper.Login();
        //            int num2 = JObject.Parse(text6)["LoginResultType"].Value<int>();
        //            bool flag9 = num2 <= 0;
        //            if (flag9)
        //            {
        //                this.objJsonResult.code = "0";
        //                this.objJsonResult.count = 0;
        //                this.objJsonResult.Message = text6;
        //                this.objJsonResult.data = null;
        //                return this.objJsonResult;
        //            }
        //            string text7 = InvokeHelper.Save("PUR_ReceiveBill", jobject36.ToString());
        //            bool flag10 = JObject.Parse(text7)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
        //            if (flag10)
        //            {
        //                LogService.Write("收料通知单修改失败jsonRoot:" + jobject36.ToString(), "Vlog", true);
        //                this.objJsonResult.code = "0";
        //                this.objJsonResult.count = 0;
        //                this.objJsonResult.Message = "金蝶收料通知单更新失败" + text7;
        //                this.objJsonResult.data = null;
        //                return this.objJsonResult;
        //            }
        //        }
        //        var f__AnonymousType = new
        //        {
        //            Ids = text2
        //        };
        //        string text8 = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType));
        //        JObject jobject38 = JObject.Parse(text8);
        //        bool flag11 = jobject38["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
        //        if (flag11)
        //        {
        //            LogService.Write("收料通知单提交失败jsonRoot:" +  f__AnonymousType.ToString(), "Vlog", true);
        //            this.objJsonResult.code = "0";
        //            this.objJsonResult.count = 0;
        //            this.objJsonResult.Message = "金蝶收料通知单提交失败" + text8;
        //            this.objJsonResult.data = null;
        //            result = this.objJsonResult;
        //        }
        //        else
        //        {
        //            text8 = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType));
        //            jobject38 = JObject.Parse(text8);
        //            bool flag12 = jobject38["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
        //            if (flag12)
        //            {
        //                LogService.Write("收料通知单审核失败jsonRoot:" +  f__AnonymousType.ToString(), "Vlog", true);
        //                this.objJsonResult.code = "0";
        //                this.objJsonResult.count = 0;
        //                this.objJsonResult.Message = "金蝶收料通知单审核失败jsonRoot" + text8;
        //                this.objJsonResult.data = null;
        //                result = this.objJsonResult;
        //            }
        //            else
        //            {
        //                this.objJsonResult.code = "1";
        //                this.objJsonResult.count = 1;
        //                this.objJsonResult.Message = "操作成功!";
        //                this.objJsonResult.data = null;
        //                result = this.objJsonResult;
        //            }
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        this.objJsonResult.code = "0";
        //        this.objJsonResult.count = 0;
        //        this.objJsonResult.Message = "异常!" + ex.ToString();
        //        this.objJsonResult.data = null;
        //        result = this.objJsonResult;
        //    }
        //    return result;
        //}
        public object AuditPOInStockBillPost_AR([FromBody] JObject msg)
        {
            object result;
@@ -4167,7 +4611,7 @@
                text = text.Replace("\\", "");
                text = text.Replace("\n", "");
                List<ReciveBill_FastModel> list = JsonConvert.DeserializeObject<List<ReciveBill_FastModel>>(text);
                DAL.ClsCg_POInStockBill clsCg_POInStockBill = new DAL.ClsCg_POInStockBill();
                ClsCg_POInStockBill clsCg_POInStockBill = new ClsCg_POInStockBill();
                string hinterID = list[0].HInterID;
                string text2 = list[0].FID;
                string singleSystemParameter = this.oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref ClsPub.sExeReturnInfo);
@@ -4178,12 +4622,16 @@
                this.oCn.BeginTran();
                this.oCn.Commit();
                bool flag = singleSystemParameter.Contains("安瑞");
                if (flag)
                bool flag2 = flag;
                bool flag3 = flag2;
                if (flag3)
                {
                    DataSet dataSet = this.oCn.RunProcReturn("exec h_p_ReceiveBill_Fast " + hinterID, "h_p_ReceiveBill_Fast");
                    DataRow dataRow = dataSet.Tables[0].Rows[0];
                    bool flag2 = dataSet.Tables[0].Rows.Count <= 0;
                    if (flag2)
                    bool flag4 = dataSet.Tables[0].Rows.Count <= 0;
                    bool flag5 = flag4;
                    bool flag6 = flag5;
                    if (flag6)
                    {
                        this.objJsonResult.code = "0";
                        this.objJsonResult.count = 0;
@@ -4191,186 +4639,188 @@
                        this.objJsonResult.data = null;
                        return this.objJsonResult;
                    }
                    bool flag3 = dataSet.Tables[0].Rows.Count >= 0;
                    if (flag3)
                    bool flag7 = dataSet.Tables[0].Rows.Count >= 0;
                    bool flag8 = flag7;
                    bool flag9 = flag8;
                    if (flag9)
                    {
                        JObject jobject = new JObject();
                        string value = "SLD01_SYS";
                        string value2 = "CG";
                        bool flag4 = dataRow["FTYPENAME"].ToString().Contains("委外");
                        if (flag4)
                        string text3 = "SLD01_SYS";
                        string text4 = "CG";
                        bool flag10 = dataRow["FTYPENAME"].ToString().Contains("委外");
                        bool flag11 = flag10;
                        bool flag12 = flag11;
                        if (flag12)
                        {
                            value = "SLD03_SYS";
                            value2 = "WW";
                            text3 = "SLD03_SYS";
                            text4 = "WW";
                        }
                        bool flag5 = dataRow["FTYPENAME"].ToString().Contains("资产");
                        if (flag5)
                        bool flag13 = dataRow["FTYPENAME"].ToString().Contains("资产");
                        bool flag14 = flag13;
                        bool flag15 = flag14;
                        if (flag15)
                        {
                            value = "SLD04_SYS";
                            value2 = "ZCCG";
                            text3 = "SLD04_SYS";
                            text4 = "ZCCG";
                        }
                        JObject jobject2 = jobject;
                        string propertyName = "FBILLTYPEID";
                        string text5 = "FBILLTYPEID";
                        JObject jobject3 = new JObject();
                        jobject3["Fnumber"] = value;
                        jobject2.Add(propertyName, jobject3);
                        jobject.Add("FBusinessType", value2);
                        jobject3["Fnumber"] = text3;
                        jobject2.Add(text5, jobject3);
                        jobject.Add("FBusinessType", text4);
                        jobject.Add("FBILLNO", dataRow["HBillNo"].ToString());
                        jobject.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd"));
                        JObject jobject4 = jobject;
                        string propertyName2 = "FStockOrgId";
                        string text6 = "FStockOrgId";
                        JObject jobject5 = new JObject();
                        jobject5["Fnumber"] = dataRow["FRECEIVENUMBER"].ToString();
                        jobject4.Add(propertyName2, jobject5);
                        jobject4.Add(text6, jobject5);
                        JObject jobject6 = jobject;
                        string propertyName3 = "FPurOrgId";
                        string text7 = "FPurOrgId";
                        JObject jobject7 = new JObject();
                        jobject7["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString();
                        jobject6.Add(propertyName3, jobject7);
                        jobject6.Add(text7, jobject7);
                        JObject jobject8 = jobject;
                        string propertyName4 = "FSupplierId";
                        string text8 = "FSupplierId";
                        JObject jobject9 = new JObject();
                        jobject9["Fnumber"] = dataRow["FSUPPLIERNUMBER"].ToString();
                        jobject8.Add(propertyName4, jobject9);
                        jobject8.Add(text8, jobject9);
                        JObject jobject10 = jobject;
                        string propertyName5 = "FPURCHASERID";
                        string text9 = "FPURCHASERID";
                        JObject jobject11 = new JObject();
                        jobject11["Fnumber"] = dataRow["FPURCHASERNUMBER"].ToString();
                        jobject10.Add(propertyName5, jobject11);
                        jobject10.Add(text9, jobject11);
                        jobject.Add("FOwnerTypeIdHead", "BD_Supplier");
                        JObject jobject12 = jobject;
                        string propertyName6 = "FOwnerIdHead";
                        string text10 = "FOwnerIdHead";
                        JObject jobject13 = new JObject();
                        jobject13["Fnumber"] = dataRow["FSUPPLIERNUMBER"].ToString();
                        jobject12.Add(propertyName6, jobject13);
                        jobject.Add("F_RYMA_Assistant", new JObject() { ["Fnumber"] = dataRow["F_UJDY_Assistant"].ToString() });
                        jobject12.Add(text10, jobject13);
                        JObject jobject14 = jobject;
                        string text11 = "F_RYMA_Assistant";
                        JObject jobject15 = new JObject();
                        jobject15["Fnumber"] = dataRow["F_UJDY_Assistant"].ToString();
                        jobject14.Add(text11, jobject15);
                        JArray jarray = new JArray();
                        foreach (object obj in dataSet.Tables[0].Rows)
                        {
                            DataRow dataRow2 = (DataRow)obj;
                            JObject jobject14 = new JObject();
                            JObject jobject15 = jobject14;
                            string propertyName7 = "FMaterialId";
                            JObject jobject16 = new JObject();
                            jobject16["Fnumber"] = dataRow2["FMATERIALNUMBER"].ToString();
                            jobject15.Add(propertyName7, jobject16);
                            JObject jobject17 = jobject14;
                            string propertyName8 = "FUnitID";
                            JObject jobject17 = jobject16;
                            string text12 = "FMaterialId";
                            JObject jobject18 = new JObject();
                            jobject18["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
                            jobject17.Add(propertyName8, jobject18);
                            jobject14.Add("FPreDeliveryDate", DateTime.Now.ToString("yyyy-MM-dd"));
                            JObject jobject19 = jobject14;
                            string propertyName9 = "FPriceUnitId";
                            jobject18["Fnumber"] = dataRow2["FMATERIALNUMBER"].ToString();
                            jobject17.Add(text12, jobject18);
                            JObject jobject19 = jobject16;
                            string text13 = "FUnitID";
                            JObject jobject20 = new JObject();
                            jobject20["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
                            jobject19.Add(propertyName9, jobject20);
                            JObject jobject21 = jobject14;
                            string propertyName10 = "FStockUnitID";
                            jobject19.Add(text13, jobject20);
                            jobject16.Add("FPreDeliveryDate", DateTime.Now.ToString("yyyy-MM-dd"));
                            JObject jobject21 = jobject16;
                            string text14 = "FPriceUnitId";
                            JObject jobject22 = new JObject();
                            jobject22["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
                            jobject21.Add(propertyName10, jobject22);
                            JObject jobject23 = jobject14;
                            string propertyName11 = "FStockID";
                            jobject21.Add(text14, jobject22);
                            JObject jobject23 = jobject16;
                            string text15 = "FStockUnitID";
                            JObject jobject24 = new JObject();
                            jobject24["Fnumber"] = "BJCK-SH.01.005";
                            jobject23.Add(propertyName11, jobject24);
                            jobject14.Add("FActReceiveQty", Convert.ToDecimal(dataRow2["HQTY"]));
                            jobject14.Add("FOwnerTypeId", "BD_OwnerOrg");
                            JObject jobject25 = jobject14;
                            string propertyName12 = "FOwnerID";
                            jobject24["Fnumber"] = dataRow2["FUNITNUMBER"].ToString();
                            jobject23.Add(text15, jobject24);
                            JObject jobject25 = jobject16;
                            string text16 = "FStockID";
                            JObject jobject26 = new JObject();
                            jobject26["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString();
                            jobject25.Add(propertyName12, jobject26);
                            jobject14.Add("FSrcId", dataRow2["FID"].ToString());
                            jobject14.Add("FSRCFORMID", "PUR_PurchaseOrder");
                            jobject14.Add("FSrcBillNo", dataRow2["FBILLNO"].ToString());
                            jobject14.Add("FSRCENTRYID", dataRow2["FENTRYID"].ToString());
                            jobject14.Add("FORDERBILLNO", dataRow2["FBILLNO"].ToString());
                            jobject14.Add("FPOORDERENTRYID", dataRow2["FENTRYID"].ToString());
                            jobject14.Add("FPrice", dataRow2["FPRICE"].ToString());
                            jobject14.Add("FTaxPrice", dataRow2["FTAXPRICE"].ToString());
                            jobject14.Add("FEntryTaxRate", dataRow2["FTAXRATE"].ToString());
                            JObject jobject27 = jobject14;
                            string propertyName13 = "FLOT";
                            jobject26["Fnumber"] = "BJCK-SH.01.005";
                            jobject25.Add(text16, jobject26);
                            jobject16.Add("FActReceiveQty", Convert.ToDecimal(dataRow2["HQTY"]));
                            jobject16.Add("FOwnerTypeId", "BD_OwnerOrg");
                            JObject jobject27 = jobject16;
                            string text17 = "FOwnerID";
                            JObject jobject28 = new JObject();
                            jobject28["Fnumber"] = dataRow2["hbatchno"].ToString();
                            jobject27.Add(propertyName13, jobject28);
                            jobject14.Add("FLOT_TEXT", dataRow2["hbatchno"].ToString());
                            jobject14.Add("FProduceDate", dataRow2["HBeginDate"].ToString());
                            jobject14.Add("FExpiryDate", dataRow2["HEndDate"].ToString());
                            jobject14.Add("F_BGP_ShouldQty", dataRow2["F_BGP_ShouldQty"].ToString());
                            //jobject14.Add("F_RYMA_Assistant", dataRow2["F_RYMA_Assistant"].ToString());
                            jobject14.Add("FDetailEntity_Link", new JArray
                            {
                                new JObject
                                {
                                    {
                                        "FDetailEntity_Link_FRULEID",
                                        "PUR_PurchaseOrder-PUR_ReceiveBill"
                                    },
                                    {
                                        "FDetailEntity_Link_FSTableName",
                                        "t_PUR_POOrderEntry"
                                    },
                                    {
                                        "FDetailEntity_Link_FSBillId",
                                        dataRow2["FID"].ToString()
                                    },
                                    {
                                        "FDetailEntity_Link_FSId",
                                        dataRow2["FEntryID"].ToString()
                                    }
                                }
                            });
                            jarray.Add(jobject14);
                            jobject28["Fnumber"] = dataRow["FPURCHASEORGNUMBER"].ToString();
                            jobject27.Add(text17, jobject28);
                            jobject16.Add("FSrcId", dataRow2["FID"].ToString());
                            jobject16.Add("FSRCFORMID", "PUR_PurchaseOrder");
                            jobject16.Add("FSrcBillNo", dataRow2["FBILLNO"].ToString());
                            jobject16.Add("FSRCENTRYID", dataRow2["FENTRYID"].ToString());
                            jobject16.Add("FORDERBILLNO", dataRow2["FBILLNO"].ToString());
                            jobject16.Add("FPOORDERENTRYID", dataRow2["FENTRYID"].ToString());
                            jobject16.Add("FPrice", dataRow2["FPRICE"].ToString());
                            jobject16.Add("FTaxPrice", dataRow2["FTAXPRICE"].ToString());
                            jobject16.Add("FEntryTaxRate", dataRow2["FTAXRATE"].ToString());
                            JObject jobject29 = jobject16;
                            string text18 = "FLOT";
                            JObject jobject30 = new JObject();
                            jobject30["Fnumber"] = dataRow2["hbatchno"].ToString();
                            jobject29.Add(text18, jobject30);
                            jobject16.Add("FLOT_TEXT", dataRow2["hbatchno"].ToString());
                            jobject16.Add("FProduceDate", dataRow2["HBeginDate"].ToString());
                            jobject16.Add("FExpiryDate", dataRow2["HEndDate"].ToString());
                            jobject16.Add("F_BGP_ShouldQty", dataRow2["F_BGP_ShouldQty"].ToString());
                            jobject16.Add("F_UJDY_Qty", dataRow2["HQTY"].ToString());
                            JObject jobject31 = jobject16;
                            string text19 = "FDetailEntity_Link";
                            JArray jarray2 = new JArray();
                            JObject jobject32 = new JObject();
                            jobject32.Add("FDetailEntity_Link_FRULEID", "PUR_PurchaseOrder-PUR_ReceiveBill");
                            jobject32.Add("FDetailEntity_Link_FSTableName", "t_PUR_POOrderEntry");
                            jobject32.Add("FDetailEntity_Link_FSBillId", dataRow2["FID"].ToString());
                            jobject32.Add("FDetailEntity_Link_FSId", dataRow2["FEntryID"].ToString());
                            jarray2.Add(jobject32);
                            jobject31.Add(text19, jarray2);
                            jarray.Add(jobject16);
                        }
                        jobject.Add("FDetailEntity", jarray);
                        JObject jobject29 = new JObject();
                        JObject jobject30 = jobject29;
                        string propertyName14 = "FSettleOrgId";
                        JObject jobject31 = new JObject();
                        jobject31["Fnumber"] = dataRow["FSETTLEORGNUMBER"].ToString();
                        jobject30.Add(propertyName14, jobject31);
                        JObject jobject32 = jobject29;
                        string propertyName15 = "FSettleCurrId";
                        JObject jobject33 = new JObject();
                        jobject33["Fnumber"] = dataRow["FSETTLECURRNUMBER"].ToString();
                        jobject32.Add(propertyName15, jobject33);
                        jobject29.Add("FPricePoint", 0);
                        jobject.Add("FinanceEntity ", jobject29);
                        JObject jobject34 = new JObject();
                        jobject34["Creator"] = "";
                        jobject34["NeedUpDateFields"] = new JArray();
                        jobject34["NeedReturnFields"] = new JArray();
                        jobject34["IsDeleteEntry"] = "false";
                        jobject34["SubSystemId"] = "";
                        jobject34["IsVerifyBaseDataField"] = "false";
                        jobject34["Model"] = jobject;
                        JObject jobject35 = jobject34;
                        string text3 = InvokeHelper.Login();
                        int num = JObject.Parse(text3)["LoginResultType"].Value<int>();
                        bool flag6 = num == 0;
                        if (flag6)
                        JObject jobject34 = jobject33;
                        string text20 = "FSettleOrgId";
                        JObject jobject35 = new JObject();
                        jobject35["Fnumber"] = dataRow["FSETTLEORGNUMBER"].ToString();
                        jobject34.Add(text20, jobject35);
                        JObject jobject36 = jobject33;
                        string text21 = "FSettleCurrId";
                        JObject jobject37 = new JObject();
                        jobject37["Fnumber"] = dataRow["FSETTLECURRNUMBER"].ToString();
                        jobject36.Add(text21, jobject37);
                        jobject33.Add("FPricePoint", 0);
                        jobject.Add("FinanceEntity ", jobject33);
                        JObject jobject38 = new JObject();
                        jobject38["Creator"] = "";
                        jobject38["NeedUpDateFields"] = new JArray();
                        jobject38["NeedReturnFields"] = new JArray();
                        jobject38["IsDeleteEntry"] = "false";
                        jobject38["SubSystemId"] = "";
                        jobject38["IsVerifyBaseDataField"] = "false";
                        jobject38["Model"] = jobject;
                        JObject jobject39 = jobject38;
                        string text22 = InvokeHelper.Login();
                        int num = Extensions.Value<int>(JObject.Parse(text22)["LoginResultType"]);
                        bool flag16 = num == 0;
                        bool flag17 = flag16;
                        bool flag18 = flag17;
                        if (flag18)
                        {
                            this.objJsonResult.code = "0";
                            this.objJsonResult.count = 0;
                            this.objJsonResult.Message = text3;
                            this.objJsonResult.Message = text22;
                            this.objJsonResult.data = null;
                            return this.objJsonResult;
                        }
                        string text4 = InvokeHelper.Save("PUR_ReceiveBill", jobject35.ToString());
                        bool flag7 = JObject.Parse(text4)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE";
                        if (!flag7)
                        string text23 = InvokeHelper.Save("PUR_ReceiveBill", jobject39.ToString());
                        bool flag19 = JObject.Parse(text23)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE";
                        bool flag20 = !flag19;
                        bool flag21 = flag20;
                        if (flag21)
                        {
                            this.objJsonResult.code = "0";
                            this.objJsonResult.count = 0;
                            this.objJsonResult.Message = text4;
                            this.objJsonResult.Message = text23;
                            this.objJsonResult.data = null;
                            return this.objJsonResult;
                        }
                        string text5 = JObject.Parse(text4)["Result"]["Number"].ToString();
                        text2 = JObject.Parse(text4)["Result"]["Id"].ToString();
                        string text24 = JObject.Parse(text23)["Result"]["Number"].ToString();
                        text2 = JObject.Parse(text23)["Result"]["Id"].ToString();
                    }
                    else
                    {
@@ -4379,55 +4829,55 @@
                }
                else
                {
                    JObject jobject36 = new JObject();
                    jobject36.Add("Creator", "");
                    jobject36.Add("NeedUpDateFields", new JArray());
                    jobject36.Add("NeedReturnFields", new JArray());
                    jobject36.Add("IsDeleteEntry", "false");
                    jobject36.Add("SubSystemId", "");
                    jobject36.Add("IsVerifyBaseDataField", "");
                    JObject jobject37 = new JObject();
                    jobject37.Add("FID", text2);
                    JArray jarray2 = new JArray();
                    JObject jobject40 = new JObject();
                    jobject40.Add("Creator", "");
                    jobject40.Add("NeedUpDateFields", new JArray());
                    jobject40.Add("NeedReturnFields", new JArray());
                    jobject40.Add("IsDeleteEntry", "false");
                    jobject40.Add("SubSystemId", "");
                    jobject40.Add("IsVerifyBaseDataField", "");
                    JObject jobject41 = new JObject();
                    jobject41.Add("FID", text2);
                    JArray jarray3 = new JArray();
                    foreach (ReciveBill_FastModel reciveBill_FastModel in list)
                    {
                        bool flag8 = reciveBill_FastModel.HSQty == 0m;
                        if (!flag8)
                        bool flag22 = reciveBill_FastModel.HSQty == 0m;
                        bool flag23 = !flag22;
                        bool flag24 = flag23;
                        if (flag24)
                        {
                            jarray2.Add(new JObject
                            {
                                {
                                    "FEntryID",
                                    reciveBill_FastModel.FEntryID
                                },
                                {
                                    "FActReceiveQty ",
                                    reciveBill_FastModel.HSQty
                                }
                            });
                            JArray jarray4 = jarray3;
                            JObject jobject42 = new JObject();
                            jobject42.Add("FEntryID", reciveBill_FastModel.FEntryID);
                            jobject42.Add("FActReceiveQty ", reciveBill_FastModel.HSQty);
                            jarray4.Add(jobject42);
                        }
                    }
                    jobject37.Add("FDetailEntity", jarray2);
                    jobject36.Add("Model", jobject37);
                    string text6 = InvokeHelper.Login();
                    int num2 = JObject.Parse(text6)["LoginResultType"].Value<int>();
                    bool flag9 = num2 <= 0;
                    if (flag9)
                    jobject41.Add("FDetailEntity", jarray3);
                    jobject40.Add("Model", jobject41);
                    string text25 = InvokeHelper.Login();
                    int num2 = Extensions.Value<int>(JObject.Parse(text25)["LoginResultType"]);
                    bool flag25 = num2 <= 0;
                    bool flag26 = flag25;
                    bool flag27 = flag26;
                    if (flag27)
                    {
                        this.objJsonResult.code = "0";
                        this.objJsonResult.count = 0;
                        this.objJsonResult.Message = text6;
                        this.objJsonResult.Message = text25;
                        this.objJsonResult.data = null;
                        return this.objJsonResult;
                    }
                    string text7 = InvokeHelper.Save("PUR_ReceiveBill", jobject36.ToString());
                    bool flag10 = JObject.Parse(text7)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
                    if (flag10)
                    string text26 = InvokeHelper.Save("PUR_ReceiveBill", jobject40.ToString());
                    bool flag28 = JObject.Parse(text26)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
                    bool flag29 = flag28;
                    bool flag30 = flag29;
                    if (flag30)
                    {
                        LogService.Write("收料通知单修改失败jsonRoot:" + jobject36.ToString(), "Vlog", true);
                        LogService.Write("收料通知单修改失败jsonRoot:" + jobject40.ToString(), "Vlog", true);
                        this.objJsonResult.code = "0";
                        this.objJsonResult.count = 0;
                        this.objJsonResult.Message = "金蝶收料通知单更新失败" + text7;
                        this.objJsonResult.Message = "金蝶收料通知单更新失败" + text26;
                        this.objJsonResult.data = null;
                        return this.objJsonResult;
                    }
@@ -4436,29 +4886,33 @@
                {
                    Ids = text2
                };
                string text8 = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType));
                JObject jobject38 = JObject.Parse(text8);
                bool flag11 = jobject38["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
                if (flag11)
                string text27 = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType));
                JObject jobject43 = JObject.Parse(text27);
                bool flag31 = jobject43["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
                bool flag32 = flag31;
                bool flag33 = flag32;
                if (flag33)
                {
                    LogService.Write("收料通知单提交失败jsonRoot:" +  f__AnonymousType.ToString(), "Vlog", true);
                    this.objJsonResult.code = "0";
                    this.objJsonResult.count = 0;
                    this.objJsonResult.Message = "金蝶收料通知单提交失败" + text8;
                    this.objJsonResult.Message = "金蝶收料通知单提交失败" + text27;
                    this.objJsonResult.data = null;
                    result = this.objJsonResult;
                }
                else
                {
                    text8 = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType));
                    jobject38 = JObject.Parse(text8);
                    bool flag12 = jobject38["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
                    if (flag12)
                    text27 = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject( f__AnonymousType));
                    jobject43 = JObject.Parse(text27);
                    bool flag34 = jobject43["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE";
                    bool flag35 = flag34;
                    bool flag36 = flag35;
                    if (flag36)
                    {
                        LogService.Write("收料通知单审核失败jsonRoot:" +  f__AnonymousType.ToString(), "Vlog", true);
                        this.objJsonResult.code = "0";
                        this.objJsonResult.count = 0;
                        this.objJsonResult.Message = "金蝶收料通知单审核失败jsonRoot" + text8;
                        this.objJsonResult.Message = "金蝶收料通知单审核失败jsonRoot" + text27;
                        this.objJsonResult.data = null;
                        result = this.objJsonResult;
                    }
@@ -4482,7 +4936,6 @@
            }
            return result;
        }
        #region PDA其他出库
@@ -4572,7 +5025,7 @@
                        '@'
                    });
                    string text = array[0];
                    long num = ClsPub.isLong(array[4]);
                    Double num = ClsPub.isDoule(array[4]);
                    string text2 = array[6];
                    DateTime dateTime = ClsPub.isDate(array[3]);
                    DateTime dateTime2 = ClsPub.isDate(array[5]);
WebAPI/Controllers/ProductInController.cs
@@ -327,31 +327,58 @@
        /// <returns></returns>
        [Route("OtherOutBill_Check_New/get_InfoByBarCode_Source_Json")]
        [HttpGet]
        public Object get_InfoByBarCode_Source_Json(string sCode, Int64 sInterID, string HBillType,string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Int64 sQty, Int64 HOWNERID)
        //public Object get_InfoByBarCode_Source_Json(string sCode, Int64 sInterID, string HBillType,string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Int64 sQty, Int64 HOWNERID)
        //{
        //    WebS.WebService1 oWebs = new WebS.WebService1();
        //    WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
        //    string sExpressNumber = "";
        //    var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker);
        //    //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
        //    WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, sInterID, HBillType, sBillNo, sMaker,  WhID,  SPID,  sQty,  HOWNERID, ref DBUtility.ClsPub.sErrInfo);
        //    if (WebSoBar == null)
        //    {
        //        objJsonResult.code = "0";
        //        objJsonResult.count = 0;
        //        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
        //        objJsonResult.data = null;
        //        return objJsonResult;
        //    }
        //    else
        //    {
        //        objJsonResult.code = "0";
        //        objJsonResult.count = 1;
        //        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
        //        objJsonResult.data = WebSoBar;
        //        return objJsonResult;
        //    }
        //}
        public object get_InfoByBarCode_Source_Json(string sCode, long sInterID, string HBillType, string sBillNo, string sMaker, long WhID, long SPID, long sQty, long HOWNERID)
        {
            WebS.WebService1 oWebs = new WebS.WebService1();
            WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
            string sExpressNumber = "";
            var sJXCode = POStockInBillController.JX_Json(sCode, sInterID, HBillType, HOWNERID, sBillNo, sMaker);
            //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
            WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, sInterID, HBillType, sBillNo, sMaker,  WhID,  SPID,  sQty,  HOWNERID, ref DBUtility.ClsPub.sErrInfo);
            if (WebSoBar == null)
            WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, (double)sQty, HOWNERID, ref ClsPub.sErrInfo);
            bool flag = WebSoBar == null;
            object result;
            if (flag)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                objJsonResult.data = null;
                return objJsonResult;
                this.objJsonResult.code = "0";
                this.objJsonResult.count = 0;
                this.objJsonResult.Message = ClsPub.sErrInfo;
                this.objJsonResult.data = null;
                result = this.objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                objJsonResult.data = WebSoBar;
                return objJsonResult;
                this.objJsonResult.code = "0";
                this.objJsonResult.count = 1;
                this.objJsonResult.Message = ClsPub.sErrInfo;
                this.objJsonResult.data = WebSoBar;
                result = this.objJsonResult;
            }
            return result;
        }
@@ -1137,67 +1164,123 @@
        [HttpPost]
        public object set_SaveProductInBill_Json([FromBody]JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            //List<Model.ClsKf_ProductInBillMain> lsmain = new List<Model.ClsKf_ProductInBillMain>();
            //ListModels oListModels = new ListModels();
            //lsmain = oListModels.getProductInBillMainByJson(msg1);
            //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
            //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
            //string sSourceBillType = lsmain[0].HBillType;
            //BLL.ClsKf_ProductInBill bll = new BLL.ClsKf_ProductInBill();
            //return bll.set_SaveProductInBill_New(lsmain[0], sSourceBillType, ref DBUtility.ClsPub.sErrInfo);
            //var _value = oMain["oMain"].ToString();
            //string msg1 = _value.ToString();
            ////List<Model.ClsKf_ProductInBillMain> lsmain = new List<Model.ClsKf_ProductInBillMain>();
            ////ListModels oListModels = new ListModels();
            ////lsmain = oListModels.getProductInBillMainByJson(msg1);
            ////lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
            ////lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
            ////string sSourceBillType = lsmain[0].HBillType;
            ////BLL.ClsKf_ProductInBill bll = new BLL.ClsKf_ProductInBill();
            ////return bll.set_SaveProductInBill_New(lsmain[0], sSourceBillType, ref DBUtility.ClsPub.sErrInfo);
            //try
            //{
            //    List<Model.ClsKf_ProductInBillMain> lsmain = new List<Model.ClsKf_ProductInBillMain>();
            //    ListModels oListModels = new ListModels();
            //    lsmain = oListModels.getProductInBillMainByJson(msg1);
            //    //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
            //    //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
            //    string sSourceBillType = lsmain[0].HBillType;
            //    WebAPI.WebS.ClsKf_ProductInBillMain websLsmain = new WebS.ClsKf_ProductInBillMain();
            //    websLsmain.HInterID = lsmain[0].HInterID;
            //    websLsmain.HDate = lsmain[0].HDate;
            //    websLsmain.HBillNo = lsmain[0].HBillNo;
            //    websLsmain.HDeptID = lsmain[0].HDeptID;
            //    websLsmain.HEmpID = lsmain[0].HEmpID;
            //    websLsmain.HKeeperID= lsmain[0].HKeeperID;
            //    websLsmain.HRemark = lsmain[0].HRemark;
            //    websLsmain.HMaker = lsmain[0].HMaker;
            //    websLsmain.HWHID = lsmain[0].HWHID;
            //    websLsmain.HSupID = lsmain[0].HSupID;
            //    websLsmain.HExplanation = lsmain[0].HExplanation;
            //    websLsmain.HBillType = "1202";//固定值
            //    if (webserver.set_SaveProductInBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
            //    {
            //        objJsonResult.code = "0";
            //        objJsonResult.count = 1;
            //        objJsonResult.Message = "生成产品入库单成功!单据号为:";
            //        objJsonResult.data = null;
            //        return objJsonResult;
            //    }
            //    else
            //    {
            //        objJsonResult.code = "0";
            //        objJsonResult.count = 0;
            //        objJsonResult.Message = "上传失败!" + DBUtility.ClsPub.sErrInfo;
            //        objJsonResult.data = null;
            //        return objJsonResult;
            //    }
            //}
            //catch (Exception e)
            //{
            //    objJsonResult.code = "0";
            //    objJsonResult.count = 0;
            //    objJsonResult.Message = "上传失败!" + e.ToString();
            //    objJsonResult.data = null;
            //    return objJsonResult;
            //}
            string text = oMain["oMain"].ToString();
            string jsonString = text.ToString();
            object result;
            try
            {
                List<Model.ClsKf_ProductInBillMain> lsmain = new List<Model.ClsKf_ProductInBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getProductInBillMainByJson(msg1);
                //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
                string sSourceBillType = lsmain[0].HBillType;
                WebAPI.WebS.ClsKf_ProductInBillMain websLsmain = new WebS.ClsKf_ProductInBillMain();
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HDate = lsmain[0].HDate;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HDeptID = lsmain[0].HDeptID;
                websLsmain.HEmpID = lsmain[0].HEmpID;
                websLsmain.HKeeperID= lsmain[0].HKeeperID;
                websLsmain.HRemark = lsmain[0].HRemark;
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HWHID = lsmain[0].HWHID;
                websLsmain.HSupID = lsmain[0].HSupID;
                websLsmain.HExplanation = lsmain[0].HExplanation;
                websLsmain.HBillType = "1202";//固定值
                if (webserver.set_SaveProductInBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
                List<ClsKf_ProductInBillMain> list = new List<ClsKf_ProductInBillMain>();
                ListModels listModels = new ListModels();
                list = listModels.getProductInBillMainByJson(jsonString);
                list[0].HYear = ClsPub.isLong(DateTime.Now.Year);
                list[0].HDate = ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
                string hbillType = list[0].HBillType;
                WebAPI.WebS.ClsKf_ProductInBillMain clsKf_ProductInBillMain = new WebAPI.WebS.ClsKf_ProductInBillMain();
                clsKf_ProductInBillMain.HInterID = list[0].HInterID;
                clsKf_ProductInBillMain.HDate = list[0].HDate;
                clsKf_ProductInBillMain.HBillNo = list[0].HBillNo;
                clsKf_ProductInBillMain.HDeptID = list[0].HDeptID;
                clsKf_ProductInBillMain.HEmpID = list[0].HEmpID;
                clsKf_ProductInBillMain.HKeeperID = list[0].HKeeperID;
                clsKf_ProductInBillMain.HRemark = list[0].HRemark;
                clsKf_ProductInBillMain.HMaker = list[0].HMaker;
                clsKf_ProductInBillMain.HWHID = list[0].HWHID;
                clsKf_ProductInBillMain.HSupID = list[0].HSupID;
                clsKf_ProductInBillMain.HExplanation = list[0].HExplanation;
                clsKf_ProductInBillMain.HBillType = "1202";
                bool flag = this.webserver.set_SaveProductInBill_New(clsKf_ProductInBillMain, hbillType, ref ClsPub.sErrInfo);
                if (flag)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "生成产品入库单成功!单据号为:";
                    objJsonResult.data = null;
                    return objJsonResult;
                    this.objJsonResult.code = "0";
                    this.objJsonResult.count = 1;
                    this.objJsonResult.Message = "生成产品入库单成功!单据号为:";
                    this.objJsonResult.data = null;
                    result = this.objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "上传失败!" + DBUtility.ClsPub.sErrInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                    this.objJsonResult.code = "0";
                    this.objJsonResult.count = 0;
                    this.objJsonResult.Message = "上传失败!" + ClsPub.sErrInfo;
                    this.objJsonResult.data = null;
                    result = this.objJsonResult;
                }
            }
            catch (Exception e)
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "上传失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
                this.objJsonResult.code = "0";
                this.objJsonResult.count = 0;
                this.objJsonResult.Message = "上传失败!" + ex.ToString();
                this.objJsonResult.data = null;
                result = this.objJsonResult;
            }
            return result;
        }
        /// <summary>
WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -276,7 +276,6 @@
        //        model.Add("FBillType", new JObject() { ["Fnumber"] = "SCHBD01_SYS" }); //单据类型生产汇报“SCHBD02_SYS” å…¥åº“汇报SCHBD01_SYS
        //        model.Add("FPrdOrgId", new JObject() { ["Fnumber"] = dr1["FPrdOrgNUMBER"].ToString() }); //生产组织1
        //        model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //单据日期1
        //        model.Add("FHZYMESFLAG", "是");//  æ˜¯å¦ä¸ºMES同步
        //        model.Add("FBillNo", BillNo);
        //        JArray Fentity = new JArray();
@@ -304,19 +303,15 @@
        //            FentityModel.Add("FFailQty", item["不良数量"].ToString());//不合格数量
        //            FentityModel.Add("FStockInOrgId ", new JObject() { ["Fnumber"] = OrganizationNUM });// å…¥åº“组织 
        //            FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = dr1["FStockNUM"].ToString() }); // ä»“库 
        //            FentityModel.Add("FMOID", dr1["FMOID"].ToString());//
        //            FentityModel.Add("FMOBILLNO", dr1["FMOBILLNO"].ToString());//  
        //            FentityModel.Add("FMOENTRYID", dr1["FMOENTRYID"].ToString());//  
        //            FentityModel.Add("FMOENTRYSEQ", dr1["FMOENTRYSEQ"].ToString());//
        //            FentityModel.Add("FOwnerTypeId", dr1["FOWNERTYPEID"].ToString()); //货主类型:FOwnerTypeId(必填项)
        //            FentityModel.Add("FOwnerId", new JObject() { ["Fnumber"] = dr1["FOwnerNumber"].ToString() }); //货主:FOwnerId(必填项)
        //            FentityModel.Add("FBomId", new JObject() { ["Fnumber"] = dr1["FBOMNUM"].ToString() }); //BOM版本:FBomId(必填项)
        //            FentityModel.Add("FBomId", new JObject() { ["F    number"] = dr1["FBOMNUM"].ToString() }); //BOM版本:FBomId(必填项)
        //            FentityModel.Add("FCostRate", dr1["FCostRate"].ToString());// æˆæœ¬æƒé‡
        //            FentityModel.Add("FISBACKFLUSH", dr1["FISBACKFLUSH"].ToString() == "1" ? true : false);// å€’冲领料
        //            FentityModel.Add("FMOMAINENTRYID", dr1["FMOENTRYID"].ToString());//
        //            FentityModel.Add("F_bsv_Base1", new JObject() { ["Fnumber"] = dr1["FPREBDONENUMBER"].ToString() }); //包装标识
        //            FentityModel.Add("FLot", new JObject() { ["FNumber"] = dr1["FBATCHNO"].ToString() }); //批号
        //            FentityModel.Add("F_bsv_Text", dr1["工序流转卡号"].ToString()); //流转卡号
        //            JArray Fentity2 = new JArray();
        //            JObject FentityModel2 = new JObject();
        //            FentityModel2.Add("FEntity_Link_FFlowId", "f6e6eec3-5267-4f02-8593-b633da508a72");
@@ -329,9 +324,6 @@
        //            FentityModel2.Add("FEntity_Link_FBaseQuaQtyOld", item["合格数量"].ToString());
        //            FentityModel2.Add("FEntity_Link_FBaseQuaQty", item["合格数量"].ToString());
        //            Fentity2.Add(FentityModel2);
        //            FentityModel.Add("FEntity_Link", Fentity2);
        //            FentityModel.Add("FBFLowId", new JObject() { ["FID"] = "f6e6eec3-5267-4f02-8593-b633da508a72" }); //
        //            Fentity.Add(FentityModel);
        //        }
        //        model.Add("FEntity", Fentity); //明细信息                       
        //        JObject jsonRoot = new JObject()
@@ -632,6 +624,19 @@
                ////根据工序汇报单主ID获取工序汇报入库单的数据
                //DataSet ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_LastProc where HInterID=" + InterID, "h_v_MES_StationOutBillList_LastProc");
                //DataRow dr = ds.Tables[0].Rows[0];
                //判断入库的合格数量是否为0
                var DTable = oCN.RunProcReturn("select * from  Sc_StationOutBillMain where HBillNo='"+ BillNo + "' ", "Sc_StationOutBillMain").Tables[0];
                if (double.Parse(DTable.Rows[0]["HQty"].ToString()) == 0)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 2;
                    objJsonResult.Message = "合格数量为0,不需要入库!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //保存
                oCN.BeginTran();
                //生产汇报单主表
@@ -680,7 +685,7 @@
                //DataSet ds1 = oCN.RunProcReturn("select * from  h_v_TOERPProcduct_LastProc where HLastProc = '是' and  hbillno='" + BillNo.ToString() + "'", "h_v_TOERPProcduct_LastProc");
                DataSet ds1 = oCN.RunProcReturn("exec h_p_TOERPProcduct_LastProc '" + BillNo + "'", "h_p_TOERPProcduct_LastProc");
                DataRow dr1 = ds1.Tables[0].Rows[0];
                if (ds1.Tables[0].Rows.Count <= 0)
                if (double.Parse(dr1[0].ToString()) <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -893,6 +898,20 @@
                ////根据工序汇报单主ID获取工序汇报入库单的数据
                //DataSet ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_LastProc where HInterID=" + InterID, "h_v_MES_StationOutBillList_LastProc");
                //DataRow dr = ds.Tables[0].Rows[0];
                //判断本次报废总数量是否为0
                var DTable = oCN.RunProcReturn("select sum(HWasterQty) HWasterQty from  Sc_StationOutBillMain where  HProcExchBillNo='"+ BillNo + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0];
                if (double.Parse(DTable.Rows[0]["HWasterQty"].ToString()) == 0)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 2;
                    objJsonResult.Message = "报废数量为0,不需要入库!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //保存
                oCN.BeginTran();
                //生产汇报单主表
@@ -1128,6 +1147,259 @@
        }
        ///// <summary>
        ///// ç”Ÿæˆé‡‘蝶云来料检验单
        ///// </summary>
        ///// <param name="InterID">工序汇报单主ID</param>
        ///// <returns></returns>
        //[Route("QCStockInCheckBill/set_SaveQCStockInCheckBill_Json")]
        //[HttpGet]
        //public object set_SaveQCStockInCheckBill_Json(string HZJOrgNumber, string HMaterNumber, string HUnitNumber,
        //    double HCheckQty, double HRightQty, double HBadQty,
        //    string HCheckResult, string HSupNumber,
        //    string HUseResult, Int64 HSeQ, Int64 HSourceInterID,
        //    Int64 HSourceEntryID, string HSourceBillNo, string user,
        //    Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID,
        //    Int64 HMaterID, string HSourceBillType, Int64 HSLInterID,
        //    Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID)
        //{
        //    try
        //    {
        //        //获取生产汇报单最大InterID和单据号
        //        //Int64 HInterID = DBUtility.ClsPub.CreateBillID("7503", ref DBUtility.ClsPub.sExeReturnInfo);
        //        //string HBillNo = DBUtility.ClsPub.CreateBillCode("7503", ref DBUtility.ClsPub.sExeReturnInfo, true);
        //        DataSet ds1 = oCN.RunProcReturn("select   * from MES_AccessoriesList  where  HSourceBillNo = '" + HBillNo + "'", "MES_AccessoriesList");
        //        string HFileName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFileName"]);
        //        string HFilePath = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFilePath"]);
        //        string path = HFilePath;
        //        FileInfo fi = new FileInfo(path);
        //        long len = fi.Length;
        //        byte[] buffer = new byte[len];
        //        FileStream fs = new FileStream(path, FileMode.Open);
        //        fs.Read(buffer, 0, (int)len);
        //        //文件IO流
        //        string a = Convert.ToBase64String(buffer);
        //        //保存
        //        oCN.BeginTran();
        //        //生产汇报单主表
        //        oCN.RunProc("Insert Into QC_POStockInCheckBillMain   " +
        //        "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HBillStatus,HChecker,HCheckDate" +
        //        ",HYear,HPeriod,HRemark,HSupID,HMaterID" +
        //        ",HInstockQty,HCheckQty,HRightQty,HBadQty,HFirstCheckEmp" +
        //        ",HCheckerResult,HSteelStoveNo,HSteelCompReport,HAspect,HSize" +
        //        ") " +
        //        " values('7503','7503'," + HInterID.ToString() + ",'" + HBillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" +
        //        ",DATENAME(YEAR,GETDATE()),0,''," + HSupID.ToString() + "," + HMaterID.ToString() +
        //        ",'" + HCheckQty.ToString() + "','" + HCheckQty.ToString() + "','" + HRightQty.ToString() + "','" + HBadQty.ToString() + "','" + HKeeperID.ToString() + "'" +
        //        ",'" + HCheckResult.ToString() + "','', '','',''" +
        //        ") ");
        //        //生产汇报单子表
        //        oCN.RunProc("Insert into QC_POStockInCheckBillSub " +
        //              " (HInterID,HEntryID,HCloseMan,HCloseType" +
        //              ",HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
        //              ",HRelationQty,HRelationMoney,HQCCheckClassID,HQCCheckItemID,HQCStd," +
        //              "HResult,HQCRelValue,HProcCheckEmp,HProcCheckTime" +
        //              ") values("
        //              + HInterID.ToString() + ",1,'',''" +
        //              ",''," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo.ToString() + "','" + HSourceBillType.ToString() + "'" +
        //              ",0,0,0,0,''" +
        //              ",'" + HCheckResult.ToString() + "','" + HCheckResult.ToString() + "','" + HKeeperID.ToString() + "',getdate()" +
        //              ") ");
        //        //同步金蝶
        //        //访问金蝶
        //        var loginRet = InvokeHelper.Login();
        //        var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
        //        if (isSuccess == 0)
        //        {
        //            objJsonResult.code = "0";
        //            objJsonResult.count = 0;
        //            objJsonResult.Message = "操作失败,金蝶账号登录异常。" + loginRet;
        //            objJsonResult.data = null;
        //            return objJsonResult;
        //        }
        //        JObject model = new JObject();
        //        model.Add("FBillTypeID", new JObject() { ["Fnumber"] = "JYD001_SYS" }); //单据类型 æ¥æ–™æ£€éªŒå•JYD001_SYS
        //        model.Add("FBusinessType", "1"); //业务类型
        //        model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //单据日期
        //        model.Add("FInspectOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //质检组织
        //        model.Add("FSourceOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //来源组织
        //        model.Add("FISSYNCED", "false");//  æ˜¯å¦å·²åŒæ­¥
        //        model.Add("F_PGKJ_Date", DateTime.Now.ToString("yyyy-MM-dd"));//  æŠ¥æ£€æ—¥æœŸ
        //        model.Add("FBillNo", HBillNo);
        //        JArray Fentity = new JArray();
        //            JObject FentityModel = new JObject();
        //            FentityModel.Add("FMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });//  ç‰©æ–™å†…码
        //            FentityModel.Add("FUnitID", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//计量单位内码
        //            FentityModel.Add("FInspectQty", HCheckQty.ToString());//  æ£€éªŒæ•°é‡
        //            FentityModel.Add("FQualifiedQty", HRightQty.ToString());//  åˆæ ¼æ•°é‡
        //            FentityModel.Add("FUnqualifiedQty", HBadQty.ToString());//  ä¸åˆæ ¼æ•°é‡
        //            FentityModel.Add("FInspectResult", HCheckResult.ToString());//  æ£€éªŒç»“æžœ
        //            FentityModel.Add("FQCStatus", "1");//  è´¨æ£€çŠ¶æ€
        //            FentityModel.Add("FIsRelated", false);//  ä¸è‰¯å“å…³è”标志
        //            FentityModel.Add("FSrcBillType0", "PUR_ReceiveBill");//  æºå•类型
        //            FentityModel.Add("FBaseUnitId", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//基本单位
        //            FentityModel.Add("FBaseInspectQty", HCheckQty.ToString());//基本单位检验数量
        //            FentityModel.Add("FSupplierId", new JObject() { ["Fnumber"] = HSupNumber.ToString() }); //  ä¾›åº”商
        //            //FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = HWHNumber.ToString() }); // ä»“库
        //            FentityModel.Add("FInspectTimes","1"); // æ£€éªŒæ¬¡æ•°
        //            FentityModel.Add("FTimeUnit","24");//时间单位
        //            FentityModel.Add("FSAMPLEDAMAGEBEARER","2");//样本破坏承担方
        //            FentityModel.Add("FISFIRSTINSPECT", false);//首检
        //            FentityModel.Add("FBaseQualifiedQty", HRightQty.ToString());//基本单位合格数
        //        FentityModel.Add("FBaseAcceptQty", HRightQty.ToString());//基本单位接收数
        //        FentityModel.Add("FCurrency", new JObject() { ["Fnumber"] = "PRE001" });//币别
        //            FentityModel.Add("FIsSplitRow ", false);// æ˜¯å¦æ‹†åˆ†è¡Œ
        //            JArray Fentity2 = new JArray();
        //            JObject FentityModel2 = new JObject();
        //            FentityModel2.Add("FPolicyMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });//  ç‰©æ–™å†…码
        //            FentityModel2.Add("FPolicyStatus", "1");  //状态
        //            FentityModel2.Add("FPolicyQty", HRightQty.ToString());    //数量
        //            FentityModel2.Add("FBasePolicyQty", HRightQty.ToString()); //基本单位数量
        //            FentityModel2.Add("FUsePolicy", HUseResult.ToString());   //使用决策
        //            FentityModel2.Add("FIsCheck", false);   //是否抽检
        //            FentityModel2.Add("FIsDefectProcess", false);  //不良处理
        //            FentityModel2.Add("FCanSale", false);   //可销售
        //            FentityModel2.Add("FIsMRBReview", false);   //MRP评审
        //            FentityModel2.Add("FIsReturn", true);   //判退
        //            FentityModel2.Add("FIsRelatedDefect", false);   //不良品关联标志
        //            Fentity2.Add(FentityModel2);
        //            FentityModel.Add("FPolicyDetail", Fentity2);
        //        JArray Fentity3 = new JArray();
        //        JObject FentityModel3 = new JObject();
        //        FentityModel3.Add("FDetailID", "0");//
        //        FentityModel3.Add("FSrcBillType", "PUR_ReceiveBill");   //源单类型
        //        FentityModel3.Add("FSrcBillNo", HSLBillNo.ToString());    //收料通知单单号
        //        FentityModel3.Add("FSrcInterId", HSLInterID.ToString());      //收料通知单主ID
        //        FentityModel3.Add("FSrcEntryId",HSLEntryID.ToString());    //收料通知单子ID
        //        FentityModel3.Add("FSrcEntrySeq", HSLSeQ.ToString());    //源单行号
        //        FentityModel3.Add("FOrderType", new JObject() { ["FID"] = "PUR_PurchaseOrder" });  //  è®¢å•类型
        //        FentityModel3.Add("FOrderBillNo", HSourceBillNo.ToString());   //订单单号
        //        FentityModel3.Add("FOrderId", HSourceInterID.ToString());      //订单主ID
        //        FentityModel3.Add("FOrderEntryId", HSourceEntryID.ToString());  //订单子ID
        //        FentityModel3.Add("FOrderEntrySeq", HSeQ.ToString());  //订单行号
        //        Fentity3.Add(FentityModel3);
        //        FentityModel.Add("FReferDetail", Fentity3);
        //        JArray Fentity4 = new JArray();
        //        JObject FentityModel4 = new JObject();
        //        FentityModel4.Add("FEntity_Link_FRuleId", "QM_PURReceive2Inspect");   //单据转换规则
        //        FentityModel4.Add("FEntity_Link_FSTableName", "T_PUR_RECEIVEENTRY");    //收料通知单子表
        //        FentityModel4.Add("FEntity_Link_FSBillId", HSLInterID.ToString());      //收料通知单主内码
        //        FentityModel4.Add("FEntity_Link_FSId", HSLEntryID.ToString());    //收料通知单子内码
        //        FentityModel4.Add("FEntity_Link_FBaseAcceptQty", HRightQty.ToString());    //
        //        FentityModel4.Add("FEntity_Link_FBaseAcceptQtyOld", HRightQty.ToString());    //
        //        FentityModel4.Add("FEntity_Link_FBaseInspectQtyOld", HRightQty.ToString());    //
        //        FentityModel4.Add("FEntity_Link_FInspectQtyOld", HRightQty.ToString());    //
        //        Fentity4.Add(FentityModel4);
        //        FentityModel.Add("FEntity_Link", Fentity4);
        //        Fentity.Add(FentityModel);
        //        model.Add("FEntity", Fentity); //明细信息
        //        JObject jsonRoot = new JObject()
        //        {
        //            ["Creator"] = "",
        //            ["NeedUpDateFields"] = new JArray(),
        //            ["NeedReturnFields"] = new JArray(),
        //            ["IsDeleteEntry"] = "false",
        //            ["SubSystemId"] = "",
        //            ["IsVerifyBaseDataField"] = "false",
        //            //["IsAutoSubmitAndAudit"] = true,//自动调用提交和审核功能
        //            ["Model"] = model
        //        };
        //        string result = InvokeHelper.Save("QM_InspectBill", JsonConvert.SerializeObject(jsonRoot));//保存
        //        //判断保存是否成功
        //        if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
        //        {
        //            LogService.Write("来料检验单保存错误jsonRoot:" + jsonRoot);
        //            oCN.RollBack();
        //            objJsonResult.code = "0";
        //            objJsonResult.count = 0;
        //            objJsonResult.Message = $"来料检验单同步金蝶云失败!单号:{HBillNo.ToString()}" + jsonRoot;
        //            objJsonResult.data = null;
        //            return objJsonResult;
        //        }
        //        //提交审核
        //        string result1 = string.Empty;
        //        string result2 = string.Empty;
        //        var fID = JObject.Parse(result)["Result"]["Id"].ToString();
        //        var fBillNo = JObject.Parse(result)["Result"]["Number"].ToString();
        //        var json = new
        //        {
        //            Ids = fID,
        //        };
        //        K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
        //        result1 = InvokeHelper.Submit("QM_InspectBill", JsonConvert.SerializeObject(json));//提交
        //        result2 = InvokeHelper.Audit("QM_InspectBill", JsonConvert.SerializeObject(json));//提交
        //        if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
        //        {
        //            oCN.RollBack();
        //            objJsonResult.code = "0";
        //            objJsonResult.count = 0;
        //            objJsonResult.Message = $"来料检验单号:{fBillNo},提交失败" + result;
        //            objJsonResult.data = null;
        //            return objJsonResult;
        //        }
        //        else
        //        {
        //            string jsonStr = "{" +
        //               " \"FileName\":\"" + HFileName + "\"," +
        //                   " \"FormId\":\"QM_InspectBill\"," +
        //                   " \"IsLast\":\"true\"," +
        //                   " \"InterId\":\"" + HInterID + "\"," +
        //                   " \"BillNO\":\"" + HBillNo + "\"," +
        //                   " \"AliasFileName\":\"test\"," +
        //                   " \"SendByte\":\"" + a + "\"," +
        //               "}";
        //            var ret = client.AttachmentUpload(jsonStr);
        //        }
        //        oCN.Commit();
        //        objJsonResult.code = "0";
        //        objJsonResult.count = 1;
        //        objJsonResult.Message = "保存成功!";
        //        objJsonResult.data = 1;
        //        return objJsonResult;
        //    }
        //    catch (Exception e)
        //    {
        //        oCN.RollBack();
        //        objJsonResult.code = "0";
        //        objJsonResult.count = 0;
        //        objJsonResult.Message = "Exception!" + e.ToString();
        //        objJsonResult.data = null;
        //        return objJsonResult;
        //    }
        //}
        //#endregion
        /// <summary>
        /// ç”Ÿæˆé‡‘蝶云来料检验单
        /// </summary>
@@ -1135,240 +1407,39 @@
        /// <returns></returns>
        [Route("QCStockInCheckBill/set_SaveQCStockInCheckBill_Json")]
        [HttpGet]
        public object set_SaveQCStockInCheckBill_Json(string HZJOrgNumber, string HMaterNumber, string HUnitNumber,
        public object set_SaveQCStockInCheckBill_Json(string HZJOrgNumber, string HMaterNumber, string HUnitNumber,
            double HCheckQty, double HRightQty, double HBadQty,
            string HCheckResult, string HSupNumber, string HWHNumber,
            string HUseResult, Int64 HSeQ, Int64 HSourceInterID,
            string HCheckResult, string HSupNumber,
            string HUseResult, Int64 HSeQ, Int64 HSourceInterID,
            Int64 HSourceEntryID, string HSourceBillNo, string user,
            Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID,
            Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID,
            Int64 HMaterID, string HSourceBillType, Int64 HSLInterID,
            Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID)
            Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID,ref string sErrMsg)
        {
            try
            WebS2.WebService1 oWebs1 = new WebS2.WebService1();
            //oWebs1.Url = "http://localhost:9099/WebService1.asmx";
            //K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
            if (oWebs1.set_SaveQcStockInCheckBill_New(HZJOrgNumber, HMaterNumber, HUnitNumber, HCheckQty, HRightQty, HBadQty
                , HCheckResult, HSupNumber, HUseResult, HSeQ, HSourceInterID
                , HSourceEntryID, HSourceBillNo, user, HWHID, HSPID
                , HSupID, HKeeperID, HMaterID, HSourceBillType, HSLInterID
                , HSLEntryID, HSLBillNo, HSLSeQ, HBillNo, HInterID
                , ref sErrMsg))
            {
                //获取生产汇报单最大InterID和单据号
                //Int64 HInterID = DBUtility.ClsPub.CreateBillID("7503", ref DBUtility.ClsPub.sExeReturnInfo);
                //string HBillNo = DBUtility.ClsPub.CreateBillCode("7503", ref DBUtility.ClsPub.sExeReturnInfo, true);
                DataSet ds1 = oCN.RunProcReturn("select   * from MES_AccessoriesList  where  HSourceBillNo = '" + HBillNo + "'", "MES_AccessoriesList");
                string HFileName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFileName"]);
                string HFilePath = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HFilePath"]);
                string path = HFilePath;
                FileInfo fi = new FileInfo(path);
                long len = fi.Length;
                byte[] buffer = new byte[len];
                FileStream fs = new FileStream(path, FileMode.Open);
                fs.Read(buffer, 0, (int)len);
                //文件IO流
                string a = Convert.ToBase64String(buffer);
                //保存
                oCN.BeginTran();
                //生产汇报单主表
                oCN.RunProc("Insert Into QC_POStockInCheckBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HBillStatus,HChecker,HCheckDate" +
                ",HYear,HPeriod,HRemark,HSupID,HMaterID" +
                ",HInstockQty,HCheckQty,HRightQty,HBadQty,HFirstCheckEmp" +
                ",HCheckerResult,HSteelStoveNo,HSteelCompReport,HAspect,HSize" +
                ") " +
                " values('7503','7503'," + HInterID.ToString() + ",'" + HBillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" +
                ",DATENAME(YEAR,GETDATE()),0,''," + HSupID.ToString() + "," + HMaterID.ToString() +
                ",'" + HCheckQty.ToString() + "','" + HCheckQty.ToString() + "','" + HRightQty.ToString() + "','" + HBadQty.ToString() + "','" + HKeeperID.ToString() + "'" +
                ",'" + HCheckResult.ToString() + "','', '','',''" +
                ") ");
                //生产汇报单子表
                oCN.RunProc("Insert into QC_POStockInCheckBillSub " +
                      " (HInterID,HEntryID,HCloseMan,HCloseType" +
                      ",HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                      ",HRelationQty,HRelationMoney,HQCCheckClassID,HQCCheckItemID,HQCStd," +
                      "HResult,HQCRelValue,HProcCheckEmp,HProcCheckTime" +
                      ") values("
                      + HInterID.ToString() + ",1,'',''" +
                      ",''," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo.ToString() + "','" + HSourceBillType.ToString() + "'" +
                      ",0,0,0,0,''" +
                      ",'" + HCheckResult.ToString() + "','" + HCheckResult.ToString() + "','" + HKeeperID.ToString() + "',getdate()" +
                      ") ");
                //同步金蝶
                //访问金蝶
                var loginRet = InvokeHelper.Login();
                var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
                if (isSuccess == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "操作失败,金蝶账号登录异常。" + loginRet;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                JObject model = new JObject();
                model.Add("FBillTypeID", new JObject() { ["Fnumber"] = "JYD001_SYS" }); //单据类型 æ¥æ–™æ£€éªŒå•JYD001_SYS
                model.Add("FBusinessType", "1"); //业务类型
                model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //单据日期
                model.Add("FSourceOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //来源组织
                model.Add("FInspectOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //质检组织
                model.Add("FISSYNCED", "false");//  æ˜¯å¦å·²åŒæ­¥
                model.Add("F_PGKJ_Date", DateTime.Now.ToString("yyyy-MM-dd"));//  æŠ¥æ£€æ—¥æœŸ
                model.Add("FBillNo", HBillNo);
                JArray Fentity = new JArray();
                    JObject FentityModel = new JObject();
                    FentityModel.Add("FMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });//  ç‰©æ–™å†…码
                    FentityModel.Add("FUnitID", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//计量单位内码
                    FentityModel.Add("FInspectQty", HCheckQty.ToString());//  æ£€éªŒæ•°é‡
                    FentityModel.Add("FQualifiedQty", HRightQty.ToString());//  åˆæ ¼æ•°é‡
                    FentityModel.Add("FUnqualifiedQty", HBadQty.ToString());//  ä¸åˆæ ¼æ•°é‡
                    FentityModel.Add("FInspectResult", HCheckResult.ToString());//  æ£€éªŒç»“æžœ
                    FentityModel.Add("FQCStatus", "1");//  è´¨æ£€çŠ¶æ€
                    FentityModel.Add("FIsRelated", false);//  ä¸è‰¯å“å…³è”标志
                    FentityModel.Add("FSrcBillType0", "PUR_ReceiveBill");//  æºå•类型
                    FentityModel.Add("FBaseUnitId", new JObject() { ["Fnumber"] = HUnitNumber.ToString() });//基本单位
                    FentityModel.Add("FBaseInspectQty", HCheckQty.ToString());//基本单位检验数量
                    FentityModel.Add("FSupplierId", new JObject() { ["Fnumber"] = HSupNumber.ToString() }); //  ä¾›åº”商
                    //FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = HWHNumber.ToString() }); // ä»“库
                    FentityModel.Add("FInspectTimes","1"); // æ£€éªŒæ¬¡æ•°
                    FentityModel.Add("FTimeUnit","24");//时间单位
                    FentityModel.Add("FSAMPLEDAMAGEBEARER","2");//样本破坏承担方
                    FentityModel.Add("FISFIRSTINSPECT", false);//首检
                    FentityModel.Add("FBaseQualifiedQty", HRightQty.ToString());//基本单位合格数
                FentityModel.Add("FBaseAcceptQty", HRightQty.ToString());//基本单位接收数
                FentityModel.Add("FCurrency", new JObject() { ["Fnumber"] = "PRE001" });//币别
                    FentityModel.Add("FIsSplitRow ", false);// æ˜¯å¦æ‹†åˆ†è¡Œ
                    JArray Fentity2 = new JArray();
                    JObject FentityModel2 = new JObject();
                    FentityModel2.Add("FPolicyMaterialId", new JObject() { ["Fnumber"] = HMaterNumber.ToString() });//  ç‰©æ–™å†…码
                    FentityModel2.Add("FPolicyStatus", "1");  //状态
                    FentityModel2.Add("FPolicyQty", HRightQty.ToString());    //数量
                    FentityModel2.Add("FBasePolicyQty", HRightQty.ToString()); //基本单位数量
                    FentityModel2.Add("FUsePolicy", HUseResult.ToString());   //使用决策
                    FentityModel2.Add("FIsCheck", false);   //是否抽检
                    FentityModel2.Add("FIsDefectProcess", false);  //不良处理
                    FentityModel2.Add("FCanSale", false);   //可销售
                    FentityModel2.Add("FIsMRBReview", false);   //MRP评审
                    FentityModel2.Add("FIsReturn", true);   //判退
                    FentityModel2.Add("FIsRelatedDefect", false);   //不良品关联标志
                    Fentity2.Add(FentityModel2);
                    FentityModel.Add("FPolicyDetail", Fentity2);
                JArray Fentity3 = new JArray();
                JObject FentityModel3 = new JObject();
                FentityModel3.Add("FDetailID", "0");//
                FentityModel3.Add("FSrcBillType", "PUR_ReceiveBill");   //源单类型
                FentityModel3.Add("FSrcBillNo", HSLBillNo.ToString());    //收料通知单单号
                FentityModel3.Add("FSrcInterId", HSLInterID.ToString());      //收料通知单主ID
                FentityModel3.Add("FSrcEntryId",HSLEntryID.ToString());    //收料通知单子ID
                FentityModel3.Add("FSrcEntrySeq", HSLSeQ.ToString());    //源单行号
                FentityModel3.Add("FOrderType", new JObject() { ["FID"] = "PUR_PurchaseOrder" });  //  è®¢å•类型
                FentityModel3.Add("FOrderBillNo", HSourceBillNo.ToString());   //订单单号
                FentityModel3.Add("FOrderId", HSourceInterID.ToString());      //订单主ID
                FentityModel3.Add("FOrderEntryId", HSourceEntryID.ToString());  //订单子ID
                FentityModel3.Add("FOrderEntrySeq", HSeQ.ToString());  //订单行号
                Fentity3.Add(FentityModel3);
                FentityModel.Add("FReferDetail", Fentity3);
                JArray Fentity4 = new JArray();
                JObject FentityModel4 = new JObject();
                FentityModel4.Add("FEntity_Link_FRuleId", "QM_PURReceive2Inspect");   //单据转换规则
                FentityModel4.Add("FEntity_Link_FSTableName", "T_PUR_RECEIVEENTRY");    //收料通知单子表
                FentityModel4.Add("FEntity_Link_FSBillId", HSLInterID.ToString());      //收料通知单主内码
                FentityModel4.Add("FEntity_Link_FSId", HSLEntryID.ToString());    //收料通知单子内码
                FentityModel4.Add("FEntity_Link_FBaseAcceptQty", HRightQty.ToString());    //
                FentityModel4.Add("FEntity_Link_FBaseAcceptQtyOld", HRightQty.ToString());    //
                FentityModel4.Add("FEntity_Link_FBaseInspectQtyOld", HRightQty.ToString());    //
                FentityModel4.Add("FEntity_Link_FInspectQtyOld", HRightQty.ToString());    //
                Fentity4.Add(FentityModel4);
                FentityModel.Add("FEntity_Link", Fentity4);
                Fentity.Add(FentityModel);
                model.Add("FEntity", Fentity); //明细信息
                JObject jsonRoot = new JObject()
                {
                    ["Creator"] = "",
                    ["NeedUpDateFields"] = new JArray(),
                    ["NeedReturnFields"] = new JArray(),
                    ["IsDeleteEntry"] = "false",
                    ["SubSystemId"] = "",
                    ["IsVerifyBaseDataField"] = "false",
                    //["IsAutoSubmitAndAudit"] = true,//自动调用提交和审核功能
                    ["Model"] = model
                };
                string result = InvokeHelper.Save("QM_InspectBill", JsonConvert.SerializeObject(jsonRoot));//保存
                //判断保存是否成功
                if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
                {
                    LogService.Write("来料检验单保存错误jsonRoot:" + jsonRoot);
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = $"来料检验单同步金蝶云失败!单号:{HBillNo.ToString()}" + jsonRoot;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //提交审核
                string result1 = string.Empty;
                string result2 = string.Empty;
                var fID = JObject.Parse(result)["Result"]["Id"].ToString();
                var fBillNo = JObject.Parse(result)["Result"]["Number"].ToString();
                var json = new
                {
                    Ids = fID,
                };
                K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/");
                result1 = InvokeHelper.Submit("QM_InspectBill", JsonConvert.SerializeObject(json));//提交
                result2 = InvokeHelper.Audit("QM_InspectBill", JsonConvert.SerializeObject(json));//提交
                if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
                {
                    string jsonStr = "{" +
                        " \"FileName\":\"" + HFileName + "\"," +
                            " \"FormId\":\"QM_InspectBill\"," +
                            " \"IsLast\":\"true\"," +
                            " \"InterId\":\"" + HInterID + "\"," +
                            " \"BillNO\":\"" + HBillNo + "\"," +
                            " \"AliasFileName\":\"test\"," +
                            " \"SendByte\":\"" + a + "\"," +
                        "}";
                    var ret = client.AttachmentUpload(jsonStr);
                    oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = $"来料检验单号:{fBillNo},提交失败" + result;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.Commit();
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "保存成功!";
                objJsonResult.data = 1;
                objJsonResult.Message = "生成单据成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            else
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                objJsonResult.Message = "生成单据失败!";
                objJsonResult.data = sErrMsg;
                return objJsonResult;
            }
        }
WebAPI/Controllers/SellOutController.cs
@@ -377,7 +377,7 @@
        //销售出库/扫条码/直接调webservice
        [Route("SellOut/get_CheckTypeByBarCode_Json")]
        [HttpGet]
        public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID,string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID,string HScanStyle)
        public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID, string HScanStyle)
        {
            //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
            string sExpressNumber = "";
@@ -399,6 +399,33 @@
                return objJsonResult;
            }
        }
        //public object get_CheckTypeByBarCode_Json(string sCode, long sInterID, string HBillType, string sBillNo, string sMaker, long WhID, long SPID, double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, long HOWNERID)
        //{
        //    string hexpressNumber = "";
        //    this.WebSoBar = this.oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, hexpressNumber, ref ClsPub.sErrInfo);
        //    bool flag = this.WebSoBar == null;
        //    object result;
        //    if (flag)
        //    {
        //        this.objJsonResult.code = "0";
        //        this.objJsonResult.count = 0;
        //        this.objJsonResult.Message = ClsPub.sErrInfo;
        //        this.objJsonResult.data = null;
        //        result = this.objJsonResult;
        //    }
        //    else
        //    {
        //        this.objJsonResult.code = "0";
        //        this.objJsonResult.count = 1;
        //        this.objJsonResult.Message = ClsPub.sErrInfo;
        //        this.objJsonResult.data = this.oBar;
        //        result = this.objJsonResult;
        //    }
        //    return result;
        //}
        /// <summary>
        /// è¿”回出入库条码临时表     
        /// </summary>
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_MaterTypeBillController.cs
New file
@@ -0,0 +1,360 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.基础资料.基础资料
{
    public class Gy_MaterTypeBillController : ApiController
    {
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        #region ç‰©æ–™åˆ†ç±»åˆ—表
        [Route("Gy_MaterType/Gy_MaterTypeList")]
        [HttpGet]
        public object Gy_MaterTypeList(string sWhere, string user, string Organization)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterType_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql1 = string.Format(@"select * from h_v_IF_MaterType where ä½¿ç”¨ç»„织='" + Organization + "'");
                ds = oCN.RunProcReturn(sql1 + sWhere + " order by HItemID ", "h_v_IF_MaterType");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.list = columnNameList;
                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_MaterType/SaveGy_MaterType")]
        [HttpPost]
        public object SaveGy_MaterType([FromBody] JObject msg)
        {
            DataSet ds;
            var _value = msg["msg"].ToString();
            string msg3 = _value.ToString();
            string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg1 = sArray[0].ToString();//数据
            string msg2 = sArray[1].ToString();//用户
            string msg_HUSEORGID = sArray[2].ToString();//组织
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            //编辑权限
            if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterType_Edit", 1, false, msg2))
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无保存权限!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            try
            {
                DAL.ClsGy_MaterType_Ctl oBill = new DAL.ClsGy_MaterType_Ctl();
                List<Model.ClsGy_MaterType_Model> lsmain = new List<Model.ClsGy_MaterType_Model>();
                msg1 = msg1.Replace("\\", "");
                msg1 = msg1.Replace("\n", "");  //\n
                msg1 = "[" + msg1 + "]";
                lsmain = JsonConvert.DeserializeObject<List<Model.ClsGy_MaterType_Model>>(msg1);
                foreach (Model.ClsGy_MaterType_Model oItem in lsmain)
                {
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!代码不能为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    if (oItem.HName.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!名称不能为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim()))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    //查询数据中是否存在重复代码
                    ds = oCN.RunProcReturn("select * from  Gy_MaterType where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_MaterType");
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        if (oItem.HItemID == 0 || (ds.Tables[0].Rows[0]["HItemID"].ToString() != oItem.HItemID.ToString() && oItem.HItemID != 0))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "保存失败!代码重复!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    //得到短代码
                    string sShortNumber;
                    sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
                    if (sShortNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!短代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oItem.HCREATEORGID = Convert.ToInt32(msg_HUSEORGID); //组织id
                    oItem.HShortNumber = sShortNumber;//短代码
                    oItem.HMakeEmp = msg2;
                    oItem.HEndFlag = true;//末级标志
                    oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //等级
                    oBill.oModel = oItem;
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.oModel.HItemID == 0)
                {
                    bResult = oBill.AddNew();
                }
                else
                {
                    bResult = oBill.ModifyByID(oBill.oModel.HItemID);
                }
                if (bResult)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
        #region ç‰©æ–™åˆ†ç±»  åˆ é™¤
        [Route("Gy_MaterType/DeleteMaterType")]
        [HttpGet]
        public object DeleteMaterType(string HItemID, string user)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                //删除权限
                if (!DBUtility.ClsPub.Security_Log("Gy_MaterType_Drop", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无删除权限";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (string.IsNullOrWhiteSpace(HItemID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HItemID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from Gy_MaterType where HItemID=" + HItemID, "Gy_MaterType");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有数据,无法删除!";
                    objJsonResult.data = null;
                    return objJsonResult; ;
                }
                var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]);
                if (HStopflag)
                {
                    oCN.RollBack();//回滚事务
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "数据已禁用无法再次删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.RunProc("delete from Gy_MaterType where HItemID=" + HItemID);
                oCN.Commit();//提交事务
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "* æ•°æ®åˆ é™¤æˆåŠŸï¼";
                objJsonResult.data = null;
                return objJsonResult; ;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç‰©æ–™åˆ†ç±»å®¡æ ¸ã€åå®¡æ ¸
        /// <summary>
        ///
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Gy_MaterType/AuditGy_MaterType")]
        [HttpGet]
        public object AuditGy_MaterType(int HInterID, int IsAudit, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterType_Check", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_MaterType where HItemID=" + HInterID, "Gy_MaterType");
                if (ds.Tables[0].Rows.Count>0)
                {
                    if (IsAudit == 0)  //审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能再次审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未审核!不需要反审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                if (IsAudit == 0)  //审核判断
                {
                    oCN.RunProc("update Gy_MaterType set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "审核成功";
                    objJsonResult.data = null;
                }
                if (IsAudit == 1) //反审核判断
                {
                    oCN.RunProc("update Gy_MaterType set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反审核成功";
                    objJsonResult.data = null;
                }
                oCN.Commit();
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "审核失败或者反审核失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/»ù´¡×ÊÁÏ/¹¤×Ê»ù´¡×ÊÁÏ/Gy_ProcPriceController.cs
@@ -189,59 +189,23 @@
            try
            {
                List<object> columnNameList = new List<object>();
                //ds = oCN.RunProcReturn("select " +
                //    "a.HItemID,ltrim(a.HMaterID)+'-'+ltrim(a.HProcID) å·¥åºå·¥ä»·èµ„料代码,a.HDeptID,b.HName HDeptName" +
                //    ",a.HMaterID HMaterIDCol,c.HNumber HMaterNumberCol,c.HName HMaterNameCol,c.HModel HMaterModelCol" +
                //    ",a.HProcID HProcIDCol,d.HNumber HProcNumberCol,d.HName HProcNameCol" +
                //    ",a.HSourceID HSourceIDCol,e.HNumber HSourceNumberCol,e.HName HSourceNameCol" +
                //    ",a.HPrice HPriceCol,a.HBeginDate HBeginDateCol,a.HEndDate HEndDateCol" +
                //    ",case when a.HCostFlag<>0 then 'true'else 'false'end HCostFlagCol" +
                //    ",case when a.HFlowFlag<>0 then 'true'else 'false'end HFlowFlagCol" +
                //    ",case when a.HPayFlag<>0 then 'true'else 'false'end HPayFlagCol,a.HRemark HRemarkCol " +
                //    " from Gy_ProcPrice a " +
                //    " left join Gy_Department b on a.HDeptID = b.HItemID " +
                //    " left join Gy_Material c on a.HMaterID = c.HItemID " +
                //    " left join Gy_Process d on a.HProcID = d.HItemID " +
                //    " left join Gy_Source e on a.HSourceID = e.HItemID where a.HItemID = " + HItemID, "Gy_ProcPrice");
                ds = oCN.RunProcReturn("select " +
                   "a.HItemID,ltrim(a.HMaterID)+'-'+ltrim(a.HProcID) å·¥åºå·¥ä»·èµ„料代码,a.HDeptID,b.HName éƒ¨é—¨" +
                   ",a.HMaterID HMaterIDCol,c.HNumber ç‰©æ–™ä»£ç ,c.HName ç‰©æ–™åç§°,c.HModel è§„格型号" +
                   ",a.HProcID HProcIDCol,d.HNumber å·¥åºä»£ç ,d.HName å·¥åºåç§°" +
                   ",a.HSourceID HSourceIDCol,e.HNumber èµ„源代码,e.HName èµ„源名称" +
                   ",a.HPrice å•ä»·,a.HBeginDate å¼€å§‹æ—¥æœŸ,a.HEndDate ç»“束日期" +
                   ",case when a.HCostFlag<>0 then 'true'else 'false'end æˆæœ¬å¿…选" +
                   ",case when a.HFlowFlag<>0 then 'true'else 'false'end æµè½¬é»˜è®¤" +
                   ",case when a.HPayFlag<>0 then 'true'else 'false'end å·¥èµ„默认,a.HRemark å¤‡æ³¨ " +
                   " from Gy_ProcPrice a " +
                   " left join Gy_Department b on a.HDeptID = b.HItemID " +
                   " left join Gy_Material c on a.HMaterID = c.HItemID " +
                   " left join Gy_Process d on a.HProcID = d.HItemID " +
                   " left join Gy_Source e on a.HSourceID = e.HItemID where a.HItemID = " + HItemID, "Gy_ProcPrice");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无列表信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                ds = oCN.RunProcReturn("select * from h_v_Gy_ProcPriceList where HItemID = " + HItemID, "h_v_Gy_ProcPriceList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
@@ -253,5 +217,203 @@
            }
        }
        #endregion
        #region å·¥åºå·¥ä»· åˆ é™¤
        [Route("Gy_ProcPrice/DelProcPrice")]
        [HttpGet]
        public object DelProcPrice(int HInterID, string User)
        {
            try
            {
                //删除权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_ProcPriceList_Delete", 1, false, User))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DAL.ClsGy_ProcPrice_Ctl BillNew = new DAL.ClsGy_ProcPrice_Ctl();
                var sReturn = "";
                if (BillNew.ShowBill(HInterID, ref sReturn))
                {
                    foreach (Model.ClsGy_ProcPrice_Model oSub in BillNew.DetailColl)
                    {
                        if (oSub.HChecker.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "当前单据不能删除!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    bool flag = false;
                    oCN.BeginTran();//开启事务
                    flag= BillNew.DeleteByID(HInterID);
                    oCN.Commit();//结束事务
                    if (flag)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除成功!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "删除失败!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "当前单据不存在,无法删除!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();//回滚事务
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region [工序工价审核、反审核]
        /// <summary>
        ///
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Gy_ProcPrice/AuditGy_ProcPrice")]
        [HttpGet]
        public object AuditGy_ProcPrice(int HInterID, int IsAudit, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_ProcPriceList_Check", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DBUtility.ClsPub.CurUserName = CurUserName;
                DAL.ClsGy_ProcPrice_Ctl BillNew = new DAL.ClsGy_ProcPrice_Ctl();
                var sReturn = "";
                if (BillNew.ShowBill(HInterID, ref sReturn))
                {
                    foreach (Model.ClsGy_ProcPrice_Model oSub in BillNew.DetailColl)
                    {
                        if (IsAudit == 0)  //审核判断
                        {
                            if (oSub.HChecker.Trim() != "")
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "单据已审核!不能再次审核!";
                                objJsonResult.data = null;
                                return objJsonResult;
                            }
                        }
                        if (IsAudit == 1) //反审核判断
                        {
                            if (oSub.HChecker.Trim() == "")
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "单据未审核!不需要反审核!";
                                objJsonResult.data = null;
                                return objJsonResult;
                            }
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                foreach (Model.ClsGy_ProcPrice_Model oSub in BillNew.DetailColl)
                {
                    if (IsAudit == 0)  //审核判断
                    {
                        //审核提交
                        if (BillNew.CheckBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                        {
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核成功";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反审核判断
                    {
                        //反审核提交AbandonCheck
                        if (BillNew.AbandonCheck(HInterID, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                        {
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反审核成功";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "审核失败或者反审核失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/Éú²ú¹ÜÀí/Éú²úÈÎÎñµ¥/Sc_ICMOBillController.cs
@@ -143,6 +143,9 @@
                    return objJsonResult;
                }
                //修改字段 HSTOCKINORGID
                oCN.RunProc("update Sc_ICMOBillSub set HSTOCKINORGID=" + HPRDORGID + " where HInterID=" + HInterID);
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = null;
WebAPI/DLL/Newtonsoft.Json.rar
Binary files differ
WebAPI/DLL/Newtonsoft.Json/Newtonsoft.Json.dll
Binary files differ
WebAPI/ListModels.cs
@@ -1520,6 +1520,24 @@
            return list;
        }
        ///工序返工记录单 ä¸»è¡¨
        ///ClsSc_ProcExchRecordBackBillMain
        public List<Model.ClsSc_ProcExchRecordBackBillMain> getObjectByJson_ClsSc_ProcExchRecordBackBillMain(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsSc_ProcExchRecordBackBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_ProcExchRecordBackBillMain>>(jsonString);
            return list;
        }
        ///工序返工记录单 å­è¡¨
        ///ClsSc_ProcExchRecordBackBillSub
        public List<Model.ClsSc_ProcExchRecordBackBillSub> getObjectByJson_ClsSc_ProcExchRecordBackBillSub(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsSc_ProcExchRecordBackBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_ProcExchRecordBackBillSub>>(jsonString);
            return list;
        }
        ///工序派工单 ä¸»è¡¨
        ///ClsSc_ProcExchWorkBackBillMain
        public List<Model.ClsSc_ProcessSendWorkMain> getObjectByJson_ClsSc_ProcessSendWorkMain(string jsonString)
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -9,79 +9,79 @@
  </PropertyGroup>
  <ItemGroup>
    <File Include="apiapp.json">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="bin/Antlr3.Runtime.dll">
      <publishTime>02/22/2013 08:43:40</publishTime>
      <publishTime>02/22/2013 16:43:40</publishTime>
    </File>
    <File Include="bin/Antlr3.Runtime.pdb">
      <publishTime>02/22/2013 08:43:40</publishTime>
      <publishTime>02/22/2013 16:43:40</publishTime>
    </File>
    <File Include="bin/BLL.dll">
      <publishTime>11/09/2022 16:02:08</publishTime>
      <publishTime>11/02/2022 22:03:01</publishTime>
      <publishTime>01/10/2023 16:52:41</publishTime>
      <publishTime>03/03/2023 13:34:09</publishTime>
    </File>
    <File Include="bin/BLL.pdb">
      <publishTime>11/09/2022 16:02:08</publishTime>
      <publishTime>11/02/2022 22:03:01</publishTime>
      <publishTime>01/10/2023 16:52:41</publishTime>
      <publishTime>03/03/2023 13:34:09</publishTime>
    </File>
    <File Include="bin/BouncyCastle.Crypto.dll">
      <publishTime>12/17/2020 21:32:28</publishTime>
      <publishTime>12/18/2020 05:32:28</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>11/09/2022 16:02:06</publishTime>
      <publishTime>11/02/2022 22:02:58</publishTime>
      <publishTime>01/10/2023 16:52:37</publishTime>
      <publishTime>03/03/2023 13:34:07</publishTime>
    </File>
    <File Include="bin/DAL.pdb">
      <publishTime>11/09/2022 16:02:06</publishTime>
      <publishTime>11/02/2022 22:02:58</publishTime>
      <publishTime>01/10/2023 16:52:37</publishTime>
      <publishTime>03/03/2023 13:34:07</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 14:52:40</publishTime>
      <publishTime>07/22/2016 22:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>11/02/2022 22:02:56</publishTime>
      <publishTime>11/15/2022 13:55:23</publishTime>
      <publishTime>01/10/2023 16:52:27</publishTime>
      <publishTime>03/03/2023 13:34:05</publishTime>
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>11/09/2022 16:01:58</publishTime>
      <publishTime>11/02/2022 22:02:56</publishTime>
      <publishTime>01/10/2023 16:52:27</publishTime>
      <publishTime>03/03/2023 13:34:05</publishTime>
    </File>
    <File Include="bin/Grpc.Core.Api.dll">
      <publishTime>03/22/2022 05:17:26</publishTime>
      <publishTime>03/22/2022 13:17:26</publishTime>
    </File>
    <File Include="bin/Grpc.Core.Api.pdb">
      <publishTime>03/18/2022 23:39:42</publishTime>
      <publishTime>03/19/2022 07:39:42</publishTime>
    </File>
    <File Include="bin/Grpc.Core.dll">
      <publishTime>03/22/2022 05:17:20</publishTime>
      <publishTime>03/22/2022 13:17:20</publishTime>
    </File>
    <File Include="bin/Grpc.Core.pdb">
      <publishTime>03/18/2022 23:39:48</publishTime>
      <publishTime>03/19/2022 07:39:48</publishTime>
    </File>
    <File Include="bin/grpc_csharp_ext.x64.dll">
      <publishTime>03/22/2022 05:17:22</publishTime>
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="bin/grpc_csharp_ext.x86.dll">
      <publishTime>03/22/2022 05:17:22</publishTime>
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="bin/ICSharpCode.SharpZipLib.dll">
      <publishTime>05/08/2021 17:08:30</publishTime>
      <publishTime>05/09/2021 01:08:30</publishTime>
    </File>
    <File Include="bin/ICSharpCode.SharpZipLib.pdb">
      <publishTime>05/08/2021 17:08:30</publishTime>
      <publishTime>05/09/2021 01:08:30</publishTime>
    </File>
    <File Include="bin/Interop.gregn6Lib.dll">
      <publishTime>08/25/2021 10:28:25</publishTime>
    </File>
    <File Include="bin/Kingdee.BOS.WebApi.Client.dll">
      <publishTime>08/19/2021 09:43:58</publishTime>
      <publishTime>02/07/2023 09:16:49</publishTime>
    </File>
    <File Include="bin/Kingdee.BOS.WebApi.FormService.dll">
      <publishTime>09/20/2018 19:23:20</publishTime>
@@ -90,99 +90,99 @@
      <publishTime>09/20/2018 19:28:34</publishTime>
    </File>
    <File Include="bin/libgrpc_csharp_ext.x64.dylib">
      <publishTime>03/18/2022 23:38:44</publishTime>
      <publishTime>03/19/2022 07:38:44</publishTime>
    </File>
    <File Include="bin/libgrpc_csharp_ext.x64.so">
      <publishTime>03/18/2022 23:38:42</publishTime>
      <publishTime>03/19/2022 07:38:42</publishTime>
    </File>
    <File Include="bin/Microsoft.Azure.AppService.ApiApps.Service.dll">
      <publishTime>03/18/2015 17:02:50</publishTime>
      <publishTime>03/19/2015 01:02:50</publishTime>
    </File>
    <File Include="bin/Microsoft.CSharp.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/Microsoft.Web.Infrastructure.dll">
      <publishTime>07/25/2012 11:48:56</publishTime>
      <publishTime>07/25/2012 19:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>11/09/2022 16:02:01</publishTime>
      <publishTime>11/02/2022 22:02:56</publishTime>
      <publishTime>01/10/2023 16:52:28</publishTime>
      <publishTime>03/03/2023 13:34:06</publishTime>
    </File>
    <File Include="bin/Model.pdb">
      <publishTime>11/09/2022 16:02:01</publishTime>
      <publishTime>11/02/2022 22:02:56</publishTime>
      <publishTime>01/10/2023 16:52:28</publishTime>
      <publishTime>03/03/2023 13:34:06</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="bin/Newtonsoft.Json.dll">
      <publishTime>08/03/2014 20:33:56</publishTime>
      <publishTime>08/04/2014 04:33:56</publishTime>
    </File>
    <File Include="bin/NPOI.dll">
      <publishTime>10/23/2021 01:07:54</publishTime>
      <publishTime>10/23/2021 09:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.OOXML.dll">
      <publishTime>10/23/2021 01:07:56</publishTime>
    </File>
    <File Include="bin/NPOI.OOXML.pdb">
      <publishTime>10/23/2021 09:07:56</publishTime>
    </File>
    <File Include="bin/NPOI.OOXML.pdb">
      <publishTime>10/23/2021 17:07:56</publishTime>
    </File>
    <File Include="bin/NPOI.OpenXml4Net.dll">
      <publishTime>10/23/2021 01:07:54</publishTime>
      <publishTime>10/23/2021 09:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.OpenXml4Net.pdb">
      <publishTime>10/23/2021 09:07:54</publishTime>
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.OpenXmlFormats.dll">
      <publishTime>10/23/2021 01:07:54</publishTime>
      <publishTime>10/23/2021 09:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.OpenXmlFormats.pdb">
      <publishTime>10/23/2021 09:07:54</publishTime>
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/NPOI.pdb">
      <publishTime>10/23/2021 09:07:54</publishTime>
      <publishTime>10/23/2021 17:07:54</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>11/09/2022 16:01:56</publishTime>
      <publishTime>11/02/2022 22:02:54</publishTime>
      <publishTime>01/10/2023 16:52:16</publishTime>
      <publishTime>03/03/2023 13:34:04</publishTime>
    </File>
    <File Include="bin/Pub_Class.pdb">
      <publishTime>11/09/2022 16:01:56</publishTime>
      <publishTime>11/02/2022 22:02:54</publishTime>
      <publishTime>01/10/2023 16:52:16</publishTime>
      <publishTime>03/03/2023 13:34:04</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>11/09/2022 16:01:57</publishTime>
      <publishTime>11/02/2022 22:02:55</publishTime>
      <publishTime>01/10/2023 16:52:17</publishTime>
      <publishTime>03/03/2023 13:34:04</publishTime>
    </File>
    <File Include="bin/Pub_Control.pdb">
      <publishTime>11/09/2022 16:01:57</publishTime>
      <publishTime>11/02/2022 22:02:55</publishTime>
      <publishTime>01/10/2023 16:52:17</publishTime>
      <publishTime>03/03/2023 13:34:04</publishTime>
    </File>
    <File Include="bin/RestSharp.dll">
      <publishTime>08/30/2012 22:22:50</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>01/10/2023 16:52:26</publishTime>
      <publishTime>03/03/2023 13:34:04</publishTime>
    </File>
    <File Include="bin/SQLHelper.pdb">
      <publishTime>11/09/2022 16:01:57</publishTime>
      <publishTime>11/02/2022 22:02:55</publishTime>
      <publishTime>01/10/2023 16:52:26</publishTime>
      <publishTime>03/03/2023 13:34:04</publishTime>
    </File>
    <File Include="bin/stdole.dll">
      <publishTime>05/09/2021 13:35:37</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/15/2015 17:57:08</publishTime>
      <publishTime>02/16/2015 01:57:08</publishTime>
    </File>
    <File Include="bin/System.Buffers.dll">
      <publishTime>07/19/2017 10:01:28</publishTime>
      <publishTime>07/19/2017 18:01:28</publishTime>
    </File>
    <File Include="bin/System.ComponentModel.DataAnnotations.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
@@ -206,19 +206,19 @@
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.IdentityModel.Tokens.Jwt.dll">
      <publishTime>08/19/2014 10:03:34</publishTime>
      <publishTime>08/19/2014 18:03:34</publishTime>
    </File>
    <File Include="bin/System.Memory.dll">
      <publishTime>04/17/2019 16:24:34</publishTime>
      <publishTime>04/18/2019 00:24:34</publishTime>
    </File>
    <File Include="bin/System.Net.Http.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Net.Http.Formatting.dll">
      <publishTime>11/28/2018 13:00:36</publishTime>
      <publishTime>11/28/2018 21:00:36</publishTime>
    </File>
    <File Include="bin/System.Runtime.CompilerServices.Unsafe.dll">
      <publishTime>09/18/2018 19:38:10</publishTime>
      <publishTime>09/19/2018 03:38:10</publishTime>
    </File>
    <File Include="bin/System.Runtime.Serialization.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
@@ -227,7 +227,7 @@
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.Cors.dll">
      <publishTime>11/28/2018 12:58:44</publishTime>
      <publishTime>11/28/2018 20:58:44</publishTime>
    </File>
    <File Include="bin/System.Web.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
@@ -242,37 +242,37 @@
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.Helpers.dll">
      <publishTime>01/28/2015 04:04:30</publishTime>
      <publishTime>01/28/2015 12:04:30</publishTime>
    </File>
    <File Include="bin/System.Web.Http.Cors.dll">
      <publishTime>11/28/2018 13:01:26</publishTime>
      <publishTime>11/28/2018 21:01:26</publishTime>
    </File>
    <File Include="bin/System.Web.Http.dll">
      <publishTime>11/28/2018 13:01:00</publishTime>
      <publishTime>11/28/2018 21:01:00</publishTime>
    </File>
    <File Include="bin/System.Web.Http.WebHost.dll">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="bin/System.Web.Mvc.dll">
      <publishTime>01/28/2015 04:02:18</publishTime>
      <publishTime>01/28/2015 12:02:18</publishTime>
    </File>
    <File Include="bin/System.Web.Optimization.dll">
      <publishTime>02/11/2014 15:26:04</publishTime>
      <publishTime>02/11/2014 23:26:04</publishTime>
    </File>
    <File Include="bin/System.Web.Razor.dll">
      <publishTime>01/28/2015 04:02:32</publishTime>
      <publishTime>01/28/2015 12:02:32</publishTime>
    </File>
    <File Include="bin/System.Web.Services.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/System.Web.WebPages.Deployment.dll">
      <publishTime>01/28/2015 04:04:30</publishTime>
      <publishTime>01/28/2015 12:04:30</publishTime>
    </File>
    <File Include="bin/System.Web.WebPages.dll">
      <publishTime>01/28/2015 04:04:30</publishTime>
      <publishTime>01/28/2015 12:04:30</publishTime>
    </File>
    <File Include="bin/System.Web.WebPages.Razor.dll">
      <publishTime>01/28/2015 04:04:30</publishTime>
      <publishTime>01/28/2015 12:04:30</publishTime>
    </File>
    <File Include="bin/System.Xml.dll">
      <publishTime>09/26/2012 03:16:08</publishTime>
@@ -281,12 +281,12 @@
      <publishTime>09/26/2012 03:16:08</publishTime>
    </File>
    <File Include="bin/WebActivatorEx.dll">
      <publishTime>11/24/2014 11:18:48</publishTime>
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>11/14/2022 11:23:59</publishTime>
      <publishTime>11/02/2022 22:03:04</publishTime>
      <publishTime>01/10/2023 16:53:00</publishTime>
      <publishTime>03/03/2023 13:34:12</publishTime>
    </File>
    <File Include="bin/WebAPI.dll.config">
      <publishTime>12/15/2021 17:59:43</publishTime>
@@ -294,196 +294,196 @@
    <File Include="bin/WebAPI.pdb">
      <publishTime>11/14/2022 11:23:59</publishTime>
      <publishTime>11/02/2022 22:03:04</publishTime>
      <publishTime>01/10/2023 16:53:00</publishTime>
      <publishTime>03/03/2023 13:34:12</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/17/2013 17:03:52</publishTime>
      <publishTime>07/18/2013 01:03:52</publishTime>
    </File>
    <File Include="bin/zh-Hans/System.Net.Http.Formatting.resources.dll">
      <publishTime>11/29/2018 13:26:02</publishTime>
      <publishTime>11/29/2018 21:26:02</publishTime>
    </File>
    <File Include="bin/zh-Hans/System.Web.Http.resources.dll">
      <publishTime>11/29/2018 13:26:30</publishTime>
      <publishTime>11/29/2018 21:26:30</publishTime>
    </File>
    <File Include="Config/kdapi.config">
      <publishTime>08/19/2022 08:17:39</publishTime>
      <publishTime>08/16/2022 22:31:46</publishTime>
    </File>
    <File Include="Content/bootstrap.css">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Content/bootstrap.min.css">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Content/Site.css">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="DLL/BLL.dll">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="DLL/DAL.dll">
      <publishTime>11/01/2021 09:26:33</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="DLL/DBUtility.dll">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="DLL/Kingdee.BOS.WebApi.Client.dll">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>02/07/2023 09:16:49</publishTime>
    </File>
    <File Include="DLL/Model.dll">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="DLL/Newtonsoft.Json.Net35.dll">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="DLL/Pub_Class.dll">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="DLL/Pub_Control.dll">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="DLL/SQLHelper.dll">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.eot">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.svg">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.ttf">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.woff">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Global.asax">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="grpc_csharp_ext.x64.dll">
      <publishTime>03/22/2022 05:17:22</publishTime>
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="grpc_csharp_ext.x86.dll">
      <publishTime>03/22/2022 05:17:22</publishTime>
      <publishTime>03/22/2022 13:17:22</publishTime>
    </File>
    <File Include="Index.html">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="libgrpc_csharp_ext.x64.dylib">
      <publishTime>03/18/2022 23:38:44</publishTime>
      <publishTime>03/19/2022 07:38:44</publishTime>
    </File>
    <File Include="libgrpc_csharp_ext.x64.so">
      <publishTime>03/18/2022 23:38:42</publishTime>
      <publishTime>03/19/2022 07:38:42</publishTime>
    </File>
    <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="packages.config">
      <publishTime>11/29/2022 10:36:46</publishTime>
      <publishTime>11/29/2022 08:58:24</publishTime>
    </File>
    <File Include="Views/Scripts/bootstrap.js">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/Scripts/bootstrap.min.js">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.js">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.min.js">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.min.map">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.js">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.min.js">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.unobtrusive.js">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/Scripts/modernizr-2.6.2.js">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/Shared/Error.cshtml">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/Shared/_Layout.cshtml">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/web.config">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Views/_ViewStart.cshtml">
      <publishTime>08/19/2021 09:44:01</publishTime>
      <publishTime>03/15/2022 10:06:42</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource">
      <publishTime>01/10/2023 11:14:47</publishTime>
      <publishTime>02/26/2023 19:50:05</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Department_Model.datasource">
      <publishTime>01/10/2023 11:14:46</publishTime>
      <publishTime>02/26/2023 19:50:04</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource">
      <publishTime>01/10/2023 11:14:48</publishTime>
      <publishTime>02/26/2023 19:50:05</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource">
      <publishTime>01/10/2023 11:14:47</publishTime>
      <publishTime>02/26/2023 19:50:05</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource">
      <publishTime>01/10/2023 11:14:47</publishTime>
      <publishTime>02/26/2023 19:50:05</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource">
      <publishTime>01/10/2023 11:14:46</publishTime>
      <publishTime>02/26/2023 19:50:04</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource">
      <publishTime>01/10/2023 11:14:48</publishTime>
      <publishTime>02/26/2023 19:50:06</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource">
      <publishTime>01/10/2023 11:14:51</publishTime>
      <publishTime>02/26/2023 19:50:04</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Customer_Model.datasource">
      <publishTime>01/10/2023 11:14:50</publishTime>
      <publishTime>02/26/2023 19:50:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Department_Model.datasource">
      <publishTime>01/10/2023 11:14:48</publishTime>
      <publishTime>02/26/2023 19:50:06</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Employee_Model.datasource">
      <publishTime>01/10/2023 11:14:50</publishTime>
      <publishTime>02/26/2023 19:50:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Group_Model.datasource">
      <publishTime>01/10/2023 11:14:49</publishTime>
      <publishTime>02/26/2023 19:50:06</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource">
      <publishTime>01/10/2023 11:14:48</publishTime>
      <publishTime>02/26/2023 19:50:06</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Source_Model.datasource">
      <publishTime>01/10/2023 11:14:50</publishTime>
      <publishTime>02/26/2023 19:50:08</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource">
      <publishTime>01/10/2023 11:14:49</publishTime>
      <publishTime>02/26/2023 19:50:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource">
      <publishTime>01/10/2023 11:14:50</publishTime>
      <publishTime>02/26/2023 19:50:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource">
      <publishTime>01/10/2023 11:14:49</publishTime>
      <publishTime>02/26/2023 19:50:06</publishTime>
    </File>
    <File Include="Web References/WebS/ClsKf_ICStockBill_Mould.datasource">
      <publishTime>01/10/2023 11:14:46</publishTime>
      <publishTime>02/26/2023 19:50:08</publishTime>
    </File>
    <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource">
      <publishTime>01/10/2023 11:14:51</publishTime>
      <publishTime>02/26/2023 19:50:08</publishTime>
    </File>
    <File Include="Web References/WebS/Reference.cs">
      <publishTime>12/20/2021 13:19:56</publishTime>
    </File>
    <File Include="Web References/WebS/Reference.map">
      <publishTime>01/10/2023 11:14:41</publishTime>
      <publishTime>02/26/2023 19:50:00</publishTime>
    </File>
    <File Include="Web References/WebS/WebService1.disco">
      <publishTime>12/20/2021 13:19:56</publishTime>
@@ -491,10 +491,13 @@
    <File Include="Web References/WebS/WebService1.wsdl">
      <publishTime>12/20/2021 13:19:56</publishTime>
    </File>
    <File Include="Web References/WebS2/Reference.map">
      <publishTime>02/26/2023 19:52:25</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>11/14/2022 11:24:08</publishTime>
      <publishTime>11/02/2022 22:03:20</publishTime>
      <publishTime>01/10/2023 16:53:09</publishTime>
      <publishTime>03/03/2023 13:34:25</publishTime>
    </File>
  </ItemGroup>
</Project>
WebAPI/Properties/Settings.Designer.cs
@@ -32,5 +32,15 @@
                return ((string)(this["WebAPI_WebS_WebService1"]));
            }
        }
        [global::System.Configuration.ApplicationScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
        [global::System.Configuration.DefaultSettingValueAttribute("http://localhost:9099/WebService1.asmx")]
        public string WebAPI_WebS2_WebService1 {
            get {
                return ((string)(this["WebAPI_WebS2_WebService1"]));
            }
        }
    }
}
WebAPI/Properties/Settings.settings
@@ -5,5 +5,8 @@
    <Setting Name="WebAPI_WebS_WebService1" Type="(Web Service URL)" Scope="Application">
      <Value Profile="(Default)">http://localhost:8098/WebService1.asmx</Value>
    </Setting>
    <Setting Name="WebAPI_WebS2_WebService1" Type="(Web Service URL)" Scope="Application">
      <Value Profile="(Default)">http://localhost:9099/WebService1.asmx</Value>
    </Setting>
  </Settings>
</SettingsFile>
WebAPI/Web References/WebS/Reference.map
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Results>
    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost:8098/WebService1.asmx?wsdl" filename="WebService1.wsdl" />
    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://localhost:8098/WebService1.asmx?disco" filename="WebService1.disco" />
    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://47.96.97.237/WEBS-WMS/WebService1.asmx?wsdl" filename="WebService1.wsdl" />
    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://47.96.97.237/WEBS-WMS/WebService1.asmx?disco" filename="WebService1.disco" />
  </Results>
</DiscoveryClientResultsFile>
WebAPI/Web References/WebS/WebService1.disco
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
  <contractRef ref="http://localhost:8098/WebService1.asmx?wsdl" docRef="http://localhost:8098/WebService1.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
  <soap address="http://localhost:8098/WebService1.asmx" xmlns:q1="http://tempuri.org/" binding="q1:WebService1Soap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
  <soap address="http://localhost:8098/WebService1.asmx" xmlns:q2="http://tempuri.org/" binding="q2:WebService1Soap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
  <contractRef ref="http://47.96.97.237/WEBS-WMS/WebService1.asmx?wsdl" docRef="http://47.96.97.237/WEBS-WMS/WebService1.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
  <soap address="http://47.96.97.237/WEBS-WMS/WebService1.asmx" xmlns:q1="http://tempuri.org/" binding="q1:WebService1Soap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
  <soap address="http://47.96.97.237/WEBS-WMS/WebService1.asmx" xmlns:q2="http://tempuri.org/" binding="q2:WebService1Soap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
</discovery>
WebAPI/Web References/WebS/WebService1.wsdl
@@ -27803,10 +27803,10 @@
  </wsdl:binding>
  <wsdl:service name="WebService1">
    <wsdl:port name="WebService1Soap" binding="tns:WebService1Soap">
      <soap:address location="http://localhost:8098/WebService1.asmx" />
      <soap:address location="http://47.96.97.237/WEBS-WMS/WebService1.asmx" />
    </wsdl:port>
    <wsdl:port name="WebService1Soap12" binding="tns:WebService1Soap12">
      <soap12:address location="http://localhost:8098/WebService1.asmx" />
      <soap12:address location="http://47.96.97.237/WEBS-WMS/WebService1.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
WebAPI/Web References/WebS2/Reference.cs
New file
@@ -0,0 +1,412 @@
//------------------------------------------------------------------------------
// <auto-generated>
//     æ­¤ä»£ç ç”±å·¥å…·ç”Ÿæˆã€‚
//     è¿è¡Œæ—¶ç‰ˆæœ¬:4.0.30319.42000
//
//     å¯¹æ­¤æ–‡ä»¶çš„æ›´æ”¹å¯èƒ½ä¼šå¯¼è‡´ä¸æ­£ç¡®çš„行为,并且如果
//     é‡æ–°ç”Ÿæˆä»£ç ï¼Œè¿™äº›æ›´æ”¹å°†ä¼šä¸¢å¤±ã€‚
// </auto-generated>
//------------------------------------------------------------------------------
//
// æ­¤æºä»£ç æ˜¯ç”± Microsoft.VSDesigner 4.0.30319.42000 ç‰ˆè‡ªåŠ¨ç”Ÿæˆã€‚
//
#pragma warning disable 1591
namespace WebAPI.WebS2 {
    using System;
    using System.Web.Services;
    using System.Diagnostics;
    using System.Web.Services.Protocols;
    using System.Xml.Serialization;
    using System.ComponentModel;
    using System.Data;
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="WebService1Soap", Namespace="http://tempuri.org/")]
    public partial class WebService1 : System.Web.Services.Protocols.SoapHttpClientProtocol {
        private System.Threading.SendOrPostCallback HelloWorldOperationCompleted;
        private System.Threading.SendOrPostCallback get_SaveCLOUDUseNameandPsdOperationCompleted;
        private System.Threading.SendOrPostCallback set_SaveQcStockInCheckBill_NewOperationCompleted;
        private bool useDefaultCredentialsSetExplicitly;
        /// <remarks/>
        public WebService1() {
            this.Url = global::WebAPI.Properties.Settings.Default.WebAPI_WebS2_WebService1;
            if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
                this.UseDefaultCredentials = true;
                this.useDefaultCredentialsSetExplicitly = false;
            }
            else {
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        public new string Url {
            get {
                return base.Url;
            }
            set {
                if ((((this.IsLocalFileSystemWebService(base.Url) == true)
                            && (this.useDefaultCredentialsSetExplicitly == false))
                            && (this.IsLocalFileSystemWebService(value) == false))) {
                    base.UseDefaultCredentials = false;
                }
                base.Url = value;
            }
        }
        public new bool UseDefaultCredentials {
            get {
                return base.UseDefaultCredentials;
            }
            set {
                base.UseDefaultCredentials = value;
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        /// <remarks/>
        public event HelloWorldCompletedEventHandler HelloWorldCompleted;
        /// <remarks/>
        public event get_SaveCLOUDUseNameandPsdCompletedEventHandler get_SaveCLOUDUseNameandPsdCompleted;
        /// <remarks/>
        public event set_SaveQcStockInCheckBill_NewCompletedEventHandler set_SaveQcStockInCheckBill_NewCompleted;
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/HelloWorld", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string HelloWorld() {
            object[] results = this.Invoke("HelloWorld", new object[0]);
            return ((string)(results[0]));
        }
        /// <remarks/>
        public void HelloWorldAsync() {
            this.HelloWorldAsync(null);
        }
        /// <remarks/>
        public void HelloWorldAsync(object userState) {
            if ((this.HelloWorldOperationCompleted == null)) {
                this.HelloWorldOperationCompleted = new System.Threading.SendOrPostCallback(this.OnHelloWorldOperationCompleted);
            }
            this.InvokeAsync("HelloWorld", new object[0], this.HelloWorldOperationCompleted, userState);
        }
        private void OnHelloWorldOperationCompleted(object arg) {
            if ((this.HelloWorldCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.HelloWorldCompleted(this, new HelloWorldCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/get_SaveCLOUDUseNameandPsd", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public System.Data.DataSet get_SaveCLOUDUseNameandPsd(long HInterID) {
            object[] results = this.Invoke("get_SaveCLOUDUseNameandPsd", new object[] {
                        HInterID});
            return ((System.Data.DataSet)(results[0]));
        }
        /// <remarks/>
        public void get_SaveCLOUDUseNameandPsdAsync(long HInterID) {
            this.get_SaveCLOUDUseNameandPsdAsync(HInterID, null);
        }
        /// <remarks/>
        public void get_SaveCLOUDUseNameandPsdAsync(long HInterID, object userState) {
            if ((this.get_SaveCLOUDUseNameandPsdOperationCompleted == null)) {
                this.get_SaveCLOUDUseNameandPsdOperationCompleted = new System.Threading.SendOrPostCallback(this.Onget_SaveCLOUDUseNameandPsdOperationCompleted);
            }
            this.InvokeAsync("get_SaveCLOUDUseNameandPsd", new object[] {
                        HInterID}, this.get_SaveCLOUDUseNameandPsdOperationCompleted, userState);
        }
        private void Onget_SaveCLOUDUseNameandPsdOperationCompleted(object arg) {
            if ((this.get_SaveCLOUDUseNameandPsdCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.get_SaveCLOUDUseNameandPsdCompleted(this, new get_SaveCLOUDUseNameandPsdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/set_SaveQcStockInCheckBill_New", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public bool set_SaveQcStockInCheckBill_New(
                    string HZJOrgNumber,
                    string HMaterNumber,
                    string HUnitNumber,
                    double HCheckQty,
                    double HRightQty,
                    double HBadQty,
                    string HCheckResult,
                    string HSupNumber,
                    string HUseResult,
                    long HSeQ,
                    long HSourceInterID,
                    long HSourceEntryID,
                    string HSourceBillNo,
                    string user,
                    long HWHID,
                    long HSPID,
                    long HSupID,
                    long HKeeperID,
                    long HMaterID,
                    string HSourceBillType,
                    long HSLInterID,
                    long HSLEntryID,
                    string HSLBillNo,
                    long HSLSeQ,
                    string HBillNo,
                    long HInterID,
                    ref string sErrMsg) {
            object[] results = this.Invoke("set_SaveQcStockInCheckBill_New", new object[] {
                        HZJOrgNumber,
                        HMaterNumber,
                        HUnitNumber,
                        HCheckQty,
                        HRightQty,
                        HBadQty,
                        HCheckResult,
                        HSupNumber,
                        HUseResult,
                        HSeQ,
                        HSourceInterID,
                        HSourceEntryID,
                        HSourceBillNo,
                        user,
                        HWHID,
                        HSPID,
                        HSupID,
                        HKeeperID,
                        HMaterID,
                        HSourceBillType,
                        HSLInterID,
                        HSLEntryID,
                        HSLBillNo,
                        HSLSeQ,
                        HBillNo,
                        HInterID,
                        sErrMsg});
            sErrMsg = ((string)(results[1]));
            return ((bool)(results[0]));
        }
        /// <remarks/>
        public void set_SaveQcStockInCheckBill_NewAsync(
                    string HZJOrgNumber,
                    string HMaterNumber,
                    string HUnitNumber,
                    double HCheckQty,
                    double HRightQty,
                    double HBadQty,
                    string HCheckResult,
                    string HSupNumber,
                    string HUseResult,
                    long HSeQ,
                    long HSourceInterID,
                    long HSourceEntryID,
                    string HSourceBillNo,
                    string user,
                    long HWHID,
                    long HSPID,
                    long HSupID,
                    long HKeeperID,
                    long HMaterID,
                    string HSourceBillType,
                    long HSLInterID,
                    long HSLEntryID,
                    string HSLBillNo,
                    long HSLSeQ,
                    string HBillNo,
                    long HInterID,
                    string sErrMsg) {
            this.set_SaveQcStockInCheckBill_NewAsync(HZJOrgNumber, HMaterNumber, HUnitNumber, HCheckQty, HRightQty, HBadQty, HCheckResult, HSupNumber, HUseResult, HSeQ, HSourceInterID, HSourceEntryID, HSourceBillNo, user, HWHID, HSPID, HSupID, HKeeperID, HMaterID, HSourceBillType, HSLInterID, HSLEntryID, HSLBillNo, HSLSeQ, HBillNo, HInterID, sErrMsg, null);
        }
        /// <remarks/>
        public void set_SaveQcStockInCheckBill_NewAsync(
                    string HZJOrgNumber,
                    string HMaterNumber,
                    string HUnitNumber,
                    double HCheckQty,
                    double HRightQty,
                    double HBadQty,
                    string HCheckResult,
                    string HSupNumber,
                    string HUseResult,
                    long HSeQ,
                    long HSourceInterID,
                    long HSourceEntryID,
                    string HSourceBillNo,
                    string user,
                    long HWHID,
                    long HSPID,
                    long HSupID,
                    long HKeeperID,
                    long HMaterID,
                    string HSourceBillType,
                    long HSLInterID,
                    long HSLEntryID,
                    string HSLBillNo,
                    long HSLSeQ,
                    string HBillNo,
                    long HInterID,
                    string sErrMsg,
                    object userState) {
            if ((this.set_SaveQcStockInCheckBill_NewOperationCompleted == null)) {
                this.set_SaveQcStockInCheckBill_NewOperationCompleted = new System.Threading.SendOrPostCallback(this.Onset_SaveQcStockInCheckBill_NewOperationCompleted);
            }
            this.InvokeAsync("set_SaveQcStockInCheckBill_New", new object[] {
                        HZJOrgNumber,
                        HMaterNumber,
                        HUnitNumber,
                        HCheckQty,
                        HRightQty,
                        HBadQty,
                        HCheckResult,
                        HSupNumber,
                        HUseResult,
                        HSeQ,
                        HSourceInterID,
                        HSourceEntryID,
                        HSourceBillNo,
                        user,
                        HWHID,
                        HSPID,
                        HSupID,
                        HKeeperID,
                        HMaterID,
                        HSourceBillType,
                        HSLInterID,
                        HSLEntryID,
                        HSLBillNo,
                        HSLSeQ,
                        HBillNo,
                        HInterID,
                        sErrMsg}, this.set_SaveQcStockInCheckBill_NewOperationCompleted, userState);
        }
        private void Onset_SaveQcStockInCheckBill_NewOperationCompleted(object arg) {
            if ((this.set_SaveQcStockInCheckBill_NewCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.set_SaveQcStockInCheckBill_NewCompleted(this, new set_SaveQcStockInCheckBill_NewCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        /// <remarks/>
        public new void CancelAsync(object userState) {
            base.CancelAsync(userState);
        }
        private bool IsLocalFileSystemWebService(string url) {
            if (((url == null)
                        || (url == string.Empty))) {
                return false;
            }
            System.Uri wsUri = new System.Uri(url);
            if (((wsUri.Port >= 1024)
                        && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
                return true;
            }
            return false;
        }
    }
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
    public delegate void HelloWorldCompletedEventHandler(object sender, HelloWorldCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class HelloWorldCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        private object[] results;
        internal HelloWorldCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
                base(exception, cancelled, userState) {
            this.results = results;
        }
        /// <remarks/>
        public string Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[0]));
            }
        }
    }
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
    public delegate void get_SaveCLOUDUseNameandPsdCompletedEventHandler(object sender, get_SaveCLOUDUseNameandPsdCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class get_SaveCLOUDUseNameandPsdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        private object[] results;
        internal get_SaveCLOUDUseNameandPsdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
                base(exception, cancelled, userState) {
            this.results = results;
        }
        /// <remarks/>
        public System.Data.DataSet Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((System.Data.DataSet)(this.results[0]));
            }
        }
    }
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
    public delegate void set_SaveQcStockInCheckBill_NewCompletedEventHandler(object sender, set_SaveQcStockInCheckBill_NewCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.4084.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class set_SaveQcStockInCheckBill_NewCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        private object[] results;
        internal set_SaveQcStockInCheckBill_NewCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
                base(exception, cancelled, userState) {
            this.results = results;
        }
        /// <remarks/>
        public bool Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((bool)(this.results[0]));
            }
        }
        /// <remarks/>
        public string sErrMsg {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[1]));
            }
        }
    }
}
#pragma warning restore 1591
WebAPI/Web References/WebS2/Reference.map
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Results>
    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://localhost:9099/WebService1.asmx?disco" filename="WebService1.disco" />
    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost:9099/WebService1.asmx?wsdl" filename="WebService1.wsdl" />
  </Results>
</DiscoveryClientResultsFile>
WebAPI/Web References/WebS2/WebService1.disco
New file
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
  <contractRef ref="http://localhost:9099/WebService1.asmx?wsdl" docRef="http://localhost:9099/WebService1.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
  <soap address="http://localhost:9099/WebService1.asmx" xmlns:q1="http://tempuri.org/" binding="q1:WebService1Soap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
  <soap address="http://localhost:9099/WebService1.asmx" xmlns:q2="http://tempuri.org/" binding="q2:WebService1Soap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
</discovery>
WebAPI/Web References/WebS2/WebService1.wsdl
New file
@@ -0,0 +1,179 @@
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="HelloWorld">
        <s:complexType />
      </s:element>
      <s:element name="HelloWorldResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_SaveCLOUDUseNameandPsd">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="HInterID" type="s:long" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_SaveCLOUDUseNameandPsdResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="get_SaveCLOUDUseNameandPsdResult">
              <s:complexType>
                <s:sequence>
                  <s:element ref="s:schema" />
                  <s:any />
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="set_SaveQcStockInCheckBill_New">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="HZJOrgNumber" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HMaterNumber" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HUnitNumber" type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="HCheckQty" type="s:double" />
            <s:element minOccurs="1" maxOccurs="1" name="HRightQty" type="s:double" />
            <s:element minOccurs="1" maxOccurs="1" name="HBadQty" type="s:double" />
            <s:element minOccurs="0" maxOccurs="1" name="HCheckResult" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HSupNumber" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HUseResult" type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="HSeQ" type="s:long" />
            <s:element minOccurs="1" maxOccurs="1" name="HSourceInterID" type="s:long" />
            <s:element minOccurs="1" maxOccurs="1" name="HSourceEntryID" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="HSourceBillNo" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="HWHID" type="s:long" />
            <s:element minOccurs="1" maxOccurs="1" name="HSPID" type="s:long" />
            <s:element minOccurs="1" maxOccurs="1" name="HSupID" type="s:long" />
            <s:element minOccurs="1" maxOccurs="1" name="HKeeperID" type="s:long" />
            <s:element minOccurs="1" maxOccurs="1" name="HMaterID" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="HSourceBillType" type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="HSLInterID" type="s:long" />
            <s:element minOccurs="1" maxOccurs="1" name="HSLEntryID" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="HSLBillNo" type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="HSLSeQ" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="HBillNo" type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="HInterID" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="set_SaveQcStockInCheckBill_NewResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="set_SaveQcStockInCheckBill_NewResult" type="s:boolean" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="HelloWorldSoapIn">
    <wsdl:part name="parameters" element="tns:HelloWorld" />
  </wsdl:message>
  <wsdl:message name="HelloWorldSoapOut">
    <wsdl:part name="parameters" element="tns:HelloWorldResponse" />
  </wsdl:message>
  <wsdl:message name="get_SaveCLOUDUseNameandPsdSoapIn">
    <wsdl:part name="parameters" element="tns:get_SaveCLOUDUseNameandPsd" />
  </wsdl:message>
  <wsdl:message name="get_SaveCLOUDUseNameandPsdSoapOut">
    <wsdl:part name="parameters" element="tns:get_SaveCLOUDUseNameandPsdResponse" />
  </wsdl:message>
  <wsdl:message name="set_SaveQcStockInCheckBill_NewSoapIn">
    <wsdl:part name="parameters" element="tns:set_SaveQcStockInCheckBill_New" />
  </wsdl:message>
  <wsdl:message name="set_SaveQcStockInCheckBill_NewSoapOut">
    <wsdl:part name="parameters" element="tns:set_SaveQcStockInCheckBill_NewResponse" />
  </wsdl:message>
  <wsdl:portType name="WebService1Soap">
    <wsdl:operation name="HelloWorld">
      <wsdl:input message="tns:HelloWorldSoapIn" />
      <wsdl:output message="tns:HelloWorldSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="get_SaveCLOUDUseNameandPsd">
      <wsdl:input message="tns:get_SaveCLOUDUseNameandPsdSoapIn" />
      <wsdl:output message="tns:get_SaveCLOUDUseNameandPsdSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="set_SaveQcStockInCheckBill_New">
      <wsdl:input message="tns:set_SaveQcStockInCheckBill_NewSoapIn" />
      <wsdl:output message="tns:set_SaveQcStockInCheckBill_NewSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="WebService1Soap" type="tns:WebService1Soap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="HelloWorld">
      <soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_SaveCLOUDUseNameandPsd">
      <soap:operation soapAction="http://tempuri.org/get_SaveCLOUDUseNameandPsd" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="set_SaveQcStockInCheckBill_New">
      <soap:operation soapAction="http://tempuri.org/set_SaveQcStockInCheckBill_New" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="WebService1Soap12" type="tns:WebService1Soap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="HelloWorld">
      <soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_SaveCLOUDUseNameandPsd">
      <soap12:operation soapAction="http://tempuri.org/get_SaveCLOUDUseNameandPsd" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="set_SaveQcStockInCheckBill_New">
      <soap12:operation soapAction="http://tempuri.org/set_SaveQcStockInCheckBill_New" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="WebService1">
    <wsdl:port name="WebService1Soap" binding="tns:WebService1Soap">
      <soap:address location="http://localhost:9099/WebService1.asmx" />
    </wsdl:port>
    <wsdl:port name="WebService1Soap12" binding="tns:WebService1Soap12">
      <soap12:address location="http://localhost:9099/WebService1.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
WebAPI/Web.config
@@ -28,8 +28,9 @@
      <!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/>    åšæ—¥ç§‘技-->
      <!--<add key="sUrl" value="http://192.168.0.214/WEBS-WMS/WebService1.asmx"/>    ç‘žä¸Žç¥º-->
      <!--<add key="sUrl" value="http://60.191.27.141:8090/WEBS-WMS/WebService1.asmx"/>    æ£®æ¥·-->
      <add key="sUrl" value="http://localhost:8098/WebService1.asmx"/>
      <add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/>
      <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS/WebService1.asmx"/>     å®‰ç‘žæœåС噍-->
      <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/>    æµ‹è¯•服务器-->
      <add key="webpages:Version" value="3.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="ClientValidationEnabled" value="true" />
@@ -96,7 +97,7 @@
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:8098/WebService1.asmx" binding="basicHttpBinding"
      <endpoint address="http://47.96.97.237/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding"
        bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap"
        name="WebService1Soap" />
    </client>
@@ -105,7 +106,10 @@
  <applicationSettings>
    <WebAPI.Properties.Settings>
      <setting name="WebAPI_WebS_WebService1" serializeAs="String">
        <value>http://localhost:8098/WebService1.asmx</value>
        <value>http://47.96.97.237/WEBS-WMS/WebService1.asmx</value>
      </setting>
      <setting name="WebAPI_WebS2_WebService1" serializeAs="String">
        <value>http://localhost:9099/WebService1.asmx</value>
      </setting>
    </WebAPI.Properties.Settings>
  </applicationSettings>
WebAPI/WebAPI.csproj
@@ -81,6 +81,7 @@
      <Private>True</Private>
    </Reference>
    <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
    </Reference>
    <Reference Include="NPOI, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
@@ -255,6 +256,11 @@
    <Content Include="Views\Scripts\jquery.validate.unobtrusive.js" />
    <Content Include="Views\Scripts\jquery.validate.unobtrusive.min.js" />
    <Content Include="Views\Scripts\modernizr-2.6.2.js" />
    <Content Include="Web References\WebS2\Reference.map">
      <Generator>MSDiscoCodeGenerator</Generator>
      <LastGenOutput>Reference.cs</LastGenOutput>
    </Content>
    <None Include="Web References\WebS2\WebService1.disco" />
    <Content Include="Web References\WebS\ClsCLD_Customer_Model.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </Content>
@@ -312,10 +318,11 @@
    <Content Include="Web References\WebS\ClsKf_ICStockBill_WMS.datasource">
      <DependentUpon>Reference.map</DependentUpon>
    </Content>
    <Content Include="Web References\WebS\Reference.map">
    <None Include="Web References\WebS\Reference.map">
      <Generator>MSDiscoCodeGenerator</Generator>
      <LastGenOutput>Reference.cs</LastGenOutput>
    </Content>
    </None>
    <None Include="Web References\WebS2\WebService1.wsdl" />
    <None Include="Web References\WebS\WebService1.disco" />
    <Content Include="Web.config">
      <SubType>Designer</SubType>
@@ -395,6 +402,7 @@
    <Compile Include="Controllers\CJGL\Cj_StationOutBillController.cs" />
    <Compile Include="Controllers\CJGL\Cj_StationInBillController.cs" />
    <Compile Include="Controllers\CJGL\Cj_StationEntrustOutBillController.cs" />
    <Compile Include="Controllers\CJGL\Sc_ProcExchRecordBackBillController.cs" />
    <Compile Include="Controllers\CJGL\Sc_ProcessSendWorkController.cs" />
    <Compile Include="Controllers\CJGL\Sc_ProcExchWorkBackBillController.cs" />
    <Compile Include="Controllers\CJGL\Sc_WorkBillAutoSortBillMainController.cs" />
@@ -471,6 +479,7 @@
    <Compile Include="Controllers\基础资料\基础资料\Gy_DutyBillController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_EquipStatusController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_MatePriceSupController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_MaterTypeBillController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_MouldStatusController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_OperatorController.cs" />
    <Compile Include="Controllers\基础资料\基础资料\Gy_PaymentConditionListBillController.cs" />
@@ -876,6 +885,11 @@
    <Compile Include="Models\JsonResult.cs" />
    <Compile Include="Models\Pensen.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Web References\WebS2\Reference.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Reference.map</DependentUpon>
    </Compile>
    <Compile Include="Web References\WebS\Reference.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
@@ -929,6 +943,7 @@
    <Folder Include="Views\Gy_ICBomBill\" />
    <Folder Include="Views\Gy_MateMould\" />
    <Folder Include="Views\Gy_MatePriceSup\" />
    <Folder Include="Views\Gy_MaterTypeBill\" />
    <Folder Include="Views\Gy_MouldStatus\" />
    <Folder Include="Views\Gy_Operator\" />
    <Folder Include="Views\Gy_PackType\" />
@@ -983,6 +998,7 @@
    <Folder Include="Views\Sc_MouldScrapRequestBill\" />
    <Folder Include="Views\Sc_MouldStatusChangeBill\" />
    <Folder Include="Views\Sc_ProcessExchangeIssueBill\" />
    <Folder Include="Views\Sc_ProcExchRecordBackBill\" />
    <Folder Include="Views\Sc_ProcessSendWork\" />
    <Folder Include="Views\Sc_WorkBillAutoSortBillMain\" />
    <Folder Include="Views\Sc_WorkBillSortBill\" />
@@ -1035,10 +1051,10 @@
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <WebReferenceUrl Include="http://localhost:8098/WebService1.asmx">
    <WebReferenceUrl Include="http://47.96.97.237/WEBS-WMS/WebService1.asmx">
      <UrlBehavior>Dynamic</UrlBehavior>
      <RelPath>Web References\WebS\</RelPath>
      <UpdateFromURL>http://localhost:8098/WebService1.asmx</UpdateFromURL>
      <UpdateFromURL>http://47.96.97.237/WEBS-WMS/WebService1.asmx</UpdateFromURL>
      <ServiceLocationURL>
      </ServiceLocationURL>
      <CachedDynamicPropName>
@@ -1046,6 +1062,17 @@
      <CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
      <CachedSettingsPropName>WebAPI_WebS_WebService1</CachedSettingsPropName>
    </WebReferenceUrl>
    <WebReferenceUrl Include="http://localhost:9099/WebService1.asmx">
      <UrlBehavior>Dynamic</UrlBehavior>
      <RelPath>Web References\WebS2\</RelPath>
      <UpdateFromURL>http://localhost:9099/WebService1.asmx</UpdateFromURL>
      <ServiceLocationURL>
      </ServiceLocationURL>
      <CachedDynamicPropName>
      </CachedDynamicPropName>
      <CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
      <CachedSettingsPropName>WebAPI_WebS2_WebService1</CachedSettingsPropName>
    </WebReferenceUrl>
  </ItemGroup>
  <PropertyGroup>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>