1
cwjbxqmz
2024-02-26 17be11c6c4be17c9944004a99551ebe6159a12ba
1
19个文件已修改
8个文件已添加
18175 ■■■■■ 已修改文件
DAL/ClsPM_CustomerTaskBillMain.cs 246 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/ClsPM_ProjectMoneyBillMain.cs 286 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/DAL.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/Model.csproj 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/仓库管理/ClsKf_MoveStockBillMain.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/基础资料/基础资料/ClsGy_ProjectMoney_Model.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/项目管理/ClsPM_CustomerTaskBillMain.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/项目管理/ClsPM_CustomerTaskBillSub.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/项目管理/ClsPM_ProjectMoneyBillMain.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/项目管理/ClsPM_ProjectMoneyBillSub.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs 241 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs 315 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 322 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/品质管理/工序检验单/MES_ProcessCheckBill_PDAController.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/条码管理/WEBSController.cs 660 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/项目管理/工作任务/PM_WorkTaskBillController.cs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs 1091 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsGy_ProjectMoney_Ctl.cs 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/ListModels.cs 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/Settings.Designer.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/Settings.settings 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Service/LuBaoSevice.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS/Reference.cs 13957 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS/Reference.map 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS/WebService1.disco 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS/WebService1.wsdl 696 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/ClsPM_CustomerTaskBillMain.cs
New file
@@ -0,0 +1,246 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace DAL
{
    public  class ClsPM_CustomerTaskBillMain : DBUtility.ClsXt_BaseBill
    {
        public Model.ClsPM_CustomerTaskBillMain omodel = new Model.ClsPM_CustomerTaskBillMain();
        public List<Model.ClsPM_CustomerTaskBillSub> DetailColl = new List<Model.ClsPM_CustomerTaskBillSub>();
        public ClsPM_CustomerTaskBillMain()
        {
            base.MvarItemKeySub = "PM_CustomerTaskBillSub";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey= "PM_CustomerTaskBillMain";
            base.MvarReportTitle="项目需求及问题清单";
            base.BillType="4759";
            base.HBillSubType = "4759";
        }
        #region å›ºå®šä»£ç 
        #region æ— å‚构造函数
        ~ClsPM_CustomerTaskBillMain()
        {
            DetailColl = null;
        }
        #endregion
        #endregion
        //#region ä¿®æ”¹å•据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                oCn.BeginTran();
                //更新主表
                string mainSql = "update PM_CustomerTaskBillMain set " +
                    " HBillNo = '" + omodel.HBillNo +
                     "', HRemark  = '" + omodel.HRemark +
                    "', HProNumber  = '" + omodel.HProNumber +
                     "', HProjectID  = '" + omodel.HProjectID +
                    "', HProjectStageID  = " + omodel.HProjectStageID +
                    ", HCusID = " + omodel.HCusID +
                    ", HName = '" + omodel.HName +
                     "', HTaskNote = '" + omodel.HTaskNote +
                    "', HType= '" + omodel.HType +
                    "', HSendEmp = '" + omodel.HSendEmp +
                     "', HReceiveEmp = '" + omodel.HReceiveEmp +
                    "', HCopyEmp ='" + omodel.HCopyEmp +
                    "', HLastDate = '" + omodel.HLastDate +
                     "', HOrderLevID = " + omodel.HOrderLevID +
                    ", HTaskStatus  = '" + omodel.HTaskStatus +
                    "', HUpDater = '" + omodel.HUpDater +
                    "', HUpDateDate = getdate()" +
                    //===============================================================
                    " where HInterID = " + omodel.HInterID;
                oCn.RunProc(mainSql);
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
                DeleteBillSub(lngBillKey);
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //#endregion
        #region  æ–°å¢žå•据
        public override bool AddBill(ref string sReturn)
        {
            try
            {
                DataSet ds;
                oCn.BeginTran();
                //检查主表内码是否重复,若重复则重新生成并继续检查,直到不再重复
                while (true)
                {
                    ds = oCn.RunProcReturn("select * from PM_CustomerTaskBillMain where HInterID = " + omodel.HInterID, "PM_CustomerTaskBillMain");
                    if(ds!=null && ds.Tables[0].Rows.Count > 0)
                    {
                        omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                    }
                    else
                    {
                        break;
                    }
                }
                //插入主表
                string mainSql = "insert into PM_CustomerTaskBillMain" +
                    "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HRemark,HMaker,HMakeDate" +
                    ",HProjectID,HProNumber,HProjectStageID,HCusID,HName,HTaskNote,HType,HSendEmp,HReceiveEmp,HCopyEmp,HLastDate,HOrderLevID,HTaskStatus) " +
                    "values(" +
                    "" + (omodel.HYear.ToString() != "0" ? omodel.HYear.ToString() : DateTime.Now.Year.ToString()) +
                    "," + omodel.HPeriod.ToString() +
                    ",'" + this.BillType +
                    "','" + this.HBillSubType +
                    "'," + omodel.HInterID +
                    ",'" + omodel.HDate +
                    "','" + omodel.HBillNo +
                    "','" + omodel.HRemark +
                    "','" + omodel.HMaker +
                    "','" + omodel.HMakeDate +
                    "','" + omodel.HProjectID +
                    "','" + omodel.HProNumber +
                    "'," + omodel.HProjectStageID +
                    ",'" + omodel.HCusID +
                    "','" + omodel.HName +
                    "','" + omodel.HTaskNote +
                    "','" + omodel.HType +
                    "','" + omodel.HSendEmp +
                    "','" + omodel.HReceiveEmp +
                    "','" + omodel.HCopyEmp +
                    "','" + omodel.HLastDate +
                     "','" + omodel.HOrderLevID +
                      "','" + omodel.HTaskStatus +
                    "')";
                oCn.RunProc(mainSql);
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        #endregion
        #region æ˜¾ç¤ºå•据
        //public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
        //{
        //    try
        //    {
        //        //查询主表
        //        DataSet Ds ;
        //        Ds = oCn.RunProcReturn("select * from PM_WorkReportWeekBillMain Where HInterID = " + lngBillKey.ToString(), "PM_WorkReportWeekBillMain");
        //        if(Ds.Tables[0].Rows.Count==0)
        //        {
        //            sReturn = "单据未找到!";
        //            return false;
        //        }
        //        //固定赋值===========================================
        //        omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
        //        omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
        //        omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
        //        omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
        //        omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
        //        omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
        //        omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
        //        omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
        //        omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
        //        omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
        //        omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
        //        omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
        //        omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
        //        omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
        //        omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
        //        omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
        //        omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
        //        omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
        //        omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
        //        omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
        //        omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
        //        omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
        //        omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
        //        omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
        //        omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
        //        //========================================================
        //        omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
        //        omodel.HWeek = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWeek"]);
        //        omodel.HBeginDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBeginDate"]);
        //        omodel.HEndDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEndDate"]);
        //        omodel.HPlanEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPlanEmpID"]);
        //        //
        //        //循环
        //        DataSet DsSub ;
        //        DsSub = oCn.RunProcReturn("select * from PM_WorkTaskWeekBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_WorkTaskWeekBillSub");
        //        DetailColl.Clear();//清空
        //        for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
        //        {
        //            Model.ClsPM_WorkTaskWeekBillSub oSub = new Model.ClsPM_WorkTaskWeekBillSub();
        //            // å›ºå®šèµ‹å€¼===============================================
        //            oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
        //            oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
        //            oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
        //            oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
        //            oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
        //            oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
        //            oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
        //            oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
        //            oSub.HCloseMan =  DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
        //            oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
        //            oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
        //            oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
        //            //===================================================
        //            oSub.HWeekDay = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWeekDay"]);
        //            oSub.HSno = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSno"]);
        //            oSub.HProjectID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectID"]);
        //            oSub.HProjectStageID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectStageID"]);
        //            oSub.HTaskNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HTaskNote"]);
        //            oSub.HPlanTimes = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPlanTimes"]);
        //            DetailColl.Add(oSub);
        //        }
        //        sReturn = "显示单据成功!";
        //        return true;
        //    }
        //    catch (Exception e)
        //    {
        //        sReturn = e.Message;
        //        throw (e);
        //    }
        //}
        #endregion
    }
}
DAL/ClsPM_ProjectMoneyBillMain.cs
New file
@@ -0,0 +1,286 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace DAL
{
    public  class ClsPM_ProjectMoneyBillMain : DBUtility.ClsXt_BaseBill
    {
        public Model.ClsPM_ProjectMoneyBillMain omodel = new Model.ClsPM_ProjectMoneyBillMain();
        public List<Model.ClsPM_ProjectMoneyBillSub> DetailColl = new List<Model.ClsPM_ProjectMoneyBillSub>();
        public ClsPM_ProjectMoneyBillMain()
        {
            base.MvarItemKeySub = "PM_ProjectMoneyBillSub";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey= "PM_ProjectMoneyBillMain";
            base.MvarReportTitle="项目费用单";
            base.BillType="4759";
            base.HBillSubType = "4759";
        }
        #region å›ºå®šä»£ç 
        #region æ— å‚构造函数
        ~ClsPM_ProjectMoneyBillMain()
        {
            DetailColl = null;
        }
        #endregion
        #endregion
        //#region ä¿®æ”¹å•据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                oCn.BeginTran();
                //更新主表
                string mainSql = "update PM_ProjectMoneyBillMain set " +
                    " HBillNo = '" + omodel.HBillNo +
                     "', HRemark  = '" + omodel.HRemark +
                    "', HProNumber  = '" + omodel.HProNumber +
                     "', HProjectID  = '" + omodel.HProjectID +
                    "', HProNumber   = " + omodel.HProNumber+
                    ", HProName  = " + omodel.HProName +
                    ", HCusID  = '" + omodel.HCusID +
                     "', HPMTeamID  = '" + omodel.HPMTeamID +
                    "', HPMEmpID = '" + omodel.HPMEmpID +
                    "', HWorkEmpID  = '" + omodel.HWorkEmpID +
                     "', HManagerID  = '" + omodel.HManagerID +
                    "', HOrgID  ='" + omodel.HOrgID +
                    "', HUpDateDate = getdate()" +
                    //===============================================================
                    " where HInterID = " + omodel.HInterID;
                oCn.RunProc(mainSql);
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
                DeleteBillSub(lngBillKey);
                //插入子表
                omodel.HInterID = lngBillKey;
                foreach (Model.ClsPM_ProjectMoneyBillSub oSub in DetailColl)
                {
                    string subSql = "insert into PM_ProjectMoneyBillSub " +
                        "" +
                        "" +
                        "" +
                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                        ",HProMoneyID,HQty,HPrice,HMoney) " +
                        " values(" +
                        "" + omodel.HInterID.ToString() +
                        "," + oSub.HEntryID.ToString() +
                        "," + oSub.HSourceInterID +
                        "," + oSub.HSourceEntryID +
                        ",'" + oSub.HSourceBillNo +
                        "','" + oSub.HSourceBillType +
                        "','" + oSub.HProMoneyID +
                        "'," + oSub.HQty +
                        "," + oSub.HPrice +
                        ",'" + oSub.HMoney +
                        "')";
                    oCn.RunProc(subSql);
                }
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //#endregion
        #region  æ–°å¢žå•据
        public override bool AddBill(ref string sReturn)
        {
            try
            {
                DataSet ds;
                oCn.BeginTran();
                //检查主表内码是否重复,若重复则重新生成并继续检查,直到不再重复
                while (true)
                {
                    ds = oCn.RunProcReturn("select * from PM_ProjectMoneyBillMain where HInterID = " + omodel.HInterID, "PM_ProjectMoneyBillMain");
                    if(ds!=null && ds.Tables[0].Rows.Count > 0)
                    {
                        omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                    }
                    else
                    {
                        break;
                    }
                }
                //插入主表
                string mainSql = "insert into PM_ProjectMoneyBillMain" +
                    "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HRemark,HMaker,HMakeDate" +
                    ",HProjectID,HProNumber,HProName,HCusID,HPMTeamID,HPMEmpID,HWorkEmpID,HManagerID,HOrgID) " +
                    "values(" +
                    "" + (omodel.HYear.ToString() != "0" ? omodel.HYear.ToString() : DateTime.Now.Year.ToString()) +
                    "," + omodel.HPeriod.ToString() +
                    ",'" + this.BillType +
                    "','" + this.HBillSubType +
                    "'," + omodel.HInterID +
                    ",'" + omodel.HDate +
                    "','" + omodel.HBillNo +
                    "','" + omodel.HRemark +
                    "','" + omodel.HMaker +
                    "','" + omodel.HMakeDate +
                    "','" + omodel.HProjectID +
                    "','" + omodel.HProNumber +
                    "'," + omodel.HProName+
                    ",'" + omodel.HCusID+
                    "','" + omodel.HPMTeamID+
                    "','" + omodel.HPMEmpID+
                    "','" + omodel.HWorkEmpID+
                    "','" + omodel.HManagerID+
                    "','" + omodel.HOrgID+
                    "')";
                oCn.RunProc(mainSql);
                //插入子表
                foreach (Model.ClsPM_ProjectMoneyBillSub oSub in DetailColl)
                {
                    string subSql = "insert into PM_ProjectMoneyBillSub " +
                        "" +
                        "" +
                        "" +
                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                        ",HProMoneyID,HQty,HPrice,HMoney) " +
                        " values(" +
                        "" + omodel.HInterID.ToString() +
                        "," + oSub.HEntryID.ToString() +
                        "," + oSub.HSourceInterID +
                        "," + oSub.HSourceEntryID +
                        ",'" + oSub.HSourceBillNo +
                        "','" + oSub.HSourceBillType +
                        "','" + oSub.HProMoneyID +
                        "'," + oSub.HQty +
                        "," + oSub.HPrice +
                        ",'" + oSub.HMoney +
                        "')";
                    oCn.RunProc(subSql);
                }
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        #endregion
        #region æ˜¾ç¤ºå•据
        //public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
        //{
        //    try
        //    {
        //        //查询主表
        //        DataSet Ds ;
        //        Ds = oCn.RunProcReturn("select * from PM_WorkReportWeekBillMain Where HInterID = " + lngBillKey.ToString(), "PM_WorkReportWeekBillMain");
        //        if(Ds.Tables[0].Rows.Count==0)
        //        {
        //            sReturn = "单据未找到!";
        //            return false;
        //        }
        //        //固定赋值===========================================
        //        omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
        //        omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
        //        omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
        //        omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
        //        omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
        //        omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
        //        omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
        //        omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
        //        omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
        //        omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
        //        omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
        //        omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
        //        omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
        //        omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
        //        omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
        //        omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
        //        omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
        //        omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
        //        omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
        //        omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
        //        omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
        //        omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
        //        omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
        //        omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
        //        omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
        //        //========================================================
        //        omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
        //        omodel.HWeek = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWeek"]);
        //        omodel.HBeginDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBeginDate"]);
        //        omodel.HEndDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HEndDate"]);
        //        omodel.HPlanEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPlanEmpID"]);
        //        //
        //        //循环
        //        DataSet DsSub ;
        //        DsSub = oCn.RunProcReturn("select * from PM_WorkTaskWeekBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "PM_WorkTaskWeekBillSub");
        //        DetailColl.Clear();//清空
        //        for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
        //        {
        //            Model.ClsPM_WorkTaskWeekBillSub oSub = new Model.ClsPM_WorkTaskWeekBillSub();
        //            // å›ºå®šèµ‹å€¼===============================================
        //            oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
        //            oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
        //            oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
        //            oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
        //            oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
        //            oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
        //            oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
        //            oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
        //            oSub.HCloseMan =  DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
        //            oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
        //            oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
        //            oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
        //            //===================================================
        //            oSub.HWeekDay = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWeekDay"]);
        //            oSub.HSno = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSno"]);
        //            oSub.HProjectID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectID"]);
        //            oSub.HProjectStageID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProjectStageID"]);
        //            oSub.HTaskNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HTaskNote"]);
        //            oSub.HPlanTimes = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPlanTimes"]);
        //            DetailColl.Add(oSub);
        //        }
        //        sReturn = "显示单据成功!";
        //        return true;
        //    }
        //    catch (Exception e)
        //    {
        //        sReturn = e.Message;
        //        throw (e);
        //    }
        //}
        #endregion
    }
}
DAL/DAL.csproj
@@ -80,6 +80,8 @@
    <Compile Include="ClsPay_EarlyLateErrBill.cs" />
    <Compile Include="ClsPay_RewardPunishBill.cs" />
    <Compile Include="ClsPay_WorkErrTimesBill.cs" />
    <Compile Include="ClsPM_ProjectMoneyBillMain.cs" />
    <Compile Include="ClsPM_CustomerTaskBillMain.cs" />
    <Compile Include="ClsPM_WorkPlanMonthBillMain.cs" />
    <Compile Include="MES\ClsSc_SourceLineRepairBill.cs" />
    <Compile Include="MES\ClsSc_MESMaterToSourceBill .cs" />
Model/Model.csproj
@@ -355,6 +355,7 @@
    <Compile Include="基础资料\基础资料\ClsGy_Operator_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_RateType_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_Staff_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_ProjectMoney_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_TaxMIXMain_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_TaxMIXSub_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_TaxRate_Model.cs" />
@@ -979,7 +980,11 @@
    <Compile Include="销售管理\单证管理\ClsXs_LadingBillSub.cs" />
    <Compile Include="销售管理\单证管理\ClsXs_ShippingAdviceBillMain.cs" />
    <Compile Include="销售管理\单证管理\ClsXs_ShippingAdviceBillSub.cs" />
    <Compile Include="项目管理\ClsPM_ProjectMoneyBillSub.cs" />
    <Compile Include="项目管理\ClsPM_ProjectMoneyBillMain.cs" />
    <Compile Include="项目管理\ClsPM_CustomerTaskBillMain.cs" />
    <Compile Include="项目管理\ClsPM_WorkPlanMonthBillMain.cs" />
    <Compile Include="项目管理\ClsPM_CustomerTaskBillSub.cs" />
    <Compile Include="项目管理\ClsPM_WorkReportWeekBillSub.cs" />
    <Compile Include="项目管理\ClsPM_WorkReportWeekBillMain.cs" />
    <Compile Include="项目管理\ClsPM_WorkPlanMonthBillSub.cs" />
Model/²Ö¿â¹ÜÀí/ClsKf_MoveStockBillMain.cs
@@ -24,7 +24,9 @@
        public Int64 HConveyTypeID;//    
        public Int64 HConveyCompID;//    
        public double HConveyMoney;//
        public string HStockStyle;//    varchar(100)      //调拨类型
        public string HStockStyle;      //    varchar(100)  //调拨类型
        public string HTransferDirect;  //    varchar(100)  //调拨方向
        public string HShipType;        //    varchar(100)  //出货类型
        public Int64 HGroupID;
    }
}
Model/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/ClsGy_ProjectMoney_Model.cs
New file
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsGy_ProjectMoney_Model : DBUtility.ClsGy_Base_Model
    {
        public DateTime HMakeTime;
        public int HUSEORGID;
        public string HMakeEmp;
        public DateTime HModifyTime;
    }
}
Model/ÏîÄ¿¹ÜÀí/ClsPM_CustomerTaskBillMain.cs
New file
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsPM_CustomerTaskBillMain: DBUtility.ClsXt_BaseBillMain
    {
        public Int64 HProjectID;    //int       é¡¹ç›®å†…码
        public string HProNumber;//    varchar(50)    //项目代码
        public string HProjectStageID;//    varchar(50)    é¡¹ç›®é˜¶æ®µ
        public Int64 HCusID;//        int        //客户
        public string HName;//    varchar(100) //需求名称
        public string HTaskNote;//varchar(600) //需求描述(富文本)
        public string HType;//        varchar(30) //需求类型(标准功能、交付实施、二次开发、其他)
        public string HSendEmp;//    varchar(50) //客户提出人(手工输入)
        public string HReceiveEmp;//     varchar(20) //接收人
        public string HCopyEmp;//    varchar(200) //抄送人
        public DateTime HLastDate;//    datetime //要求完成日期
        public Int64 HOrderLevID;//         int --订单等级
        public Int64 HHasten;//        int        //    --催促次数
        public string HTaskStatus;//        varchar(10) --需求状态(未开始,进行中,已结束)
    }
}
Model/ÏîÄ¿¹ÜÀí/ClsPM_CustomerTaskBillSub.cs
New file
@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsPM_CustomerTaskBillSub : DBUtility.ClsXt_BaseBillSub
    {
    }
}
Model/ÏîÄ¿¹ÜÀí/ClsPM_ProjectMoneyBillMain.cs
New file
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsPM_ProjectMoneyBillMain : DBUtility.ClsXt_BaseBillMain
    {
        public Int64 HProjectID;    //int       é¡¹ç›®å†…码
        public string HProNumber;//    varchar(50)    //项目代码
        public string HProName;//    varchar(50)    é¡¹ç›®é˜¶æ®µ
        public Int64 HCusID;//        int        //客户
        public Int64 HPMTeamID;//     int  äº¤ä»˜æ–¹
        public Int64 HPMEmpID;//    int     é¡¹ç›®ç»ç†
        public Int64 HWorkEmpID;//    int     å®žæ–½æ‹…当
        public Int64 HManagerID;//    int     ç®¡ç†å‘˜
        public Int64 HOrgID;//        int    //组织
    }
}
Model/ÏîÄ¿¹ÜÀí/ClsPM_ProjectMoneyBillSub.cs
New file
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsPM_ProjectMoneyBillSub : DBUtility.ClsXt_BaseBillSub
    {
        public Int64 HProMoneyID;    //int --项目费用
        public decimal HQty;        //money --数量
        public decimal HPrice;        //money --单价
        public decimal HMoney;        //money --金额
    }
}
WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
@@ -4634,6 +4634,247 @@
        }
        #endregion
        #region  é¡¹ç›®è´¹ç”¨  æŸ¥è¯¢,审核,反审核,禁用,反禁用
        /// <summary>
        /// ä¾›åº”商分类  æŸ¥è¯¢
        /// </summary>
        /// <param name="sWhere"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        [Route("Gy_BadReason/Gy_ProjectMoneyList")]
        [HttpGet]
        public object Gy_ProjectMoneyList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Gy_ProjectMoney_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql1 = "select * from  h_v_Gy_ProjectMoney where 1 = 1";
                string sql = sql1 + sWhere + " order by é¡¹ç›®è´¹ç”¨ä»£ç  ";
                ds = oCN.RunProcReturn(sql, "h_v_Gy_ProjectMoney");
                //添加列名
                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)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// é¡¹ç›®è´¹ç”¨ å®¡æ ¸ã€åå®¡æ ¸
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Gy_BadReason/AuditGy_ProjectMoney")]
        [HttpGet]
        public object AuditGy_ProjectMoney(int HInterID, int IsAudit, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_ProjectMoney_Check", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_ProjectMoney where HItemID=" + HInterID, "Gy_ProjectMoney");
                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_ProjectMoney 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_ProjectMoney 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;
            }
        }
        /// <summary>
        /// é¡¹ç›®è´¹ç”¨ ç¦ç”¨ã€åç¦ç”¨
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsStop">禁用(0),反禁用(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Gy_BadReason/StopGy_ProjectMoney")]
        [HttpGet]
        public object StopGy_ProjectMoney(int HInterID, int IsStop, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_ProjectMoney_Close", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "禁用失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_ProjectMoney where HItemID=" + HInterID, "Gy_SupType");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsStop == 0)  //禁用判断
                    {
                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已禁用!不能再次禁用!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsStop == 1) //反禁用判断
                    {
                        if (ds.Tables[0].Rows[0]["HStopEmp"].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 (IsStop == 0)  //禁用判断
                {
                    oCN.RunProc("update Gy_ProjectMoney set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "禁用成功";
                    objJsonResult.data = null;
                }
                if (IsStop == 1) //反禁用判断
                {
                    oCN.RunProc("update Gy_ProjectMoney set HStopEmp='',HStopTime=null,HStopflag=0 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
        #region å¼‚常类型  æŸ¥è¯¢
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -349,14 +349,20 @@
                    entryid_PGD = arr[1];
                }
                //截取条码类型 å‰ä¸‰ä½
                string BillNoType = BillNo_PGD.Substring(0, Math.Min(3, BillNo_PGD.Length));
                //截取条码类型2 å‰å››ä½
                string BillNoType2 = BillNo_PGD.Substring(0, Math.Min(4, BillNo_PGD.Length));
                //截取内码
                string BillNo = BillNo_PGD.Substring(3, Math.Min(BillNo_PGD.Length - 3, BillNo_PGD.Length));
                string sErr = "";
                switch (BillNoType2)
                {
                    case "GXLX"://流转卡
                        string sErr = "";
                        string sql = "";
                        if (oSystemParameter.ShowBill(ref sErr))
                        {
                            if (oSystemParameter.omodel.WMS_CampanyName == "乔一")
@@ -365,24 +371,297 @@
                            }
                            else
                            {
                                ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList  where å•据号= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList");
                                if (oSystemParameter.ShowBill(ref sErr))
                                {
                                    switch (oSystemParameter.omodel.QC_FirstPieceCheckBill_QCSchemeSource)
                                    {
                                        case "工序":
                                            sql = "exec h_p_QC_FirstPieceCheck_GetProcessExchangeBillList " + "'工序','" + BillNo_PGD + "'";
                                            ds = oCN.RunProcReturn(sql, "h_p_QC_FirstPieceCheck_GetProcessExchangeBillList");
                                            break;
                                        case "物料":
                                            sql = "exec h_p_QC_FirstPieceCheck_GetProcessExchangeBillList " + "'物料','" + BillNo_PGD + "'";
                                            ds = oCN.RunProcReturn(sql, "h_p_QC_FirstPieceCheck_GetProcessExchangeBillList");
                                            break;
                                        case "工艺路线":
                                            sql = "exec h_p_QC_FirstPieceCheck_GetProcessExchangeBillList " + "'工艺路线','" + BillNo_PGD + "'";
                                            ds = oCN.RunProcReturn(sql, "h_p_QC_FirstPieceCheck_GetProcessExchangeBillList");
                                            break;
                                    }
                                }
                            }
                        }
                        break;
                    case "GXJZ":
                        //截取条码类型 å‰ä¸‰ä½
                        string HBillNo = HBarCode.Substring(4, HBarCode.Length - 4);
                        ds = oCN.RunProcReturn("select * from Sc_StationInBillMain where HBillNo = '" + HBillNo + "'", "Sc_StationInBillMain");
                        Int64 HStationInInterID = 0;
                        if (ds != null || ds.Tables[0].Rows.Count > 0)
                        {
                            HStationInInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]);
                        }
                        if (oSystemParameter.ShowBill(ref sErr))
                        {
                            switch (oSystemParameter.omodel.QC_FirstPieceCheckBill_QCSchemeSource)
                            {
                                case "工序":
                                    sql = "exec h_p_QC_FirstPiece_GetStationInBillList " + "'工序','" + HStationInInterID + "'";
                                    ds = oCN.RunProcReturn(sql, "h_p_QC_FirstPiece_GetStationInBillList");
                                    break;
                                case "物料":
                                    sql = "exec h_p_QC_FirstPiece_GetStationInBillList " + "'物料','" + HStationInInterID + "'";
                                    ds = oCN.RunProcReturn(sql, "h_p_QC_FirstPiece_GetStationInBillList");
                                    break;
                                case "工艺路线":
                                    sql = "exec h_p_QC_FirstPiece_GetStationInBillList " + "'工艺路线','" + HStationInInterID + "'";
                                    ds = oCN.RunProcReturn(sql, "h_p_QC_FirstPiece_GetStationInBillList");
                                    break;
                            }
                        }
                        break;
                    case "MO00":
                        if (oSystemParameter.ShowBill(ref sErr))
                        {
                            switch (oSystemParameter.omodel.QC_FirstPieceCheckBill_QCSchemeSource)
                            {
                                case "工序":
                                    sql = "exec h_p_QC_ProcessCheck_GetICMOList " + "'工序','" + HBarCode + "'";
                                    ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetICMOList");
                                    break;
                                case "物料":
                                    sql = "exec h_p_QC_ProcessCheck_GetICMOList " + "'物料','" + HBarCode + "'";
                                    ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetICMOList");
                                    break;
                                case "工艺路线":
                                    sql = "exec h_p_QC_ProcessCheck_GetICMOList " + "'工艺路线','" + HBarCode + "'";
                                    ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetICMOList");
                                    break;
                            }
                        }
                        break;
                    default:
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "条码错误!";
                        objJsonResult.data = null;
                        return objJsonResult;
                        if (oSystemParameter.omodel.WMS_CampanyName == "乔一")
                        { //系统参数是否为只显示当前登录用户关联的工序信息,N为否,Y为是
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "条码错误!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            break;
                        }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                switch (BillNoType)
                //得到信息
                {
                    case "HCX"://生产资源码
                        ds = oCN.RunProcReturn("select * from h_v_Gy_SourceList  where æ¡ç ç¼–号 = '" + BillNo + "'", "h_v_Gy_SourceList");
                        break;
                }
                if (ds != null)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回数据,条码前缀错误。";
                    objJsonResult.data = "";
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region PDA工序检验单扫码获取信息
        [Route("MES_ProcessBill_PDA/HBarCode_KeyDown")]
        [HttpGet]
        public object HBarCode_KeyDown(string HBarCode, string HInterID, string UserID, string HBillType)
        {
            try
            {
                if (HBarCode == null || HBarCode.Equals(""))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "空白码,条形码不能为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //拆分条形码
                string sBillBarCode = HBarCode.Trim();
                string[] NewBarCode;
                if (sBillBarCode.CompareTo("#") > 0)
                {
                    NewBarCode = sBillBarCode.Split(Convert.ToChar("#"));
                    sBillBarCode = NewBarCode[0];
                }
                string sBillNo = sBillBarCode; //条形码
                string[] arr = sBillNo.Split('&'); //以符号‘&’分割条形码
                string BillNo_PGD = arr[0]; //单据号
                string entryid_PGD = "";//子id
                if (arr.Length > 1)
                {
                    entryid_PGD = arr[1];
                }
                //截取条码类型 å‰ä¸‰ä½
                string BillNoType = BillNo_PGD.Substring(0, Math.Min(3, BillNo_PGD.Length));
                //截取条码类型2 å‰å››ä½
                string BillNoType2 = BillNo_PGD.Substring(0, Math.Min(4, BillNo_PGD.Length));
                //截取内码
                string BillNo = BillNo_PGD.Substring(3, Math.Min(BillNo_PGD.Length - 3, BillNo_PGD.Length));
                string sErr = "";
                switch (BillNoType2)
                {
                    case "GXLX"://流转卡
                        string sql = "";
                        if (oSystemParameter.ShowBill(ref sErr))
                        {
                            if (oSystemParameter.omodel.WMS_CampanyName == "乔一")
                            { //系统参数是否为只显示当前登录用户关联的工序信息,N为否,Y为是
                                ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList  where å•据号= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList");
                            }
                            else
                            {
                                if (oSystemParameter.ShowBill(ref sErr))
                                {
                                    switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource)
                                    {
                                        case "工序":
                                            sql = "exec h_p_QC_ProcessCheck_GetProcessExchangeBillList " + "'工序','" + BillNo_PGD + "'";
                                            ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetProcessExchangeBillList");
                                            break;
                                        case "物料":
                                            sql = "exec h_p_QC_ProcessCheck_GetProcessExchangeBillList " + "'物料','" + BillNo_PGD + "'";
                                            ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetProcessExchangeBillList");
                                            break;
                                        case "工艺路线":
                                            sql = "exec h_p_QC_ProcessCheck_GetProcessExchangeBillList " + "'工艺路线','" + BillNo_PGD + "'";
                                            ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetProcessExchangeBillList");
                                            break;
                                    }
                                }
                            }
                        }
                        break;
                    case "GXCZ":
                        ds = oCN.RunProcReturn("select * from Sc_StationOutBillMain where HBillNo = '" + HBarCode + "'", "Sc_StationOutBillMain");
                        Int64 HStationOutInterID = 0;
                        if (ds != null || ds.Tables[0].Rows.Count > 0)
                        {
                            HStationOutInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]);
                        }
                        if (oSystemParameter.ShowBill(ref sErr))
                        {
                            switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource)
                            {
                                case "工序":
                                    sql = "exec h_p_QC_ProcessCheck_GetStationOutBillList " + "'工序','" + HStationOutInterID + "'";
                                    ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetStationOutBillList");
                                    break;
                                case "物料":
                                    sql = "exec h_p_QC_ProcessCheck_GetStationOutBillList " + "'物料','" + HStationOutInterID + "'";
                                    ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetStationOutBillList");
                                    break;
                                case "工艺路线":
                                    sql = "exec h_p_QC_ProcessCheck_GetStationOutBillList " + "'工艺路线','" + HStationOutInterID + "'";
                                    ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetStationOutBillList");
                                    break;
                            }
                        }
                        break;
                    case "MO00":
                        if (oSystemParameter.ShowBill(ref sErr))
                        {
                            switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource)
                            {
                                case "工序":
                                    sql = "exec h_p_QC_ProcessCheck_GetICMOList " + "'工序','" + HBarCode + "'";
                                    ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetICMOList");
                                    break;
                                case "物料":
                                    sql = "exec h_p_QC_ProcessCheck_GetICMOList " + "'物料','" + HBarCode + "'";
                                    ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetICMOList");
                                    break;
                                case "工艺路线":
                                    sql = "exec h_p_QC_ProcessCheck_GetICMOList " + "'工艺路线','" + HBarCode + "'";
                                    ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheck_GetICMOList");
                                    break;
                            }
                        }
                        break;
                    default:
                        if (oSystemParameter.omodel.WMS_CampanyName == "乔一")
                        { //系统参数是否为只显示当前登录用户关联的工序信息,N为否,Y为是
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "条码错误!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            break;
                        }
                }
                switch (BillNoType)
                //得到信息
                {
                    case "HCX"://生产资源码
                        ds = oCN.RunProcReturn("select * from h_v_Gy_SourceList  where æ¡ç ç¼–号 = '" + BillNo + "'", "h_v_Gy_SourceList");
                        break;
                }
                if (ds != null)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回数据,条码前缀错误。";
                    objJsonResult.data = "";
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
@@ -818,6 +1097,8 @@
                long HProcID = list[0].HProcID;//工序ID
                long HPRDORGID = list[0].HPRDORGID;//组织ID
                bool HLastResult = list[0].HLastResult;//试样结论
                long HProcExchInterID = list[0].HProcExchInterID;//流转卡ID
                long HProcExchEntryID = list[0].HProcExchEntryID;//流转卡子ID
                //表体数据
                List<Model.ClsQC_FirstPieceCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(msg_entry);
