Ejemplo n.º 1
0
        public string GetProjectThresholdByOrgAndZCLB([FromUri] ProjectMstModel parameters)
        {
            if (string.IsNullOrEmpty(parameters.FDeclarationUnit))
            {
                return(DCHelper.ErrorMessage("组织编码为空!"));
            }
            if (string.IsNullOrEmpty(parameters.FExpenseCategory))
            {
                return(DCHelper.ErrorMessage("项目类型为空!"));
            }
            Dictionary <string, object> dicWhere = new Dictionary <string, object>();

            new CreateCriteria(dicWhere).Add(ORMRestrictions <string> .Eq("Orgcode", parameters.FDeclarationUnit));
            IList <ProjectThresholdModel> projectThresholds = ProjectThresholdService.Find(dicWhere).Data;

            if (projectThresholds.Count > 0)
            {
                foreach (var projectThreshold in projectThresholds)
                {
                    IList <String> useCodeList = (projectThreshold.ProjTypeId ?? "").Split(',').ToList <String>();
                    if (useCodeList.Contains(parameters.FExpenseCategory))
                    {
                        return(JsonConvert.SerializeObject(projectThreshold));
                    }
                }
            }
            return(JsonConvert.SerializeObject(new ProjectThresholdModel()));
        }
Ejemplo n.º 2
0
        public string GetBudgetProcessCtrl([FromUri] ProjectMstModel param)
        {
            if (string.IsNullOrEmpty(param.FDeclarationUnit))
            {
                return(DCHelper.ErrorMessage("申报单位为空!"));
            }
            if (string.IsNullOrEmpty(param.FBudgetDept))
            {
                return(DCHelper.ErrorMessage("预算部门为空!"));
            }
            if (string.IsNullOrEmpty(param.FYear))
            {
                return(DCHelper.ErrorMessage("年度为空!"));
            }

            var processStatus = BudgetProcessCtrlService.FindBudgetProcessCtrl(param.FDeclarationUnit, param.FBudgetDept, param.FYear);

            return(DataConverterHelper.SerializeObject(processStatus));
        }