/// <summary> /// 取消 /// </summary> /// <param name="rowsKeyValues"></param> /// <param name="loginUser"></param> /// <returns></returns> public bool CancelInfos(List<string> rowsKeyValues, string loginUser) { List<SrmBarcodeInfo> srmBarcodes = dal.GetList("[ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ") and [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Untreated, string.Empty); if (srmBarcodes.Count != rowsKeyValues.Count()) throw new Exception("MC:0x00000523");///仅同步状态为待处理时可以更新已取消 string sql = "update [LES].[TI_IFM_SRM_BARCODE] WITH(ROWLOCK) set [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Cancel + ",[MODIFY_DATE] = GETDATE(),[MODIFY_USER] = N'" + loginUser + "' where [ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ")"; return CommonBLL.ExecuteNonQueryBySql(sql); }
/// <summary> /// 重发 /// </summary> /// <param name="rowsKeyValues"></param> /// <param name="loginUser"></param> /// <returns></returns> public bool ResendInfos(List<string> rowsKeyValues, string loginUser) { List<SrmBarcodeInfo> srmBarcodes = dal.GetList("[ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ") and [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Suspend, string.Empty); if (srmBarcodes.Count != rowsKeyValues.Count()) throw new Exception("MC:0x00000524");///仅同步状态为挂起时可以更新已重发 //List<SapMaterialReservationInfo> sapMaterialReservations = dal.GetList("[MATNR] in ('" + string.Join("','", rowsKeyValues.ToArray()) + "')) and [MATNR] in ('" + string.Join("','", rowsKeyValues.ToArray()) + "'))", string.Empty); string sql = "update [LES].[TI_IFM_SRM_BARCODE] WITH(ROWLOCK) set [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Resend + ",[MODIFY_DATE] = GETDATE(),[MODIFY_USER] = N'" + loginUser + "' where [ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ")"; return CommonBLL.ExecuteNonQueryBySql(sql); }
/// <summary> /// 取消 /// </summary> /// <param name="rowsKeyValues"></param> /// <param name="loginUser"></param> /// <returns></returns> public bool CancelInfos(List <string> rowsKeyValues, string loginUser) { List <WmsVmiSupplyPlanInfo> wmsVmiSupplyPlans = dal.GetList("[ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ") and [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Untreated, string.Empty); if (wmsVmiSupplyPlans.Count != rowsKeyValues.Count()) { throw new Exception("MC:0x00000523");///仅同步状态为待处理时可以更新已取消 } string sql = "update [LES].[TI_IFM_WMS_VMI_SUPPLY_PLAN] WITH(ROWLOCK) set [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Cancel + ",[MODIFY_DATE] = GETDATE(),[MODIFY_USER] = N'" + loginUser + "' where [ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ")"; return(CommonBLL.ExecuteNonQueryBySql(sql)); }
/// <summary> /// 取消 /// </summary> /// <param name="rowsKeyValues"></param> /// <param name="loginUser"></param> /// <returns></returns> public bool CancelInfos(List <string> rowsKeyValues, string loginUser) { List <SapMaterialReservationInfo> sapMaterials = dal.GetList("[ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ") and [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Untreated, string.Empty); if (sapMaterials.Count != rowsKeyValues.Count()) { throw new Exception("MC:0x00000523");///仅同步状态为待处理时可以更新已取消 } string sql = "update [LES].[TI_IFM_SAP_MATERIAL_RESERVATION] WITH(ROWLOCK) set [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Cancel + ",[MODIFY_DATE] = GETDATE(),[MODIFY_USER] = N'" + loginUser + "' where [ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ")"; return(CommonBLL.ExecuteNonQueryBySql(sql)); }
/// <summary> /// 取消 /// </summary> /// <param name="rowsKeyValues"></param> /// <param name="loginUser"></param> /// <returns></returns> public bool CancelInfos(List <string> rowsKeyValues, string loginUser) { List <MesMissingpartsInfluenceOrderscopeInfo> sapMaterials = dal.GetList("[ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ") and [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Untreated, string.Empty); if (sapMaterials.Count != rowsKeyValues.Count()) { throw new Exception("MC:0x00000523");///仅同步状态为待处理时可以更新已取消 } string sql = "update [LES].[TI_IFM_MES_MISSINGPARTS_INFLUENCE_ORDERSCOPE] WITH(ROWLOCK) set [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Cancel + ",[MODIFY_DATE] = GETDATE(),[MODIFY_USER] = N'" + loginUser + "' where [ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ")"; return(CommonBLL.ExecuteNonQueryBySql(sql)); }
/// <summary> /// 取消 /// </summary> /// <param name="rowsKeyValues"></param> /// <param name="loginUser"></param> /// <returns></returns> public bool CancelInfos(List <string> rowsKeyValues, string loginUser) { List <MesProductionlineProcessOrderInfo> mesProductionlines = dal.GetList("[ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ") and [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Untreated, string.Empty); if (mesProductionlines.Count != rowsKeyValues.Count()) { throw new Exception("MC:0x00000523");///仅同步状态为待处理时可以更新已取消 } string sql = "update [LES].[TI_IFM_MES_PRODUCTIONLINE_PROCESS_ORDER] WITH(ROWLOCK) set [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Cancel + ",[MODIFY_DATE] = GETDATE(),[MODIFY_USER] = N'" + loginUser + "' where [ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ")"; return(CommonBLL.ExecuteNonQueryBySql(sql)); }
/// <summary> /// 重发 /// </summary> /// <param name="rowsKeyValues"></param> /// <param name="loginUser"></param> /// <returns></returns> public bool ResendInfos(List <string> rowsKeyValues, string loginUser) { List <WmsVmiTransitInventoryInfo> wmsVmiTransitInventories = dal.GetList("[ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ") and [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Suspend, string.Empty); if (wmsVmiTransitInventories.Count != rowsKeyValues.Count()) { throw new Exception("MC:0x00000524");///仅同步状态为挂起时可以更新已重发 } //List<SapMaterialReservationInfo> sapMaterialReservations = dal.GetList("[MATNR] in ('" + string.Join("','", rowsKeyValues.ToArray()) + "')) and [MATNR] in ('" + string.Join("','", rowsKeyValues.ToArray()) + "'))", string.Empty); string sql = "update [LES].[TI_IFM_WMS_VMI_TRANSIT_INVENTORY] WITH(ROWLOCK) set [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Resend + ",[MODIFY_DATE] = GETDATE(),[MODIFY_USER] = N'" + loginUser + "' where [ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ")"; return(CommonBLL.ExecuteNonQueryBySql(sql)); }
/// <summary> /// 重发 /// </summary> /// <param name="rowsKeyValues"></param> /// <param name="loginUser"></param> /// <returns></returns> public bool ResendInfos(List <string> rowsKeyValues, string loginUser) { List <MesBreakpointReplacementRecordInfo> sapMaterials = dal.GetList("[ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ") and [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Suspend, string.Empty); if (sapMaterials.Count != rowsKeyValues.Count()) { throw new Exception("MC:0x00000524");///仅同步状态为挂起时可以更新已重发 } //List<SapMaterialReservationInfo> sapMaterialReservations = dal.GetList("[MATNR] in ('" + string.Join("','", rowsKeyValues.ToArray()) + "')) and [MATNR] in ('" + string.Join("','", rowsKeyValues.ToArray()) + "'))", string.Empty); string sql = "update [LES].[TI_IFM_MES_BREAKPOINT_REPLACEMENT_RECORD] WITH(ROWLOCK) set [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Resend + ",[MODIFY_DATE] = GETDATE(),[MODIFY_USER] = N'" + loginUser + "' where [ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ")"; return(CommonBLL.ExecuteNonQueryBySql(sql)); }
/// <summary> /// 重发 /// </summary> /// <param name="rowsKeyValues"></param> /// <param name="loginUser"></param> /// <returns></returns> public bool ResendInfos(List <string> rowsKeyValues, string loginUser) { List <MesProductionOrderLackMaterialInfo> mesProductionOrders = dal.GetList("[ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ") and [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Suspend, string.Empty); if (mesProductionOrders.Count != rowsKeyValues.Count()) { throw new Exception("MC:0x00000524");///仅同步状态为挂起时可以更新已重发 } //List<SapMaterialReservationInfo> sapMaterialReservations = dal.GetList("[MATNR] in ('" + string.Join("','", rowsKeyValues.ToArray()) + "')) and [MATNR] in ('" + string.Join("','", rowsKeyValues.ToArray()) + "'))", string.Empty); string sql = "update [LES].[TI_IFM_MES_PRODUCTION_ORDER_LACK_MATERIAL] WITH(ROWLOCK) set [PROCESS_FLAG] = " + (int)ProcessFlagConstants.Resend + ",[MODIFY_DATE] = GETDATE(),[MODIFY_USER] = N'" + loginUser + "' where [ID] in (" + string.Join(",", rowsKeyValues.ToArray()) + ")"; return(CommonBLL.ExecuteNonQueryBySql(sql)); }