@@ -903,10 +1184,10 @@
                    oCN.RunProc("Insert Into QC_FirstPieceCheckBillMain " +
                    "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
                    ",HYear,HPeriod,HMaterID,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchBillNo" +
                    ",HPRDORGID,HLastResult)" +
                    ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID)" +
                    " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" +
                    "," + HYear + "," + HPeriod + ",'" + HMaterID + "','" + HSourceID + "'," + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo + "','" + HProcExchBillNo + "'" +  
                    "," + HPRDORGID + ",'" + HLastResult + "') ");
                    "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + ") ");
                    //插入子表
                    foreach (Model.ClsQC_FirstPieceCheckBillSub oSub in BillNew.DetailColl)
WebAPI/Controllers/WebAPIController.cs
@@ -7859,6 +7859,287 @@
        }
        #endregion
        #region  é¡¹ç›®è´¹ç”¨  è®¾ç½®åˆ—表/保存/编辑/删除方法
        /// <summary>
        ///  é¡¹ç›®è´¹ç”¨ ä¿å­˜
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("SaveGy_ProjectMoneyList")]
        [HttpPost]
        public object SaveGy_ProjectMoneyList([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();
            //查看权限
            if (!DBUtility.ClsPub.Security_Log("Gy_ProjectMoney_Edit", 1, false, msg2))
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无保存权限!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            Int64 HItemID = 0;
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            //获取最大ID值赋值
            DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_ProjectMoney ", "Gy_ProjectMoney");
            if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
            {
                //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
                var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]);
                maxid += 1;
                HItemID = maxid;
            }
            ListModels oListModels = new ListModels();
            try
            {
                WebAPI.DLL.ClsGy_ProjectMoney_Ctl oBill = new WebAPI.DLL.ClsGy_ProjectMoney_Ctl();
                List<Model.ClsGy_ProjectMoney_Model> lsmain = new List<Model.ClsGy_ProjectMoney_Model>();
                msg1 = msg1.Replace("\\", "");
                msg1 = msg1.Replace("\n", "");
                lsmain = oListModels.getObjectByJson_Gy_ProjectMoney(msg1);
                foreach (Model.ClsGy_ProjectMoney_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_ProjectMoney where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_ProjectMoney");
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    //新增时判断
                    if (oItem.HItemID == 0)
                    {
                        if (ds == null || ds.Tables[0].Rows.Count == 0)
                        {
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "保存失败!代码重复!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        //检查父级是否存在
                        string sParent;
                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
                        if (sParent.Trim() == "")
                        {
                            oBill.oModel.HParentID = 0;
                        }
                        else
                        {
                            if (oBill.HavParentCode(sParent.Trim(), HItemID))
                            {
                                oBill.oModel.HParentID = oBill.oModel.HItemID;
                            }
                            else
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "保存失败!上级代码不存在或被禁用!";
                                objJsonResult.data = 1;
                                return objJsonResult;
                            }
                        }
                    }
                    else//编辑时判断
                    {
                        //检查父级是否存在
                        string sParent;
                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
                        if (sParent.Trim() == "")
                        {
                            oBill.oModel.HParentID = 0;
                        }
                        else
                        {
                            if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
                            {
                                oBill.oModel.HParentID = oBill.oModel.HItemID;
                            }
                            else
                            {
                                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.HShortNumber = sShortNumber;//短代码
                    oItem.HEndFlag = true;//末级标志
                    oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //等级
                    oItem.HMakeEmp = msg2; //创建人
                    oBill.oModel = oItem;
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.oModel.HItemID == 0)
                {
                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    bResult = oBill.AddNew();
                }
                else
                {
                    bResult = oBill.ModifyByID(oBill.oModel.HItemID);
                }
                if (bResult)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单");
                    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;
            }
        }
        /// <summary>
        /// é¡¹ç›®è´¹ç”¨ èŽ·å–ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [Route("GetGy_ProjectMoneyDetail")]
        [HttpGet]
        public ApiResult<DataSet> GetGy_ProjectMoneyDetail(string HID)
        {
            var model = LuBaoSevice.GetGy_ProjectMoneyDetail(HID);
            return model;
        }
        /// <summary>
        /// é¡¹ç›®è´¹ç”¨ åˆ é™¤åŠŸèƒ½
        /// </summary>
        /// <returns></returns>
        [Route("DeltetGy_ProjectMoney")]
        [HttpGet]
        public object DeltetGy_ProjectMoney(string HItemID, string user)
        {
            DataSet ds;
            //string ModRightNameCheck = "Sc_ProcessReport_check";
            try
            {
                //删除权限
                if (!DBUtility.ClsPub.Security_Log("Gy_ProjectMoney_Drop", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无删除权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                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_ProjectMoney where HItemID=" + HItemID, "Gy_ProjectMoney");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有数据,无法删除!";
                    objJsonResult.data = null;
                    return objJsonResult; ;
                }
                oCN.RunProc("delete Gy_ProjectMoney 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
        /// <summary>
        /// ç”¨å…³è”工序获取信息
@@ -10950,6 +11231,47 @@
            }
        }
        /// <summary>
        /// èŽ·å–å•æ®æ¨¡å—åç§°
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetModuleName")]
        [HttpGet]
        public object GetModuleName(string HModuleType)
        {
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn("Select * from Xt_BillType where HNumber = '" + HModuleType + "'", "Xt_BillType");
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo;
                    objjson.data = null;
                    return objjson;
                }
                else
                {
                    objjson.code = "1";
                    objjson.count = 1;
                    objjson.Message = "获取成功!";
                    objjson.data = ds.Tables[0];
                    return objjson;
                }
            }
            catch (Exception ex)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败" + ex.ToString();
                objjson.data = null;
                return objjson;
            }
        }
    }
}
WebAPI/Controllers/Æ·ÖʹÜÀí/¹¤Ðò¼ìÑéµ¥/MES_ProcessCheckBill_PDAController.cs
@@ -66,6 +66,8 @@
                long HProcID = list[0].HProcID;//工序ID
                long HPRDORGID = list[0].HPRDORGID;//组织ID
                bool HLastResult = list[0].HLastResult;//试样结论
                Int64 HProcExchInterID = list[0].HProcExchInterID;//指引卡ID
                Int64 HProcExchEntryID = list[0].HProcExchEntryID;//指引卡子ID
                //表体数据
                List<Model.ClsQC_ProcessCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillSub>>(msg_entry);
