Esempio n. 1
0
        public ActionResult ConfirmApplyChange(STCheckEquipApplyChange applyChangeModel)
        {
            var Status = applyChangeModel.Status == "yes" ? "0" : "7";
            ControllerResult result = ControllerResult.SuccResult;

            try
            {
                string erroMsg = string.Empty;
                result.IsSucc = true;
                if (!sTCheckEquipService.UpdateCustomStatus(applyChangeModel.SubmitId, Status, "", out erroMsg))
                {
                    result         = ControllerResult.FailResult;
                    result.ErroMsg = erroMsg;
                    result.IsSucc  = false;
                }
                else
                {
                    LogUserAction("进行了审核申请修改操作");
                }
            }
            catch (Exception ex)
            {
                result         = ControllerResult.FailResult;
                result.ErroMsg = ex.Message;
                result.IsSucc  = true;
            }

            return(Content(result.ToJson()));
        }
Esempio n. 2
0
        public ActionResult ApplyChange(STCheckEquipApplyChange applyChangeModel)
        {
            ControllerResult result = ControllerResult.SuccResult;

            try
            {
                SupvisorJob job = new SupvisorJob()
                {
                    ApproveType       = ApproveType.STApproveEquip,
                    CreateBy          = GetCurrentUserId(),
                    CustomId          = applyChangeModel.SubmitId,
                    CreateTime        = DateTime.Now,
                    NeedApproveId     = applyChangeModel.SubmitId.ToString(),
                    NeedApproveStatus = NeedApproveStatus.CreateForChangeApply,
                    SubmitName        = applyChangeModel.SubmitName,
                    SubmitText        = applyChangeModel.SubmitText
                };


                string erroMsg = string.Empty;
                if (!sTCheckEquipService.ApplyChangeForCustom(job, applyChangeModel.SubmitId, out erroMsg))
                {
                    result         = ControllerResult.FailResult;
                    result.ErroMsg = erroMsg;
                }
                else
                {
                    LogUserAction("进行了申请修改操作,申请人为{0},申请原因为{1}".Fmt(applyChangeModel.SubmitName, applyChangeModel.SubmitText));
                }
            }
            catch (Exception ex)
            {
                result         = ControllerResult.FailResult;
                result.ErroMsg = ex.Message;
            }

            return(Content(result.ToJson()));
        }