public async Task <IActionResult> BEAT_OUT([FromForm] IFormCollection fm) { DT_RETURN dT_RETURN = new DT_RETURN(); string LINE = fm["LINE"].ToString() == "" ? "" : fm["LINE"].ToString().Trim(); string CODE = fm["CODE"].ToString() == "" ? "" : fm["CODE"].ToString().Trim(); string MODEL = fm["MODEL"].ToString() == "" ? "" : fm["MODEL"].ToString().Trim(); if (!_repairRepository.IODM_BEATE(LINE)) { dT_RETURN.Success = false; dT_RETURN.Msg = "当前线别未维护节拍"; dT_RETURN.Service = "BEAT_OUT"; return(Ok(dT_RETURN)); } switch (MODEL) { case "TT": Model.DT_BEAT lastResult = await _repairRepository.BEAT_OUTTT(LINE, CODE, MODEL); return(Ok(lastResult)); default: break; } return(Ok()); }
public async Task <IActionResult> ADD_ATTENDANCE([FromForm] IFormCollection fm) { var ID_DATE = fm["ID_DATE"].ToString() == "" ? "" : fm["ID_DATE"].ToString().Trim(); var ID_LINE = fm["ID_LINE"].ToString() == "" ? "" : fm["ID_LINE"].ToString().Trim(); var ID_MANAGER = fm["ID_MANAGER"].ToString() == "" ? "" : fm["ID_MANAGER"].ToString().Trim(); var ID_ONWORK = fm["ID_ONWORK"].ToString() == "" ? "" : fm["ID_ONWORK"].ToString().Trim(); var ID_OFFWORK = fm["ID_OFFWORK"].ToString() == "" ? "" : fm["ID_OFFWORK"].ToString().Trim(); var ID_OUTWORK = fm["ID_OUTWORK"].ToString() == "" ? "" : fm["ID_OUTWORK"].ToString().Trim(); var ID_FREEWORK = fm["ID_FREEWORK"].ToString() == "" ? "" : fm["ID_FREEWORK"].ToString().Trim(); var ID_NONWORK = fm["ID_NONWORK"].ToString() == "" ? "" : fm["ID_NONWORK"].ToString().Trim(); var ID_CODE = fm["ID_CODE"].ToString() == "" ? "" : fm["ID_CODE"].ToString().Trim(); var ID_MODEL = fm["ID_MODEL"].ToString() == "" ? "" : fm["ID_MODEL"].ToString().Trim(); var ID_TIME = fm["ID_TIME"].ToString() == "" ? "" : fm["ID_TIME"].ToString().Trim(); var ID_TUSER = fm["ID_TUSER"].ToString() == "" ? "" : fm["ID_TUSER"].ToString().Trim(); var ID_CLASS = fm["ID_CLASS"].ToString() == "" ? "" : fm["ID_CLASS"].ToString().Trim(); var CRT_USER = fm["CRT_USER"].ToString() == "" ? "" : fm["CRT_USER"].ToString().Trim(); DateTime dateTime1 = Convert.ToDateTime(ID_DATE); var dA_CLENTNAME = new DA_ATTENDANCE { ID = Guid.NewGuid(), CRT_DATE = DateTime.Now, CRT_USER = CRT_USER, ID_DATE = dateTime1, ID_LINE = ID_LINE, ID_MANAGER = ID_MANAGER, ID_ONWORK = ID_ONWORK, ID_OFFWORK = ID_OFFWORK, ID_OUTWORK = ID_OUTWORK, ID_FREEWORK = ID_FREEWORK, ID_NONWORK = ID_NONWORK, ID_CODE = ID_CODE, ID_MODEL = ID_MODEL, ID_TIME = ID_TIME, ID_TUSER = ID_TUSER, ID_CLASS = ID_CLASS, }; _sqlRepository.AddDA_ATTENDANCE(dA_CLENTNAME); await _sqlRepository.SaveAsync(); DT_RETURN rETURN = new DT_RETURN { Msg = "提交完成", Success = false, Service = "ADD_ATTENDANCE" }; return(Ok(rETURN)); }