@@ -152,10 +154,10 @@
                    oCN.RunProc("Insert Into QC_ProcessCheckBillMain " +
                    "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
                    ",HYear,HPeriod,HMaterID,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchBillNo" +
                    ",HPRDORGID,HLastResult)" +
                    ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HProcID)" +
                    " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" +
                    "," + HYear + "," + HPeriod + ",'" + HMaterID + "','" + HSourceID + "'," + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo + "','" + HProcExchBillNo + "'" +
                    "," + HPRDORGID + ",'" + HLastResult + "') ");
                    "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HProcID + ") ");
                    //插入子表
                    foreach (Model.ClsQC_ProcessCheckBillSub oSub in BillNew.DetailColl)
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -770,10 +770,176 @@
        #endregion
        #region ç­ç»„资料
        /// <summary>
        /// æ‰«ç è¿”回班组信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetGroup_Json")]
        [HttpGet]
        public object GetGroup_Json(string HBarCode, Int64 HStockOrgID)
        {
            try
            {
                Int64 HGroupID = 0;
                HGroupID = DBUtility.ClsPub.isLong(HBarCode);
                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Group with(nolock) where HStopflag=0 and HItemID=" + HGroupID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Group");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录,请确认所扫班组条码是否属于该组织,且为非禁用状态!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "返回班组信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// èŽ·å–ç­ç»„åˆ—è¡¨ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetGroupList_Json")]
        [HttpGet]
        public object GetGroupList_Json(string Group, Int64 HStockOrgID)
        {
            try
            {
                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Group with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Group + "%' or HName like '%" + Group + "%')", "Gy_Group");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何班组记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "返回班组信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region æ‰«ç æ¨¡å—调用方法
        #region ç›´æŽ¥è°ƒæ‹¨    èŽ·å–è°ƒæ‹¨å‡ºè´§ç±»åž‹
        /// <summary>
        /// èŽ·å–è°ƒæ‹¨å‡ºè´§ç±»åž‹
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetStockMoveStyle_Json")]
        [HttpGet]
        public Object GetStockMoveStyle_Json()
        {
            try
            {
                ds = oWebs.get_StockMoveStyle();
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "查询不到出货类型信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取出货类型信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç›´æŽ¥è°ƒæ‹¨    èŽ·å–è°ƒæ‹¨æ–¹å‘
        /// <summary>
        /// èŽ·å–è°ƒæ‹¨æ–¹å‘
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetMoveDirect_Json")]
        [HttpGet]
        public Object GetMoveDirect_Json()
        {
            try
            {
                ds = oWebs.get_MoveDirect();
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "查询不到调拨方向信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取调拨方向信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region æ ¹æ®å•据类型获取单据子类型
@@ -1279,6 +1445,80 @@
        #region æäº¤ç”Ÿå•处理方法
        #region ç”Ÿäº§æ±‡æŠ¥    ä¸Šä¼ ç”Ÿå•
        #region ç”Ÿäº§æ±‡æŠ¥    æ–°å¢žæ¨¡å¼
        /// <summary>
        /// ç”Ÿäº§æ±‡æŠ¥æ–°å¢žä¸Šä¼ 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveICMOReportBill_Json")]
        [HttpPost]
        public object set_SaveICMOReportBill_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsSc_ICMOReportBillMain> lsmain = new List<Model.ClsSc_ICMOReportBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getICMOReportBillMainByJson(msg1);
                WebS.ClsSc_ICMOReportBillMain websLsmain = new WebS.ClsSc_ICMOReportBillMain();
                string sSourceType = lsmain[0].HMainSourceBillType;
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = lsmain[0].HBillType;
                websLsmain.HDate = lsmain[0].HDate;
                websLsmain.HDeptID = lsmain[0].HDeptID;
                websLsmain.HGroupID = lsmain[0].HGroupID;
                websLsmain.HEmpID = lsmain[0].HEmpID;
                websLsmain.HCheckType = lsmain[0].HCheckType;
                websLsmain.HRemark = lsmain[0].HRemark;
                websLsmain.HBillSubType = lsmain[0].HBillSubType;
                if (lsmain[0].HMainSourceBillType == "3710")
                {
                    websLsmain.HMainSourceBillType = "生产订单";
                }
                else
                {
                    websLsmain.HMainSourceBillType = "手工录入";
                }
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HBillerID = lsmain[0].HBillerID;
                websLsmain.HPRDORGID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveICMOReportBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    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;
            }
        }
        #endregion
        #endregion
        #region ç”Ÿäº§å…¥åº“    ä¸Šä¼ ç”Ÿå•
        #region ç”Ÿäº§å…¥åº“    æ–°å¢žæ¨¡å¼
@@ -1626,6 +1866,95 @@
        #endregion
        #region é¢†æ–™å‡ºåº“    ä¸Šä¼ ç”Ÿå•
        #region é¢†æ–™å‡ºåº“    æ–°å¢žæ¨¡å¼
        /// <summary>
        /// é¢†æ–™å‡ºåº“新增上传
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveMateOutBill_Json")]
        [HttpPost]
        public object set_SaveMateOutBill_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_MateOutBillMain> lsmain = new List<Model.ClsKf_MateOutBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getMateOutBillMainByJson(msg1);
                WebS.ClsKf_MateOutBillMain websLsmain = new WebS.ClsKf_MateOutBillMain();
                string sSourceType = lsmain[0].HMainSourceBillType;
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = lsmain[0].HBillType;
                websLsmain.HDate = lsmain[0].HDate;
                websLsmain.HDeptID = lsmain[0].HDeptID;
                websLsmain.HWHID = lsmain[0].HWHID;
                websLsmain.HSCWHID = lsmain[0].HSCWHID;
                websLsmain.HSupID = lsmain[0].HSupID;
                websLsmain.HKeeperID = lsmain[0].HKeeperID;
                websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
                websLsmain.HEmpID = lsmain[0].HEmpID;
                websLsmain.HManagerID = lsmain[0].HManagerID;
                websLsmain.HRemark = lsmain[0].HRemark;
                websLsmain.HExplanation = lsmain[0].HExplanation;
                websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
                websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
                websLsmain.HBillSubType = lsmain[0].HBillSubType;
                if (lsmain[0].HMainSourceBillType == "3720")
                {
                    websLsmain.HMainSourceBillType = "生产用料清单";
                }
                else if (lsmain[0].HMainSourceBillType == "1214")
                {
                    websLsmain.HMainSourceBillType = "生产发料通知单";
                }
                else if (lsmain[0].HMainSourceBillType == "3721")
                {
                    websLsmain.HMainSourceBillType = "生产备料单";
                }
                else
                {
                    websLsmain.HMainSourceBillType = "手工录入";
                }
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HBillerID = lsmain[0].HBillerID;
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveMateOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    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;
            }
        }
        #endregion
        #endregion
        #region é”€å”®å‡ºåº“    ä¸Šä¼ ç”Ÿå•
@@ -1768,8 +2097,85 @@
        #endregion
        #region å§”外领料    ä¸Šä¼ ç”Ÿå•
        #region å§”外领料    æ–°å¢žæ¨¡å¼
        /// <summary>
        /// å§”外领料新增上传
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveEntrustOutBill_Json")]
        [HttpPost]
        public object set_SaveEntrustOutBill_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_EntrustOutBillMain> lsmain = new List<Model.ClsKf_EntrustOutBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getEntrustOutBillMainByJson(msg1);
                WebS.ClsKf_EntrustOutBillMain websLsmain = new WebS.ClsKf_EntrustOutBillMain();
                string sSourceType = lsmain[0].HMainSourceBillType;
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = lsmain[0].HBillType;
                websLsmain.HDate = lsmain[0].HDate;
                websLsmain.HDeptID = lsmain[0].HDeptID;
                websLsmain.HWHID = lsmain[0].HWHID;
                websLsmain.HSCWHID = lsmain[0].HSCWHID;
                websLsmain.HSupID = lsmain[0].HSupID;
                websLsmain.HKeeperID = lsmain[0].HKeeperID;
                websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
                websLsmain.HEmpID = lsmain[0].HEmpID;
                websLsmain.HMangerID = lsmain[0].HMangerID;
                websLsmain.HRemark = lsmain[0].HRemark;
                websLsmain.HExplanation = lsmain[0].HExplanation;
                websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
                websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
                websLsmain.HBillSubType = lsmain[0].HBillSubType;
                if (lsmain[0].HMainSourceBillType == "1604")
                {
                    websLsmain.HMainSourceBillType = "委外用料清单";
                }
                else
                {
                    websLsmain.HMainSourceBillType = "手工录入";
                }
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HBillerID = lsmain[0].HBillerID;
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveEntrustOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    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;
            }
        }
        #endregion
        #region å§”外领料    æ ¡éªŒæ¨¡å¼
