Esempio n. 1
0
        public async Task <IActionResult> DeleteForm([FromBody] BaseInput input)
        {
            if (input?.KeyValue == null)
            {
                return(BadRequest("主键ID未传值!"));
            }
            var entity = await _dialysisObservationApp.GetForm(input.KeyValue);

            if (entity == null)
            {
                return(BadRequest("主键ID有误!"));
            }
            var userId = _usersService.GetCurrentUserId();

            entity.F_EnabledMark = false;
            entity.F_DeleteMark  = true;
            entity.F_DeleteTime  = System.DateTime.Now;
            await _dialysisObservationApp.UpdateForm(entity);

            //var data = new
            //{
            //    message = "删除成功",
            //    id = entity.F_Id
            //};
            return(Ok("删除成功"));
        }
        public async Task <IActionResult> GetFormJson(string keyValue)
        {
            var data = await _dialysisObservationApp.GetForm(keyValue);

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