Example #1
0
        public ActionResult SavePerf(JxQuantitativeIndicatorsModel model)
        {
            var years = new YearSettingBLL().GetYearSettings(GetDefaultPagination("JXBM"), null);

            model.JXBM = model.JXBM ?? JsonConvert.DeserializeObject <List <YearSettingModel> >(years.ToJson())
                         .Find(delegate(YearSettingModel item) { return(item.JXND == DateTime.Now.Year.ToString()); }).JXBM;
            BpeTA002Entity perf = new BpeTA002Entity
            {
                KPIBH  = model.KPIBH,
                JXBM   = model.JXBM,
                ZBBH   = model.ThirdZBBH,
                ZBJX   = model.ZBJX,
                ZBCD   = model.ZBCD,
                ZBGS   = model.ZBGS,
                ZBGSMS = model.ZBGSMS,
                ZBSDMD = model.ZBSDMD,
                JLDW   = model.JLDW,
                REMARK = model.REMARK,
                STATUS = model.STATUS
            };

            if (string.IsNullOrEmpty(perf.KPIBH))
            {
                bll.CreateJxQuantitativeIndicatorsForm(perf);
            }
            else
            {
                bll.ModifyJxQuantitativeIndicatorsForm(perf.KPIBH, perf);
            }
            return(Success("操作成功"));
        }
Example #2
0
        /// <summary>
        /// 修改绩效定量指标表单
        /// </summary>
        /// <param name="kpibh">定量绩效指标编码</param>
        /// <param name="entity">绩效定量指标实体</param>
        /// <param name="isModifyStatus">是否为修改状态</param>
        /// <returns></returns>
        public void ModifyJxQuantitativeIndicatorsForm(string kpibh, BpeTA002Entity entity)
        {
            try
            {
                entity.METCODELIST = string.Join("|", GetMetacodes(entity.ZBGS));

                bpeTA002Service.SaveForm(kpibh, entity);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #3
0
        /// <summary>
        /// 新增绩效定量指标表单
        /// </summary>
        /// <param name="entity">绩效定量指标实体</param>
        /// <returns></returns>
        public void CreateJxQuantitativeIndicatorsForm(BpeTA002Entity entity)
        {
            try
            {
                if (bpeTA002Service.IsEntityExist(entity.ZBBH, entity.JXBM))
                {
                    throw new Exception("已为该定量指标设置过计算公式");
                }

                entity.METCODELIST = string.Join("|", GetMetacodes(entity.ZBGS));

                bpeTA002Service.SaveForm(null, entity);
            }
            catch (Exception)
            {
                throw;
            }
        }