@@ -2034,6 +2440,111 @@
        #region ç›´æŽ¥è°ƒæ‹¨    ä¸Šä¼ ç”Ÿå•
        #region ç›´æŽ¥è°ƒæ‹¨    æ–°å¢žæ¨¡å¼
        /// <summary>
        /// ç›´æŽ¥è°ƒæ‹¨æ–°å¢žä¸Šä¼ 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveMoveStockBill_Json")]
        [HttpPost]
        public object set_SaveMoveStockBill_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_MoveStockBillMain> lsmain = new List<Model.ClsKf_MoveStockBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getMoveStockBillMainByJson(msg1);
                WebS.ClsKf_MoveStockBillMain websLsmain = new WebS.ClsKf_MoveStockBillMain();
                string sSourceType = lsmain[0].HMainSourceBillType;
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = lsmain[0].HBillType;
                websLsmain.HDate = lsmain[0].HDate;
                websLsmain.HDeptID = lsmain[0].HDeptID;
                websLsmain.HWHID = lsmain[0].HWHID;
                websLsmain.HSCWHID = lsmain[0].HSCWHID;
                websLsmain.HSupID = lsmain[0].HSupID;
                websLsmain.HKeeperID = lsmain[0].HKeeperID;
                websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
                websLsmain.HEmpID = lsmain[0].HEmpID;
                websLsmain.HManagerID = lsmain[0].HManagerID;
                websLsmain.HRemark = lsmain[0].HRemark;
                websLsmain.HExplanation = lsmain[0].HExplanation;
                websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
                websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
                websLsmain.HBillSubType = lsmain[0].HBillSubType;
                websLsmain.HStockStyle = lsmain[0].HStockStyle;
                websLsmain.HTransferDirect = lsmain[0].HTransferDirect;
                websLsmain.HShipType = lsmain[0].HShipType;
                if (lsmain[0].HMainSourceBillType == "1402")
                {
                    websLsmain.HMainSourceBillType = "发货通知单";
                }
                else if (lsmain[0].HMainSourceBillType == "1243")
                {
                    websLsmain.HMainSourceBillType = "调拨申请单";
                }
                else if (lsmain[0].HMainSourceBillType == "3720")
                {
                    websLsmain.HMainSourceBillType = "生产用料清单";
                }
                else if (lsmain[0].HMainSourceBillType == "1604")
                {
                    websLsmain.HMainSourceBillType = "委外用料清单";
                }
                else if (lsmain[0].HMainSourceBillType == "1214")
                {
                    websLsmain.HMainSourceBillType = "生产发料通知单";
                }
                else if (lsmain[0].HMainSourceBillType == "3721")
                {
                    websLsmain.HMainSourceBillType = "生产备料单";
                }
                else if (lsmain[0].HMainSourceBillType == "1242")
                {
                    websLsmain.HMainSourceBillType = "出库申请单";
                }
                else
                {
                    websLsmain.HMainSourceBillType = "手工录入";
                }
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HBillerID = lsmain[0].HBillerID;
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveMoveStockBill(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    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;
            }
        }
        #endregion
        #region æ¢æ‰˜è°ƒæ‹¨å•
        /// <summary>
@@ -2125,6 +2636,48 @@
        #region æºå•条码处理方法
        #region ç”Ÿäº§æ±‡æŠ¥    æ‰«ææºå•条码
        /// <summary>
        /// ç”Ÿäº§æ±‡æŠ¥    æ‰«ææºå•条码
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_SourceBarCode_ICMOReport_Json")]
        [HttpGet]
        public object get_SourceBarCode_ICMOReport_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                WebSoBar = oWebs.get_SourceBarCode_ICMOReport(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, 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 = "成功";
                    objJsonResult.data = WebSoBar;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç”Ÿäº§å…¥åº“    æ‰«ææºå•条码
        /// <summary>
@@ -2209,6 +2762,48 @@
        #endregion
        #region å§”外入库    æ‰«ææºå•条码
        /// <summary>
        /// å§”外入库    æ‰«ææºå•条码
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_SourceBarCode_EntrustIn_Json")]
        [HttpGet]
        public object get_SourceBarCode_EntrustIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                WebSoBar = oWebs.get_SourceBarCode_EntrustIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, 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 = "成功";
                    objJsonResult.data = WebSoBar;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å…¶ä»–入库    æ‰«ææºå•条码
        /// <summary>
@@ -2250,9 +2845,6 @@
        }
        #endregion
        #region ç”Ÿäº§é¢†æ–™    æ‰«ææºå•条码
@@ -2619,6 +3211,66 @@
        #region ç‰©æ–™æ¡ç å¤„理方法    è°ƒæ‹¨æ¨¡å—
        /// <summary>
        /// ç‰©æ–™æ¡ç æ–‡æœ¬æ¡† è°ƒæ‹¨æ‰«ç è°ƒç”¨  20240222
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/get_BarCode_MoveStock_Json")]
        [HttpGet]
        public Object get_BarCode_MoveStock_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockInOrgID, Int64 HStockOutOrgID, string HScanStyle, string HCustom1, string HCustom2)
        {
            string sErrMsg = "";
            string sJXCode = "";
            if (oSystemParameter.ShowBill(ref sErrMsg) == true)
            {
                if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称     ç©ºç™½ä¸ºé€šç”¨
                {
                    sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
                    SourceFlag = true;
                }
                else
                {
                    sJXCode = sBarCode;
                }
                try
                {
                    WebSoBar = oWebs.get_BarCode_MoveStock(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo, HCustom1, HCustom2);
                    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 = "成功";
                        objJsonResult.data = WebSoBar;
                        return objJsonResult;
                    }
                }
                catch (Exception e)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "扫描条码失败!" + e.ToString();
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// ç‰©æ–™æ¡ç æ–‡æœ¬æ¡† æ‰«ç è°ƒç”¨
        /// </summary>
        /// <returns></returns>
WebAPI/Controllers/ÏîÄ¿¹ÜÀí/¹¤×÷ÈÎÎñ/PM_WorkTaskBillController.cs
@@ -1083,7 +1083,7 @@
                BillOld.MvarItemKey = "PM_WorkTaskBillMain";
                oCN.BeginTran();//开始事务
                //Type 0 å¼€å§‹ä»»åŠ¡  1  æ’¤é”€ä»»åŠ¡
                //Type 0 å¼€å§‹ä»»åŠ¡  1  æ’¤é”€ä»»åŠ¡  2结束任务
                if (Type == 0)
                {
                    //判断单据是否存在
@@ -1100,8 +1100,20 @@
                    }
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                    {
                        string  sql1= "update PM_WorkTaskBillMain  set  HTaskStatus='进行中' where HinterID = " + HInterID;
                        ds = oCN.RunProcReturn(sql1, "PM_WorkTaskBillMain");
                        if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HMainSourceBillType"])== "4759")
                        {
                            var lInterID = ds.Tables[0].Rows[0]["HMainSourceInterID"];
                            string sql1 = "update  PM_WorkTaskBillMain   set  HTaskStatus='已开始' where HinterID = " + HInterID;
                            oCN.RunProc(sql1);
                            string sql2 = "update PM_CustomerTaskBillMain  set  HTaskStatus='已开始' where HinterID = " + lInterID;
                            oCN.RunProc(sql2);
                        }
                        else
                        {
                            string sql2 = "update PM_WorkTaskBillMain  set  HTaskStatus='已开始' where HinterID = " + HInterID;
                            oCN.RunProc(sql2);
                        }
                    }
                }
