1
陈雯静
2024-03-28 a45e8f522ba82b497534e72b9f4a5bbcfb5fa928
1
15个文件已修改
12个文件已添加
4434 ■■■■■ 已修改文件
DAL/DAL.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/信息平台/ClsOA_ErrMsgBackReceiveBill.cs 318 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/信息平台/ClsOA_ErrMsgBackSignBill.cs 321 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/源单/InterFace源单/Cls_S_IFCLD_ICMOList.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/生产管理/设备管理/ClsGy_FixCardBill.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/生产管理/设备管理/ClsGy_FixCardChangeBill.cs 207 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/Model.csproj 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/信息平台/ClsOA_ErrMsgBackReceiveBillMain.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/信息平台/ClsOA_ErrMsgBackReceiveBillSub.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/信息平台/ClsOA_ErrMsgBackSignBill.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/信息平台/ClsOA_ErrMsgBackSignBillSub.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/基础资料/基础资料/ClsGy_ErrMsgBackType_Model.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/生产管理/设备管理/ClsGy_FixCardChangeBillMain.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs 241 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Gy_FixCardChangeBillController.cs 698 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs 1768 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 301 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/XSGL/Xs_SeReportController.cs 196 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/工资基础资料/Gy_ProcPriceController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsGy_ErrMsgBackType_Ctl.cs 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/ListModels.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Service/LuBaoSevice.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web.config 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/DAL.csproj
@@ -95,6 +95,8 @@
    <Compile Include="仓库管理\ClsKf_SellOutBillForLayUI.cs" />
    <Compile Include="仓库管理\条码管理\ClsGy_BarCodeBill_ChaiMa.cs" />
    <Compile Include="仓库管理\条码管理\ClsKF_BarCodeStatusChangeBill.cs" />
    <Compile Include="信息平台\ClsOA_ErrMsgBackSignBill.cs" />
    <Compile Include="信息平台\ClsOA_ErrMsgBackReceiveBill.cs" />
    <Compile Include="基础资料\InterFace基础资料\ClsIF_ORGANIZATIONS_View.cs" />
    <Compile Include="基础资料\公用基础资料\ClsGy_BadType_Ctl.cs" />
    <Compile Include="基础资料\公用基础资料\ClsGy_CardChangeType_Ctl.cs" />
@@ -626,6 +628,7 @@
    <Compile Include="生产管理\模具管理\ClsSc_MouldStatusChangeBill.cs" />
    <Compile Include="生产管理\设备管理\ClsGy_EquipFileMain.cs" />
    <Compile Include="生产管理\设备管理\ClsGy_EquipTypeBill.cs" />
    <Compile Include="生产管理\设备管理\ClsGy_FixCardChangeBill.cs" />
    <Compile Include="生产管理\设备管理\ClsGy_FixCardBill.cs" />
    <Compile Include="生产管理\设备管理\ClsSb_EquipWorkBeforeCheckBill.cs" />
    <Compile Include="生产管理\设备管理\ClsSb_EquipStockInCheckBill.cs" />
