YL
2021-06-02 7e2f454e262574b99a0a0f7b523bab382d44f4f8
WebAPI/Controllers/BaseSet/Gy_MaintenanceModeController.cs
@@ -196,63 +196,6 @@
        //}
        /// <summary>
        /// 维修方式列表禁用按钮
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_MaintenanceMode/JY_Json")]
        [HttpGet]
        public object JY_Json(long HItemID)
        {
            try
            {
                ds = oCN.RunProcReturn("update Gy_Department set HStopFlag = 1 where HItemID =  " + HItemID, "Gy_Department");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "禁用成功";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// 维修方式列表反禁用按钮
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_MaintenanceMode/FJY_Json")]
        [HttpGet]
        public object FJY_Json(long HItemID)
        {
            try
            {
                ds = oCN.RunProcReturn("update Gy_Department set HStopFlag = 0 where HItemID =  " + HItemID, "Gy_Department");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "反禁用成功";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// 新增单据-保存按钮
@@ -277,7 +220,7 @@
                List<MaintenanceMode> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<MaintenanceMode>>(msg1);
                long HItemID = list[0].HItemID;
                long HItemID = list[0].HItemID.ToString() == "" ? 0 : list[0].HItemID;
                string HNumber = list[0].HNumber;
                string HName = list[0].HName;
                string HShortNumber = list[0].HNumber;
@@ -305,10 +248,13 @@
                oCN.RunProc("Insert Into Gy_RepairType " +
                "(HNumber,HName,HHelpCode,HShortNumber,HParentID" +
                ",HLevel,HEndFlag,HStopflag,HRemark) " +
                " values('" + HNumber + "','"+ HName + "','"+ HHelpCode + "','" + HShortNumber + "','0'" +
                " values('" + HNumber + "','"+ HName + "','"+ HHelpCode + "','" + HShortNumber + "','" + HItemID + "'" +
                ",'1',0,'" + HStopflag + "','"+ HRemark + "')");
                //修改上级为非末级代码
                oCN.RunProc("Update Gy_RepairType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                if (list[0].HItemID.ToString() != "")
                {
                    oCN.RunProc("Update Gy_RepairType set HEndflag=0 where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -358,7 +304,7 @@
                string HNumber = list[0].HNumber;
                string HName = list[0].HName;
                string HShortNumber = list[0].HNumber;
                long HParentID = list[0].HParentID;
                long HParentID = list[0].HParentID.ToString() == "" ? 0 : list[0].HParentID;
                string HHelpCode = list[0].HHelpCode;
                string HRemark = list[0].HRemark;
                string HStopflag = list[0].HStopflag;
@@ -406,7 +352,7 @@
                    ",HStopflag='" + HStopflag + "'" +
                    ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                //修改子项目代码
                //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Department,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
                //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairType,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
                //将上级 为非末级
                oCN.RunProc("Update Gy_RepairType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                //