public DTOResponse UpdateKanbanFormEquipmentStatus() { DTOResponse dTOResponse = new DTOResponse(); try { List <INF_EQUIPMENTSTATUSEntity> list = HelperDbOperation.Select <INF_EQUIPMENTSTATUSEntity>(x => x.WMSLOCNUM == "none"); // from x in HelperDbOperation //select x.WMSLOCNUM == "none"; foreach (INF_EQUIPMENTSTATUSEntity item in list) { DateTime dateTime = DateTime.Parse(item.UPDATEDATE); DateTime now = DateTime.Now; TimeSpan timeSpan = Utils.DateDiff(dateTime, now); if (timeSpan.TotalSeconds < 60.0) { string eQUIPMENTID = item.EQUIPMENTID; string jOBID = item.JOBID; if (eQUIPMENTID.StartsWith("3")) { //dTOResponse = BPCommon.SetOutKanban_zhongxiang(eQUIPMENTID, item.JOBID); //dTOResponse = BPCommon.SetOutKanban_hengxiang(eQUIPMENTID, item.JOBID); } logger.Info(timeSpan.TotalSeconds.ToString() + "秒" + item.EQUIPMENTID + "更新信息:" + item.JOBID + "/" + item.BARCODE + "/" + item.TARGET + "/" + item.TUTYPE); if (eQUIPMENTID.StartsWith("2") && (item.TARGET == eQUIPMENTID || item.TARGET == "1") && int.Parse(item.JOBID) > 0) { //HelperRule.UpdateRkStation(eQUIPMENTID, item.JOBID); } } } dTOResponse.IsSuccess = true; dTOResponse.MessageText = "执行操作成功!"; return(dTOResponse); } catch (Exception ex) { dTOResponse.IsSuccess = false; dTOResponse.MessageText = ex.Message; logger.Error(ex); return(dTOResponse); } }
public DTOResponse GetkanbanInfo(LedInfoRequest request) { DTOResponse dtoResponse = new DTOResponse(); string reportno = request.REPORTNO; Report report = HelperDbOperation.Select <Report>((Expression <Func <Report, bool> >)(x => x.REPORTNO == reportno)).First <Report>(); if (report != null) { string datasource = report.DATASOURCE; using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection()) { List <object> objectList = dbConn.Select <object>(datasource); dtoResponse.ResultObject = (object)objectList; dtoResponse.IsSuccess = true; dtoResponse.MessageText = "查询操作成功!"; return(dtoResponse); } } else { dtoResponse.IsSuccess = false; return(dtoResponse); } }