public JsonResult GetCurWipAndHoldAndMoveDatas(string lastUpdateTime) { try { DateTime dt = DateTime.Parse(lastUpdateTime); if (dt < DateTime.Now.Date.AddHours(8) && DateTime.Now.Hour > 8) { //需要全部更新 var builder = new ReqRpt002TableDataBuilder(DateTime.Now.ToString("yyyy-MM-dd")); var tableData = new { moduleEntities = builder.DeptTableModuleRowEntities, testEntities = builder.DeptTableTestRowEntities, bankEntities = builder.DeptTableBankRowEntities, moduleTotal = builder.ModuleTotal, bankTotal = builder.BankTotal, testTotal = builder.TestTotal, fabTotal = builder.FabTotal, waferOutEntities = builder.WaferOutEntities, waferOutTotalEntity = builder.WaferOutTotalEntity }; var response = new { success = true, type = "all", tableData }; return(Json(response)); } else { var updater = new ReqRpt002TableDataUpdater(); var tableData = new { moduleEntities = updater.DeptTableModuleRowEntities, bankEntities = updater.DeptTableBankRowEntities, testEntities = updater.DeptTableTestRowEntities, moduleTotal = updater.ModuleTotal, testTotal = updater.TestTotal, bankTotal = updater.BankTotal, fabTotal = updater.FabTotal }; var response = new { success = true, type = "cur", tableData }; return(Json(response)); } } catch (Exception ex) { return(Json(new { success = false, msg = ex.Message })); } }
public JsonResult GetAllDatas(string date) { try { var builder = new ReqRpt002TableDataBuilder(date); var tableData = new { moduleEntities = builder.DeptTableModuleRowEntities, testEntities = builder.DeptTableTestRowEntities, bankEntities = builder.DeptTableBankRowEntities, moduleTotal = builder.ModuleTotal, bankTotal = builder.BankTotal, testTotal = builder.TestTotal, fabTotal = builder.FabTotal, waferOutEntities = builder.WaferOutEntities, waferOutTotalEntity = builder.WaferOutTotalEntity }; var response = new { success = true, tableData }; return(Json(response)); } catch (Exception ex) { return(Json(new { success = false, msg = ex.Message })); } }