DAL/ÐÅϢƽ̨/ClsOA_ErrMsgBackReceiveBill.cs
New file
@@ -0,0 +1,318 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace DAL
{
    public  class ClsOA_ErrMsgBackReceiveBill:DBUtility.ClsXt_BaseBill
    {
        public Model.ClsOA_ErrMsgBackReceiveBillMain omodel = new Model.ClsOA_ErrMsgBackReceiveBillMain();
        public List<Model.ClsOA_ErrMsgBackReceiveBillSub> DetailColl = new List<Model.ClsOA_ErrMsgBackReceiveBillSub>();
        public ClsOA_ErrMsgBackReceiveBill()
        {
            base.MvarItemKeySub = "OA_ErrMsgBackReceiveBillSub";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey= "OA_ErrMsgBackReceiveBillMain";
            base.MvarReportTitle = "异常反馈接收单";
            base.BillType = "4529";
            base.HBillSubType = "4529";
        }
        #region å›ºå®šä»£ç 
        ~ClsOA_ErrMsgBackReceiveBill()
        {
            DetailColl = null;
        }
        #endregion   è‡ªå®šä¹‰æ–¹æ³•
        //修改单据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_OA_ErrMsgBackReceiveBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_OA_ErrMsgBackReceiveBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //
                oCn.BeginTran();
                //更新主表
                oCn.RunProc("UpDate OA_ErrMsgBackReceiveBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
                ",HDate='" + omodel.HDate + "'" +
                ",HYear='" + omodel.HYear.ToString() + "'" +
                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                ",HRemark='" + omodel.HRemark + "'" +
                ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
                ",HUpDateDate=getdate()" +
                //========================================
                ",HDeptID='" + omodel.HDeptID.ToString() + "'" +
                ",HReceiveID='" + omodel.HReceiveID.ToString() + "'" +
                ",HSendMan='" + omodel.HSendMan + "'" +
                 ",HReceiveMan='" + omodel.HReceiveMan + "'" +
                 ",HCopyMan='" + omodel.HCopyMan + "'" +
                 ",HLevel='" + omodel.HLevel + "'" +
                 ",HErrMsgBackTypeID='" + omodel.HErrMsgBackTypeID.ToString() +
                 "',HContext='" + omodel.HContext + "'" +
                 ",HDescription='" + omodel.HDescription + "'" +
                 ",HBillTypeName='" + omodel.HBillTypeName + "'" +
                 ",HPlanBillNo='" + omodel.HPlanBillNo + "'" +
                 ",HMaterName='" + omodel.HMaterName + "'" +
                 ",HMaterModel='" + omodel.HMaterModel + "'" +
                 ",HEquipID='" + omodel.HEquipID.ToString() +
                 "',HMouldID='" + omodel.HMouldID.ToString() +
                 "',HRelationEmpID='" + omodel.HRelationEmpID.ToString() +
                 "',HReceiveNote='" + omodel.HReceiveNote + "'" +
                 ",HReceiveDate='" + omodel.HReceiveDate+"'" +
                 ",HHandleEmpID='" + omodel.HHandleEmpID.ToString() +
                 "',HHandleAdvise='" + omodel.HHandleAdvise +
                "' where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
                DeleteBillSub(lngBillKey);
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_OA_ErrMsgBackReceiveBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_OA_ErrMsgBackReceiveBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //新增单据
        public override bool AddBill(ref string sReturn)
        {
            try
            {
                //得到mainid
                //omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_OA_ErrMsgBackReceiveBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_OA_ErrMsgBackReceiveBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                string sql = "";
                sql = "Insert Into OA_ErrMsgBackReceiveBillMain" +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HYear,HPeriod,HRemark,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType," +
                "HDeptID,HReceiveID,HSendMan,HReceiveMan,HCopyMan,HLevel,HErrMsgBackTypeID,HContext,HDescription,HBillTypeName,HPlanBillNo,HMaterName,HMaterModel,HEquipID,HMouldID,HRelationEmpID,HReceiveNote,HReceiveDate,HHandleEmpID,HHandleAdvise) " +
                " values(" +
                "'" + this.BillType +
                "','" + this.HBillSubType +
                "'," + omodel.HInterID.ToString() +
                ",'" + omodel.HBillNo +
                "','" + omodel.HDate +
                "'," + omodel.HYear +
                "," + omodel.HPeriod +
                ",'" + omodel.HRemark +
                "','" + omodel.HMaker +
                "',getdate()" +
                ",'" + omodel.HMainSourceInterID +
                "','" + omodel.HMainSourceEntryID +
                "','" + omodel.HMainSourceBillNo +
                "','" + omodel.HMainSourceBillType +
                "','" + omodel.HDeptID.ToString() +
                "','" + omodel.HReceiveID.ToString() +
                "','" + omodel.HSendMan +
                "','" + omodel.HReceiveMan +
                "','" + omodel.HCopyMan +
                "','" + omodel.HLevel +
                "','" + omodel.HErrMsgBackTypeID.ToString() +
                "','" + omodel.HContext +
                "','" + omodel.HDescription +
                "','" + omodel.HBillTypeName +
                "','" + omodel.HPlanBillNo +
                "','" + omodel.HMaterName +
                "','" + omodel.HMaterModel +
                "','" + omodel.HEquipID.ToString() +
                "','" + omodel.HMouldID.ToString() +
                "','" + omodel.HRelationEmpID.ToString() +
                "','" + omodel.HReceiveNote +
                "','" + omodel.HReceiveDate +
                "','" + omodel.HHandleEmpID.ToString() +
                "','" + omodel.HHandleAdvise +
                "') ";
                //主表
                oCn.RunProc(sql);
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_OA_ErrMsgBackReceiveBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_OA_ErrMsgBackReceiveBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //显示单据
        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //查询主表
                DataSet Ds ;
                Ds = oCn.RunProcReturn("Select * from OA_ErrMsgBackReceiveBillMain Where HInterID=" + lngBillKey.ToString(), "OA_ErrMsgBackReceiveBillMain");
                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.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
                //omodel.HContext = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HContext"]);
                //omodel.HDescription = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDescription"]);
                //omodel.HSendMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSendMan"]);
                //omodel.HReceiveMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HReceiveMan"]);
                //omodel.HCopyMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCopyMan"]);
                //omodel.HLevel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HLevel"]);
                //omodel.HReTransmitMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HReTransmitMan"]);
                //omodel.HBillTypeName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillTypeName"]);
                //omodel.HPlanBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HPlanBillNo"]);
                //omodel.HMaterName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterName"]);
                //omodel.HMaterModel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterModel"]);
                //omodel.HSendType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSendType"]);
                //omodel.HHasten = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HHasten"]);
                //omodel.HQty = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HQty"]);
                //
                //循环
                DataSet DsSub ;
                DsSub = oCn.RunProcReturn("Select * from OA_ErrMsgBackReceiveBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "OA_ErrMsgBackReceiveBillSub");
                DetailColl.Clear();//清空
                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
                {
                    Model.ClsOA_ErrMsgBackReceiveBillSub oSub = new Model.ClsOA_ErrMsgBackReceiveBillSub();
                    // å›ºå®šèµ‹å€¼===============================================
                    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.HDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HDate"]);
                    //oSub.HSendStatus = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSendStatus"]);
                    //oSub.HSendMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSendMan"]);
                    //oSub.HDescription = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDescription"]);
                    DetailColl.Add(oSub);
                }
                sReturn = "显示单据成功!";
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                throw (e);
            }
        }
    }
}
DAL/ÐÅϢƽ̨/ClsOA_ErrMsgBackSignBill.cs
New file
@@ -0,0 +1,321 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace DAL
{
    public  class ClsOA_ErrMsgBackSignBill:DBUtility.ClsXt_BaseBill
    {
        public Model.ClsOA_ErrMsgBackSignBillMain omodel = new Model.ClsOA_ErrMsgBackSignBillMain();
        public List<Model.ClsOA_ErrMsgBackSignBillSub> DetailColl = new List<Model.ClsOA_ErrMsgBackSignBillSub>();
        public ClsOA_ErrMsgBackSignBill()
        {
            base.MvarItemKeySub = "OA_ErrMsgBackSignBillSub";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey= "OA_ErrMsgBackSignBillMain";
            base.MvarReportTitle = "异常反馈签到单";
            base.BillType = "4530";
            base.HBillSubType = "4530";
        }
        #region å›ºå®šä»£ç 
        ~ClsOA_ErrMsgBackSignBill()
        {
            DetailColl = null;
        }
        #endregion   è‡ªå®šä¹‰æ–¹æ³•
        //修改单据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_OA_ErrMsgBackSignBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_OA_ErrMsgBackSignBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //
                oCn.BeginTran();
                //更新主表
                oCn.RunProc("UpDate OA_ErrMsgBackSignBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
                ",HDate='" + omodel.HDate + "'" +
                ",HYear='" + omodel.HYear.ToString() + "'" +
                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                ",HRemark='" + omodel.HRemark + "'" +
                ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
                ",HUpDateDate=getdate()" +
                //========================================
                ",HDeptID='" + omodel.HDeptID.ToString() + "'" +
                ",HReceiveID='" + omodel.HReceiveID.ToString() + "'" +
                ",HSendMan='" + omodel.HSendMan + "'" +
                 ",HReceiveMan='" + omodel.HReceiveMan + "'" +
                 ",HCopyMan='" + omodel.HCopyMan + "'" +
                 ",HLevel='" + omodel.HLevel + "'" +
                 ",HErrMsgBackTypeID='" + omodel.HErrMsgBackTypeID.ToString() +
                 "',HContext='" + omodel.HContext + "'" +
                 ",HDescription='" + omodel.HDescription + "'" +
                 ",HBillTypeName='" + omodel.HBillTypeName + "'" +
                 ",HPlanBillNo='" + omodel.HPlanBillNo + "'" +
                 ",HMaterName='" + omodel.HMaterName + "'" +
                 ",HMaterModel='" + omodel.HMaterModel + "'" +
                 ",HEquipID='" + omodel.HEquipID.ToString() +
                 "',HMouldID='" + omodel.HMouldID.ToString() +
                 "',HSignEmpID='" + omodel.HSignEmpID.ToString() +
                 "',HSignNote='" + omodel.HSignNote + "'" +
                 ",HSignDate='" + omodel.HSignDate + "'" +
                 ",HErrMsgBackBillNo='" + omodel.HErrMsgBackBillNo +
                 "',HErrMsgBackInterID='" + omodel.HErrMsgBackInterID.ToString() +
                 "',HErrMsgBackEntryID='" + omodel.HErrMsgBackEntryID.ToString() +
                "' where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
                DeleteBillSub(lngBillKey);
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_OA_ErrMsgBackSignBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_OA_ErrMsgBackSignBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //新增单据
        public override bool AddBill(ref string sReturn)
        {
            try
            {
                //得到mainid
                //omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_OA_ErrMsgBackSignBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_OA_ErrMsgBackSignBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                string sql = "";
                sql = "Insert Into OA_ErrMsgBackSignBillMain" +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HYear,HPeriod,HRemark,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType," +
                "HDeptID,HReceiveID,HSendMan,HReceiveMan,HCopyMan,HLevel,HErrMsgBackTypeID,HContext,HDescription,HBillTypeName,HPlanBillNo,HMaterName,HMaterModel,HEquipID,HMouldID,HSignEmpID,HSignNote,HSignDate,HErrMsgBackBillNo,HErrMsgBackInterID,HErrMsgBackEntryID) " +
                " values(" +
                "'" + this.BillType +
                "','" + this.HBillSubType +
                "'," + omodel.HInterID.ToString() +
                ",'" + omodel.HBillNo +
                "','" + omodel.HDate +
                "'," + omodel.HYear +
                "," + omodel.HPeriod +
                ",'" + omodel.HRemark +
                "','" + omodel.HMaker +
                "',getdate()" +
                ",'" + omodel.HMainSourceInterID +
                "','" + omodel.HMainSourceEntryID +
                "','" + omodel.HMainSourceBillNo +
                "','" + omodel.HMainSourceBillType +
                "','" + omodel.HDeptID.ToString() +
                "','" + omodel.HReceiveID.ToString() +
                "','" + omodel.HSendMan +
                "','" + omodel.HReceiveMan +
                "','" + omodel.HCopyMan +
                "','" + omodel.HLevel +
                "','" + omodel.HErrMsgBackTypeID.ToString() +
                "','" + omodel.HContext +
                "','" + omodel.HDescription +
                "','" + omodel.HBillTypeName +
                "','" + omodel.HPlanBillNo +
                "','" + omodel.HMaterName +
                "','" + omodel.HMaterModel +
                "','" + omodel.HEquipID.ToString() +
                "','" + omodel.HMouldID.ToString() +
                "','" + omodel.HSignEmpID.ToString() +
                "','" + omodel.HSignNote +
                "','" + omodel.HSignDate +
                 "','" + omodel.HErrMsgBackBillNo +
                "','" + omodel.HErrMsgBackInterID.ToString() +
                "','" + omodel.HErrMsgBackEntryID.ToString() +
                "') ";
                //主表
                oCn.RunProc(sql);
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_OA_ErrMsgBackSignBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_OA_ErrMsgBackSignBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //显示单据
        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //查询主表
                DataSet Ds ;
                Ds = oCn.RunProcReturn("Select * from OA_ErrMsgBackSignBillMain Where HInterID=" + lngBillKey.ToString(), "OA_ErrMsgBackSignBillMain");
                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.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
                //omodel.HContext = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HContext"]);
                //omodel.HDescription = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDescription"]);
                //omodel.HSendMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSendMan"]);
                //omodel.HReceiveMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HReceiveMan"]);
                //omodel.HCopyMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCopyMan"]);
                //omodel.HLevel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HLevel"]);
                //omodel.HReTransmitMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HReTransmitMan"]);
                //omodel.HBillTypeName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillTypeName"]);
                //omodel.HPlanBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HPlanBillNo"]);
                //omodel.HMaterName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterName"]);
                //omodel.HMaterModel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterModel"]);
                //omodel.HSendType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSendType"]);
                //omodel.HHasten = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HHasten"]);
                //omodel.HQty = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HQty"]);
                //
                //循环
                DataSet DsSub ;
                DsSub = oCn.RunProcReturn("Select * from OA_ErrMsgBackSignBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "OA_ErrMsgBackSignBillSub");
                DetailColl.Clear();//清空
                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
                {
                    Model.ClsOA_ErrMsgBackSignBillSub oSub = new Model.ClsOA_ErrMsgBackSignBillSub();
                    // å›ºå®šèµ‹å€¼===============================================
                    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.HDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HDate"]);
                    //oSub.HSendStatus = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSendStatus"]);
                    //oSub.HSendMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSendMan"]);
                    //oSub.HDescription = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDescription"]);
                    DetailColl.Add(oSub);
                }
                sReturn = "显示单据成功!";
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                throw (e);
            }
        }
    }
}
DAL/Ô´µ¥/InterFaceÔ´µ¥/Cls_S_IFCLD_ICMOList.cs
@@ -13,8 +13,8 @@
            base.ViewName = "h_v_IFCLD_ICMOBillList_Source";
            base.mvarReportTitle = "生产订单";
            base.mvarItemKey = "3710";
            base.sCondtion = " and ä»»åŠ¡æ•°é‡>isnull(入库数量,0)  and çŠ¶æ€<>'结案' ";
            base.sOrderSql = "   order by å•据号  ";
            base.sCondtion = " ";
            base.sOrderSql = "   order by å•据号 desc ";
            base.sKeyCol = "部门";
        }
 
DAL/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsGy_FixCardBill.cs
@@ -106,8 +106,6 @@
        {
            try
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //主表
DAL/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsGy_FixCardChangeBill.cs
New file
@@ -0,0 +1,207 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace DAL
{
    public  class ClsGy_FixCardChangeBill : DBUtility.ClsXt_BaseBill
    {
        public Model.ClsGy_FixCardChangeBillMain omodel = new Model.ClsGy_FixCardChangeBillMain();
        DataSet ds;
        public ClsGy_FixCardChangeBill()
        {
            base.MvarItemKeySub = "Gy_FixCardChangeBillSub";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey= "Gy_FixCardChangeBillMain";
            base.MvarReportTitle="固定资产变动单";
            base.BillType = "3336";
            base.HBillSubType = "3336";
        }
        #region å›ºå®šä»£ç 
        ~ClsGy_FixCardChangeBill()
        {
            //DetailColl = null;
        }
        #endregion   è‡ªå®šä¹‰æ–¹æ³•
        //修改单据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //
                oCn.BeginTran();
                //更新主表
                oCn.RunProc("UpDate Gy_FixCardChangeBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
                ",HRemark='" + omodel.HRemark + "'" +
                ",HUpDater='" + omodel.HMaker + "'" +
                ",HUpDateDate=getdate()" +
                //========================================
                ",HCardID=" + omodel.HCardID +
                ",HCardNumber='" + omodel.HCardNumber + "'" +
                ",HChangeReason='" + omodel.HChangeReason + "'" +
                ",HOrgID=" + omodel.HOrgID +
                ",HCardStatusID_OLD=" + omodel.HCardStatusID_OLD +
                ",HCardStatusID_NEW=" + omodel.HCardStatusID_NEW +
                ",HCardAddr_OLD=" + omodel.HCardAddr_OLD +
                ",HCardAddr_NEW=" + omodel.HCardAddr_NEW +
                " where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //新增单据
        public override bool AddBill(ref string sReturn)
        {
            try
            {
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //保存前控制=========================================
                ds = oCn.RunProcReturn("exec h_p_Gy_FixCardChangeBill_BeforeSaveCtrl " + omodel.HInterID + ",'" + omodel.HMaker + "'", "h_p_Gy_FixCardChangeBill_BeforeSaveCtrl");
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1")
                {
                    sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //=========================================================
                //主表
                oCn.RunProc("Insert Into Gy_FixCardChangeBillMain" +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HYear,HPeriod,HRemark,HBillStatus," +
                "HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo," +
                "HCardID,HCardNumber,HChangeReason,HOrgID,HCardStatusID_OLD,HCardStatusID_NEW,HCardAddr_OLD,HCardAddr_NEW" +
                ") "+
                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate +
                "','" + omodel.HMaker + "',getdate()" + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark +
                "'," + omodel.HBillStatus + ",'" + omodel.HMainSourceBillType + "','" +omodel.HMainSourceInterID + "'," + omodel.HMainSourceEntryID +
                ",'" + omodel.HMainSourceBillNo + "'," + omodel.HCardID + ",'" + omodel.HCardNumber + "','" + omodel.HChangeReason + "'," + omodel.HOrgID +
                "," + omodel.HCardStatusID_OLD + "," + omodel.HCardStatusID_NEW + "," + omodel.HCardAddr_OLD + "," +  omodel.HCardAddr_NEW +
                ") ");
                //保存后控制=========================================
                ds = oCn.RunProcReturn("exec h_p_Gy_FixCardChangeBill_AfterSaveCtrl " + omodel.HInterID + ",'" + omodel.HMaker + "'", "h_p_Gy_FixCardChangeBill_AfterSaveCtrl");
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1")
                {
                    sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //=========================================================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //显示单据
        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //查询主表
                DataSet Ds ;
                Ds = oCn.RunProcReturn("Select * from Gy_FixCardChangeBillMain Where HInterID=" + lngBillKey.ToString(), "Gy_FixCardChangeBillMain");
                if(Ds.Tables[0].Rows.Count==0)
                {
                    sReturn = "单据未找到!";
                    return false;
                }
                //固定赋值===========================================
                omodel.HInterID =DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
                omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
                omodel.HDate =DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
                omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
                omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
                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.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
                omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
                omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
                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.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.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
                omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
                omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
                omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
                //========================================================
                //==
                //
                //循环
                //DataSet DsSub ;
                //DsSub = oCn.RunProcReturn("Select * from Gy_FixCardChangeBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Gy_FixCardChangeBillSub");
                //DetailColl.Clear();//清空
                //for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
                //{
                //    Model.ClsGy_FixCardChangeBillSub_Emp oSub = new Model.ClsGy_FixCardChangeBillSub_Emp();
                //    // å›ºå®šèµ‹å€¼===============================================
                //    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();
                //    //===================================================
                //    DetailColl.Add(oSub);
                //}
                sReturn = "显示单据成功!";
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                throw (e);
            }
        }
    }
}
Model/Model.csproj
@@ -286,7 +286,11 @@
    <Compile Include="信息平台\ClsOA_ComFileBillMain.cs" />
    <Compile Include="信息平台\ClsOA_ComFileBillSub.cs" />
    <Compile Include="信息平台\ClsOA_EmpMinMessage.cs" />
    <Compile Include="信息平台\ClsOA_ErrMsgBackSignBill.cs" />
    <Compile Include="信息平台\ClsOA_ErrMsgBackReceiveBillMain.cs" />
    <Compile Include="信息平台\ClsOA_ErrMsgBackBillMain.cs" />
    <Compile Include="信息平台\ClsOA_ErrMsgBackSignBillSub.cs" />
    <Compile Include="信息平台\ClsOA_ErrMsgBackReceiveBillSub.cs" />
    <Compile Include="信息平台\ClsOA_ErrMsgBackBillSub.cs" />
    <Compile Include="信息平台\ClsOA_ErrMsgBackBillSub2.cs" />
    <Compile Include="信息平台\ClsOA_InformBillMain.cs" />
@@ -348,6 +352,7 @@
    <Compile Include="基础资料\基础资料\ClsGy_CardStatus_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_CardAddress_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_CardType_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_ErrMsgBackType_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_StockCheckItem_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_InspectInstruMent_Model.cs" />
    <Compile Include="基础资料\基础资料\ClsGy_InspectBasis_Model.cs" />
@@ -616,6 +621,7 @@
    <Compile Include="生产管理\模具管理\ClsSc_MouldStockBillMain.cs" />
    <Compile Include="生产管理\模具管理\ClsSc_MouldStockBillSub.cs" />
    <Compile Include="生产管理\设备管理\ClsGy_EquipTypeBill.cs" />
    <Compile Include="生产管理\设备管理\ClsGy_FixCardChangeBillMain.cs" />
    <Compile Include="生产管理\设备管理\ClsSb_EquipConkBookBillMain.cs" />
    <Compile Include="生产管理\设备管理\ClsSb_EquipConkBookBillSub.cs" />
    <Compile Include="生产管理\设备管理\ClsGy_FixCardBillMain.cs" />
Model/ÐÅϢƽ̨/ClsOA_ErrMsgBackReceiveBillMain.cs
New file
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsOA_ErrMsgBackReceiveBillMain : DBUtility.ClsXt_BaseBillMain
    {
        public int HDeptID ;       // å‘送部门(Gy_Department)
        public int HReceiveID ;      // æŽ¥æ”¶éƒ¨é—¨(Gy_Department)
        public string HSendMan ;     // å‘送人(gy_czygl)(功能跟 å¼‚常反馈单 ä¸€è‡´)
        public string HReceiveMan ;  // æŽ¥æ”¶äººï¼ˆgy_czygl)(功能跟 å¼‚常反馈单 ä¸€è‡´)
        public string HCopyMan ;     // æŠ„送(gy_czygl)(功能跟 å¼‚常反馈单 ä¸€è‡´)
        public string HLevel ;       // ç´§æ€¥ç¨‹åº¦ï¼ˆæ™®é€šï¼Œç´§æ€¥ï¼‰
        public int HErrMsgBackTypeID ; // å¼‚常类型(Gy_ErrMsgBackType)
        public string HContext ;       // ä¸»é¢˜
        public string HDescription ;   // å†…容
        public string HBillTypeName ;  // å•据类型
        public string HPlanBillNo ;    // å•据号码
        public string HMaterName ;     // äº§å“åç§°
        public string HMaterModel ;    // è§„格型号
        public int HEquipID ;         // ç›¸å…³è®¾å¤‡ï¼ˆGy_EquipFileBillMain)
        public int HMouldID ;          // ç›¸å…³æ¨¡æ²»å…·ï¼ˆGy_MouldFileMain)
        public int HRelationEmpID ;    // å…³è”人(Gy_Employee)
        public string HReceiveNote ;   // æŽ¥æ”¶ç¡®è®¤
        public DateTime HReceiveDate ; // æŽ¥æ”¶ç¡®è®¤æ—¶é—´ï¼ˆå¹´æœˆæ—¥æ—¶åˆ†ç§’)
        public int HHandleEmpID ;     // æŒ‡æ´¾å¤„理人(Gy_Employee)
        public string HHandleAdvise ;  // å¤„理建议
    }
}
Model/ÐÅϢƽ̨/ClsOA_ErrMsgBackReceiveBillSub.cs
New file
@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsOA_ErrMsgBackReceiveBillSub : DBUtility.ClsXt_BaseBillSub
    {
    }
}
Model/ÐÅϢƽ̨/ClsOA_ErrMsgBackSignBill.cs
New file
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsOA_ErrMsgBackSignBillMain : DBUtility.ClsXt_BaseBillMain
    {
        public int HDeptID ;       // å‘送部门(Gy_Department)
        public int HReceiveID ;      // æŽ¥æ”¶éƒ¨é—¨(Gy_Department)
        public string HSendMan ;     // å‘送人(gy_czygl)(功能跟 å¼‚常反馈单 ä¸€è‡´)
        public string HReceiveMan ;  // æŽ¥æ”¶äººï¼ˆgy_czygl)(功能跟 å¼‚常反馈单 ä¸€è‡´)
        public string HCopyMan ;     // æŠ„送(gy_czygl)(功能跟 å¼‚常反馈单 ä¸€è‡´)
        public string HLevel ;       // ç´§æ€¥ç¨‹åº¦ï¼ˆæ™®é€šï¼Œç´§æ€¥ï¼‰
        public int HErrMsgBackTypeID ; // å¼‚常类型(Gy_ErrMsgBackType)
        public string HContext ;       // ä¸»é¢˜
        public string HDescription ;   // å†…容
        public string HBillTypeName ;  // å•据类型
        public string HPlanBillNo ;    // å•据号码
        public string HMaterName ;     // äº§å“åç§°
        public string HMaterModel ;    // è§„格型号
        public int HEquipID ;         // ç›¸å…³è®¾å¤‡ï¼ˆGy_EquipFileBillMain)
        public int HMouldID ;          // ç›¸å…³æ¨¡æ²»å…·ï¼ˆGy_MouldFileMain)
        public int HSignEmpID;    // ç­¾åˆ°äººï¼ˆGy_Employee)
        public string HSignNote;   //     ç­¾åˆ°ç¡®è®¤
        public DateTime HSignDate; // ç­¾åˆ°æ—¶é—´ï¼ˆå¹´æœˆæ—¥æ—¶åˆ†ç§’)
        public string HErrMsgBackBillNo;    //异常反馈单号
        public int HErrMsgBackInterID;  //异常反馈单主内码
        public int HErrMsgBackEntryID;  //异常反馈单子内码
    }
}
Model/ÐÅϢƽ̨/ClsOA_ErrMsgBackSignBillSub.cs
New file
@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsOA_ErrMsgBackSignBillSub : DBUtility.ClsXt_BaseBillSub
    {
    }
}
Model/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/ClsGy_ErrMsgBackType_Model.cs
New file
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsGy_ErrMsgBackType_Model : DBUtility.ClsGy_Base_Model
    {
        public DateTime HMakeTime;
        public int HUSEORGID;
        public string HMakeEmp;
        public DateTime HModifyTime;
    }
}
Model/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsGy_FixCardChangeBillMain.cs
New file
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ClsGy_FixCardChangeBillMain : DBUtility.ClsXt_BaseBillMain
    {
        public Int64 HCardID; //卡片内码
        public string HCardNumber; //卡片编码
        public string HChangeReason; //变更原因
        public Int64 HOrgID; //资产组织
        public Int64 HCardStatusID_OLD; //资产状态(变更前)
        public Int64 HCardStatusID_NEW; //资产状态(变更后)
        public Int64 HCardAddr_OLD; //资产位置(变动前)
        public Int64 HCardAddr_NEW; //资产位置(变动后)
    }
}
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill.cs
@@ -155,6 +155,8 @@
        //
        public  string ModName = "85";
        public  string ModCaption = "条码生成";
        public const string ModRightName = "Gy_BarCodeBill";
        public const string ModRightNameSourceQty = ModRightName + "_SourceQty"; //超源单数量控制
        public bool BillChange;   //
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
@@ -589,23 +591,16 @@
        //单据完整性判断          æœªå®Œæˆ
        private bool Sub_AllowSave()
        {
            ////必输项目是否为空
            //if (txtHDeptID.Tag.ToString().Trim() == "0")
            //{
            //    MessageBox.Show("生产车间没有选择!", "提示");
            //    return false;
            //}
            //if (txtHGroupID.Tag.ToString().Trim() == "0")
            //{
            //    MessageBox.Show("班组没有选择!", "提示");
            //    return false;
            //}
            //单据号是否重复
            //if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, txtHBillNo.Text.Trim(), BillStatus, BillOld.omodel.HInterID))
            //{
            //    MessageBox.Show("单据号重复!", "提示");
            //    return false;
            //}
            //系统参数,有源单生成条码,生成条码数量可否超源单数量控制(N为不可超源单数量)
            if (SourceQtyCtl=="N")
            {
                //系统参数为不可超源单数量时,再次判断用户权限是否可超源单数量
                //判断权限
                if (ClsPub.Security_Log(ModRightNameSourceQty, 3, false, ClsPub.CurUserName))
                {
                    SourceQtyCtl = "Y";
                }
            }
            //明细表是否为零行
            bool b = false;
            for (int i = 0; i < grdMain.RowCount; i++)
WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
@@ -4876,6 +4876,247 @@
        }
        #endregion
        #region  å¼‚常反馈类型  æŸ¥è¯¢,审核,反审核,禁用,反禁用
        /// <summary>
        /// å¼‚常反馈类型  æŸ¥è¯¢
        /// </summary>
        /// <param name="sWhere"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        [Route("Gy_BadReason/Gy_ErrMsgBackTypeList")]
        [HttpGet]
        public object Gy_ErrMsgBackTypeList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Gy_ErrMsgBackType_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql1 = "select * from  h_v_Gy_ErrMsgBackType where 1 = 1";
                string sql = sql1 + sWhere + " order by å¼‚常反馈类型代码 ";
                ds = oCN.RunProcReturn(sql, "h_v_Gy_ErrMsgBackType");
                //添加列名
                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_ErrMsgBackType")]
        [HttpGet]
        public object AuditGy_ErrMsgBackType(int HInterID, int IsAudit, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_ErrMsgBackType_Check", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_ErrMsgBackType where HItemID=" + HInterID, "Gy_ErrMsgBackType");
                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_ErrMsgBackType 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_ErrMsgBackType 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_ErrMsgBackType")]
        [HttpGet]
        public object StopGy_ErrMsgBackType(int HInterID, int IsStop, string CurUserName)
        {
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_ErrMsgBackType_Close", 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "禁用失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var ds = oCN.RunProcReturn("select * from Gy_ErrMsgBackType where HItemID=" + HInterID, "Gy_ErrMsgBackType");
                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_ErrMsgBackType 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_ErrMsgBackType 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 å¼‚常类型  æŸ¥è¯¢
        [Route("Gy_BadReason/Gy_ErrTypeList")]
WebAPI/Controllers/SBGL/Gy_FixCardChangeBillController.cs
New file
@@ -0,0 +1,698 @@
using DBUtility;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.SBGL
{
    public class Gy_FixCardChangeBillController : ApiController
    {
        //获取系统参数
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        public DAL.ClsGy_FixCardChangeBill BillOld = new DAL.ClsGy_FixCardChangeBill();
        #region å›ºå®šèµ„产变动单列表查询
        [Route("Gy_FixCardChangeBill/list")]
        [HttpGet]
        public object list(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log_second("Gy_FixCardChangeBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql1 = string.Format(@"select * from h_v_Gy_FixCardChangeBillList where 1 = 1");
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn(sql1 + sWhere , "h_v_Gy_FixCardChangeBillList");
                }
                else
                {
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_Gy_FixCardChangeBillList");
                }
                //添加列名
                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("Gy_FixCardChangeBill/SaveFixCardChangeBillList")]
        [HttpPost]
        public object SaveFixCardChangeBillList([FromBody] JObject msg)
        {
            var _value = msg["msg"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString(); //表头信息
            string msg4 = sArray[1].ToString(); //用户
            string OperationType = sArray[2].ToString(); //操作类型
            string UserName = "";
            ListModels oListModels = new ListModels();
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Gy_FixCardChangeBill_Edit", 1, false, msg4))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DAL.ClsGy_FixCardChangeBill oBill = new DAL.ClsGy_FixCardChangeBill();
                List<Model.ClsGy_FixCardChangeBillMain> lsmain = new List<Model.ClsGy_FixCardChangeBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_Gy_FixCardChangeBillMain(msg2);
                foreach (Model.ClsGy_FixCardChangeBillMain oItem in lsmain)
                {
                    //oItem.HMaker = "";
                    UserName = oItem.HMaker;  //制单人
                    oItem.HBillType = "3336";
                    oItem.HBillSubType = "3336";
                    oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));//  --日期
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                    oItem.HBillStatus = 1;
                    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 (OperationType == "1")
                {
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                if (bResult)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
        //#region å›ºå®šèµ„产变动单 åˆ é™¤
        [Route("Gy_FixCardChangeBill/DelFixCardChangeBill")]
        [HttpGet]
        public object DelFixCardChangeBill(string HInterID, string user)
        {
            Int64 lngBillKey = 0;
            lngBillKey = DBUtility.ClsPub.isLong(HInterID);
            if (lngBillKey == 0)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "单据ID为空!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            DAL.ClsGy_FixCardChangeBill oBill = new DAL.ClsGy_FixCardChangeBill();
            if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
            {
                ds = oCN.RunProcReturn("select * from Gy_FixCardChangeBillMain where HInterID=" + lngBillKey, "Gy_FixCardChangeBillMain");
                if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) > 1)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据当前处于不能删除状态,不能删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据已经审核,不能删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //删除前控制=========================================
                string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
                string sql1 = "exec h_p_Gy_FixCardChangeBill_BeforeDelCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
                ds = oCN.RunProcReturn(sql1, "h_p_Gy_FixCardChangeBill_BeforeDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //==================================================================================
                bool IsDete = oBill.DeleteBill(lngBillKey, HBillNo, "h_p_Gy_FixCardChangeBill_AfterDelCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo);
                if (IsDete)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "单据未找到";
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        //#endregion
        #region æ ¹æ®å¡ç‰‡ç¼–码查找固定资产卡片信息PDA
        [Route("Gy_PDA_FixCardChangeBill/txtHBarCode_KeyDown")]
        [HttpGet]
        public object txtHBarCode_KeyDown(string HBarCode)
        {
            try
            {
                if (HBarCode == null || HBarCode.Equals(""))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "条形码不能为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //得到信息
                ds = oCN.RunProcReturn("select * from h_v_Gy_FixCardBillList   where å¡ç‰‡ç¼–码= '" + HBarCode + "'", "h_v_Gy_FixCardBillList ");
                //写入信息
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "1.未查询到固定资产卡片信息";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å›ºå®šèµ„产变动单 å®¡æ ¸/反审核功能
        [Route("Gy_FixCardChangeBill/CheckGy_FixCardChangeBill")]
        [HttpGet]
        public object CheckGy_FixCardChangeBill(string HInterID, int Type, string user)
        {
            try
            {
                //判断是否有删除权限
                if (!DBUtility.ClsPub.Security_Log("Gy_FixCardChangeBill_Check", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限审核!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (string.IsNullOrWhiteSpace(HInterID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ClsPub.CurUserName = user;
                BillOld.MvarItemKey = "Gy_FixCardChangeBillMain";
                oCN.BeginTran();//开始事务
                //Type 1 å®¡æ ¸  2  åå®¡æ ¸
                if (Type == 1)
                {
                    //判断单据是否已经审核
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不需要再审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    //审核前控制
                    string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
                    sql = "exec h_p_Gy_FixCardChangeBill_BeforeCheckCtrl " + int.Parse(HInterID) + ",'" + HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql, "h_p_Gy_FixCardChangeBill_BeforeCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //审核单据
                    if (!BillOld.CheckBill(Int64.Parse(HInterID), HBillNo, "h_p_Gy_FixCardChangeBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else
                {
                    //判断单据是否已经反审核
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已反审核!不需要再反审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    //反审核前控制
                    string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
                    sql = "exec h_p_Gy_FixCardChangeBill_BeforeUnCheckCtrl " + int.Parse(HInterID) + ",'" + HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql, "h_p_Gy_FixCardChangeBill_BeforeUnCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //反审核单据
                    if (BillOld.AbandonCheck(Int64.Parse(HInterID), HBillNo, "h_p_Gy_FixCardChangeBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
                    {
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                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 å›ºå®šèµ„产 å…³é—­/反关闭功能
        [Route("Gy_FixCardChangeBill/CloseGy_FixCardChangeBill")]
        [HttpGet]
        public object CloseGy_FixCardChangeBill(string HInterID, int Type, string user)
        {
            try
            {
                //判断是否有删除权限
                if (!DBUtility.ClsPub.Security_Log("Gy_FixCardChangeBill_Close", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限关闭!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (string.IsNullOrWhiteSpace(HInterID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ClsPub.CurUserName = user;
                BillOld.MvarItemKey = "Gy_FixCardChangeBillMain";
                oCN.BeginTran();//开始事务
                //Type 1 å…³é—­  2  åå…³é—­
                if (Type == 1)
                {
                    //判断单据是否已经关闭
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                    {
                        if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已关闭!不需要再关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    //关闭单据
                    if (!BillOld.CloseBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "关闭失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                else
                {
                    //判断单据是否已经反关闭
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                    {
                        if (ds.Tables[0].Rows[0]["HCloseMan"] == null || ds.Tables[0].Rows[0]["HCloseMan"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已反关闭!不需要再反关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    //反关闭单据
                    if (!BillOld.CancelClose(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反关闭失败!原因:" + ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                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 å›ºå®šèµ„产变动单 ä½œåºŸ/反作废功能
        [Route("Gy_FixCardChangeBill/DropGy_FixCardChangeBill")]
        [HttpGet]
        public object DropGy_FixCardChangeBill(string HInterID, int Type, string user)
        {
            try
            {
                //判断是否有作废权限
                if (!DBUtility.ClsPub.Security_Log("Gy_FixCardChangeBill_Drop", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限作废!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (string.IsNullOrWhiteSpace(HInterID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ClsPub.CurUserName = user;
                BillOld.MvarItemKey = "Gy_FixCardChangeBillMain";
                oCN.BeginTran();//开始事务
                //Type 1 ä½œåºŸ  2  åä½œåºŸ
                if (Type == 1)
                {
                    //判断单据是否已经作废
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    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)
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能进行作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已作废!不需要再作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //作废单据
                        if (!BillOld.Cancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "作废失败!原因:" + ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    //判断单据是否已经反作废
                    DataSet ds;
                    string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
                    ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
                    if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                    {
                        if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能进行作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        if (ds.Tables[0].Rows[0]["HDeleteMan"] == null || ds.Tables[0].Rows[0]["HDeleteMan"].ToString() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未作废!不需要再反作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //反作废单据
                        if (!BillOld.AbandonCancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反作废失败!原因:" + ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                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
    }
}
WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs
@@ -140,6 +140,50 @@
        #endregion
        #region è®¾å¤‡è´Ÿè·åˆ†æžè¡¨
        [Route("Sb_EquipMaintainReport/Sb_EquipmentLoadReportList")]
        [HttpGet]
        public object Sb_EquipmentLoadReportList(string HDeptID, string HWorkCenterID, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                if (HDeptID == "0" || HDeptID.Equals("")|| HWorkCenterID == "0" || HWorkCenterID.Equals(""))
                {
                    ds = oCN.RunProcReturn("exec h_p_Sb_EquipmentLoadReportListt '0','0'", "h_p_Sb_EquipmentLoadReportListt");
                }
                else
                {
                    ds = oCN.RunProcReturn("exec h_p_Sb_EquipmentLoadReportListt '" + HDeptID + "','" + HWorkCenterID + "'", "h_p_Sb_EquipmentLoadReportListt");
                }
                //添加列名
                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;
                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 sql语句
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -28,6 +28,7 @@
        public DLL.ClsOA_ErrMsgBackBill BillNew = new DLL.ClsOA_ErrMsgBackBill();   //对应单据类
        public DLL.ClsOA_ErrMsgBackBill BillOld = new DLL.ClsOA_ErrMsgBackBill();   //对应单据类
        #region æŠ¥å·¥å¹³å°å¼‚常反馈单保存/编辑
        /// <summary>
        /// å¼‚常反馈单
@@ -746,5 +747,1772 @@
        }
        #endregion
        #region å¼‚常反馈 æŽ¥æ”¶/签到 å•列表   æ ¹æ®å¼‚常反馈单下推获取数据
        [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackList")]
        [HttpGet]
        public object Get_OA_ErrMsgBackList(string HInterID,string HEntryID, string user,int num)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (num == 1)       //异常反馈单
                {
                    string sql = "select * from h_v_OA_ErrMsgBackBillList where HInterID = '" + HInterID + "' and HEntryID = '" + HEntryID + "'";
                    ds = oCN.RunProcReturn(sql, "p_v_OA_ErrMsgBackBillList");
                }
                else if (num==2)    //异常反馈接收单
                {
                    string sql = "select * from h_v_OA_ErrMsgBackReceiveBillMainList  where hmainid = '" + HInterID + "'";
                    ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillMainList");
                }
                //添加列名
                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 ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈接收单 æ–°å¢ž/编辑
        [Route("Sc_MESTransFerWorkBill/SaveOA_ErrMsgBackReceiveBill")]
        [HttpPost]
        public object SaveOA_ErrMsgBackReceiveBill([FromBody] JObject msg)
        {
            var _value = msg["msg"].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[1].ToString();//操作方式数据类型 1添加 3修改 2 å¤åˆ¶
            string msg4 = sArray[2].ToString();//用户名
            DBUtility.ClsPub.CurUserName = msg4;
            string UserName = "";
            string s = "";
            ListModels oListModels = new ListModels();
            try
            {
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log_second("OA_ErrMsgBackReceiveBillMain_Edit", 1, false, msg4))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //  OA_ErrMsgBackReceiveBill
                DAL.ClsOA_ErrMsgBackReceiveBill oBill = new DAL.ClsOA_ErrMsgBackReceiveBill();
                List<Model.ClsOA_ErrMsgBackReceiveBillMain> lsmain = new List<Model.ClsOA_ErrMsgBackReceiveBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_OA_ErrMsgBackReceiveBill(msg2);
                foreach (Model.ClsOA_ErrMsgBackReceiveBillMain oItem in lsmain)
                {
                    if (refSav == "Add")
                    {
                        //单据号是否重复
                        if (oBill.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 (oBill.ShowBill(oItem.HInterID, ref s) == false)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据有误!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        //判断是否可编辑
                        if (oBill.omodel.HChecker != "" && oBill.omodel.HChecker != null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据已经被审核,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (oBill.omodel.HBillStatus > 1)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据处于不可编辑状态,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(oBill, ref s))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = s + ",不允许修改";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    UserName = oItem.HMaker;  //制单人
                    oItem.HBillType = "4529";
                    oItem.HBillSubType = "4529";
                    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 = "保存成功!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈接收单 ç¼–辑回显列表
        [Route("Sc_MESTransFerWorkBill/Edit_OA_ErrMsgBackReceiveBill")]
        [HttpGet]
        public object Edit_OA_ErrMsgBackReceiveBill(string HID)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sql = "select * from h_v_OA_ErrMsgBackReceiveBillMainList where hmainid='"+HID+"'";
                ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillMainList");
                //添加列名
                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 ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈接收单列表
        [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackReceiveBillList")]
        [HttpGet]
        public object Get_OA_ErrMsgBackReceiveBillList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackReceiveBillMain_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    string sql = "select * from h_v_OA_ErrMsgBackReceiveBillMainList order by å•据号 desc";
                    ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillMainList");
                }
                else
                {
                    string sql1 = "select * from h_v_OA_ErrMsgBackReceiveBillMainList where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by å•据号 desc";
                    ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillMainList");
                }
                //添加列名
                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 ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈接收单 åˆ é™¤
        /// <summary>
        ///参数:string HInterID。
        ///返回值:object。
        /// </summary>
        [Route("Sc_MESTransFerWorkBill/DeleteOA_ErrMsgBackReceiveBill")]
        [HttpGet]
        public object DeleteOA_ErrMsgBackReceiveBill(string HInterID, string user)
        {
            try
            {
                string s = "";
                DAL.ClsOA_ErrMsgBackReceiveBill BillOld = new DAL.ClsOA_ErrMsgBackReceiveBill();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackReceiveBillMain_Delete", 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;
                }
                if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据有误!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                //判断是否可删除
                if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据已经被审核,不允许删除!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                //删除前控制=========================================
                string sql1 = "exec h_p_OA_ErrMsgBackReceiveBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
                ds = oCN.RunProcReturn(sql1, "h_p_OA_ErrMsgBackReceiveBill_BeforeDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //==================================================================================
                oCN.BeginTran();
                oCN.RunProc("delete from OA_ErrMsgBackReceiveBillMain where HInterID = " + HInterID);
                oCN.RunProc("delete from OA_ErrMsgBackReceiveBillSub where HInterID= " + HInterID);
                //删除后控制==================================================================================
                string sql2 = "exec h_p_OA_ErrMsgBackReceiveBill_AfterDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
                ds = oCN.RunProcReturn(sql2, "h_p_OA_ErrMsgBackReceiveBill_AfterDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    s = "删除后判断失败,请与网络管理人员联系";
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + s;
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    s = ds.Tables[0].Rows[0]["HRemark"].ToString();
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + s;
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                //==============================================================================================
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈接收单 å®¡æ ¸/反审核
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Sc_MESTransFerWorkBill/AuditOA_ErrMsgBackReceiveBill")]
        [HttpGet]
        public object AuditOA_ErrMsgBackReceiveBill(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "OA_ErrMsgBackReceiveBillMain_Check";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsOA_ErrMsgBackReceiveBill oBill = new DAL.ClsOA_ErrMsgBackReceiveBill();                              //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HCloseMan.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已关闭!不能再次审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (oBill.omodel.HDeleteMan.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已作废!不能再次审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //审核判断
                    {
                        if (oBill.omodel.HChecker.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能再次审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反审核判断
                    {
                        if (oBill.omodel.HChecker.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未审核!不需要反审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的审核/反审核操作
                if (IsAudit == 0) //审核提交
                {
                    oCN.BeginTran();
                    //记录返回信息
                    string msg = "";
                    //审核前控制=========================================
                    string sql1 = "exec h_p_OA_ErrMsgBackReceiveBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_OA_ErrMsgBackReceiveBill_BeforeCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //审核提交
                    if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_OA_ErrMsgBackReceiveBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        oCN.Commit();
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核成功!" + msg;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        oCN.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反审核提交
                {
                    //反审核前控制=========================================
                    string sql1 = "exec h_p_OA_ErrMsgBackReceiveBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_OA_ErrMsgBackReceiveBill_BeforeUnCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //===========================================================
                    //反审核提交AbandonCheck
                    if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_OA_ErrMsgBackReceiveBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "审核失败或者反审核失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈接收单 å…³é—­/反关闭
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">关闭(0),反关闭(1)</param>
        /// <param name="CurUserName">关闭人</param>
        /// <returns></returns>
        [Route("Sc_MESTransFerWorkBill/CloseOA_ErrMsgBackReceiveBill")]
        [HttpGet]
        public object CloseOA_ErrMsgBackReceiveBill(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "OA_ErrMsgBackReceiveBillMain_Close";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //检查权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "关闭失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsOA_ErrMsgBackReceiveBill oBill = new DAL.ClsOA_ErrMsgBackReceiveBill();             //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HDeleteMan.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已作废!不能进行关闭!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (oBill.omodel.HChecker.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据未审核!不能进行关闭!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //关闭判断
                    {
                        if (oBill.omodel.HCloseMan.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已关闭!不能再次关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反关闭判断
                    {
                        if (oBill.omodel.HCloseMan.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未关闭!不需要反关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的关闭/反关闭操作
                if (IsAudit == 0) //关闭提交
                {
                    //关闭提交
                    if (oBill.CloseBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "关闭成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "关闭失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反关闭提交
                {
                    //反关闭提交
                    if (oBill.CancelClose(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反关闭成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反关闭失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "关闭失败或者反关闭失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈接收单 ä½œåºŸ/反作废
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">作废(0),反作废(1)</param>
        /// <param name="CurUserName">作废人</param>
        /// <returns></returns>
        [Route("Sc_MESTransFerWorkBill/DeleteOA_ErrMsgBackReceiveBill")]
        [HttpGet]
        public object DeleteOA_ErrMsgBackReceiveBill(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "OA_ErrMsgBackReceiveBillMain_Drop";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //检查权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "作废失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsOA_ErrMsgBackReceiveBill oBill = new DAL.ClsOA_ErrMsgBackReceiveBill();              //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HChecker.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能进行作废!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已作废!不能再作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未作废!不需要反作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的作废/反作废操作
                if (IsAudit == 0) //作废提交
                {
                    //作废提交
                    if (oBill.Cancelltion(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反关闭提交
                {
                    //反关闭提交
                    if (oBill.AbandonCancelltion(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "作废失败或者反作废失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈签到单 æ–°å¢ž/编辑
        [Route("Sc_MESTransFerWorkBill/SaveOA_ErrMsgBackSignBill")]
        [HttpPost]
        public object SaveOA_ErrMsgBackSignBill([FromBody] JObject msg)
        {
            var _value = msg["msg"].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[1].ToString();//操作方式数据类型 1添加 3修改 2 å¤åˆ¶
            string msg4 = sArray[2].ToString();//用户名
            DBUtility.ClsPub.CurUserName = msg4;
            string UserName = "";
            string s = "";
            ListModels oListModels = new ListModels();
            try
            {
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log_second("OA_ErrMsgBackSignBillMain_Edit", 1, false, msg4))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                // OA_ErrMsgBackSignBill
                DAL.ClsOA_ErrMsgBackSignBill oBill = new DAL.ClsOA_ErrMsgBackSignBill();
                List<Model.ClsOA_ErrMsgBackSignBillMain> lsmain = new List<Model.ClsOA_ErrMsgBackSignBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_OA_ErrMsgBackSignBill(msg2);
                foreach (Model.ClsOA_ErrMsgBackSignBillMain oItem in lsmain)
                {
                    if (refSav == "Add")
                    {
                        //单据号是否重复
                        if (oBill.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 (oBill.ShowBill(oItem.HInterID, ref s) == false)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据有误!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        //判断是否可编辑
                        if (oBill.omodel.HChecker != "" && oBill.omodel.HChecker != null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据已经被审核,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (oBill.omodel.HBillStatus > 1)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "此单据处于不可编辑状态,不允许修改!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(oBill, ref s))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = s + ",不允许修改";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                    }
                    UserName = oItem.HMaker;  //制单人
                    oItem.HBillType = "4530";
                    oItem.HBillSubType = "4530";
                    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 = "保存成功!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈签到单 ç¼–辑回显列表
        [Route("Sc_MESTransFerWorkBill/Edit_OA_ErrMsgBackSignBill")]
        [HttpGet]
        public object Edit_OA_ErrMsgBackSignBill(string HID)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sql = "select * from h_v_OA_ErrMsgBackSignBillMainList where hmainid='" + HID + "'";
                ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackSignBillMainList");
                //添加列名
                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 ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈签到单列表
        [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackSignBillList")]
        [HttpGet]
        public object Get_OA_ErrMsgBackSignBillList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackSignBillMain_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    string sql = "select * from h_v_OA_ErrMsgBackSignBillMainList order by å•据号 desc";
                    ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackSignBillMainList");
                }
                else
                {
                    string sql1 = "select * from h_v_OA_ErrMsgBackSignBillMainList where 1 = 1 ";
                    string sql = sql1 + sWhere + " order by å•据号 desc";
                    ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackSignBillMainList");
                }
                //添加列名
                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 ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈签到单 åˆ é™¤
        /// <summary>
        ///参数:string HInterID。
        ///返回值:object。
        /// </summary>
        [Route("Sc_MESTransFerWorkBill/DeleteOA_ErrMsgBackSignBill")]
        [HttpGet]
        public object DeleteOA_ErrMsgBackSignBill(string HInterID, string user)
        {
            try
            {
                string s = "";
                DAL.ClsOA_ErrMsgBackSignBill BillOld = new DAL.ClsOA_ErrMsgBackSignBill();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackSignBillMain_Delete", 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;
                }
                if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据有误!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                //判断是否可删除
                if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此单据已经被审核,不允许删除!";
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                //删除前控制=========================================
                string sql1 = "exec h_p_OA_ErrMsgBackSignBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
                ds = oCN.RunProcReturn(sql1, "h_p_OA_ErrMsgBackSignBill_BeforeDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //==================================================================================
                oCN.BeginTran();
                oCN.RunProc("delete from OA_ErrMsgBackSignBillMain where HInterID = " + HInterID);
                oCN.RunProc("delete from OA_ErrMsgBackSignBillSub where HInterID= " + HInterID);
                //删除后控制==================================================================================
                string sql2 = "exec h_p_OA_ErrMsgBackSignBill_AfterDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
                ds = oCN.RunProcReturn(sql2, "h_p_OA_ErrMsgBackSignBill_AfterDelCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    s = "删除后判断失败,请与网络管理人员联系";
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + s;
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    s = ds.Tables[0].Rows[0]["HRemark"].ToString();
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除失败!原因:" + s;
                    objJsonResult.data = null;
                    oCN.RollBack();
                    return objJsonResult;
                }
                //==============================================================================================
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈签到单 å®¡æ ¸/反审核
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">审核(0),反审核(1)</param>
        /// <param name="CurUserName">审核人</param>
        /// <returns></returns>
        [Route("Sc_MESTransFerWorkBill/AuditOA_ErrMsgBackSignBill")]
        [HttpGet]
        public object AuditOA_ErrMsgBackSignBill(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "OA_ErrMsgBackSignBillMain_Check";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //审核权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsOA_ErrMsgBackSignBill oBill = new DAL.ClsOA_ErrMsgBackSignBill();               //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HCloseMan.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已关闭!不能再次审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (oBill.omodel.HDeleteMan.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已作废!不能再次审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //审核判断
                    {
                        if (oBill.omodel.HChecker.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已审核!不能再次审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反审核判断
                    {
                        if (oBill.omodel.HChecker.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未审核!不需要反审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的审核/反审核操作
                if (IsAudit == 0) //审核提交
                {
                    oCN.BeginTran();
                    //记录返回信息
                    string msg = "";
                    //审核前控制=========================================
                    string sql1 = "exec h_p_OA_ErrMsgBackSignBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_OA_ErrMsgBackSignBill_BeforeCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        oCN.RollBack();
                        return objJsonResult;
                    }
                    //==================================================================================
                    //审核提交
                    if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_OA_ErrMsgBackSignBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        oCN.Commit();
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核成功!" + msg;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        oCN.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反审核提交
                {
                    //反审核前控制=========================================
                    string sql1 = "exec h_p_OA_ErrMsgBackSignBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_OA_ErrMsgBackSignBill_BeforeUnCheckCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //===========================================================
                    //反审核提交AbandonCheck
                    if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_OA_ErrMsgBackSignBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "审核失败或者反审核失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈签到单 å…³é—­/反关闭
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">关闭(0),反关闭(1)</param>
        /// <param name="CurUserName">关闭人</param>
        /// <returns></returns>
        [Route("Sc_MESTransFerWorkBill/CloseOA_ErrMsgBackSignBill")]
        [HttpGet]
        public object CloseOA_ErrMsgBackSignBill(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "OA_ErrMsgBackSignBillMain_Close";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //检查权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "关闭失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsOA_ErrMsgBackSignBill oBill = new DAL.ClsOA_ErrMsgBackSignBill();             //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HDeleteMan.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已作废!不能进行关闭!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (oBill.omodel.HChecker.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据未审核!不能进行关闭!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //关闭判断
                    {
                        if (oBill.omodel.HCloseMan.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已关闭!不能再次关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反关闭判断
                    {
                        if (oBill.omodel.HCloseMan.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未关闭!不需要反关闭!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的关闭/反关闭操作
                if (IsAudit == 0) //关闭提交
                {
                    //关闭提交
                    if (oBill.CloseBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "关闭成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "关闭失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反关闭提交
                {
                    //反关闭提交
                    if (oBill.CancelClose(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反关闭成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反关闭失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "关闭失败或者反关闭失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å¼‚常反馈签到单  ä½œåºŸ/反作废
        /// <summary>
        /// </summary>
        /// <param name="HInterID">单据ID</param>
        /// <param name="IsAudit">作废(0),反作废(1)</param>
        /// <param name="CurUserName">作废人</param>
        /// <returns></returns>
        [Route("Sc_MESTransFerWorkBill/DeleteOA_ErrMsgBackSignBill")]
        [HttpGet]
        public object DeleteOA_ErrMsgBackSignBill(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "OA_ErrMsgBackSignBillMain_Drop";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
                //检查权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "作废失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //HInterID数据判断
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID小于0!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //对HInterID进行类型的转换
                DAL.ClsOA_ErrMsgBackSignBill oBill = new DAL.ClsOA_ErrMsgBackSignBill();              //实例化单据操作类,用于进行相关操作
                //针对需要进行的操作,检验当前单据的状态是否支持需要进行的操作
                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //根据HInterID获取该单据的数据
                {
                    if (oBill.omodel.HChecker.Trim() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能进行作废!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (IsAudit == 0)  //作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据已作废!不能再作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    if (IsAudit == 1) //反作废判断
                    {
                        if (oBill.omodel.HDeleteMan.Trim() == "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "单据未作废!不需要反作废!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据不存在!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //进行需要进行的作废/反作废操作
                if (IsAudit == 0) //作废提交
                {
                    //作废提交
                    if (oBill.Cancelltion(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (IsAudit == 1) //反关闭提交
                {
                    //反关闭提交
                    if (oBill.AbandonCancelltion(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反作废成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "作废失败或者反作废失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_DayPlanPlatFormBillController.cs
@@ -2574,7 +2574,7 @@
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "生产明细行重复,重复的生产订单号:" + ds.Tables[0].Rows[i]["生产订单号"].ToString() + ",明细行号:" + ds.Tables[0].Rows[i]["生产订单明细行号"].ToString();
                        objJsonResult.Message = "生产明细行重复,重复的生产订单号:" + dt.Tables[0].Rows[i]["生产订单号"].ToString() + ",明细行号:" + dt.Tables[0].Rows[i]["生产订单明细行号"].ToString();
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
WebAPI/Controllers/WebAPIController.cs
@@ -8210,6 +8210,307 @@
        }
        #endregion
        #region  å¼‚常反馈类型  è®¾ç½®åˆ—表/保存/编辑/删除方法
        /// <summary>
        ///  å¼‚常反馈类型 ä¿å­˜
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("SaveGy_ErrMsgBackType")]
        [HttpPost]
        public object SaveGy_ErrMsgBackType([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_ErrMsgBackType_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_ErrMsgBackType ", "Gy_ErrMsgBackType");
            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_ErrMsgBackType_Ctl oBill = new WebAPI.DLL.ClsGy_ErrMsgBackType_Ctl();
                List<Model.ClsGy_ErrMsgBackType_Model> lsmain = new List<Model.ClsGy_ErrMsgBackType_Model>();
                msg1 = msg1.Replace("\\", "");
                msg1 = msg1.Replace("\n", "");
                lsmain = oListModels.getObjectByJson_Gy_ErrMsgBackType(msg1);
                foreach (Model.ClsGy_ErrMsgBackType_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_ErrMsgBackType where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_ErrMsgBackType");
                    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_ErrMsgBackTypeDetail")]
        [HttpGet]
        public ApiResult<DataSet> GetGy_ErrMsgBackTypeDetail(string HID)
        {
            var model = LuBaoSevice.GetGy_ErrMsgBackTypeDetail(HID);
            return model;
        }
        /// <summary>
        /// å¼‚常反馈类型 åˆ é™¤åŠŸèƒ½
        /// </summary>
        /// <returns></returns>
        [Route("DeltetGy_ErrMsgBackType")]
        [HttpGet]
        public object DeltetGy_ErrMsgBackType(string HItemID, string user)
        {
            DataSet ds;
            //string ModRightNameCheck = "Sc_ProcessReport_check";
            try
            {
                //删除权限
                if (!DBUtility.ClsPub.Security_Log("Gy_ErrMsgBackType_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_ErrMsgBackType where HItemID=" + HItemID, "Gy_ErrMsgBackType");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "单据已审核!不能进行删除!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    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.RunProc("delete Gy_ErrMsgBackType 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>
        /// ç”¨å…³è”工序获取信息
WebAPI/Controllers/XSGL/Xs_SeReportController.cs
New file
@@ -0,0 +1,196 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers
{
    //销售报表Controller
    public class Xs_SeReportController : ApiController
    {
        //销售报表
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        #region é”€å”®æ¯›åˆ©ä¼°ç®—分析报表 æŸ¥è¯¢
        /// <summary>
        /// è¿”回项目阶段列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Xs_SeReport/Xs_SeOrderBillProfitReportList")]
        [HttpGet]
        public object Xs_SeOrderBillProfitReportList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec  h_p_Xs_SeOrderBillProfitReport   '" + sWhere + "',''", "h_p_Xs_SeOrderBillProfitReport");
                //添加列名
                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 é”€å”®å‡ºåº“汇总报表 æŸ¥è¯¢
        /// <summary>
        /// è¿”回项目阶段列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Xs_SeReport/Xs_SellOutStockSumReportList")]
        [HttpGet]
        public object Xs_SellOutStockSumReportList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec  h_p_Xs_SellOutStockSumReport   '" + sWhere + "',''  ", "h_p_Xs_SellOutStockSumReport");
                //添加列名
                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 é”€å”®è®¢å•执行汇总报表 æŸ¥è¯¢
        /// <summary>
        /// è¿”回项目阶段列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Xs_SeReport/Xs_SeOrderBillProcessSumReportList")]
        [HttpGet]
        public object Xs_SeOrderBillProcessSumReportList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec  h_p_Xs_SeOrderBillProcessSumReport    '" + sWhere + "','',''", "h_p_Xs_SeOrderBillProcessSumReport");
                //添加列名
                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 å®¢æˆ·å‘货及时率报表 æŸ¥è¯¢
        /// <summary>
        /// è¿”回项目阶段列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Xs_SeReport/Xs_SeOrderSendDaySumReportList")]
        [HttpGet]
        public object Xs_SeOrderSendDaySumReportList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec  h_p_Xs_SeOrderSendDaySumReport    '" + sWhere + "','',''", "h_p_Xs_SeOrderSendDaySumReport");
                //添加列名
                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
    }
}
WebAPI/Controllers/»ù´¡×ÊÁÏ/¹¤×Ê»ù´¡×ÊÁÏ/Gy_ProcPriceController.cs
@@ -521,7 +521,6 @@
                    }                    
                }
                var error = "";
                //查询工序工价没有的列
WebAPI/DLL/ClsGy_ErrMsgBackType_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_ErrMsgBackType_Ctl : DBUtility.ClsGy_Base_Ctl
    {
           SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        //原代码 ç”¨äºŽ æ›¿æ¢å­é¡¹ç›®
        public string HOldNumber;
        public Model.ClsGy_ErrMsgBackType_Model oModel = new Model.ClsGy_ErrMsgBackType_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_ErrMsgBackType_Ctl()
        {
            MvarItemKey = "Gy_ErrMsgBackType";
            MvarReportTitle = "异常反馈类型设置";
            oModel = new Model.ClsGy_ErrMsgBackType_Model();
        }
    }
}
WebAPI/ListModels.cs
@@ -1062,6 +1062,43 @@
            List<Model.ClsGy_ProjectMoney_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_ProjectMoney_Model>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增异常反馈接收单表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsOA_ErrMsgBackReceiveBillMain> getObjectByJson_OA_ErrMsgBackReceiveBill(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsOA_ErrMsgBackReceiveBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsOA_ErrMsgBackReceiveBillMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增异常反馈签到单表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsOA_ErrMsgBackSignBillMain> getObjectByJson_OA_ErrMsgBackSignBill(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsOA_ErrMsgBackSignBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsOA_ErrMsgBackSignBillMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增异常反馈类型表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsGy_ErrMsgBackType_Model> getObjectByJson_Gy_ErrMsgBackType(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsGy_ErrMsgBackType_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_ErrMsgBackType_Model>>(jsonString);
            return list;
        }
        /// <summary>
        /// å¤„理新增异常类型表的json
        /// </summary>
@@ -3226,6 +3263,19 @@
            return list;
        }
        /// <summary>
        /// å›ºå®šèµ„产变动单 ä¸»è¡¨
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        // ClsGy_FixCardChangeBillMain
        public List<Model.ClsGy_FixCardChangeBillMain> getObjectByJson_Gy_FixCardChangeBillMain(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsGy_FixCardChangeBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_FixCardChangeBillMain>>(jsonString);
            return list;
        }
        #region å®¢è¯‰å¤„理单
        /// <summary>
        /// å®¢è¯‰å¤„理单主表json
WebAPI/Service/LuBaoSevice.cs
@@ -624,6 +624,25 @@
        }
        /// <summary>
        /// å¼‚常反馈类型根据id获取信息
        /// </summary>
        public static ApiResult<DataSet> GetGy_ErrMsgBackTypeDetail(string HID)
        {
            if (string.IsNullOrEmpty(HID))
                return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" };
            var dataSet = GetGy_ErrMsgBackTypeDb(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_ErrMsgBackTypeDb(string HID)
        {
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_ErrMsgBackType  where HItemID= " + HID + " ", "h_v_Gy_ErrMsgBackType");
            return dataSet;
        }
        /// <summary>
        ///客户分类根据id获取信息
        /// </summary>
        public static ApiResult<DataSet> GetGy_CusTypeDetail(string HID)
WebAPI/Web.config
@@ -22,7 +22,7 @@
        <!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>-->
        <!--<add key="FileIP" value="http://localhost:8080/" />-->
        <!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/>    -->
        <!--<add key="sUrl" value="http://192.168.63.20/WEBS-WMS/WebService1.asmx"/>   é¢œå°å¼æœº-->
        <add key="sUrl" value="http://192.168.63.53/WEBS-WMS/WebService1.asmx"/>   <!--颜台式机-->
        <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> å¤å®-->
        <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> -->
        <!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/>    åšæ—¥ç§‘技-->
@@ -34,7 +34,7 @@
        <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/>     å®‰ç‘žæœåС噍-->
        <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> -->    <!--测试服务器-->
        <!--<add key="sUrl" value="http://localhost:8082/WEBS/WebService1.asmx"/>    æœ¬åœ°-->
        <add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/>    <!--陈雯静本地配置-->
        <!--<add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/>    é™ˆé›¯é™æœ¬åœ°é…ç½®-->
        <!--<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/>九菱-->
        <add key="webpages:Version" value="3.0.0.0" />
WebAPI/WebAPI.csproj
@@ -417,6 +417,7 @@
    <Compile Include="Controllers\MJGL\Sc_MouldStatusChangeBillController.cs" />
    <Compile Include="Controllers\MJGL\Sc_MouldUpperBillController.cs" />
    <Compile Include="Controllers\Pay_ReportController.cs" />
    <Compile Include="Controllers\SBGL\Gy_FixCardChangeBillController.cs" />
    <Compile Include="Controllers\SBGL\Gy_FixCardBillController.cs" />
    <Compile Include="Controllers\SBGL\Sb_EquipConkBookBillController.cs" />
    <Compile Include="Controllers\SBGL\Sb_EquipSparepartsBillController.cs" />
@@ -484,6 +485,7 @@
    <Compile Include="Controllers\CGGL\YF_PayMentBillController.cs" />
    <Compile Include="Controllers\XSGL\YS_ReceiveBackBillController.cs" />
    <Compile Include="Controllers\CGGL\YF_PayMentOtherBillController.cs" />
    <Compile Include="Controllers\XSGL\Xs_SeReportController.cs" />
    <Compile Include="Controllers\XSGL\YS_ReceiveOtherBillController.cs" />
    <Compile Include="Controllers\XSGL\YS_ReceiveBillController.cs" />
    <Compile Include="Controllers\XSGL\Kf_SellOutBillController.cs" />
@@ -645,6 +647,7 @@
    <Compile Include="DLL\ClsGy_PoStockStyle_Ctl.cs" />
    <Compile Include="DLL\ClsGy_AreaSet_Ctl.cs" />
    <Compile Include="DLL\ClsGy_CusType_Ctl.cs" />
    <Compile Include="DLL\ClsGy_ErrMsgBackType_Ctl.cs" />
    <Compile Include="DLL\ClsGy_StockCheckItem_Ctl.cs" />
    <Compile Include="DLL\ClsGy_ProjectMoney_Ctl.cs" />
    <Compile Include="DLL\ClsGy_SupType_Ctl.cs" />