@@ -1121,31 +1133,13 @@
                    }
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                    {
                        var lInterID = ds.Tables[0].Rows[0]["HMainSourceInterID"];
                        string sql1 = "update PM_WorkTaskBillMain  set   HTaskStatus='未开始' where HinterID = " + HInterID;
                        ds = oCN.RunProcReturn(sql1, "PM_WorkTaskBillMain");
                        oCN.RunProc(sql1);
                        string sql2 = "update PM_CustomerTaskBillMain   set  HTaskStatus='未开始' where HinterID = " + lInterID;
                        oCN.RunProc(sql2);
                    }
                }
                else if (Type == 2)
                {
                    //判断单据是否存在
                    DataSet ds;
                    string sql = "select * from PM_WorkTaskBillMain  where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, "PM_WorkTaskBillMain");
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据不存在!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                    {
                        string sql1 = "update PM_WorkTaskBillMain  set   HTaskStatus='已结束' where HinterID = " + HInterID;
                        ds = oCN.RunProcReturn(sql1, "PM_WorkTaskBillMain");
                    }
                }
                oCN.Commit();//提交事务
                objJsonResult.code = "0";
@@ -1157,6 +1151,7 @@
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "执行失败!" + e.ToString();
@@ -1530,6 +1525,30 @@
                string HSourceBillType = oSub.HSourceBillType;
                bool HFinishFlag = oSub.HFinishFlag;
                if (HFinishFlag==true)
                {
                    //判断单据是否存在
                    DataSet ds;
                    string sqls = "select * from PM_WorkTaskBillMain  where HinterID = " + HSourceInterID;
                    ds = oCN.RunProcReturn(sqls, "PM_WorkTaskBillMain");
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据不存在!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                    {
                        var lInterID = ds.Tables[0].Rows[0]["HMainSourceInterID"];
                        string sql1 = "update PM_WorkTaskBillMain  set   HTaskStatus='已完成' where HinterID = " + HSourceInterID;
                        oCN.RunProc(sql1);
                        string sql2 = "update PM_CustomerTaskBillMain   set   HTaskStatus='已完成' where HinterID = " + lInterID;
                        oCN.RunProc(sql2);
                    }
                }
                string sql = "insert into PM_WorkTaskReportBillSub" +
                    "(HInterID,HBillNo_bak,HEntryID,HRemark,HProjectID,HProNumber,HProjectStageID,HName,HTaskNote,HType,HRelTimes,HReportNote,HAdv,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo,HFinishFlag) " +
                    "values(" +
