/// <summary>
        /// 新建操作流程
        /// </summary>
        /// <param name="flowNew"></param>
        /// <returns></returns>
        public ActionResult <bool> AddOpreationFlow(OpreationFlowNew flowNew)
        {
            try
            {
                if (flowNew == null)
                {
                    throw new Exception("参数有误");
                }
                var check = _rpsopreation.Any(p => p.ID == flowNew.OpreationID);
                if (!check)
                {
                    throw new Exception("未找到该操作");
                }
                check = _rpsof.Any(p => p.PointName == flowNew.PointName);
                if (check)
                {
                    throw new Exception("该节点已存在:" + flowNew.PointName);
                }
                var _opreationflow = flowNew.MAPTO <Basic_OpreationFlow>();
                _rpsof.Add(_opreationflow);

                _work.Commit();
                return(new ActionResult <bool>(true));
            }
            catch (Exception ex)
            {
                return(new ActionResult <bool>(ex));
            }
        }
Exemple #2
0
 public ActionResult <bool> AddOpreationFlow(OpreationFlowNew flowNew)
 {
     LogContent = "新建操作流程,参数源:" + JsonConvert.SerializeObject(flowNew);
     return(bll.AddOpreationFlow(flowNew));
 }