zzr99
2022-03-17 26fba348f6dda10539a732dbfcec025e3bbac2c5
WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -31,22 +31,22 @@
        {
            try
            {
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                //{
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
                //}
                //else
                //{
                //objJsonResult.code = "0";
                //objJsonResult.count = 0;
                //objJsonResult.Message = "无数据";
                //objJsonResult.data = null;
                //return objJsonResult;
                //}
            }
            catch (Exception e)
            {
@@ -104,20 +104,30 @@
        /// </summary>
        [Route("Sc_ProcessMangement/MES_Sc_ProcessReportList_Json")]
        [HttpGet]
        public object MES_Sc_ProcessReportList_Json(string sWhere)
        public object MES_Sc_ProcessReportList_Json(string sWhere,string user)
        {
            DataSet ds;
            try
            {
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("Sc_ICMOReportBillQuery", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限查询!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_Sc_ProcessReportList ", "h_v_Sc_ProcessReportList");
                    ds = oCN.RunProcReturn("select top 500 * from h_v_Sc_ProcessReportList order by hmainid desc", "h_v_Sc_ProcessReportList");
                }
                else
                {
                    string sql1 = "select * from h_v_Sc_ProcessReportList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    string sql = sql1 + sWhere+ " order by hmainid desc";
                    ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessReportList");
                }
            }
@@ -236,20 +246,29 @@
        /// </summary>
        [Route("Sc_ProcessMangement/MES_Sc_ProcessPlanMain_Json")]
        [HttpGet]
        public object MES_Sc_ProcessPlanMain_Json(string sWhere)
        public object MES_Sc_ProcessPlanMain_Json(string sWhere,string user)
        {
            DataSet ds;
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Sc_ProcessPlan_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限查询!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_Sc_ProcessPlanList ", "h_v_Sc_ProcessPlanList");
                    ds = oCN.RunProcReturn("select top 500 * from h_v_Sc_ProcessPlanList order by hmainid desc ", "h_v_Sc_ProcessPlanList");
                }
                else
                {
                    string sql1 = "select * from h_v_Sc_ProcessPlanList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    string sql = sql1 + sWhere+ " order by hmainid desc ";
                    ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessPlanList");
                }
            }
@@ -301,8 +320,19 @@
            int hentryid = int.Parse(sArray[2].ToString());//子表的顺序id
            int OperationType = int.Parse(sArray[3].ToString());//数据类型 1添加 3修改
            string user = sArray[4].ToString();//用户名
            try
            {
                //判断是否有编辑权限
                if (!DBUtility.ClsPub.Security_Log("Sc_ProcessPlan_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限编辑!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                omodel = Newtonsoft.Json.JsonConvert.DeserializeObject<ClsSc_ProcessPlanMain>(msg2);
                string BillType = "3715";
@@ -426,20 +456,20 @@
        [HttpGet]
        public object CheckDeOAuditBill(int HInterID, int IsAudit, string CurUserName)
        {
            //    string ModRightNameCheck = ""; 该模块的审核功能
            string ModRightNameCheck = "Sc_ProcessPlan_Check"; //该模块的审核功能
            DBUtility.ClsPub.CurUserName = CurUserName;//存储用户名
            try
            {
                ////判断是否有审核权限
                //    if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "审核失败!无权限!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //判断是否有审核权限
                if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //判断id是否大于0
                if (HInterID <= 0)
@@ -611,14 +641,15 @@
            try
            {
                //判断权限
                //if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, false, User))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "没有删除权限";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, false, User))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有删除权限";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                if (oBill.omodel.HChecker != "")
@@ -659,6 +690,7 @@
        #endregion
        #endregion
        /// <summary>
        /// 返回生产工序派工单列表
        /// </summary>
@@ -666,20 +698,30 @@
        /// <returns></returns>
        [Route("Sc_ProcessMangement/MES_Sc_ProcessSendWorkMain_Json")]
        [HttpGet]
        public object MES_Sc_ProcessSendWorkMain_Json(string sWhere)
        public object MES_Sc_ProcessSendWorkMain_Json(string sWhere,string user)
        {
            DataSet ds;
            try
            {
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("Sc_ProcessSendWork_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限查询!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_Sc_ProcessSendWorkList ", "h_v_Sc_ProcessSendWorkList");
                    ds = oCN.RunProcReturn("select top 500 * from h_v_Sc_ProcessSendWorkList order by hmainid desc ", "h_v_Sc_ProcessSendWorkList");
                }
                else
                {
                    string sql1 = "select * from h_v_Sc_ProcessSendWorkList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    string sql = sql1 + sWhere+ " order by hmainid desc ";
                    ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessSendWorkList");
                }
            }
@@ -709,11 +751,23 @@
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            string user = sArray[2].ToString();//用户名
            string UserName = "";
            ListModels oListModels = new ListModels();
            try
            {
                //判断是否有编辑权限
                if (!DBUtility.ClsPub.Security_Log("Sc_ProcessSendWork_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限编辑!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DAL.ClsSc_ProcessSendWork Sendwork = new DAL.ClsSc_ProcessSendWork();
                List<Model.ClsSc_ProcessSendWorkMain> lsmain = new List<Model.ClsSc_ProcessSendWorkMain>();
                msg2 = msg2.Replace("\\", "");
@@ -885,11 +939,23 @@
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            string user = sArray[2].ToString();
            string UserName = "";
            ListModels oListModels = new ListModels();
            try
            {
                //判断是否有编辑权限
                if (!DBUtility.ClsPub.Security_Log("WW_EntrustProcSendWorkBill_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限编辑!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                WebAPI.DLL.ClsSc_ProcessSendWork Sendwork = new WebAPI.DLL.ClsSc_ProcessSendWork();
                List<WebAPI.Models.ClsSc_ProcessSendWorkMain> lsmain = new List<WebAPI.Models.ClsSc_ProcessSendWorkMain>();
                msg2 = msg2.Replace("\\", "");
@@ -1086,20 +1152,30 @@
        /// <returns></returns>
        [Route("Sc_ProcessMangement/MES_QC_NoPassProdCheckBill_Json")]
        [HttpGet]
        public object MES_QC_NoPassProdCheckBill_Json(string sWhere)
        public object MES_QC_NoPassProdCheckBill_Json(string sWhere,string user)
        {
            DataSet ds;
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("QC_NoPassProdCheckBillQuery", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_QC_NoPassProdCheckBillList ", "h_v_QC_NoPassProdCheckBillList");
                    ds = oCN.RunProcReturn("select top 500 * from h_v_QC_NoPassProdCheckBillList order by hmainid desc ", "h_v_QC_NoPassProdCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_NoPassProdCheckBillList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    string sql = sql1 + sWhere+ " order by hmainid desc ";
                    ds = oCN.RunProcReturn(sql, "h_v_QC_NoPassProdCheckBillList");
                }
            }
@@ -1113,6 +1189,184 @@
            }
            return GetObjectJson(ds);
        }
        /// <summary>
        /// 不合格评审  删除
        /// </summary>
        /// <param name="HInterID"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        [Route("Sc_ProcessMangement/ProcessMangementDeleteBill")]
        [HttpGet]
        public object ProcessMangementDeleteBill(string HInterID, string user)
        {
            try
            {
                if (!DBUtility.ClsPub.Security_Log("QC_NoPassProdCheckBill_Drop", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限删除";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("select * from h_v_QC_NoPassProdCheckBillList where hmainid =" + HInterID + " ", "h_v_QC_NoPassProdCheckBillList");
                if (ds.Tables[0].Rows[0]["审核人"].ToString() != "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据已审核,不能删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                oCN.RunProc("Delete from QC_NoPassProdCheckBillMain where HInterID=" + HInterID);
                oCN.RunProc("Delete from QC_NoPassProdCheckBillSub where HInterID=" + HInterID);
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除失败!"+e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #region 不合格评审 审核/反审核
        [Route("Sc_ProcessMangement/AuditProcessMangement")]
        [HttpGet]
        public object AuditProcessMangement(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "QC_NoPassProdCheckBill_Check"; //该模块的审核功能
            DBUtility.ClsPub.CurUserName = CurUserName;//存储用户名
            try
            {
                ////判断是否有审核权限
                if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "审核失败!无权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (HInterID <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "ID小于0";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                Int64 lngBillKey = 0;
                lngBillKey = DBUtility.ClsPub.isLong(HInterID);//数据转换
                //查询审核的数据
                ds = oCN.RunProcReturn("select * from QC_NoPassProdCheckBillMain where HInterID='" + HInterID + "'", "QC_NoPassProdCheckBillMain");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    var hcloseman = ds.Tables[0].Rows[0]["HCloseMan"].ToString();//关闭人
                    var hdeleteman = ds.Tables[0].Rows[0]["HDeleteMan"].ToString();//作废人
                    var hchecker = ds.Tables[0].Rows[0]["HChecker"].ToString();//审核人
                    if (hcloseman != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "当前单据已关闭,无法审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (hdeleteman != "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "当前单据已作废,无法审核!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //IsAudit==0 审核
                    if (IsAudit == 1)
                    {
                        if (hchecker != "")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "当前单据已审核,无法再次审核!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    //IsAudit==1 反审核
                    if (IsAudit == 2)
                    {
                        if (hchecker == "")
                        {
                            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 == 1)
                {
                    oCN.RunProc(" Update QC_NoPassProdCheckBillMain set HChecker='" + CurUserName + "',HCheckDate='" + DateTime.Now + "',HBillStatus=2 Where HBillType='7509' and HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "审核成功!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //反审核提交
                if (IsAudit == 2)
                {
                    oCN.RunProc(" Update QC_NoPassProdCheckBillMain set HChecker='',HCheckDate=null,HBillStatus=0 Where HBillType='7509' and HInterID=" + HInterID);
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "反审核成功!";
                    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
        /// <summary>
        /// PDA工序汇报单保存
@@ -1326,10 +1580,21 @@
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            string user = sArray[2].ToString();//用户名
            string UserName;
            ListModels oListModels = new ListModels();
            try
            {
                //判断是否有编辑权限
                if (!DBUtility.ClsPub.Security_Log("Sc_ICMOReportBill_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限编辑!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DAL.ClsSc_ProcessReport ReportModel = new DAL.ClsSc_ProcessReport();
                List<Model.ClsSc_ProcessReportMain> lsmain = new List<Model.ClsSc_ProcessReportMain>();
                msg2 = msg2.Replace("\\", "");
@@ -1540,12 +1805,23 @@
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            string user = sArray[2].ToString();
            string UserName="";
            ListModels oListModels = new ListModels();
            try
            {
                //判断权限
                if (!DBUtility.ClsPub.Security_Log("QC_NoPassProdCheckBill_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DLL.ClsQC_NoPassProdCheckBill oBill = new DLL.ClsQC_NoPassProdCheckBill();
                List<Model.ClsQC_NoPassProdCheckBillMain> lsmain = new List<Model.ClsQC_NoPassProdCheckBillMain>();
                msg2 = msg2.Replace("\\", "");
@@ -1909,20 +2185,30 @@
        /// <returns></returns>
        [Route("Sc_ProcessMangement/MES_WW_EntrustProcSendWorkBill_Json")]
        [HttpGet]
        public object MES_WW_EntrustProcSendWorkBill_Json(string sqlWhere)
        public object MES_WW_EntrustProcSendWorkBill_Json(string sqlWhere,string user)
        {
            DataSet ds;
            try
            {
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("WW_EntrustProcSendWorkBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限查询!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_WW_EntrustProcSendWorkBillList ", "h_v_WW_EntrustProcSendWorkBillList");
                    ds = oCN.RunProcReturn("select top 500 * from h_v_WW_EntrustProcSendWorkBillList order by hmainid desc ", "h_v_WW_EntrustProcSendWorkBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_WW_EntrustProcSendWorkBillList where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    string sql = sql1 + sqlWhere+ " order by hmainid desc ";
                    ds = oCN.RunProcReturn(sql, "h_v_WW_EntrustProcSendWorkBillList");
                }
            }
@@ -1944,11 +2230,21 @@
        /// <returns></returns>
        [Route("Sc_ProcessMangement/MES_WW_EntrustProcessReportBill_Json")]
        [HttpGet]
        public object MES_WW_EntrustProcessReportBill_Json(string sqlWhere)
        public object MES_WW_EntrustProcessReportBill_Json(string sqlWhere,string user)
        {
            DataSet ds;
            try
            {
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("WW_EntrustProcessReportBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限查询!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
@@ -1978,21 +2274,31 @@
        /// <param name="sqlWhere"></param>
        /// <returns></returns>
        [Route("Sc_ProcessMangement/MES_WW_EntrustProcessSendOutBillList_Json")]
        [HttpGet]
        public object MES_WW_EntrustProcessSendOutBillList_Json(string sqlWhere)
        [HttpGet]
        public object MES_WW_EntrustProcessSendOutBillList_Json(string sqlWhere,string user)
        {
            DataSet ds;
            try
            {
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("WW_EntrustProcessSendOutBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限查询!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_WW_EntrustProcessSendOutBillList ", "h_v_WW_EntrustProcessSendOutBillList");
                    ds = oCN.RunProcReturn("select top 500 * from h_v_WW_EntrustProcessSendOutBillList order by hmainid desc ", "h_v_WW_EntrustProcessSendOutBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_WW_EntrustProcessSendOutBillList where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    string sql = sql1 + sqlWhere+ " order by hmainid desc ";
                    ds = oCN.RunProcReturn(sql, "h_v_WW_EntrustProcessSendOutBillList");
                }
            }
@@ -2023,11 +2329,23 @@
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            string user = sArray[2].ToString();//用户名
            string UserName = "";
            ListModels oListModels = new ListModels();
            try
            {
                //判断是否有编辑权限
                if (!DBUtility.ClsPub.Security_Log("WW_EntrustProcessReportBill_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限编辑!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                WebAPI.DLL.ClsWW_EntrustProcessReportBill Sendwork = new WebAPI.DLL.ClsWW_EntrustProcessReportBill();
                List<WebAPI.Models.ClsWW_EntrustProcessReportBillMain> lsmain = new List<WebAPI.Models.ClsWW_EntrustProcessReportBillMain>();
                msg2 = msg2.Replace("\\", "");
@@ -2331,11 +2649,23 @@
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            string user = sArray[1].ToString();//用户名
            string UserName = "";
            ListModels oListModels = new ListModels();
            try
            {
                //判断是否有编辑权限
                if (!DBUtility.ClsPub.Security_Log("WW_EntrustProcessSendOutBill_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限编辑!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                WebAPI.DLL.ClsWW_EntrustProcessSendOutBill Sendwork = new WebAPI.DLL.ClsWW_EntrustProcessSendOutBill();
                List<WebAPI.Models.ClsWW_EntrustProcessSendOutBillMain> lsmain = new List<WebAPI.Models.ClsWW_EntrustProcessSendOutBillMain>();
                msg2 = msg2.Replace("\\", "");