WebAPI/Controllers/ÏîÄ¿¹ÜÀí/¹¤³ÌÏîÄ¿/PM_ProjectBillController.cs
@@ -1775,5 +1775,1096 @@
        }
        #endregion
        #region é¡¹ç›®éœ€æ±‚及问题清单 ä¿å­˜/编辑
        /// <summary>
        /// ä¿å­˜é¡¹ç›®éœ€æ±‚及问题清单
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("PM_ProjectBill/SavePM_CustomerTaskBillMain")]
        [HttpPost]
        public object SavePM_CustomerTaskBillMain([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 refSav = sArray[1].ToString();//操作方式数据类型 1添加 3修改 2 å¤åˆ¶
            string user = sArray[2].ToString();//用户名
            string UserName = "";
            string s = "";
            ListModels oListModels = new ListModels();
            try
            {
                //保存权限
                if (!DBUtility.ClsPub.Security_Log_second("PM_CustomerTaskBillMain_Add", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DAL.ClsPM_CustomerTaskBillMain oBill = new DAL.ClsPM_CustomerTaskBillMain();
                List<Model.ClsPM_CustomerTaskBillMain> lsmain = new List<Model.ClsPM_CustomerTaskBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_PM_CustomerTaskBillMain(msg2);
                foreach (Model.ClsPM_CustomerTaskBillMain oItem in lsmain)
                {
                    if (refSav == "Add")
                    {
                        //单据号是否重复
                        if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据号重复!不允许保存!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    if (refSav == "Update")
                    {
                        if (BillOld1.ShowBill(oItem.HInterID, ref s) == false)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据有误!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        //判断是否可编辑
                        if (BillOld1.omodel.HChecker != "" && BillOld1.omodel.HChecker != null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据已经被审核,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (BillOld1.omodel.HBillStatus > 1)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据处于不可编辑状态,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = s + ",不允许修改";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    UserName = oItem.HMaker;  //制单人
                    oItem.HBillType = "4759";
                    oItem.HBillSubType = "4759";
                    //oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没有单据日期,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oBill.omodel = oItem;
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (refSav == "Add")
                {
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else if (refSav == "Update")
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = false;
                }
                if (bResult)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单");
                    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>
        /// è¿”回项目阶段列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("PM_ProjectBill/getPM_CustomerTaskBillMainList")]
        [HttpGet]
        public object getPM_CustomerTaskBillMainList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("PM_CustomerTaskBillMain_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_PM_CustomerTaskBillMainList order by å•据号 desc", "h_v_PM_CustomerTaskBillMainList");
                }
                else
                {
                    string sql1 = "select * from h_v_PM_CustomerTaskBillMainList where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by å•据号 desc";
                    ds = oCN.RunProcReturn(sql, "h_v_PM_CustomerTaskBillMainList");
                }
                //添加列名
                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)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é¡¹ç›®éœ€æ±‚及问题清单列表 èŽ·å–ç¼–è¾‘åˆ—è¡¨æ•°æ®
        [Route("PM_ProjectBill/PM_CustomerTaskBillMainEditList")]
        [HttpGet]
        public object PM_CustomerTaskBillMainEditList(string HInterID, string User)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("PM_CustomerTaskBillMain_Edit", 1, false, User))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (HInterID == null || HInterID.Equals(""))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID不能为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("select * from  h_v_PM_CustomerTaskBillMainList where HInterID =" + HInterID, "h_v_PM_CustomerTaskBillMainList");
                //添加列名
                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 = "查询成功!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é¡¹ç›®éœ€æ±‚及问题清单列表 å®¡æ ¸/反审核功能
        [Route("PM_ProjectBill/CheckPM_CustomerTaskBillMain")]
        [HttpGet]
        public object CheckPM_CustomerTaskBillMain(string HInterID, int IsAudit, string user)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("PM_CustomerTaskBillMain_Check", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from PM_CustomerTaskBillMain  where HInterID=" + HInterID, "PM_CustomerTaskBillMain ");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能再次审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"].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 PM_CustomerTaskBillMain  set HChecker='" + user + "',HCheckDate=getdate() where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "审核成功";
                    objJsonResult.data = null;
                }
                if (IsAudit == 1) //反审核判断
                {
                    oCN.RunProc("update PM_CustomerTaskBillMain  set HChecker='',HCheckDate=null where HInterID=" + 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
        #region é¡¹ç›®éœ€æ±‚及问题清单列表 å…³é—­/反关闭功能
        [Route("PM_ProjectBill/ClosePM_CustomerTaskBillMain")]
        [HttpGet]
        public object ClosePM_CustomerTaskBillMain(string HInterID, int IsAudit, string user)
        {
            try
            {
                //判断是否有关闭权限
                if (!DBUtility.ClsPub.Security_Log("PM_CustomerTaskBillMain_Close", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限关闭!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from PM_CustomerTaskBillMain  where HInterID=" + HInterID, "PM_CustomerTaskBillMain ");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //关闭判断
                    {
                        if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已关闭!不能再次关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反关闭判断
                    {
                        if (ds.Tables[0].Rows[0]["HCloseMan"].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 PM_CustomerTaskBillMain  set HCloseMan='" + user + "',HCloseDate=getdate() where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "关闭成功";
                    objJsonResult.data = null;
                }
                if (IsAudit == 1) //反审核判断
                {
                    oCN.RunProc("update PM_CustomerTaskBillMain  set HCloseMan='',HCloseDate=null where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反关闭成功";
                    objJsonResult.data = null;
                }
                oCN.Commit();
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "执行失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é¡¹ç›®éœ€æ±‚及问题清单列表 åˆ é™¤
        /// <summary>
        ///参数:string HInterID。
        ///返回值:object。
        /// </summary>
        [Route("PM_ProjectBill/PM_CustomerTaskBillMainDelete")]
        [HttpGet]
        public object PM_CustomerTaskBillMainDelete(string HInterID, string user)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("PM_CustomerTaskBillMain_Drop", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无删除权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (HInterID == null || HInterID.Equals(""))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID不能为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                oCN.RunProc("delete from PM_CustomerTaskBillMain   where HInterID = " + HInterID);
                oCN.RunProc("delete from PM_CustomerTaskBillSub  where HInterID='" + HInterID + "'");
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é¡¹ç›®éœ€æ±‚及问题清单列表  å‚¬ä¿ƒæ¬¡æ•°åŠŸèƒ½
        [Route("PM_ProjectBill/UpdateHHasten")]
        [HttpGet]
        public object UpdateHHasten(string HInterID, int HHasten, string user)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(HInterID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ClsPub.CurUserName = user;
                BillOld.MvarItemKey = "PM_CustomerTaskBillMain";
                oCN.BeginTran();//开始事务
                DataSet ds;
                string sql = "select * from PM_CustomerTaskBillMain   where HinterID = " + HInterID;
                ds = oCN.RunProcReturn(sql, "PM_CustomerTaskBillMain");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                {
                    string sql1 = "update PM_CustomerTaskBillMain   set   HHasten='" + HHasten + "' where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql1, "PM_CustomerTaskBillMain");
                }
                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="msg"></param>
        /// <returns></returns>
        [Route("PM_ProjectBill/SavePM_ProjectMoneyBillMain")]
        [HttpPost]
        public object SavePM_ProjectMoneyBillMain([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(); //子表
            string refSav = sArray[2].ToString();//操作方式数据类型 1添加 3修改 2 å¤åˆ¶
            string user = sArray[3].ToString();//用户名
            string UserName = "";
            string s = "";
            ListModels oListModels = new ListModels();
            try
            {
                //保存权限
                if (!DBUtility.ClsPub.Security_Log_second("PM_ProjectMoneyBillMain_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DAL.ClsPM_ProjectMoneyBillMain oBill = new DAL.ClsPM_ProjectMoneyBillMain();
                List<Model.ClsPM_ProjectMoneyBillMain> lsmain = new List<Model.ClsPM_ProjectMoneyBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_PM_ProjectMoneyBillMain(msg2);
                foreach (Model.ClsPM_ProjectMoneyBillMain oItem in lsmain)
                {
                    if (refSav == "Add")
                    {
                        //单据号是否重复
                        if (BillNew1.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据号重复!不允许保存!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    if (refSav == "Update")
                    {
                        if (BillOld1.ShowBill(oItem.HInterID, ref s) == false)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据有误!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        //判断是否可编辑
                        if (BillOld1.omodel.HChecker != "" && BillOld1.omodel.HChecker != null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据已经被审核,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (BillOld1.omodel.HBillStatus > 1)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据处于不可编辑状态,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = s + ",不允许修改";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    UserName = oItem.HMaker;  //制单人
                    oItem.HBillType = "4762";
                    oItem.HBillSubType = "4762";
                    //oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        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.ClsPM_ProjectMoneyBillSub> ls = new List<Model.ClsPM_ProjectMoneyBillSub>();
                ls = oListModels.getObjectByJson_PM_ProjectMoneyBillSub(msg3);
                int i = 0;
                foreach (Model.ClsPM_ProjectMoneyBillSub oItemSub in ls)
                {
                    i++;
                    oItemSub.HEntryID = i;
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;   //关闭类型
                    oBill.DetailColl.Add(oItemSub);
                }
                //保存
                //保存完毕后处理
                //保存
                //保存完毕后处理
                bool bResult;
                if (refSav == "Add")
                {
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else if (refSav == "Update")
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = false;
                }
                if (bResult)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单");
                    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>
        /// è¿”回项目费用列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("PM_ProjectBill/getPM_ProjectMoneyBillMainList")]
        [HttpGet]
        public object getPM_ProjectMoneyBillMainList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBillMain_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_PM_ProjectMoneyBillMainList order by å•据号 desc", "h_v_PM_ProjectMoneyBillMainList");
                }
                else
                {
                    string sql1 = "select * from h_v_PM_ProjectMoneyBillMainList where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by å•据号 desc";
                    ds = oCN.RunProcReturn(sql, "h_v_PM_ProjectMoneyBillMainList");
                }
                //添加列名
                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)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é¡¹ç›®è´¹ç”¨åˆ—表 èŽ·å–ç¼–è¾‘åˆ—è¡¨æ•°æ®
        [Route("PM_ProjectBill/PM_ProjectMoneyBillMainEditList")]
        [HttpGet]
        public object PM_ProjectMoneyBillMainEditList(string HInterID, string User)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBillMain_Edit", 1, false, User))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (HInterID == null || HInterID.Equals(""))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID不能为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("select * from  h_v_PM_ProjectMoneyBillMainList where HInterID =" + HInterID, "h_v_PM_ProjectMoneyBillMainList");
                //添加列名
                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 = "查询成功!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é¡¹ç›®è´¹ç”¨åˆ—表 å®¡æ ¸/反审核功能
        [Route("PM_ProjectBill/CheckPM_ProjectMoneyBillMain")]
        [HttpGet]
        public object CheckPM_ProjectMoneyBillMain(string HInterID, int IsAudit, string user)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("PM_ProjectMoneyBillMain_Check", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from PM_ProjectMoneyBillMain  where HInterID=" + HInterID, "PM_ProjectMoneyBillMain ");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能再次审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反审核判断
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"].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 PM_ProjectMoneyBillMain  set HChecker='" + user + "',HCheckDate=getdate() where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "审核成功";
                    objJsonResult.data = null;
                }
                if (IsAudit == 1) //反审核判断
                {
                    oCN.RunProc("update PM_ProjectMoneyBillMain  set HChecker='',HCheckDate=null where HInterID=" + 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
        #region é¡¹ç›®è´¹ç”¨åˆ—表 å…³é—­/反关闭功能
        [Route("PM_ProjectBill/ClosePM_ProjectMoneyBillMain")]
        [HttpGet]
        public object ClosePM_ProjectMoneyBillMain(string HInterID, int IsAudit, string user)
        {
            try
            {
                //判断是否有关闭权限
                if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBillMain_Close", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限关闭!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from PM_ProjectMoneyBillMain  where HInterID=" + HInterID, "PM_ProjectMoneyBillMain");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (IsAudit == 0)  //关闭判断
                    {
                        if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已关闭!不能再次关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反关闭判断
                    {
                        if (ds.Tables[0].Rows[0]["HCloseMan"].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 PM_ProjectMoneyBillMain  set HCloseMan='" + user + "',HCloseDate=getdate() where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "关闭成功";
                    objJsonResult.data = null;
                }
                if (IsAudit == 1) //反审核判断
                {
                    oCN.RunProc("update PM_ProjectMoneyBillMain  set HCloseMan='',HCloseDate=null where HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反关闭成功";
                    objJsonResult.data = null;
                }
                oCN.Commit();
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "执行失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é¡¹ç›®è´¹ç”¨åˆ—表 åˆ é™¤
        /// <summary>
        ///参数:string HInterID。
        ///返回值:object。
        /// </summary>
        [Route("PM_ProjectBill/PM_ProjectMoneyBillMainDelete")]
        [HttpGet]
        public object PM_ProjectMoneyBillMainDelete(string HInterID, string user)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("PM_ProjectMoneyBillMain_Drop", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无删除权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (HInterID == null || HInterID.Equals(""))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID不能为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                oCN.RunProc("delete from PM_ProjectMoneyBillMain   where HInterID = " + HInterID);
                oCN.RunProc("delete from PM_ProjectMoneyBillMain  where HInterID='" + HInterID + "'");
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/DLL/ClsGy_ProjectMoney_Ctl.cs
New file
@@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace WebAPI.DLL
{
    public class ClsGy_ProjectMoney_Ctl : DBUtility.ClsGy_Base_Ctl
    {
           SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        //原代码 ç”¨äºŽ æ›¿æ¢å­é¡¹ç›®
        public string HOldNumber;
        public Model.ClsGy_ProjectMoney_Model oModel = new Model.ClsGy_ProjectMoney_Model();
        //新增
        public override bool AddNew()
        {
            //
            try
            {
                oCn.BeginTran();
                oCn.RunProc("Insert into " + MvarItemKey + " " +
                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
                    ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " +
                    " 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 + "','" +DateTime.Now+ "','" + oModel.HUSEORGID + "','" + oModel.HUseFlag + "','" + oModel.HMakeEmp+ "','" + oModel.HUSEORGID + "')", ref DBUtility.ClsPub.sExeReturnInfo);
                //修改上级为非末级代码
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                oCn.RollBack();
                throw (e);
            }
        }
        //修改
        public override bool ModifyByID(Int64 sItemID)
        {
            try
            {
                oCn.BeginTran();
                oCn.RunProc("Update " + MvarItemKey + " set " +
                    " HNumber='" + oModel.HNumber + "'" +
                    ",HName='" + oModel.HName + "'" +
                    ",HShortNumber='" + oModel.HShortNumber + "'" +
                    ",HHelpCode='" + oModel.HHelpCode + "'" +
                    ",HModifyTime='" + DateTime.Now + "'" +
                    ",HUSEORGID='" + oModel.HUSEORGID + "'" +
                    ",HModifyEmp ='" + oModel.HMakeEmp + "'" +
                    ",HUseFlag='" + oModel.HUseFlag + "'" +
                    ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
                    ",HRemark= '" + oModel.HRemark + "' Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                //修改子项目代码
                oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
                //将上级 ä¸ºéžæœ«çº§
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                //
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                oCn.RollBack();
                throw (e);
            }
        }
        //根据代码判断信息
        public override bool HavParentCode(string sCode, Int64 sItemID)
        {
            DataSet DS;
            try
            {
                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
                if (DS.Tables[0].Rows.Count == 0)
                    return false;
                else
                {
                    oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]);
                    return true;
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        //构造函数
        public ClsGy_ProjectMoney_Ctl()
        {
            MvarItemKey = "Gy_ProjectMoney";
            MvarReportTitle = "项目费用设置";
            oModel = new Model.ClsGy_ProjectMoney_Model();
        }
    }
}
WebAPI/ListModels.cs
@@ -951,7 +951,7 @@
            List<Model.ClsGy_CusType_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_CusType_Model>>(jsonString);
            return list;
        }
        /// <summary>  
        /// å¤„理新增供应商分类表的json
        /// </summary>
@@ -963,7 +963,17 @@
            List<Model.ClsGy_SupType_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_SupType_Model>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增项目费用表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsGy_ProjectMoney_Model> getObjectByJson_Gy_ProjectMoney(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsGy_ProjectMoney_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_ProjectMoney_Model>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增异常类型表的json
        /// </summary>
@@ -1034,6 +1044,39 @@
        }
        /// <summary>
        /// å¤„理新增项目需求及问题清单表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsPM_CustomerTaskBillMain> getObjectByJson_PM_CustomerTaskBillMain(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsPM_CustomerTaskBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPM_CustomerTaskBillMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增项目费用表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsPM_ProjectMoneyBillMain> getObjectByJson_PM_ProjectMoneyBillMain(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsPM_ProjectMoneyBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPM_ProjectMoneyBillMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增项目费用子表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsPM_ProjectMoneyBillSub> getObjectByJson_PM_ProjectMoneyBillSub(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsPM_ProjectMoneyBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPM_ProjectMoneyBillSub>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增模具保养记录表主表的json
        /// </summary>
        /// <param name="jsonString"></param>
WebAPI/Properties/Settings.Designer.cs
@@ -26,7 +26,7 @@
        [global::System.Configuration.ApplicationScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
        [global::System.Configuration.DefaultSettingValueAttribute("http://192.168.63.20/WEBS-WMS/WebService1.asmx")]
        [global::System.Configuration.DefaultSettingValueAttribute("http://192.168.63.53/WEBS-WMS/WebService1.asmx")]
        public string WebAPI_WebS_WebService1 {
            get {
                return ((string)(this["WebAPI_WebS_WebService1"]));
WebAPI/Properties/Settings.settings
@@ -3,7 +3,7 @@
  <Profiles />
  <Settings>
    <Setting Name="WebAPI_WebS_WebService1" Type="(Web Service URL)" Scope="Application">
      <Value Profile="(Default)">http://192.168.63.20/WEBS-WMS/WebService1.asmx</Value>
      <Value Profile="(Default)">http://192.168.63.53/WEBS-WMS/WebService1.asmx</Value>
    </Setting>
  </Settings>
</SettingsFile>
WebAPI/Service/LuBaoSevice.cs
@@ -584,7 +584,7 @@
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_PoStockStyle  where HItemID= " + HID + " ", "h_v_Gy_PoStockStyle");
            return dataSet;
        }
        /// <summary>
        /// ä¾›åº”商分类根据id获取信息
        /// </summary>
@@ -605,6 +605,25 @@
        }
        /// <summary>
        /// é¡¹ç›®è´¹ç”¨æ ¹æ®id获取信息
        /// </summary>
        public static ApiResult<DataSet> GetGy_ProjectMoneyDetail(string HID)
        {
            if (string.IsNullOrEmpty(HID))
                return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" };
            var dataSet = GetGy_ProjectMoneyDb(HID);
            if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
                return new ApiResult<DataSet> { code = -1, msg = "不存在项目费用数据" };
            return new ApiResult<DataSet> { code = 1, msg = "查询成功", data = dataSet };
        }
        public static DataSet GetGy_ProjectMoneyDb(string HID)
        {
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
             var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_ProjectMoney  where HItemID= " + HID + " ", "h_v_Gy_ProjectMoney");
            return dataSet;
        }
        /// <summary>
        ///客户分类根据id获取信息
        /// </summary>
        public static ApiResult<DataSet> GetGy_CusTypeDetail(string HID)
WebAPI/Web References/WebS/Reference.cs
Diff too large
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.DiscoveryDocumentReference" url="http://192.168.63.20/WEBS-WMS/WebService1.asmx?disco" filename="WebService1.disco" />
    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://192.168.63.20/WEBS-WMS/WebService1.asmx?wsdl" filename="WebService1.wsdl" />
    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://192.168.63.53/WEBS-WMS/WebService1.asmx?disco" filename="WebService1.disco" />
    <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://192.168.63.53/WEBS-WMS/WebService1.asmx?wsdl" filename="WebService1.wsdl" />
  </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://192.168.63.20/WEBS-WMS/WebService1.asmx?wsdl" docRef="http://192.168.63.20/WEBS-WMS/WebService1.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
  <soap address="http://192.168.63.20/WEBS-WMS/WebService1.asmx" xmlns:q1="http://tempuri.org/" binding="q1:WebService1Soap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
  <soap address="http://192.168.63.20/WEBS-WMS/WebService1.asmx" xmlns:q2="http://tempuri.org/" binding="q2:WebService1Soap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
  <contractRef ref="http://192.168.63.53/WEBS-WMS/WebService1.asmx?wsdl" docRef="http://192.168.63.53/WEBS-WMS/WebService1.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
  <soap address="http://192.168.63.53/WEBS-WMS/WebService1.asmx" xmlns:q1="http://tempuri.org/" binding="q1:WebService1Soap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
  <soap address="http://192.168.63.53/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
@@ -2,6 +2,123 @@
<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="set_SaveMouldStockBill_New">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="oMain" type="tns:ClsSc_MouldStockBillMain" />
            <s:element minOccurs="0" maxOccurs="1" name="sHSourceType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="ClsSc_MouldStockBillMain">
        <s:complexContent mixed="false">
          <s:extension base="tns:ClsXt_BaseBillMain">
            <s:sequence>
              <s:element minOccurs="1" maxOccurs="1" name="HSCWHID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HSupID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HEmpID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HManagerID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HWHID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HSecManagerID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HKeeperID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HDeptID" type="s:long" />
              <s:element minOccurs="0" maxOccurs="1" name="HExplanation" type="s:string" />
              <s:element minOccurs="0" maxOccurs="1" name="HInnerBillNo" type="s:string" />
              <s:element minOccurs="1" maxOccurs="1" name="HRedBlueFlag" type="s:boolean" />
              <s:element minOccurs="0" maxOccurs="1" name="HRepairType" type="s:string" />
              <s:element minOccurs="1" maxOccurs="1" name="HCorrespondentTypeID" type="s:long" />
            </s:sequence>
          </s:extension>
        </s:complexContent>
      </s:complexType>
      <s:complexType name="ClsXt_BaseBillMain">
        <s:sequence>
          <s:element minOccurs="1" maxOccurs="1" name="HYear" type="s:long" />
          <s:element minOccurs="1" maxOccurs="1" name="HPeriod" type="s:long" />
          <s:element minOccurs="0" maxOccurs="1" name="HBillType" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HBillSubType" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="HInterID" type="s:long" />
          <s:element minOccurs="1" maxOccurs="1" name="HDate" type="s:dateTime" />
          <s:element minOccurs="0" maxOccurs="1" name="HBillNo" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="HBillStatus" type="s:int" />
          <s:element minOccurs="1" maxOccurs="1" name="HCheckItemNowID" type="s:long" />
          <s:element minOccurs="1" maxOccurs="1" name="HCheckItemNextID" type="s:long" />
          <s:element minOccurs="1" maxOccurs="1" name="HCheckFlowID" type="s:long" />
          <s:element minOccurs="0" maxOccurs="1" name="HRemark" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HEmpCode" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HMaker" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HMakeDate" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HUpDater" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HUpDateDate" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HChecker" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HCheckDate" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HBacker" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HBackDate" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HBackRemark" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HCloseMan" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HCloseDate" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="HCloseType" type="s:boolean" />
          <s:element minOccurs="0" maxOccurs="1" name="HDeleteMan" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HDeleteDate" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="HBillerID" type="s:long" />
          <s:element minOccurs="0" maxOccurs="1" name="HMainSourceBillNo" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HMainSourceBillType" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="HMainSourceInterID" type="s:long" />
          <s:element minOccurs="1" maxOccurs="1" name="HMainSourceEntryID" type="s:long" />
        </s:sequence>
      </s:complexType>
      <s:element name="set_SaveMouldStockBill_NewResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="set_SaveMouldStockBill_NewResult" type="s:boolean" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="MouldTempList_Modify">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="sHInterID" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="sHBillNo" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="sHBillType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="MouldTempList_ModifyResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="MouldTempList_ModifyResult" type="s:boolean" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetMouldSource">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="HBillType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HSourceBillNo" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HSourceType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetMouldSourceResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetMouldSourceResult">
              <s:complexType>
                <s:sequence>
                  <s:element ref="s:schema" />
                  <s:any />
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetSc_MouldStockBillMain_TempList">
        <s:complexType>
          <s:sequence>
@@ -1782,6 +1899,22 @@
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_InfoByBarCodeForReport">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="sBarCode" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_InfoByBarCodeForReportResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="get_InfoByBarCodeForReportResult" type="tns:ClsGy_BarCodeBill_WMS_Model_View" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_InfoByStationInBill">
        <s:complexType>
          <s:sequence>
@@ -3200,6 +3333,28 @@
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_SourceBarCode_ICMOReport">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="HInterID" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="HBillNo" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HBillType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HSourceBillNo" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HSourceBillType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HMaker" type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="HStockOrgID" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_SourceBarCode_ICMOReportResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="get_SourceBarCode_ICMOReportResult" type="tns:ClsKf_ICStockBill_WMS" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_SourceBarCode_ProductIn">
        <s:complexType>
          <s:sequence>
@@ -3240,6 +3395,28 @@
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="get_SourceBarCode_POStockInResult" type="tns:ClsKf_ICStockBill_WMS" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_SourceBarCode_EntrustIn">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="HInterID" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="HBillNo" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HBillType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HSourceBillNo" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HSourceBillType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HMaker" type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="HStockOrgID" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_SourceBarCode_EntrustInResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="get_SourceBarCode_EntrustInResult" type="tns:ClsKf_ICStockBill_WMS" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
@@ -3870,124 +4047,7 @@
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="set_SaveMouldStockBill_New">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="oMain" type="tns:ClsSc_MouldStockBillMain" />
            <s:element minOccurs="0" maxOccurs="1" name="sHSourceType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="ClsSc_MouldStockBillMain">
        <s:complexContent mixed="false">
          <s:extension base="tns:ClsXt_BaseBillMain">
            <s:sequence>
              <s:element minOccurs="1" maxOccurs="1" name="HSCWHID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HSupID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HEmpID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HManagerID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HWHID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HSecManagerID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HKeeperID" type="s:long" />
              <s:element minOccurs="1" maxOccurs="1" name="HDeptID" type="s:long" />
              <s:element minOccurs="0" maxOccurs="1" name="HExplanation" type="s:string" />
              <s:element minOccurs="0" maxOccurs="1" name="HInnerBillNo" type="s:string" />
              <s:element minOccurs="1" maxOccurs="1" name="HRedBlueFlag" type="s:boolean" />
              <s:element minOccurs="0" maxOccurs="1" name="HRepairType" type="s:string" />
              <s:element minOccurs="1" maxOccurs="1" name="HCorrespondentTypeID" type="s:long" />
            </s:sequence>
          </s:extension>
        </s:complexContent>
      </s:complexType>
      <s:complexType name="ClsXt_BaseBillMain">
        <s:sequence>
          <s:element minOccurs="1" maxOccurs="1" name="HYear" type="s:long" />
          <s:element minOccurs="1" maxOccurs="1" name="HPeriod" type="s:long" />
          <s:element minOccurs="0" maxOccurs="1" name="HBillType" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HBillSubType" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="HInterID" type="s:long" />
          <s:element minOccurs="1" maxOccurs="1" name="HDate" type="s:dateTime" />
          <s:element minOccurs="0" maxOccurs="1" name="HBillNo" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="HBillStatus" type="s:int" />
          <s:element minOccurs="1" maxOccurs="1" name="HCheckItemNowID" type="s:long" />
          <s:element minOccurs="1" maxOccurs="1" name="HCheckItemNextID" type="s:long" />
          <s:element minOccurs="1" maxOccurs="1" name="HCheckFlowID" type="s:long" />
          <s:element minOccurs="0" maxOccurs="1" name="HRemark" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HEmpCode" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HMaker" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HMakeDate" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HUpDater" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HUpDateDate" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HChecker" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HCheckDate" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HBacker" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HBackDate" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HBackRemark" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HCloseMan" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HCloseDate" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="HCloseType" type="s:boolean" />
          <s:element minOccurs="0" maxOccurs="1" name="HDeleteMan" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HDeleteDate" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="HBillerID" type="s:long" />
          <s:element minOccurs="0" maxOccurs="1" name="HMainSourceBillNo" type="s:string" />
          <s:element minOccurs="0" maxOccurs="1" name="HMainSourceBillType" type="s:string" />
          <s:element minOccurs="1" maxOccurs="1" name="HMainSourceInterID" type="s:long" />
          <s:element minOccurs="1" maxOccurs="1" name="HMainSourceEntryID" type="s:long" />
        </s:sequence>
      </s:complexType>
      <s:element name="set_SaveMouldStockBill_NewResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="set_SaveMouldStockBill_NewResult" type="s:boolean" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="MouldTempList_Modify">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="sHInterID" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="sHBillNo" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="sHBillType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="MouldTempList_ModifyResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="MouldTempList_ModifyResult" type="s:boolean" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetMouldSource">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="HBillType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HSourceBillNo" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HSourceType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetMouldSourceResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetMouldSourceResult">
              <s:complexType>
                <s:sequence>
                  <s:element ref="s:schema" />
                  <s:any />
                </s:sequence>
              </s:complexType>
            </s:element>
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="set_AuditOtherInBill">
      <s:element name="set_CheckOtherInBill">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="oMain" type="tns:ClsKf_OtherInBillMain_K3" />
@@ -4026,6 +4086,22 @@
          <s:element minOccurs="0" maxOccurs="1" name="HDeleteDate" type="s:string" />
        </s:sequence>
      </s:complexType>
      <s:element name="set_CheckOtherInBillResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="set_CheckOtherInBillResult" type="s:boolean" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="set_AuditOtherInBill">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="oMain" type="tns:ClsKf_OtherInBillMain_K3" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="set_AuditOtherInBillResponse">
        <s:complexType>
          <s:sequence>
@@ -5549,22 +5625,6 @@
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_InfoByBarCodeForReport">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="sBarCode" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_InfoByBarCodeForReportResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="get_InfoByBarCodeForReportResult" type="tns:ClsGy_BarCodeBill_WMS_Model_View" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="set_SaveEntrustOutBill_BillCheck">
        <s:complexType>
          <s:sequence>
@@ -6732,22 +6792,6 @@
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="set_CheckOtherInBill">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="oMain" type="tns:ClsKf_OtherInBillMain_K3" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="set_CheckOtherInBillResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="set_CheckOtherInBillResult" type="s:boolean" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="set_SaveMoveStockStepInBill_New">
        <s:complexType>
          <s:sequence>
@@ -7099,6 +7143,24 @@
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="set_SaveSellOutBill_CLD_NewResult" type="s:boolean" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="set_SaveSellOutBill_MES">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="oMain" type="tns:ClsKf_SellOutBillMain" />
            <s:element minOccurs="0" maxOccurs="1" name="sHSourceType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="oSystemParameterMain" type="tns:ClsXt_SystemParameterMain" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="set_SaveSellOutBill_MESResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="set_SaveSellOutBill_MESResult" type="s:boolean" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
@@ -13764,6 +13826,24 @@
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="set_SaveMouldStockBill_NewSoapIn">
    <wsdl:part name="parameters" element="tns:set_SaveMouldStockBill_New" />
  </wsdl:message>
  <wsdl:message name="set_SaveMouldStockBill_NewSoapOut">
    <wsdl:part name="parameters" element="tns:set_SaveMouldStockBill_NewResponse" />
  </wsdl:message>
  <wsdl:message name="MouldTempList_ModifySoapIn">
    <wsdl:part name="parameters" element="tns:MouldTempList_Modify" />
  </wsdl:message>
  <wsdl:message name="MouldTempList_ModifySoapOut">
    <wsdl:part name="parameters" element="tns:MouldTempList_ModifyResponse" />
  </wsdl:message>
  <wsdl:message name="GetMouldSourceSoapIn">
    <wsdl:part name="parameters" element="tns:GetMouldSource" />
  </wsdl:message>
  <wsdl:message name="GetMouldSourceSoapOut">
    <wsdl:part name="parameters" element="tns:GetMouldSourceResponse" />
  </wsdl:message>
  <wsdl:message name="GetSc_MouldStockBillMain_TempListSoapIn">
    <wsdl:part name="parameters" element="tns:GetSc_MouldStockBillMain_TempList" />
  </wsdl:message>
@@ -14124,6 +14204,12 @@
  <wsdl:message name="set_SavePonderationBillMain_Temp_BarCode_MouldSoapOut">
    <wsdl:part name="parameters" element="tns:set_SavePonderationBillMain_Temp_BarCode_MouldResponse" />
  </wsdl:message>
  <wsdl:message name="get_InfoByBarCodeForReportSoapIn">
    <wsdl:part name="parameters" element="tns:get_InfoByBarCodeForReport" />
  </wsdl:message>
  <wsdl:message name="get_InfoByBarCodeForReportSoapOut">
    <wsdl:part name="parameters" element="tns:get_InfoByBarCodeForReportResponse" />
  </wsdl:message>
  <wsdl:message name="get_InfoByStationInBillSoapIn">
    <wsdl:part name="parameters" element="tns:get_InfoByStationInBill" />
  </wsdl:message>
@@ -14454,6 +14540,12 @@
  <wsdl:message name="GetSourceBillListSoapOut">
    <wsdl:part name="parameters" element="tns:GetSourceBillListResponse" />
  </wsdl:message>
  <wsdl:message name="get_SourceBarCode_ICMOReportSoapIn">
    <wsdl:part name="parameters" element="tns:get_SourceBarCode_ICMOReport" />
  </wsdl:message>
  <wsdl:message name="get_SourceBarCode_ICMOReportSoapOut">
    <wsdl:part name="parameters" element="tns:get_SourceBarCode_ICMOReportResponse" />
  </wsdl:message>
  <wsdl:message name="get_SourceBarCode_ProductInSoapIn">
    <wsdl:part name="parameters" element="tns:get_SourceBarCode_ProductIn" />
  </wsdl:message>
@@ -14465,6 +14557,12 @@
  </wsdl:message>
  <wsdl:message name="get_SourceBarCode_POStockInSoapOut">
    <wsdl:part name="parameters" element="tns:get_SourceBarCode_POStockInResponse" />
  </wsdl:message>
  <wsdl:message name="get_SourceBarCode_EntrustInSoapIn">
    <wsdl:part name="parameters" element="tns:get_SourceBarCode_EntrustIn" />
  </wsdl:message>
  <wsdl:message name="get_SourceBarCode_EntrustInSoapOut">
    <wsdl:part name="parameters" element="tns:get_SourceBarCode_EntrustInResponse" />
  </wsdl:message>
  <wsdl:message name="get_SourceBarCode_OtherInSoapIn">
    <wsdl:part name="parameters" element="tns:get_SourceBarCode_OtherIn" />
@@ -14610,23 +14708,11 @@
  <wsdl:message name="set_DelSc_MouldStockBillMain_TempSoapOut">
    <wsdl:part name="parameters" element="tns:set_DelSc_MouldStockBillMain_TempResponse" />
  </wsdl:message>
  <wsdl:message name="set_SaveMouldStockBill_NewSoapIn">
    <wsdl:part name="parameters" element="tns:set_SaveMouldStockBill_New" />
  <wsdl:message name="set_CheckOtherInBillSoapIn">
    <wsdl:part name="parameters" element="tns:set_CheckOtherInBill" />
  </wsdl:message>
  <wsdl:message name="set_SaveMouldStockBill_NewSoapOut">
    <wsdl:part name="parameters" element="tns:set_SaveMouldStockBill_NewResponse" />
  </wsdl:message>
  <wsdl:message name="MouldTempList_ModifySoapIn">
    <wsdl:part name="parameters" element="tns:MouldTempList_Modify" />
  </wsdl:message>
  <wsdl:message name="MouldTempList_ModifySoapOut">
    <wsdl:part name="parameters" element="tns:MouldTempList_ModifyResponse" />
  </wsdl:message>
  <wsdl:message name="GetMouldSourceSoapIn">
    <wsdl:part name="parameters" element="tns:GetMouldSource" />
  </wsdl:message>
  <wsdl:message name="GetMouldSourceSoapOut">
    <wsdl:part name="parameters" element="tns:GetMouldSourceResponse" />
  <wsdl:message name="set_CheckOtherInBillSoapOut">
    <wsdl:part name="parameters" element="tns:set_CheckOtherInBillResponse" />
  </wsdl:message>
  <wsdl:message name="set_AuditOtherInBillSoapIn">
    <wsdl:part name="parameters" element="tns:set_AuditOtherInBill" />
@@ -15054,12 +15140,6 @@
  <wsdl:message name="get_InfoByBarCode_SourceSoapOut">
    <wsdl:part name="parameters" element="tns:get_InfoByBarCode_SourceResponse" />
  </wsdl:message>
  <wsdl:message name="get_InfoByBarCodeForReportSoapIn">
    <wsdl:part name="parameters" element="tns:get_InfoByBarCodeForReport" />
  </wsdl:message>
  <wsdl:message name="get_InfoByBarCodeForReportSoapOut">
    <wsdl:part name="parameters" element="tns:get_InfoByBarCodeForReportResponse" />
  </wsdl:message>
  <wsdl:message name="set_SaveEntrustOutBill_BillCheckSoapIn">
    <wsdl:part name="parameters" element="tns:set_SaveEntrustOutBill_BillCheck" />
  </wsdl:message>
@@ -15372,12 +15452,6 @@
  <wsdl:message name="set_CheckAddOtherInBillSoapOut">
    <wsdl:part name="parameters" element="tns:set_CheckAddOtherInBillResponse" />
  </wsdl:message>
  <wsdl:message name="set_CheckOtherInBillSoapIn">
    <wsdl:part name="parameters" element="tns:set_CheckOtherInBill" />
  </wsdl:message>
  <wsdl:message name="set_CheckOtherInBillSoapOut">
    <wsdl:part name="parameters" element="tns:set_CheckOtherInBillResponse" />
  </wsdl:message>
  <wsdl:message name="set_SaveMoveStockStepInBill_NewSoapIn">
    <wsdl:part name="parameters" element="tns:set_SaveMoveStockStepInBill_New" />
  </wsdl:message>
@@ -15455,6 +15529,12 @@
  </wsdl:message>
  <wsdl:message name="set_SaveSellOutBill_CLD_NewSoapOut">
    <wsdl:part name="parameters" element="tns:set_SaveSellOutBill_CLD_NewResponse" />
  </wsdl:message>
  <wsdl:message name="set_SaveSellOutBill_MESSoapIn">
    <wsdl:part name="parameters" element="tns:set_SaveSellOutBill_MES" />
  </wsdl:message>
  <wsdl:message name="set_SaveSellOutBill_MESSoapOut">
    <wsdl:part name="parameters" element="tns:set_SaveSellOutBill_MESResponse" />
  </wsdl:message>
  <wsdl:message name="set_SaveSellOutBill_CLDSoapIn">
    <wsdl:part name="parameters" element="tns:set_SaveSellOutBill_CLD" />
@@ -17113,6 +17193,18 @@
    <wsdl:part name="parameters" element="tns:GetSc_ICMOBackBillListResponse" />
  </wsdl:message>
  <wsdl:portType name="WebService1Soap">
    <wsdl:operation name="set_SaveMouldStockBill_New">
      <wsdl:input message="tns:set_SaveMouldStockBill_NewSoapIn" />
      <wsdl:output message="tns:set_SaveMouldStockBill_NewSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="MouldTempList_Modify">
      <wsdl:input message="tns:MouldTempList_ModifySoapIn" />
      <wsdl:output message="tns:MouldTempList_ModifySoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GetMouldSource">
      <wsdl:input message="tns:GetMouldSourceSoapIn" />
      <wsdl:output message="tns:GetMouldSourceSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GetSc_MouldStockBillMain_TempList">
      <wsdl:input message="tns:GetSc_MouldStockBillMain_TempListSoapIn" />
      <wsdl:output message="tns:GetSc_MouldStockBillMain_TempListSoapOut" />
@@ -17353,6 +17445,10 @@
      <wsdl:input message="tns:set_SavePonderationBillMain_Temp_BarCode_MouldSoapIn" />
      <wsdl:output message="tns:set_SavePonderationBillMain_Temp_BarCode_MouldSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="get_InfoByBarCodeForReport">
      <wsdl:input message="tns:get_InfoByBarCodeForReportSoapIn" />
      <wsdl:output message="tns:get_InfoByBarCodeForReportSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="get_InfoByStationInBill">
      <wsdl:input message="tns:get_InfoByStationInBillSoapIn" />
      <wsdl:output message="tns:get_InfoByStationInBillSoapOut" />
@@ -17573,6 +17669,10 @@
      <wsdl:input message="tns:GetSourceBillListSoapIn" />
      <wsdl:output message="tns:GetSourceBillListSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="get_SourceBarCode_ICMOReport">
      <wsdl:input message="tns:get_SourceBarCode_ICMOReportSoapIn" />
      <wsdl:output message="tns:get_SourceBarCode_ICMOReportSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="get_SourceBarCode_ProductIn">
      <wsdl:input message="tns:get_SourceBarCode_ProductInSoapIn" />
      <wsdl:output message="tns:get_SourceBarCode_ProductInSoapOut" />
@@ -17580,6 +17680,10 @@
    <wsdl:operation name="get_SourceBarCode_POStockIn">
      <wsdl:input message="tns:get_SourceBarCode_POStockInSoapIn" />
      <wsdl:output message="tns:get_SourceBarCode_POStockInSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="get_SourceBarCode_EntrustIn">
      <wsdl:input message="tns:get_SourceBarCode_EntrustInSoapIn" />
      <wsdl:output message="tns:get_SourceBarCode_EntrustInSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="get_SourceBarCode_OtherIn">
      <wsdl:input message="tns:get_SourceBarCode_OtherInSoapIn" />
@@ -17677,17 +17781,9 @@
      <wsdl:input message="tns:set_DelSc_MouldStockBillMain_TempSoapIn" />
      <wsdl:output message="tns:set_DelSc_MouldStockBillMain_TempSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="set_SaveMouldStockBill_New">
      <wsdl:input message="tns:set_SaveMouldStockBill_NewSoapIn" />
      <wsdl:output message="tns:set_SaveMouldStockBill_NewSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="MouldTempList_Modify">
      <wsdl:input message="tns:MouldTempList_ModifySoapIn" />
      <wsdl:output message="tns:MouldTempList_ModifySoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GetMouldSource">
      <wsdl:input message="tns:GetMouldSourceSoapIn" />
      <wsdl:output message="tns:GetMouldSourceSoapOut" />
    <wsdl:operation name="set_CheckOtherInBill">
      <wsdl:input message="tns:set_CheckOtherInBillSoapIn" />
      <wsdl:output message="tns:set_CheckOtherInBillSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="set_AuditOtherInBill">
      <wsdl:input message="tns:set_AuditOtherInBillSoapIn" />
@@ -17973,10 +18069,6 @@
      <wsdl:input message="tns:get_InfoByBarCode_SourceSoapIn" />
      <wsdl:output message="tns:get_InfoByBarCode_SourceSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="get_InfoByBarCodeForReport">
      <wsdl:input message="tns:get_InfoByBarCodeForReportSoapIn" />
      <wsdl:output message="tns:get_InfoByBarCodeForReportSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="set_SaveEntrustOutBill_BillCheck">
      <wsdl:input message="tns:set_SaveEntrustOutBill_BillCheckSoapIn" />
      <wsdl:output message="tns:set_SaveEntrustOutBill_BillCheckSoapOut" />
@@ -18185,10 +18277,6 @@
      <wsdl:input message="tns:set_CheckAddOtherInBillSoapIn" />
      <wsdl:output message="tns:set_CheckAddOtherInBillSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="set_CheckOtherInBill">
      <wsdl:input message="tns:set_CheckOtherInBillSoapIn" />
      <wsdl:output message="tns:set_CheckOtherInBillSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="set_SaveMoveStockStepInBill_New">
      <wsdl:input message="tns:set_SaveMoveStockStepInBill_NewSoapIn" />
      <wsdl:output message="tns:set_SaveMoveStockStepInBill_NewSoapOut" />
@@ -18240,6 +18328,10 @@
    <wsdl:operation name="set_SaveSellOutBill_CLD_New">
      <wsdl:input message="tns:set_SaveSellOutBill_CLD_NewSoapIn" />
      <wsdl:output message="tns:set_SaveSellOutBill_CLD_NewSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="set_SaveSellOutBill_MES">
      <wsdl:input message="tns:set_SaveSellOutBill_MESSoapIn" />
      <wsdl:output message="tns:set_SaveSellOutBill_MESSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="set_SaveSellOutBill_CLD">
      <wsdl:input message="tns:set_SaveSellOutBill_CLDSoapIn" />
@@ -19348,6 +19440,33 @@
  </wsdl:portType>
  <wsdl:binding name="WebService1Soap" type="tns:WebService1Soap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="set_SaveMouldStockBill_New">
      <soap:operation soapAction="http://tempuri.org/set_SaveMouldStockBill_New" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="MouldTempList_Modify">
      <soap:operation soapAction="http://tempuri.org/MouldTempList_Modify" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetMouldSource">
      <soap:operation soapAction="http://tempuri.org/GetMouldSource" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetSc_MouldStockBillMain_TempList">
      <soap:operation soapAction="http://tempuri.org/GetSc_MouldStockBillMain_TempList" style="document" />
      <wsdl:input>
@@ -19888,6 +20007,15 @@
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_InfoByBarCodeForReport">
      <soap:operation soapAction="http://tempuri.org/get_InfoByBarCodeForReport" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_InfoByStationInBill">
      <soap:operation soapAction="http://tempuri.org/get_InfoByStationInBill" style="document" />
      <wsdl:input>
@@ -20383,6 +20511,15 @@
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_SourceBarCode_ICMOReport">
      <soap:operation soapAction="http://tempuri.org/get_SourceBarCode_ICMOReport" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_SourceBarCode_ProductIn">
      <soap:operation soapAction="http://tempuri.org/get_SourceBarCode_ProductIn" style="document" />
      <wsdl:input>
@@ -20394,6 +20531,15 @@
    </wsdl:operation>
    <wsdl:operation name="get_SourceBarCode_POStockIn">
      <soap:operation soapAction="http://tempuri.org/get_SourceBarCode_POStockIn" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_SourceBarCode_EntrustIn">
      <soap:operation soapAction="http://tempuri.org/get_SourceBarCode_EntrustIn" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
@@ -20617,26 +20763,8 @@
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="set_SaveMouldStockBill_New">
      <soap:operation soapAction="http://tempuri.org/set_SaveMouldStockBill_New" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="MouldTempList_Modify">
      <soap:operation soapAction="http://tempuri.org/MouldTempList_Modify" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetMouldSource">
      <soap:operation soapAction="http://tempuri.org/GetMouldSource" style="document" />
    <wsdl:operation name="set_CheckOtherInBill">
      <soap:operation soapAction="http://tempuri.org/set_CheckOtherInBill" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
@@ -21283,15 +21411,6 @@
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_InfoByBarCodeForReport">
      <soap:operation soapAction="http://tempuri.org/get_InfoByBarCodeForReport" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="set_SaveEntrustOutBill_BillCheck">
      <soap:operation soapAction="http://tempuri.org/set_SaveEntrustOutBill_BillCheck" style="document" />
      <wsdl:input>
@@ -21760,15 +21879,6 @@
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="set_CheckOtherInBill">
      <soap:operation soapAction="http://tempuri.org/set_CheckOtherInBill" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="set_SaveMoveStockStepInBill_New">
      <soap:operation soapAction="http://tempuri.org/set_SaveMoveStockStepInBill_New" style="document" />
      <wsdl:input>
@@ -21879,6 +21989,15 @@
    </wsdl:operation>
    <wsdl:operation name="set_SaveSellOutBill_CLD_New">
      <soap:operation soapAction="http://tempuri.org/set_SaveSellOutBill_CLD_New" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="set_SaveSellOutBill_MES">
      <soap:operation soapAction="http://tempuri.org/set_SaveSellOutBill_MES" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
@@ -24373,6 +24492,33 @@
  </wsdl:binding>
  <wsdl:binding name="WebService1Soap12" type="tns:WebService1Soap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="set_SaveMouldStockBill_New">
      <soap12:operation soapAction="http://tempuri.org/set_SaveMouldStockBill_New" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="MouldTempList_Modify">
      <soap12:operation soapAction="http://tempuri.org/MouldTempList_Modify" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetMouldSource">
      <soap12:operation soapAction="http://tempuri.org/GetMouldSource" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetSc_MouldStockBillMain_TempList">
      <soap12:operation soapAction="http://tempuri.org/GetSc_MouldStockBillMain_TempList" style="document" />
      <wsdl:input>
@@ -24913,6 +25059,15 @@
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_InfoByBarCodeForReport">
      <soap12:operation soapAction="http://tempuri.org/get_InfoByBarCodeForReport" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_InfoByStationInBill">
      <soap12:operation soapAction="http://tempuri.org/get_InfoByStationInBill" style="document" />
      <wsdl:input>
@@ -25408,6 +25563,15 @@
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_SourceBarCode_ICMOReport">
      <soap12:operation soapAction="http://tempuri.org/get_SourceBarCode_ICMOReport" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_SourceBarCode_ProductIn">
      <soap12:operation soapAction="http://tempuri.org/get_SourceBarCode_ProductIn" style="document" />
      <wsdl:input>
@@ -25419,6 +25583,15 @@
    </wsdl:operation>
    <wsdl:operation name="get_SourceBarCode_POStockIn">
      <soap12:operation soapAction="http://tempuri.org/get_SourceBarCode_POStockIn" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_SourceBarCode_EntrustIn">
      <soap12:operation soapAction="http://tempuri.org/get_SourceBarCode_EntrustIn" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
@@ -25642,26 +25815,8 @@
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="set_SaveMouldStockBill_New">
      <soap12:operation soapAction="http://tempuri.org/set_SaveMouldStockBill_New" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="MouldTempList_Modify">
      <soap12:operation soapAction="http://tempuri.org/MouldTempList_Modify" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetMouldSource">
      <soap12:operation soapAction="http://tempuri.org/GetMouldSource" style="document" />
    <wsdl:operation name="set_CheckOtherInBill">
      <soap12:operation soapAction="http://tempuri.org/set_CheckOtherInBill" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
@@ -26308,15 +26463,6 @@
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_InfoByBarCodeForReport">
      <soap12:operation soapAction="http://tempuri.org/get_InfoByBarCodeForReport" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="set_SaveEntrustOutBill_BillCheck">
      <soap12:operation soapAction="http://tempuri.org/set_SaveEntrustOutBill_BillCheck" style="document" />
      <wsdl:input>
@@ -26785,15 +26931,6 @@
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="set_CheckOtherInBill">
      <soap12:operation soapAction="http://tempuri.org/set_CheckOtherInBill" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="set_SaveMoveStockStepInBill_New">
      <soap12:operation soapAction="http://tempuri.org/set_SaveMoveStockStepInBill_New" style="document" />
      <wsdl:input>
@@ -26904,6 +27041,15 @@
    </wsdl:operation>
    <wsdl:operation name="set_SaveSellOutBill_CLD_New">
      <soap12:operation soapAction="http://tempuri.org/set_SaveSellOutBill_CLD_New" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="set_SaveSellOutBill_MES">
      <soap12:operation soapAction="http://tempuri.org/set_SaveSellOutBill_MES" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
@@ -29398,10 +29544,10 @@
  </wsdl:binding>
  <wsdl:service name="WebService1">
    <wsdl:port name="WebService1Soap" binding="tns:WebService1Soap">
      <soap:address location="http://192.168.63.20/WEBS-WMS/WebService1.asmx" />
      <soap:address location="http://192.168.63.53/WEBS-WMS/WebService1.asmx" />
    </wsdl:port>
    <wsdl:port name="WebService1Soap12" binding="tns:WebService1Soap12">
      <soap12:address location="http://192.168.63.20/WEBS-WMS/WebService1.asmx" />
      <soap12:address location="http://192.168.63.53/WEBS-WMS/WebService1.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
WebAPI/WebAPI.csproj
@@ -631,6 +631,7 @@
    <Compile Include="DLL\ClsGy_AreaSet_Ctl.cs" />
    <Compile Include="DLL\ClsGy_CusType_Ctl.cs" />
    <Compile Include="DLL\ClsGy_StockCheckItem_Ctl.cs" />
    <Compile Include="DLL\ClsGy_ProjectMoney_Ctl.cs" />
    <Compile Include="DLL\ClsGy_SupType_Ctl.cs" />
    <Compile Include="DLL\ClsGy_SellStyle_Ctl.cs" />
    <Compile Include="DLL\ClsGy_PostSkill_Ctl.cs" />
@@ -1126,10 +1127,10 @@
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <WebReferenceUrl Include="http://192.168.63.20/WEBS-WMS/WebService1.asmx">
    <WebReferenceUrl Include="http://192.168.63.53/WEBS-WMS/WebService1.asmx">
      <UrlBehavior>Dynamic</UrlBehavior>
      <RelPath>Web References\WebS\</RelPath>
      <UpdateFromURL>http://192.168.63.20/WEBS-WMS/WebService1.asmx</UpdateFromURL>
      <UpdateFromURL>http://192.168.63.53/WEBS-WMS/WebService1.asmx</UpdateFromURL>
      <ServiceLocationURL>
      </ServiceLocationURL>
      <CachedDynamicPropName>