public PlanDto CreatePlan(CreatePlanInput input) { Plan plan = _mapper.Map <Plan>(input); _planDomainService.ActivePlan(plan); _planRepository.Insert(plan); return(_mapper.Map <PlanDto>(plan)); }
public async Task CreatePlans(CreatePlanInput input) { for (int i = 1; i < input.Qty; i++) { await _planInfo.InsertAsync(new PlanInfo { CardCode = DateTime.Now.ToString("yyyyMMddHHmmss") + i.ToString("000"), CreationTime = DateTime.Now, Shifts = input.Shifts, IsDeleted = false, Status = 0, PlanDate = input.PlanDate.Date, ProductLineId = input.ProductLineId, TechnologyCode = input.TechnologyCode, OutCode = input.OutCode, Remark = input.Remark, }); } }
public async Task <IActionResult> Create([FromBody] CreatePlanInput input) { var result = _handler.Handle(input); return(await ApiResponse(result)); }