Ejemplo n.º 1
0
        public async Task <IActionResult> SubmitFormWipe([FromBody] BaseSubmitInput <MachineDisinfectionDto> input)
        {
            MachineDisinfectionEntity entity;

            if (input.KeyValue.IsEmpty())
            {
                entity = _mapper.Map <MachineDisinfectionEntity>(input.Entity);
            }
            else
            {
                entity = await _machineDisinfectionApp.GetForm(input.KeyValue);
            }
            entity.CheckArgumentIsNull(nameof(entity));
            if (entity.F_CheckPerson == null)
            {
                entity.F_CheckPerson = _usersService.GetCurrentUserId();
            }
            if (entity.F_EnabledMark == null)
            {
                entity.F_EnabledMark = true;
            }
            await _machineDisinfectionApp.SubmitForm(entity, input.Entity);

            return(Success("操作成功。"));
        }
        public async Task <IActionResult> SubmitBriefForm([FromBody] BaseSubmitInput <WaterMBriefDto> input)
        {
            WaterMBriefEntity entity;

            if (input.KeyValue.IsEmpty())
            {
                entity = _mapper.Map <WaterMBriefEntity>(input.Entity);
            }
            else
            {
                entity = await _waterMBriefApp.GetForm(input.KeyValue);
            }
            if (entity.F_OperatePerson == null)
            {
                var user = await _usersService.GetCurrentUserAsync();

                entity.F_OperatePerson     = user.F_Id;
                entity.F_OperatePersonName = user.F_RealName;
            }
            if (entity.F_EnabledMark == null)
            {
                entity.F_EnabledMark = true;
            }
            await _waterMBriefApp.SubmitForm(entity, input.Entity);

            return(Success("操作成功。"));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> SubmitForm([FromBody] BaseSubmitInput <WaterMLogDto> input)
        {
            WaterMLogEntity entity;

            if (input.KeyValue.IsEmpty())
            {
                entity = _mapper.Map <WaterMLogEntity>(input.Entity);
                if (entity.F_OperatePerson == null)
                {
                    entity.F_OperatePerson = _usersService.GetCurrentUserId();
                }
                if (entity.F_EnabledMark == null)
                {
                    entity.F_EnabledMark = true;
                }
            }
            else
            {
                entity = await _waterMLogApp.GetForm(input.KeyValue);
            }

            await _waterMLogApp.SubmitForm(entity, input.Entity);

            return(Success("操作成功。"));
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> SubmitTransfer([FromBody] BaseSubmitInput <TransferLogDto> input)
        {
            //患者ID为空
            input.KeyValue.CheckArgumentIsNull(nameof(input.KeyValue));
            var entity = _mapper.Map <TransferLogEntity>(input.Entity);

            entity.CheckArgumentIsNull(nameof(entity));
            await _patientApp.SubmitTransfer(entity, input.KeyValue);

            return(Success("操作成功。"));
        }
Ejemplo n.º 5
0
        public async Task <IActionResult> SubmitForm([FromBody] BaseSubmitInput <OrganizeDto> input)
        {
            OrganizeEntity entity = null;

            if (input.KeyValue.IsEmpty())
            {
                entity = _mapper.Map <OrganizeEntity>(input.Entity);
            }
            else
            {
                entity = await _organizeApp.GetForm(input.KeyValue);
            }
            await _organizeApp.SubmitForm(entity, input.Entity);

            return(Success("操作成功。"));
        }
        public async Task <IActionResult> SubmitForm([FromBody] BaseSubmitInput <ProcessFlowDto> input)
        {
            ProcessFlowEntity entity;

            if (input.KeyValue.IsEmpty())
            {
                entity = _mapper.Map <ProcessFlowEntity>(input.Entity);
            }
            else
            {
                entity = await _processFlowApp.GetForm(input.KeyValue);
            }
            await _processFlowApp.SubmitForm(entity, input.Entity);

            return(Success("操作成功。"));
        }
Ejemplo n.º 7
0
        public async Task <IActionResult> SubmitForm([FromBody] BaseSubmitInput <ModuleDto> input)
        {
            ModuleEntity entity = null;

            if (input.KeyValue.IsEmpty())
            {
                entity = _mapper.Map <ModuleEntity>(input.Entity);
            }
            else
            {
                entity = await _moduleApp.GetForm(input.KeyValue);
            }
            entity.CheckArgumentIsNull(nameof(entity));
            await _moduleApp.SubmitForm(entity, input.Entity);

            return(Success("操作成功。"));
        }
Ejemplo n.º 8
0
        public async Task <IActionResult> SubmitForm([FromBody] BaseSubmitInput <DialysisObservationDto> input)
        {
            DialysisObservationEntity entity;

            if (input.KeyValue.IsEmpty())
            {
                entity = _mapper.Map <DialysisObservationEntity>(input.Entity);
            }
            else
            {
                entity = await _dialysisObservationApp.GetForm(input.KeyValue);
            }
            entity.CheckArgumentIsNull(nameof(entity));
            await _dialysisObservationApp.SubmitForm(entity, input.Entity);

            return(Success("操作成功。"));
        }
Ejemplo n.º 9
0
        public async Task <IActionResult> SubmitForm([FromBody] BaseSubmitInput <NutritionDietaryDto> input)
        {
            NutritionDietaryEntity entity;

            if (input.KeyValue.IsEmpty())
            {
                entity = _mapper.Map <NutritionDietaryEntity>(input.Entity);
            }
            else
            {
                entity = await _doseGuideApp.GetForm(input.KeyValue);
            }
            entity.CheckArgumentIsNull(nameof(entity));
            await _doseGuideApp.SubmitForm(entity, input.Entity);

            return(Success("操作成功。"));
        }
        public async Task <IActionResult> SubmitItemForm([FromBody] BaseSubmitInput <LabInstrumentItemDto> input)
        {
            LabInstrumentItemEntity entity;

            if (input.KeyValue.IsEmpty())
            {
                entity = _mapper.Map <LabInstrumentItemEntity>(input.Entity);
            }
            else
            {
                entity = await _labInstrumentApp.GetSingleItem(input.KeyValue);
            }
            entity.CheckArgumentIsNull(nameof(entity));
            var data = await _labInstrumentApp.SubmitItemForm(entity, input.Entity);

            return(Success("操作成功。", data));
        }
Ejemplo n.º 11
0
        public async Task <IActionResult> SubmitForm([FromBody] BaseSubmitInput <UserDto> input)
        {
            UserEntity entity = null;

            if (input.KeyValue.IsEmpty())
            {
                entity = _mapper.Map <UserEntity>(input.Entity);
            }
            else
            {
                input.Entity.F_Password = null;
                entity = await _userApp.FindUserAsync(input.KeyValue);
            }

            await _userApp.SubmitForm(entity, input.Entity);

            return(Success("操作成功。"));
        }
        public async Task <IActionResult> SubmitForm([FromBody] BaseSubmitInput <MedicalRecordDto> input)
        {
            MedicalRecordEntity entity;

            if (input.KeyValue.IsEmpty())
            {
                entity = _mapper.Map <MedicalRecordEntity>(input.Entity);
                if (entity.F_AuditFlag == null)
                {
                    entity.F_AuditFlag = false;
                }
            }
            else
            {
                entity = await _medicalRecordApp.GetForm(input.KeyValue);
            }
            entity.CheckArgumentIsNull(nameof(entity));
            await _medicalRecordApp.SubmitForm(entity, input.KeyValue);

            return(Success("操作成功。"));
        }
Ejemplo n.º 13
0
        public async Task <IActionResult> SubmitForm([FromBody] BaseSubmitInput <MachineProcessDto> input)
        {
            MachineProcessEntity entity;

            if (input.KeyValue.IsEmpty())
            {
                entity = _mapper.Map <MachineProcessEntity>(input.Entity);
            }
            else
            {
                entity = await _machineProcessApp.GetForm(input.KeyValue);
            }
            if (entity.F_OperatePerson == null)
            {
                entity.F_OperatePerson = _usersService.GetCurrentUserId();
            }
            if (entity.F_OperateTime == null)
            {
                entity.F_OperateTime = DateTime.Now;
            }
            await _machineProcessApp.SubmitForm(entity, input.Entity);

            return(Success("操作成功。"));
        }
Ejemplo n.º 14
0
        public async Task <IActionResult> SubmitForm([FromBody] BaseSubmitInput <PatientDto> input)
        {
            PatientEntity entity = null;

            if (input.KeyValue.IsEmpty())
            {
                try
                {
                    entity = _mapper.Map <PatientEntity>(input.Entity);
                }
                catch (Exception ex)
                {
                    var s = ex.Message;
                }
            }
            else
            {
                entity = await _patientApp.GetForm(input.KeyValue);
            }
            entity.CheckArgumentIsNull(nameof(entity));
            await _patientApp.SubmitForm(entity, input.Entity);

            return(Success("操作成功。"));
        }